git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://www.linux-watchdog.org/linux-watchdog
[pandora-kernel.git]
/
arch
/
powerpc
/
kernel
/
setup-common.c
diff --git
a/arch/powerpc/kernel/setup-common.c
b/arch/powerpc/kernel/setup-common.c
index
fb87e4a
..
d4d4183
100644
(file)
--- 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)
{
unsigned long cpu_id = (unsigned long)v - 1;
unsigned int pvr;
{
unsigned long cpu_id = (unsigned long)v - 1;
unsigned int pvr;
+ unsigned long proc_freq;
unsigned short maj;
unsigned short min;
unsigned short maj;
unsigned short min;
@@
-263,12
+264,19
@@
static int show_cpuinfo(struct seq_file *m, void *v)
#endif /* CONFIG_TAU */
/*
#endif /* CONFIG_TAU */
/*
- * Assume here that all clock rates are the same in a
- * smp system. -- Cort
+ * Platforms that have variable clock rates, should implement
+ * the method ppc_md.get_proc_freq() that reports the clock
+ * rate of a given cpu. The rest can use ppc_proc_freq to
+ * report the clock rate that is same across all cpus.
*/
*/
- if (ppc_proc_freq)
+ if (ppc_md.get_proc_freq)
+ proc_freq = ppc_md.get_proc_freq(cpu_id);
+ else
+ proc_freq = ppc_proc_freq;
+
+ if (proc_freq)
seq_printf(m, "clock\t\t: %lu.%06luMHz\n",
seq_printf(m, "clock\t\t: %lu.%06luMHz\n",
- p
pc_proc_freq / 1000000, ppc_
proc_freq % 1000000);
+ p
roc_freq / 1000000,
proc_freq % 1000000);
if (ppc_md.show_percpuinfo != NULL)
ppc_md.show_percpuinfo(m, cpu_id);
if (ppc_md.show_percpuinfo != NULL)
ppc_md.show_percpuinfo(m, cpu_id);
@@
-382,9
+390,10
@@
void __init check_for_initrd(void)
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
-int threads_per_core, threads_shift;
+int threads_per_core, threads_
per_subcore, threads_
shift;
cpumask_t threads_core_mask;
EXPORT_SYMBOL_GPL(threads_per_core);
cpumask_t threads_core_mask;
EXPORT_SYMBOL_GPL(threads_per_core);
+EXPORT_SYMBOL_GPL(threads_per_subcore);
EXPORT_SYMBOL_GPL(threads_shift);
EXPORT_SYMBOL_GPL(threads_core_mask);
EXPORT_SYMBOL_GPL(threads_shift);
EXPORT_SYMBOL_GPL(threads_core_mask);
@@
-393,6
+402,7
@@
static void __init cpu_init_thread_core_maps(int tpc)
int i;
threads_per_core = tpc;
int i;
threads_per_core = tpc;
+ threads_per_subcore = tpc;
cpumask_clear(&threads_core_mask);
/* This implementation only supports power of 2 number of threads
cpumask_clear(&threads_core_mask);
/* This implementation only supports power of 2 number of threads