parisc: Add CPU topology support
Add topology support, including multi-core scheduler support on PA8800/PA8900 CPUs and enhanced output in /proc/cpuinfo, e.g. lscpu now reports on a single-socket, dual-core machine: Architecture: parisc64 CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 CPU family: PA-RISC 2.0 Model name: PA8800 (Mako) Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
@@ -184,6 +184,9 @@ static int __init processor_probe(struct parisc_device *dev)
|
||||
p->txn_addr = txn_addr; /* save CPU IRQ address */
|
||||
p->cpu_num = cpu_info.cpu_num;
|
||||
p->cpu_loc = cpu_info.cpu_loc;
|
||||
|
||||
store_cpu_topology(cpuid);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
** FIXME: review if any other initialization is clobbered
|
||||
@@ -325,6 +328,8 @@ int __init init_per_cpu(int cpunum)
|
||||
set_firmware_width();
|
||||
ret = pdc_coproc_cfg(&coproc_cfg);
|
||||
|
||||
store_cpu_topology(cpunum);
|
||||
|
||||
if(ret >= 0 && coproc_cfg.ccr_functional) {
|
||||
mtctl(coproc_cfg.ccr_functional, 10); /* 10 == Coprocessor Control Reg */
|
||||
|
||||
@@ -388,6 +393,14 @@ show_cpuinfo (struct seq_file *m, void *v)
|
||||
boot_cpu_data.cpu_hz / 1000000,
|
||||
boot_cpu_data.cpu_hz % 1000000 );
|
||||
|
||||
#ifdef CONFIG_PARISC_CPU_TOPOLOGY
|
||||
seq_printf(m, "physical id\t: %d\n",
|
||||
topology_physical_package_id(cpu));
|
||||
seq_printf(m, "siblings\t: %d\n",
|
||||
cpumask_weight(topology_core_cpumask(cpu)));
|
||||
seq_printf(m, "core id\t\t: %d\n", topology_core_id(cpu));
|
||||
#endif
|
||||
|
||||
seq_printf(m, "capabilities\t:");
|
||||
if (boot_cpu_data.pdc.capabilities & PDC_MODEL_OS32)
|
||||
seq_puts(m, " os32");
|
||||
|
Reference in New Issue
Block a user