public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	shai@scalex86.org
Subject: Re: [PATCH] x86: don't compile vsmp_64 for 32bit
Date: Wed, 25 Feb 2009 22:48:06 -0800	[thread overview]
Message-ID: <20090226064806.GC27240@localdomain> (raw)
In-Reply-To: <49A626B2.8090205@kernel.org>

On Wed, Feb 25, 2009 at 09:20:50PM -0800, Yinghai Lu wrote:
>
>Impact: cleanup
>
>that is only needed when CONFIG_X86_VSMP is defined with 64bit
>also remove dead code about PCI, because CONFIG_X86_VSMP depends on PCI
>
>Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>

NAK!
vsmp64.c is compiled unconditionally for a reason.  There are ifdefs in the
file to avoid code compilation based on config options. is_vsmp_box() is
needed even when CONFIG_X86_VSMP is not enabled, since distro kernels don't ship
with CONFIG_X86_VSMP, and since is_vsmp_box() is used to determine  whether
tsc's can be considered synced or not, this is needed.

In the future, I would appreciate if you copy me on cleanups/changes involving
vsmp64.c

Thanks,
Kiran

>---
> arch/x86/include/asm/apic.h  |    7 +++++++
> arch/x86/include/asm/setup.h |    4 ++++
> arch/x86/kernel/Makefile     |    2 +-
> arch/x86/kernel/setup.c      |    2 --
> arch/x86/kernel/vsmp_64.c    |   12 +-----------
> 5 files changed, 13 insertions(+), 14 deletions(-)
>
>Index: linux-2.6/arch/x86/include/asm/apic.h
>===================================================================
>--- linux-2.6.orig/arch/x86/include/asm/apic.h
>+++ linux-2.6/arch/x86/include/asm/apic.h
>@@ -75,7 +75,14 @@ static inline void default_inquire_remot
> #define setup_secondary_clock setup_secondary_APIC_clock
> #endif
> 
>+#ifdef CONFIG_X86_VSMP
> extern int is_vsmp_box(void);
>+#else
>+static inline int is_vsmp_box(void)
>+{
>+	return 0;
>+}
>+#endif
> extern void xapic_wait_icr_idle(void);
> extern u32 safe_xapic_wait_icr_idle(void);
> extern void xapic_icr_write(u32, u32);
>Index: linux-2.6/arch/x86/include/asm/setup.h
>===================================================================
>--- linux-2.6.orig/arch/x86/include/asm/setup.h
>+++ linux-2.6/arch/x86/include/asm/setup.h
>@@ -64,7 +64,11 @@ extern void x86_quirk_time_init(void);
> #include <asm/bootparam.h>
> 
> /* Interrupt control for vSMPowered x86_64 systems */
>+#ifdef CONFIG_X86_VSMP
> void vsmp_init(void);
>+#else
>+static inline void vsmp_init(void) { }
>+#endif
> 
> void setup_bios_corruption_check(void);
> 
>Index: linux-2.6/arch/x86/kernel/Makefile
>===================================================================
>--- linux-2.6.orig/arch/x86/kernel/Makefile
>+++ linux-2.6/arch/x86/kernel/Makefile
>@@ -70,7 +70,7 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= f
> obj-$(CONFIG_KEXEC)		+= machine_kexec_$(BITS).o
> obj-$(CONFIG_KEXEC)		+= relocate_kernel_$(BITS).o crash.o
> obj-$(CONFIG_CRASH_DUMP)	+= crash_dump_$(BITS).o
>-obj-y				+= vsmp_64.o
>+obj-$(CONFIG_X86_VSMP)		+= vsmp_64.o
> obj-$(CONFIG_KPROBES)		+= kprobes.o
> obj-$(CONFIG_MODULES)		+= module_$(BITS).o
> obj-$(CONFIG_EFI) 		+= efi.o efi_$(BITS).o efi_stub_$(BITS).o
>Index: linux-2.6/arch/x86/kernel/setup.c
>===================================================================
>--- linux-2.6.orig/arch/x86/kernel/setup.c
>+++ linux-2.6/arch/x86/kernel/setup.c
>@@ -863,9 +863,7 @@ void __init setup_arch(char **cmdline_p)
> 
> 	reserve_initrd();
> 
>-#ifdef CONFIG_X86_64
> 	vsmp_init();
>-#endif
> 
> 	io_delay_init();
> 
>Index: linux-2.6/arch/x86/kernel/vsmp_64.c
>===================================================================
>--- linux-2.6.orig/arch/x86/kernel/vsmp_64.c
>+++ linux-2.6/arch/x86/kernel/vsmp_64.c
>@@ -22,7 +22,7 @@
> #include <asm/paravirt.h>
> #include <asm/setup.h>
> 
>-#if defined CONFIG_PCI && defined CONFIG_PARAVIRT
>+#ifdef CONFIG_PARAVIRT
> /*
>  * Interrupt control on vSMPowered systems:
>  * ~AC is a shadow of IF.  If IF is 'on' AC should be 'off'
>@@ -114,7 +114,6 @@ static void __init set_vsmp_pv_ops(void)
> }
> #endif
> 
>-#ifdef CONFIG_PCI
> static int is_vsmp = -1;
> 
> static void __init detect_vsmp_box(void)
>@@ -139,15 +138,6 @@ int is_vsmp_box(void)
> 		return 0;
> 	}
> }
>-#else
>-static void __init detect_vsmp_box(void)
>-{
>-}
>-int is_vsmp_box(void)
>-{
>-	return 0;
>-}
>-#endif
> 
> void __init vsmp_init(void)
> {
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2009-02-26  6:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26  5:20 [PATCH] x86: don't compile vsmp_64 for 32bit Yinghai Lu
2009-02-26  5:40 ` Ingo Molnar
2009-02-26  6:48 ` Ravikiran G Thirumalai [this message]
2009-02-26  8:39   ` Yinghai Lu
2009-02-26 11:44   ` Ingo Molnar
2009-02-27  0:17     ` Ravikiran G Thirumalai
2009-02-28  9:44       ` Ingo Molnar
2009-03-02 23:51         ` Ravikiran G Thirumalai
2009-03-03  0:08           ` Yinghai Lu
2009-03-22 12:48           ` Ingo Molnar
2009-03-24  6:14             ` Ravikiran G Thirumalai
2009-03-24  9:10               ` Ingo Molnar
2009-03-25 18:51                 ` Ravikiran G Thirumalai
2009-03-25 22:16                   ` Jeremy Fitzhardinge
2009-03-25 22:36                     ` Ravikiran G Thirumalai
2009-03-25 23:15                       ` Jeremy Fitzhardinge
2009-03-25 23:29                         ` Ravikiran G Thirumalai
2009-03-25 23:36                           ` Thomas Gleixner
2009-03-26  0:11                             ` Ravikiran G Thirumalai
2009-03-25 23:58                           ` Jeremy Fitzhardinge
2009-03-26  0:31                             ` Ravikiran G Thirumalai
2009-03-26  9:11                               ` Ingo Molnar
2009-03-26 18:17                                 ` Ravikiran G Thirumalai
2009-03-26  7:57               ` [tip:x86/apic] Revert "x86: don't compile vsmp_64 for 32bit" Ravikiran G Thirumalai

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=20090226064806.GC27240@localdomain \
    --to=kiran@scalex86.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=shai@scalex86.org \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox