* [patch 1/3] x2apic: uninline uv_init_apic_ldr()
@ 2008-07-11 20:11 Suresh Siddha
2008-07-11 20:11 ` [patch 2/3] x2apic: xen64 paravirt basic apic ops Suresh Siddha
2008-07-11 20:11 ` [patch 3/3] x2apic: kernel-parameter documentation for "x2apic_phys" Suresh Siddha
0 siblings, 2 replies; 4+ messages in thread
From: Suresh Siddha @ 2008-07-11 20:11 UTC (permalink / raw)
To: mingo, x86, akpm; +Cc: linux-kernel, Suresh Siddha
[-- Attachment #1: fix_inline_uv.patch --]
[-- Type: text/plain, Size: 586 bytes --]
Andrew says:
> There's no point in declaring it inline if it's always called indirectly.
And point taken!
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
Index: tree-x86/arch/x86/kernel/genx2apic_uv_x.c
===================================================================
--- tree-x86.orig/arch/x86/kernel/genx2apic_uv_x.c 2008-07-11 10:58:31.000000000 -0700
+++ tree-x86/arch/x86/kernel/genx2apic_uv_x.c 2008-07-11 11:03:45.000000000 -0700
@@ -120,7 +120,7 @@
return 1;
}
-static inline void uv_init_apic_ldr(void)
+static void uv_init_apic_ldr(void)
{
}
--
^ permalink raw reply [flat|nested] 4+ messages in thread* [patch 2/3] x2apic: xen64 paravirt basic apic ops 2008-07-11 20:11 [patch 1/3] x2apic: uninline uv_init_apic_ldr() Suresh Siddha @ 2008-07-11 20:11 ` Suresh Siddha 2008-07-11 21:44 ` Jeremy Fitzhardinge 2008-07-11 20:11 ` [patch 3/3] x2apic: kernel-parameter documentation for "x2apic_phys" Suresh Siddha 1 sibling, 1 reply; 4+ messages in thread From: Suresh Siddha @ 2008-07-11 20:11 UTC (permalink / raw) To: mingo, x86, akpm; +Cc: linux-kernel, Suresh Siddha, Jeremy Fitzhardinge [-- Attachment #1: 64bit_paravirt_apic_ops.patch --] [-- Type: text/plain, Size: 4213 bytes --] Define the Xen specific basic apic ops, in additon to paravirt apic ops, with some misc warning fixes. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> --- Index: tree-x86/arch/x86/xen/enlighten.c =================================================================== --- tree-x86.orig/arch/x86/xen/enlighten.c 2008-07-11 11:26:17.000000000 -0700 +++ tree-x86/arch/x86/xen/enlighten.c 2008-07-11 11:55:58.000000000 -0700 @@ -576,16 +576,45 @@ } #ifdef CONFIG_X86_LOCAL_APIC -static u32 xen_apic_read(unsigned long reg) +static u32 xen_apic_read(u32 reg) { return 0; } -static void xen_apic_write(unsigned long reg, u32 val) +static void xen_apic_write(u32 reg, u32 val) { /* Warn to see if there's any stray references */ WARN_ON(1); } + +#ifdef CONFIG_X86_64 +static u64 xen_apic_icr_read(void) +{ + return 0; +} + +static void xen_apic_icr_write(u32 low, u32 id) +{ + /* Warn to see if there's any stray references */ + WARN_ON(1); +} + +static void xen_apic_wait_icr_idle(void) +{ + return; +} + +static struct apic_ops xen_basic_apic_ops = { + .read = xen_apic_read, + .write = xen_apic_write, + .write_atomic = xen_apic_write, + .icr_read = xen_apic_icr_read, + .icr_write = xen_apic_icr_write, + .wait_icr_idle = xen_apic_wait_icr_idle, + .safe_wait_icr_idle = xen_apic_wait_icr_idle, +}; +#endif + #endif static void xen_flush_tlb(void) @@ -1269,9 +1298,11 @@ static const struct pv_apic_ops xen_apic_ops __initdata = { #ifdef CONFIG_X86_LOCAL_APIC +#ifndef CONFIG_X86_64 .apic_write = xen_apic_write, .apic_write_atomic = xen_apic_write, .apic_read = xen_apic_read, +#endif .setup_boot_clock = paravirt_nop, .setup_secondary_clock = paravirt_nop, .startup_ipi_hook = paravirt_nop, @@ -1673,6 +1704,12 @@ pv_irq_ops = xen_irq_ops; pv_apic_ops = xen_apic_ops; pv_mmu_ops = xen_mmu_ops; +#ifdef CONFIG_X86_64 + /* + * for 64bit, set up the basic apic ops aswell. + */ + apic_ops = &xen_basic_apic_ops; +#endif if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; Index: tree-x86/include/asm-x86/paravirt.h =================================================================== --- tree-x86.orig/include/asm-x86/paravirt.h 2008-07-11 10:58:31.000000000 -0700 +++ tree-x86/include/asm-x86/paravirt.h 2008-07-11 12:00:12.000000000 -0700 @@ -200,13 +200,15 @@ struct pv_apic_ops { #ifdef CONFIG_X86_LOCAL_APIC +#ifndef CONFIG_X86_64 /* * Direct APIC operations, principally for VMI. Ideally * these shouldn't be in this interface. */ - void (*apic_write)(unsigned long reg, u32 v); - void (*apic_write_atomic)(unsigned long reg, u32 v); - u32 (*apic_read)(unsigned long reg); + void (*apic_write)(u32 reg, u32 v); + void (*apic_write_atomic)(u32 reg, u32 v); + u32 (*apic_read)(u32 reg); +#endif void (*setup_boot_clock)(void); void (*setup_secondary_clock)(void); @@ -903,17 +905,17 @@ * Basic functions accessing APICs. */ #ifndef CONFIG_X86_64 -static inline void apic_write(unsigned long reg, u32 v) +static inline void apic_write(u32 reg, u32 v) { PVOP_VCALL2(pv_apic_ops.apic_write, reg, v); } -static inline void apic_write_atomic(unsigned long reg, u32 v) +static inline void apic_write_atomic(u32 reg, u32 v) { PVOP_VCALL2(pv_apic_ops.apic_write_atomic, reg, v); } -static inline u32 apic_read(unsigned long reg) +static inline u32 apic_read(u32 reg) { return PVOP_CALL1(unsigned long, pv_apic_ops.apic_read, reg); } Index: tree-x86/arch/x86/lguest/boot.c =================================================================== --- tree-x86.orig/arch/x86/lguest/boot.c 2008-07-11 10:36:24.000000000 -0700 +++ tree-x86/arch/x86/lguest/boot.c 2008-07-11 12:01:51.000000000 -0700 @@ -783,11 +783,11 @@ * code qualifies for Advanced. It will also never interrupt anything. It * does, however, allow us to get through the Linux boot code. */ #ifdef CONFIG_X86_LOCAL_APIC -static void lguest_apic_write(unsigned long reg, u32 v) +static void lguest_apic_write(u32 reg, u32 v) { } -static u32 lguest_apic_read(unsigned long reg) +static u32 lguest_apic_read(u32 reg) { return 0; } -- ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2/3] x2apic: xen64 paravirt basic apic ops 2008-07-11 20:11 ` [patch 2/3] x2apic: xen64 paravirt basic apic ops Suresh Siddha @ 2008-07-11 21:44 ` Jeremy Fitzhardinge 0 siblings, 0 replies; 4+ messages in thread From: Jeremy Fitzhardinge @ 2008-07-11 21:44 UTC (permalink / raw) To: Suresh Siddha; +Cc: mingo, x86, akpm, linux-kernel Suresh Siddha wrote: > Define the Xen specific basic apic ops, in additon to paravirt apic ops, > with some misc warning fixes. > This looks fine to me, other than apic_ops is 64-bit only. What's the unification plan? J > Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> > Cc: Jeremy Fitzhardinge <jeremy@goop.org> > --- > > Index: tree-x86/arch/x86/xen/enlighten.c > =================================================================== > --- tree-x86.orig/arch/x86/xen/enlighten.c 2008-07-11 11:26:17.000000000 -0700 > +++ tree-x86/arch/x86/xen/enlighten.c 2008-07-11 11:55:58.000000000 -0700 > @@ -576,16 +576,45 @@ > } > > #ifdef CONFIG_X86_LOCAL_APIC > -static u32 xen_apic_read(unsigned long reg) > +static u32 xen_apic_read(u32 reg) > { > return 0; > } > > -static void xen_apic_write(unsigned long reg, u32 val) > +static void xen_apic_write(u32 reg, u32 val) > { > /* Warn to see if there's any stray references */ > WARN_ON(1); > } > + > +#ifdef CONFIG_X86_64 > +static u64 xen_apic_icr_read(void) > +{ > + return 0; > +} > + > +static void xen_apic_icr_write(u32 low, u32 id) > +{ > + /* Warn to see if there's any stray references */ > + WARN_ON(1); > +} > + > +static void xen_apic_wait_icr_idle(void) > +{ > + return; > +} > + > +static struct apic_ops xen_basic_apic_ops = { > + .read = xen_apic_read, > + .write = xen_apic_write, > + .write_atomic = xen_apic_write, > + .icr_read = xen_apic_icr_read, > + .icr_write = xen_apic_icr_write, > + .wait_icr_idle = xen_apic_wait_icr_idle, > + .safe_wait_icr_idle = xen_apic_wait_icr_idle, > +}; > +#endif > + > #endif > > static void xen_flush_tlb(void) > @@ -1269,9 +1298,11 @@ > > static const struct pv_apic_ops xen_apic_ops __initdata = { > #ifdef CONFIG_X86_LOCAL_APIC > +#ifndef CONFIG_X86_64 > .apic_write = xen_apic_write, > .apic_write_atomic = xen_apic_write, > .apic_read = xen_apic_read, > +#endif > .setup_boot_clock = paravirt_nop, > .setup_secondary_clock = paravirt_nop, > .startup_ipi_hook = paravirt_nop, > @@ -1673,6 +1704,12 @@ > pv_irq_ops = xen_irq_ops; > pv_apic_ops = xen_apic_ops; > pv_mmu_ops = xen_mmu_ops; > +#ifdef CONFIG_X86_64 > + /* > + * for 64bit, set up the basic apic ops aswell. > + */ > + apic_ops = &xen_basic_apic_ops; > +#endif > > if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { > pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; > Index: tree-x86/include/asm-x86/paravirt.h > =================================================================== > --- tree-x86.orig/include/asm-x86/paravirt.h 2008-07-11 10:58:31.000000000 -0700 > +++ tree-x86/include/asm-x86/paravirt.h 2008-07-11 12:00:12.000000000 -0700 > @@ -200,13 +200,15 @@ > > struct pv_apic_ops { > #ifdef CONFIG_X86_LOCAL_APIC > +#ifndef CONFIG_X86_64 > /* > * Direct APIC operations, principally for VMI. Ideally > * these shouldn't be in this interface. > */ > - void (*apic_write)(unsigned long reg, u32 v); > - void (*apic_write_atomic)(unsigned long reg, u32 v); > - u32 (*apic_read)(unsigned long reg); > + void (*apic_write)(u32 reg, u32 v); > + void (*apic_write_atomic)(u32 reg, u32 v); > + u32 (*apic_read)(u32 reg); > +#endif > void (*setup_boot_clock)(void); > void (*setup_secondary_clock)(void); > > @@ -903,17 +905,17 @@ > * Basic functions accessing APICs. > */ > #ifndef CONFIG_X86_64 > -static inline void apic_write(unsigned long reg, u32 v) > +static inline void apic_write(u32 reg, u32 v) > { > PVOP_VCALL2(pv_apic_ops.apic_write, reg, v); > } > > -static inline void apic_write_atomic(unsigned long reg, u32 v) > +static inline void apic_write_atomic(u32 reg, u32 v) > { > PVOP_VCALL2(pv_apic_ops.apic_write_atomic, reg, v); > } > > -static inline u32 apic_read(unsigned long reg) > +static inline u32 apic_read(u32 reg) > { > return PVOP_CALL1(unsigned long, pv_apic_ops.apic_read, reg); > } > Index: tree-x86/arch/x86/lguest/boot.c > =================================================================== > --- tree-x86.orig/arch/x86/lguest/boot.c 2008-07-11 10:36:24.000000000 -0700 > +++ tree-x86/arch/x86/lguest/boot.c 2008-07-11 12:01:51.000000000 -0700 > @@ -783,11 +783,11 @@ > * code qualifies for Advanced. It will also never interrupt anything. It > * does, however, allow us to get through the Linux boot code. */ > #ifdef CONFIG_X86_LOCAL_APIC > -static void lguest_apic_write(unsigned long reg, u32 v) > +static void lguest_apic_write(u32 reg, u32 v) > { > } > > -static u32 lguest_apic_read(unsigned long reg) > +static u32 lguest_apic_read(u32 reg) > { > return 0; > } > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 3/3] x2apic: kernel-parameter documentation for "x2apic_phys" 2008-07-11 20:11 [patch 1/3] x2apic: uninline uv_init_apic_ldr() Suresh Siddha 2008-07-11 20:11 ` [patch 2/3] x2apic: xen64 paravirt basic apic ops Suresh Siddha @ 2008-07-11 20:11 ` Suresh Siddha 1 sibling, 0 replies; 4+ messages in thread From: Suresh Siddha @ 2008-07-11 20:11 UTC (permalink / raw) To: mingo, x86, akpm; +Cc: linux-kernel, Suresh Siddha [-- Attachment #1: x2apic_phys_kernel_parameters.txt --] [-- Type: text/plain, Size: 670 bytes --] Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> --- Index: tree-x86/Documentation/kernel-parameters.txt =================================================================== --- tree-x86.orig/Documentation/kernel-parameters.txt 2008-07-11 10:58:31.000000000 -0700 +++ tree-x86/Documentation/kernel-parameters.txt 2008-07-11 13:08:22.000000000 -0700 @@ -1379,6 +1379,10 @@ nox2apic [X86-64,APIC] Do not enable x2APIC mode. + x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of + default x2apic cluster mode on platforms + supporting x2apic. + noltlbs [PPC] Do not use large page/tlb entries for kernel lowmem mapping on PPC40x. -- ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-11 21:45 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-11 20:11 [patch 1/3] x2apic: uninline uv_init_apic_ldr() Suresh Siddha 2008-07-11 20:11 ` [patch 2/3] x2apic: xen64 paravirt basic apic ops Suresh Siddha 2008-07-11 21:44 ` Jeremy Fitzhardinge 2008-07-11 20:11 ` [patch 3/3] x2apic: kernel-parameter documentation for "x2apic_phys" Suresh Siddha
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox