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
28 #include <asm/pdc.h>
32 #include <asm/parisc-device.h>
44 ** PARISC CPU driver - claim "device" and initialize CPU data structures.
50 ** The callback *should* do per-instance initialization of
57 ** The code path not shared is how PDC hands control of the CPU to the OS.
62 * init_percpu_prof - enable/setup per cpu profiling hooks.
74 * processor_probe - Determine if processor driver should claim this device.
100 /* logical CPU ID and update global counter in processor_probe()
104 txn_addr = dev->hpa.start; /* for legacy PDC */ in processor_probe()
117 status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc, in processor_probe()
118 dev->mod_index, PA_VIEW, pa_pdc_cell); in processor_probe()
123 BUG_ON(dev->mod_info != pa_pdc_cell->mod_info); in processor_probe()
124 BUG_ON(dev->pmod_loc != pa_pdc_cell->mod_location); in processor_probe()
126 txn_addr = pa_pdc_cell->mod[0]; /* id_eid for IO sapic */ in processor_probe()
131 status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa.start); in processor_probe()
137 &dev->hpa.start); in processor_probe()
143 * We'll care when we need to query PAT PDC about a CPU *after* in processor_probe()
150 &dev->hpa.start, cpu_info.cpu_num, NR_CPUS); in processor_probe()
152 boot_cpu_data.cpu_count--; in processor_probe()
164 /* initialize counters - CPU 0 gets it_value set in time_init() */ in processor_probe()
168 p->dev = dev; /* Save IODC data in case we need it */ in processor_probe()
169 p->hpa = dev->hpa.start; /* save CPU hpa */ in processor_probe()
170 p->cpuid = cpuid; /* save CPU id */ in processor_probe()
171 p->txn_addr = txn_addr; /* save CPU IRQ address */ in processor_probe()
172 p->cpu_num = cpu_info.cpu_num; in processor_probe()
173 p->cpu_loc = cpu_info.cpu_loc; in processor_probe()
187 ** OS control. RENDEZVOUS is the default state - see mem_set above. in processor_probe()
188 ** p->state = STATE_RENDEZVOUS; in processor_probe()
224 * collect_boot_cpu_data - Fill the boot_cpu_data structure.
239 boot_cpu_data.cpu_hz = 100 * PAGE0->mem_10msec; /* Hz of this PARISC */ in collect_boot_cpu_data()
241 /* get CPU-Model Information... */ in collect_boot_cpu_data()
242 #define p ((unsigned long *)&boot_cpu_data.pdc.model) in collect_boot_cpu_data()
243 if (pdc_model_info(&boot_cpu_data.pdc.model) == PDC_OK) { in collect_boot_cpu_data()
248 add_device_randomness(&boot_cpu_data.pdc.model, in collect_boot_cpu_data()
249 sizeof(boot_cpu_data.pdc.model)); in collect_boot_cpu_data()
253 if (pdc_model_versions(&boot_cpu_data.pdc.versions, 0) == PDC_OK) { in collect_boot_cpu_data()
255 boot_cpu_data.pdc.versions); in collect_boot_cpu_data()
257 add_device_randomness(&boot_cpu_data.pdc.versions, in collect_boot_cpu_data()
258 sizeof(boot_cpu_data.pdc.versions)); in collect_boot_cpu_data()
261 if (pdc_model_cpuid(&boot_cpu_data.pdc.cpuid) == PDC_OK) { in collect_boot_cpu_data()
263 (boot_cpu_data.pdc.cpuid >> 5) & 127, in collect_boot_cpu_data()
264 boot_cpu_data.pdc.cpuid & 31, in collect_boot_cpu_data()
265 boot_cpu_data.pdc.cpuid); in collect_boot_cpu_data()
267 add_device_randomness(&boot_cpu_data.pdc.cpuid, in collect_boot_cpu_data()
268 sizeof(boot_cpu_data.pdc.cpuid)); in collect_boot_cpu_data()
271 if (pdc_model_capabilities(&boot_cpu_data.pdc.capabilities) == PDC_OK) in collect_boot_cpu_data()
273 boot_cpu_data.pdc.capabilities); in collect_boot_cpu_data()
275 if (pdc_model_sysmodel(OS_ID_HPUX, boot_cpu_data.pdc.sys_model_name) == PDC_OK) in collect_boot_cpu_data()
276 pr_info("HP-UX model name: %s\n", in collect_boot_cpu_data()
277 boot_cpu_data.pdc.sys_model_name); in collect_boot_cpu_data()
284 dump_stack_set_arch_desc("%s", boot_cpu_data.pdc.sys_model_name); in collect_boot_cpu_data()
286 boot_cpu_data.hversion = boot_cpu_data.pdc.model.hversion; in collect_boot_cpu_data()
287 boot_cpu_data.sversion = boot_cpu_data.pdc.model.sversion; in collect_boot_cpu_data()
310 * init_per_cpu - Handle individual processor initializations.
320 * (frowands idea - that way we know which processes need FP
350 ** and clear the T-bit. in init_per_cpu()
358 "Halting Machine - FP required\n" in init_per_cpu()
385 strscpy(cpu_name, per_cpu(cpu_data, 0).dev->name, sizeof(cpu_name)); in show_cpuinfo()
388 *(--p) = 0; in show_cpuinfo()
394 if (0 == cpuinfo->hpa) in show_cpuinfo()
398 "cpu family\t: PA-RISC %s\n", in show_cpuinfo()
417 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_OS32) in show_cpuinfo()
419 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_OS64) in show_cpuinfo()
421 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC) in show_cpuinfo()
423 switch (boot_cpu_data.pdc.capabilities & PDC_MODEL_NVA_MASK) { in show_cpuinfo()
434 seq_printf(m, " (0x%02lx)\n", boot_cpu_data.pdc.capabilities); in show_cpuinfo()
436 seq_printf(m, "model\t\t: %s - %s\n", in show_cpuinfo()
437 boot_cpu_data.pdc.sys_model_name, in show_cpuinfo()
453 boot_cpu_data.pdc.model.sw_id); in show_cpuinfo()
470 * processor_init - Processor initialization procedure.