processor.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) | processor.c (53f01bba49938f115237fe43a261c31ac13ae5c6) |
---|---|
1/* $Id: processor.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $ 2 * 3 * Initial setup-routines for HP 9000 based hardware. 4 * 5 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 6 * Modifications for PA-RISC (C) 1999 Helge Deller <deller@gmx.de> 7 * Modifications copyright 1999 SuSE GmbH (Philipp Rumpf) 8 * Modifications copyright 2000 Martin K. Petersen <mkp@mkp.net> --- 78 unchanged lines hidden (view full) --- 87 return 1; 88 } 89#endif 90 91 /* logical CPU ID and update global counter 92 * May get overwritten by PAT code. 93 */ 94 cpuid = boot_cpu_data.cpu_count; | 1/* $Id: processor.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $ 2 * 3 * Initial setup-routines for HP 9000 based hardware. 4 * 5 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 6 * Modifications for PA-RISC (C) 1999 Helge Deller <deller@gmx.de> 7 * Modifications copyright 1999 SuSE GmbH (Philipp Rumpf) 8 * Modifications copyright 2000 Martin K. Petersen <mkp@mkp.net> --- 78 unchanged lines hidden (view full) --- 87 return 1; 88 } 89#endif 90 91 /* logical CPU ID and update global counter 92 * May get overwritten by PAT code. 93 */ 94 cpuid = boot_cpu_data.cpu_count; |
95 txn_addr = dev->hpa; /* for legacy PDC */ | 95 txn_addr = dev->hpa.start; /* for legacy PDC */ |
96 97#ifdef __LP64__ 98 if (is_pdc_pat()) { 99 ulong status; 100 unsigned long bytecnt; 101 pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; 102#undef USE_PAT_CPUID 103#ifdef USE_PAT_CPUID --- 13 unchanged lines hidden (view full) --- 117 118#ifdef USE_PAT_CPUID 119/* We need contiguous numbers for cpuid. Firmware's notion 120 * of cpuid is for physical CPUs and we just don't care yet. 121 * We'll care when we need to query PAT PDC about a CPU *after* 122 * boot time (ie shutdown a CPU from an OS perspective). 123 */ 124 /* get the cpu number */ | 96 97#ifdef __LP64__ 98 if (is_pdc_pat()) { 99 ulong status; 100 unsigned long bytecnt; 101 pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; 102#undef USE_PAT_CPUID 103#ifdef USE_PAT_CPUID --- 13 unchanged lines hidden (view full) --- 117 118#ifdef USE_PAT_CPUID 119/* We need contiguous numbers for cpuid. Firmware's notion 120 * of cpuid is for physical CPUs and we just don't care yet. 121 * We'll care when we need to query PAT PDC about a CPU *after* 122 * boot time (ie shutdown a CPU from an OS perspective). 123 */ 124 /* get the cpu number */ |
125 status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa); | 125 status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa.start); |
126 127 BUG_ON(PDC_OK != status); 128 129 if (cpu_info.cpu_num >= NR_CPUS) { 130 printk(KERN_WARNING "IGNORING CPU at 0x%x," 131 " cpu_slot_id > NR_CPUS" 132 " (%ld > %d)\n", | 126 127 BUG_ON(PDC_OK != status); 128 129 if (cpu_info.cpu_num >= NR_CPUS) { 130 printk(KERN_WARNING "IGNORING CPU at 0x%x," 131 " cpu_slot_id > NR_CPUS" 132 " (%ld > %d)\n", |
133 dev->hpa, cpu_info.cpu_num, NR_CPUS); | 133 dev->hpa.start, cpu_info.cpu_num, NR_CPUS); |
134 /* Ignore CPU since it will only crash */ 135 boot_cpu_data.cpu_count--; 136 return 1; 137 } else { 138 cpuid = cpu_info.cpu_num; 139 } 140#endif 141 } 142#endif 143 144 p = &cpu_data[cpuid]; 145 boot_cpu_data.cpu_count++; 146 147 /* initialize counters */ 148 memset(p, 0, sizeof(struct cpuinfo_parisc)); 149 150 p->loops_per_jiffy = loops_per_jiffy; 151 p->dev = dev; /* Save IODC data in case we need it */ | 134 /* Ignore CPU since it will only crash */ 135 boot_cpu_data.cpu_count--; 136 return 1; 137 } else { 138 cpuid = cpu_info.cpu_num; 139 } 140#endif 141 } 142#endif 143 144 p = &cpu_data[cpuid]; 145 boot_cpu_data.cpu_count++; 146 147 /* initialize counters */ 148 memset(p, 0, sizeof(struct cpuinfo_parisc)); 149 150 p->loops_per_jiffy = loops_per_jiffy; 151 p->dev = dev; /* Save IODC data in case we need it */ |
152 p->hpa = dev->hpa; /* save CPU hpa */ | 152 p->hpa = dev->hpa.start; /* save CPU hpa */ |
153 p->cpuid = cpuid; /* save CPU id */ 154 p->txn_addr = txn_addr; /* save CPU IRQ address */ 155#ifdef CONFIG_SMP 156 spin_lock_init(&p->lock); 157 158 /* 159 ** FIXME: review if any other initialization is clobbered 160 ** for boot_cpu by the above memset(). --- 240 unchanged lines hidden --- | 153 p->cpuid = cpuid; /* save CPU id */ 154 p->txn_addr = txn_addr; /* save CPU IRQ address */ 155#ifdef CONFIG_SMP 156 spin_lock_init(&p->lock); 157 158 /* 159 ** FIXME: review if any other initialization is clobbered 160 ** for boot_cpu by the above memset(). --- 240 unchanged lines hidden --- |