diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2025-06-07 10:52:28 +0200 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-11-21 11:21:31 +0100 |
| commit | 7d2c27a0ec5ecec980b623ded45758918c00b164 (patch) | |
| tree | 108a725438be7421d49514281817495852209cfa /include | |
| parent | 5c47b7f3d1a9d7589026a201abb8ad445f029246 (diff) | |
bug: Add report_bug_entry()
Add a report_bug() variant where the bug_entry is already known. This
is useful when the exception instruction is not instantiated per-site.
But instead has a single instance. In such a case the bug_entry
address might be passed along in a known register or something.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251110115757.575795595@infradead.org
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/bug.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/bug.h b/include/linux/bug.h index a9948a9f1093..17a4933c611b 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -42,6 +42,7 @@ void bug_get_file_line(struct bug_entry *bug, const char **file, struct bug_entry *find_bug(unsigned long bugaddr); enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs); +enum bug_trap_type report_bug_entry(struct bug_entry *bug, struct pt_regs *regs); /* These are defined by the architecture */ int is_valid_bugaddr(unsigned long addr); @@ -62,6 +63,13 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr, } struct bug_entry; + +static inline enum bug_trap_type +report_bug_entry(struct bug_entry *bug, struct pt_regs *regs) +{ + return BUG_TRAP_TYPE_BUG; +} + static inline void bug_get_file_line(struct bug_entry *bug, const char **file, unsigned int *line) { |
