[parisc-linux-cvs] fix hardware-database reference
Helge Deller
deller@gmx.de
Tue, 28 Aug 2001 10:12:02 +0200
- don't reference the hardware database
- use __init and __initdata where possible,
Index: setup.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/setup.c,v
retrieving revision 1.88
diff -u -r1.88 setup.c
--- setup.c 2001/08/16 20:57:18 1.88
+++ setup.c 2001/08/28 08:06:27
@@ -70,7 +70,7 @@
struct system_cpuinfo_parisc boot_cpu_data;
struct cpuinfo_parisc cpu_data[NR_CPUS];
-static long fallback_cpu_hpa[] = { 0xfffa0000L, 0xfffbe000L, 0x0 };
+static long fallback_cpu_hpa[] __initdata = { 0xfffa0000L, 0xfffbe000L, 0x0 };
/* This has to go somewhere in architecture specific code. */
@@ -101,7 +101,7 @@
}
-static int
+static int __init
cpu_driver_callback(struct parisc_device *dev)
{
unsigned long txn_addr;
@@ -247,15 +247,11 @@
printk(KERN_INFO "model\t%s\n",
boot_cpu_data.pdc.sys_model_name);
- boot_cpu_data.model_name = parisc_getHWdescription(HPHW_NPROC,
- boot_cpu_data.pdc.model.hversion>>4,
- boot_cpu_data.pdc.model.sversion>>8);
-
boot_cpu_data.hversion = boot_cpu_data.pdc.model.hversion;
boot_cpu_data.sversion = boot_cpu_data.pdc.model.sversion;
boot_cpu_data.cpu_type =
- parisc_get_cpu_type(boot_cpu_data.pdc.model.hversion);
+ parisc_get_cpu_type(boot_cpu_data.hversion);
boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0];
boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1];
@@ -271,7 +267,7 @@
** NEWS FLASH: wide kernels need FP coprocessor enabled to handle
** formatted printing of %lx for example (double divides I think)
*/
-int
+static int __init
init_per_cpu(int cpuid)
{
int ret;
@@ -433,8 +429,8 @@
int get_cpuinfo(char *buffer)
{
- char *p = buffer;
- int n;
+ char *p = buffer;
+ int n;
for(n=0; n<boot_cpu_data.cpu_count; n++) {
#ifdef CONFIG_SMP
@@ -446,7 +442,7 @@
#endif
p += sprintf(p, "processor\t: %d\n"
"cpu family\t: PA-RISC %s\n",
- n, boot_cpu_data.family_name);
+ n, boot_cpu_data.family_name);
p += sprintf(p, "cpu\t\t: %s\n", boot_cpu_data.cpu_name );
@@ -457,13 +453,14 @@
p += sprintf(p, "model\t\t: %s\n"
"model name\t: %s\n",
- boot_cpu_data.pdc.sys_model_name,
- boot_cpu_data.model_name);
+ boot_cpu_data.pdc.sys_model_name,
+ cpu_data[n].dev ?
+ cpu_data[n].dev->name : "Unknown" );
p += sprintf(p, "hversion\t: 0x%08x\n"
"sversion\t: 0x%08x\n",
- boot_cpu_data.hversion,
- boot_cpu_data.sversion );
+ boot_cpu_data.hversion,
+ boot_cpu_data.sversion );
p += get_cache_info(p);
/* print cachesize info ? */