Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Michael Ellerman | 23b8acb | 2006-10-03 14:12:07 +1000 | [diff] [blame] | 2 | #ifndef __ASM_POWERPC_XMON_H |
| 3 | #define __ASM_POWERPC_XMON_H |
| 4 | |
| 5 | /* |
| 6 | * Copyrignt (C) 2006 IBM Corp |
Michael Ellerman | 23b8acb | 2006-10-03 14:12:07 +1000 | [diff] [blame] | 7 | */ |
| 8 | |
Paul Mackerras | 60a3d74 | 2005-10-11 09:46:10 +1000 | [diff] [blame] | 9 | #ifdef __KERNEL__ |
| 10 | |
Michael Ellerman | af3b74d | 2008-05-08 14:27:15 +1000 | [diff] [blame] | 11 | #include <linux/irqreturn.h> |
| 12 | |
Michael Ellerman | 47679283 | 2006-10-03 14:12:08 +1000 | [diff] [blame] | 13 | #ifdef CONFIG_XMON |
| 14 | extern void xmon_setup(void); |
Nick Child | 456e8eb | 2021-12-16 17:00:21 -0500 | [diff] [blame] | 15 | void __init xmon_register_spus(struct list_head *list); |
Michael Ellerman | 7d9e793 | 2008-05-08 14:27:13 +1000 | [diff] [blame] | 16 | struct pt_regs; |
| 17 | extern int xmon(struct pt_regs *excp); |
Michael Ellerman | af3b74d | 2008-05-08 14:27:15 +1000 | [diff] [blame] | 18 | extern irqreturn_t xmon_irq(int, void *); |
Michael Ellerman | 47679283 | 2006-10-03 14:12:08 +1000 | [diff] [blame] | 19 | #else |
Chengyang Fan | 6c6fdbb | 2021-01-25 17:53:38 +0800 | [diff] [blame] | 20 | static inline void xmon_setup(void) { } |
| 21 | static inline void xmon_register_spus(struct list_head *list) { } |
Michael Ellerman | 47679283 | 2006-10-03 14:12:08 +1000 | [diff] [blame] | 22 | #endif |
Paul Mackerras | 60a3d74 | 2005-10-11 09:46:10 +1000 | [diff] [blame] | 23 | |
Michael Ellerman | 1c8950f | 2008-05-08 14:27:17 +1000 | [diff] [blame] | 24 | #if defined(CONFIG_XMON) && defined(CONFIG_SMP) |
| 25 | extern int cpus_are_in_xmon(void); |
| 26 | #endif |
| 27 | |
Mathieu Malaterre | e70d8f5 | 2018-03-25 11:06:47 +0200 | [diff] [blame] | 28 | extern __printf(1, 2) void xmon_printf(const char *format, ...); |
Benjamin Herrenschmidt | 243e251 | 2017-04-05 17:54:50 +1000 | [diff] [blame] | 29 | |
Michael Ellerman | 23b8acb | 2006-10-03 14:12:07 +1000 | [diff] [blame] | 30 | #endif /* __KERNEL __ */ |
| 31 | #endif /* __ASM_POWERPC_XMON_H */ |