Lines Matching +full:pdc +full:- +full:global
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Initial setup-routines for HP 9000 based hardware.
6 * Modifications for PA-RISC (C) 1999-2008 Helge Deller <deller@gmx.de>
12 * Initial PA-RISC Version: 04-23-1999 by Helge Deller
27 #include <asm/pdc.h>
30 #include <asm/parisc-device.h>
42 ** PARISC CPU driver - claim "device" and initialize CPU data structures.
48 ** The callback *should* do per-instance initialization of
55 ** The code path not shared is how PDC hands control of the CPU to the OS.
60 * init_cpu_profiler - enable/setup per cpu profiling hooks.
72 * processor_probe - Determine if processor driver should claim this device.
98 /* logical CPU ID and update global counter in processor_probe()
102 txn_addr = dev->hpa.start; /* for legacy PDC */ in processor_probe()
115 status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc, in processor_probe()
116 dev->mod_index, PA_VIEW, pa_pdc_cell); in processor_probe()
121 BUG_ON(dev->mod_info != pa_pdc_cell->mod_info); in processor_probe()
122 BUG_ON(dev->pmod_loc != pa_pdc_cell->mod_location); in processor_probe()
124 txn_addr = pa_pdc_cell->mod[0]; /* id_eid for IO sapic */ in processor_probe()
129 status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa.start); in processor_probe()
135 &dev->hpa.start); in processor_probe()
141 * We'll care when we need to query PAT PDC about a CPU *after* in processor_probe()
148 &dev->hpa.start, cpu_info.cpu_num, NR_CPUS); in processor_probe()
150 boot_cpu_data.cpu_count--; in processor_probe()
162 /* initialize counters - CPU 0 gets it_value set in time_init() */ in processor_probe()
166 p->dev = dev; /* Save IODC data in case we need it */ in processor_probe()
167 p->hpa = dev->hpa.start; /* save CPU hpa */ in processor_probe()
168 p->cpuid = cpuid; /* save CPU id */ in processor_probe()
169 p->txn_addr = txn_addr; /* save CPU IRQ address */ in processor_probe()
170 p->cpu_num = cpu_info.cpu_num; in processor_probe()
171 p->cpu_loc = cpu_info.cpu_loc; in processor_probe()
185 ** OS control. RENDEZVOUS is the default state - see mem_set above. in processor_probe()
186 ** p->state = STATE_RENDEZVOUS; in processor_probe()
222 * collect_boot_cpu_data - Fill the boot_cpu_data structure.
237 boot_cpu_data.cpu_hz = 100 * PAGE0->mem_10msec; /* Hz of this PARISC */ in collect_boot_cpu_data()
239 /* get CPU-Model Information... */ in collect_boot_cpu_data()
240 #define p ((unsigned long *)&boot_cpu_data.pdc.model) in collect_boot_cpu_data()
241 if (pdc_model_info(&boot_cpu_data.pdc.model) == PDC_OK) { in collect_boot_cpu_data()
246 add_device_randomness(&boot_cpu_data.pdc.model, in collect_boot_cpu_data()
247 sizeof(boot_cpu_data.pdc.model)); in collect_boot_cpu_data()
251 if (pdc_model_versions(&boot_cpu_data.pdc.versions, 0) == PDC_OK) { in collect_boot_cpu_data()
253 boot_cpu_data.pdc.versions); in collect_boot_cpu_data()
255 add_device_randomness(&boot_cpu_data.pdc.versions, in collect_boot_cpu_data()
256 sizeof(boot_cpu_data.pdc.versions)); in collect_boot_cpu_data()
259 if (pdc_model_cpuid(&boot_cpu_data.pdc.cpuid) == PDC_OK) { in collect_boot_cpu_data()
261 (boot_cpu_data.pdc.cpuid >> 5) & 127, in collect_boot_cpu_data()
262 boot_cpu_data.pdc.cpuid & 31, in collect_boot_cpu_data()
263 boot_cpu_data.pdc.cpuid); in collect_boot_cpu_data()
265 add_device_randomness(&boot_cpu_data.pdc.cpuid, in collect_boot_cpu_data()
266 sizeof(boot_cpu_data.pdc.cpuid)); in collect_boot_cpu_data()
269 if (pdc_model_capabilities(&boot_cpu_data.pdc.capabilities) == PDC_OK) in collect_boot_cpu_data()
271 boot_cpu_data.pdc.capabilities); in collect_boot_cpu_data()
273 if (pdc_model_sysmodel(boot_cpu_data.pdc.sys_model_name) == PDC_OK) in collect_boot_cpu_data()
275 boot_cpu_data.pdc.sys_model_name); in collect_boot_cpu_data()
277 dump_stack_set_arch_desc("%s", boot_cpu_data.pdc.sys_model_name); in collect_boot_cpu_data()
279 boot_cpu_data.hversion = boot_cpu_data.pdc.model.hversion; in collect_boot_cpu_data()
280 boot_cpu_data.sversion = boot_cpu_data.pdc.model.sversion; in collect_boot_cpu_data()
303 * init_per_cpu - Handle individual processor initializations.
313 * (frowands idea - that way we know which processes need FP
345 ** and clear the T-bit. in init_per_cpu()
353 "Halting Machine - FP required\n" in init_per_cpu()
379 if (0 == cpuinfo->hpa) in show_cpuinfo()
383 "cpu family\t: PA-RISC %s\n", in show_cpuinfo()
402 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_OS32) in show_cpuinfo()
404 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_OS64) in show_cpuinfo()
406 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC) in show_cpuinfo()
408 switch (boot_cpu_data.pdc.capabilities & PDC_MODEL_NVA_MASK) { in show_cpuinfo()
419 seq_printf(m, " (0x%02lx)\n", boot_cpu_data.pdc.capabilities); in show_cpuinfo()
423 boot_cpu_data.pdc.sys_model_name, in show_cpuinfo()
424 cpuinfo->dev ? in show_cpuinfo()
425 cpuinfo->dev->name : "Unknown"); in show_cpuinfo()
440 boot_cpu_data.pdc.model.sw_id); in show_cpuinfo()
457 * processor_init - Processor initialization procedure.