aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup-common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-10 21:54:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-10 21:54:22 -0400
commitc5aec4c76af1a2d89ee2f2d4d5463b2ad2d85de5 (patch)
tree628ae2d9370a6739fd98d8d2f055b46c87ab9316 /arch/powerpc/kernel/setup-common.c
parent2937f5efa5754754daf46de745f67350f7f06ec2 (diff)
parent0c0a3e5a100bbc4aaedd140e82b429227a76701b (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc updates from Ben Herrenschmidt: "Here is the bulk of the powerpc changes for this merge window. It got a bit delayed in part because I wasn't paying attention, and in part because I discovered I had a core PCI change without a PCI maintainer ack in it. Bjorn eventually agreed it was ok to merge it though we'll probably improve it later and I didn't want to rebase to add his ack. There is going to be a bit more next week, essentially fixes that I still want to sort through and test. The biggest item this time is the support to build the ppc64 LE kernel with our new v2 ABI. We previously supported v2 userspace but the kernel itself was a tougher nut to crack. This is now sorted mostly thanks to Anton and Rusty. We also have a fairly big series from Cedric that add support for 64-bit LE zImage boot wrapper. This was made harder by the fact that traditionally our zImage wrapper was always 32-bit, but our new LE toolchains don't really support 32-bit anymore (it's somewhat there but not really "supported") so we didn't want to rely on it. This meant more churn that just endian fixes. This brings some more LE bits as well, such as the ability to run in LE mode without a hypervisor (ie. under OPAL firmware) by doing the right OPAL call to reinitialize the CPU to take HV interrupts in the right mode and the usual pile of endian fixes. There's another series from Gavin adding EEH improvements (one day we *will* have a release with less than 20 EEH patches, I promise!). Another highlight is the support for the "Split core" functionality on P8 by Michael. This allows a P8 core to be split into "sub cores" of 4 threads which allows the subcores to run different guests under KVM (the HW still doesn't support a partition per thread). And then the usual misc bits and fixes ..." [ Further delayed by gmail deciding that BenH is a dirty spammer. Google knows. ] * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (155 commits) powerpc/powernv: Add missing include to LPC code selftests/powerpc: Test the THP bug we fixed in the previous commit powerpc/mm: Check paca psize is up to date for huge mappings powerpc/powernv: Pass buffer size to OPAL validate flash call powerpc/pseries: hcall functions are exported to modules, need _GLOBAL_TOC() powerpc: Exported functions __clear_user and copy_page use r2 so need _GLOBAL_TOC() powerpc/powernv: Set memory_block_size_bytes to 256MB powerpc: Allow ppc_md platform hook to override memory_block_size_bytes powerpc/powernv: Fix endian issues in memory error handling code powerpc/eeh: Skip eeh sysfs when eeh is disabled powerpc: 64bit sendfile is capped at 2GB powerpc/powernv: Provide debugfs access to the LPC bus via OPAL powerpc/serial: Use saner flags when creating legacy ports powerpc: Add cpu family documentation powerpc/xmon: Fix up xmon format strings powerpc/powernv: Add calls to support little endian host powerpc: Document sysfs DSCR interface powerpc: Fix regression of per-CPU DSCR setting powerpc: Split __SYSFS_SPRSETUP macro arch: powerpc/fadump: Cleaning up inconsistent NULL checks ...
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r--arch/powerpc/kernel/setup-common.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 79b7612ac6fa..aa0f5edd8570 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -212,6 +212,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
212{ 212{
213 unsigned long cpu_id = (unsigned long)v - 1; 213 unsigned long cpu_id = (unsigned long)v - 1;
214 unsigned int pvr; 214 unsigned int pvr;
215 unsigned long proc_freq;
215 unsigned short maj; 216 unsigned short maj;
216 unsigned short min; 217 unsigned short min;
217 218
@@ -263,12 +264,19 @@ static int show_cpuinfo(struct seq_file *m, void *v)
263#endif /* CONFIG_TAU */ 264#endif /* CONFIG_TAU */
264 265
265 /* 266 /*
266 * Assume here that all clock rates are the same in a 267 * Platforms that have variable clock rates, should implement
267 * smp system. -- Cort 268 * the method ppc_md.get_proc_freq() that reports the clock
269 * rate of a given cpu. The rest can use ppc_proc_freq to
270 * report the clock rate that is same across all cpus.
268 */ 271 */
269 if (ppc_proc_freq) 272 if (ppc_md.get_proc_freq)
273 proc_freq = ppc_md.get_proc_freq(cpu_id);
274 else
275 proc_freq = ppc_proc_freq;
276
277 if (proc_freq)
270 seq_printf(m, "clock\t\t: %lu.%06luMHz\n", 278 seq_printf(m, "clock\t\t: %lu.%06luMHz\n",
271 ppc_proc_freq / 1000000, ppc_proc_freq % 1000000); 279 proc_freq / 1000000, proc_freq % 1000000);
272 280
273 if (ppc_md.show_percpuinfo != NULL) 281 if (ppc_md.show_percpuinfo != NULL)
274 ppc_md.show_percpuinfo(m, cpu_id); 282 ppc_md.show_percpuinfo(m, cpu_id);
@@ -382,9 +390,10 @@ void __init check_for_initrd(void)
382 390
383#ifdef CONFIG_SMP 391#ifdef CONFIG_SMP
384 392
385int threads_per_core, threads_shift; 393int threads_per_core, threads_per_subcore, threads_shift;
386cpumask_t threads_core_mask; 394cpumask_t threads_core_mask;
387EXPORT_SYMBOL_GPL(threads_per_core); 395EXPORT_SYMBOL_GPL(threads_per_core);
396EXPORT_SYMBOL_GPL(threads_per_subcore);
388EXPORT_SYMBOL_GPL(threads_shift); 397EXPORT_SYMBOL_GPL(threads_shift);
389EXPORT_SYMBOL_GPL(threads_core_mask); 398EXPORT_SYMBOL_GPL(threads_core_mask);
390 399
@@ -393,6 +402,7 @@ static void __init cpu_init_thread_core_maps(int tpc)
393 int i; 402 int i;
394 403
395 threads_per_core = tpc; 404 threads_per_core = tpc;
405 threads_per_subcore = tpc;
396 cpumask_clear(&threads_core_mask); 406 cpumask_clear(&threads_core_mask);
397 407
398 /* This implementation only supports power of 2 number of threads 408 /* This implementation only supports power of 2 number of threads