Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88804
b: refs/heads/master
c: cbe879f
h: refs/heads/master
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Apr 17, 2008
1 parent 91689d0 commit f4ad8ca
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e1efc0cde2a266fc31932ea7aed4bb20f524544
refs/heads/master: cbe879fc6c77b5751a91167654b75a39421d0f3f
6 changes: 6 additions & 0 deletions trunk/arch/x86/kernel/smpboot_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ void *x86_cpu_to_apicid_early_ptr;
DEFINE_PER_CPU(u16, x86_cpu_to_apicid) = BAD_APICID;
EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);

u16 x86_bios_cpu_apicid_init[NR_CPUS] __initdata
= { [0 ... NR_CPUS-1] = BAD_APICID };
void *x86_bios_cpu_apicid_early_ptr;
DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid);

u8 apicid_2_node[MAX_APICID];

static void map_cpu_to_logical_apicid(void);
Expand Down
7 changes: 2 additions & 5 deletions trunk/include/asm-x86/mach-bigsmp/mach_apic.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#ifndef __ASM_MACH_APIC_H
#define __ASM_MACH_APIC_H


extern u8 bios_cpu_apicid[];

#define xapic_phys_to_log_apicid(cpu) (bios_cpu_apicid[cpu])
#define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu))
#define esr_disable (1)

static inline int apic_id_registered(void)
Expand Down Expand Up @@ -90,7 +87,7 @@ static inline int apicid_to_node(int logical_apicid)
static inline int cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < NR_CPUS)
return (int) bios_cpu_apicid[mps_cpu];
return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu);

return BAD_APICID;
}
Expand Down
8 changes: 3 additions & 5 deletions trunk/include/asm-x86/mach-es7000/mach_apic.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#ifndef __ASM_MACH_APIC_H
#define __ASM_MACH_APIC_H

extern u8 bios_cpu_apicid[];

#define xapic_phys_to_log_apicid(cpu) (bios_cpu_apicid[cpu])
#define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu)
#define esr_disable (1)

static inline int apic_id_registered(void)
Expand Down Expand Up @@ -80,7 +78,7 @@ extern void enable_apic_mode(void);
extern int apic_version [MAX_APICS];
static inline void setup_apic_routing(void)
{
int apic = bios_cpu_apicid[smp_processor_id()];
int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
(apic_version[apic] == 0x14) ?
"Physical Cluster" : "Logical Cluster", nr_ioapics, cpus_addr(TARGET_CPUS)[0]);
Expand All @@ -102,7 +100,7 @@ static inline int cpu_present_to_apicid(int mps_cpu)
if (!mps_cpu)
return boot_cpu_physical_apicid;
else if (mps_cpu < NR_CPUS)
return (int) bios_cpu_apicid[mps_cpu];
return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu);
else
return BAD_APICID;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/asm-x86/mach-summit/mach_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ static inline unsigned long check_apicid_present(int bit)

#define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK)

extern u8 bios_cpu_apicid[];
extern u8 cpu_2_logical_apicid[];

static inline void init_apic_ldr(void)
Expand Down Expand Up @@ -110,7 +109,7 @@ static inline int cpu_to_logical_apicid(int cpu)
static inline int cpu_present_to_apicid(int mps_cpu)
{
if (mps_cpu < NR_CPUS)
return (int)bios_cpu_apicid[mps_cpu];
return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
else
return BAD_APICID;
}
Expand Down

0 comments on commit f4ad8ca

Please sign in to comment.