From: Rob L. <ro...@la...> - 2007-10-11 21:55:17
Attachments:
.config
|
[Second try, without clicking "compress" on the file attachment because then sourceforge's spam filter bounces it.] --- The User Mode Linux build still breaks for me: > In file included from include/asm/arch/tlb.h:18, > from include/asm/tlb.h:4, > from arch/um/kernel/smp.c:8: > include/asm-generic/tlb.h: In function ‘tlb_flush_mmu’: > include/asm-generic/tlb.h:76: error: implicit declaration of function > ‘release_pages’ include/asm-generic/tlb.h: In function ‘tlb_remove_page’: > include/asm-generic/tlb.h:105: error: implicit declaration of function > ‘page_cache_release’ make[1]: *** [arch/um/kernel/smp.o] Error 1 > make: *** [arch/um/kernel] Error 2 I submitted the following patch to fix it to the UML list after 2.6.23-rc3: http://sourceforge.net/mailarchive/forum.php?thread_name=200708212148.05392.rob%40landley.net&forum_name=user-mode-linux-devel On september 4, I confirmed that I still needed it to build -rc5: http://sourceforge.net/mailarchive/message.php?msg_name=200709040737.54516.rob%40landley.net Guess what? I still need this patch to build the final 2.6.23, months later. I know it may not be the right fix, but the build breaks for me without this patch. The .config that breaks is attached. ARCH=um. ---------- Forwarded Message ---------- Subject: [uml-devel] UML doesn't build in 2.6.23-rc3. Date: Tuesday 21 August 2007 From: Rob Landley <ro...@la...> To: uml-devel <use...@li...> I fixed it for me with the following patch, just in case anybody else had this problem: --- linux-2.6.23-rc3/arch/um/kernel/smp.c 2007-08-12 23:25:24.000000000 -0500 +++ linux-2.6.23-new/arch/um/kernel/smp.c 2007-08-21 21:39:00.000000000 -0500 @@ -5,6 +5,7 @@ #include "linux/percpu.h" #include "asm/pgalloc.h" +#include "linux/pagemap.h" #include "asm/tlb.h" /* For some reason, mmu_gathers are referenced when CONFIG_SMP is off. */ -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson. |
From: Paolo G. <p.g...@gm...> - 2007-10-20 01:21:17
|
On venerd=C3=AC 12 ottobre 2007, Rob Landley wrote: > [Second try, without clicking "compress" on the file attachment because > then sourceforge's spam filter bounces it.] > > --- > > The User Mode Linux build still breaks for me: > > In file included from include/asm/arch/tlb.h:18, > > from include/asm/tlb.h:4, > > from arch/um/kernel/smp.c:8: > > include/asm-generic/tlb.h: In function =E2=80=98tlb_flush_mmu=E2=80=99: > > include/asm-generic/tlb.h:76: error: implicit declaration of function > > =E2=80=98release_pages=E2=80=99 include/asm-generic/tlb.h: In function = =E2=80=98tlb_remove_page=E2=80=99: > > include/asm-generic/tlb.h:105: error: implicit declaration of function > > =E2=80=98page_cache_release=E2=80=99 make[1]: *** [arch/um/kernel/smp.o= ] Error 1 > > make: *** [arch/um/kernel] Error 2 > > I submitted the following patch to fix it to the UML list after 2.6.23-rc= 3: > http://sourceforge.net/mailarchive/forum.php?thread_name=3D200708212148.0= 5392 >.rob%40landley.net&forum_name=3Duser-mode-linux-devel > > On september 4, I confirmed that I still needed it to build -rc5: > http://sourceforge.net/mailarchive/message.php?msg_name=3D200709040737.54= 516. >rob%40landley.net > > Guess what? I still need this patch to build the final 2.6.23, months > later. > > I know it may not be the right fix, but the build breaks for me without > this patch. The .config that breaks is attached. ARCH=3Dum. Guess most people are not using SMP right now, and that the error disappear= s=20 without that setting - I'm being away for a long while, has SKAS+SMP suppor= t=20 been merged? However, a quick look at my sources tells otherwise, and git-describe says= =20 that's a v2.6.23-rc6-239-gc2f8289 tree. So I've no idea... > ---------- Forwarded Message ---------- > > Subject: [uml-devel] UML doesn't build in 2.6.23-rc3. > Date: Tuesday 21 August 2007 > From: Rob Landley <ro...@la...> > To: uml-devel <use...@li...> > > I fixed it for me with the following patch, just in case anybody else had > this problem: > > --- linux-2.6.23-rc3/arch/um/kernel/smp.c 2007-08-12 23:25:24.000000000 > -0500 +++ linux-2.6.23-new/arch/um/kernel/smp.c 2007-08-21 > 21:39:00.000000000 -0500 @@ -5,6 +5,7 @@ > > #include "linux/percpu.h" > #include "asm/pgalloc.h" > +#include "linux/pagemap.h" > #include "asm/tlb.h" > > /* For some reason, mmu_gathers are referenced when CONFIG_SMP is off. */ =2D-=20 "Doh!" (cit.), I've made another mistake! Paolo Giarrusso, aka Blaisorblade |
From: WANG C. <xiy...@gm...> - 2007-10-22 06:55:59
|
On Mon, Oct 22, 2007 at 07:42:33AM +0100, Nix wrote: >On 22 Oct 2007, WANG Cong uttered the following: >> I build UML for non-SMP x86. But I don't know about UML_NET_VDE. ;( >> >> Errors threw out by gcc (too many) are put here: >> http://wangcong.org/down/errors.txt > >It's hard to tell without LOCALE=C, but those are the sorts of results >I'd expect if you had run make {old,menu,x}config without specifying >ARCH=um, so you've configured for one architecture and are now trying >to build another. > >Where is the include/asm symlink pointing to in your build tree? $ ls -l include/asm lrwxrwxrwx 1 wangcong wangcong 6 2007-10-22 12:34 include/asm -> asm-um OK. Let me do the following: $ make mrproper ... $ make defconfig ARCH=um ... # # configuration written to .config # $ make ARCH=um (Still tons of errors here...) Am I wrong or I missed something? Regards. -- May the Source Be With You. |
From: Robert P. J. D. <rp...@cr...> - 2007-10-22 07:03:44
|
On Mon, 22 Oct 2007, WANG Cong wrote: > On Mon, Oct 22, 2007 at 07:42:33AM +0100, Nix wrote: > >On 22 Oct 2007, WANG Cong uttered the following: > >> I build UML for non-SMP x86. But I don't know about UML_NET_VDE. ;( > >> > >> Errors threw out by gcc (too many) are put here: > >> http://wangcong.org/down/errors.txt > > > >It's hard to tell without LOCALE=C, but those are the sorts of results > >I'd expect if you had run make {old,menu,x}config without specifying > >ARCH=um, so you've configured for one architecture and are now trying > >to build another. > > > >Where is the include/asm symlink pointing to in your build tree? > > $ ls -l include/asm > lrwxrwxrwx 1 wangcong wangcong 6 2007-10-22 12:34 include/asm -> asm-um > > OK. Let me do the following: > > $ make mrproper ... if you wanted to be *really* anal retentive, you might want to run "make distclean" instead but, from what i've seen so far, i don't think that would change what you're seeing. rday -- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://crashcourse.ca ======================================================================== |
From: Ingo M. <mi...@el...> - 2007-10-23 08:46:26
|
* Jeremy Fitzhardinge <je...@go...> wrote: > >> Should we re-add them for the function pointers in > >> asm-x86/paravirt.h? > > > > yes, yes, yes. :-) It was a nightmare to sort it out in -rt (and > > still is). > > Do you have a patch to do this already? yes, attached. Ack? Ingo ----------------------------> Subject: [patch] paravirt: mark assembly dependencies as fastcall From: Ingo Molnar <mi...@el...> the 'fastcall removal' changes to paravirt.c were over-eager: they removed fastcall annotations from functions that are (or might be) implemented in assembly. So if someone changes the compiler model, such as -pg which disables regparm, the kernel breaks in nasty ways. so this patch adds back fastcall annotations. This serves as documentation for assembly calling-convention dependencies as well. Signed-off-by: Ingo Molnar <mi...@el...> --- arch/i386/kernel/paravirt.c | 6 - arch/i386/kernel/smp.c | 7 + include/asm-i386/desc.h | 18 ++-- include/asm-i386/io.h | 2 include/asm-i386/irqflags.h | 12 +- include/asm-i386/msr.h | 13 +-- include/asm-i386/page.h | 21 ++--- include/asm-i386/paravirt.h | 156 +++++++++++++++++++------------------- include/asm-i386/pgtable-2level.h | 10 +- include/asm-i386/pgtable-3level.h | 18 ++-- include/asm-i386/pgtable.h | 2 include/asm-i386/processor.h | 8 - include/asm-i386/system.h | 22 ++--- include/asm-i386/time.h | 4 include/asm-i386/tlbflush.h | 4 15 files changed, 154 insertions(+), 149 deletions(-) Index: linux-2.6.23-rt1/arch/i386/kernel/paravirt.c =================================================================== --- linux-2.6.23-rt1.orig/arch/i386/kernel/paravirt.c 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/arch/i386/kernel/paravirt.c 2007-10-11 16:00:03.000000000 -0400 @@ -208,7 +208,7 @@ void init_IRQ(void) paravirt_ops.init_IRQ(); } -static void native_flush_tlb(void) +static fastcall void native_flush_tlb(void) { __native_flush_tlb(); } @@ -217,12 +217,12 @@ static void native_flush_tlb(void) * Global pages have to be flushed a bit differently. Not a real * performance problem because this does not happen often. */ -static void native_flush_tlb_global(void) +static fastcall void native_flush_tlb_global(void) { __native_flush_tlb_global(); } -static void native_flush_tlb_single(unsigned long addr) +static fastcall void native_flush_tlb_single(unsigned long addr) { __native_flush_tlb_single(addr); } Index: linux-2.6.23-rt1/arch/i386/kernel/smp.c =================================================================== --- linux-2.6.23-rt1.orig/arch/i386/kernel/smp.c 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/arch/i386/kernel/smp.c 2007-10-11 16:00:03.000000000 -0400 @@ -344,8 +344,9 @@ out: put_cpu_no_resched(); } -void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, - unsigned long va) +void fastcall +native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, + unsigned long va) { cpumask_t cpumask = *cpumaskp; @@ -470,6 +471,7 @@ void flush_tlb_all(void) */ static void native_smp_send_reschedule(int cpu) { + trace_special(cpu, 0, 0); WARN_ON(cpu_is_offline(cpu)); send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR); } @@ -639,6 +641,7 @@ static void native_smp_send_stop(void) */ fastcall void smp_reschedule_interrupt(struct pt_regs *regs) { + trace_special(regs->eip, 0, 0); ack_APIC_irq(); } Index: linux-2.6.23-rt1/include/asm-i386/desc.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/desc.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/desc.h 2007-10-11 16:00:03.000000000 -0400 @@ -78,14 +78,14 @@ static inline void pack_gate(__u32 *a, _ #define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) #endif -static inline void write_dt_entry(struct desc_struct *dt, +static inline fastcall void write_dt_entry(struct desc_struct *dt, int entry, u32 entry_low, u32 entry_high) { dt[entry].a = entry_low; dt[entry].b = entry_high; } -static inline void native_set_ldt(const void *addr, unsigned int entries) +static fastcall inline void native_set_ldt(const void *addr, unsigned int entries) { if (likely(entries == 0)) __asm__ __volatile__("lldt %w0"::"q" (0)); @@ -102,39 +102,39 @@ static inline void native_set_ldt(const } -static inline void native_load_tr_desc(void) +static fastcall inline void native_load_tr_desc(void) { asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)); } -static inline void native_load_gdt(const struct Xgt_desc_struct *dtr) +static fastcall inline void native_load_gdt(const struct Xgt_desc_struct *dtr) { asm volatile("lgdt %0"::"m" (*dtr)); } -static inline void native_load_idt(const struct Xgt_desc_struct *dtr) +static fastcall inline void native_load_idt(const struct Xgt_desc_struct *dtr) { asm volatile("lidt %0"::"m" (*dtr)); } -static inline void native_store_gdt(struct Xgt_desc_struct *dtr) +static fastcall inline void native_store_gdt(struct Xgt_desc_struct *dtr) { asm ("sgdt %0":"=m" (*dtr)); } -static inline void native_store_idt(struct Xgt_desc_struct *dtr) +static fastcall inline void native_store_idt(struct Xgt_desc_struct *dtr) { asm ("sidt %0":"=m" (*dtr)); } -static inline unsigned long native_store_tr(void) +static fastcall inline unsigned long native_store_tr(void) { unsigned long tr; asm ("str %0":"=r" (tr)); return tr; } -static inline void native_load_tls(struct thread_struct *t, unsigned int cpu) +static fastcall inline void native_load_tls(struct thread_struct *t, unsigned int cpu) { unsigned int i; struct desc_struct *gdt = get_cpu_gdt_table(cpu); Index: linux-2.6.23-rt1/include/asm-i386/io.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/io.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/io.h 2007-10-11 16:00:03.000000000 -0400 @@ -254,7 +254,7 @@ static inline void flush_write_buffers(v #endif /* __KERNEL__ */ -static inline void native_io_delay(void) +static fastcall inline void native_io_delay(void) { asm volatile("outb %%al,$0x80" : : : "memory"); } Index: linux-2.6.23-rt1/include/asm-i386/irqflags.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/irqflags.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/irqflags.h 2007-10-11 16:00:03.000000000 -0400 @@ -12,36 +12,36 @@ #include <asm/processor-flags.h> #ifndef __ASSEMBLY__ -static inline unsigned long native_save_fl(void) +static fastcall inline unsigned long native_save_fl(void) { unsigned long f; asm volatile("pushfl ; popl %0":"=g" (f): /* no input */); return f; } -static inline void native_restore_fl(unsigned long f) +static fastcall inline void native_restore_fl(unsigned long f) { asm volatile("pushl %0 ; popfl": /* no output */ :"g" (f) :"memory", "cc"); } -static inline void native_irq_disable(void) +static fastcall inline void native_irq_disable(void) { asm volatile("cli": : :"memory"); } -static inline void native_irq_enable(void) +static fastcall inline void native_irq_enable(void) { asm volatile("sti": : :"memory"); } -static inline void native_safe_halt(void) +static fastcall inline void native_safe_halt(void) { asm volatile("sti; hlt": : :"memory"); } -static inline void native_halt(void) +static fastcall inline void native_halt(void) { asm volatile("hlt": : :"memory"); } Index: linux-2.6.23-rt1/include/asm-i386/msr.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/msr.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/msr.h 2007-10-11 16:00:03.000000000 -0400 @@ -1,6 +1,7 @@ #ifndef __ASM_MSR_H #define __ASM_MSR_H +#include <linux/compiler.h> #include <asm/msr-index.h> #ifdef __KERNEL__ @@ -8,7 +9,7 @@ #include <asm/errno.h> -static inline unsigned long long native_read_msr(unsigned int msr) +static fastcall inline unsigned long long native_read_msr(unsigned int msr) { unsigned long long val; @@ -16,7 +17,7 @@ static inline unsigned long long native_ return val; } -static inline unsigned long long native_read_msr_safe(unsigned int msr, +static fastcall inline unsigned long long native_read_msr_safe(unsigned int msr, int *err) { unsigned long long val; @@ -36,12 +37,12 @@ static inline unsigned long long native_ return val; } -static inline void native_write_msr(unsigned int msr, unsigned long long val) +static fastcall inline void native_write_msr(unsigned int msr, unsigned long long val) { asm volatile("wrmsr" : : "c" (msr), "A"(val)); } -static inline int native_write_msr_safe(unsigned int msr, +static fastcall inline int native_write_msr_safe(unsigned int msr, unsigned long long val) { int err; @@ -60,14 +61,14 @@ static inline int native_write_msr_safe( return err; } -static inline unsigned long long native_read_tsc(void) +static fastcall inline unsigned long long native_read_tsc(void) { unsigned long long val; asm volatile("rdtsc" : "=A" (val)); return val; } -static inline unsigned long long native_read_pmc(void) +static fastcall inline unsigned long long native_read_pmc(void) { unsigned long long val; asm volatile("rdpmc" : "=A" (val)); Index: linux-2.6.23-rt1/include/asm-i386/page.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/page.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/page.h 2007-10-11 16:00:03.000000000 -0400 @@ -11,6 +11,7 @@ #ifdef __KERNEL__ #ifndef __ASSEMBLY__ +#include <linux/linkage.h> #ifdef CONFIG_X86_USE_3DNOW @@ -49,32 +50,32 @@ typedef struct { unsigned long long pmd; typedef struct { unsigned long long pgd; } pgd_t; typedef struct { unsigned long long pgprot; } pgprot_t; -static inline unsigned long long native_pgd_val(pgd_t pgd) +static fastcall inline unsigned long long native_pgd_val(pgd_t pgd) { return pgd.pgd; } -static inline unsigned long long native_pmd_val(pmd_t pmd) +static fastcall inline unsigned long long native_pmd_val(pmd_t pmd) { return pmd.pmd; } -static inline unsigned long long native_pte_val(pte_t pte) +static fastcall inline unsigned long long native_pte_val(pte_t pte) { return pte.pte_low | ((unsigned long long)pte.pte_high << 32); } -static inline pgd_t native_make_pgd(unsigned long long val) +static fastcall inline pgd_t native_make_pgd(unsigned long long val) { return (pgd_t) { val }; } -static inline pmd_t native_make_pmd(unsigned long long val) +static fastcall inline pmd_t native_make_pmd(unsigned long long val) { return (pmd_t) { val }; } -static inline pte_t native_make_pte(unsigned long long val) +static fastcall inline pte_t native_make_pte(unsigned long long val) { return (pte_t) { .pte_low = val, .pte_high = (val >> 32) } ; } @@ -92,22 +93,22 @@ typedef struct { unsigned long pgd; } pg typedef struct { unsigned long pgprot; } pgprot_t; #define boot_pte_t pte_t /* or would you rather have a typedef */ -static inline unsigned long native_pgd_val(pgd_t pgd) +static fastcall inline unsigned long native_pgd_val(pgd_t pgd) { return pgd.pgd; } -static inline unsigned long native_pte_val(pte_t pte) +static fastcall inline unsigned long native_pte_val(pte_t pte) { return pte.pte_low; } -static inline pgd_t native_make_pgd(unsigned long val) +static fastcall inline pgd_t native_make_pgd(unsigned long val) { return (pgd_t) { val }; } -static inline pte_t native_make_pte(unsigned long val) +static fastcall inline pte_t native_make_pte(unsigned long val) { return (pte_t) { .pte_low = val }; } Index: linux-2.6.23-rt1/include/asm-i386/paravirt.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/paravirt.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/paravirt.h 2007-10-11 16:00:03.000000000 -0400 @@ -71,31 +71,31 @@ struct paravirt_ops void (*banner)(void); /* Set and set time of day */ - unsigned long (*get_wallclock)(void); - int (*set_wallclock)(unsigned long); + unsigned long (fastcall *get_wallclock)(void); + int (fastcall *set_wallclock)(unsigned long); /* cpuid emulation, mostly so that caps bits can be disabled */ - void (*cpuid)(unsigned int *eax, unsigned int *ebx, + void (fastcall *cpuid)(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx); /* hooks for various privileged instructions */ - unsigned long (*get_debugreg)(int regno); - void (*set_debugreg)(int regno, unsigned long value); + unsigned long (fastcall *get_debugreg)(int regno); + void (fastcall *set_debugreg)(int regno, unsigned long value); - void (*clts)(void); + void (fastcall *clts)(void); - unsigned long (*read_cr0)(void); - void (*write_cr0)(unsigned long); + unsigned long (fastcall *read_cr0)(void); + void (fastcall *write_cr0)(unsigned long); - unsigned long (*read_cr2)(void); - void (*write_cr2)(unsigned long); + unsigned long (fastcall *read_cr2)(void); + void (fastcall *write_cr2)(unsigned long); - unsigned long (*read_cr3)(void); - void (*write_cr3)(unsigned long); + unsigned long (fastcall *read_cr3)(void); + void (fastcall *write_cr3)(unsigned long); - unsigned long (*read_cr4_safe)(void); - unsigned long (*read_cr4)(void); - void (*write_cr4)(unsigned long); + unsigned long (fastcall *read_cr4_safe)(void); + unsigned long (fastcall *read_cr4)(void); + void (fastcall *write_cr4)(unsigned long); /* * Get/set interrupt state. save_fl and restore_fl are only @@ -103,44 +103,44 @@ struct paravirt_ops * returned from save_fl are undefined, and may be ignored by * restore_fl. */ - unsigned long (*save_fl)(void); - void (*restore_fl)(unsigned long); - void (*irq_disable)(void); - void (*irq_enable)(void); - void (*safe_halt)(void); - void (*halt)(void); + unsigned long (fastcall *save_fl)(void); + void (fastcall *restore_fl)(unsigned long); + void (fastcall *irq_disable)(void); + void (fastcall *irq_enable)(void); + void (fastcall *safe_halt)(void); + void (fastcall *halt)(void); - void (*wbinvd)(void); + void (fastcall *wbinvd)(void); /* MSR, PMC and TSR operations. err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */ - u64 (*read_msr)(unsigned int msr, int *err); - int (*write_msr)(unsigned int msr, u64 val); + u64 (fastcall *read_msr)(unsigned int msr, int *err); + int (fastcall *write_msr)(unsigned int msr, u64 val); - u64 (*read_tsc)(void); - u64 (*read_pmc)(void); + u64 (fastcall *read_tsc)(void); + u64 (fastcall *read_pmc)(void); unsigned long long (*sched_clock)(void); unsigned long (*get_cpu_khz)(void); /* Segment descriptor handling */ - void (*load_tr_desc)(void); - void (*load_gdt)(const struct Xgt_desc_struct *); - void (*load_idt)(const struct Xgt_desc_struct *); - void (*store_gdt)(struct Xgt_desc_struct *); - void (*store_idt)(struct Xgt_desc_struct *); - void (*set_ldt)(const void *desc, unsigned entries); - unsigned long (*store_tr)(void); - void (*load_tls)(struct thread_struct *t, unsigned int cpu); - void (*write_ldt_entry)(struct desc_struct *, + void (fastcall *load_tr_desc)(void); + void (fastcall *load_gdt)(const struct Xgt_desc_struct *); + void (fastcall *load_idt)(const struct Xgt_desc_struct *); + void (fastcall *store_gdt)(struct Xgt_desc_struct *); + void (fastcall *store_idt)(struct Xgt_desc_struct *); + void (fastcall *set_ldt)(const void *desc, unsigned entries); + unsigned long (fastcall *store_tr)(void); + void (fastcall *load_tls)(struct thread_struct *t, unsigned int cpu); + void (fastcall *write_ldt_entry)(struct desc_struct *, int entrynum, u32 low, u32 high); - void (*write_gdt_entry)(struct desc_struct *, + void (fastcall *write_gdt_entry)(struct desc_struct *, int entrynum, u32 low, u32 high); - void (*write_idt_entry)(struct desc_struct *, + void (fastcall *write_idt_entry)(struct desc_struct *, int entrynum, u32 low, u32 high); - void (*load_esp0)(struct tss_struct *tss, struct thread_struct *t); + void (fastcall *load_esp0)(struct tss_struct *tss, struct thread_struct *t); - void (*set_iopl_mask)(unsigned mask); - void (*io_delay)(void); + void (fastcall *set_iopl_mask)(unsigned mask); + void (fastcall *io_delay)(void); /* * Hooks for intercepting the creation/use/destruction of an @@ -157,9 +157,9 @@ struct paravirt_ops * Direct APIC operations, principally for VMI. Ideally * these shouldn't be in this interface. */ - void (*apic_write)(unsigned long reg, unsigned long v); - void (*apic_write_atomic)(unsigned long reg, unsigned long v); - unsigned long (*apic_read)(unsigned long reg); + void (fastcall *apic_write)(unsigned long reg, unsigned long v); + void (fastcall *apic_write_atomic)(unsigned long reg, unsigned long v); + unsigned long (fastcall *apic_read)(unsigned long reg); void (*setup_boot_clock)(void); void (*setup_secondary_clock)(void); @@ -169,56 +169,56 @@ struct paravirt_ops #endif /* TLB operations */ - void (*flush_tlb_user)(void); - void (*flush_tlb_kernel)(void); - void (*flush_tlb_single)(unsigned long addr); - void (*flush_tlb_others)(const cpumask_t *cpus, struct mm_struct *mm, + void (fastcall *flush_tlb_user)(void); + void (fastcall *flush_tlb_kernel)(void); + void (fastcall *flush_tlb_single)(unsigned long addr); + void (fastcall *flush_tlb_others)(const cpumask_t *cpus, struct mm_struct *mm, unsigned long va); /* Hooks for allocating/releasing pagetable pages */ - void (*alloc_pt)(struct mm_struct *mm, u32 pfn); - void (*alloc_pd)(u32 pfn); - void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); - void (*release_pt)(u32 pfn); - void (*release_pd)(u32 pfn); + void (fastcall *alloc_pt)(struct mm_struct *mm, u32 pfn); + void (fastcall *alloc_pd)(u32 pfn); + void (fastcall *alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); + void (fastcall *release_pt)(u32 pfn); + void (fastcall *release_pd)(u32 pfn); /* Pagetable manipulation functions */ - void (*set_pte)(pte_t *ptep, pte_t pteval); - void (*set_pte_at)(struct mm_struct *mm, unsigned long addr, + void (fastcall *set_pte)(pte_t *ptep, pte_t pteval); + void (fastcall *set_pte_at)(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval); - void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); - void (*pte_update)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); - void (*pte_update_defer)(struct mm_struct *mm, + void (fastcall *set_pmd)(pmd_t *pmdp, pmd_t pmdval); + void (fastcall *pte_update)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); + void (fastcall *pte_update_defer)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); #ifdef CONFIG_HIGHPTE - void *(*kmap_atomic_pte)(struct page *page, enum km_type type); + void *(fastcall *kmap_atomic_pte)(struct page *page, enum km_type type); #endif #ifdef CONFIG_X86_PAE - void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); - void (*set_pte_present)(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte); - void (*set_pud)(pud_t *pudp, pud_t pudval); - void (*pte_clear)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); - void (*pmd_clear)(pmd_t *pmdp); - - unsigned long long (*pte_val)(pte_t); - unsigned long long (*pmd_val)(pmd_t); - unsigned long long (*pgd_val)(pgd_t); - - pte_t (*make_pte)(unsigned long long pte); - pmd_t (*make_pmd)(unsigned long long pmd); - pgd_t (*make_pgd)(unsigned long long pgd); + void (fastcall *set_pte_atomic)(pte_t *ptep, pte_t pteval); + void (fastcall *set_pte_present)(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte); + void (fastcall *set_pud)(pud_t *pudp, pud_t pudval); + void (fastcall *pte_clear)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); + void (fastcall *pmd_clear)(pmd_t *pmdp); + + unsigned long long (fastcall *pte_val)(pte_t); + unsigned long long (fastcall *pmd_val)(pmd_t); + unsigned long long (fastcall *pgd_val)(pgd_t); + + pte_t (fastcall *make_pte)(unsigned long long pte); + pmd_t (fastcall *make_pmd)(unsigned long long pmd); + pgd_t (fastcall *make_pgd)(unsigned long long pgd); #else - unsigned long (*pte_val)(pte_t); - unsigned long (*pgd_val)(pgd_t); + unsigned long (fastcall *pte_val)(pte_t); + unsigned long (fastcall *pgd_val)(pgd_t); - pte_t (*make_pte)(unsigned long pte); - pgd_t (*make_pgd)(unsigned long pgd); + pte_t (fastcall *make_pte)(unsigned long pte); + pgd_t (fastcall *make_pgd)(unsigned long pgd); #endif /* Set deferred update mode, used for batching operations. */ - void (*set_lazy_mode)(enum paravirt_lazy_mode mode); + void (fastcall *set_lazy_mode)(enum paravirt_lazy_mode mode); /* These two are jmp to, not actually called. */ void (*irq_enable_sysexit)(void); @@ -419,12 +419,12 @@ static inline void load_esp0(struct tss_ } #define ARCH_SETUP paravirt_ops.arch_setup(); -static inline unsigned long get_wallclock(void) +static fastcall inline unsigned long get_wallclock(void) { return PVOP_CALL0(unsigned long, get_wallclock); } -static inline int set_wallclock(unsigned long nowtime) +static fastcall inline int set_wallclock(unsigned long nowtime) { return PVOP_CALL1(int, set_wallclock, nowtime); } Index: linux-2.6.23-rt1/include/asm-i386/pgtable-2level.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/pgtable-2level.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/pgtable-2level.h 2007-10-11 16:00:03.000000000 -0400 @@ -11,16 +11,16 @@ * within a page table are directly modified. Thus, the following * hook is made available. */ -static inline void native_set_pte(pte_t *ptep , pte_t pte) +static fastcall inline void native_set_pte(pte_t *ptep , pte_t pte) { *ptep = pte; } -static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, +static fastcall inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep , pte_t pte) { native_set_pte(ptep, pte); } -static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) +static fastcall inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) { *pmdp = pmd; } @@ -36,13 +36,13 @@ static inline void native_set_pmd(pmd_t #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) -static inline void native_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *xp) +static fastcall inline void native_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *xp) { *xp = __pte(0); } #ifdef CONFIG_SMP -static inline pte_t native_ptep_get_and_clear(pte_t *xp) +static fastcall inline pte_t native_ptep_get_and_clear(pte_t *xp) { return __pte(xchg(&xp->pte_low, 0)); } Index: linux-2.6.23-rt1/include/asm-i386/pgtable-3level.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/pgtable-3level.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/pgtable-3level.h 2007-10-11 16:00:03.000000000 -0400 @@ -33,13 +33,13 @@ static inline int pte_exec_kernel(pte_t * not possible, use pte_get_and_clear to obtain the old pte * value and then use set_pte to update it. -ben */ -static inline void native_set_pte(pte_t *ptep, pte_t pte) +static fastcall inline void native_set_pte(pte_t *ptep, pte_t pte) { ptep->pte_high = pte.pte_high; smp_wmb(); ptep->pte_low = pte.pte_low; } -static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, +static fastcall inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep , pte_t pte) { native_set_pte(ptep, pte); @@ -51,7 +51,7 @@ static inline void native_set_pte_at(str * we are justified in merely clearing the PTE present bit, followed * by a set. The ordering here is important. */ -static inline void native_set_pte_present(struct mm_struct *mm, unsigned long addr, +static fastcall inline void native_set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { ptep->pte_low = 0; @@ -61,15 +61,15 @@ static inline void native_set_pte_presen ptep->pte_low = pte.pte_low; } -static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) +static fastcall inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) { set_64bit((unsigned long long *)(ptep),native_pte_val(pte)); } -static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) +static fastcall inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) { set_64bit((unsigned long long *)(pmdp),native_pmd_val(pmd)); } -static inline void native_set_pud(pud_t *pudp, pud_t pud) +static fastcall inline void native_set_pud(pud_t *pudp, pud_t pud) { *pudp = pud; } @@ -79,14 +79,14 @@ static inline void native_set_pud(pud_t * entry, so clear the bottom half first and enforce ordering with a compiler * barrier. */ -static inline void native_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) +static fastcall inline void native_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { ptep->pte_low = 0; smp_wmb(); ptep->pte_high = 0; } -static inline void native_pmd_clear(pmd_t *pmd) +static fastcall inline void native_pmd_clear(pmd_t *pmd) { u32 *tmp = (u32 *)pmd; *tmp = 0; @@ -125,7 +125,7 @@ static inline void pud_clear (pud_t * pu pmd_index(address)) #ifdef CONFIG_SMP -static inline pte_t native_ptep_get_and_clear(pte_t *ptep) +static fastcall inline pte_t native_ptep_get_and_clear(pte_t *ptep) { pte_t res; Index: linux-2.6.23-rt1/include/asm-i386/pgtable.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/pgtable.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/pgtable.h 2007-10-11 16:00:03.000000000 -0400 @@ -261,7 +261,7 @@ static inline pte_t pte_mkhuge(pte_t pte #endif /* local pte updates need not use xchg for locking */ -static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) +static fastcall inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) { pte_t res = *ptep; Index: linux-2.6.23-rt1/include/asm-i386/processor.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/processor.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/processor.h 2007-10-11 16:00:03.000000000 -0400 @@ -492,7 +492,7 @@ static inline void rep_nop(void) #define cpu_relax() rep_nop() -static inline void native_load_esp0(struct tss_struct *tss, struct thread_struct *thread) +static inline void fastcall native_load_esp0(struct tss_struct *tss, struct thread_struct *thread) { tss->x86_tss.esp0 = thread->esp0; /* This can only happen when SEP is enabled, no need to test "SEP"arately */ @@ -503,7 +503,7 @@ static inline void native_load_esp0(stru } -static inline unsigned long native_get_debugreg(int regno) +static inline unsigned long fastcall native_get_debugreg(int regno) { unsigned long val = 0; /* Damn you, gcc! */ @@ -526,7 +526,7 @@ static inline unsigned long native_get_d return val; } -static inline void native_set_debugreg(int regno, unsigned long value) +static inline void fastcall native_set_debugreg(int regno, unsigned long value) { switch (regno) { case 0: @@ -555,7 +555,7 @@ static inline void native_set_debugreg(i /* * Set IOPL bits in EFLAGS from given mask */ -static inline void native_set_iopl_mask(unsigned mask) +static inline void fastcall native_set_iopl_mask(unsigned mask) { unsigned int reg; __asm__ __volatile__ ("pushfl;" Index: linux-2.6.23-rt1/include/asm-i386/system.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/system.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/system.h 2007-10-11 16:00:03.000000000 -0400 @@ -89,55 +89,55 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" asm volatile("mov %%" #seg ",%0":"=rm" (value)) -static inline void native_clts(void) +static fastcall inline void native_clts(void) { asm volatile ("clts"); } -static inline unsigned long native_read_cr0(void) +static fastcall inline unsigned long native_read_cr0(void) { unsigned long val; asm volatile("movl %%cr0,%0\n\t" :"=r" (val)); return val; } -static inline void native_write_cr0(unsigned long val) +static fastcall inline void native_write_cr0(unsigned long val) { asm volatile("movl %0,%%cr0": :"r" (val)); } -static inline unsigned long native_read_cr2(void) +static fastcall inline unsigned long native_read_cr2(void) { unsigned long val; asm volatile("movl %%cr2,%0\n\t" :"=r" (val)); return val; } -static inline void native_write_cr2(unsigned long val) +static fastcall inline void native_write_cr2(unsigned long val) { asm volatile("movl %0,%%cr2": :"r" (val)); } -static inline unsigned long native_read_cr3(void) +static fastcall inline unsigned long native_read_cr3(void) { unsigned long val; asm volatile("movl %%cr3,%0\n\t" :"=r" (val)); return val; } -static inline void native_write_cr3(unsigned long val) +static fastcall inline void native_write_cr3(unsigned long val) { asm volatile("movl %0,%%cr3": :"r" (val)); } -static inline unsigned long native_read_cr4(void) +static fastcall inline unsigned long native_read_cr4(void) { unsigned long val; asm volatile("movl %%cr4,%0\n\t" :"=r" (val)); return val; } -static inline unsigned long native_read_cr4_safe(void) +static fastcall inline unsigned long native_read_cr4_safe(void) { unsigned long val; /* This could fault if %cr4 does not exist */ @@ -150,12 +150,12 @@ static inline unsigned long native_read_ return val; } -static inline void native_write_cr4(unsigned long val) +static fastcall inline void native_write_cr4(unsigned long val) { asm volatile("movl %0,%%cr4": :"r" (val)); } -static inline void native_wbinvd(void) +static fastcall inline void native_wbinvd(void) { asm volatile("wbinvd": : :"memory"); } Index: linux-2.6.23-rt1/include/asm-i386/time.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/time.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/time.h 2007-10-11 16:00:03.000000000 -0400 @@ -4,7 +4,7 @@ #include <linux/efi.h> #include "mach_time.h" -static inline unsigned long native_get_wallclock(void) +static fastcall inline unsigned long native_get_wallclock(void) { unsigned long retval; @@ -16,7 +16,7 @@ static inline unsigned long native_get_w return retval; } -static inline int native_set_wallclock(unsigned long nowtime) +static fastcall inline int native_set_wallclock(unsigned long nowtime) { int retval; Index: linux-2.6.23-rt1/include/asm-i386/tlbflush.h =================================================================== --- linux-2.6.23-rt1.orig/include/asm-i386/tlbflush.h 2007-10-11 15:58:08.000000000 -0400 +++ linux-2.6.23-rt1/include/asm-i386/tlbflush.h 2007-10-11 16:00:03.000000000 -0400 @@ -116,7 +116,7 @@ static inline void flush_tlb_range(struc __flush_tlb(); } -static inline void native_flush_tlb_others(const cpumask_t *cpumask, +static fastcall inline void native_flush_tlb_others(const cpumask_t *cpumask, struct mm_struct *mm, unsigned long va) { } @@ -140,7 +140,7 @@ static inline void flush_tlb_range(struc flush_tlb_mm(vma->vm_mm); } -void native_flush_tlb_others(const cpumask_t *cpumask, struct mm_struct *mm, +void fastcall native_flush_tlb_others(const cpumask_t *cpumask, struct mm_struct *mm, unsigned long va); #define TLBSTATE_OK 1 |
From: Adrian B. <bu...@st...> - 2007-10-23 13:25:28
|
On Tue, Oct 23, 2007 at 10:45:46AM +0200, Ingo Molnar wrote: > > * Jeremy Fitzhardinge <je...@go...> wrote: > > > >> Should we re-add them for the function pointers in > > >> asm-x86/paravirt.h? > > > > > > yes, yes, yes. :-) It was a nightmare to sort it out in -rt (and > > > still is). > > > > Do you have a patch to do this already? > > yes, attached. Ack? > > Ingo > > ----------------------------> > Subject: [patch] paravirt: mark assembly dependencies as fastcall > From: Ingo Molnar <mi...@el...> > > the 'fastcall removal' changes to paravirt.c were over-eager: they > removed fastcall annotations from functions that are (or might be) > implemented in assembly. So if someone changes the compiler model, > such as -pg which disables regparm, the kernel breaks in nasty ways. > > so this patch adds back fastcall annotations. This serves as > documentation for assembly calling-convention dependencies as > well. >... I see a point in annotating all C code called from assembler code with either fastcall or asmlinkage, but how will these annotations be maintained? Without anything giving at least a warning these annotations will simply bitrot. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed |
From: Jeremy F. <je...@go...> - 2007-10-23 14:20:52
|
Ingo Molnar wrote: > * Jeremy Fitzhardinge <je...@go...> wrote: > > >>>> Should we re-add them for the function pointers in >>>> asm-x86/paravirt.h? >>>> >>> yes, yes, yes. :-) It was a nightmare to sort it out in -rt (and >>> still is). >>> >> Do you have a patch to do this already? >> > > yes, attached. Ack? > > Ingo > > ----------------------------> > Subject: [patch] paravirt: mark assembly dependencies as fastcall > From: Ingo Molnar <mi...@el...> > > the 'fastcall removal' changes to paravirt.c were over-eager: they > removed fastcall annotations from functions that are (or might be) > implemented in assembly. So if someone changes the compiler model, > such as -pg which disables regparm, the kernel breaks in nasty ways. > > so this patch adds back fastcall annotations. This serves as > documentation for assembly calling-convention dependencies as > well. > It would be really nice if we could get the compiler to warn about whether mismatches in fastcall use. Without at least a compiler warning about mismatches between the function pointer type in paravirt_ops and the actual function, it will almost certainly rot and fail if you actually need to depend on the annotations. What's the issue with regparm and -pg? > Signed-off-by: Ingo Molnar <mi...@el...> > --- > arch/i386/kernel/paravirt.c | 6 - > arch/i386/kernel/smp.c | 7 + > include/asm-i386/desc.h | 18 ++-- > include/asm-i386/io.h | 2 > include/asm-i386/irqflags.h | 12 +- > include/asm-i386/msr.h | 13 +-- > include/asm-i386/page.h | 21 ++--- > include/asm-i386/paravirt.h | 156 +++++++++++++++++++------------------- > include/asm-i386/pgtable-2level.h | 10 +- > include/asm-i386/pgtable-3level.h | 18 ++-- > include/asm-i386/pgtable.h | 2 > include/asm-i386/processor.h | 8 - > include/asm-i386/system.h | 22 ++--- > include/asm-i386/time.h | 4 > include/asm-i386/tlbflush.h | 4 > 15 files changed, 154 insertions(+), 149 deletions(-) > Hm, so it will still need a fair amount of work to update to the current kernel and add all the lguest/vmi/xen functions (and presumably the out of tree kvm stuff too). > Index: linux-2.6.23-rt1/arch/i386/kernel/paravirt.c > =================================================================== > --- linux-2.6.23-rt1.orig/arch/i386/kernel/paravirt.c 2007-10-11 15:58:08.000000000 -0400 > +++ linux-2.6.23-rt1/arch/i386/kernel/paravirt.c 2007-10-11 16:00:03.000000000 -0400 > @@ -208,7 +208,7 @@ void init_IRQ(void) > paravirt_ops.init_IRQ(); > } > > -static void native_flush_tlb(void) > +static fastcall void native_flush_tlb(void) > { > __native_flush_tlb(); > } > @@ -217,12 +217,12 @@ static void native_flush_tlb(void) > * Global pages have to be flushed a bit differently. Not a real > * performance problem because this does not happen often. > */ > -static void native_flush_tlb_global(void) > +static fastcall void native_flush_tlb_global(void) > { > __native_flush_tlb_global(); > } > > -static void native_flush_tlb_single(unsigned long addr) > +static fastcall void native_flush_tlb_single(unsigned long addr) > { > __native_flush_tlb_single(addr); > } > Index: linux-2.6.23-rt1/arch/i386/kernel/smp.c > =================================================================== > --- linux-2.6.23-rt1.orig/arch/i386/kernel/smp.c 2007-10-11 15:58:08.000000000 -0400 > +++ linux-2.6.23-rt1/arch/i386/kernel/smp.c 2007-10-11 16:00:03.000000000 -0400 > @@ -344,8 +344,9 @@ out: > put_cpu_no_resched(); > } > > -void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, > - unsigned long va) > +void fastcall > +native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, > + unsigned long va) > { > cpumask_t cpumask = *cpumaskp; > > @@ -470,6 +471,7 @@ void flush_tlb_all(void) > */ > static void native_smp_send_reschedule(int cpu) > { > + trace_special(cpu, 0, 0); > WARN_ON(cpu_is_offline(cpu)); > send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR); > } > @@ -639,6 +641,7 @@ static void native_smp_send_stop(void) > */ > fastcall void smp_reschedule_interrupt(struct pt_regs *regs) > { > + trace_special(regs->eip, 0, 0); > ack_APIC_irq(); > } > What's trace_special()? Has this escaped from another patch? J |
From: Nix <ni...@es...> - 2007-10-20 11:41:53
|
On 20 Oct 2007, Paolo Giarrusso told this: > Guess most people are not using SMP right now, and that the error disappears > without that setting It doesn't. It fails with non-SMP as well. Rob, your patch works for me. (Not that the reboot into 2.6.23.1 was problem-free: iproute2-071016 fails to understand the `police' action and also somehow fails to bring up networking well enough for me to locally NFS-mount my home directories, where 070710 had no trouble. More on that soon to the appropriate people as soon as I've diagnosed it...) |
From: WANG C. <xiy...@gm...> - 2007-10-21 11:52:59
|
On Sat, Oct 20, 2007 at 12:41:29PM +0100, Nix wrote: >On 20 Oct 2007, Paolo Giarrusso told this: >> Guess most people are not using SMP right now, and that the error disappears >> without that setting > >It doesn't. It fails with non-SMP as well. > UML still doesn't build on 2.6.23-git16. Gcc threw out many errors, I put them in the web: http://wangcong.org/down/errors.txt My .config is located at: http://wangcong.org/down/uml_config.bak Or I missed something? Regards. -- May the Source Be With You. |
From: Sam R. <sa...@ra...> - 2007-10-22 06:58:20
|
On Mon, Oct 22, 2007 at 02:52:02PM +0800, WANG Cong wrote: > On Mon, Oct 22, 2007 at 07:42:33AM +0100, Nix wrote: > >On 22 Oct 2007, WANG Cong uttered the following: > >> I build UML for non-SMP x86. But I don't know about UML_NET_VDE. ;( > >> > >> Errors threw out by gcc (too many) are put here: > >> http://wangcong.org/down/errors.txt > > > >It's hard to tell without LOCALE=C, but those are the sorts of results > >I'd expect if you had run make {old,menu,x}config without specifying > >ARCH=um, so you've configured for one architecture and are now trying > >to build another. > > > >Where is the include/asm symlink pointing to in your build tree? > > $ ls -l include/asm > lrwxrwxrwx 1 wangcong wangcong 6 2007-10-22 12:34 include/asm -> asm-um > > OK. Let me do the following: > > $ make mrproper Please try make ARCH=um mrproper this will clean up the additional uml symlinks. Sam |
From: WANG C. <xiy...@gm...> - 2007-10-22 07:52:37
|
On Mon, Oct 22, 2007 at 08:59:43AM +0200, Sam Ravnborg wrote: >On Mon, Oct 22, 2007 at 02:52:02PM +0800, WANG Cong wrote: >> On Mon, Oct 22, 2007 at 07:42:33AM +0100, Nix wrote: >> >On 22 Oct 2007, WANG Cong uttered the following: >> >> I build UML for non-SMP x86. But I don't know about UML_NET_VDE. ;( >> >> >> >> Errors threw out by gcc (too many) are put here: >> >> http://wangcong.org/down/errors.txt >> > >> >It's hard to tell without LOCALE=C, but those are the sorts of results >> >I'd expect if you had run make {old,menu,x}config without specifying >> >ARCH=um, so you've configured for one architecture and are now trying >> >to build another. >> > >> >Where is the include/asm symlink pointing to in your build tree? >> >> $ ls -l include/asm >> lrwxrwxrwx 1 wangcong wangcong 6 2007-10-22 12:34 include/asm -> asm-um >> >> OK. Let me do the following: >> >> $ make mrproper > >Please try >make ARCH=um mrproper > >this will clean up the additional uml symlinks. > Hi, Sam, Al and others. I just followed what Sam told me, errors are much fewer this time, but still exist. Error messages are: CC arch/um/kernel/syscall.o CC arch/um/kernel/sysrq.o arch/um/kernel/sysrq.c: In function ‘show_stack’: arch/um/kernel/sysrq.c:63: error: ‘UESP’ undeclared (first use in this function) arch/um/kernel/sysrq.c:63: error: (Each undeclared identifier is reported only once arch/um/kernel/sysrq.c:63: error: for each function it appears in.) make[1]: *** [arch/um/kernel/sysrq.o] Error 1 make: *** [arch/um/kernel] Error 2 Or I missed something again? And I use `make defconfig ARCH=um' to generate .config, my tree is 2.6.23-git16 (Al, is this OK?). Thanks. -- May the Source Be With You. |
From: Robert P. J. D. <rp...@cr...> - 2007-10-22 08:00:14
|
On Mon, 22 Oct 2007, WANG Cong wrote: > On Mon, Oct 22, 2007 at 08:59:43AM +0200, Sam Ravnborg wrote: > >On Mon, Oct 22, 2007 at 02:52:02PM +0800, WANG Cong wrote: > >> On Mon, Oct 22, 2007 at 07:42:33AM +0100, Nix wrote: > >> >On 22 Oct 2007, WANG Cong uttered the following: > >> >> I build UML for non-SMP x86. But I don't know about UML_NET_VDE. ;( > >> >> > >> >> Errors threw out by gcc (too many) are put here: > >> >> =09http://wangcong.org/down/errors.txt > >> > > >> >It's hard to tell without LOCALE=3DC, but those are the sorts of resu= lts > >> >I'd expect if you had run make {old,menu,x}config without specifying > >> >ARCH=3Dum, so you've configured for one architecture and are now tryi= ng > >> >to build another. > >> > > >> >Where is the include/asm symlink pointing to in your build tree? > >> > >> $ ls -l include/asm > >> lrwxrwxrwx 1 wangcong wangcong 6 2007-10-22 12:34 include/asm -> asm-u= m > >> > >> OK. Let me do the following: > >> > >> =09$ make mrproper > > > >Please try > >make ARCH=3Dum mrproper > > > >this will clean up the additional uml symlinks. > > > > Hi, Sam, Al and others. > > I just followed what Sam told me, errors are much fewer this time, > but still exist. Error messages are: > > CC arch/um/kernel/syscall.o > CC arch/um/kernel/sysrq.o > arch/um/kernel/sysrq.c: In function =FF=FFshow_stack=FF=FF: > arch/um/kernel/sysrq.c:63: error: =FF=FFUESP=FF=FF undeclared (first use = in this function) > arch/um/kernel/sysrq.c:63: error: (Each undeclared identifier is reported= only once > arch/um/kernel/sysrq.c:63: error: for each function it appears in.) > make[1]: *** [arch/um/kernel/sysrq.o] Error 1 > make: *** [arch/um/kernel] Error 2 > > Or I missed something again? > > And I use `make defconfig ARCH=3Dum' to generate .config, my tree > is 2.6.23-git16 (Al, is this OK?). that looks like a cut-and-paste error since the file include/asm-um/arch/ptrace-abi.h opens with: =3D=3D=3D=3D=3D #ifndef _ASM_X86_PTRACE_ABI_H #define _ASM_X86_PTRACE_ABI_H #ifdef __i386__ #define EBX 0 #define ECX 1 #define EDX 2 #define ESI 3 #define EDI 4 #define EBP 5 #define EAX 6 #define DS 7 #define ES 8 #define FS 9 #define GS 10 #define ORIG_EAX 11 #define EIP 12 #define CS 13 #define EFL 14 #define UESP 15 =2E.... =3D=3D=3D=3D=3D somehow, that doesn't look right. rday --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://crashcourse.ca =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |
From: Andi K. <an...@fi...> - 2007-10-23 12:55:41
|
Ingo Molnar <mi...@el...> writes: > > the 'fastcall removal' changes to paravirt.c were over-eager: they > removed fastcall annotations from functions that are (or might be) > implemented in assembly. So if someone changes the compiler model, > such as -pg which disables regparm, the kernel breaks in nasty ways. It would be probably better to just not disable -mregparms. I don't think the compiler forces this. And e.g. on x86-64 regparms & -pg work just fine, why should it not on i386? > so this patch adds back fastcall annotations. This serves as > documentation for assembly calling-convention dependencies as > well. You should rename it then to "asmcall" or something. -Andi |
From: Ingo M. <mi...@el...> - 2007-10-23 13:10:30
|
* Andi Kleen <an...@fi...> wrote: > > so this patch adds back fastcall annotations. This serves as > > documentation for assembly calling-convention dependencies as well. > > You should rename it then to "asmcall" or something. if then that should be a separate renaming patch. Ingo |
From: Jeff D. <jd...@ad...> - 2007-10-21 13:18:20
|
On Sun, Oct 21, 2007 at 07:48:54PM +0800, WANG Cong wrote: > UML still doesn't build on 2.6.23-git16. > > Gcc threw out many errors, I put them in the web: > http://wangcong.org/down/errors.txt Looks like either you need to run mrproper and try again, or maybe fallout from the x86 merge, with include/asm-um/arch pointing to include/asm-i386 instead of include/asm-x86. Although I though Al had UML building in the presence of the x86 merge. Jeff -- Work email - jdike at linux dot intel dot com |
From: WANG C. <xiy...@gm...> - 2007-10-21 13:24:40
|
On Sun, Oct 21, 2007 at 09:08:48AM -0400, Jeff Dike wrote: >On Sun, Oct 21, 2007 at 07:48:54PM +0800, WANG Cong wrote: >> UML still doesn't build on 2.6.23-git16. >> >> Gcc threw out many errors, I put them in the web: >> http://wangcong.org/down/errors.txt > >Looks like either you need to run mrproper and try again, or maybe >fallout from the x86 merge, with include/asm-um/arch pointing to >include/asm-i386 instead of include/asm-x86. Although I though Al had >UML building in the presence of the x86 merge. > Hi, Jeff! I have tried `make mrproper' before `make ARCH=um', but it still failed. ;( Regards. -- May the Source Be With You. |
From: Al V. <vi...@ft...> - 2007-10-22 11:36:09
|
On Mon, Oct 22, 2007 at 03:48:23PM +0800, WANG Cong wrote: > I just followed what Sam told me, errors are much fewer this time, > but still exist. Error messages are: > > CC arch/um/kernel/syscall.o > CC arch/um/kernel/sysrq.o > arch/um/kernel/sysrq.c: In function ???show_stack???: > arch/um/kernel/sysrq.c:63: error: ???UESP??? undeclared (first use in this function) > arch/um/kernel/sysrq.c:63: error: (Each undeclared identifier is reported only once > arch/um/kernel/sysrq.c:63: error: for each function it appears in.) > make[1]: *** [arch/um/kernel/sysrq.o] Error 1 > make: *** [arch/um/kernel] Error 2 > > Or I missed something again? > > And I use `make defconfig ARCH=um' to generate .config, my tree > is 2.6.23-git16 (Al, is this OK?). Now apply the patch upthread, it should've fixed that one (and yes, you are down to the stuff this patch is supposed to fix - and does so here). |
From: WANG C. <xiy...@gm...> - 2007-10-22 12:29:26
|
On Mon, Oct 22, 2007 at 12:36:00PM +0100, Al Viro wrote: >On Mon, Oct 22, 2007 at 03:48:23PM +0800, WANG Cong wrote: >> I just followed what Sam told me, errors are much fewer this time, >> but still exist. Error messages are: >> >> CC arch/um/kernel/syscall.o >> CC arch/um/kernel/sysrq.o >> arch/um/kernel/sysrq.c: In function ???show_stack???: >> arch/um/kernel/sysrq.c:63: error: ???UESP??? undeclared (first use in this function) >> arch/um/kernel/sysrq.c:63: error: (Each undeclared identifier is reported only once >> arch/um/kernel/sysrq.c:63: error: for each function it appears in.) >> make[1]: *** [arch/um/kernel/sysrq.o] Error 1 >> make: *** [arch/um/kernel] Error 2 >> >> Or I missed something again? >> >> And I use `make defconfig ARCH=um' to generate .config, my tree >> is 2.6.23-git16 (Al, is this OK?). > >Now apply the patch upthread, it should've fixed that one (and yes, you >are down to the stuff this patch is supposed to fix - and does so here). Yes, this one is fixed. Thanks for your patch. But another one comes out. ;( CC kernel/sched.o kernel/sched.c:3902: error: conflicting types for ‘wait_for_completion_interruptible’ include/linux/completion.h:46: error: previous declaration of ‘wait_for_completion_interruptible’ was here kernel/sched.c:3908: error: conflicting types for ‘wait_for_completion_interruptible’ include/linux/completion.h:46: error: previous declaration of ‘wait_for_completion_interruptible’ was here make[1]: *** [kernel/sched.o] Error 1 make: *** [kernel] Error 2 CC: Ingo Molar <mi...@el...> -- May the Source Be With You. |
From: Andi K. <an...@fi...> - 2007-10-23 14:02:17
|
Ingo Molnar <mi...@el...> writes: > * Andi Kleen <an...@fi...> wrote: > >> > so this patch adds back fastcall annotations. This serves as >> > documentation for assembly calling-convention dependencies as well. >> >> You should rename it then to "asmcall" or something. > > if then that should be a separate renaming patch. Well you're asking for the ugly hacks for out of tree code. Any clean ups needed should be your duty (and it's still unclear why exactly regparm should not work with -pg anyways -- before readding ugly stuff perhaps that should be clarified too) -Andi |
From: Al V. <vi...@ft...> - 2007-10-21 15:43:58
|
On Sun, Oct 21, 2007 at 09:20:32PM +0800, WANG Cong wrote: > On Sun, Oct 21, 2007 at 09:08:48AM -0400, Jeff Dike wrote: > >On Sun, Oct 21, 2007 at 07:48:54PM +0800, WANG Cong wrote: > >> UML still doesn't build on 2.6.23-git16. > >> > >> Gcc threw out many errors, I put them in the web: > >> http://wangcong.org/down/errors.txt > > > >Looks like either you need to run mrproper and try again, or maybe > >fallout from the x86 merge, with include/asm-um/arch pointing to > >include/asm-i386 instead of include/asm-x86. Although I though Al had > >UML building in the presence of the x86 merge. > > > > Hi, Jeff! > > I have tried `make mrproper' before `make ARCH=um', but it still > failed. ;( Fallout continues; I've got a preliminary patch for it. Basically, we need to stop doing -U__i386__ et.al. diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index 0178df3..08433f8 100644 --- a/arch/um/Makefile-i386 +++ b/arch/um/Makefile-i386 @@ -9,6 +9,7 @@ ELF_ARCH := $(SUBARCH) ELF_FORMAT := elf32-$(SUBARCH) OBJCOPYFLAGS := -O binary -R .note -R .comment -S HEADER_ARCH := x86 +CHECKFLAGS += -D__i386__ ifeq ("$(origin SUBARCH)", "command line") ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") @@ -26,8 +27,6 @@ AFLAGS += -DCONFIG_X86_32 CONFIG_X86_32 := y export CONFIG_X86_32 -ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH) - # First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y. include $(srctree)/arch/i386/Makefile.cpu diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index fe5316f..8ed362f 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 @@ -6,12 +6,9 @@ START := 0x60000000 _extra_flags_ = -fno-builtin -m64 -#We #undef __x86_64__ for kernelspace, not for userspace where -#it's needed for headers to work! -ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ KBUILD_CFLAGS += $(_extra_flags_) -CHECKFLAGS += -m64 +CHECKFLAGS += -m64 -D__x86_64__ KBUILD_AFLAGS += -m64 LDFLAGS += -m elf_x86_64 KBUILD_CPPFLAGS += -m64 diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 9326357..96f67d5 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c @@ -8,6 +8,7 @@ #include "linux/module.h" #include "linux/kallsyms.h" #include "asm/page.h" +#include "registers.h" #include "asm/processor.h" #include "sysrq.h" diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 0e937f6..20070b7 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -41,7 +41,7 @@ */ static inline int uncached_access(struct file *file, unsigned long addr) { -#if defined(__i386__) +#if defined(__i386__) && !defined(__arch_um__) /* * On the PPro and successors, the MTRRs are used to set * memory types for physical addresses outside main memory, @@ -57,7 +57,7 @@ static inline int uncached_access(struct file *file, unsigned long addr) test_bit(X86_FEATURE_CYRIX_ARR, boot_cpu_data.x86_capability) || test_bit(X86_FEATURE_CENTAUR_MCR, boot_cpu_data.x86_capability) ) && addr >= __pa(high_memory); -#elif defined(__x86_64__) +#elif defined(__x86_64__) && !defined(__arch_um__) /* * This is broken because it can generate memory type aliases, * which can cause cache corruptions diff --git a/drivers/md/raid6algos.c b/drivers/md/raid6algos.c index 9265761..77a6e4b 100644 --- a/drivers/md/raid6algos.c +++ b/drivers/md/raid6algos.c @@ -52,7 +52,7 @@ const struct raid6_calls * const raid6_algos[] = { &raid6_intx16, &raid6_intx32, #endif -#if defined(__i386__) +#if defined(__i386__) && !defined(__arch_um__) &raid6_mmxx1, &raid6_mmxx2, &raid6_sse1x1, @@ -60,7 +60,7 @@ const struct raid6_calls * const raid6_algos[] = { &raid6_sse2x1, &raid6_sse2x2, #endif -#if defined(__x86_64__) +#if defined(__x86_64__) && !defined(__arch_um__) &raid6_sse2x1, &raid6_sse2x2, &raid6_sse2x4, diff --git a/drivers/md/raid6mmx.c b/drivers/md/raid6mmx.c index 6181a5a..d4e4a1b 100644 --- a/drivers/md/raid6mmx.c +++ b/drivers/md/raid6mmx.c @@ -16,7 +16,7 @@ * MMX implementation of RAID-6 syndrome functions */ -#if defined(__i386__) +#if defined(__i386__) && !defined(__arch_um__) #include "raid6.h" #include "raid6x86.h" diff --git a/drivers/md/raid6sse1.c b/drivers/md/raid6sse1.c index f0a1ba8..0666237 100644 --- a/drivers/md/raid6sse1.c +++ b/drivers/md/raid6sse1.c @@ -21,7 +21,7 @@ * worthwhile as a separate implementation. */ -#if defined(__i386__) +#if defined(__i386__) && !defined(__arch_um__) #include "raid6.h" #include "raid6x86.h" diff --git a/drivers/md/raid6sse2.c b/drivers/md/raid6sse2.c index 0f01976..b034ad8 100644 --- a/drivers/md/raid6sse2.c +++ b/drivers/md/raid6sse2.c @@ -17,7 +17,7 @@ * */ -#if defined(__i386__) || defined(__x86_64__) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__) #include "raid6.h" #include "raid6x86.h" @@ -161,7 +161,7 @@ const struct raid6_calls raid6_sse2x2 = { #endif -#ifdef __x86_64__ +#if defined(__x86_64__) && !defined(__arch_um__) /* * Unrolled-by-4 SSE2 implementation diff --git a/drivers/md/raid6x86.h b/drivers/md/raid6x86.h index 9111950..99fea7a 100644 --- a/drivers/md/raid6x86.h +++ b/drivers/md/raid6x86.h @@ -19,7 +19,7 @@ #ifndef LINUX_RAID_RAID6X86_H #define LINUX_RAID_RAID6X86_H -#if defined(__i386__) || defined(__x86_64__) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__) #ifdef __KERNEL__ /* Real code */ diff --git a/include/asm-um/unistd.h b/include/asm-um/unistd.h index 732c83f..38bd9d9 100644 --- a/include/asm-um/unistd.h +++ b/include/asm-um/unistd.h @@ -14,7 +14,6 @@ extern int um_execve(const char *file, char *const argv[], char *const env[]); #ifdef __KERNEL__ /* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */ -#define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_SYS_ALARM #define __ARCH_WANT_SYS_GETHOSTNAME diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index d2a96cb..cf79853 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -32,18 +32,13 @@ * On x86-64 make the 64bit structure have the same alignment as the * 32bit structure. This makes 32bit emulation easier. * - * UML/x86_64 needs the same packing as x86_64 - UML + UML_X86 + - * 64_BIT adds up to UML/x86_64. + * UML/x86_64 needs the same packing as x86_64 */ #ifdef __x86_64__ #define EPOLL_PACKED __attribute__((packed)) #else -#if defined(CONFIG_UML) && defined(CONFIG_UML_X86) && defined(CONFIG_64BIT) -#define EPOLL_PACKED __attribute__((packed)) -#else #define EPOLL_PACKED #endif -#endif struct epoll_event { __u32 events; diff --git a/kernel/signal.c b/kernel/signal.c index 1200630..4537bdd 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -732,7 +732,7 @@ static void print_fatal_signal(struct pt_regs *regs, int signr) printk("%s/%d: potentially unexpected fatal signal %d.\n", current->comm, task_pid_nr(current), signr); -#ifdef __i386__ +#if defined(__i386__) && !defined(__arch_um__) printk("code at %08lx: ", regs->eip); { int i; |
From: Jeff D. <jd...@ad...> - 2007-10-22 20:24:57
|
On Sun, Oct 21, 2007 at 04:43:46PM +0100, Al Viro wrote: > Fallout continues; I've got a preliminary patch for it. Basically, we > need to stop doing -U__i386__ et.al. Thanks, Al. You need the patch below in order to get a working UML - feel free to fold it into this. Jeff -- Work email - jdike at linux dot intel dot com KERNEL_DEFINES needs whitespace trimmed, otherwise this whitespace crunching done by make fools the patsubst which is used to remove KERNEL_DEFINES from USER_CFLAGS. Signed-off-by: Jeff Dike <jd...@li...> --- arch/um/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Index: linux-2.6/arch/um/Makefile =================================================================== --- linux-2.6.orig/arch/um/Makefile 2007-10-22 16:19:38.000000000 -0400 +++ linux-2.6/arch/um/Makefile 2007-10-22 16:19:44.000000000 -0400 @@ -70,9 +70,12 @@ include $(srctree)/$(ARCH_DIR)/Makefile- # in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different # errnos. # These apply to kernelspace only. +# +# strip leading and trailing whitespace to make the USER_CFLAGS removal of these +# defines more robust -KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ - -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) +KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ + -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) KBUILD_CFLAGS += $(KERNEL_DEFINES) KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) |
From: WANG C. <xiy...@gm...> - 2007-10-22 04:41:46
|
On Sun, Oct 21, 2007 at 04:43:46PM +0100, Al Viro wrote: >On Sun, Oct 21, 2007 at 09:20:32PM +0800, WANG Cong wrote: >> On Sun, Oct 21, 2007 at 09:08:48AM -0400, Jeff Dike wrote: >> >On Sun, Oct 21, 2007 at 07:48:54PM +0800, WANG Cong wrote: >> >> UML still doesn't build on 2.6.23-git16. >> >> >> >> Gcc threw out many errors, I put them in the web: >> >> http://wangcong.org/down/errors.txt >> > >> >Looks like either you need to run mrproper and try again, or maybe >> >fallout from the x86 merge, with include/asm-um/arch pointing to >> >include/asm-i386 instead of include/asm-x86. Although I though Al had >> >UML building in the presence of the x86 merge. >> > >> >> Hi, Jeff! >> >> I have tried `make mrproper' before `make ARCH=um', but it still >> failed. ;( > >Fallout continues; I've got a preliminary patch for it. Basically, we >need to stop doing -U__i386__ et.al. > Hi, Al. I applied your patch and recompiled the kernel. But it failed again. ;( Regards. WANG Cong |
From: Ingo M. <mi...@el...> - 2007-10-22 12:31:05
|
* WANG Cong <xiy...@gm...> wrote: > On Mon, Oct 22, 2007 at 12:36:00PM +0100, Al Viro wrote: > >On Mon, Oct 22, 2007 at 03:48:23PM +0800, WANG Cong wrote: > >> I just followed what Sam told me, errors are much fewer this time, > >> but still exist. Error messages are: > >> > >> CC arch/um/kernel/syscall.o > >> CC arch/um/kernel/sysrq.o > >> arch/um/kernel/sysrq.c: In function ???show_stack???: > >> arch/um/kernel/sysrq.c:63: error: ???UESP??? undeclared (first use in this function) > >> arch/um/kernel/sysrq.c:63: error: (Each undeclared identifier is reported only once > >> arch/um/kernel/sysrq.c:63: error: for each function it appears in.) > >> make[1]: *** [arch/um/kernel/sysrq.o] Error 1 > >> make: *** [arch/um/kernel] Error 2 > >> > >> Or I missed something again? > >> > >> And I use `make defconfig ARCH=um' to generate .config, my tree > >> is 2.6.23-git16 (Al, is this OK?). > > > >Now apply the patch upthread, it should've fixed that one (and yes, you > >are down to the stuff this patch is supposed to fix - and does so here). > > Yes, this one is fixed. Thanks for your patch. > > But another one comes out. ;( > > CC kernel/sched.o > kernel/sched.c:3902: error: conflicting types for ‘wait_for_completion_interruptible’ > include/linux/completion.h:46: error: previous declaration of ‘wait_for_completion_interruptible’ was here > kernel/sched.c:3908: error: conflicting types for ‘wait_for_completion_interruptible’ > include/linux/completion.h:46: error: previous declaration of ‘wait_for_completion_interruptible’ was here > make[1]: *** [kernel/sched.o] Error 1 > make: *** [kernel] Error 2 does the patch below ontop of latest -git help? Ingo ----------------> Subject: sched: fix fastcall mismatch in completion APIs From: Ingo Molnar <mi...@el...> Jeff Dike noticed that wait_for_completion_interruptible()'s prototype had a mismatched fastcall. Fix this by removing the fastcall attributes from all the completion APIs. Found-by: Jeff Dike <jd...@li...> Signed-off-by: Ingo Molnar <mi...@el...> --- include/linux/completion.h | 16 ++++++++-------- kernel/sched.c | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) Index: linux/include/linux/completion.h =================================================================== --- linux.orig/include/linux/completion.h +++ linux/include/linux/completion.h @@ -42,15 +42,15 @@ static inline void init_completion(struc init_waitqueue_head(&x->wait); } -extern void FASTCALL(wait_for_completion(struct completion *)); -extern int FASTCALL(wait_for_completion_interruptible(struct completion *x)); -extern unsigned long FASTCALL(wait_for_completion_timeout(struct completion *x, - unsigned long timeout)); -extern unsigned long FASTCALL(wait_for_completion_interruptible_timeout( - struct completion *x, unsigned long timeout)); +extern void wait_for_completion(struct completion *); +extern int wait_for_completion_interruptible(struct completion *x); +extern unsigned long wait_for_completion_timeout(struct completion *x, + unsigned long timeout); +extern unsigned long wait_for_completion_interruptible_timeout( + struct completion *x, unsigned long timeout); -extern void FASTCALL(complete(struct completion *)); -extern void FASTCALL(complete_all(struct completion *)); +extern void complete(struct completion *); +extern void complete_all(struct completion *); #define INIT_COMPLETION(x) ((x).done = 0) Index: linux/kernel/sched.c =================================================================== --- linux.orig/kernel/sched.c +++ linux/kernel/sched.c @@ -3821,7 +3821,7 @@ __wake_up_sync(wait_queue_head_t *q, uns } EXPORT_SYMBOL_GPL(__wake_up_sync); /* For internal use only */ -void fastcall complete(struct completion *x) +void complete(struct completion *x) { unsigned long flags; @@ -3833,7 +3833,7 @@ void fastcall complete(struct completion } EXPORT_SYMBOL(complete); -void fastcall complete_all(struct completion *x) +void complete_all(struct completion *x) { unsigned long flags; @@ -3885,13 +3885,13 @@ wait_for_common(struct completion *x, lo return timeout; } -void fastcall __sched wait_for_completion(struct completion *x) +void __sched wait_for_completion(struct completion *x) { wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_UNINTERRUPTIBLE); } EXPORT_SYMBOL(wait_for_completion); -unsigned long fastcall __sched +unsigned long __sched wait_for_completion_timeout(struct completion *x, unsigned long timeout) { return wait_for_common(x, timeout, TASK_UNINTERRUPTIBLE); @@ -3907,7 +3907,7 @@ int __sched wait_for_completion_interrup } EXPORT_SYMBOL(wait_for_completion_interruptible); -unsigned long fastcall __sched +unsigned long __sched wait_for_completion_interruptible_timeout(struct completion *x, unsigned long timeout) { |
From: WANG C. <xiy...@gm...> - 2007-10-22 12:43:22
|
On Mon, Oct 22, 2007 at 02:30:41PM +0200, Ingo Molnar wrote: > >* WANG Cong <xiy...@gm...> wrote: > >> On Mon, Oct 22, 2007 at 12:36:00PM +0100, Al Viro wrote: >> >On Mon, Oct 22, 2007 at 03:48:23PM +0800, WANG Cong wrote: >> >> I just followed what Sam told me, errors are much fewer this time, >> >> but still exist. Error messages are: >> >> >> >> CC arch/um/kernel/syscall.o >> >> CC arch/um/kernel/sysrq.o >> >> arch/um/kernel/sysrq.c: In function ???show_stack???: >> >> arch/um/kernel/sysrq.c:63: error: ???UESP??? undeclared (first use in this function) >> >> arch/um/kernel/sysrq.c:63: error: (Each undeclared identifier is reported only once >> >> arch/um/kernel/sysrq.c:63: error: for each function it appears in.) >> >> make[1]: *** [arch/um/kernel/sysrq.o] Error 1 >> >> make: *** [arch/um/kernel] Error 2 >> >> >> >> Or I missed something again? >> >> >> >> And I use `make defconfig ARCH=um' to generate .config, my tree >> >> is 2.6.23-git16 (Al, is this OK?). >> > >> >Now apply the patch upthread, it should've fixed that one (and yes, you >> >are down to the stuff this patch is supposed to fix - and does so here). >> >> Yes, this one is fixed. Thanks for your patch. >> >> But another one comes out. ;( >> >> CC kernel/sched.o >> kernel/sched.c:3902: error: conflicting types for ‘wait_for_completion_interruptible’ >> include/linux/completion.h:46: error: previous declaration of ‘wait_for_completion_interruptible’ was here >> kernel/sched.c:3908: error: conflicting types for ‘wait_for_completion_interruptible’ >> include/linux/completion.h:46: error: previous declaration of ‘wait_for_completion_interruptible’ was here >> make[1]: *** [kernel/sched.o] Error 1 >> make: *** [kernel] Error 2 > >does the patch below ontop of latest -git help? > Thanks, Ingo! I am using 2.6.23-git16 plus Al's previous patch. After applying your patch, it builds fine. Regards. WANG Cong |
From: Al V. <vi...@ft...> - 2007-10-22 12:43:30
|
On Mon, Oct 22, 2007 at 08:25:04PM +0800, WANG Cong wrote: > >Now apply the patch upthread, it should've fixed that one (and yes, you > >are down to the stuff this patch is supposed to fix - and does so here). > > Yes, this one is fixed. Thanks for your patch. > > But another one comes out. ;( Jeff had posted a fix for that one a while ago: -int __sched wait_for_completion_interruptible(struct completion *x) +int __sched fastcall wait_for_completion_interruptible(struct completion *x) in kernel/sched.c FWIW, I would simply kill the damn fastcall thing - right now the only user is uml/i386; everything else either has it #defined to nothing or (as i386 does) passes -mregparm=3 while having fastcall expand to __attribute__((regparm(3))) - i.e. has all functions fastcall. Do we really need it on uml/i386 enough to keep bothering with that mess? |