Messages in this thread Patch in this message | | | Subject | [PATCH] hard_smp_processor_id definition for UP systems without APIC (i386) | From | Fernando Luis Vázquez Cao <> | Date | Fri, 02 Mar 2007 17:16:56 +0900 |
| |
Provide hard_smp_processor_id definition also for non apic case.
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> ---
diff -urNp linux-2.6.21-rc2-orig/include/asm-i386/smp.h linux-2.6.21-rc2/include/asm-i386/smp.h --- linux-2.6.21-rc2-orig/include/asm-i386/smp.h 2007-03-02 16:47:37.000000000 +0900 +++ linux-2.6.21-rc2/include/asm-i386/smp.h 2007-03-02 16:59:42.000000000 +0900 @@ -93,6 +93,7 @@ extern unsigned int num_processors; #ifndef __ASSEMBLY__ #ifdef CONFIG_X86_LOCAL_APIC + #ifdef APIC_DEFINITION extern int hard_smp_processor_id(void); #else @@ -103,6 +104,13 @@ static inline int hard_smp_processor_id( return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID)); } #endif /* APIC_DEFINITION */ + +#else /* CONFIG_X86_LOCAL_APIC */ + +#ifndef CONFIG_SMP +#define hard_smp_processor_id() 0 +#endif + #endif /* CONFIG_X86_LOCAL_APIC */ extern u8 apicid_2_node[];
- 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/
| |