lkml.org 
[lkml]   [2008]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: + x86-vsmp-build-fixes.patch added to -mm tree
On Tue, Mar 18, 2008 at 12:28 AM, Ravikiran Thirumalai
<kiran@scalemp.com> wrote:
> On Mon, Mar 17, 2008 at 10:26:55PM -0700, Yinghai Lu wrote:
> >On Mon, Mar 17, 2008 at 10:14 PM, <akpm@linux-foundation.org> wrote:
> >> ...
>
> >> Subject: x86: vsmp build fixes
> >> From: Glauber Costa <gcosta@redhat.com>
> >>
> >> VSMP depends on PCI, but the file is now compiled conditionally on PARAVIRT,
> >> no VSMP, so enclose everything in an ifdef CONFIG_PCI.
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ...
>
> >
> >in arch/x86/Kconfig
> >
> >config PCI
> > bool "PCI support" if !X86_VISWS && !X86_VSMP
> > depends on !X86_VOYAGER
> > default y
> > select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC)
> > help
> > Find out whether you have a PCI motherboard. PCI is the name of a
> > bus system, i.e. the way the CPU talks to the other stuff inside
> > your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
> > VESA. If you have PCI, say Y, otherwise N.
> >
> >will make sure if X86_VSMP, the PCI=y
> >
> >so NAK this patch.
> >
>
> Not really, as you can tell from the description Glauber provided above.
>
suggest you change vsmp_64.c still depend to CONFIG_VSMP, and add some
inline function in some header file.
sth like attach patch

YH
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 09b7b4e..00c0010 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -61,7 +61,7 @@ obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
obj-$(CONFIG_X86_NUMAQ) += numaq_32.o
obj-$(CONFIG_X86_SUMMIT_NUMA) += summit_32.o
-obj-$(CONFIG_PARAVIRT) += vsmp_64.o
+obj-$(CONFIG_X86_VSMP) += vsmp_64.o
obj-$(CONFIG_KPROBES) += kprobes.o
obj-$(CONFIG_MODULES) += module_$(BITS).o
obj-$(CONFIG_ACPI_SRAT) += srat_32.o
diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h
index db5f750..6bcf559 100644
--- a/include/asm-x86/apic.h
+++ b/include/asm-x86/apic.h
@@ -51,13 +51,17 @@ extern unsigned boot_cpu_id;
*/
#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
-extern int is_vsmp_box(void);
#else
#define apic_write native_apic_write
#define apic_write_atomic native_apic_write_atomic
#define apic_read native_apic_read
#define setup_boot_clock setup_boot_APIC_clock
#define setup_secondary_clock setup_secondary_APIC_clock
+#endif
+
+#ifdef CONFIG_X86_VSMP
+extern int is_vsmp_box(void);
+#else
static int inline is_vsmp_box(void)
{
return 0;
diff --git a/include/asm-x86/setup.h b/include/asm-x86/setup.h
index f745de2..8516550 100644
--- a/include/asm-x86/setup.h
+++ b/include/asm-x86/setup.h
@@ -6,7 +6,13 @@
#ifndef __ASSEMBLY__

/* Interrupt control for vSMPowered x86_64 systems */
+#ifdef CONFIG_X86_VSMP
void vsmp_init(void);
+#else
+static inline void vsmp_init(void)
+{
+}
+#endif

char *machine_specific_memory_setup(void);
#ifndef CONFIG_PARAVIRT
\
 
 \ /
  Last update: 2008-03-18 09:27    [W:0.107 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site