All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: user-mode-linux-devel@lists.sourceforge.net,
	Jeff Dike <jdike@addtoit.com>,
	Paolo Giarrusso <p.giarrusso@gmail.com>,
	linux-kernel@vger.kernel.org, Nix <nix@esperi.org.uk>,
	Rob Landley <rob@landley.net>, Al Viro <viro@ftp.linux.org.uk>,
	WANG Cong <xiyou.wangcong@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [uml-devel] User Mode Linux still doesn't build in	2.6.23-final.
Date: Tue, 23 Oct 2007 10:45:46 +0200	[thread overview]
Message-ID: <20071023084546.GA17007@elte.hu> (raw)
In-Reply-To: <471D389E.40609@goop.org>


* Jeremy Fitzhardinge <jeremy@goop.org> 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 <mingo@elte.hu>

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 <mingo@elte.hu>
---
 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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Al Viro <viro@ftp.linux.org.uk>,
	WANG Cong <xiyou.wangcong@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>, Nix <nix@esperi.org.uk>,
	Jeff Dike <jdike@addtoit.com>,
	Paolo Giarrusso <p.giarrusso@gmail.com>,
	user-mode-linux-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Rob Landley <rob@landley.net>
Subject: Re: [uml-devel] User Mode Linux still doesn't build in 2.6.23-final.
Date: Tue, 23 Oct 2007 10:45:46 +0200	[thread overview]
Message-ID: <20071023084546.GA17007@elte.hu> (raw)
In-Reply-To: <471D389E.40609@goop.org>


* Jeremy Fitzhardinge <jeremy@goop.org> 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 <mingo@elte.hu>

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 <mingo@elte.hu>
---
 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

  reply	other threads:[~2007-10-23  8:46 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11 22:54 [uml-devel] User Mode Linux still doesn't build in 2.6.23-final Rob Landley
2007-10-11 22:54 ` Rob Landley
2007-10-20  0:52 ` [uml-devel] " Paolo Giarrusso
2007-10-20  0:52   ` Paolo Giarrusso
2007-10-20 11:41   ` Nix
2007-10-20 11:41     ` Nix
2007-10-21 11:48     ` WANG Cong
2007-10-21 11:48       ` WANG Cong
2007-10-21 13:08       ` Jeff Dike
2007-10-21 13:08         ` Jeff Dike
2007-10-21 13:20         ` WANG Cong
2007-10-21 13:20           ` WANG Cong
2007-10-21 15:43           ` Al Viro
2007-10-21 15:43             ` Al Viro
2007-10-22  4:37             ` WANG Cong
2007-10-22  4:37               ` WANG Cong
2007-10-22  5:22               ` Al Viro
2007-10-22  5:22                 ` Al Viro
2007-10-22  6:12                 ` WANG Cong
2007-10-22  6:12                   ` WANG Cong
2007-10-22  6:42                   ` Nix
2007-10-22  6:42                     ` Nix
2007-10-22  6:52                     ` WANG Cong
2007-10-22  6:52                       ` WANG Cong
2007-10-22  6:59                       ` Sam Ravnborg
2007-10-22  6:59                         ` Sam Ravnborg
2007-10-22  7:48                         ` WANG Cong
2007-10-22  7:48                           ` WANG Cong
2007-10-22  7:58                           ` Robert P. J. Day
2007-10-22  7:58                             ` Robert P. J. Day
2007-10-22 11:36                           ` Al Viro
2007-10-22 11:36                             ` Al Viro
2007-10-22 12:25                             ` WANG Cong
2007-10-22 12:25                               ` WANG Cong
2007-10-22 12:30                               ` Ingo Molnar
2007-10-22 12:30                                 ` Ingo Molnar
2007-10-22 12:39                                 ` WANG Cong
2007-10-22 12:39                                   ` WANG Cong
2007-10-22 12:43                               ` Al Viro
2007-10-22 12:43                                 ` Al Viro
2007-10-22 12:45                                 ` Ingo Molnar
2007-10-22 12:45                                   ` Ingo Molnar
2007-10-22 23:14                                   ` Jeremy Fitzhardinge
2007-10-22 23:14                                     ` Jeremy Fitzhardinge
2007-10-22 23:19                                     ` Ingo Molnar
2007-10-22 23:19                                       ` Ingo Molnar
2007-10-22 23:26                                       ` Jeremy Fitzhardinge
2007-10-22 23:26                                         ` Jeremy Fitzhardinge
2007-10-22 23:56                                       ` Jeremy Fitzhardinge
2007-10-22 23:56                                         ` Jeremy Fitzhardinge
2007-10-23  8:45                                         ` Ingo Molnar [this message]
2007-10-23  8:45                                           ` Ingo Molnar
2007-10-23 12:55                                           ` Andi Kleen
2007-10-23 12:55                                             ` Andi Kleen
2007-10-23 13:10                                             ` Ingo Molnar
2007-10-23 13:10                                               ` Ingo Molnar
2007-10-23 14:01                                               ` Andi Kleen
2007-10-23 14:01                                                 ` Andi Kleen
2007-10-23 14:20                                                 ` Ingo Molnar
2007-10-23 14:20                                                   ` Ingo Molnar
2007-10-23 14:31                                                   ` Jeremy Fitzhardinge
2007-10-23 14:31                                                     ` Jeremy Fitzhardinge
2007-10-23 14:47                                                     ` Ingo Molnar
2007-10-23 14:47                                                       ` Ingo Molnar
2007-10-23 15:11                                                       ` Adrian Bunk
2007-10-23 15:11                                                         ` Adrian Bunk
2007-10-23 14:48                                                   ` Andi Kleen
2007-10-23 14:48                                                     ` Andi Kleen
2007-10-23 15:13                                                     ` Ingo Molnar
2007-10-23 15:13                                                       ` Ingo Molnar
2007-10-23 15:44                                                       ` Ingo Molnar
2007-10-23 15:44                                                         ` Ingo Molnar
2007-10-23 16:57                                                         ` Andi Kleen
2007-10-23 16:57                                                           ` Andi Kleen
2007-10-23 13:25                                           ` Adrian Bunk
2007-10-23 13:25                                             ` Adrian Bunk
2007-10-23 14:20                                           ` Jeremy Fitzhardinge
2007-10-23 14:20                                             ` Jeremy Fitzhardinge
2007-10-22 15:33                                 ` Jeff Dike
2007-10-22 15:33                                   ` Jeff Dike
2007-10-22  7:01                       ` Robert P. J. Day
2007-10-22  7:01                         ` Robert P. J. Day
2007-10-22  7:27                   ` Al Viro
2007-10-22  7:27                     ` Al Viro
2007-10-22 20:24             ` Jeff Dike
2007-10-22 20:24               ` Jeff Dike
2007-10-24 15:22 ` Jeff Dike
2007-10-24 15:22   ` Jeff Dike
2007-10-24 16:14   ` Sam Ravnborg
2007-10-24 16:14     ` Sam Ravnborg
2007-10-24 16:14     ` Sam Ravnborg
2007-10-24 21:46   ` Rob Landley
2007-10-24 21:46     ` Rob Landley
2007-10-25  0:43     ` Jeff Dike
2007-10-25  0:43       ` Jeff Dike
2007-10-25  0:43       ` Jeff Dike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071023084546.GA17007@elte.hu \
    --to=mingo@elte.hu \
    --cc=jdike@addtoit.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nix@esperi.org.uk \
    --cc=p.giarrusso@gmail.com \
    --cc=rob@landley.net \
    --cc=sam@ravnborg.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=viro@ftp.linux.org.uk \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.