Home
last modified time | relevance | path

Searched refs:kp (Results 1 – 25 of 191) sorted by relevance

12345678

/kernel/linux/linux-5.10/drivers/input/keyboard/
Dbcm-keypad.c95 static int bcm_kp_get_keycode(struct bcm_kp *kp, int row, int col) in bcm_kp_get_keycode() argument
97 unsigned int row_shift = get_count_order(kp->n_cols); in bcm_kp_get_keycode()
98 unsigned short *keymap = kp->input_dev->keycode; in bcm_kp_get_keycode()
103 static void bcm_kp_report_keys(struct bcm_kp *kp, int reg_num, int pull_mode) in bcm_kp_report_keys() argument
112 writel(0xFFFFFFFF, kp->base + KPICRN_OFFSET(reg_num)); in bcm_kp_report_keys()
114 state = readl(kp->base + KPSSRN_OFFSET(reg_num)); in bcm_kp_report_keys()
115 change = kp->last_state[reg_num] ^ state; in bcm_kp_report_keys()
116 kp->last_state[reg_num] = state; in bcm_kp_report_keys()
124 keycode = bcm_kp_get_keycode(kp, row, col); in bcm_kp_report_keys()
125 input_report_key(kp->input_dev, keycode, key_press); in bcm_kp_report_keys()
[all …]
Dpmic8xxx-keypad.c108 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 …]
Dtwl4030_keypad.c125 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 …]
/kernel/linux/linux-5.10/drivers/staging/media/atomisp/pci/
Datomisp_compat_ioctl32.c48 static int get_atomisp_histogram32(struct atomisp_histogram __user *kp, in get_atomisp_histogram32() argument
54 assign_in_user(&kp->num_elements, &up->num_elements) || in get_atomisp_histogram32()
56 put_user(compat_ptr(tmp), &kp->data)) in get_atomisp_histogram32()
62 static int put_atomisp_histogram32(struct atomisp_histogram __user *kp, in put_atomisp_histogram32() argument
68 assign_in_user(&up->num_elements, &kp->num_elements) || in put_atomisp_histogram32()
69 get_user(tmp, &kp->data) || in put_atomisp_histogram32()
76 static int get_v4l2_framebuffer32(struct v4l2_framebuffer __user *kp, in get_v4l2_framebuffer32() argument
83 put_user_force(compat_ptr(tmp), &kp->base) || in get_v4l2_framebuffer32()
84 assign_in_user(&kp->capability, &up->capability) || in get_v4l2_framebuffer32()
85 assign_in_user(&kp->flags, &up->flags) || in get_v4l2_framebuffer32()
[all …]
/kernel/linux/linux-5.10/drivers/pwm/
Dpwm-bcm-kona.c82 static void kona_pwmc_prepare_for_settings(struct kona_pwmc *kp, in kona_pwmc_prepare_for_settings() argument
85 unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_prepare_for_settings()
89 writel(value, kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_prepare_for_settings()
98 static void kona_pwmc_apply_settings(struct kona_pwmc *kp, unsigned int chan) in kona_pwmc_apply_settings() argument
100 unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_apply_settings()
105 writel(value, kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_apply_settings()
114 struct kona_pwmc *kp = to_kona_pwmc(chip); in kona_pwmc_config() local
130 rate = clk_get_rate(kp->clk); in kona_pwmc_config()
159 kona_pwmc_prepare_for_settings(kp, chan); in kona_pwmc_config()
161 value = readl(kp->base + PRESCALE_OFFSET); in kona_pwmc_config()
[all …]
/kernel/linux/linux-5.10/crypto/
Daes_generic.c1180 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 …]
Dvmac.c148 #define nh_16(mp, kp, nw, rh, rl) \ argument
153 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \
154 pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \
159 #define nh_16_2(mp, kp, nw, rh, rl, rh1, rl1) \ argument
164 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \
165 pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \
167 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i+2], \
168 pe64_to_cpup((mp)+i+1)+(kp)[i+3]); \
174 #define nh_vmac_nhbytes(mp, kp, nw, rh, rl) \ argument
179 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \
[all …]
/kernel/linux/linux-5.10/kernel/
Dparams.c100 static bool param_check_unsafe(const struct kernel_param *kp) in param_check_unsafe() argument
102 if (kp->flags & KERNEL_PARAM_FL_HWPARAM && in param_check_unsafe()
106 if (kp->flags & KERNEL_PARAM_FL_UNSAFE) { in param_check_unsafe()
108 kp->name); in param_check_unsafe()
218 int param_set_##name(const char *val, const struct kernel_param *kp) \
220 return strtolfn(val, 0, (type *)kp->arg); \
222 int param_get_##name(char *buffer, const struct kernel_param *kp) \
225 *((type *)kp->arg)); \
246 int param_set_charp(const char *val, const struct kernel_param *kp) in param_set_charp() argument
249 pr_err("%s: string parameter too long\n", kp->name); in param_set_charp()
[all …]
Dfail_function.c15 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 …]
Dkprobes.c348 static inline void set_kprobe_instance(struct kprobe *kp) in set_kprobe_instance() argument
350 __this_cpu_write(kprobe_instance, kp); in set_kprobe_instance()
414 struct kprobe *kp; in opt_pre_handler() local
416 list_for_each_entry_rcu(kp, &p->list, list) { in opt_pre_handler()
417 if (kp->pre_handler && likely(!kprobe_disabled(kp))) { in opt_pre_handler()
418 set_kprobe_instance(kp); in opt_pre_handler()
419 kp->pre_handler(kp, regs); in opt_pre_handler()
431 op = container_of(p, struct optimized_kprobe, kp); in free_aggr_kprobe()
443 op = container_of(p, struct optimized_kprobe, kp); in kprobe_optready()
459 op = container_of(p, struct optimized_kprobe, kp); in kprobe_disarmed()
[all …]
Dtest_kprobes.c50 static struct kprobe kp = { variable
60 ret = register_kprobe(&kp); in test_kprobe()
67 unregister_kprobe(&kp); in test_kprobe()
112 struct kprobe *kps[2] = {&kp, &kp2}; in test_kprobes()
115 kp.addr = NULL; in test_kprobes()
116 kp.flags = 0; in test_kprobes()
193 .kp.symbol_name = "kprobe_target"
236 .kp.symbol_name = "kprobe_target2"
245 rp.kp.addr = NULL; in test_kretprobes()
246 rp.kp.flags = 0; in test_kretprobes()
/kernel/linux/linux-5.10/arch/x86/kernel/kprobes/
Dopt.c39 struct kprobe *kp; in __recover_optprobed_insn() local
44 kp = get_kprobe((void *)addr - i); in __recover_optprobed_insn()
46 if (kp && kprobe_optimized(kp)) { in __recover_optprobed_insn()
47 op = container_of(kp, struct optimized_kprobe, kp); in __recover_optprobed_insn()
65 if (addr == (unsigned long)kp->addr) { in __recover_optprobed_insn()
66 buf[0] = kp->opcode; in __recover_optprobed_insn()
69 offs = addr - (unsigned long)kp->addr - 1; in __recover_optprobed_insn()
174 if (kprobe_disabled(&op->kp)) in optimized_callback()
179 kprobes_inc_nmissed_count(&op->kp); in optimized_callback()
187 regs->ip = (unsigned long)op->kp.addr + INT3_INSN_SIZE; in optimized_callback()
[all …]
/kernel/linux/linux-5.10/arch/arm/probes/kprobes/
Dopt-arm.c125 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()
154 struct kprobe *p = &op->kp; in optimized_callback()
158 regs->ARM_pc = (unsigned long)op->kp.addr; in optimized_callback()
165 kprobes_inc_nmissed_count(&op->kp); in optimized_callback()
167 __this_cpu_write(current_kprobe, &op->kp); in optimized_callback()
169 opt_pre_handler(&op->kp, regs); in optimized_callback()
178 op->kp.ainsn.insn_singlestep(p->opcode, &p->ainsn, regs); in optimized_callback()
266 (unsigned long)(op->kp.addr) + 4); in NOKPROBE_SYMBOL()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dmoduleparam.h51 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 …]
Dkprobes.h148 struct kprobe kp; member
316 struct kprobe kp; member
391 int disable_kprobe(struct kprobe *kp);
392 int enable_kprobe(struct kprobe *kp);
394 void dump_kprobe(struct kprobe *kp);
456 static inline int disable_kprobe(struct kprobe *kp) in disable_kprobe() argument
460 static inline int enable_kprobe(struct kprobe *kp) in enable_kprobe() argument
477 return disable_kprobe(&rp->kp); in disable_kretprobe()
481 return enable_kprobe(&rp->kp); in enable_kretprobe()
/kernel/linux/linux-5.10/drivers/accessibility/speakup/
Dkeyhelp.c51 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 …]
/kernel/linux/linux-5.10/samples/kprobes/
Dkprobe_example.c23 static struct kprobe kp = { variable
99 kp.pre_handler = handler_pre; in kprobe_init()
100 kp.post_handler = handler_post; in kprobe_init()
101 kp.fault_handler = handler_fault; in kprobe_init()
103 ret = register_kprobe(&kp); in kprobe_init()
108 pr_info("Planted kprobe at %p\n", kp.addr); in kprobe_init()
114 unregister_kprobe(&kp); in kprobe_exit()
115 pr_info("kprobe at %p unregistered\n", kp.addr); in kprobe_exit()
Dkretprobe_example.c85 my_kretprobe.kp.symbol_name = func_name; in kretprobe_init()
92 my_kretprobe.kp.symbol_name, my_kretprobe.kp.addr); in kretprobe_init()
99 pr_info("kretprobe at %p unregistered\n", my_kretprobe.kp.addr); in kretprobe_exit()
103 my_kretprobe.nmissed, my_kretprobe.kp.symbol_name); in kretprobe_exit()
/kernel/linux/linux-5.10/drivers/power/supply/
Dtest_power.c346 static int param_set_ac_online(const char *key, const struct kernel_param *kp) in param_set_ac_online() argument
353 static int param_get_ac_online(char *buffer, const struct kernel_param *kp) in param_get_ac_online() argument
359 static int param_set_usb_online(const char *key, const struct kernel_param *kp) in param_set_usb_online() argument
366 static int param_get_usb_online(char *buffer, const struct kernel_param *kp) in param_get_usb_online() argument
373 const struct kernel_param *kp) in param_set_battery_status() argument
380 static int param_get_battery_status(char *buffer, const struct kernel_param *kp) in param_get_battery_status() argument
387 const struct kernel_param *kp) in param_set_battery_health() argument
394 static int param_get_battery_health(char *buffer, const struct kernel_param *kp) in param_get_battery_health() argument
401 const struct kernel_param *kp) in param_set_battery_present() argument
409 const struct kernel_param *kp) in param_get_battery_present() argument
[all …]
/kernel/linux/linux-5.10/arch/powerpc/kernel/
Doptprobes.c117 if (kprobe_disabled(&op->kp)) in optimized_callback()
123 kprobes_inc_nmissed_count(&op->kp); in optimized_callback()
125 __this_cpu_write(current_kprobe, &op->kp); in optimized_callback()
126 regs->nip = (unsigned long)op->kp.addr; in optimized_callback()
128 opt_pre_handler(&op->kp, regs); in optimized_callback()
332 memcpy(op->optinsn.copied_insn, op->kp.addr, in arch_optimize_kprobes()
335 (struct ppc_inst *)op->kp.addr, in arch_optimize_kprobes()
337 patch_instruction((struct ppc_inst *)op->kp.addr, instr); in arch_optimize_kprobes()
344 arch_arm_kprobe(&op->kp); in arch_unoptimize_kprobe()
362 return ((unsigned long)op->kp.addr <= addr && in arch_within_optimized_kprobe()
[all …]
/kernel/linux/linux-5.10/kernel/trace/
Dtrace_kprobe.c99 return tk->rp.kp.offset; in trace_kprobe_offset()
104 return !!(kprobe_gone(&tk->rp.kp)); in trace_kprobe_has_gone()
151 snprintf(buf, sizeof(buf), "0x%p", tk->rp.kp.addr); in trace_kprobe_match_command_head()
152 else if (tk->rp.kp.offset) in trace_kprobe_match_command_head()
154 trace_kprobe_symbol(tk), tk->rp.kp.offset); in trace_kprobe_match_command_head()
187 return !(list_empty(&tk->rp.kp.list) && in trace_kprobe_is_registered()
188 hlist_unhashed(&tk->rp.kp.hlist)); in trace_kprobe_is_registered()
201 addr += tk->rp.kp.offset; in trace_kprobe_address()
203 addr = (unsigned long)tk->rp.kp.addr; in trace_kprobe_address()
224 return tk ? (kprobe_on_func_entry(tk->rp.kp.addr, in trace_kprobe_on_func_entry()
[all …]
/kernel/linux/linux-5.10/security/apparmor/
Dlsm.c1266 static int param_set_aabool(const char *val, const struct kernel_param *kp);
1267 static int param_get_aabool(char *buffer, const struct kernel_param *kp);
1275 static int param_set_aauint(const char *val, const struct kernel_param *kp);
1276 static int param_get_aauint(char *buffer, const struct kernel_param *kp);
1284 const struct kernel_param *kp);
1286 const struct kernel_param *kp);
1293 static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp);
1294 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
1302 static int param_set_audit(const char *val, const struct kernel_param *kp);
1303 static int param_get_audit(char *buffer, const struct kernel_param *kp);
[all …]
/kernel/linux/linux-5.10/tools/thermal/tmon/
Dpid.c62 p_param.kp = .36; in init_thermal_controller()
101 p_term = -p_param.kp * (xk - xk_1); in controller_handler()
102 i_term = p_param.kp * p_param.ki * p_param.ts * ek; in controller_handler()
103 d_term = -p_param.kp * p_param.kd * (xk - 2 * xk_1 + xk_2) / p_param.ts; in controller_handler()
/kernel/linux/linux-5.10/arch/s390/lib/
Dtest_unwind.c160 struct kprobe kp; in unwindme_func4() local
164 memset(&kp, 0, sizeof(kp)); in unwindme_func4()
165 kp.symbol_name = "do_report_trap"; in unwindme_func4()
166 kp.pre_handler = pgm_pre_handler; in unwindme_func4()
167 ret = register_kprobe(&kp); in unwindme_func4()
183 unregister_kprobe(&kp); in unwindme_func4()
/kernel/linux/linux-5.10/drivers/iio/pressure/
Ddps310.c479 s64 kp; in dps310_calculate_pressure() local
488 kp = (s64)kpi; in dps310_calculate_pressure()
507 denoms[1] = kp; in dps310_calculate_pressure()
509 denoms[2] = kp * kp; in dps310_calculate_pressure()
511 denoms[3] = kp * kp * kp; in dps310_calculate_pressure()
515 denoms[5] = kp * kt; in dps310_calculate_pressure()
517 denoms[6] = kp * kp * kt; in dps310_calculate_pressure()

12345678