Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99832
b: refs/heads/master
c: b6df1b8
h: refs/heads/master
v: v3
  • Loading branch information
Jack Steiner authored and Ingo Molnar committed Jul 8, 2008
1 parent 762ca6e commit f79e663
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 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: d400524affeb84bdfc2b00cd561fbfb8c09dadd7
refs/heads/master: b6df1b8bc1250191cfee15627697111c1cbda53f
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ int __init APIC_init_uniprocessor(void)
#ifdef CONFIG_CRASH_DUMP
boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
#endif
phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid);
physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);

setup_local_APIC();

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ int __init APIC_init_uniprocessor(void)

verify_local_APIC();

phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid);
physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);
apic_write(APIC_ID, SET_APIC_ID(boot_cpu_physical_apicid));

setup_local_APIC();
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,10 +1091,9 @@ static __init void disable_smp(void)
smpboot_clear_io_apic_irqs();
#endif
if (smp_found_config)
phys_cpu_present_map =
physid_mask_of_physid(boot_cpu_physical_apicid);
physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);
else
phys_cpu_present_map = physid_mask_of_physid(0);
physid_set_mask_of_physid(0, &phys_cpu_present_map);
map_cpu_to_logical_apicid();
cpu_set(0, per_cpu(cpu_sibling_map, 0));
cpu_set(0, per_cpu(cpu_core_map, 0));
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/asm-x86/mpspec.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,20 @@ typedef struct physid_mask physid_mask_t;
__physid_mask; \
})

/* Note: will create very large stack frames if physid_mask_t is big */
#define physid_mask_of_physid(physid) \
({ \
physid_mask_t __physid_mask = PHYSID_MASK_NONE; \
physid_set(physid, __physid_mask); \
__physid_mask; \
})

static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map)
{
physids_clear(*map);
physid_set(physid, *map);
}

#define PHYSID_MASK_ALL { {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} }
#define PHYSID_MASK_NONE { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} }

Expand Down

0 comments on commit f79e663

Please sign in to comment.