/openbmc/linux/drivers/input/keyboard/ |
H A D | bcm-keypad.c | 85 static int bcm_kp_get_keycode(struct bcm_kp *kp, int row, int col) in bcm_kp_get_keycode() argument 87 unsigned int row_shift = get_count_order(kp->n_cols); in bcm_kp_get_keycode() 88 unsigned short *keymap = kp->input_dev->keycode; in bcm_kp_get_keycode() 93 static void bcm_kp_report_keys(struct bcm_kp *kp, int reg_num, int pull_mode) in bcm_kp_report_keys() argument 102 writel(0xFFFFFFFF, kp->base + KPICRN_OFFSET(reg_num)); in bcm_kp_report_keys() 104 state = readl(kp->base + KPSSRN_OFFSET(reg_num)); in bcm_kp_report_keys() 105 change = kp->last_state[reg_num] ^ state; in bcm_kp_report_keys() 106 kp->last_state[reg_num] = state; in bcm_kp_report_keys() 114 keycode = bcm_kp_get_keycode(kp, row, col); in bcm_kp_report_keys() 115 input_report_key(kp->input_dev, keycode, key_press); in bcm_kp_report_keys() [all …]
|
H A D | pmic8xxx-keypad.c | 108 static u8 pmic8xxx_col_state(struct pmic8xxx_kp *kp, u8 col) in pmic8xxx_col_state() argument 112 return 1 << kp->num_cols; in pmic8xxx_col_state() 114 return col & ((1 << kp->num_cols) - 1); in pmic8xxx_col_state() 129 static int pmic8xxx_chk_sync_read(struct pmic8xxx_kp *kp) in pmic8xxx_chk_sync_read() argument 134 rc = regmap_read(kp->regmap, KEYP_SCAN, &scan_val); in pmic8xxx_chk_sync_read() 136 dev_err(kp->dev, "Error reading KEYP_SCAN reg, rc=%d\n", rc); in pmic8xxx_chk_sync_read() 142 rc = regmap_write(kp->regmap, KEYP_SCAN, scan_val); in pmic8xxx_chk_sync_read() 144 dev_err(kp->dev, "Error writing KEYP_SCAN reg, rc=%d\n", rc); in pmic8xxx_chk_sync_read() 154 static int pmic8xxx_kp_read_data(struct pmic8xxx_kp *kp, u16 *state, in pmic8xxx_kp_read_data() argument 161 rc = regmap_read(kp->regmap, data_reg, &val); in pmic8xxx_kp_read_data() [all …]
|
H A D | twl4030_keypad.c | 125 static int twl4030_kpread(struct twl4030_keypad *kp, in twl4030_kpread() argument 131 dev_warn(kp->dbg_dev, in twl4030_kpread() 138 static int twl4030_kpwrite_u8(struct twl4030_keypad *kp, u8 data, u32 reg) in twl4030_kpwrite_u8() argument 143 dev_warn(kp->dbg_dev, in twl4030_kpwrite_u8() 150 static inline u16 twl4030_col_xlate(struct twl4030_keypad *kp, u8 col) in twl4030_col_xlate() argument 159 return 1 << kp->n_cols; in twl4030_col_xlate() 161 return col & ((1 << kp->n_cols) - 1); in twl4030_col_xlate() 164 static int twl4030_read_kp_matrix_state(struct twl4030_keypad *kp, u16 *state) in twl4030_read_kp_matrix_state() argument 168 int ret = twl4030_kpread(kp, new_state, in twl4030_read_kp_matrix_state() 169 KEYP_FULL_CODE_7_0, kp->n_rows); in twl4030_read_kp_matrix_state() [all …]
|
/openbmc/linux/drivers/pwm/ |
H A D | pwm-bcm-kona.c | 72 static void kona_pwmc_prepare_for_settings(struct kona_pwmc *kp, in kona_pwmc_prepare_for_settings() argument 75 unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_prepare_for_settings() 79 writel(value, kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_prepare_for_settings() 88 static void kona_pwmc_apply_settings(struct kona_pwmc *kp, unsigned int chan) in kona_pwmc_apply_settings() argument 90 unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_apply_settings() 95 writel(value, kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_apply_settings() 104 struct kona_pwmc *kp = to_kona_pwmc(chip); in kona_pwmc_config() local 120 rate = clk_get_rate(kp->clk); in kona_pwmc_config() 141 kona_pwmc_prepare_for_settings(kp, chan); in kona_pwmc_config() 143 value = readl(kp->base + PRESCALE_OFFSET); in kona_pwmc_config() [all …]
|
/openbmc/linux/arch/s390/lib/ |
H A D | test_kprobes.c | 9 static struct kprobe kp; variable 11 static void setup_kprobe(struct kunit *test, struct kprobe *kp, in setup_kprobe() argument 14 kp->offset = offset; in setup_kprobe() 15 kp->addr = NULL; in setup_kprobe() 16 kp->symbol_name = symbol; in setup_kprobe() 19 static void test_kprobe_offset(struct kunit *test, struct kprobe *kp, in test_kprobe_offset() argument 24 setup_kprobe(test, kp, target, 0); in test_kprobe_offset() 25 ret = register_kprobe(kp); in test_kprobe_offset() 27 unregister_kprobe(kp); in test_kprobe_offset() 29 setup_kprobe(test, kp, target, offset); in test_kprobe_offset() [all …]
|
/openbmc/linux/crypto/ |
H A D | aes_generic.c | 1180 const u32 *kp = ctx->key_enc + 4; in crypto_aes_encrypt() local 1189 f_nround(b1, b0, kp); in crypto_aes_encrypt() 1190 f_nround(b0, b1, kp); in crypto_aes_encrypt() 1194 f_nround(b1, b0, kp); in crypto_aes_encrypt() 1195 f_nround(b0, b1, kp); in crypto_aes_encrypt() 1198 f_nround(b1, b0, kp); in crypto_aes_encrypt() 1199 f_nround(b0, b1, kp); in crypto_aes_encrypt() 1200 f_nround(b1, b0, kp); in crypto_aes_encrypt() 1201 f_nround(b0, b1, kp); in crypto_aes_encrypt() 1202 f_nround(b1, b0, kp); in crypto_aes_encrypt() [all …]
|
H A D | vmac.c | 149 #define nh_16(mp, kp, nw, rh, rl) \ argument 154 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \ 155 pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \ 160 #define nh_16_2(mp, kp, nw, rh, rl, rh1, rl1) \ argument 165 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \ 166 pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \ 168 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i+2], \ 169 pe64_to_cpup((mp)+i+1)+(kp)[i+3]); \ 175 #define nh_vmac_nhbytes(mp, kp, nw, rh, rl) \ argument 180 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \ [all …]
|
/openbmc/linux/kernel/ |
H A D | params.c | 101 static bool param_check_unsafe(const struct kernel_param *kp) in param_check_unsafe() argument 103 if (kp->flags & KERNEL_PARAM_FL_HWPARAM && in param_check_unsafe() 107 if (kp->flags & KERNEL_PARAM_FL_UNSAFE) { in param_check_unsafe() 109 kp->name); in param_check_unsafe() 219 int param_set_##name(const char *val, const struct kernel_param *kp) \ 221 return strtolfn(val, 0, (type *)kp->arg); \ 223 int param_get_##name(char *buffer, const struct kernel_param *kp) \ 226 *((type *)kp->arg)); \ 247 int param_set_uint_minmax(const char *val, const struct kernel_param *kp, in param_set_uint_minmax() argument 260 *((unsigned int *)kp->arg) = num; in param_set_uint_minmax() [all …]
|
H A D | fail_function.c | 15 static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs); 17 static void fei_post_handler(struct kprobe *kp, struct pt_regs *regs, in fei_post_handler() argument 28 struct kprobe kp; member 62 attr->kp.symbol_name = kstrdup(sym, GFP_KERNEL); in fei_attr_new() 63 if (!attr->kp.symbol_name) { in fei_attr_new() 67 attr->kp.pre_handler = fei_kprobe_handler; in fei_attr_new() 68 attr->kp.post_handler = fei_post_handler; in fei_attr_new() 78 kfree(attr->kp.symbol_name); in fei_attr_free() 88 if (!strcmp(attr->kp.symbol_name, sym)) in fei_attr_lookup() 124 if (attr->kp.addr) { in fei_retval_set() [all …]
|
H A D | kprobes.c | 360 static inline void set_kprobe_instance(struct kprobe *kp) in set_kprobe_instance() argument 362 __this_cpu_write(kprobe_instance, kp); in set_kprobe_instance() 424 struct kprobe *kp; in opt_pre_handler() local 426 list_for_each_entry_rcu(kp, &p->list, list) { in opt_pre_handler() 427 if (kp->pre_handler && likely(!kprobe_disabled(kp))) { in opt_pre_handler() 428 set_kprobe_instance(kp); in opt_pre_handler() 429 kp->pre_handler(kp, regs); in opt_pre_handler() 441 op = container_of(p, struct optimized_kprobe, kp); in free_aggr_kprobe() 453 op = container_of(p, struct optimized_kprobe, kp); in kprobe_optready() 469 op = container_of(p, struct optimized_kprobe, kp); in kprobe_disarmed() [all …]
|
/openbmc/linux/arch/x86/kernel/kprobes/ |
H A D | opt.c | 40 struct kprobe *kp; in __recover_optprobed_insn() local 45 kp = get_kprobe((void *)addr - i); in __recover_optprobed_insn() 47 if (kp && kprobe_optimized(kp)) { in __recover_optprobed_insn() 48 op = container_of(kp, struct optimized_kprobe, kp); in __recover_optprobed_insn() 66 if (addr == (unsigned long)kp->addr) { in __recover_optprobed_insn() 67 buf[0] = kp->opcode; in __recover_optprobed_insn() 70 offs = addr - (unsigned long)kp->addr - 1; in __recover_optprobed_insn() 180 if (kprobe_disabled(&op->kp)) in optimized_callback() 185 kprobes_inc_nmissed_count(&op->kp); in optimized_callback() 195 regs->ip = (unsigned long)op->kp.addr + INT3_INSN_SIZE; in optimized_callback() [all …]
|
/openbmc/linux/include/linux/ |
H A D | moduleparam.h | 51 int (*set)(const char *val, const struct kernel_param *kp); 53 int (*get)(char *buffer, const struct kernel_param *kp); 412 extern int param_set_byte(const char *val, const struct kernel_param *kp); 413 extern int param_get_byte(char *buffer, const struct kernel_param *kp); 417 extern int param_set_short(const char *val, const struct kernel_param *kp); 418 extern int param_get_short(char *buffer, const struct kernel_param *kp); 422 extern int param_set_ushort(const char *val, const struct kernel_param *kp); 423 extern int param_get_ushort(char *buffer, const struct kernel_param *kp); 427 extern int param_set_int(const char *val, const struct kernel_param *kp); 428 extern int param_get_int(char *buffer, const struct kernel_param *kp); [all …]
|
/openbmc/linux/arch/arm/probes/kprobes/ |
H A D | opt-arm.c | 125 static int can_optimize(struct kprobe *kp) in can_optimize() argument 127 if (kp->ainsn.stack_space < 0) in can_optimize() 133 if (kp->ainsn.stack_space > 255 - sizeof(struct pt_regs)) in can_optimize() 152 struct kprobe *p = &op->kp; in optimized_callback() 156 regs->ARM_pc = (unsigned long)op->kp.addr; in optimized_callback() 163 kprobes_inc_nmissed_count(&op->kp); in optimized_callback() 165 __this_cpu_write(current_kprobe, &op->kp); in optimized_callback() 167 opt_pre_handler(&op->kp, regs); in optimized_callback() 176 op->kp.ainsn.insn_singlestep(p->opcode, &p->ainsn, regs); in optimized_callback() 264 (unsigned long)(op->kp.addr) + 4); in NOKPROBE_SYMBOL() [all …]
|
/openbmc/linux/drivers/ufs/core/ |
H A D | ufs-fault-injection.c | 9 static int ufs_fault_get(char *buffer, const struct kernel_param *kp); 10 static int ufs_fault_set(const char *val, const struct kernel_param *kp); 35 static int ufs_fault_get(char *buffer, const struct kernel_param *kp) in ufs_fault_get() argument 37 const char *fault_str = kp->arg; in ufs_fault_get() 42 static int ufs_fault_set(const char *val, const struct kernel_param *kp) in ufs_fault_set() argument 46 if (kp->arg == g_trigger_eh_str) in ufs_fault_set() 48 else if (kp->arg == g_timeout_str) in ufs_fault_set() 57 strscpy(kp->arg, val, FAULT_INJ_STR_SIZE); in ufs_fault_set()
|
/openbmc/linux/drivers/accessibility/speakup/ |
H A D | keyhelp.c | 51 u_char *kp, counters[MAXFUNCS], ch, ch1; in build_key_data() local 58 kp = state_tbl + nstates + 1; in build_key_data() 59 while (*kp++) { in build_key_data() 61 for (i = 0; i < nstates; i++, kp++) { in build_key_data() 62 if (!*kp) in build_key_data() 64 if ((state_tbl[i] & 16) != 0 && *kp == SPK_KEY) in build_key_data() 66 counters[*kp]++; in build_key_data() 81 kp = state_tbl + nstates + 1; in build_key_data() 82 while ((ch = *kp++)) { in build_key_data() 84 ch1 = *kp++; in build_key_data() [all …]
|
H A D | genmap.c | 22 static unsigned char key_data[MAXKEYVAL][16], *kp; variable 131 kp = key_data[lc]; in main() 132 if (!memcmp(key_data[0], kp, 16)) in main() 136 if (kp[i] != spk_val && kp[i] != lock_val) in main() 142 kp[shift_state] = kp[i]; in main() 152 kp = key_data[lc]; in main() 153 if (!memcmp(key_data[0], kp, 16)) in main() 157 printf(" %d,", (unsigned int)kp[i]); in main()
|
/openbmc/linux/lib/ |
H A D | test_kprobes.c | 55 static struct kprobe kp = { variable 64 KUNIT_EXPECT_EQ(test, 0, register_kprobe(&kp)); in test_kprobe() 66 unregister_kprobe(&kp); in test_kprobe() 124 struct kprobe *kps[2] = {&kp, &kp2}; in test_kprobes() 129 kp.addr = NULL; in test_kprobes() 130 kp.flags = 0; in test_kprobes() 196 .kp.symbol_name = "kprobe_target" 221 .kp.symbol_name = "kprobe_target2" 230 rp.kp.addr = NULL; in test_kretprobes() 231 rp.kp.flags = 0; in test_kretprobes() [all …]
|
/openbmc/linux/drivers/power/supply/ |
H A D | test_power.c | 345 static int param_set_ac_online(const char *key, const struct kernel_param *kp) in param_set_ac_online() argument 352 static int param_get_ac_online(char *buffer, const struct kernel_param *kp) in param_get_ac_online() argument 358 static int param_set_usb_online(const char *key, const struct kernel_param *kp) in param_set_usb_online() argument 365 static int param_get_usb_online(char *buffer, const struct kernel_param *kp) in param_get_usb_online() argument 372 const struct kernel_param *kp) in param_set_battery_status() argument 379 static int param_get_battery_status(char *buffer, const struct kernel_param *kp) in param_get_battery_status() argument 386 const struct kernel_param *kp) in param_set_battery_health() argument 393 static int param_get_battery_health(char *buffer, const struct kernel_param *kp) in param_get_battery_health() argument 400 const struct kernel_param *kp) in param_set_battery_present() argument 408 const struct kernel_param *kp) in param_get_battery_present() argument [all …]
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | optprobes.c | 100 if (kprobe_disabled(&op->kp)) in optimized_callback() 106 kprobes_inc_nmissed_count(&op->kp); in optimized_callback() 108 __this_cpu_write(current_kprobe, &op->kp); in optimized_callback() 109 regs_set_return_ip(regs, (unsigned long)op->kp.addr); in optimized_callback() 111 opt_pre_handler(&op->kp, regs); in optimized_callback() 277 memcpy(op->optinsn.copied_insn, op->kp.addr, RELATIVEJUMP_SIZE); in arch_optimize_kprobes() 278 create_branch(&instr, op->kp.addr, (unsigned long)op->optinsn.insn, 0); in arch_optimize_kprobes() 279 patch_instruction(op->kp.addr, instr); in arch_optimize_kprobes() 286 arch_arm_kprobe(&op->kp); in arch_unoptimize_kprobe() 302 return (op->kp.addr <= addr && in arch_within_optimized_kprobe() [all …]
|
/openbmc/linux/samples/kprobes/ |
H A D | kprobe_example.c | 23 static struct kprobe kp = { variable 108 kp.pre_handler = handler_pre; in kprobe_init() 109 kp.post_handler = handler_post; in kprobe_init() 111 ret = register_kprobe(&kp); in kprobe_init() 116 pr_info("Planted kprobe at %p\n", kp.addr); in kprobe_init() 122 unregister_kprobe(&kp); in kprobe_exit() 123 pr_info("kprobe at %p unregistered\n", kp.addr); in kprobe_exit()
|
H A D | kretprobe_example.c | 84 my_kretprobe.kp.symbol_name = func_name; in kretprobe_init() 91 my_kretprobe.kp.symbol_name, my_kretprobe.kp.addr); in kretprobe_init() 98 pr_info("kretprobe at %p unregistered\n", my_kretprobe.kp.addr); in kretprobe_exit() 102 my_kretprobe.nmissed, my_kretprobe.kp.symbol_name); in kretprobe_exit()
|
/openbmc/linux/kernel/trace/ |
H A D | trace_kprobe.c | 97 return tk->rp.kp.offset; in trace_kprobe_offset() 102 return kprobe_gone(&tk->rp.kp); in trace_kprobe_has_gone() 149 snprintf(buf, sizeof(buf), "0x%p", tk->rp.kp.addr); in trace_kprobe_match_command_head() 150 else if (tk->rp.kp.offset) in trace_kprobe_match_command_head() 152 trace_kprobe_symbol(tk), tk->rp.kp.offset); in trace_kprobe_match_command_head() 186 return !(list_empty(&tk->rp.kp.list) && in trace_kprobe_is_registered() 187 hlist_unhashed(&tk->rp.kp.hlist)); in trace_kprobe_is_registered() 200 addr += tk->rp.kp.offset; in trace_kprobe_address() 202 addr = (unsigned long)tk->rp.kp.addr; in trace_kprobe_address() 223 return tk ? (kprobe_on_func_entry(tk->rp.kp.addr, in trace_kprobe_on_func_entry() [all …]
|
/openbmc/linux/security/apparmor/ |
H A D | lsm.c | 1355 static int param_set_aabool(const char *val, const struct kernel_param *kp); 1356 static int param_get_aabool(char *buffer, const struct kernel_param *kp); 1364 static int param_set_aauint(const char *val, const struct kernel_param *kp); 1365 static int param_get_aauint(char *buffer, const struct kernel_param *kp); 1373 const struct kernel_param *kp); 1375 const struct kernel_param *kp); 1382 static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp); 1383 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp); 1391 static int param_set_audit(const char *val, const struct kernel_param *kp); 1392 static int param_get_audit(char *buffer, const struct kernel_param *kp); [all …]
|
/openbmc/linux/tools/thermal/tmon/ |
H A D | pid.c | 61 p_param.kp = .36; in init_thermal_controller() 100 p_term = -p_param.kp * (xk - xk_1); in controller_handler() 101 i_term = p_param.kp * p_param.ki * p_param.ts * ek; in controller_handler() 102 d_term = -p_param.kp * p_param.kd * (xk - 2 * xk_1 + xk_2) / p_param.ts; in controller_handler()
|
/openbmc/linux/mm/ |
H A D | slab_common.c | 559 struct kmem_obj_info kp = { }; in kmem_dump_obj() local 568 kmem_obj_info(&kp, object, slab); in kmem_dump_obj() 569 if (kp.kp_slab_cache) in kmem_dump_obj() 570 pr_cont(" slab%s %s", cp, kp.kp_slab_cache->name); in kmem_dump_obj() 575 if (kp.kp_objp) in kmem_dump_obj() 576 pr_cont(" start %px", kp.kp_objp); in kmem_dump_obj() 577 if (kp.kp_data_offset) in kmem_dump_obj() 578 pr_cont(" data offset %lu", kp.kp_data_offset); in kmem_dump_obj() 579 if (kp.kp_objp) { in kmem_dump_obj() 580 ptroffset = ((char *)object - (char *)kp.kp_objp) - kp.kp_data_offset; in kmem_dump_obj() [all …]
|