Re: [PATCH] Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG
On Wed, Oct 04, 2006 at 11:57:45PM -0400, Amos Waterland wrote: > Did you try building with debug=y, then with debug=n, with no > intervening `make clean'? Yup. [EMAIL PROTECTED]:~/Xen/xenppc-unstable.hg.working$ history | egrep dist-xen Older stuff 562 make clean; PATH=/usr/bin:/bin make dist-xen 563 make clean; PATH=/usr/bin:/bin make debug=y dist-xen 564 make clean; PATH=/usr/bin:/bin make debug=y crash_debug=y dist-xen where xenppc-unstable.hg.working is "1b759b2522cd tip" Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [PATCH] Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG
On Thu, Oct 05, 2006 at 01:52:39PM +1000, Tony Breeds wrote: > On Wed, Oct 04, 2006 at 07:36:08AM -0400, Jimi Xenidis wrote: > > I think hollis nailed correctly, does it work for everyone? > > Works for me. Did you try building with debug=y, then with debug=n, with no intervening `make clean'? ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [PATCH] Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG
On Wed, Oct 04, 2006 at 07:36:08AM -0400, Jimi Xenidis wrote: > I think hollis nailed correctly, does it work for everyone? Works for me. Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH] Teach xm-test about Xmon.
If using a kernel with xmon enabled, when triggering a BUG() we enter xmon. This effectively stalls the xm-tests process. This patch teaches xm-test to recognise the xmon prompt and FAIL the test. This patch requires applies on top of my previous xm-test patches Signed-off-by: Tony Breeds <[EMAIL PROTECTED]> --- tools/xm-test/lib/XmTestLib/Console.py |5 + tools/xm-test/lib/XmTestLib/arch.py| 20 2 files changed, 25 insertions(+) --- diff -r 21738b37ac32 tools/xm-test/lib/XmTestLib/Console.py --- a/tools/xm-test/lib/XmTestLib/Console.pyWed Oct 04 14:54:10 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/Console.pyThu Oct 05 13:15:49 2006 +1000 @@ -31,6 +31,7 @@ import fcntl import fcntl import select +import arch from Test import * TIMEDOUT = 1 @@ -120,6 +121,7 @@ class XmConsole: def __getprompt(self, fd): timeout = 0 bytes = 0 +buffer = "" while timeout < 180: # eat anything while total bytes less than limit else raise RUNAWAY while (not self.limit) or (bytes < self.limit): @@ -130,6 +132,7 @@ class XmConsole: if self.debugMe: sys.stdout.write(foo) bytes += 1 +buffer += foo except Exception, exn: raise ConsoleError(str(exn)) else: @@ -137,6 +140,8 @@ class XmConsole: else: raise ConsoleError("Console run-away (exceeded %i bytes)" % self.limit, RUNAWAY) +# Check to see if the buffer contains anything interetsing +arch.checkBuffer(buffer) # press enter os.write(self.consoleFd, "\n") # look for prompt diff -r 21738b37ac32 tools/xm-test/lib/XmTestLib/arch.py --- a/tools/xm-test/lib/XmTestLib/arch.py Wed Oct 04 14:54:10 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/arch.py Thu Oct 05 13:15:49 2006 +1000 @@ -25,6 +25,8 @@ import config import config import commands +from Test import * + BLOCK_ROOT_DEV = "hda" # This isn't truly platform related but it makes the code tidier @@ -38,6 +40,9 @@ def getRdPath(): return rdpath # Begin: Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors +def ia_checkBuffer(buffer): +return + def ia_minSafeMem(): return 32 @@ -81,6 +86,19 @@ ia_HVMDefaults = {"memory" : # End : Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors # Begin: PowerPC +def ppc_checkBuffer(buffer): +checks = [ +{"pattern" : re.compile("^\d+:mon>\s*$", re.MULTILINE), + "message" : "domain trapped into XMON"}, +] + +for i in range(0, len(checks)): +check=checks[i] +if check.get('pattern').search(buffer): + FAIL(check.get('message')) + +return + def ppc_minSafeMem(): return 64 @@ -116,6 +134,7 @@ if _arch == "x86" or _arch == "ia64": if _arch == "x86" or _arch == "ia64": minSafeMem = ia_minSafeMem getDefaultKernel = ia_getDefaultKernel +checkBuffer = ia_checkBuffer if config.ENABLE_HVM_SUPPORT: configDefaults = ia_HVMDefaults else: @@ -123,6 +142,7 @@ elif _arch == "powerpc": elif _arch == "powerpc": minSafeMem = ppc_minSafeMem getDefaultKernel = ppc_getDefaultKernel +checkBuffer = ppc_checkBuffer configDefaults = ppc_ParavirtDefaults else: raise ValueError, "Unknown architecture!" Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH] Builtin cmdline dependency rule
Rebuild cmdline.o when the user changes the CMDLINE=X argument passed to the make invocation. I couldn't find an example of another project that handles this case properly, so I came up with this. Signed-off-by: Amos Waterland <[EMAIL PROTECTED]> --- .hgignore |1 + xen/arch/powerpc/Makefile | 16 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff -r 1b759b2522cd .hgignore --- a/.hgignore Wed Oct 04 17:27:16 2006 -0500 +++ b/.hgignore Wed Oct 04 20:26:04 2006 -0400 @@ -207,6 +207,7 @@ ^xen/arch/powerpc/xen\.lds$ ^xen/arch/powerpc/.xen-syms$ ^xen/arch/powerpc/xen-syms.S$ +^xen/arch/powerpc/cmdline.dep$ ^unmodified_drivers/linux-2.6/\.tmp_versions ^unmodified_drivers/linux-2.6/.*\.cmd$ ^unmodified_drivers/linux-2.6/.*\.ko$ diff -r 1b759b2522cd xen/arch/powerpc/Makefile --- a/xen/arch/powerpc/Makefile Wed Oct 04 17:27:16 2006 -0500 +++ b/xen/arch/powerpc/Makefile Wed Oct 04 20:26:24 2006 -0400 @@ -80,6 +80,20 @@ ifneq ($(CMDLINE),) # The first token in the arguments will be silently dropped. FULL_CMDLINE := xen $(CMDLINE) endif + +ifeq ($(wildcard cmdline.dep),) +cmdline.dep: + echo $(FULL_CMDLINE) > cmdline.dep +else +ifneq ($(FULL_CMDLINE),$(shell cat cmdline.dep)) +cmdline.dep:: + echo $(FULL_CMDLINE) > cmdline.dep +else +cmdline.dep: +endif +endif + +cmdline.o: cmdline.dep cmdline.o: CFLAGS += -DCMDLINE="\"$(FULL_CMDLINE)\"" TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,0x40,-T,xen.lds @@ -122,4 +136,4 @@ dom0.bin: $(DOM0_IMAGE) clean:: $(MAKE) -f $(BASEDIR)/Rules.mk -C of_handler clean - rm -f firmware firmware_image.bin dom0.bin .xen-syms + rm -f firmware firmware_image.bin dom0.bin .xen-syms cmdline.dep ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] [PATCH] Rolled up bootargs simplification
On Mon, 2006-10-02 at 11:46 -0400, Amos Waterland wrote: > > This patch has been in use by an internal IBM project for some time. > It > enables two important things: allowing developers and cluster > administrators the option of overriding the bootargs supplied by > firmware, and the ability to take a single gold master xen binary and > customize its bootargs across a cluster with a simple and well-tested > post-processing tool. Thanks for your patience Amos; I believe the commits I just made should solve your problem. Basically removing the boot wrapper (and that's bugged me for a while for other reasons) allows us to collapse three command line buffers into one, and that makes me happy. :) bicl (http://www.cs.unm.edu/~k42/tools/bicl) acts directly on the command line that was built in at compile time. If that buffer is empty at runtime, firmware arguments will be used. Note that changing the CMDLINE at compile time does not properly replace the previous CMDLINE; you would have to make clean or remove xen/arch/powerpc/cmdline.o by hand. I'd happily accept a Makefile patch for that. -- Hollis Blanchard IBM Linux Technology Center ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [POWERPC][XEN] Hide builtin dom0 args from Xen.
# HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID 1b759b2522cdf09354dca6d8fde27cbd6b03bab9 # Parent 80274bed86ca1749fe29e22147cbc7c495222731 [POWERPC][XEN] Hide builtin dom0 args from Xen. Signed-off-by: Amos Waterland <[EMAIL PROTECTED]> Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- xen/arch/powerpc/boot_of.c |2 ++ 1 files changed, 2 insertions(+) diff -r 80274bed86ca -r 1b759b2522cd xen/arch/powerpc/boot_of.c --- a/xen/arch/powerpc/boot_of.cWed Oct 04 17:22:59 2006 -0500 +++ b/xen/arch/powerpc/boot_of.cWed Oct 04 17:27:16 2006 -0500 @@ -1022,6 +1022,8 @@ static void * __init boot_of_module(ulon mods[mod].mod_start, mods[mod].mod_end); p = strstr((char *)(ulong)mbi->cmdline, sepr); if (p != NULL) { +/* Xen proper should never know about the dom0 args. */ +*(char *)p = '\0'; p += sizeof (sepr) - 1; mods[mod].string = (u32)(ulong)p; of_printf("%s: dom0 mod string: %s\n", __func__, p); ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [POWERPC][XEN] Remove boot wrapper, and extensive Makefile simplifications.
# HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID 8550ae9d12626763357a52a1aa0f682a2a82b290 # Parent c3312bbd598a50b3c48955a8f4c9dba6330fc7d8 [POWERPC][XEN] Remove boot wrapper, and extensive Makefile simplifications. Instead of embedding the 64-bit Xen image inside a 32-bit "boot wrapper", we can just use objcopy. This combines boot32.S and start.S, and removes the boot/ subdirectory entirely. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- xen/arch/powerpc/boot/boot32.S | 75 - xen/arch/powerpc/boot/start.S | 51 --- .hgignore |2 - xen/arch/powerpc/Makefile | 42 -- xen/arch/powerpc/start.S | 62 + 5 files changed, 71 insertions(+), 161 deletions(-) diff -r c3312bbd598a -r 8550ae9d1262 .hgignore --- a/.hgignore Tue Oct 03 18:23:21 2006 -0500 +++ b/.hgignore Wed Oct 04 17:17:41 2006 -0500 @@ -203,7 +203,7 @@ ^xen/arch/powerpc/dom0\.bin$ ^xen/arch/powerpc/asm-offsets\.s$ ^xen/arch/powerpc/firmware$ -^xen/arch/powerpc/firmware_image$ +^xen/arch/powerpc/firmware_image.bin$ ^xen/arch/powerpc/xen\.lds$ ^xen/arch/powerpc/.xen-syms$ ^xen/arch/powerpc/xen-syms.S$ diff -r c3312bbd598a -r 8550ae9d1262 xen/arch/powerpc/Makefile --- a/xen/arch/powerpc/Makefile Tue Oct 03 18:23:21 2006 -0500 +++ b/xen/arch/powerpc/Makefile Wed Oct 04 17:17:41 2006 -0500 @@ -54,11 +54,6 @@ PPC_C_WARNINGS += -Wshadow PPC_C_WARNINGS += -Wshadow CFLAGS += $(PPC_C_WARNINGS) -LINK=0x40 -boot32_link_base = $(LINK) -xen_link_offset = 100 -xen_link_base= $(patsubst %000,%$(xen_link_offset),$(LINK)) - # # The following flags are fed to gcc in order to link several # objects into a single ELF segment and to not link in any additional @@ -69,16 +64,8 @@ firmware: of_handler/built_in.o $(TARGET firmware: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o $(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x0 $^ -o $@ -firmware_image: firmware +firmware_image.bin: firmware $(CROSS_COMPILE)objcopy --output-target=binary $< $@ - -firmware_image.o: firmware_image - $(CROSS_COMPILE)objcopy --input-target=binary \ - --output-target=elf64-powerpc \ - --binary-architecture=powerpc \ - --redefine-sym _binary_$<_start=$(@:%.o=%)_start \ - --redefine-sym _binary_$<_end=$(@:%.o=%)_end \ - --redefine-sym _binary_$<_size=$(@:%.o=%)_size $< $@ # # Hacks for included C files @@ -93,10 +80,7 @@ CMDLINE = "" CMDLINE = "" boot_of.o: CFLAGS += -DCMDLINE="\"$(IMAGENAME) $(CMDLINE)\"" -start.o: boot/start.S - $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@ - -TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,$(xen_link_base),-T,xen.lds +TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,0x40,-T,xen.lds TARGET_OPTS += start.o $(ALL_OBJS) .xen-syms: start.o $(ALL_OBJS) xen.lds @@ -118,22 +102,12 @@ xen-syms.o: xen-syms.S $(TARGET)-syms: start.o $(ALL_OBJS) xen-syms.o xen.lds $(CC) $(CFLAGS) $(TARGET_OPTS) xen-syms.o -o $@ -$(TARGET).bin: $(TARGET)-syms - $(CROSS_COMPILE)objcopy --output-target=binary $< $@ - -$(TARGET).bin.o: $(TARGET).bin - $(CROSS_COMPILE)objcopy --input-target=binary \ +# our firmware only loads 32-bit ELF files +$(TARGET): $(TARGET)-syms + $(CROSS_COMPILE)objcopy \ + --input-target=elf64-powerpc \ --output-target=elf32-powerpc \ - --binary-architecture=powerpc $< $@ - -boot32.o: boot/boot32.S - $(CC) -m32 -Wa,-a32,-mppc64bridge \ - -D__ASSEMBLY__ -D__BRIDGE64__ $(CFLAGS) -c $< -o $@ - -$(TARGET): boot32.o $(TARGET).bin.o - $(CC) -m32 -N -Wl,-melf32ppclinux -static -nostdlib \ - -Wl,-Ttext,$(boot32_link_base) -Wl,-Tdata,$(xen_link_base) \ - $(CFLAGS) $^ -o $@ + $^ $@ asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS) $(CC) $(CFLAGS) -S -o $@ $< @@ -146,4 +120,4 @@ dom0.bin: $(DOM0_IMAGE) clean:: $(MAKE) -f $(BASEDIR)/Rules.mk -C of_handler clean - rm -f firmware firmware_image dom0.bin .xen-syms + rm -f firmware firmware_image.bin dom0.bin .xen-syms diff -r c3312bbd598a -r 8550ae9d1262 xen/arch/powerpc/start.S --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/xen/arch/powerpc/start.S Wed Oct 04 17:17:41 2006 -0500 @@ -0,0 +1,62 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have re
[XenPPC] [xenppc-unstable] [POWERPC][XEN] Create a cmdline.c to hold builtin/post-installed parameters.
# HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID 80274bed86ca1749fe29e22147cbc7c495222731 # Parent 8550ae9d12626763357a52a1aa0f682a2a82b290 [POWERPC][XEN] Create a cmdline.c to hold builtin/post-installed parameters. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- xen/arch/powerpc/Makefile|8 +--- xen/arch/powerpc/boot_of.c | 23 +++ xen/arch/powerpc/cmdline.c | 24 xen/include/asm-powerpc/config.h |1 + 4 files changed, 41 insertions(+), 15 deletions(-) diff -r 8550ae9d1262 -r 80274bed86ca xen/arch/powerpc/Makefile --- a/xen/arch/powerpc/Makefile Wed Oct 04 17:17:41 2006 -0500 +++ b/xen/arch/powerpc/Makefile Wed Oct 04 17:22:59 2006 -0500 @@ -9,6 +9,7 @@ obj-y += backtrace.o obj-y += backtrace.o obj-y += bitops.o obj-y += boot_of.o +obj-y += cmdline.o obj-y += dart.o obj-y += dart_u3.o obj-y += dart_u4.o @@ -75,10 +76,11 @@ physdev.o: ../x86/physdev.c HDRS += $(wildcard *.h) +ifneq ($(CMDLINE),) # The first token in the arguments will be silently dropped. -IMAGENAME = xen -CMDLINE = "" -boot_of.o: CFLAGS += -DCMDLINE="\"$(IMAGENAME) $(CMDLINE)\"" +FULL_CMDLINE := xen $(CMDLINE) +endif +cmdline.o: CFLAGS += -DCMDLINE="\"$(FULL_CMDLINE)\"" TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,0x40,-T,xen.lds TARGET_OPTS += start.o $(ALL_OBJS) diff -r 8550ae9d1262 -r 80274bed86ca xen/arch/powerpc/boot_of.c --- a/xen/arch/powerpc/boot_of.cWed Oct 04 17:17:41 2006 -0500 +++ b/xen/arch/powerpc/boot_of.cWed Oct 04 17:22:59 2006 -0500 @@ -16,6 +16,7 @@ * Copyright (C) IBM Corp. 2005, 2006 * * Authors: Jimi Xenidis <[EMAIL PROTECTED]> + * Hollis Blanchard <[EMAIL PROTECTED]> */ #include @@ -40,12 +41,8 @@ static ulong of_vec; static ulong of_vec; static ulong of_msr; static int of_out; -static char bootargs[256]; - -#define COMMAND_LINE_SIZE 512 -static char builtin_cmdline[COMMAND_LINE_SIZE] -__attribute__((section("__builtin_cmdline"))) = CMDLINE; - + +extern char builtin_cmdline[]; extern struct ns16550_defaults ns16550; #undef OF_DEBUG @@ -464,15 +461,17 @@ static void boot_of_bootargs(multiboot_i { int rc; -rc = of_getprop(bof_chosen, "bootargs", &bootargs, sizeof (bootargs)); -if (rc == OF_FAILURE || bootargs[0] == '\0') { -strlcpy(bootargs, builtin_cmdline, sizeof(bootargs)); +if (builtin_cmdline[0] == '\0') { +rc = of_getprop(bof_chosen, "bootargs", builtin_cmdline, +CONFIG_CMDLINE_SIZE); +if (rc > CONFIG_CMDLINE_SIZE) +of_panic("bootargs[] not big enough for /chosen/bootargs\n"); } mbi->flags |= MBI_CMDLINE; -mbi->cmdline = (u32)bootargs; - -of_printf("bootargs = %s\n", bootargs); +mbi->cmdline = (ulong)builtin_cmdline; + +of_printf("bootargs = %s\n", builtin_cmdline); } static int save_props(void *m, ofdn_t n, int pkg) diff -r 8550ae9d1262 -r 80274bed86ca xen/include/asm-powerpc/config.h --- a/xen/include/asm-powerpc/config.h Wed Oct 04 17:17:41 2006 -0500 +++ b/xen/include/asm-powerpc/config.h Wed Oct 04 17:22:59 2006 -0500 @@ -50,6 +50,7 @@ extern char __bss_start[]; #define CONFIG_GDB 1 #define CONFIG_SMP 1 #define CONFIG_PCI 1 +#define CONFIG_CMDLINE_SIZE 512 #define NR_CPUS 16 #ifndef ELFSIZE diff -r 8550ae9d1262 -r 80274bed86ca xen/arch/powerpc/cmdline.c --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/xen/arch/powerpc/cmdline.cWed Oct 04 17:22:59 2006 -0500 @@ -0,0 +1,24 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) IBM Corp. 2006 + * + * Authors: Hollis Blanchard <[EMAIL PROTECTED]> + */ + +#include + +char builtin_cmdline[CONFIG_CMDLINE_SIZE] +__attribute__((section("__builtin_cmdline"))) = CMDLINE; ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH] fixes makefile clean logic
summary: fixes makefile clean logic details: The three files xen-syms.S xen-lds and asm-offsets.s, all in the xen/arch/powerpc subdirectory, are created by make. Thus they should be removed by make clean. Signed-of-by: Maria Butrico <[EMAIL PROTECTED]> diff -r ea14174c392b xen/arch/powerpc/Makefile --- a/xen/arch/powerpc/Makefile Tue Oct 03 10:02:19 2006 -0400 +++ b/xen/arch/powerpc/Makefile Wed Oct 04 16:31:15 2006 -0400 @@ -149,4 +149,5 @@ dom0.bin: $(DOM0_IMAGE) clean:: $(MAKE) -f $(BASEDIR)/Rules.mk -C of_handler clean - rm -f firmware firmware_image dom0.bin .xen-syms + rm -f firmware firmware_image dom0.bin .xen-syms xen-syms.S \ + xen.lds asm-offsets.s ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [linux-ppc-2.6] [LINUX][POWERPC] oops on making the short pointer
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 933613959bf6a8e48a43e1cd93d4afae4a660ec8 # Parent c52ba3176a285683f00beaa2e82d2ed39bcedae8 [LINUX][POWERPC] oops on making the short pointer Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- include/asm-powerpc/xen/asm/synch_bitops.h |4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -r c52ba3176a28 -r 933613959bf6 include/asm-powerpc/xen/asm/synch_bitops.h --- a/include/asm-powerpc/xen/asm/synch_bitops.hThu Sep 28 12:26:59 2006 -0400 +++ b/include/asm-powerpc/xen/asm/synch_bitops.hWed Oct 04 11:20:16 2006 -0400 @@ -20,7 +20,7 @@ __synch_cmpxchg_u16(volatile unsigned sh __synch_cmpxchg_u16(volatile unsigned short *p, unsigned long old, unsigned long new) { int idx; - volatile unsigned int *xp = (unsigned int *)((ulong)p & 0x3); + volatile unsigned int *xp = (unsigned int *)((ulong)p & ~(0x3UL)); union { unsigned int word; struct { @@ -71,6 +71,8 @@ __synch_cmpxchg(volatile void *ptr, unsi (unsigned long)_n_, sizeof(*(ptr))); \ }) +#define synch_cmpxchg_subword(ptr,o,n) __synch_cmpxchg_u16((ptr), (o), (n)) + #else #error "this only works for CONFIG_SMP" #endif ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [PATCH] Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG
I think hollis nailed correctly, does it work for everyone? # HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID c3312bbd598a50b3c48955a8f4c9dba6330fc7d8 # Parent d1f6d0f820d890ac6075f47ad1ba6e38012167b4 [POWERPC][XEN] Move gmfn_to_mfn() from page.h to mm.h to avoid recursive header dependencies. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> -JX On Oct 4, 2006, at 12:50 AM, Tony Breeds wrote: On Tue, Oct 03, 2006 at 02:56:14PM -0400, Amos Waterland wrote: I'm not positive of this, but I'm pretty sure that this is caused by improper dependency checking. I suspect that you changed from debug=n to debug=y and got this. I'd suggest doing a `make clean' and trying again without your patch. I came accross the same probelm with a clean build. The patch below fixes it for me. Reorder includes to help the complier and avoid redundat definition of __trap_to_gdb. Signed-off-by: Tony Breeds <[EMAIL PROTECTED]> --- xen/arch/powerpc/gdbstub.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- diff -r d1374d869111 xen/arch/powerpc/gdbstub.c --- a/xen/arch/powerpc/gdbstub.cWed Oct 04 13:44:07 2006 +1000 +++ b/xen/arch/powerpc/gdbstub.cWed Oct 04 14:46:07 2006 +1000 @@ -20,12 +20,12 @@ #include #include -#include #include #include #include #include #include +#include #include asm(".globl trap_instruction\n" Yours Tony linux.conf.au http://linux.conf.au/ || http:// lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [POWERPC][XEN] Move gmfn_to_mfn() from page.h to mm.h to avoid recursive header dependencies.
# HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID c3312bbd598a50b3c48955a8f4c9dba6330fc7d8 # Parent d1f6d0f820d890ac6075f47ad1ba6e38012167b4 [POWERPC][XEN] Move gmfn_to_mfn() from page.h to mm.h to avoid recursive header dependencies. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- xen/include/asm-powerpc/mm.h | 23 +++ xen/include/asm-powerpc/page.h | 23 --- 2 files changed, 23 insertions(+), 23 deletions(-) diff -r d1f6d0f820d8 -r c3312bbd598a xen/include/asm-powerpc/mm.h --- a/xen/include/asm-powerpc/mm.h Mon Oct 02 21:43:09 2006 -0400 +++ b/xen/include/asm-powerpc/mm.h Tue Oct 03 18:23:21 2006 -0500 @@ -28,6 +28,7 @@ #include #include #include +#include #define memguard_guard_range(_p,_l)((void)0) #define memguard_unguard_range(_p,_l)((void)0) @@ -244,4 +245,26 @@ extern int steal_page(struct domain *d, #define access_ok(addr,size) 1 #define array_access_ok(addr,count,size) 1 +static inline unsigned long gmfn_to_mfn(struct domain *d, unsigned long gmfn) +{ +int mtype; +ulong mfn; + +mfn = pfn2mfn(d, gmfn, &mtype); +if (mfn != INVALID_MFN) { +switch (mtype) { +case PFN_TYPE_RMA: +case PFN_TYPE_LOGICAL: +break; +default: +WARN(); +mfn = INVALID_MFN; +break; +} +} +return mfn; +} + +#define mfn_to_gmfn(_d, mfn) (mfn) + #endif diff -r d1f6d0f820d8 -r c3312bbd598a xen/include/asm-powerpc/page.h --- a/xen/include/asm-powerpc/page.hMon Oct 02 21:43:09 2006 -0400 +++ b/xen/include/asm-powerpc/page.hTue Oct 03 18:23:21 2006 -0500 @@ -30,7 +30,6 @@ #include #include -#include #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) @@ -146,27 +145,5 @@ extern unsigned long paddr_to_maddr(unsi /* XXX only used for debug print right now... */ #define get_gpfn_from_mfn(mfn) (mfn) -static inline unsigned long gmfn_to_mfn(struct domain *d, unsigned long gmfn) -{ -int mtype; -ulong mfn; - -mfn = pfn2mfn(d, gmfn, &mtype); -if (mfn != INVALID_MFN) { -switch (mtype) { -case PFN_TYPE_RMA: -case PFN_TYPE_LOGICAL: -break; -default: -WARN(); -mfn = INVALID_MFN; -break; -} -} -return mfn; -} - -#define mfn_to_gmfn(_d, mfn) (mfn) - #endif /* ! __ASSEMBLY__ */ #endif ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel