Home
last modified time | relevance | path

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

12345678

/linux/drivers/input/keyboard/
H A 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 …]
H A 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 …]
H A 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/drivers/pwm/
H A Dpwm-bcm-kona.c71 static void kona_pwmc_prepare_for_settings(struct kona_pwmc *kp, in kona_pwmc_prepare_for_settings() argument
74 unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_prepare_for_settings()
78 writel(value, kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_prepare_for_settings()
87 static void kona_pwmc_apply_settings(struct kona_pwmc *kp, unsigned int chan) in kona_pwmc_apply_settings() argument
89 unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_apply_settings()
94 writel(value, kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_apply_settings()
103 struct kona_pwmc *kp = to_kona_pwmc(chip); in kona_pwmc_config() local
119 rate = clk_get_rate(kp->clk); in kona_pwmc_config()
140 kona_pwmc_prepare_for_settings(kp, chan); in kona_pwmc_config()
142 value = readl(kp->base + PRESCALE_OFFSET); in kona_pwmc_config()
[all …]
/linux/arch/s390/lib/
H A 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/crypto/
H A 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 …]
H A 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/kernel/
H A Dparams.c102 static bool param_check_unsafe(const struct kernel_param *kp) in param_check_unsafe() argument
104 if (kp->flags & KERNEL_PARAM_FL_HWPARAM && in param_check_unsafe()
108 if (kp->flags & KERNEL_PARAM_FL_UNSAFE) { in param_check_unsafe()
110 kp->name); in param_check_unsafe()
216 int param_set_##name(const char *val, const struct kernel_param *kp) \
218 return strtolfn(val, 0, (type *)kp->arg); \
220 int param_get_##name(char *buffer, const struct kernel_param *kp) \
223 *((type *)kp->arg)); \
244 int param_set_uint_minmax(const char *val, const struct kernel_param *kp, in param_set_uint_minmax() argument
257 *((unsigned int *)kp->arg) = num; in param_set_uint_minmax()
[all …]
H A 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 …]
H A Dkprobes.c356 static inline void set_kprobe_instance(struct kprobe *kp) in set_kprobe_instance() argument
358 __this_cpu_write(kprobe_instance, kp); in set_kprobe_instance()
420 struct kprobe *kp; in opt_pre_handler() local
422 list_for_each_entry_rcu(kp, &p->list, list) { in opt_pre_handler()
423 if (kp->pre_handler && likely(!kprobe_disabled(kp))) { in opt_pre_handler()
424 set_kprobe_instance(kp); in opt_pre_handler()
425 kp->pre_handler(kp, regs); in opt_pre_handler()
437 op = container_of(p, struct optimized_kprobe, kp); in free_aggr_kprobe()
449 op = container_of(p, struct optimized_kprobe, kp); in kprobe_optready()
465 op = container_of(p, struct optimized_kprobe, kp); in kprobe_disarmed()
[all …]
/linux/arch/x86/kernel/kprobes/
H A 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/include/linux/
H A Dmoduleparam.h51 int (*set)(const char *val, const struct kernel_param *kp);
53 int (*get)(char *buffer, const struct kernel_param *kp);
416 extern int param_set_byte(const char *val, const struct kernel_param *kp);
417 extern int param_get_byte(char *buffer, const struct kernel_param *kp);
421 extern int param_set_short(const char *val, const struct kernel_param *kp);
422 extern int param_get_short(char *buffer, const struct kernel_param *kp);
426 extern int param_set_ushort(const char *val, const struct kernel_param *kp);
427 extern int param_get_ushort(char *buffer, const struct kernel_param *kp);
431 extern int param_set_int(const char *val, const struct kernel_param *kp);
432 extern int param_get_int(char *buffer, const struct kernel_param *kp);
[all …]
H A Dkprobes.h147 struct kprobe kp; member
339 struct kprobe kp; member
423 int disable_kprobe(struct kprobe *kp);
424 int enable_kprobe(struct kprobe *kp);
426 void dump_kprobe(struct kprobe *kp);
496 static inline int disable_kprobe(struct kprobe *kp) in disable_kprobe() argument
500 static inline int enable_kprobe(struct kprobe *kp) in enable_kprobe() argument
518 return disable_kprobe(&rp->kp); in disable_kretprobe()
522 return enable_kprobe(&rp->kp); in enable_kretprobe()
/linux/drivers/ufs/core/
H A Dufs-fault-injection.c11 static int ufs_fault_get(char *buffer, const struct kernel_param *kp);
12 static int ufs_fault_set(const char *val, const struct kernel_param *kp);
37 static int ufs_fault_get(char *buffer, const struct kernel_param *kp) in ufs_fault_get() argument
39 const char *fault_str = kp->arg; in ufs_fault_get()
44 static int ufs_fault_set(const char *val, const struct kernel_param *kp) in ufs_fault_set() argument
48 if (kp->arg == g_trigger_eh_str) in ufs_fault_set()
50 else if (kp->arg == g_timeout_str) in ufs_fault_set()
59 strscpy(kp->arg, val, FAULT_INJ_STR_SIZE); in ufs_fault_set()
/linux/drivers/accessibility/speakup/
H A 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 …]
H A Dgenmap.c21 static unsigned char key_data[MAXKEYVAL][16], *kp; variable
130 kp = key_data[lc]; in main()
131 if (!memcmp(key_data[0], kp, 16)) in main()
135 if (kp[i] != spk_val && kp[i] != lock_val) in main()
141 kp[shift_state] = kp[i]; in main()
151 kp = key_data[lc]; in main()
152 if (!memcmp(key_data[0], kp, 16)) in main()
156 printf(" %d,", (unsigned int)kp[i]); in main()
/linux/lib/
H A Dtest_kprobes.c55 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 …]
H A Ddynamic_debug.c633 #define KP_NAME(kp) kp->name argument
638 static int param_set_dyndbg_classnames(const char *instr, const struct kernel_param *kp) in param_set_dyndbg_classnames() argument
640 const struct ddebug_class_param *dcp = kp->arg; in param_set_dyndbg_classnames()
653 vpr_info("\"%s\" > %s:0x%lx\n", cl_str, KP_NAME(kp), curr_bits); in param_set_dyndbg_classnames()
670 pr_err("%s unknown to %s\n", cl_str, KP_NAME(kp)); in param_set_dyndbg_classnames()
685 v2pr_info("%s: changed bit %d:%s\n", KP_NAME(kp), cls_id, in param_set_dyndbg_classnames()
695 v2pr_info("%s: changed bit-%d: \"%s\" %lx->%lx\n", KP_NAME(kp), cls_id, in param_set_dyndbg_classnames()
718 int param_set_dyndbg_classes(const char *instr, const struct kernel_param *kp) in param_set_dyndbg_classes() argument
720 const struct ddebug_class_param *dcp = kp->arg; in param_set_dyndbg_classes()
730 return param_set_dyndbg_classnames(instr, kp); in param_set_dyndbg_classes()
[all …]
/linux/drivers/power/supply/
H A Dtest_power.c381 static int param_set_ac_online(const char *key, const struct kernel_param *kp) in param_set_ac_online() argument
388 static int param_get_ac_online(char *buffer, const struct kernel_param *kp) in param_get_ac_online() argument
394 static int param_set_usb_online(const char *key, const struct kernel_param *kp) in param_set_usb_online() argument
401 static int param_get_usb_online(char *buffer, const struct kernel_param *kp) in param_get_usb_online() argument
408 const struct kernel_param *kp) in param_set_battery_status() argument
415 static int param_get_battery_status(char *buffer, const struct kernel_param *kp) in param_get_battery_status() argument
422 const struct kernel_param *kp) in param_set_battery_health() argument
429 static int param_get_battery_health(char *buffer, const struct kernel_param *kp) in param_get_battery_health() argument
436 const struct kernel_param *kp) in param_set_battery_present() argument
444 const struct kernel_param *kp) in param_get_battery_present() argument
[all …]
/linux/samples/kprobes/
H A Dkprobe_example.c23 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 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/kernel/trace/
H A Dtrace_kprobe.c97 return tk->rp.kp.offset; in trace_kprobe_offset()
102 return kprobe_gone(&tk->rp.kp); in trace_kprobe_has_gone()
156 snprintf(buf, sizeof(buf), "0x%p", tk->rp.kp.addr); in trace_kprobe_match_command_head()
157 else if (tk->rp.kp.offset) in trace_kprobe_match_command_head()
159 trace_kprobe_symbol(tk), tk->rp.kp.offset); in trace_kprobe_match_command_head()
193 return !(list_empty(&tk->rp.kp.list) && in trace_kprobe_is_registered()
194 hlist_unhashed(&tk->rp.kp.hlist)); in trace_kprobe_is_registered()
207 addr += tk->rp.kp.offset; in trace_kprobe_address()
209 addr = (unsigned long)tk->rp.kp.addr; in trace_kprobe_address()
230 return tk ? (kprobe_on_func_entry(tk->rp.kp.addr, in trace_kprobe_on_func_entry()
[all …]
/linux/mm/
H A Dslab_common.c603 struct kmem_obj_info kp = { }; in kmem_dump_obj() local
612 kmem_obj_info(&kp, object, slab); in kmem_dump_obj()
613 if (kp.kp_slab_cache) in kmem_dump_obj()
614 pr_cont(" slab%s %s", cp, kp.kp_slab_cache->name); in kmem_dump_obj()
619 if (kp.kp_objp) in kmem_dump_obj()
620 pr_cont(" start %px", kp.kp_objp); in kmem_dump_obj()
621 if (kp.kp_data_offset) in kmem_dump_obj()
622 pr_cont(" data offset %lu", kp.kp_data_offset); in kmem_dump_obj()
623 if (kp.kp_objp) { in kmem_dump_obj()
624 ptroffset = ((char *)object - (char *)kp.kp_objp) - kp.kp_data_offset; in kmem_dump_obj()
[all …]
/linux/security/apparmor/
H A Dlsm.c1538 static int param_set_aabool(const char *val, const struct kernel_param *kp);
1539 static int param_get_aabool(char *buffer, const struct kernel_param *kp);
1547 static int param_set_aauint(const char *val, const struct kernel_param *kp);
1548 static int param_get_aauint(char *buffer, const struct kernel_param *kp);
1556 const struct kernel_param *kp);
1558 const struct kernel_param *kp);
1565 static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp);
1566 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
1574 static int param_set_audit(const char *val, const struct kernel_param *kp);
1575 static int param_get_audit(char *buffer, const struct kernel_param *kp);
[all …]
/linux/tools/thermal/tmon/
H A 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()

12345678