Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/powerpc/kernel/rtas-proc.c |
static int __init proc_rtas_init(void) {
if (!machine_is(pseries))
return -ENODEV;
rtas_node = of_find_node_by_name(NULL, "rtas");
if (rtas_node == NULL)
return -ENODEV;
proc_create("powerpc/rtas/progress", 0644, NULL, &ppc_rtas_progress_proc_ops);
proc_create("powerpc/rtas/clock", 0644, NULL, &ppc... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-proc.c | static ssize_t ppc_rtas_progress_write(struct file *file,
const char __user *buf, size_t count,
loff_t *ppos) {
unsigned long hex;
if (count >= MAX_LINELENGTH)
count = MAX_LINELENGTH - 1;
if (copy_from_user(progress_led, buf, count... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-proc.c | static ssize_t ppc_rtas_clock_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos) {
struct rtc_time tm;
time64_t nowtime;
int error = parse_number(buf, count, &nowtime);
if (error)
return error;
rtc_time64_to_tm(nowtime, &tm);
error =
r... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-proc.c | static int ppc_rtas_clock_show(struct seq_file *m, void *v) {
int ret[8];
int error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
if (error) {
printk(KERN_WARNING "error: reading the clock returned: %s\n",
ppc_rtas_process_error(error));
seq_printf(m, "0");
} else {
unsigned int... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-proc.c | static int ppc_rtas_find_all_sensors(void) {
const unsigned int *utmp;
int len, i;
utmp = of_get_property(rtas_node, "rtas-sensors", &len);
if (utmp == NULL) {
printk(KERN_ERR "error: could not get rtas-sensors\n");
return 1;
}
sensors.quant = len / 8;
for (i = 0; i < sensors.quant; i++) {
... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-proc.c | static void check_location_string(struct seq_file *m, const char *c) {
while (*c) {
if (isalpha(*c) || *c == '.')
check_location(m, c);
else if (*c == '/' || *c == '-')
seq_printf(m, " at ");
c++;
}
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-proc.c | static ssize_t ppc_rtas_tone_freq_write(struct file *file,
const char __user *buf, size_t count,
loff_t *ppos) {
u64 freq;
int error = parse_number(buf, count, &freq);
if (error)
return error;
rtas_tone_frequency = freq; /* sav... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-proc.c | static int ppc_rtas_tone_freq_show(struct seq_file *m, void *v) {
seq_printf(m, "%lu\n", rtas_tone_frequency);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-rtc.c | time64_t __init rtas_get_boot_time(void) {
int ret[8];
int error;
unsigned int wait_time;
u64 max_wait_tb;
max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
do {
error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
wait_time = rtas_busy_delay_time(error);
if (wait_time)... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas-rtc.c | int rtas_set_rtc_time(struct rtc_time *tm) {
int error, wait_time;
u64 max_wait_tb;
max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
do {
error = rtas_call(rtas_token("set-time-of-day"), 7, 1, NULL,
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c | static void call_rtas_display_status_delay(char c) {
static int pending_newline = 0;
static int width = 16;
if (c == '\n') {
while (width-- > 0)
call_rtas_display_status(' ');
width = 16;
mdelay(500);
pending_newline = 1;
} else {
if (pending_newline) {
call_rtas_display_status(... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c |
void __init udbg_init_rtas_panel(void) {
udbg_putc = call_rtas_display_status_delay;
}
#ifdef CONFIG_UDBG_RTAS_CONSOLE | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c |
int rtas_token(const char *service) {
const __be32 *tokp;
if (rtas.dev == NULL)
return RTAS_UNKNOWN_SERVICE;
tokp = of_get_property(rtas.dev, service, NULL);
return tokp ? be32_to_cpu(*tokp) : RTAS_UNKNOWN_SERVICE;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c | int rtas_call(int token, int nargs, int nret, int *outputs, ...) {
va_list list;
int i;
unsigned long s;
struct rtas_args *rtas_args;
char *buff_copy = NULL;
int ret;
if (!rtas.entry || token == RTAS_UNKNOWN_SERVICE)
return -1;
if (token == ibm_open_errinjct_token || token == ibm_errinjct_token) {... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c | static int rtas_error_rc(int rtas_rc) {
int rc;
switch (rtas_rc) {
case -1:
rc = -EIO;
break;
case -3: /* Bad indicator/domain/etc */
rc = -EINVAL;
break;
case -9000: /* Isolation error */
rc = -EFAULT;
break;
case -9001: /* Outstanding TCE/PTE */
rc = -EEXIST;
break;
case... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c |
int rtas_get_power_level(int powerdomain, int *level) {
int token = rtas_token("get-power-level");
int rc;
if (token == RTAS_UNKNOWN_SERVICE)
return -ENOENT;
while ((rc = rtas_call(token, 1, 2, level, powerdomain)) == RTAS_BUSY)
udelay(1);
if (rc < 0)
return rtas_error_rc(rc);
return rc;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c |
int rtas_set_indicator(int indicator, int index, int new_value) {
int token = rtas_token("set-indicator");
int rc;
if (token == RTAS_UNKNOWN_SERVICE)
return -ENOENT;
do {
rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value);
} while (rtas_busy_delay(rc));
if (rc < 0)
return rtas_er... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c | void rtas_power_off(void) {
if (rtas_flash_term_hook)
rtas_flash_term_hook(SYS_POWER_OFF);
printk("RTAS power-off returned %d\n",
rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
for (;;)
;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas.c |
void rtas_give_timebase(void) {
unsigned long flags;
local_irq_save(flags);
hard_irq_disable();
arch_spin_lock(&timebase_lock);
rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL);
timebase = get_tb();
arch_spin_unlock(&timebase_lock);
while (timebase)
barrier();
rtas_call(rtas_token("thaw-ti... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtasd.c |
static char *rtas_event_type(int type) {
if ((type > 0) && (type < 11))
return rtas_type[type];
switch (type) {
case RTAS_TYPE_EPOW:
return "EPOW";
case RTAS_TYPE_PLATFORM:
return "Platform Error";
case RTAS_TYPE_IO:
return "I/O Event";
case RTAS_TYPE_INFO:
return "Platform Information... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtasd.c | static int log_rtas_len(char *buf) {
int len;
struct rtas_error_log *err;
uint32_t extended_log_length;
len = 8;
err = (struct rtas_error_log *)buf;
extended_log_length = rtas_error_extended_log_length(err);
if (rtas_error_extended(err) && extended_log_length) {
/* extended header */
len += exte... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtasd.c | static void rtas_event_scan(struct work_struct *w) {
unsigned int cpu;
do_event_scan();
cpus_read_lock();
cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask);
if (cpu >= nr_cpu_ids) {
cpu = cpumask_first(cpu_online_mask);
if (first_pass) {
first_pass = 0;
event_scan_delay = 30 ... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtasd.c | static void __init retrieve_nvram_error_log(void) {}
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtasd.c | static int __init surveillance_setup(char *str) {
int i;
if (!machine_is(pseries))
return 0;
if (get_option(&str, &i)) {
if (i >= 0 && i <= 255)
surveillance_timeout = i;
}
return 1;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_flash.c | static int rtas_flash_release(struct inode *inode, struct file *file) {
struct rtas_update_flash_t *const uf = &rtas_update_flash_data;
mutex_lock(&rtas_update_flash_mutex);
if (uf->flist) {
/* Clear saved list */
if (rtas_firmware_flash_list) {
free_flash_list(rtas_firmware_flash_list);
rt... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_flash.c |
static size_t get_flash_status_msg(int status, char *buf) {
const char *msg;
size_t len;
switch (status) {
case FLASH_AUTH:
msg = "error: this partition does not have service authority\n";
break;
case FLASH_NO_OP:
msg = "info: no firmware image for flash\n";
break;
case FLASH_IMG_SHORT:
... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_flash.c |
static ssize_t manage_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) {
struct rtas_manage_flash_t *const args_buf = &rtas_manage_flash_data;
char msg[RTAS_MSG_MAXLEN];
int msglen, status;
mutex_lock(&rtas_manage_flash_mutex);
status = args_buf->s... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_flash.c | static ssize_t manage_flash_write(struct file *file, const char __user *buf,
size_t count, loff_t *off) {
struct rtas_manage_flash_t *const args_buf = &rtas_manage_flash_data;
static const char reject_str[] = "0";
static const char commit_str[] = "1";
char stkbuf[10];
int op,... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_flash.c |
static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf,
char *msg, int msglen) {
int n;
if (args_buf->status >= VALIDATE_TMP_UPDATE) {
n = sprintf(msg, "%d\n", args_buf->update_results);
if ((args_buf->update_results >= VALIDATE_CUR_UNKNOWN) ||
(... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_flash.c | static ssize_t validate_flash_write(struct file *file, const char __user *buf,
size_t count, loff_t *off) {
struct rtas_validate_flash_t *const args_buf = &rtas_validate_flash_data;
int rc;
mutex_lock(&rtas_validate_flash_mutex);
if ((*off >= VALIDATE_BUF_SIZE) || (args_buf... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_flash.c | static int __init rtas_flash_init(void) {
int i;
if (rtas_token("ibm,update-flash-64-and-reboot") == RTAS_UNKNOWN_SERVICE) {
pr_info("rtas_flash: no firmware flash support\n");
return -EINVAL;
}
rtas_validate_flash_data.buf = kzalloc(VALIDATE_BUF_SIZE, GFP_KERNEL);
if (!rtas_validate_flash_data.buf)... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_flash.c |
static void __exit rtas_flash_cleanup(void) {
int i;
rtas_flash_term_hook = NULL;
if (rtas_firmware_flash_list) {
free_flash_list(rtas_firmware_flash_list);
rtas_firmware_flash_list = NULL;
}
for (i = 0; i < ARRAY_SIZE(rtas_flash_files); i++) {
const struct rtas_flash_file *f = &rtas_flash_fil... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_pci.c |
static int is_python(struct device_node *dev) {
const char *model = of_get_property(dev, "model", NULL);
if (model && strstr(model, "Python"))
return 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/rtas_pci.c |
int rtas_setup_phb(struct pci_controller *phb) {
struct device_node *dev = phb->dn;
if (is_python(dev))
python_countermeasures(dev);
if (phb_set_bus_ranges(dev, phb))
return 1;
phb->ops = &rtas_pci_ops;
phb->buid = get_phb_buid(dev);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
static int __init handle_nospectre_v1(char *p) {
no_nospec = true;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c | ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr,
char *buf) {
bool thread_priv;
thread_priv = security_ftr_enabled(SEC_FTR_L1D_THREAD_PRIV);
if (rfi_flush) {
struct seq_buf s;
seq_buf_init(&s, buf, PAGE_SIZE - 1);
seq_buf_printf(&s, "Mitigation:... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
ssize_t cpu_show_l1tf(struct device *dev, struct device_attribute *attr,
char *buf) {
return cpu_show_meltdown(dev, attr, buf);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
enum stf_barrier_type stf_barrier_type_get(void) {
return stf_enabled_flush_types;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c | static int __init handle_no_ssbd(char *p) {
handle_no_stf_barrier(NULL);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
int arch_prctl_spec_ctrl_get(struct task_struct *task, unsigned long which) {
switch (which) {
case PR_SPEC_STORE_BYPASS:
return ssb_prctl_get(task);
default:
return -ENODEV;
}
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
static int stf_barrier_get(void *data, u64 *val) {
*val = stf_barrier ? 1 : 0;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
static int __init handle_no_rfi_flush(char *p) {
pr_info("rfi-flush: disabled on command line.");
no_rfi_flush = true;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
static int __init handle_no_entry_flush(char *p) {
pr_info("entry-flush: disabled on command line.");
no_entry_flush = true;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
void rfi_flush_enable(bool enable) {
if (enable) {
do_rfi_flush_fixups(enabled_flush_types);
on_each_cpu(do_nothing, NULL, 1);
} else
do_rfi_flush_fixups(L1D_FLUSH_NONE);
rfi_flush = enable;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
static int link_stack_flush_get(void *data, u64 *val) {
if (link_stack_flush_type == BRANCH_CACHE_FLUSH_NONE)
*val = 0;
else
*val = 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
static __init int count_cache_flush_debugfs_init(void) {
debugfs_create_file_unsafe("count_cache_flush", 0600, arch_debugfs_dir, NULL,
&fops_count_cache_flush);
debugfs_create_file_unsafe("link_stack_flush", 0600, arch_debugfs_dir, NULL,
&fops_link_stack_fl... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
static int rfi_flush_get(void *data, u64 *val) {
*val = rfi_flush ? 1 : 0;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/security.c |
static int uaccess_flush_get(void *data, u64 *val) {
*val = uaccess_flush ? 1 : 0;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/secvar-sysfs.c |
static int update_kobj_size(void) {
struct device_node *node;
u64 varsize;
int rc = 0;
node = of_find_compatible_node(NULL, NULL, "ibm,secvar-backend");
if (!of_device_is_available(node)) {
rc = -ENODEV;
goto out;
}
rc = of_property_read_u64(node, "max-var-size", &varsize);
if (rc)
goto ... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/secvar-sysfs.c |
static int secvar_sysfs_init(void) {
int rc;
if (!secvar_ops) {
pr_warn("secvar: failed to retrieve secvar operations.\n");
return -ENODEV;
}
secvar_kobj = kobject_create_and_add("secvar", firmware_kobj);
if (!secvar_kobj) {
pr_err("secvar: Failed to create firmware kobj\n");
return -ENOMEM... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup-common.c |
void machine_power_off(void) {
machine_shutdown();
do_kernel_power_off();
smp_send_stop();
machine_hang();
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup-common.c | static void __init cpu_init_thread_core_maps(int tpc) {
int i;
threads_per_core = tpc;
threads_per_subcore = tpc;
cpumask_clear(&threads_core_mask);
threads_shift = ilog2(tpc);
BUG_ON(tpc != (1 << threads_shift));
for (i = 0; i < tpc; i++)
cpumask_set_cpu(i, &threads_core_mask);
printk(KERN_INFO... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup-common.c | static int ppc_panic_platform_handler(struct notifier_block *this,
unsigned long event, void *ptr) {
ppc_md.panic(ptr);
return NOTIFY_DONE;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup-common.c | void __init setup_panic(void) {
atomic_notifier_chain_register(&panic_notifier_list, &ppc_fadump_block);
if (IS_ENABLED(CONFIG_RANDOMIZE_BASE) && kaslr_offset() > 0)
atomic_notifier_chain_register(&panic_notifier_list,
&kernel_offset_notifier);
/* Low-level platform-speci... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup-common.c |
static int __init check_cache_coherency(void) {
struct device_node *np;
const void *prop;
bool devtree_coherency;
np = of_find_node_by_path("/");
prop = of_get_property(np, "coherency-off", NULL);
of_node_put(np);
devtree_coherency = prop ? false : true;
if (devtree_coherency != KERNEL_COHERENCY) {
... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/setup.h | static inline void setup_power_save(void) {}
#endif
#if defined(CONFIG_PPC64) && defined(CONFIG_SMP) | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup.h | static inline void exc_lvl_early_init(void) {}
#endif
#if defined(CONFIG_PPC64) || defined(CONFIG_VMAP_STACK) | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | void __init setup_tlb_core_data(void) {
int cpu;
BUILD_BUG_ON(offsetof(struct tlb_core_data, lock) != 0);
for_each_possible_cpu(cpu) {
int first = cpu_first_thread_sibling(cpu);
if (cpu_first_thread_sibling(boot_cpuid) == first)
first = boot_cpuid;
paca_ptrs[cpu]->tcd_ptr = &paca_ptrs[first]... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | static void __init fixup_boot_paca(struct paca_struct *boot_paca) {
boot_paca->cpu_start = 1;
#ifdef CONFIG_PPC_BOOK3S_64
/*
* Give the early boot machine check stack somewhere to use, use
* half of the init stack. This is a bit hacky but there should not be
* deep stack usage in early init so shouldn't o... | [
0,
1
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | void early_setup_secondary(void) {
irq_soft_mask_set(IRQS_DISABLED);
/* Initialize the hash table or TLB handling */
early_init_mmu_secondary();
/* Perform any KUP setup that is per-cpu */
setup_kup();
/*
* At this point, we can let interrupts switch to virtual mode
* (the MMU has been setup), so ... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | static bool use_spinloop(void) {
if (IS_ENABLED(CONFIG_PPC_BOOK3S)) {
if (firmware_has_feature(FW_FEATURE_OPAL))
return false;
return true;
}
/*
* When book3e boots from kexec, the ePAPR spin table does
* not get used.
*/
return of_property_read_bool(of_chosen, "linux,booted-from-kexec"... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | static bool __init parse_cache_info(struct device_node *np, bool icache,
struct ppc_cache_info *info) {
static const char *ipropnames[] __initdata = {
"i-cache-size",
"i-cache-sets",
"i-cache-block-size",
"i-cache-line-size",
};
static const char *dpropn... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | static int pcpu_cpu_distance(unsigned int from, unsigned int to) {
if (early_cpu_to_node(from) == early_cpu_to_node(to))
return LOCAL_DISTANCE;
else
return REMOTE_DISTANCE;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | void __init setup_per_cpu_areas(void) {
const size_t dyn_size = PERCPU_MODULE_RESERVE + PERCPU_DYNAMIC_RESERVE;
size_t atom_size;
unsigned long delta;
unsigned int cpu;
int rc = -EINVAL;
if (IS_ENABLED(CONFIG_PPC_BOOK3E_64)) {
atom_size = SZ_1M;
} else if (radix_enabled()) {
atom_size = PAGE_SIZE... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | unsigned long memory_block_size_bytes(void) {
if (ppc_md.memory_block_size)
return ppc_md.memory_block_size();
return MIN_MEMORY_BLOCK_SIZE;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/setup_64.c | u64 hw_nmi_get_sample_period(int watchdog_thresh) {
return ppc_proc_freq * watchdog_thresh;
}
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/signal.c |
unsigned long copy_vsx_from_user(struct task_struct *task, void __user *from) {
u64 buf[ELF_NVSRHALFREG];
int i;
if (__copy_from_user(buf, from, ELF_NVSRHALFREG * sizeof(double)))
return 1;
for (i = 0; i < ELF_NVSRHALFREG; i++)
task->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i];
return 0;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/signal.c | static void check_syscall_restart(struct pt_regs *regs, struct k_sigaction *ka,
int has_handler) {
unsigned long ret = regs->gpr[3];
int restart = 1;
if (!trap_is_syscall(regs))
return;
if (trap_norestart(regs))
return;
/* error signalled ? */
if (trap_is_scv(reg... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/signal.h |
static inline unsigned long copy_fpr_to_user(void __user *to,
struct task_struct *task) {
return __copy_to_user(to, task->thread.fp_state.fpr,
ELF_NFPREG * sizeof(double));
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/signal.h |
inline unsigned long copy_ckfpr_to_user(void __user *to,
struct task_struct *task) {
return __copy_to_user(to, task->thread.ckfp_state.fpr,
ELF_NFPREG * sizeof(double));
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/signal.h | static inline int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
struct task_struct *tsk) {
return -EFAULT;
}
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/signal_32.c |
static __always_inline int
__unsafe_save_general_regs(struct pt_regs *regs,
struct mcontext __user *frame) {
unsafe_copy_to_user(&frame->mc_gregs, regs, GP_REGS_SIZE, failed);
return 0;
failed:
return 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/signal_32.c | static __always_inline int
__unsafe_restore_general_regs(struct pt_regs *regs,
struct mcontext __user *sr) {
unsafe_copy_from_user(regs, &sr->mc_gregs, PT_MSR * sizeof(elf_greg_t),
failed);
/* copy from orig_r3 (the word after the MSR) up to the end */
unsaf... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/signal_32.c |
unsigned long get_min_sigframe_size_32(void) {
return max(sizeof(struct rt_sigframe) + __SIGNAL_FRAMESIZE + 16,
sizeof(struct sigframe) + __SIGNAL_FRAMESIZE);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/signal_32.c | static long restore_tm_user_regs(struct pt_regs *regs,
struct mcontext __user *sr,
struct mcontext __user *tm_sr) {
return 0;
}
#endif
#ifdef CONFIG_PPC64
#define copy_siginfo_to_user copy_siginfo_to_user32
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/signal_32.c |
static int do_setcontext(struct ucontext __user *ucp, struct pt_regs *regs,
int sig) {
sigset_t set;
struct mcontext __user *mcp;
if (!user_read_access_begin(ucp, sizeof(*ucp)))
return -EFAULT;
unsafe_get_sigset_t(&set, &ucp->uc_sigmask, failed);
#ifdef CONFIG_PPC64
{
u32 c... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/signal_64.c | static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp) {
int i;
long err = 0;
err |= __put_user(PPC_RAW_BCTRL(), &tramp[0]);
err |= __put_user(PPC_RAW_ADDI(_R1, _R1, __SIGNAL_FRAMESIZE), &tramp[1]);
err |= __put_user(PPC_RAW_LI(_R0, syscall), &tramp[2]);
err |= __put_user(PPC_RAW_S... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | int smp_generic_cpu_bootable(unsigned int nr) {
if (system_state < SYSTEM_RUNNING && cpu_has_feature(CPU_FTR_SMT)) {
if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
return 0;
if (smt_enabled_at_boot && cpu_thread_in_core(nr) >= smt_enabled_at_boot)
return 0;
}
return 1;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
static irqreturn_t call_function_action(int irq, void *data) {
generic_smp_call_function_interrupt();
return IRQ_HANDLED;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | void smp_muxed_ipi_set_message(int cpu, int msg) {
struct cpu_messages *info = &per_cpu(ipi_message, cpu);
char *message = (char *)&info->messages;
smp_mb();
message[msg] = 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | irqreturn_t smp_ipi_demux(void) {
mb();
return smp_ipi_demux_relaxed();
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
void arch_send_call_function_single_ipi(int cpu) {
do_message_pass(cpu, PPC_MSG_CALL_FUNCTION);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
noinstr static void nmi_ipi_lock(void) {
while (arch_atomic_cmpxchg(&__nmi_ipi_lock, 0, 1) == 1)
spin_until_cond(arch_atomic_read(&__nmi_ipi_lock) == 0);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
noinstr static void nmi_ipi_unlock(void) {
smp_mb();
WARN_ON(arch_atomic_read(&__nmi_ipi_lock) != 1);
arch_atomic_set(&__nmi_ipi_lock, 0);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
noinstr static void nmi_ipi_unlock_end(unsigned long *flags) {
nmi_ipi_unlock();
raw_local_irq_restore(*flags);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | int smp_send_safe_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us) {
return __smp_send_nmi_ipi(cpu, fn, delay_us, true);
}
#endif
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)) {
int cpu;
smp_send_nmi_ipi(NMI_IPI_ALL_OTHERS, crash_ipi_callback, 1000000);
if (kdump_in_progress() && crash_wake_offline) {
for_each_present_cpu(cpu) {
if (cpu_online(cpu))
continue;
do_smp_send_nmi_ipi(cpu, false);
... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | void smp_send_stop(void) {
static bool stopped = false;
if (stopped)
return;
stopped = true;
smp_call_function(stop_this_cpu, NULL, 0);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | static int parse_thread_groups(struct device_node *dn,
struct thread_groups_list *tglp) {
unsigned int property_idx = 0;
u32 *thread_group_array;
size_t total_threads;
int ret = 0, count;
u32 *thread_list;
int i = 0;
count = of_property_count_u32_elems(dn, "ibm,thread-group... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
static int __init update_mask_from_threadgroup(cpumask_var_t *mask,
struct thread_groups *tg,
int cpu, int cpu_group_start) {
int first_thread = cpu_first_thread_sibling(cpu);
int i;
zalloc_cpumask_var_node(mask, GFP_K... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
static int __init init_thread_group_cache_map(int cpu, int cache_property)
{
int cpu_group_start = -1, err = 0;
struct thread_groups *tg = NULL;
cpumask_var_t *mask = NULL;
if (cache_property != THREAD_GROUP_SHARE_L1 &&
cache_property != THREAD_GROUP_SHARE_L2_L3)
return -EINVAL;
tg = get_thread_... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | static int powerpc_smt_flags(void) {
int flags = SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES;
if (cpu_has_feature(CPU_FTR_ASYM_SMT)) {
printk_once(KERN_INFO "Enabling Asymmetric SMT scheduling\n");
flags |= SD_ASYM_PACKING;
}
return flags;
}
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
static int __init init_big_cores(void) {
int cpu;
for_each_possible_cpu(cpu) {
int err = init_thread_group_cache_map(cpu, THREAD_GROUP_SHARE_L1);
if (err)
return err;
zalloc_cpumask_var_node(&per_cpu(cpu_smallcore_map, cpu), GFP_KERNEL,
cpu_to_node(cpu));
}
has... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
void generic_cpu_die(unsigned int cpu) {
int i;
for (i = 0; i < 100; i++) {
smp_rmb();
if (is_cpu_dead(cpu))
return;
msleep(100);
}
printk(KERN_ERR "CPU%d didn't die...\n", cpu);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c |
int is_cpu_dead(unsigned int cpu) {
return per_cpu(cpu_state, cpu) == CPU_DEAD;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | int cpu_core_index_of_thread(int cpu) { return cpu >> threads_shift; } | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | static void update_coregroup_mask(int cpu, cpumask_var_t *mask) {
struct cpumask *(*submask_fn)(int) = cpu_sibling_mask;
int coregroup_id = cpu_to_coregroup_id(cpu);
int i;
if (shared_caches)
submask_fn = cpu_l2_cache_mask;
if (!*mask) {
for_each_cpu(i, submask_fn(cpu))
set_cpus_related(cpu... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/smp.c | void start_secondary(void *unused) {
unsigned int cpu = raw_smp_processor_id();
if (IS_ENABLED(CONFIG_PPC32))
setup_kup();
mmgrab(&init_mm);
current->active_mm = &init_mm;
smp_store_cpu_info(cpu);
set_dec(tb_ticks_per_jiffy);
rcu_cpu_starting(cpu);
cpu_callin_map[cpu] = 1;
if (smp_ops->setup_c... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/stacktrace.c | void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self) {
nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace_ipi);
}
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/sysfs.c | static ssize_t store_smt_snooze_delay(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count) {
pr_warn_once(
"%s (%d) stored to unsupported smt_snooze_delay, which has no effect.\n",
current->comm, curre... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.