Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/s390/kernel/smp.c | int setup_profiling_timer(unsigned int multiplier) { return 0; } | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static int smp_cpu_online(unsigned int cpu) {
struct device *s = &per_cpu(cpu_device, cpu)->dev;
return sysfs_create_group(&s->kobj, &cpu_online_attr_group);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static int smp_add_present_cpu(int cpu) {
struct device *s;
struct cpu *c;
int rc;
c = kzalloc(sizeof(*c), GFP_KERNEL);
if (!c)
return -ENOMEM;
per_cpu(cpu_device, cpu) = c;
s = &c->dev;
c->hotpluggable = 1;
rc = register_cpu(c, cpu);
if (rc)
goto out;
rc = sysfs_create_group(&s->kobj, &... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/smp.c |
static __always_inline void set_new_lowcore(struct lowcore *lc) {
union register_pair dst, src;
u32 pfx;
src.even = (unsigned long)&S390_lowcore;
src.odd = sizeof(S390_lowcore);
dst.even = (unsigned long)lc;
dst.odd = sizeof(*lc);
pfx = __pa(lc);
asm volatile(" mvcl %[dst],%[src]\n"
" ... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/stacktrace.c |
void arch_stack_walk(stack_trace_consume_fn consume_entry, void *cookie,
struct task_struct *task, struct pt_regs *regs) {
struct unwind_state state;
unsigned long addr;
unwind_for_each_frame(&state, task, regs, 0) {
addr = unwind_get_return_address(&state);
if (!addr || !consume_en... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/stacktrace.c | int arch_stack_walk_reliable(stack_trace_consume_fn consume_entry, void *cookie,
struct task_struct *task) {
struct unwind_state state;
unsigned long addr;
unwind_for_each_frame(&state, task, NULL, 0) {
if (state.stack_info.type != STACK_TYPE_TASK)
return -EINVAL;
if (... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/sthyi.c | static u32 scale_cap(u32 in) { return (0x10000 * in) / 100; } | [
0,
0
] |
Linux Kernel | arch/s390/kernel/sthyi.c | static struct diag204_x_part_block *
lpar_cpu_inf(struct lpar_cpu_inf *part_inf, bool this_lpar, void *diag224_buf,
struct diag204_x_part_block *block) {
int i, capped = 0, weight_cp = 0, weight_ifl = 0;
struct cpu_inf *cpu_inf;
for (i = 0; i < block->hdr.rcpus; i++) {
if (!(block->cpus[i].cflag... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/sthyi.c | static int sthyi(u64 vaddr, u64 *rc) {
union register_pair r1 = {
.even = 0,
};
union register_pair r2 = {
.even = vaddr,
};
int cc;
asm volatile(".insn rre,0xB2560000,%[r1],%[r2]\n"
"ipm %[cc]\n"
"srl %[cc],28\n"
: [cc] "=&d"(cc), [r2] "+&... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/sthyi.c | static int sthyi_init_cache(void) {
if (sthyi_cache.info)
return 0;
sthyi_cache.info = (void *)get_zeroed_page(GFP_KERNEL);
if (!sthyi_cache.info)
return -ENOMEM;
sthyi_cache.end = jiffies - 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/sthyi.c |
static int sthyi_update_cache(u64 *rc) {
int r;
memset(sthyi_cache.info, 0, PAGE_SIZE);
r = fill_dst(sthyi_cache.info, rc);
if (r)
return r;
sthyi_cache.end = jiffies + CACHE_VALID_JIFFIES;
return r;
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/syscall.c | static void do_syscall(struct pt_regs *regs) {
unsigned long nr;
nr = regs->int_code & 0xffff;
if (!nr) {
nr = regs->gprs[1] & 0xffff;
regs->int_code &= ~0xffffUL;
regs->int_code |= nr;
}
regs->gprs[2] = nr;
if (nr == __NR_restart_syscall && !(current->restart_block.arch_data & 1)) {
regs... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/sysinfo.c | static void stsi_1_2_2(struct seq_file *m, struct sysinfo_1_2_2 *info) {
struct sysinfo_1_2_2_extension *ext;
int i;
if (stsi(info, 1, 2, 2))
return;
ext = (struct sysinfo_1_2_2_extension *)((unsigned long)info +
info->acc_offset);
seq_printf(m, "CPUs Total: ... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/sysinfo.c |
static void print_ext_name(struct seq_file *m, int lvl,
struct sysinfo_3_2_2 *info) {
size_t len = sizeof(info->ext_names[lvl]);
if (!convert_ext_name(info->vm[lvl].evmne, info->ext_names[lvl], len))
return;
seq_printf(m, "VM%02d Extended Name: %-.256s\n", lvl, info->ext_names[l... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/sysinfo.c |
static int __init sysinfo_create_proc(void) {
proc_create_single("sysinfo", 0444, NULL, sysinfo_show);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/sysinfo.c |
int register_service_level(struct service_level *slr) {
struct service_level *ptr;
down_write(&service_level_sem);
list_for_each_entry(ptr, &service_level_list, list) if (ptr == slr) {
up_write(&service_level_sem);
return -EEXIST;
}
list_add_tail(&slr->list, &service_level_list);
up_write(&service... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/sysinfo.c |
static void *service_level_next(struct seq_file *m, void *p, loff_t *pos) {
return seq_list_next(p, &service_level_list, pos);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/sysinfo.c | void calibrate_delay(void) {
s390_adjust_jiffies();
printk(KERN_DEBUG "Calibrating delay loop (skipped)... "
"%lu.%02lu BogoMIPS preset\n",
loops_per_jiffy / (500000 / HZ),
(loops_per_jiffy / (5000 / HZ)) % 100);
}
#ifdef CONFIG_DEBUG_FS
#define STSI_FILE(fc, s1, s2) ... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c | void __init time_early_init(void) {
struct ptff_qto qto;
struct ptff_qui qui;
int cs;
tod_steering_end = tod_clock_base.tod;
for (cs = 0; cs < CS_BASES; cs++)
vdso_data[cs].arch_data.tod_steering_end = tod_steering_end;
if (!test_facility(28))
return;
ptff(&ptff_function_mask, sizeof(ptff_funct... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/time.c | unsigned long long notrace sched_clock(void) {
return tod_to_ns(get_tod_clock_monotonic());
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
static void ext_to_timespec64(union tod_clock *clk, struct timespec64 *xt) {
unsigned long rem, sec, nsec;
sec = clk->us;
rem = do_div(sec, 1000000);
nsec = ((clk->sus + (rem << 12)) * 125) >> 9;
xt->tv_sec = sec;
xt->tv_nsec = nsec;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c | void init_cpu_timer(void) {
struct clock_event_device *cd;
int cpu;
S390_lowcore.clock_comparator = clock_comparator_max;
set_clock_comparator(S390_lowcore.clock_comparator);
cpu = smp_processor_id();
cd = &per_cpu(comparators, cpu);
cd->name = "comparator";
cd->features = CLOCK_EVT_FEAT_ONESHOT;
cd... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
static void clock_comparator_interrupt(struct ext_code ext_code,
unsigned int param32,
unsigned long param64) {
inc_irq_stat(IRQEXT_CLK);
if (S390_lowcore.clock_comparator == clock_comparator_max)
set_clock_comparator(S390_lowcore.cl... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
void read_persistent_clock64(struct timespec64 *ts) {
union tod_clock clk;
u64 delta;
delta = initial_leap_seconds + TOD_UNIX_EPOCH;
store_tod_clock_ext(&clk);
clk.eitod -= delta;
ext_to_timespec64(&clk, ts);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c | void __init time_init(void) {
stp_reset();
/* request the clock comparator external interrupt */
if (register_external_irq(EXT_IRQ_CLK_COMP, clock_comparator_interrupt))
panic("Couldn't request external interrupt 0x1004");
/* request the timing alert external interrupt */
if (register_external_irq(EXT_... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
static void __init time_init_wq(void) {
if (time_sync_wq)
return;
time_sync_wq = create_singlethread_workqueue("timesync");
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c | static void __init stp_reset(void) {
int rc;
stp_page = (void *)get_zeroed_page(GFP_ATOMIC);
rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0x0000, NULL);
if (rc == 0)
set_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags);
else if (stp_online) {
pr_warn("The real or virtual hardware system does not provide an STP "... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c | int stp_island_check(void) {
disable_sync_clock(NULL);
return 1;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
void stp_queue_work(void) { queue_work(time_sync_wq, &stp_work); } | [
0,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
static int stp_clear_leap(void) {
struct __kernel_timex txc;
int ret;
memset(&txc, 0, sizeof(txc));
ret = do_adjtimex(&txc);
if (ret < 0)
return ret;
txc.modes = ADJ_STATUS;
txc.status &= ~(STA_INS | STA_DEL);
return do_adjtimex(&txc);
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/time.c | static void stp_work_fn(struct work_struct *work) {
struct clock_sync_data stp_sync;
int rc;
mutex_lock(&stp_mutex);
if (!stp_online) {
chsc_sstpc(stp_page, STP_OP_CTRL, 0x0000, NULL);
del_timer_sync(&stp_timer);
goto out_unlock;
}
rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0xf0e0, NULL);
if (r... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
static ssize_t leap_seconds_show(struct device *dev,
struct device_attribute *attr, char *buf) {
ssize_t ret = -ENODATA;
mutex_lock(&stp_mutex);
if (stpinfo_valid() && (stp_info.vbits & 0x8000))
ret = sprintf(buf, "%i\n", (int)(s16)stp_info.leaps);
mutex_unlock(&stp_mutex)... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
static ssize_t time_offset_show(struct device *dev,
struct device_attribute *attr, char *buf) {
ssize_t ret = -ENODATA;
mutex_lock(&stp_mutex);
if (stpinfo_valid() && (stp_info.vbits & 0x0800))
ret = sprintf(buf, "%i\n", (int)stp_info.tto);
mutex_unlock(&stp_mutex);
retur... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
static ssize_t timing_state_show(struct device *dev,
struct device_attribute *attr, char *buf) {
ssize_t ret = -ENODATA;
mutex_lock(&stp_mutex);
if (stpinfo_valid())
ret = sprintf(buf, "%i\n", stp_info.tst);
mutex_unlock(&stp_mutex);
return ret;
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/time.c |
static ssize_t online_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count) {
unsigned int value;
value = simple_strtoul(buf, NULL, 0);
if (value != 0 && value != 1)
return -EINVAL;
if (!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags))
retu... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
static void cpu_group_map(cpumask_t *dst, struct mask_info *info,
unsigned int cpu) {
static cpumask_t mask;
cpumask_clear(&mask);
if (!cpumask_test_cpu(cpu, &cpu_setup_mask))
goto out;
cpumask_set_cpu(cpu, &mask);
switch (topology_mode) {
case TOPOLOGY_MODE_HW:
while (in... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
static void add_cpus_to_mask(struct topology_core *tl_core,
struct mask_info *drawer, struct mask_info *book,
struct mask_info *socket) {
struct cpu_topology_s390 *topo;
unsigned int core;
for_each_set_bit(core, &tl_core->mask, TOPOLOGY_CORE_BITS) {
... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
static void topology_update_polarization_simple(void) {
int cpu;
for_each_possible_cpu(cpu) smp_cpu_set_polarization(cpu, POLARIZATION_HRZ);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
void store_topology(struct sysinfo_15_1_x *info) {
stsi(info, 15, 1, topology_mnest_limit());
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
static void __arch_update_dedicated_flag(void *arg) {
if (topology_cpu_dedicated(smp_processor_id()))
set_cpu_flag(CIF_DEDICATED_CPU);
else
clear_cpu_flag(CIF_DEDICATED_CPU);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
void topology_schedule_update(void) { schedule_work(&topology_work); } | [
0,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
static void topology_flush_work(void) { flush_work(&topology_work); } | [
0,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
int topology_cpu_init(struct cpu *cpu) {
int rc;
rc = sysfs_create_group(&cpu->dev.kobj, &topology_cpu_attr_group);
if (rc || !MACHINE_HAS_TOPOLOGY)
return rc;
rc = sysfs_create_group(&cpu->dev.kobj, &topology_extra_cpu_attr_group);
if (rc)
sysfs_remove_group(&cpu->dev.kobj, &topology_cpu_attr_group... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/topology.c |
static const struct cpumask *cpu_book_mask(int cpu) {
return &cpu_topology[cpu].book_mask;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/traps.c |
void do_per_trap(struct pt_regs *regs) {
if (notify_die(DIE_SSTEP, "sstep", regs, 0, 0, SIGTRAP) == NOTIFY_STOP)
return;
if (!current->ptrace)
return;
force_sig_fault(SIGTRAP, TRAP_HWBKPT,
(void __force __user *)current->thread.per_event.address);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/traps.c | static void space_switch_exception(struct pt_regs *regs) {
if (user_mode(regs))
regs->psw.mask |= PSW_ASC_HOME;
/* Send SIGILL. */
do_trap(regs, SIGILL, ILL_PRVOPC, "space switch event");
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/unwind_bc.c | static inline bool is_final_pt_regs(struct unwind_state *state,
struct pt_regs *regs) {
if (task_pt_regs(state->task) == regs)
return true;
/* user mode pt_regs at the bottom of irq stack */
return state->stack_info.type == STACK_TYPE_IRQ &&
state->stack_info.end... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/unwind_bc.c | void __unwind_start(struct unwind_state *state, struct task_struct *task,
struct pt_regs *regs, unsigned long first_frame) {
struct stack_info *info = &state->stack_info;
struct stack_frame *sf;
unsigned long ip, sp;
memset(state, 0, sizeof(*state));
state->task = task;
state->regs = re... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/uprobes.c | int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) {
int fixup = probe_get_fixup_type(auprobe->insn);
struct uprobe_task *utask = current->utask;
clear_tsk_thread_flag(current, TIF_UPROBE_SINGLESTEP);
update_cr_regs(current);
psw_bits(regs->psw).per = auprobe->saved_per;
regs->int_... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/uv.c | static int uv_pin_shared(unsigned long paddr) {
struct uv_cb_cfs uvcb = {
.header.cmd = UVC_CMD_PIN_PAGE_SHARED,
.header.len = sizeof(uvcb),
.paddr = paddr,
};
if (uv_call(0, (u64)&uvcb))
return -EINVAL;
return 0;
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/uv.c | static int uv_destroy_page(unsigned long paddr) {
struct uv_cb_cfs uvcb = {.header.cmd = UVC_CMD_DESTR_SEC_STOR,
.header.len = sizeof(uvcb),
.paddr = paddr};
if (uv_call(0, (u64)&uvcb)) {
if (uvcb.header.rc == 0x107 && uvcb.header.rrc == 0xd)
return ... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/uv.c | int uv_destroy_owned_page(unsigned long paddr) {
struct page *page = phys_to_page(paddr);
int rc;
get_page(page);
rc = uv_destroy_page(paddr);
if (!rc)
clear_bit(PG_arch_1, &page->flags);
put_page(page);
return rc;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c | int uv_convert_from_secure(unsigned long paddr) {
struct uv_cb_cfs uvcb = {.header.cmd = UVC_CMD_CONV_FROM_SEC_STOR,
.header.len = sizeof(uvcb),
.paddr = paddr};
if (uv_call(0, (u64)&uvcb))
return -EINVAL;
return 0;
} | [
1,
0
] |
Linux Kernel | arch/s390/kernel/uv.c | int uv_convert_owned_from_secure(unsigned long paddr) {
struct page *page = phys_to_page(paddr);
int rc;
get_page(page);
rc = uv_convert_from_secure(paddr);
if (!rc)
clear_bit(PG_arch_1, &page->flags);
put_page(page);
return rc;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c | static int make_secure_pte(pte_t *ptep, unsigned long addr,
struct page *exp_page, struct uv_cb_header *uvcb) {
pte_t entry = READ_ONCE(*ptep);
struct page *page;
int expected, cc = 0;
if (!pte_present(entry))
return -ENXIO;
if (pte_val(entry) & _PAGE_INVALID)
return -ENXIO... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c | static bool should_export_before_import(struct uv_cb_header *uvcb,
struct mm_struct *mm) {
if (uvcb->cmd == UVC_CMD_UNPIN_PAGE_SHARED)
return false;
return atomic_read(&mm->context.protected_count) > 1;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c | int gmap_destroy_page(struct gmap *gmap, unsigned long gaddr) {
struct vm_area_struct *vma;
unsigned long uaddr;
struct page *page;
int rc;
rc = -EFAULT;
mmap_read_lock(gmap->mm);
uaddr = __gmap_translate(gmap, gaddr);
if (IS_ERR_VALUE(uaddr))
goto out;
vma = vma_lookup(gmap->mm, uaddr);
if (!... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c |
static ssize_t uv_query_feature_indications(struct kobject *kobj,
struct kobj_attribute *attr,
char *buf) {
return sysfs_emit(buf, "%lx\n", uv_info.uv_feature_indications);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c |
static ssize_t uv_query_max_guest_cpus(struct kobject *kobj,
struct kobj_attribute *attr,
char *page) {
return scnprintf(page, PAGE_SIZE, "%d\n", uv_info.max_guest_cpu_id + 1);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c |
static ssize_t uv_query_supp_att_pflags(struct kobject *kobj,
struct kobj_attribute *attr,
char *page) {
return scnprintf(page, PAGE_SIZE, "%lx\n", uv_info.supp_att_pflags);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c |
static ssize_t uv_is_prot_virt_guest(struct kobject *kobj,
struct kobj_attribute *attr, char *page) {
int val = 0;
#ifdef CONFIG_PROTECTED_VIRTUALIZATION_GUEST
val = prot_virt_guest;
#endif
return scnprintf(page, PAGE_SIZE, "%d\n", val);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/uv.c |
static ssize_t uv_is_prot_virt_host(struct kobject *kobj,
struct kobj_attribute *attr, char *page) {
int val = 0;
#if IS_ENABLED(CONFIG_KVM)
val = prot_virt_host;
#endif
return scnprintf(page, PAGE_SIZE, "%d\n", val);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vdso.c | int vdso_join_timens(struct task_struct *task, struct time_namespace *ns) {
struct mm_struct *mm = task->mm;
VMA_ITERATOR(vmi, mm, 0);
struct vm_area_struct *vma;
mmap_read_lock(mm);
for_each_vma(vmi, vma) {
unsigned long size = vma->vm_end - vma->vm_start;
if (!vma_is_special_mapping(vma, &vvar_map... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/vdso.c | static vm_fault_t vvar_fault(const struct vm_special_mapping *sm,
struct vm_area_struct *vma, struct vm_fault *vmf) {
struct page *timens_page = find_timens_vvar_page(vma);
unsigned long addr, pfn;
vm_fault_t err;
switch (vmf->pgoff) {
case VVAR_DATA_PAGE_OFFSET:
pfn = virt_t... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vdso.c | static unsigned long vdso_addr(unsigned long start, unsigned long len) {
unsigned long addr, end, offset;
start = PAGE_ALIGN(start);
/* Round the lowest possible end address up to a PMD boundary. */
end = (start + len + PMD_SIZE - 1) & PMD_MASK;
if (end >= VDSO_BASE)
end = VDSO_BASE;
end -= len;
if... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/vdso.c |
static struct page **__init vdso_setup_pages(void *start, void *end) {
int pages = (end - start) >> PAGE_SHIFT;
struct page **pagelist;
int i;
pagelist = kcalloc(pages + 1, sizeof(struct page *), GFP_KERNEL);
if (!pagelist)
panic("%s: Cannot allocate page list for VDSO", __func__);
for (i = 0; i < pag... | [
1,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c | static inline void set_vtimer(u64 expires) {
u64 timer;
asm volatile(" stpt %0\n"
" spt %1" /* Set new value imm. afterwards */
: "=Q"(timer)
: "Q"(expires));
S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer;
S390_lowcore.last_update_timer = expir... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c |
static inline u64 scale_vtime(u64 vtime) {
u64 mult = __this_cpu_read(mt_scaling_mult);
u64 div = __this_cpu_read(mt_scaling_div);
if (smp_cpu_mtid)
return vtime * mult / div;
return vtime;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c |
void vtime_task_switch(struct task_struct *prev) {
do_account_vtime(prev);
prev->thread.user_timer = S390_lowcore.user_timer;
prev->thread.guest_timer = S390_lowcore.guest_timer;
prev->thread.system_timer = S390_lowcore.system_timer;
prev->thread.hardirq_timer = S390_lowcore.hardirq_timer;
prev->thread.sof... | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c | void vtime_account_kernel(struct task_struct *tsk) {
u64 delta = vtime_delta();
if (tsk->flags & PF_VCPU)
S390_lowcore.guest_timer += delta;
else
S390_lowcore.system_timer += delta;
virt_timer_forward(delta);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c |
void vtime_account_softirq(struct task_struct *tsk) {
u64 delta = vtime_delta();
S390_lowcore.softirq_timer += delta;
virt_timer_forward(delta);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c |
static inline int vtimer_pending(struct vtimer_list *timer) {
return !list_empty(&timer->entry);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c |
static void __add_vtimer(struct vtimer_list *timer, int periodic) {
unsigned long flags;
timer->interval = periodic ? timer->expires : 0;
spin_lock_irqsave(&virt_timer_lock, flags);
internal_add_vtimer(timer);
spin_unlock_irqrestore(&virt_timer_lock, flags);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c | void add_virt_timer_periodic(struct vtimer_list *timer) {
__add_vtimer(timer, 1);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c | int mod_virt_timer(struct vtimer_list *timer, u64 expires) {
return __mod_vtimer(timer, expires, 0);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c | int mod_virt_timer_periodic(struct vtimer_list *timer, u64 expires) {
return __mod_vtimer(timer, expires, 1);
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c | int del_virt_timer(struct vtimer_list *timer) {
unsigned long flags;
if (!vtimer_pending(timer))
return 0;
spin_lock_irqsave(&virt_timer_lock, flags);
list_del_init(&timer->entry);
spin_unlock_irqrestore(&virt_timer_lock, flags);
return 1;
} | [
0,
0
] |
Linux Kernel | arch/s390/kernel/vtime.c | void vtime_init(void) {
set_vtimer(VTIMER_MAX_SLICE);
/* Setup initial MT scaling values */
if (smp_cpu_mtid) {
__this_cpu_write(mt_scaling_jiffies, jiffies);
__this_cpu_write(mt_scaling_mult, 1);
__this_cpu_write(mt_scaling_div, 1);
stcctm(MT_DIAG, smp_cpu_mtid + 1, this_cpu_ptr(mt_cycles));
}... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/diag.c | static int diag_release_pages(struct kvm_vcpu *vcpu) {
unsigned long start, end;
unsigned long prefix = kvm_s390_get_prefix(vcpu);
start = vcpu->run->s.regs.gprs[(vcpu->arch.sie_block->ipa & 0xf0) >> 4];
end = vcpu->run->s.regs.gprs[vcpu->arch.sie_block->ipa & 0xf] + PAGE_SIZE;
vcpu->stat.instruction_diagnos... | [
1,
0
] |
Linux Kernel | arch/s390/kvm/diag.c |
static int __diag_time_slice_end(struct kvm_vcpu *vcpu) {
VCPU_EVENT(vcpu, 5, "%s", "diag time slice end");
vcpu->stat.instruction_diagnose_44++;
kvm_vcpu_on_spin(vcpu, true);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kvm/diag.c | static int diag9c_forwarding_overrun(void) {
if (time_after(jiffies, cur_slice)) {
cur_slice = jiffies;
forward_cnt = diag9c_forwarding_hz / HZ;
}
return forward_cnt-- <= 0 ? 1 : 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/kvm/diag.c | static int __diag_virtio_hypercall(struct kvm_vcpu *vcpu) {
int ret;
vcpu->stat.instruction_diagnose_500++;
if (!vcpu->kvm->arch.css_support ||
(vcpu->run->s.regs.gprs[1] != KVM_S390_VIRTIO_CCW_NOTIFY))
return -EOPNOTSUPP;
VCPU_EVENT(vcpu, 4, "diag 0x500 schid 0x%8.8x queue 0x%x cookie 0x%llx",
... | [
1,
0
] |
Linux Kernel | arch/s390/kvm/diag.c |
int kvm_s390_handle_diag(struct kvm_vcpu *vcpu) {
int code = kvm_s390_get_base_disp_rs(vcpu, NULL) & 0xffff;
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
trace_kvm_s390_handle_diag(vcpu, code);
switch (code) {
case 0x10:
return ... | [
1,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
static void ipte_lock_simple(struct kvm *kvm) {
union ipte_control old, new, *ic;
mutex_lock(&kvm->arch.ipte_mutex);
kvm->arch.ipte_lock_count++;
if (kvm->arch.ipte_lock_count > 1)
goto out;
retry:
read_lock(&kvm->arch.sca_lock);
ic = kvm_s390_get_ipte_control(kvm);
do {
old = READ_ONCE(*ic);
... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
static void ipte_lock_siif(struct kvm *kvm) {
union ipte_control old, new, *ic;
retry:
read_lock(&kvm->arch.sca_lock);
ic = kvm_s390_get_ipte_control(kvm);
do {
old = READ_ONCE(*ic);
if (old.kg) {
read_unlock(&kvm->arch.sca_lock);
cond_resched();
goto retry;
}
new = old;
... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
static void ipte_unlock_siif(struct kvm *kvm) {
union ipte_control old, new, *ic;
read_lock(&kvm->arch.sca_lock);
ic = kvm_s390_get_ipte_control(kvm);
do {
old = READ_ONCE(*ic);
new = old;
new.kh--;
if (!new.kh)
new.k = 0;
} while (cmpxchg(&ic->val, old.val, new.val) != old.val);
rea... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
void ipte_lock(struct kvm *kvm) {
if (sclp.has_siif)
ipte_lock_siif(kvm);
else
ipte_lock_simple(kvm);
} | [
0,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
static int get_vcpu_asce(struct kvm_vcpu *vcpu, union asce *asce,
unsigned long ga, u8 ar, enum gacc_mode mode) {
int rc;
struct psw_bits psw = psw_bits(vcpu->arch.sie_block->gpsw);
if (!psw.dat) {
asce->val = 0;
asce->r = 1;
return 0;
}
if ((mode == GACC_IFETCH) && (ps... | [
1,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
static int deref_table(struct kvm *kvm, unsigned long gpa, unsigned long *val) {
return kvm_read_guest(kvm, gpa, val, sizeof(*val));
} | [
1,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
static int low_address_protection_enabled(struct kvm_vcpu *vcpu,
const union asce asce) {
union ctlreg0 ctlreg0 = {.val = vcpu->arch.sie_block->gcr[0]};
psw_t *psw = &vcpu->arch.sie_block->gpsw;
if (!ctlreg0.lap)
return 0;
if (psw_bits(*psw).dat && asce.p)
ret... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
static int vm_check_access_key(struct kvm *kvm, u8 access_key,
enum gacc_mode mode, gpa_t gpa) {
u8 storage_key, access_control;
bool fetch_protected;
unsigned long hva;
int r;
if (access_key == 0)
return 0;
hva = gfn_to_hva(kvm, gpa_to_gfn(gpa));
if (kvm_is_error_hva... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c | static bool fetch_prot_override_applicable(struct kvm_vcpu *vcpu,
enum gacc_mode mode,
union asce asce) {
psw_t *psw = &vcpu->arch.sie_block->gpsw;
unsigned long override;
if (mode == GACC_FETCH || mode == GACC_IFETCH) {
o... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.c |
int access_guest_abs_with_key(struct kvm *kvm, gpa_t gpa, void *data,
unsigned long len, enum gacc_mode mode,
u8 access_key) {
int offset = offset_in_page(gpa);
int fragment_len;
int rc;
while (min(PAGE_SIZE - offset, len) > 0) {
fragment_len = m... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.h | static inline unsigned long _kvm_s390_real_to_abs(u32 prefix,
unsigned long gra) {
if (gra < 2 * PAGE_SIZE)
gra += prefix;
else if (gra >= prefix && gra < prefix + 2 * PAGE_SIZE)
gra -= prefix;
return gra;
} | [
1,
0
] |
Linux Kernel | arch/s390/kvm/gaccess.h | static inline __must_check int read_guest_instr(struct kvm_vcpu *vcpu,
unsigned long ga, void *data,
unsigned long len) {
u8 access_key = psw_bits(vcpu->arch.sie_block->gpsw).key;
return access_guest_with_key(vcpu, ga, ... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/guestdbg.c |
void kvm_s390_backup_guest_per_regs(struct kvm_vcpu *vcpu) {
vcpu->arch.guestdbg.cr0 = vcpu->arch.sie_block->gcr[0];
vcpu->arch.guestdbg.cr9 = vcpu->arch.sie_block->gcr[9];
vcpu->arch.guestdbg.cr10 = vcpu->arch.sie_block->gcr[10];
vcpu->arch.guestdbg.cr11 = vcpu->arch.sie_block->gcr[11];
} | [
0,
0
] |
Linux Kernel | arch/s390/kvm/guestdbg.c | void kvm_s390_patch_guest_per_regs(struct kvm_vcpu *vcpu) {
if (guestdbg_sstep_enabled(vcpu)) {
/* disable timer (clock-comparator) interrupts */
vcpu->arch.sie_block->gcr[0] &= ~CR0_CLOCK_COMPARATOR_SUBMASK;
vcpu->arch.sie_block->gcr[9] |= PER_EVENT_IFETCH;
vcpu->arch.sie_block->gcr[10] = 0;
vcp... | [
1,
1
] |
Linux Kernel | arch/s390/kvm/guestdbg.c | static struct kvm_hw_wp_info_arch *any_wp_changed(struct kvm_vcpu *vcpu) {
int i;
struct kvm_hw_wp_info_arch *wp_info = NULL;
void *temp = NULL;
if (vcpu->arch.guestdbg.nr_hw_wp == 0)
return NULL;
for (i = 0; i < vcpu->arch.guestdbg.nr_hw_wp; i++) {
wp_info = &vcpu->arch.guestdbg.hw_wp_info[i];
... | [
1,
0
] |
Linux Kernel | arch/s390/kvm/guestdbg.c |
void kvm_s390_prepare_debug_exit(struct kvm_vcpu *vcpu) {
vcpu->run->exit_reason = KVM_EXIT_DEBUG;
vcpu->guest_debug &= ~KVM_GUESTDBG_EXIT_PENDING;
}
#define PER_CODE_MASK (PER_EVENT_MASK >> 24)
#define PER_CODE_BRANCH (PER_EVENT_BRANCH >> 24)
#define PER_CODE_IFETCH (PER_EVENT_IFETCH >> 24)
#define PER_CODE_STOR... | [
0,
0
] |
Linux Kernel | arch/s390/kvm/guestdbg.c | static int debug_exit_required(struct kvm_vcpu *vcpu, u8 perc,
unsigned long peraddr) {
struct kvm_debug_exit_arch *debug_exit = &vcpu->run->debug.arch;
struct kvm_hw_wp_info_arch *wp_info = NULL;
struct kvm_hw_bp_info_arch *bp_info = NULL;
unsigned long addr = vcpu->arch.sie_bloc... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.