[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1239728095.3357.55.camel@mulgrave.int.hansenpartnership.com>
Date: Tue, 14 Apr 2009 16:54:55 +0000
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Cyrill Gorcunov <gorcunov@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...ux.intel.com>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 01/14] [VOYAGER] x86: add {safe,hard}_smp_processor_id
to smp_ops
[sent to correct cc list this time]
On Tue, 2009-04-14 at 20:31 +0400, Cyrill Gorcunov wrote:
> [James Bottomley - Tue, Apr 14, 2009 at 10:51:27AM -0500]
> | Not having apics, Voyager can't use the default apic implementation of
> | these, it has to read from a special port in the VIC to get the
> | processor ID, so abstract these functions in smp_ops to allow voyager
> | to live simultaneously with the apic code.
> |
> Hi James, wouldn't it break summit32 platform?
> This snippet from summit_32.c
>
> static void summit_init_apic_ldr(void)
> {
> unsigned long val, id;
> int count = 0;
> ---> u8 my_id = (u8)hard_smp_processor_id();
> u8 my_cluster = APIC_CLUSTER(my_id);
>
> if we have CONFIG_SMP _not_ set smp_ops.hard_smp_processor_id
> would be plain NULL deref (or linker warning)? I could be missing something...
I think so, yes, thanks!
Apparently it missed out on the coversion to read_apic_id().
This should fix it up, I'll fold it into the 01 patch
James
---
diff --git a/arch/x86/kernel/apic/summit_32.c b/arch/x86/kernel/apic/summit_32.c
index 9cfe1f4..6e1c7ed 100644
--- a/arch/x86/kernel/apic/summit_32.c
+++ b/arch/x86/kernel/apic/summit_32.c
@@ -206,7 +206,7 @@ static void summit_init_apic_ldr(void)
{
unsigned long val, id;
int count = 0;
- u8 my_id = (u8)hard_smp_processor_id();
+ u8 my_id = (u8)read_apic_id();
u8 my_cluster = APIC_CLUSTER(my_id);
#ifdef CONFIG_SMP
u8 lid;
@@ -333,7 +333,7 @@ static unsigned int summit_cpu_mask_to_apicid_and(const struct cpumask *inmask,
*/
static int summit_phys_pkg_id(int cpuid_apic, int index_msb)
{
- return hard_smp_processor_id() >> index_msb;
+ return read_apic_id() >> index_msb;
}
static int probe_summit(void)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists