diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 22:49:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 22:49:10 -0400 |
commit | 181f977d134a9f8e3f8839f42af655b045fc059e (patch) | |
tree | 5d9bb67c62ef1476c18ed350106a84c02f0dd8e4 /arch/x86/include/asm/apic.h | |
parent | d5d42399bd7b66bd6b55363b311810504110c967 (diff) | |
parent | 25542c646afbf14c43fa7d2b443055cadb73b07a (diff) |
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (93 commits)
x86, tlb, UV: Do small micro-optimization for native_flush_tlb_others()
x86-64, NUMA: Don't call numa_set_distanc() for all possible node combinations during emulation
x86-64, NUMA: Don't assume phys node 0 is always online in numa_emulation()
x86-64, NUMA: Clean up initmem_init()
x86-64, NUMA: Fix numa_emulation code with node0 without RAM
x86-64, NUMA: Revert NUMA affine page table allocation
x86: Work around old gas bug
x86-64, NUMA: Better explain numa_distance handling
x86-64, NUMA: Fix distance table handling
mm: Move early_node_map[] reverse scan helpers under HAVE_MEMBLOCK
x86-64, NUMA: Fix size of numa_distance array
x86: Rename e820_table_* to pgt_buf_*
bootmem: Move __alloc_memory_core_early() to nobootmem.c
bootmem: Move contig_page_data definition to bootmem.c/nobootmem.c
bootmem: Separate out CONFIG_NO_BOOTMEM code into nobootmem.c
x86-64, NUMA: Seperate out numa_alloc_distance() from numa_set_distance()
x86-64, NUMA: Add proper function comments to global functions
x86-64, NUMA: Move NUMA emulation into numa_emulation.c
x86-64, NUMA: Prepare numa_emulation() for moving NUMA emulation into a separate file
x86-64, NUMA: Do not scan two times for setup_node_bootmem()
...
Fix up conflicts in arch/x86/kernel/smpboot.c
Diffstat (limited to 'arch/x86/include/asm/apic.h')
-rw-r--r-- | arch/x86/include/asm/apic.h | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 3c896946f4cc..b8a3484d69e9 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -307,8 +307,6 @@ struct apic { | |||
307 | 307 | ||
308 | void (*setup_apic_routing)(void); | 308 | void (*setup_apic_routing)(void); |
309 | int (*multi_timer_check)(int apic, int irq); | 309 | int (*multi_timer_check)(int apic, int irq); |
310 | int (*apicid_to_node)(int logical_apicid); | ||
311 | int (*cpu_to_logical_apicid)(int cpu); | ||
312 | int (*cpu_present_to_apicid)(int mps_cpu); | 310 | int (*cpu_present_to_apicid)(int mps_cpu); |
313 | void (*apicid_to_cpu_present)(int phys_apicid, physid_mask_t *retmap); | 311 | void (*apicid_to_cpu_present)(int phys_apicid, physid_mask_t *retmap); |
314 | void (*setup_portio_remap)(void); | 312 | void (*setup_portio_remap)(void); |
@@ -356,6 +354,23 @@ struct apic { | |||
356 | void (*icr_write)(u32 low, u32 high); | 354 | void (*icr_write)(u32 low, u32 high); |
357 | void (*wait_icr_idle)(void); | 355 | void (*wait_icr_idle)(void); |
358 | u32 (*safe_wait_icr_idle)(void); | 356 | u32 (*safe_wait_icr_idle)(void); |
357 | |||
358 | #ifdef CONFIG_X86_32 | ||
359 | /* | ||
360 | * Called very early during boot from get_smp_config(). It should | ||
361 | * return the logical apicid. x86_[bios]_cpu_to_apicid is | ||
362 | * initialized before this function is called. | ||
363 | * | ||
364 | * If logical apicid can't be determined that early, the function | ||
365 | * may return BAD_APICID. Logical apicid will be configured after | ||
366 | * init_apic_ldr() while bringing up CPUs. Note that NUMA affinity | ||
367 | * won't be applied properly during early boot in this case. | ||
368 | */ | ||
369 | int (*x86_32_early_logical_apicid)(int cpu); | ||
370 | |||
371 | /* determine CPU -> NUMA node mapping */ | ||
372 | int (*x86_32_numa_cpu_node)(int cpu); | ||
373 | #endif | ||
359 | }; | 374 | }; |
360 | 375 | ||
361 | /* | 376 | /* |
@@ -503,6 +518,11 @@ extern struct apic apic_noop; | |||
503 | 518 | ||
504 | extern struct apic apic_default; | 519 | extern struct apic apic_default; |
505 | 520 | ||
521 | static inline int noop_x86_32_early_logical_apicid(int cpu) | ||
522 | { | ||
523 | return BAD_APICID; | ||
524 | } | ||
525 | |||
506 | /* | 526 | /* |
507 | * Set up the logical destination ID. | 527 | * Set up the logical destination ID. |
508 | * | 528 | * |
@@ -522,7 +542,7 @@ static inline int default_phys_pkg_id(int cpuid_apic, int index_msb) | |||
522 | return cpuid_apic >> index_msb; | 542 | return cpuid_apic >> index_msb; |
523 | } | 543 | } |
524 | 544 | ||
525 | extern int default_apicid_to_node(int logical_apicid); | 545 | extern int default_x86_32_numa_cpu_node(int cpu); |
526 | 546 | ||
527 | #endif | 547 | #endif |
528 | 548 | ||
@@ -558,12 +578,6 @@ static inline void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_ma | |||
558 | *retmap = *phys_map; | 578 | *retmap = *phys_map; |
559 | } | 579 | } |
560 | 580 | ||
561 | /* Mapping from cpu number to logical apicid */ | ||
562 | static inline int default_cpu_to_logical_apicid(int cpu) | ||
563 | { | ||
564 | return 1 << cpu; | ||
565 | } | ||
566 | |||
567 | static inline int __default_cpu_present_to_apicid(int mps_cpu) | 581 | static inline int __default_cpu_present_to_apicid(int mps_cpu) |
568 | { | 582 | { |
569 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) | 583 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) |
@@ -596,8 +610,4 @@ extern int default_check_phys_apicid_present(int phys_apicid); | |||
596 | 610 | ||
597 | #endif /* CONFIG_X86_LOCAL_APIC */ | 611 | #endif /* CONFIG_X86_LOCAL_APIC */ |
598 | 612 | ||
599 | #ifdef CONFIG_X86_32 | ||
600 | extern u8 cpu_2_logical_apicid[NR_CPUS]; | ||
601 | #endif | ||
602 | |||
603 | #endif /* _ASM_X86_APIC_H */ | 613 | #endif /* _ASM_X86_APIC_H */ |