process.c (1f1c153e406a7375ae0fc3d6000b64e7ba27cf8a) process.c (98903688e6106d9ca68e44c7d218e61336d54631)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * PARISC Architecture-dependent parts of process handling
4 * based on the work for i386
5 *
6 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
7 * Copyright (C) 2000 Martin K Petersen <mkp at mkp.net>
8 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>

--- 24 unchanged lines hidden (view full) ---

33#include <linux/slab.h>
34#include <linux/stddef.h>
35#include <linux/unistd.h>
36#include <linux/kallsyms.h>
37#include <linux/uaccess.h>
38#include <linux/rcupdate.h>
39#include <linux/random.h>
40#include <linux/nmi.h>
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * PARISC Architecture-dependent parts of process handling
4 * based on the work for i386
5 *
6 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
7 * Copyright (C) 2000 Martin K Petersen <mkp at mkp.net>
8 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>

--- 24 unchanged lines hidden (view full) ---

33#include <linux/slab.h>
34#include <linux/stddef.h>
35#include <linux/unistd.h>
36#include <linux/kallsyms.h>
37#include <linux/uaccess.h>
38#include <linux/rcupdate.h>
39#include <linux/random.h>
40#include <linux/nmi.h>
41#include <linux/sched/hotplug.h>
41
42#include <asm/io.h>
43#include <asm/asm-offsets.h>
44#include <asm/assembly.h>
45#include <asm/pdc.h>
46#include <asm/pdc_chassis.h>
47#include <asm/unwind.h>
48#include <asm/sections.h>
42
43#include <asm/io.h>
44#include <asm/asm-offsets.h>
45#include <asm/assembly.h>
46#include <asm/pdc.h>
47#include <asm/pdc_chassis.h>
48#include <asm/unwind.h>
49#include <asm/sections.h>
50#include <asm/cacheflush.h>
49
50#define COMMAND_GLOBAL F_EXTEND(0xfffe0030)
51#define CMD_RESET 5 /* reset any module */
52
53/*
54** The Wright Brothers and Gecko systems have a H/W problem
55** (Lasi...'nuf said) may cause a broadcast reset to lockup
56** the system. An HVERSION dependent PDC call was developed

--- 96 unchanged lines hidden (view full) ---

153 *
154 * Detect when running on QEMU with SeaBIOS PDC Firmware and let
155 * QEMU idle the host too.
156 */
157
158int running_on_qemu __ro_after_init;
159EXPORT_SYMBOL(running_on_qemu);
160
51
52#define COMMAND_GLOBAL F_EXTEND(0xfffe0030)
53#define CMD_RESET 5 /* reset any module */
54
55/*
56** The Wright Brothers and Gecko systems have a H/W problem
57** (Lasi...'nuf said) may cause a broadcast reset to lockup
58** the system. An HVERSION dependent PDC call was developed

--- 96 unchanged lines hidden (view full) ---

155 *
156 * Detect when running on QEMU with SeaBIOS PDC Firmware and let
157 * QEMU idle the host too.
158 */
159
160int running_on_qemu __ro_after_init;
161EXPORT_SYMBOL(running_on_qemu);
162
161void __cpuidle arch_cpu_idle_dead(void)
163/*
164 * Called from the idle thread for the CPU which has been shutdown.
165 */
166void arch_cpu_idle_dead(void)
162{
167{
163 /* nop on real hardware, qemu will offline CPU. */
164 asm volatile("or %%r31,%%r31,%%r31\n":::);
168#ifdef CONFIG_HOTPLUG_CPU
169 idle_task_exit();
170
171 local_irq_disable();
172
173 /* Tell __cpu_die() that this CPU is now safe to dispose of. */
174 (void)cpu_report_death();
175
176 /* Ensure that the cache lines are written out. */
177 flush_cache_all_local();
178 flush_tlb_all_local(NULL);
179
180 /* Let PDC firmware put CPU into firmware idle loop. */
181 __pdc_cpu_rendezvous();
182
183 pr_warn("PDC does not provide rendezvous function.\n");
184#endif
185 while (1);
165}
166
167void __cpuidle arch_cpu_idle(void)
168{
169 raw_local_irq_enable();
170
171 /* nop on real hardware, qemu will idle sleep. */
172 asm volatile("or %%r10,%%r10,%%r10\n":::);

--- 106 unchanged lines hidden ---
186}
187
188void __cpuidle arch_cpu_idle(void)
189{
190 raw_local_irq_enable();
191
192 /* nop on real hardware, qemu will idle sleep. */
193 asm volatile("or %%r10,%%r10,%%r10\n":::);

--- 106 unchanged lines hidden ---