Lines Matching +full:i +full:- +full:leak +full:- +full:current

1 // SPDX-License-Identifier: GPL-2.0
3 * Architecture-specific setup.
5 * Copyright (C) 1998-2003 Hewlett-Packard Co
6 * David Mosberger-Tang <davidm@hpl.hp.com>
9 * 2005-10-07 Keith Owens <kaos@sgi.com>
99 unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri; in show_regs()
105 regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(), in show_regs()
106 init_utsname()->release); in show_regs()
109 regs->ar_unat, regs->ar_pfs, regs->ar_rsc); in show_regs()
111 regs->ar_rnat, regs->ar_bspstore, regs->pr); in show_regs()
113 regs->loadrs, regs->ar_ccv, regs->ar_fpsr); in show_regs()
114 printk("csd : %016lx ssd : %016lx\n", regs->ar_csd, regs->ar_ssd); in show_regs()
115 printk("b0 : %016lx b6 : %016lx b7 : %016lx\n", regs->b0, regs->b6, regs->b7); in show_regs()
117 regs->f6.u.bits[1], regs->f6.u.bits[0], in show_regs()
118 regs->f7.u.bits[1], regs->f7.u.bits[0]); in show_regs()
120 regs->f8.u.bits[1], regs->f8.u.bits[0], in show_regs()
121 regs->f9.u.bits[1], regs->f9.u.bits[0]); in show_regs()
123 regs->f10.u.bits[1], regs->f10.u.bits[0], in show_regs()
124 regs->f11.u.bits[1], regs->f11.u.bits[0]); in show_regs()
126 printk("r1 : %016lx r2 : %016lx r3 : %016lx\n", regs->r1, regs->r2, regs->r3); in show_regs()
127 printk("r8 : %016lx r9 : %016lx r10 : %016lx\n", regs->r8, regs->r9, regs->r10); in show_regs()
128 printk("r11 : %016lx r12 : %016lx r13 : %016lx\n", regs->r11, regs->r12, regs->r13); in show_regs()
129 printk("r14 : %016lx r15 : %016lx r16 : %016lx\n", regs->r14, regs->r15, regs->r16); in show_regs()
130 printk("r17 : %016lx r18 : %016lx r19 : %016lx\n", regs->r17, regs->r18, regs->r19); in show_regs()
131 printk("r20 : %016lx r21 : %016lx r22 : %016lx\n", regs->r20, regs->r21, regs->r22); in show_regs()
132 printk("r23 : %016lx r24 : %016lx r25 : %016lx\n", regs->r23, regs->r24, regs->r25); in show_regs()
133 printk("r26 : %016lx r27 : %016lx r28 : %016lx\n", regs->r26, regs->r27, regs->r28); in show_regs()
134 printk("r29 : %016lx r30 : %016lx r31 : %016lx\n", regs->r29, regs->r30, regs->r31); in show_regs()
139 int i, sof, is_nat = 0; in show_regs() local
141 sof = regs->cr_ifs & 0x7f; /* size of frame */ in show_regs()
142 ndirty = (regs->loadrs >> 19); in show_regs()
143 bsp = ia64_rse_skip_regs((unsigned long *) regs->ar_bspstore, ndirty); in show_regs()
144 for (i = 0; i < sof; ++i) { in show_regs()
145 get_user(val, (unsigned long __user *) ia64_rse_skip_regs(bsp, i)); in show_regs()
146 printk("r%-3u:%c%016lx%s", 32 + i, is_nat ? '*' : ' ', val, in show_regs()
147 ((i == sof - 1) || (i % 3) == 2) ? "\n" : " "); in show_regs()
163 if (fsys_mode(current, &scr->pt)) { in do_notify_resume_user()
165 * defer signal-handling etc. until we return to in do_notify_resume_user()
166 * privilege-level 0. in do_notify_resume_user()
168 if (!ia64_psr(&scr->pt)->lp) in do_notify_resume_user()
169 ia64_psr(&scr->pt)->lp = 1; in do_notify_resume_user()
181 tracehook_notify_resume(&scr->pt); in do_notify_resume_user()
214 * The above is a point of no-return, the processor is in play_dead()
254 if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0) in ia64_save_extra()
255 ia64_save_debug_regs(&task->thread.dbr[0]); in ia64_save_extra()
261 if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0) in ia64_load_extra()
262 ia64_load_debug_regs(&task->thread.dbr[0]); in ia64_load_extra()
266 * Copy the state of an ia-64 thread.
270 * from user-level: from kernel:
279 * +---------------------+ (highest addr)
281 * +---------------------+
283 * +---------------------+
286 * | | <-- sp (lowest addr)
287 * +---------------------+
307 child_ptregs = (struct pt_regs *) ((unsigned long) p + IA64_STK_OFFSET) - 1; in copy_thread()
308 child_stack = (struct switch_stack *) child_ptregs - 1; in copy_thread()
310 rbs = (unsigned long) current + IA64_RBS_OFFSET; in copy_thread()
314 p->thread.ksp = (unsigned long) child_stack - 16; in copy_thread()
335 p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR) in copy_thread()
340 if (unlikely(p->flags & PF_KTHREAD)) { in copy_thread()
346 child_stack->r4 = user_stack_base; /* payload */ in copy_thread()
347 child_stack->r5 = user_stack_size; /* argument */ in copy_thread()
349 * Preserve PSR bits, except for bits 32-34 and 37-45, in copy_thread()
352 child_ptregs->cr_ipsr = ia64_getreg(_IA64_REG_PSR) | IA64_PSR_BN; in copy_thread()
354 child_ptregs->cr_ifs = 1UL << 63; in copy_thread()
355 child_stack->ar_fpsr = child_ptregs->ar_fpsr in copy_thread()
357 child_stack->pr = (1 << PRED_KERNEL_STACK); in copy_thread()
358 child_stack->ar_bspstore = child_rbs; in copy_thread()
359 child_stack->b0 = (unsigned long) &ia64_ret_from_clone; in copy_thread()
366 child_ptregs->cr_ipsr = ((child_ptregs->cr_ipsr | IA64_PSR_BITS_TO_SET) in copy_thread()
371 stack = ((struct switch_stack *) regs) - 1; in copy_thread()
376 rbs_size = stack->ar_bspstore - rbs; in copy_thread()
379 child_ptregs->r13 = tls; in copy_thread()
381 child_ptregs->r12 = user_stack_base + user_stack_size - 16; in copy_thread()
382 child_ptregs->ar_bspstore = user_stack_base; in copy_thread()
383 child_ptregs->ar_rnat = 0; in copy_thread()
384 child_ptregs->loadrs = 0; in copy_thread()
386 child_stack->ar_bspstore = child_rbs + rbs_size; in copy_thread()
387 child_stack->b0 = (unsigned long) &ia64_ret_from_clone; in copy_thread()
394 child_ptregs->cr_ipsr = ((child_ptregs->cr_ipsr | IA64_PSR_BITS_TO_SET) in copy_thread()
425 int i; in do_copy_task_regs() local
427 memset(dst, 0, sizeof(elf_gregset_t)); /* don't leak any kernel bits to user-level */ in do_copy_task_regs()
437 if (ia64_sync_user_rbs(task, info->sw, pt->ar_bspstore, urbs_end) < 0) in do_copy_task_regs()
440 ia64_peek(task, info->sw, urbs_end, (long) ia64_rse_rnat_addr((long *) urbs_end), in do_copy_task_regs()
445 * r0-r31 in do_copy_task_regs()
446 * NaT bits (for r0-r31; bit N == 1 iff rN is a NaT) in do_copy_task_regs()
447 * predicate registers (p0-p63) in do_copy_task_regs()
448 * b0-b7 in do_copy_task_regs()
449 * ip cfm user-mask in do_copy_task_regs()
455 for (i = 1, mask = (1UL << i); i < 32; ++i) { in do_copy_task_regs()
456 unw_get_gr(info, i, &dst[i], &nat); in do_copy_task_regs()
464 for (i = 0; i < 8; ++i) in do_copy_task_regs()
465 unw_get_br(info, i, &dst[34 + i]); in do_copy_task_regs()
468 dst[42] = ip + ia64_psr(pt)->ri; in do_copy_task_regs()
470 dst[44] = pt->cr_ipsr & IA64_PSR_UM; in do_copy_task_regs()
475 * addresses, but we need the user-level addresses instead: in do_copy_task_regs()
478 dst[47] = pt->ar_bspstore; in do_copy_task_regs()
483 dst[52] = pt->ar_pfs; /* UNW_AR_PFS is == to pt->cr_ifs for interrupt frames */ in do_copy_task_regs()
493 do_copy_task_regs(current, info, arg); in do_copy_regs()
508 /* drop floating-point and debug-register state if it exists: */ in flush_thread()
509 current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); in flush_thread()
510 ia64_drop_fpu(current); in flush_thread()
531 if (!p || p == current || p->state == TASK_RUNNING) in get_wchan()
535 * Note: p may not be a blocked task (it could be current or in get_wchan()
540 * --davidm 99/12/15 in get_wchan()
544 if (p->state == TASK_RUNNING) in get_wchan()
560 int i, min_power_state; in cpu_halt() local
567 for (i = 1; i < 8; ++i) in cpu_halt()
568 if (power_info[i].pal_power_mgmt_info_s.im in cpu_halt()
569 && power_info[i].pal_power_mgmt_info_s.power_consumption < min_power) { in cpu_halt()
570 min_power = power_info[i].pal_power_mgmt_info_s.power_consumption; in cpu_halt()
571 min_power_state = i; in cpu_halt()