
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

The CPU frequency in /proc/cpuinfo would overflow because of a signed/unsigned
bug.  This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/ppc/kernel/setup.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -puN arch/ppc/kernel/setup.c~ppc32-fix-overflow-in-cpuinfo-freq-display arch/ppc/kernel/setup.c
--- 25/arch/ppc/kernel/setup.c~ppc32-fix-overflow-in-cpuinfo-freq-display	2005-03-14 20:27:50.000000000 -0800
+++ 25-akpm/arch/ppc/kernel/setup.c	2005-03-14 20:27:50.000000000 -0800
@@ -338,14 +338,15 @@ int __openfirmware
 of_show_percpuinfo(struct seq_file *m, int i)
 {
 	struct device_node *cpu_node;
-	int *fp, s;
+	u32 *fp;
+	int s;
 	
 	cpu_node = find_type_devices("cpu");
 	if (!cpu_node)
 		return 0;
 	for (s = 0; s < i && cpu_node->next; s++)
 		cpu_node = cpu_node->next;
-	fp = (int *) get_property(cpu_node, "clock-frequency", NULL);
+	fp = (u32 *)get_property(cpu_node, "clock-frequency", NULL);
 	if (fp)
 		seq_printf(m, "clock\t\t: %dMHz\n", *fp / 1000000);
 	return 0;
_
