process.c (e63340ae6b6205fef26b40a75673d1c9c0c8bb90) process.c (4a177cbf84f827cf9f1d6cfa5264fafd3cc33ce0)
1/*
2 * Architecture-specific setup.
3 *
4 * Copyright (C) 1998-2003 Hewlett-Packard Co
5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 * 04/11/17 Ashok Raj <ashok.raj@intel.com> Added CPU Hotplug Support
7 *
8 * 2005-10-07 Keith Owens <kaos@sgi.com>

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

15#include <linux/kallsyms.h>
16#include <linux/kernel.h>
17#include <linux/mm.h>
18#include <linux/module.h>
19#include <linux/notifier.h>
20#include <linux/personality.h>
21#include <linux/sched.h>
22#include <linux/slab.h>
1/*
2 * Architecture-specific setup.
3 *
4 * Copyright (C) 1998-2003 Hewlett-Packard Co
5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 * 04/11/17 Ashok Raj <ashok.raj@intel.com> Added CPU Hotplug Support
7 *
8 * 2005-10-07 Keith Owens <kaos@sgi.com>

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

15#include <linux/kallsyms.h>
16#include <linux/kernel.h>
17#include <linux/mm.h>
18#include <linux/module.h>
19#include <linux/notifier.h>
20#include <linux/personality.h>
21#include <linux/sched.h>
22#include <linux/slab.h>
23#include <linux/smp_lock.h>
23#include <linux/stddef.h>
24#include <linux/thread_info.h>
25#include <linux/unistd.h>
26#include <linux/efi.h>
27#include <linux/interrupt.h>
28#include <linux/delay.h>
24#include <linux/stddef.h>
25#include <linux/thread_info.h>
26#include <linux/unistd.h>
27#include <linux/efi.h>
28#include <linux/interrupt.h>
29#include <linux/delay.h>
29#include <linux/kdebug.h>
30
31#include <asm/cpu.h>
32#include <asm/delay.h>
33#include <asm/elf.h>
34#include <asm/ia32.h>
35#include <asm/irq.h>
30
31#include <asm/cpu.h>
32#include <asm/delay.h>
33#include <asm/elf.h>
34#include <asm/ia32.h>
35#include <asm/irq.h>
36#include <asm/kdebug.h>
36#include <asm/kexec.h>
37#include <asm/pgalloc.h>
38#include <asm/processor.h>
39#include <asm/sal.h>
40#include <asm/tlbflush.h>
41#include <asm/uaccess.h>
42#include <asm/unwind.h>
43#include <asm/user.h>

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

150 printk("r%-3u:%c%016lx%s", 32 + i, is_nat ? '*' : ' ', val,
151 ((i == sof - 1) || (i % 3) == 2) ? "\n" : " ");
152 }
153 } else
154 show_stack(NULL, NULL);
155}
156
157void
37#include <asm/kexec.h>
38#include <asm/pgalloc.h>
39#include <asm/processor.h>
40#include <asm/sal.h>
41#include <asm/tlbflush.h>
42#include <asm/uaccess.h>
43#include <asm/unwind.h>
44#include <asm/user.h>

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

151 printk("r%-3u:%c%016lx%s", 32 + i, is_nat ? '*' : ' ', val,
152 ((i == sof - 1) || (i % 3) == 2) ? "\n" : " ");
153 }
154 } else
155 show_stack(NULL, NULL);
156}
157
158void
158do_notify_resume_user (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
159do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall)
159{
160 if (fsys_mode(current, &scr->pt)) {
161 /* defer signal-handling etc. until we return to privilege-level 0. */
162 if (!ia64_psr(&scr->pt)->lp)
163 ia64_psr(&scr->pt)->lp = 1;
164 return;
165 }
166
167#ifdef CONFIG_PERFMON
168 if (current->thread.pfm_needs_checking)
169 pfm_handle_work();
170#endif
171
172 /* deal with pending signal delivery */
160{
161 if (fsys_mode(current, &scr->pt)) {
162 /* defer signal-handling etc. until we return to privilege-level 0. */
163 if (!ia64_psr(&scr->pt)->lp)
164 ia64_psr(&scr->pt)->lp = 1;
165 return;
166 }
167
168#ifdef CONFIG_PERFMON
169 if (current->thread.pfm_needs_checking)
170 pfm_handle_work();
171#endif
172
173 /* deal with pending signal delivery */
173 if (test_thread_flag(TIF_SIGPENDING))
174 ia64_do_signal(oldset, scr, in_syscall);
174 if (test_thread_flag(TIF_SIGPENDING)||test_thread_flag(TIF_RESTORE_SIGMASK))
175 ia64_do_signal(scr, in_syscall);
175}
176
177static int pal_halt = 1;
178static int can_do_pal_halt = 1;
179
180static int __init nohalt_setup(char * str)
181{
182 pal_halt = can_do_pal_halt = 0;

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

231 BUG();
232}
233#endif /* CONFIG_HOTPLUG_CPU */
234
235void cpu_idle_wait(void)
236{
237 unsigned int cpu, this_cpu = get_cpu();
238 cpumask_t map;
176}
177
178static int pal_halt = 1;
179static int can_do_pal_halt = 1;
180
181static int __init nohalt_setup(char * str)
182{
183 pal_halt = can_do_pal_halt = 0;

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

232 BUG();
233}
234#endif /* CONFIG_HOTPLUG_CPU */
235
236void cpu_idle_wait(void)
237{
238 unsigned int cpu, this_cpu = get_cpu();
239 cpumask_t map;
240 cpumask_t tmp = current->cpus_allowed;
239
240 set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
241 put_cpu();
242
243 cpus_clear(map);
244 for_each_online_cpu(cpu) {
245 per_cpu(cpu_idle_state, cpu) = 1;
246 cpu_set(cpu, map);

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

252 do {
253 ssleep(1);
254 for_each_online_cpu(cpu) {
255 if (cpu_isset(cpu, map) && !per_cpu(cpu_idle_state, cpu))
256 cpu_clear(cpu, map);
257 }
258 cpus_and(map, map, cpu_online_map);
259 } while (!cpus_empty(map));
241
242 set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
243 put_cpu();
244
245 cpus_clear(map);
246 for_each_online_cpu(cpu) {
247 per_cpu(cpu_idle_state, cpu) = 1;
248 cpu_set(cpu, map);

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

254 do {
255 ssleep(1);
256 for_each_online_cpu(cpu) {
257 if (cpu_isset(cpu, map) && !per_cpu(cpu_idle_state, cpu))
258 cpu_clear(cpu, map);
259 }
260 cpus_and(map, map, cpu_online_map);
261 } while (!cpus_empty(map));
262 set_cpus_allowed(current, tmp);
260}
261EXPORT_SYMBOL_GPL(cpu_idle_wait);
262
263void __attribute__((noreturn))
264cpu_idle (void)
265{
266 void (*mark_idle)(int) = ia64_mark_idle;
267 int cpu = smp_processor_id();

--- 575 unchanged lines hidden ---
263}
264EXPORT_SYMBOL_GPL(cpu_idle_wait);
265
266void __attribute__((noreturn))
267cpu_idle (void)
268{
269 void (*mark_idle)(int) = ia64_mark_idle;
270 int cpu = smp_processor_id();

--- 575 unchanged lines hidden ---