You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] i386: move phys_proc_id and cpu_core_id to cpuinfo_x86
Move the phys_core_id and cpu_core_id to cpuinfo_x86 structure. Similar patch for x86_64 is already accepted by Andi earlier this week. [akpm@osdl.org: fix warning] Signed-off-by: Rohit Seth <rohitseth@google.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
7f35bf929f
commit
4b89aff930
@@ -71,8 +71,12 @@ struct cpuinfo_x86 {
|
||||
cpumask_t llc_shared_map; /* cpus sharing the last level cache */
|
||||
#endif
|
||||
unsigned char x86_max_cores; /* cpuid returned max cores value */
|
||||
unsigned char booted_cores; /* number of cores as seen by OS */
|
||||
unsigned char apicid;
|
||||
#ifdef CONFIG_SMP
|
||||
unsigned char booted_cores; /* number of cores as seen by OS */
|
||||
__u8 phys_proc_id; /* Physical processor id. */
|
||||
__u8 cpu_core_id; /* Core id */
|
||||
#endif
|
||||
} __attribute__((__aligned__(SMP_CACHE_BYTES)));
|
||||
|
||||
#define X86_VENDOR_INTEL 0
|
||||
@@ -104,8 +108,6 @@ extern struct cpuinfo_x86 cpu_data[];
|
||||
#define current_cpu_data boot_cpu_data
|
||||
#endif
|
||||
|
||||
extern int phys_proc_id[NR_CPUS];
|
||||
extern int cpu_core_id[NR_CPUS];
|
||||
extern int cpu_llc_id[NR_CPUS];
|
||||
extern char ignore_fpu_irq;
|
||||
|
||||
|
||||
@@ -28,10 +28,8 @@
|
||||
#define _ASM_I386_TOPOLOGY_H
|
||||
|
||||
#ifdef CONFIG_X86_HT
|
||||
#define topology_physical_package_id(cpu) \
|
||||
(phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu])
|
||||
#define topology_core_id(cpu) \
|
||||
(cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu])
|
||||
#define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id)
|
||||
#define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id)
|
||||
#define topology_core_siblings(cpu) (cpu_core_map[cpu])
|
||||
#define topology_thread_siblings(cpu) (cpu_sibling_map[cpu])
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user