Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/s390/kernel/machine_kexec.c |
void arch_kexec_unprotect_crashkres(void) { crash_protect_pages(0); }
#endif | [
0,
0
] |
Linux Kernel | arch/s390/kernel/machine_kexec.c | static void __do_machine_kexec(void *data) {
unsigned long diag308_subcode;
relocate_kernel_t data_mover;
struct kimage *image = data;
s390_reset_system();
data_mover = (relocate_kernel_t)page_to_phys(image->control_code_page);
__arch_local_irq_stnsm(0xfb);
/* Call the moving routine */
diag308_subcod... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/machine_kexec.c | void machine_kexec(struct kimage *image) {
if (image->type == KEXEC_TYPE_CRASH && !kdump_csum_valid(image))
return;
tracer_disable();
smp_send_stop();
smp_call_ipl_cpu(__machine_kexec, image);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/machine_kexec_file.c | int s390_verify_sig(const char *kernel, unsigned long kernel_len) {
const unsigned long marker_len = sizeof(MODULE_SIG_STRING) - 1;
struct module_signature *ms;
unsigned long sig_len;
int ret;
if (!ipl_secure_flag)
return 0;
if (marker_len > kernel_len)
return -EKEYREJECTED;
if (memcmp(kernel +... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/module.c |
void *module_alloc(unsigned long size) {
gfp_t gfp_mask = GFP_KERNEL;
void *p;
if (PAGE_ALIGN(size) > MODULES_LEN)
return NULL;
p = __vmalloc_node_range(size, MODULE_ALIGN, MODULES_VADDR, MODULES_END,
gfp_mask, PAGE_KERNEL_EXEC, VM_DEFER_KMEMLEAK,
NUMA... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/module.c |
static int
apply_rela_bits(Elf_Addr loc, Elf_Addr val, int sign, int bits, int shift,
void *(*write)(void *dest, const void *src, size_t len)) {
unsigned long umax;
long min, max;
void *dest = (void *)loc;
if (val & ((1UL << shift) - 1))
return -ENOEXEC;
if (sign) {
val = (Elf_Addr)(... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/module.c | int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
struct module *me) {
const Elf_Shdr *s;
char *secstrings, *secname;
void *aseg;
#ifdef CONFIG_FUNCTION_TRACER
int ret;
#endif
if (IS_ENABLED(CONFIG_EXPOLINE) && !nospec_disable && me->arch.plt_size) {
unsigned int *ij;
... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/nmi.c |
static inline int nmi_needs_mcesa(void) {
return MACHINE_HAS_VX || MACHINE_HAS_GS;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/nmi.c |
void nmi_free_mcesa(u64 *mcesad) {
if (!nmi_needs_mcesa())
return;
kfree(__va(*mcesad & MCESA_ORIGIN_MASK));
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/os_info.c | static void os_info_old_alloc(int nr, int align) {
unsigned long addr, size = 0;
char *buf, *buf_align, *msg;
u32 csum;
addr = os_info_old->entry[nr].addr;
if (!addr) {
msg = "not available";
goto fail;
}
size = os_info_old->entry[nr].size;
buf = kmalloc(size + align - 1, GFP_KERNEL);
if (!bu... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/os_info.c | void *os_info_old_entry(int nr, unsigned long *size) {
os_info_old_init();
if (!os_info_old)
return NULL;
if (!os_info_old->entry[nr].addr)
return NULL;
*size = (unsigned long)os_info_old->entry[nr].size;
return (void *)(unsigned long)os_info_old->entry[nr].addr;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static void cfdiag_diffctrset(u64 *pstart, u64 *pstop, int counters) {
for (; --counters >= 0; ++pstart, ++pstop)
if (*pstop >= *pstart)
*pstop -= *pstart;
else
*pstop = *pstart - *pstop + 1;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static int validate_ctr_auth(const struct hw_perf_event *hwc) {
struct cpu_cf_events *cpuhw;
int err = 0;
cpuhw = &get_cpu_var(cpu_cf_events);
if (!(hwc->config_base & cpuhw->info.auth_ctl))
err = -ENOENT;
put_cpu_var(cpu_cf_events);
return err;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static int cpumf_pmu_event_type(struct perf_event *event) {
u64 ev = event->attr.config;
if (cpumf_generic_events_basic[PERF_COUNT_HW_CPU_CYCLES] == ev ||
cpumf_generic_events_basic[PERF_COUNT_HW_INSTRUCTIONS] == ev ||
cpumf_generic_events_user[PERF_COUNT_HW_CPU_CYCLES] == ev ||
cpumf_generic_eve... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static void hw_perf_event_update(struct perf_event *event) {
u64 prev, new, delta;
int err;
do {
prev = local64_read(&event->hw.prev_count);
err = ecctr(event->hw.config, &new);
if (err)
return;
} while (local64_cmpxchg(&event->hw.prev_count, prev, new) != prev);
delta = (prev <= new) ? ne... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static void cpumf_pmu_start(struct perf_event *event, int flags) {
struct cpu_cf_events *cpuhw = this_cpu_ptr(&cpu_cf_events);
struct hw_perf_event *hwc = &event->hw;
int i;
if (!(hwc->state & PERF_HES_STOPPED))
return;
hwc->state = 0;
ctr_set_enable(&cpuhw->state, hwc->config_base);
ctr_set_start(... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static int cfdiag_push_sample(struct perf_event *event,
struct cpu_cf_events *cpuhw) {
struct perf_sample_data data;
struct perf_raw_record raw;
struct pt_regs regs;
int overflow;
perf_sample_data_init(&data, 0, event->hw.last_period);
memset(®s, 0, sizeof(regs));
memset(... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static void cpumf_pmu_stop(struct perf_event *event, int flags) {
struct cpu_cf_events *cpuhw = this_cpu_ptr(&cpu_cf_events);
struct hw_perf_event *hwc = &event->hw;
int i;
if (!(hwc->state & PERF_HES_STOPPED)) {
for (i = CPUMF_CTR_SET_BASIC; i < CPUMF_CTR_SET_MAX; ++i) {
if (!(hwc->config_base & cp... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static void cfset_session_add(struct cfset_request *p) {
list_add(&p->node, &cfset_session.head);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static void cfset_ioctl_off(void *parm) {
struct cpu_cf_events *cpuhw = this_cpu_ptr(&cpu_cf_events);
struct cfset_call_on_cpu_parm *p = parm;
int rc;
for (rc = CPUMF_CTR_SET_BASIC; rc < CPUMF_CTR_SET_MAX; ++rc)
if ((p->sets & cpumf_ctr_ctl[rc])) {
if (!atomic_dec_return(&cpuhw->ctr_set[rc])) {
... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static void cfset_release_cpu(void *p) {
struct cpu_cf_events *cpuhw = this_cpu_ptr(&cpu_cf_events);
int rc;
debug_sprintf_event(cf_dbg, 4, "%s state %#llx dev_state %#llx\n", __func__,
cpuhw->state, cpuhw->dev_state);
cpuhw->dev_state = 0;
rc = lcctl(cpuhw->state);
if (rc)
pr_err... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static int cfset_release(struct inode *inode, struct file *file) {
mutex_lock(&cfset_ctrset_mutex);
if (file->private_data) {
cfset_all_stop(file->private_data);
cfset_session_del(file->private_data);
kfree(file->private_data);
file->private_data = NULL;
}
if (!atomic_dec_return(&cfset_opencnt)... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static int cfset_open(struct inode *inode, struct file *file) {
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
mutex_lock(&cfset_ctrset_mutex);
if (atomic_inc_return(&cfset_opencnt) == 1)
cfset_session_init();
mutex_unlock(&cfset_ctrset_mutex);
cpumf_hw_inuse();
file->private_data = NULL;
return no... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | int cfset_offline_cpu(unsigned int cpu) {
struct cfset_call_on_cpu_parm p;
struct cfset_request *rp;
mutex_lock(&cfset_ctrset_mutex);
if (!list_empty(&cfset_session.head)) {
list_for_each_entry(rp, &cfset_session.head, node) {
p.sets = rp->ctrset;
cfset_ioctl_off(&p);
cpumask_clear_cpu(cp... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c |
static int get_authctrsets(void) {
struct cpu_cf_events *cpuhw;
unsigned long auth = 0;
enum cpumf_ctr_set i;
cpuhw = &get_cpu_var(cpu_cf_events);
for (i = CPUMF_CTR_SET_BASIC; i < CPUMF_CTR_SET_MAX; ++i) {
if (cpuhw->info.auth_ctl & cpumf_ctr_ctl[i])
auth |= cpumf_ctr_ctl[i];
}
put_cpu_var(cp... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static int cfdiag_event_init2(struct perf_event *event) {
struct perf_event_attr *attr = &event->attr;
int err = 0;
event->hw.config = attr->config;
event->hw.sample_period = attr->sample_period;
local64_set(&event->hw.period_left, event->hw.sample_period);
local64_set(&event->count, 0);
event->hw.last_p... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf.c | static int cfset_init(void) {
struct cpumf_ctr_info info;
size_t need;
int rc;
if (qctri(&info))
return -ENODEV;
cfdiag_get_cpu_speed();
need = cfdiag_maxsize(&info);
if (need > sizeof(((struct cpu_cf_events *)0)->start)) {
pr_err("Insufficient memory for PMU(cpum_cf_diag) need=%zu\n", need);
... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf_common.c |
static int cpum_cf_setup(unsigned int cpu, int flags) {
local_irq_disable();
cpum_cf_setup_cpu(&flags);
local_irq_enable();
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf_common.c |
static int cpum_cf_online_cpu(unsigned int cpu) {
cpum_cf_setup(cpu, PMC_INIT);
return cfset_online_cpu(cpu);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_cf_common.c | size_t cpum_cf_ctrset_size(enum cpumf_ctr_set ctrset,
struct cpumf_ctr_info *info) {
size_t ctrset_size = 0;
switch (ctrset) {
case CPUMF_CTR_SET_BASIC:
if (info->cfvn >= 1)
ctrset_size = 6;
break;
case CPUMF_CTR_SET_USER:
if (info->cfvn == 1)
ctrset_size = 6;... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static inline int require_table_link(const void *sdbt) {
return ((unsigned long)sdbt & ~PAGE_MASK) == CPUM_SF_SDBT_TL_OFFSET;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c |
static void release_pmc_hardware(void) {
int flags = PMC_RELEASE;
irq_subclass_unregister(IRQ_SUBCLASS_MEASUREMENT_ALERT);
on_each_cpu(setup_pmc_cpu, &flags, 1);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c |
static int reserve_pmc_hardware(void) {
int flags = PMC_INIT;
on_each_cpu(setup_pmc_cpu, &flags, 1);
if (flags & PMC_FAILURE) {
release_pmc_hardware();
return -ENODEV;
}
irq_subclass_register(IRQ_SUBCLASS_MEASUREMENT_ALERT);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static void hw_perf_event_destroy(struct perf_event *event) {
if (!atomic_add_unless(&num_events, -1, 1)) {
mutex_lock(&pmc_reserve_mutex);
if (atomic_dec_return(&num_events) == 0)
release_pmc_hardware();
mutex_unlock(&pmc_reserve_mutex);
}
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static unsigned long getrate(bool freq, unsigned long sample,
struct hws_qsi_info_block *si) {
unsigned long rate;
if (freq) {
rate = freq_to_sample_rate(si, sample);
rate = hw_limit_rate(si, rate);
} else {
rate = hw_limit_rate(si, sample);
/* The perf core maintai... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c |
static void perf_event_count_update(struct perf_event *event, u64 count) {
local64_add(count, &event->count);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static void hw_collect_samples(struct perf_event *event, unsigned long *sdbt,
unsigned long long *overflow) {
struct hws_trailer_entry *te;
struct hws_basic_entry *sample;
te = (struct hws_trailer_entry *)trailer_entry_ptr(*sdbt);
sample = (struct hws_basic_entry *)*sdbt;
while... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static void aux_sdb_init(unsigned long sdb) {
struct hws_trailer_entry *te;
te = (struct hws_trailer_entry *)trailer_entry_ptr(sdb);
te->clock_base = 1;
te->progusage2 = tod_clock_base.tod;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static void cpumsf_pmu_start(struct perf_event *event, int flags) {
struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf);
if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED)))
return;
if (flags & PERF_EF_RELOAD)
WARN_ON_ONCE(!(event->hw.state & PERF_HES_UPTODATE));
perf_pmu_disable(event->pmu);
ev... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static int cpumsf_pmu_add(struct perf_event *event, int flags) {
struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf);
struct aux_buffer *aux;
int err;
if (cpuhw->flags & PMU_F_IN_USE)
return -EAGAIN;
if (!SAMPL_DIAG_MODE(&event->hw) && !cpuhw->sfb.sdbt)
return -EINVAL;
err = 0;
perf_pmu_disable(... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static void cpumf_measurement_alert(struct ext_code ext_code,
unsigned int alert, unsigned long unused) {
struct cpu_hw_sf *cpuhw;
if (!(alert & CPU_MF_INT_SF_MASK))
return;
inc_irq_stat(IRQEXT_CMS);
cpuhw = this_cpu_ptr(&cpu_hw_sf);
if (!(cpuhw->flags & PMU_F_RESERVE... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c |
static int param_get_sfb_size(char *buffer, const struct kernel_param *kp) {
if (!cpum_sf_avail())
return -ENODEV;
return sprintf(buffer, "%lu,%lu", CPUM_SF_MIN_SDB, CPUM_SF_MAX_SDB);
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static void __init pr_cpumsf_err(unsigned int reason) {
pr_err("Sampling facility support for perf is not available: "
"reason %#x\n",
reason);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_cpum_sf.c | static int __init init_cpum_sampling_pmu(void) {
struct hws_qsi_info_block si;
int err;
if (!cpum_sf_avail())
return -ENODEV;
memset(&si, 0, sizeof(si));
if (qsi(&si)) {
pr_cpumsf_err(RS_INIT_FAILURE_QSI);
return -ENODEV;
}
if (!si.as && !si.ad)
return -ENODEV;
if (si.bsdes != sizeof... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_event.c |
static void print_debug_sf(void) {
struct hws_qsi_info_block si;
int cpu = smp_processor_id();
memset(&si, 0, sizeof(si));
if (qsi(&si))
return;
pr_info("CPU[%i] CPUM_SF: basic=%i diag=%i min=%lu max=%lu cpu_speed=%u\n",
cpu, si.as, si.ad, si.min_sampl_rate, si.max_sampl_rate,
si.cp... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_event.c |
void perf_event_print_debug(void) {
unsigned long flags;
local_irq_save(flags);
if (cpum_cf_avail())
print_debug_cf();
if (cpum_sf_avail())
print_debug_sf();
local_irq_restore(flags);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_event.c | ssize_t cpumf_events_sysfs_show(struct device *dev,
struct device_attribute *attr, char *page) {
struct perf_pmu_events_attr *pmu_attr;
pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr);
return sprintf(page, "event=0x%04llx\n", pmu_attr->id);
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_pai_crypto.c | static int paicrypt_event_init(struct perf_event *event) {
struct perf_event_attr *a = &event->attr;
struct paicrypt_map *cpump;
int rc;
if (a->type != PERF_TYPE_RAW && event->pmu->type != a->type)
return -ENOENT;
/* PAI crypto event must be in valid range */
if (a->config < PAI_CRYPTO_BASE || a->confi... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_pai_ext.c | static void paiext_root_free(void) {
if (!--paiext_root.refcnt) {
free_percpu(paiext_root.mapptr);
paiext_root.mapptr = NULL;
}
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_pai_ext.c | static int paiext_event_valid(struct perf_event *event) {
u64 cfg = event->attr.config;
if (cfg >= PAI_NNPA_BASE && cfg <= PAI_NNPA_BASE + paiext_cnt) {
event->hw.config_base = offsetof(struct paiext_cb, acc);
return 0;
}
return -EINVAL;
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_pai_ext.c |
static u64 paiext_getctr(struct paiext_map *cpump, int nr) {
return cpump->area[nr];
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_pai_ext.c | static void paiext_del(struct perf_event *event, int flags) {
struct paiext_mapptr *mp = this_cpu_ptr(paiext_root.mapptr);
struct paiext_map *cpump = mp->mapptr;
struct paiext_cb *pcb = cpump->paiext_cb;
if (event->attr.sample_period)
perf_sched_cb_dec(event->pmu);
if (!event->attr.sample_period) {
... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_pai_ext.c | static int __init attr_event_init(void) {
struct attribute **attrs;
int ret, i;
attrs = kmalloc_array(ARRAY_SIZE(paiext_ctrnames) + 1, sizeof(*attrs),
GFP_KERNEL);
if (!attrs)
return -ENOMEM;
for (i = 0; i < ARRAY_SIZE(paiext_ctrnames); i++) {
ret = attr_event_init_one(attrs, ... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/perf_pai_ext.c | static int __init paiext_init(void) {
struct qpaci_info_block ib;
int rc = -ENOMEM;
if (!test_facility(197))
return 0;
qpaci(&ib);
paiext_cnt = ib.num_nnpa;
if (paiext_cnt >= PAI_NNPA_MAXCTR)
paiext_cnt = PAI_NNPA_MAXCTR;
if (!paiext_cnt)
return 0;
rc = attr_event_init();
if (rc) {
... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/perf_regs.c |
u64 perf_reg_value(struct pt_regs *regs, int idx) {
freg_t fp;
if (idx >= PERF_REG_S390_R0 && idx <= PERF_REG_S390_R15)
return regs->gprs[idx];
if (idx >= PERF_REG_S390_FP0 && idx <= PERF_REG_S390_FP15) {
if (!user_mode(regs))
return 0;
idx -= PERF_REG_S390_FP0;
fp = MACHINE_HAS_VX ? *(f... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/process.c | void __ret_from_fork(struct task_struct *prev, struct pt_regs *regs) {
void (*func)(void *arg);
schedule_tail(prev);
if (!user_mode(regs)) {
func = (void *)regs->gprs[9];
func((void *)regs->gprs[10]);
}
clear_pt_regs_flag(regs, PIF_SYSCALL);
syscall_exit_to_user_mode(regs);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/process.c |
void arch_release_task_struct(struct task_struct *tsk) {
runtime_instr_release(tsk);
guarded_storage_release(tsk);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/process.c | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) {
save_fpu_regs();
memcpy(dst, src, arch_task_struct_size);
dst->thread.fpu.regs = dst->thread.fpu.fprs;
/*
* Don't transfer over the runtime instrumentation or the guarded
* storage control block pointers. These fields are clea... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/process.c |
unsigned long __get_wchan(struct task_struct *p) {
struct unwind_state state;
unsigned long ip = 0;
if (!task_stack_page(p))
return 0;
if (!try_get_task_stack(p))
return 0;
unwind_for_each_frame(&state, p, NULL, 0) {
if (state.stack_info.type != STACK_TYPE_TASK) {
ip = 0;
break;
... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/process.c |
unsigned long arch_randomize_brk(struct mm_struct *mm) {
unsigned long ret;
ret = PAGE_ALIGN(mm->brk + brk_rnd());
return (ret > mm->brk) ? ret : mm->brk;
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/processor.c |
void notrace stop_machine_yield(const struct cpumask *cpumask) {
int cpu, this_cpu;
this_cpu = smp_processor_id();
if (__this_cpu_inc_return(cpu_relax_retry) >= spin_retry) {
__this_cpu_write(cpu_relax_retry, 0);
cpu = cpumask_next_wrap(this_cpu, cpumask, this_cpu, false);
if (cpu >= nr_cpu_ids)
... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/processor.c |
static void show_cpu_mhz(struct seq_file *m, unsigned long n) {
struct cpu_info *c = per_cpu_ptr(&cpu_info, n);
if (!machine_has_cpu_mhz)
return;
seq_printf(m, "cpu MHz dynamic : %d\n", c->cpu_mhz_dynamic);
seq_printf(m, "cpu MHz static : %d\n", c->cpu_mhz_static);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/processor.c |
int s390_isolate_bp(void) {
if (!test_facility(82))
return -EOPNOTSUPP;
set_thread_flag(TIF_ISOLATE_BP);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c | static inline void __poke_user_per_compat(struct task_struct *child,
addr_t addr, __u32 data) {
if (addr == offsetof(struct compat_per_struct_kernel, cr9))
child->thread.per_user.control = data & (PER_EVENT_MASK | PER_CONTROL_MASK);
else if (addr == offsetof(struct com... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c | static int s390_regs_get(struct task_struct *target,
const struct user_regset *regset, struct membuf to) {
unsigned pos;
if (target == current)
save_access_regs(target->thread.acrs);
for (pos = 0; pos < sizeof(s390_regs); pos += sizeof(long))
membuf_store(&to, __peek_user(target,... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c |
static int s390_regs_set(struct task_struct *target,
const struct user_regset *regset, unsigned int pos,
unsigned int count, const void *kbuf,
const void __user *ubuf) {
int rc = 0;
if (target == current)
save_access_regs(target->threa... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c |
static int s390_fpregs_get(struct task_struct *target,
const struct user_regset *regset, struct membuf to) {
_s390_fp_regs fp_regs;
if (target == current)
save_fpu_regs();
fp_regs.fpc = target->thread.fpu.fpc;
fpregs_store(&fp_regs, &target->thread.fpu);
return membuf_write(... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c | static int s390_fpregs_set(struct task_struct *target,
const struct user_regset *regset, unsigned int pos,
unsigned int count, const void *kbuf,
const void __user *ubuf) {
int rc = 0;
freg_t fprs[__NUM_FPRS];
if (target == current)
... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c |
static int s390_last_break_set(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf) {
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c |
static int s390_tdb_set(struct task_struct *target,
const struct user_regset *regset, unsigned int pos,
unsigned int count, const void *kbuf,
const void __user *ubuf) {
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c |
static int s390_vxrs_low_set(struct task_struct *target,
const struct user_regset *regset, unsigned int pos,
unsigned int count, const void *kbuf,
const void __user *ubuf) {
__u64 vxrs[__NUM_VXRS_LOW];
int i, rc;
if (!MACHINE... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c |
static int s390_vxrs_high_set(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf) {
int rc;
if (!MACHINE_HAS_VX)
return -ENODEV;
... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c |
static bool is_ri_cb_valid(struct runtime_instr_cb *cb) {
return (cb->rca & 0x1f) == 0 && (cb->roa & 0xfff) == 0 &&
(cb->rla & 0xfff) == 0xfff && cb->s == 1 && cb->k == 1 && cb->h == 0 &&
cb->reserved1 == 0 && cb->ps == 1 && cb->qs == 0 && cb->pc == 1 &&
cb->qc == 0 && cb->reserved2 == 0 &... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c | static int s390_runtime_instr_set(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf) {
struct runtime_instr_cb ri_cb = {}, *... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c |
int regs_query_register_offset(const char *name) {
unsigned long offset;
if (!name || *name != 'r')
return -EINVAL;
if (kstrtoul(name + 1, 10, &offset))
return -EINVAL;
if (offset >= NUM_GPRS)
return -EINVAL;
return offset;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/ptrace.c | unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n) {
unsigned long addr;
addr = kernel_stack_pointer(regs) + n * sizeof(long);
if (!regs_within_kernel_stack(regs, addr))
return 0;
return *(unsigned long *)addr;
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/setup.c | static void __init conmode_default(void) {
char query_buffer[1024];
char *ptr;
if (MACHINE_IS_VM) {
cpcmd("QUERY CONSOLE", query_buffer, 1024, NULL);
console_devno = simple_strtoul(query_buffer + 5, NULL, 16);
ptr = strstr(query_buffer, "SUBCHANNEL =");
console_irq = simple_strtoul(ptr + 13, NULL... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/setup.c | static inline void setup_zfcpdump(void) {}
#endif | [
0,
0
] |
Linux Kernel | arch/s390/kernel/setup.c |
int __init arch_early_irq_init(void) {
unsigned long stack;
stack = __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER);
if (!stack)
panic("Couldn't allocate async stack");
S390_lowcore.async_stack = stack + STACK_INIT_OFFSET;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/setup.c | static void __init reserve_initrd(void) {
#ifdef CONFIG_BLK_DEV_INITRD
if (!initrd_data.start || !initrd_data.size)
return;
initrd_start = (unsigned long)__va(initrd_data.start);
initrd_end = initrd_start + initrd_data.size;
memblock_reserve(initrd_data.start, initrd_data.size);
#endif
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/setup.c |
static const char *__init get_mem_info_source(void) {
switch (mem_detect.info_source) {
case MEM_DETECT_SCLP_STOR_INFO:
return "sclp storage info";
case MEM_DETECT_DIAG260:
return "diag260";
case MEM_DETECT_SCLP_READ_INFO:
return "sclp read info";
case MEM_DETECT_BIN_SEARCH:
return "binary se... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/setup.c | static void __init relocate_amode31_section(void) {
unsigned long amode31_size = __eamode31 - __samode31;
long amode31_offset = __amode31_base - __samode31;
long *ptr;
pr_info("Relocating AMODE31 section of size 0x%08lx\n", amode31_size);
memmove((void *)__amode31_base, (void *)__samode31, amode31_size);
... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/setup.c | static void __init setup_cr(void) {
union ctlreg2 cr2;
union ctlreg5 cr5;
union ctlreg15 cr15;
__ctl_duct[1] = (unsigned long)__ctl_aste;
__ctl_duct[2] = (unsigned long)__ctl_aste;
__ctl_duct[4] = (unsigned long)__ctl_duald;
__ctl_store(cr2.val, 2, 2);
__ctl_store(cr5.val, 5, 5);
__ctl_store(cr15.va... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/signal.c | static void store_sigregs(void) {
save_access_regs(current->thread.acrs);
save_fpu_regs();
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/signal.c | static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs) {
_sigregs user_sregs;
user_sregs.regs.psw.mask =
PSW_USER_BITS | (regs->psw.mask & (PSW_MASK_USER | PSW_MASK_RI));
user_sregs.regs.psw.addr = regs->psw.addr;
memcpy(&user_sregs.regs.gprs, ®s->gprs, sizeof(sregs->regs.gprs));
memc... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/signal.c | static int save_sigregs_ext(struct pt_regs *regs,
_sigregs_ext __user *sregs_ext) {
__u64 vxrs[__NUM_VXRS_LOW];
int i;
if (MACHINE_HAS_VX) {
for (i = 0; i < __NUM_VXRS_LOW; i++)
vxrs[i] = *((__u64 *)(current->thread.fpu.vxrs + i) + 1);
if (__copy_to_user(&sregs_ext->vxrs... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static int __init early_smt(char *s) {
get_option(&s, &smp_max_threads);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c | static inline int __pcpu_sigp_relax(u16 addr, u8 order, unsigned long parm) {
int cc;
while (1) {
cc = __pcpu_sigp(addr, order, parm, NULL);
if (cc != SIGP_CC_BUSY)
return cc;
cpu_relax();
}
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static inline int pcpu_stopped(struct pcpu *pcpu) {
u32 status;
if (__pcpu_sigp(pcpu->address, SIGP_SENSE, 0, &status) !=
SIGP_CC_STATUS_STORED)
return 0;
return !!(status & (SIGP_STATUS_CHECK_STOP | SIGP_STATUS_STOPPED));
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static void pcpu_free_lowcore(struct pcpu *pcpu) {
unsigned long async_stack, nodat_stack, mcck_stack;
struct lowcore *lc;
int cpu;
cpu = pcpu - pcpu_devices;
lc = lowcore_ptr[cpu];
nodat_stack = lc->nodat_stack - STACK_INIT_OFFSET;
async_stack = lc->async_stack - STACK_INIT_OFFSET;
mcck_stack = lc->m... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static void pcpu_prepare_secondary(struct pcpu *pcpu, int cpu) {
struct lowcore *lc = lowcore_ptr[cpu];
cpumask_set_cpu(cpu, &init_mm.context.cpu_attach_mask);
cpumask_set_cpu(cpu, mm_cpumask(&init_mm));
lc->cpu_nr = cpu;
lc->restart_flags = RESTART_FLAG_CTLREGS;
lc->spinlock_lockval = arch_spin_lockval(c... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static void pcpu_attach_task(struct pcpu *pcpu, struct task_struct *tsk) {
struct lowcore *lc;
int cpu;
cpu = pcpu - pcpu_devices;
lc = lowcore_ptr[cpu];
lc->kernel_stack = (unsigned long)task_stack_page(tsk) + THREAD_SIZE -
STACK_FRAME_OVERHEAD - sizeof(struct pt_regs);
lc->current_t... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static void pcpu_start_fn(struct pcpu *pcpu, void (*func)(void *), void *data) {
struct lowcore *lc;
int cpu;
cpu = pcpu - pcpu_devices;
lc = lowcore_ptr[cpu];
lc->restart_stack = lc->kernel_stack;
lc->restart_fn = (unsigned long)func;
lc->restart_data = (unsigned long)data;
lc->restart_source = -1U;
... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c | static int pcpu_set_smt(unsigned int mtid) {
int cc;
if (smp_cpu_mtid == mtid)
return 0;
cc = __pcpu_sigp(0, SIGP_SET_MULTI_THREADING, mtid, NULL);
if (cc == 0) {
smp_cpu_mtid = mtid;
smp_cpu_mt_shift = 0;
while (smp_cpu_mtid >= (1U << smp_cpu_mt_shift))
smp_cpu_mt_shift++;
pcpu_devic... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c | void smp_call_ipl_cpu(void (*func)(void *), void *data) {
struct lowcore *lc = lowcore_ptr[0];
if (pcpu_devices[0].address == stap())
lc = &S390_lowcore;
pcpu_delegate(&pcpu_devices[0], func, data, lc->nodat_stack);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c | void notrace smp_emergency_stop(void) {
static arch_spinlock_t lock = __ARCH_SPIN_LOCK_UNLOCKED;
static cpumask_t cpumask;
u64 end;
int cpu;
arch_spin_lock(&lock);
cpumask_copy(&cpumask, cpu_online_mask);
cpumask_clear_cpu(smp_processor_id(), &cpumask);
end = get_tod_clock() + (1000000UL << 12);
for... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static void do_ext_call_interrupt(struct ext_code ext_code,
unsigned int param32, unsigned long param64) {
inc_irq_stat(ext_code.code == 0x1202 ? IRQEXT_EXC : IRQEXT_EMS);
smp_handle_ext_call();
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static int smp_add_core(struct sclp_core_entry *core, cpumask_t *avail,
bool configured, bool early) {
struct pcpu *pcpu;
int cpu, nr, i;
u16 address;
nr = 0;
if (sclp.has_core_type && core->type != boot_core_type)
return nr;
cpu = cpumask_first(avail);
address = core->core_i... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/smp.c | static int __smp_rescan_cpus(struct sclp_core_info *info, bool early) {
struct sclp_core_entry *core;
static cpumask_t avail;
bool configured;
u16 core_id;
int nr, i;
cpus_read_lock();
mutex_lock(&smp_cpu_state_mutex);
nr = 0;
cpumask_xor(&avail, cpu_possible_mask, cpu_present_mask);
if (early) {
... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
void __init smp_fill_possible_mask(void) {
unsigned int possible, sclp_max, cpu;
sclp_max = max(sclp.mtid, sclp.mtid_cp) + 1;
sclp_max = min(smp_max_threads, sclp_max);
sclp_max = (sclp.max_cores * sclp_max) ?: nr_cpu_ids;
possible = setup_possible_cpus ?: nr_cpu_ids;
possible = min(possible, sclp_max);
... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.