Lines Matching refs:mode
57 enum kcov_mode mode; member
166 unsigned int mode; in check_kcov_mode() local
175 mode = READ_ONCE(t->kcov_mode); in check_kcov_mode()
184 return mode == needed_mode; in check_kcov_mode()
346 unsigned int size, void *area, enum kcov_mode mode, in kcov_start() argument
357 WRITE_ONCE(t->kcov_mode, mode); in kcov_start()
385 kcov->mode = KCOV_MODE_INIT; in kcov_reset()
514 kcov->mode = KCOV_MODE_DISABLED; in kcov_open()
579 int mode, i; in kcov_ioctl_locked() local
592 if (kcov->mode != KCOV_MODE_INIT || !kcov->area) in kcov_ioctl_locked()
597 mode = kcov_get_mode(arg); in kcov_ioctl_locked()
598 if (mode < 0) in kcov_ioctl_locked()
599 return mode; in kcov_ioctl_locked()
601 kcov->mode = mode; in kcov_ioctl_locked()
602 kcov_start(t, kcov, kcov->size, kcov->area, kcov->mode, in kcov_ioctl_locked()
620 if (kcov->mode != KCOV_MODE_INIT || !kcov->area) in kcov_ioctl_locked()
626 mode = kcov_get_mode(remote_arg->trace_mode); in kcov_ioctl_locked()
627 if (mode < 0) in kcov_ioctl_locked()
628 return mode; in kcov_ioctl_locked()
631 kcov->mode = mode; in kcov_ioctl_locked()
707 if (kcov->mode != KCOV_MODE_DISABLED) { in kcov_ioctl()
714 kcov->mode = KCOV_MODE_INIT; in kcov_ioctl()
798 static inline bool kcov_mode_enabled(unsigned int mode) in kcov_mode_enabled() argument
800 return (mode & ~KCOV_IN_CTXSW) != KCOV_MODE_DISABLED; in kcov_mode_enabled()
806 unsigned int mode; in kcov_remote_softirq_start() local
808 mode = READ_ONCE(t->kcov_mode); in kcov_remote_softirq_start()
810 if (kcov_mode_enabled(mode)) { in kcov_remote_softirq_start()
811 data->saved_mode = mode; in kcov_remote_softirq_start()
841 unsigned int mode; in kcov_remote_start() local
858 mode = READ_ONCE(t->kcov_mode); in kcov_remote_start()
859 if (WARN_ON(in_task() && kcov_mode_enabled(mode))) { in kcov_remote_start()
889 mode = kcov->mode; in kcov_remote_start()
918 kcov_start(t, kcov, size, area, mode, sequence); in kcov_remote_start()
925 static void kcov_move_area(enum kcov_mode mode, void *dst_area, in kcov_move_area() argument
937 switch (mode) { in kcov_move_area()
968 switch (mode) { in kcov_move_area()
985 unsigned int mode; in kcov_remote_stop() local
996 mode = READ_ONCE(t->kcov_mode); in kcov_remote_stop()
998 if (!kcov_mode_enabled(mode)) { in kcov_remote_stop()
1033 kcov_move_area(kcov->mode, kcov->area, kcov->size, area); in kcov_remote_stop()