diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-11 08:09:25 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-11 08:09:25 +0100 |
| commit | 591afd6e5a5045a7c0fe3fc6a26c55d8030bbf9f (patch) | |
| tree | 9028c6bdb3b5a2536b74deeaa4901f94ba7a3b84 /include/linux/kcov.h | |
| parent | 59b26d2e96c473b7b65cfe19381444d034e91715 (diff) | |
| parent | 7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff) | |
| download | linux-next-591afd6e5a5045a7c0fe3fc6a26c55d8030bbf9f.tar.gz linux-next-591afd6e5a5045a7c0fe3fc6a26c55d8030bbf9f.zip | |
Merge 5.11-rc3 into char-misc-next
We need the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/kcov.h')
| -rw-r--r-- | include/linux/kcov.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/kcov.h b/include/linux/kcov.h index a10e84707d82..4e3037dc1204 100644 --- a/include/linux/kcov.h +++ b/include/linux/kcov.h @@ -52,6 +52,25 @@ static inline void kcov_remote_start_usb(u64 id) kcov_remote_start(kcov_remote_handle(KCOV_SUBSYSTEM_USB, id)); } +/* + * The softirq flavor of kcov_remote_*() functions is introduced as a temporary + * work around for kcov's lack of nested remote coverage sections support in + * task context. Adding suport for nested sections is tracked in: + * https://bugzilla.kernel.org/show_bug.cgi?id=210337 + */ + +static inline void kcov_remote_start_usb_softirq(u64 id) +{ + if (in_serving_softirq()) + kcov_remote_start_usb(id); +} + +static inline void kcov_remote_stop_softirq(void) +{ + if (in_serving_softirq()) + kcov_remote_stop(); +} + #else static inline void kcov_task_init(struct task_struct *t) {} @@ -66,6 +85,8 @@ static inline u64 kcov_common_handle(void) } static inline void kcov_remote_start_common(u64 id) {} static inline void kcov_remote_start_usb(u64 id) {} +static inline void kcov_remote_start_usb_softirq(u64 id) {} +static inline void kcov_remote_stop_softirq(void) {} #endif /* CONFIG_KCOV */ #endif /* _LINUX_KCOV_H */ |
