Home
last modified time | relevance | path

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

123456789

/linux-6.1.9/drivers/input/keyboard/
Dbcm-keypad.c85 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 …]
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 …]
/linux-6.1.9/drivers/pwm/
Dpwm-bcm-kona.c72 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 …]
/linux-6.1.9/arch/s390/lib/
Dtest_kprobes.c9 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 …]
/linux-6.1.9/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.c149 #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 …]
/linux-6.1.9/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_uint_minmax(const char *val, const struct kernel_param *kp, in param_set_uint_minmax() argument
259 *((unsigned int *)kp->arg) = num; in param_set_uint_minmax()
[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.c360 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 …]
/linux-6.1.9/arch/x86/kernel/kprobes/
Dopt.c40 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 …]
/linux-6.1.9/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 …]
/linux-6.1.9/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 …]
/linux-6.1.9/drivers/ufs/core/
Dufs-fault-injection.c9 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 strlcpy(kp->arg, val, FAULT_INJ_STR_SIZE); in ufs_fault_set()
/linux-6.1.9/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 …]
Dgenmap.c22 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()
/linux-6.1.9/lib/
Dtest_kprobes.c45 static struct kprobe kp = { variable
54 KUNIT_EXPECT_EQ(test, 0, register_kprobe(&kp)); in test_kprobe()
56 unregister_kprobe(&kp); in test_kprobe()
114 struct kprobe *kps[2] = {&kp, &kp2}; in test_kprobes()
119 kp.addr = NULL; in test_kprobes()
120 kp.flags = 0; in test_kprobes()
163 .kp.symbol_name = "kprobe_target"
188 .kp.symbol_name = "kprobe_target2"
197 rp.kp.addr = NULL; in test_kretprobes()
198 rp.kp.flags = 0; in test_kretprobes()
[all …]
/linux-6.1.9/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 …]
/linux-6.1.9/arch/powerpc/kernel/
Doptprobes.c100 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 …]
/linux-6.1.9/samples/kprobes/
Dkprobe_example.c23 static struct kprobe kp = { variable
100 kp.pre_handler = handler_pre; in kprobe_init()
101 kp.post_handler = handler_post; 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.c84 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()
/linux-6.1.9/kernel/trace/
Dtrace_kprobe.c97 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 …]
/linux-6.1.9/security/apparmor/
Dlsm.c1300 static int param_set_aabool(const char *val, const struct kernel_param *kp);
1301 static int param_get_aabool(char *buffer, const struct kernel_param *kp);
1309 static int param_set_aauint(const char *val, const struct kernel_param *kp);
1310 static int param_get_aauint(char *buffer, const struct kernel_param *kp);
1318 const struct kernel_param *kp);
1320 const struct kernel_param *kp);
1327 static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp);
1328 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
1336 static int param_set_audit(const char *val, const struct kernel_param *kp);
1337 static int param_get_audit(char *buffer, const struct kernel_param *kp);
[all …]
/linux-6.1.9/tools/thermal/tmon/
Dpid.c61 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()
/linux-6.1.9/mm/
Dslab_common.c574 struct kmem_obj_info kp = { }; in kmem_dump_obj() local
583 kmem_obj_info(&kp, object, slab); in kmem_dump_obj()
584 if (kp.kp_slab_cache) in kmem_dump_obj()
585 pr_cont(" slab%s %s", cp, kp.kp_slab_cache->name); in kmem_dump_obj()
590 if (kp.kp_objp) in kmem_dump_obj()
591 pr_cont(" start %px", kp.kp_objp); in kmem_dump_obj()
592 if (kp.kp_data_offset) in kmem_dump_obj()
593 pr_cont(" data offset %lu", kp.kp_data_offset); in kmem_dump_obj()
594 if (kp.kp_objp) { in kmem_dump_obj()
595 ptroffset = ((char *)object - (char *)kp.kp_objp) - kp.kp_data_offset; in kmem_dump_obj()
[all …]

123456789