Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/s390/kernel/crash_dump.c
static const char *nt_name(Elf64_Word type) { const char *name = "LINUX"; if (type == NT_PRPSINFO || type == NT_PRSTATUS || type == NT_PRFPREG) name = KEXEC_CORE_NOTE_NAME; return name; }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/crash_dump.c
static void *nt_init_name(void *buf, Elf64_Word type, void *desc, int d_len, const char *name) { Elf64_Nhdr *note; u64 len; note = (Elf64_Nhdr *)buf; note->n_namesz = strlen(name) + 1; note->n_descsz = d_len; note->n_type = type; len = sizeof(Elf64_Nhdr); memcpy(buf + len, na...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/crash_dump.c
static void *fill_cpu_elf_notes(void *ptr, int cpu, struct save_area *sa) { struct elf_prstatus nt_prstatus; elf_fpregset_t nt_fpregset; memset(&nt_prstatus, 0, sizeof(nt_prstatus)); memcpy(&nt_prstatus.pr_reg.gprs, sa->gprs, sizeof(sa->gprs)); memcpy(&nt_prstatus.pr_reg.psw, sa->psw, sizeof(sa->psw)); mem...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/crash_dump.c
static void *nt_vmcoreinfo(void *ptr) { const char *name = VMCOREINFO_NOTE_NAME; unsigned long size; void *vmcoreinfo; vmcoreinfo = os_info_old_entry(OS_INFO_VMCOREINFO, &size); if (vmcoreinfo) return nt_init_name(ptr, 0, vmcoreinfo, size, name); vmcoreinfo = get_vmcoreinfo_old(&size); if (!vmcorein...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/crash_dump.c
int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size) { Elf64_Phdr *phdr_notes, *phdr_loads; int mem_chunk_cnt; void *ptr, *hdr; u32 alloc_size; u64 hdr_off; if (!oldmem_data.start && !is_ipl_type_dump()) return 0; /* If we cannot get HSA size for zfcp/nvme dump return error */ i...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/crash_dump.c
void elfcorehdr_free(unsigned long long addr) { kfree((void *)(unsigned long)addr); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/crash_dump.c
ssize_t elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos) { void *src = (void *)(unsigned long)*ppos; memcpy(buf, src, count); *ppos += count; return count; }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static debug_info_t *debug_info_alloc(const char *name, int pages_per_area, int nr_areas, int buf_size, int level, int mode) { debug_info_t *rc; rc = kmalloc(sizeof(debug_info_t), GFP_KERNEL); if (!rc) goto fail_malloc_rc; rc->acti...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static debug_info_t *debug_info_create(const char *name, int pages_per_area, int nr_areas, int buf_size, umode_t mode) { debug_info_t *rc; rc = debug_info_alloc(name, pages_per_area, nr_areas, buf_size, DEBUG_DEFA...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static debug_info_t *debug_info_copy(debug_info_t *in, int mode) { unsigned long flags; debug_info_t *rc; int i, j; do { rc = debug_info_alloc(in->name, in->pages_per_area, in->nr_areas, in->buf_size, in->level, mode); spin_lock_irqsave(&in->lock, flags); if (!rc) go...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
debug_info_t *debug_register_mode(const char *name, int pages_per_area, int nr_areas, int buf_size, umode_t mode, uid_t uid, gid_t gid) { debug_info_t *rc = NULL; /* we do not allow gid/uid != 0 until we get support for that. */ if ((uid != 0) |...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
void debug_set_level(debug_info_t *id, int new_level) { unsigned long flags; if (!id) return; if (new_level == DEBUG_OFF_LEVEL) { pr_info("%s: switched off\n", id->name); } else if ((new_level > DEBUG_MAX_LEVEL) || (new_level < 0)) { pr_info("%s: level %i is out of range (%i - %i)\n", id->name, ne...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static inline void proceed_active_area(debug_info_t *id) { id->active_area++; id->active_area = id->active_area % id->nr_areas; }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static void debug_events_append(debug_info_t *dest, debug_info_t *src) { debug_entry_t *from, *to, *last; if (!src->areas || !dest->areas) return; from = get_active_entry(src); last = from; do { if (from->clock != 0LL) { to = get_active_entry(dest); memset(to, 0, dest->entry_size); ...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static int s390dbf_procactive(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { if (!write || debug_stoppable || !debug_active) return proc_dointvec(table, write, buffer, lenp, ppos); else return 0; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
void debug_stop_all(void) { if (debug_stoppable) debug_active = 0; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
debug_entry_t *debug_exception_common(debug_info_t *id, int level, const void *buf, int len) { debug_entry_t *active; unsigned long flags; if (!debug_active || !id->areas) return NULL; if (debug_critical) { if (!spin_trylock_irqsave(&id->lock, flags)) return ...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
debug_entry_t *__debug_sprintf_exception(debug_info_t *id, int level, char *string, ...) { debug_sprintf_entry_t *curr_event; debug_entry_t *active; unsigned long flags; int numargs, idx; va_list ap; if (!debug_active || !id->areas) return NULL; numargs = deb...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
int debug_register_view(debug_info_t *id, struct debug_view *view) { unsigned long flags; struct dentry *pde; umode_t mode; int rc = 0; int i; if (!id) goto out; mode = (id->mode | S_IFREG) & ~S_IXUGO; if (!(view->prolog_proc || view->format_proc || view->header_proc)) mode &= ~(S_IRUSR | S_IRG...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
int debug_unregister_view(debug_info_t *id, struct debug_view *view) { struct dentry *dentry = NULL; unsigned long flags; int i, rc = 0; if (!id) goto out; spin_lock_irqsave(&id->lock, flags); for (i = 0; i < DEBUG_MAX_VIEWS; i++) { if (id->views[i] == view) break; } if (i == DEBUG_MAX_VI...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static inline char *debug_get_user_string(const char __user *user_buf, size_t user_len) { char *buffer; buffer = kmalloc(user_len + 1, GFP_KERNEL); if (!buffer) return ERR_PTR(-ENOMEM); if (copy_from_user(buffer, user_buf, user_len) != 0) { kfree(buffer); r...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static void debug_flush(debug_info_t *id, int area) { unsigned long flags; int i, j; if (!id || !id->areas) return; spin_lock_irqsave(&id->lock, flags); if (area == DEBUG_FLUSH_ALL) { id->active_area = 0; memset(id->active_entries, 0, id->nr_areas * sizeof(int)); for (i = 0; i < id->nr_areas;...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/debug.c
static int debug_sprintf_format_fn(debug_info_t *id, struct debug_view *view, char *out_buf, const char *inbuf) { debug_sprintf_entry_t *curr_event = (debug_sprintf_entry_t *)inbuf; int num_longs, num_used_args = 0, i, rc = 0; int index[DEBUG_SPRINTF_MAX_ARGS]; num_longs = id...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/diag.c
static inline int __diag204(unsigned long *subcode, unsigned long size, void *addr) { union register_pair rp = {.even = *subcode, .odd = size}; asm volatile(" diag %[addr],%[rp],0x204\n" "0: nopr %%r7\n" EX_TABLE(0b, 0b) : [rp] "+&d"(rp.pair) ...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/dis.c
static unsigned int extract_operand(unsigned char *code, const struct s390_operand *operand) { unsigned char *cp; unsigned int val; int bits; cp = code + operand->shift / 8; bits = (operand->shift & 7) + operand->bits; val = 0; do { val <<= 8; val |= (unsigned ...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/dis.c
struct s390_insn *find_insn(unsigned char *code) { struct s390_opcode_offset *entry; struct s390_insn *insn; unsigned char opfrag; int i; for (i = 0; i < ARRAY_SIZE(opcode_offset); i++) { entry = &opcode_offset[i]; if (entry->opcode == code[0]) break; } opfrag = *(code + entry->byte) & ent...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/dumpstack.c
static inline bool in_stack(unsigned long sp, struct stack_info *info, enum stack_type type, unsigned long low, unsigned long high) { if (sp < low || sp >= high) return false; info->type = type; info->begin = low; info->end = high; return true; }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/dumpstack.c
int get_stack_info(unsigned long sp, struct task_struct *task, struct stack_info *info, unsigned long *visit_mask) { if (!sp) goto unknown; if (sp & 0x7) goto unknown; /* Check per-task stack */ if (in_task_stack(sp, task, info)) goto recursion_check; if (task != current) ...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/dumpstack.c
void show_registers(struct pt_regs *regs) { struct psw_bits *psw = &psw_bits(regs->psw); char *mode; mode = user_mode(regs) ? "User" : "Krnl"; printk("%s PSW : %px %px", mode, (void *)regs->psw.mask, (void *)regs->psw.addr); if (!user_mode(regs)) pr_cont(" (%pSR)", (void *)regs->psw.addr); pr...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/early.c
static void __init reset_tod_clock(void) { union tod_clock clk; if (store_tod_clock_ext_cc(&clk) == 0) return; if (set_tod_clock(TOD_UNIX_EPOCH) || store_tod_clock_ext_cc(&clk)) disabled_wait(); memset(&tod_clock_base, 0, sizeof(tod_clock_base)); tod_clock_base.tod = TOD_UNIX_EPOCH; S390_lowcore....
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/early.c
static noinline __init void detect_machine_type(void) { struct sysinfo_3_2_2 *vmms = (struct sysinfo_3_2_2 *)&sysinfo_page; if (stsi(NULL, 0, 0, 0) <= 2) { S390_lowcore.machine_flags |= MACHINE_FLAG_LPAR; return; } /* Get virtual-machine cpu information. */ if (stsi(vmms, 3, 2, 2) || !vmms->count) ...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/early.c
static inline void strim_all(char *str) { char *s; s = strim(str); if (s != str) memmove(str, s, strlen(s)); while (*str) { if (!isspace(*str++)) continue; if (isspace(*str)) { s = skip_spaces(str); memmove(str, s, strlen(s) + 1); } } }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/early.c
static inline void save_vector_registers(void) { #ifdef CONFIG_CRASH_DUMP if (test_facility(129)) save_vx_regs(boot_cpu_vector_save_area); #endif }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/early.c
static inline void setup_access_registers(void) { unsigned int acrs[NUM_ACRS] = {0}; restore_access_regs(acrs); }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/early.c
static void __init sort_amode31_extable(void) { sort_extable(__start_amode31_ex_table, __stop_amode31_ex_table); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/early.c
void __init startup_init(void) { sclp_early_adjust_va(); reset_tod_clock(); check_image_bootable(); time_early_init(); init_kernel_storage_key(); lockdep_off(); sort_amode31_extable(); setup_lowcore_early(); setup_facility_list(); detect_machine_type(); setup_arch_string(); setup_boot_command_l...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ftrace.c
static const char *ftrace_shared_hotpatch_trampoline(const char **end) { const char *tstart, *tend; tstart = ftrace_shared_hotpatch_trampoline_br; tend = ftrace_shared_hotpatch_trampoline_br_end; #ifdef CONFIG_EXPOLINE if (!nospec_disable) { tstart = ftrace_shared_hotpatch_trampoline_exrl; tend = ftrac...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ftrace.c
int ftrace_init_nop(struct module *mod, struct dyn_ftrace *rec) { static struct ftrace_hotpatch_trampoline *next_vmlinux_trampoline = __ftrace_hotpatch_trampolines_start; static const char orig[6] = {0xc0, 0x04, 0x00, 0x00, 0x00, 0x00}; static struct ftrace_hotpatch_trampoline *trampoline; struct ftrace_h...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ftrace.c
static struct ftrace_hotpatch_trampoline * ftrace_get_trampoline(struct dyn_ftrace *rec) { struct ftrace_hotpatch_trampoline *trampoline; struct ftrace_insn insn; s64 disp; u16 opc; if (copy_from_kernel_nofault(&insn, (void *)rec->ip, sizeof(insn))) return ERR_PTR(-EFAULT); disp = (s64)insn.disp * 2; ...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ftrace.c
int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec, unsigned long addr) { return ftrace_patch_branch_mask((void *)rec->ip, 0xc0f4, false); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ftrace.c
int ftrace_update_ftrace_func(ftrace_func_t func) { ftrace_func = func; return 0; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ftrace.c
static int __init ftrace_plt_init(void) { const char *start, *end; ftrace_plt = module_alloc(PAGE_SIZE); if (!ftrace_plt) panic("cannot allocate ftrace plt\n"); start = ftrace_shared_hotpatch_trampoline(&end); memcpy(ftrace_plt, start, end - start); set_memory_ro((unsigned long)ftrace_plt, 1); retu...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ftrace.c
int arch_prepare_kprobe_ftrace(struct kprobe *p) { p->ainsn.insn = NULL; return 0; } #endif
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/guarded_storage.c
void guarded_storage_release(struct task_struct *tsk) { kfree(tsk->thread.gs_cb); kfree(tsk->thread.gs_bc_cb); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t ipl_secure_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return sprintf(page, "%i\n", !!ipl_secure_flag); }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t ipl_vm_parm_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { char parm[DIAG308_VMPARM_SIZE + 1] = {}; if (ipl_block_valid && (ipl_block.pb0_hdr.pbt == IPL_PBT_CCW)) ipl_block_get_ascii_vmparm(parm, sizeof(parm), &ipl_block); return sprintf(...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { char loadparm[LOADPARM_LEN + 1] = {}; if (!sclp_ipl_info.is_valid) return sprintf(page, "#unknown#\n"); memcpy(loadparm, &sclp_ipl_info.loadparm, LOADPARM_LEN); EBCASC...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static void __ipl_run(void *unused) { __bpon(); diag308(DIAG308_LOAD_CLEAR, NULL); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_generic_vmparm_show(struct ipl_parameter_block *ipb, char *page) { char vmparm[DIAG308_VMPARM_SIZE + 1] = {}; ipl_block_get_ascii_vmparm(vmparm, sizeof(vmparm), ipb); return sprintf(page, "%s\n", vmparm); }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_generic_vmparm_store(struct ipl_parameter_block *ipb, size_t vmparm_max, const char *buf, size_t len) { int i, ip_len; ip_len = len; if ((len > 0) && (buf[len - 1] == '\n')) ip_len--; if (ip_len > vmpa...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_ccw_vmparm_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return reipl_generic_vmparm_show(reipl_block_ccw, page); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_generic_loadparm_store(struct ipl_parameter_block *ipb, const char *buf, size_t len) { int i, lp_len; lp_len = len; if ((len > 0) && (buf[len - 1] == '\n')) lp_len--; /* loadparm can have max 8 characters and must not start with a blank */ ...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_nvme_scpdata_write(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) { size_t scpdata_len = count; size_t padding; if (off) return -EINVAL; memcpy(r...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_nvme_loadparm_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return reipl_generic_loadparm_show(reipl_block_nvme, page); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_nvme_loadparm_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t len) { return reipl_generic_loadparm_store(reipl_block_nvme, buf, len); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_eckd_scpdata_read(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) { size_t size = reipl_block_eckd->eckd.scp_data_len; void *scp_data = reipl_block_eckd->eckd....
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_eckd_clear_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return sprintf(page, "%u\n", reipl_eckd_clear); }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t reipl_eckd_clear_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t len) { if (strtobool(buf, &reipl_eckd_clear) < 0) return -EINVAL; return len; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
void set_os_info_reipl_block(void) { os_info_entry_add(OS_INFO_REIPL_BLOCK, reipl_block_actual, reipl_block_actual->hdr.len); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static void reipl_run(struct shutdown_trigger *trigger) { smp_call_ipl_cpu(__reipl_run, NULL); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static void reipl_block_ccw_fill_parms(struct ipl_parameter_block *ipb) { /* check if read scp info worked and set loadparm */ if (sclp_ipl_info.is_valid) memcpy(ipb->ccw.loadparm, &sclp_ipl_info.loadparm, LOADPARM_LEN); else /* read scp info failed: set empty loadparm (EBCDIC blanks) */ memset(ipb->...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static int __init reipl_ccw_init(void) { int rc; reipl_block_ccw = (void *)get_zeroed_page(GFP_KERNEL); if (!reipl_block_ccw) return -ENOMEM; rc = sysfs_create_group(&reipl_kset->kobj, MACHINE_IS_VM ? &reipl_ccw_attr_group_vm ...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static int dump_set_type(enum dump_type type) { if (!(dump_capabilities & type)) return -EINVAL; dump_type = type; return 0; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static void diag308_dump(void *dump_block) { diag308(DIAG308_SET, dump_block); while (1) { if (diag308(DIAG308_LOAD_NORMAL_DUMP, NULL) != 0x302) break; udelay(USEC_PER_SEC); } }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static void dump_run(struct shutdown_trigger *trigger) { if (dump_type == DUMP_TYPE_NONE) return; smp_send_stop(); smp_call_ipl_cpu(__dump_run, NULL); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static int __init dump_fcp_init(void) { int rc; if (!sclp_ipl_info.has_dump) return 0; dump_block_fcp = (void *)get_zeroed_page(GFP_KERNEL); if (!dump_block_fcp) return -ENOMEM; rc = sysfs_create_group(&dump_kset->kobj, &dump_fcp_attr_group); if (rc) { free_page((unsigned long)dump_block_fcp); ...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static void dump_reipl_run(struct shutdown_trigger *trigger) { unsigned long ipib = (unsigned long)reipl_block_actual; struct lowcore *abs_lc; unsigned long flags; unsigned int csum; csum = (__force unsigned int)csum_partial(reipl_block_actual, reipl_block_actual-...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t on_reboot_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return sprintf(page, "%s\n", on_reboot_trigger.action->name); }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t on_reboot_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t len) { return set_trigger(buf, &on_reboot_trigger, len); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t on_panic_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return sprintf(page, "%s\n", on_panic_trigger.action->name); }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t on_restart_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return sprintf(page, "%s\n", on_restart_trigger.action->name); }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static ssize_t on_halt_show(struct kobject *kobj, struct kobj_attribute *attr, char *page) { return sprintf(page, "%s\n", on_halt_trigger.action->name); }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
static void __init strncpy_skip_quote(char *dst, char *src, int n) { int sx, dx; dx = 0; for (sx = 0; src[sx] != 0; sx++) { if (src[sx] == '"') continue; dst[dx++] = src[sx]; if (dx >= n) break; } }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
int ipl_report_add_component(struct ipl_report *report, struct kexec_buf *kbuf, unsigned char flags, unsigned short cert) { struct ipl_report_component *comp; comp = vzalloc(sizeof(*comp)); if (!comp) return -ENOMEM; list_add_tail(&comp->list, &report->components); comp->en...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/ipl.c
void *ipl_report_finish(struct ipl_report *report) { struct ipl_report_certificate *cert; struct ipl_report_component *comp; struct ipl_rb_certificates *certs; struct ipl_parameter_block *ipib; struct ipl_rb_components *comps; struct ipl_rl_hdr *rl_hdr; void *buf, *ptr; buf = vzalloc(report->size); ...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/irq.c
static int on_async_stack(void) { unsigned long frame = current_frame_address(); return ((S390_lowcore.async_stack ^ frame) & ~(THREAD_SIZE - 1)) == 0; }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/irq.c
static int irq_pending(struct pt_regs *regs) { int cc; asm volatile("tpi 0\n" "ipm %0" : "=d"(cc) : : "cc"); return cc >> 28; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/irq.c
void noinstr do_ext_irq(struct pt_regs *regs) { irqentry_state_t state = irqentry_enter(regs); struct pt_regs *old_regs = set_irq_regs(regs); int from_idle; irq_enter_rcu(); if (user_mode(regs)) { update_timer_sys(); if (static_branch_likely(&cpu_has_bear)) current->thread.last_break = regs->...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/irq.c
unsigned int arch_dynirq_lower_bound(unsigned int from) { return from < NR_IRQS_BASE ? NR_IRQS_BASE : from; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/irq.c
static irqreturn_t do_ext_interrupt(int irq, void *dummy) { struct pt_regs *regs = get_irq_regs(); struct ext_code ext_code; struct ext_int_info *p; int index; ext_code.int_code = regs->int_code; if (ext_code.code != EXT_IRQ_CLK_COMP) set_cpu_flag(CIF_NOHZ_DELAY); index = ext_hash(ext_code.code); ...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/irq.c
static void __init init_ext_interrupts(void) { int idx; for (idx = 0; idx < ARRAY_SIZE(ext_int_hash); idx++) INIT_HLIST_HEAD(&ext_int_hash[idx]); irq_set_chip_and_handler(EXT_INTERRUPT, &dummy_irq_chip, handle_percpu_irq); if (request_irq(EXT_INTERRUPT, do_ext_interrupt, 0, "EXT", NULL)) panic("Faile...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/irq.c
void __init init_IRQ(void) { BUILD_BUG_ON(ARRAY_SIZE(irqclass_sub_desc) != NR_ARCH_IRQS); init_cio_interrupts(); init_airq_interrupts(); init_ext_interrupts(); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/irq.c
void irq_subclass_unregister(enum irq_subclass subclass) { spin_lock(&irq_subclass_lock); irq_subclass_refcount[subclass]--; if (!irq_subclass_refcount[subclass]) ctl_clear_bit(0, subclass); spin_unlock(&irq_subclass_lock); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kdebugfs.c
static int __init arch_kdebugfs_init(void) { arch_debugfs_dir = debugfs_create_dir("s390", NULL); return 0; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kexec_elf.c
static int s390_elf_probe(const char *buf, unsigned long len) { const Elf_Ehdr *ehdr; if (len < sizeof(Elf_Ehdr)) return -ENOEXEC; ehdr = (Elf_Ehdr *)buf; if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) return -ENOEXEC; return 0; }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/kexec_image.c
static int kexec_file_add_kernel_image(struct kimage *image, struct s390_load_data *data) { struct kexec_buf buf; buf.image = image; buf.buffer = image->kernel_buf; buf.bufsz = image->kernel_buf_len; buf.mem = 0; if (image->type == KEXEC_TYPE_CRASH) buf.mem += ...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static void free_s390_insn_page(void *page) { xchg(&insn_page_in_use, 0); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static int s390_get_insn_slot(struct kprobe *p) { p->ainsn.insn = NULL; if (is_kernel((unsigned long)p->addr)) p->ainsn.insn = get_s390_insn_slot(); else if (is_module_addr(p->addr)) p->ainsn.insn = get_insn_slot(); return p->ainsn.insn ? 0 : -ENOMEM; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static void s390_free_insn_slot(struct kprobe *p) { if (!p->ainsn.insn) return; if (is_kernel((unsigned long)p->addr)) free_s390_insn_slot(p->ainsn.insn, 0); else free_insn_slot(p->ainsn.insn, 0); p->ainsn.insn = NULL; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static bool can_probe(unsigned long paddr) { unsigned long addr, offset = 0; kprobe_opcode_t insn; struct kprobe *kp; if (paddr & 0x01) return false; if (!kallsyms_lookup_size_offset(paddr, NULL, &offset)) return false; addr = paddr - offset; while (addr < paddr) { if (copy_from_kernel_nofa...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static int swap_instruction(void *data) { struct swap_insn_args *args = data; struct kprobe *p = args->p; u16 opc; opc = args->arm_kprobe ? BREAKPOINT_INSTRUCTION : p->opcode; s390_kernel_write(p->addr, &opc, sizeof(opc)); return 0; }
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
void arch_arm_kprobe(struct kprobe *p) { struct swap_insn_args args = {.p = p, .arm_kprobe = 1}; stop_machine_cpuslocked(swap_instruction, &args, NULL); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static void disable_singlestep(struct kprobe_ctlblk *kcb, struct pt_regs *regs, unsigned long ip) { __ctl_load(kcb->kprobe_saved_ctl, 9, 11); regs->psw.mask &= ~PSW_MASK_PER; regs->psw.mask |= kcb->kprobe_saved_imask; regs->psw.addr = ip; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static void push_kprobe(struct kprobe_ctlblk *kcb, struct kprobe *p) { kcb->prev_kprobe.kp = __this_cpu_read(current_kprobe); kcb->prev_kprobe.status = kcb->kprobe_status; __this_cpu_write(current_kprobe, p); }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static void pop_kprobe(struct kprobe_ctlblk *kcb) { __this_cpu_write(current_kprobe, kcb->prev_kprobe.kp); kcb->kprobe_status = kcb->prev_kprobe.status; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
static int kprobe_trap_handler(struct pt_regs *regs, int trapnr) { struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); struct kprobe *p = kprobe_running(); switch (kcb->kprobe_status) { case KPROBE_HIT_SS: case KPROBE_REENTER: disable_singlestep(kcb, regs, (unsigned long)p->addr); pop_kprobe(kcb); ...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/kprobes.c
int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *data) { struct die_args *args = (struct die_args *)data; struct pt_regs *regs = args->regs; int ret = NOTIFY_DONE; if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT)) local_irq_disable(); switc...
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/lgr.c
static void lgr_info_get(struct lgr_info *lgr_info) { int level; memset(lgr_info, 0, sizeof(*lgr_info)); stfle(lgr_info->stfle_fac_list, ARRAY_SIZE(lgr_info->stfle_fac_list)); level = stsi(NULL, 0, 0, 0); lgr_info->level = level; if (level >= 1) lgr_stsi_1_1_1(lgr_info); if (level >= 2) lgr_stsi_...
[ 1, 0 ]
Linux Kernel
arch/s390/kernel/machine_kexec.c
static unsigned long do_start_kdump(unsigned long addr) { struct kimage *image = (struct kimage *)addr; int (*start_kdump)(int) = (void *)image->start; int rc; __arch_local_irq_stnsm(0xfb); rc = start_kdump(0); __arch_local_irq_stosm(0x04); /* enable DAT */ return rc; }
[ 0, 0 ]
Linux Kernel
arch/s390/kernel/machine_kexec.c
void arch_kexec_protect_crashkres(void) { crash_protect_pages(1); }
[ 0, 0 ]