Messages in this thread | | | Subject | Re: [PATCH for review] [3/145] i386: Allow to use GENERICARCH for UP kernels | From | Dave Hansen <> | Date | Thu, 10 Aug 2006 12:47:31 -0700 |
| |
On Thu, 2006-08-10 at 21:35 +0200, Andi Kleen wrote: > --- linux.orig/include/asm-i386/mach-summit/mach_apic.h > +++ linux/include/asm-i386/mach-summit/mach_apic.h > @@ -46,10 +46,12 @@ extern u8 cpu_2_logical_apicid[]; > static inline void init_apic_ldr(void) > { > unsigned long val, id; > - int i, count; > - u8 lid; > + int count = 0; > u8 my_id = (u8)hard_smp_processor_id(); > u8 my_cluster = (u8)apicid_cluster(my_id); > +#ifdef CONFIG_SMP > + u8 lid; > + int i; > > /* Create logical APIC IDs by counting CPUs already in cluster. */ > for (count = 0, i = NR_CPUS; --i >= 0; ) { > @@ -57,6 +59,7 @@ static inline void init_apic_ldr(void) > if (lid != BAD_APICID && apicid_cluster(lid) == my_cluster) > ++count; > } > +#endif
Why does this particular loop have to go? I'm sure it's OK, but I also wonder if there is a nice way to do it without the #ifdef.
-- Dave
- 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/
| |