[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:
Rohit Seth
2006-06-27 02:53:46 -07:00
committed by Linus Torvalds
parent 7f35bf929f
commit 4b89aff930
6 changed files with 24 additions and 31 deletions

View File

@ -235,10 +235,10 @@ static void __init init_amd(struct cpuinfo_x86 *c)
while ((1 << bits) < c->x86_max_cores)
bits++;
}
cpu_core_id[cpu] = phys_proc_id[cpu] & ((1<<bits)-1);
phys_proc_id[cpu] >>= bits;
c->cpu_core_id = c->phys_proc_id & ((1<<bits)-1);
c->phys_proc_id >>= bits;
printk(KERN_INFO "CPU %d(%d) -> Core %d\n",
cpu, c->x86_max_cores, cpu_core_id[cpu]);
cpu, c->x86_max_cores, c->cpu_core_id);
}
#endif