blob: f2d44b44f46c182cd8f9113443470128df754957 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Michael Ellerman23b8acb2006-10-03 14:12:07 +10002#ifndef __ASM_POWERPC_XMON_H
3#define __ASM_POWERPC_XMON_H
4
5/*
6 * Copyrignt (C) 2006 IBM Corp
Michael Ellerman23b8acb2006-10-03 14:12:07 +10007 */
8
Paul Mackerras60a3d742005-10-11 09:46:10 +10009#ifdef __KERNEL__
10
Michael Ellermanaf3b74d2008-05-08 14:27:15 +100011#include <linux/irqreturn.h>
12
Michael Ellerman476792832006-10-03 14:12:08 +100013#ifdef CONFIG_XMON
14extern void xmon_setup(void);
Nick Child456e8eb2021-12-16 17:00:21 -050015void __init xmon_register_spus(struct list_head *list);
Michael Ellerman7d9e7932008-05-08 14:27:13 +100016struct pt_regs;
17extern int xmon(struct pt_regs *excp);
Michael Ellermanaf3b74d2008-05-08 14:27:15 +100018extern irqreturn_t xmon_irq(int, void *);
Michael Ellerman476792832006-10-03 14:12:08 +100019#else
Chengyang Fan6c6fdbb2021-01-25 17:53:38 +080020static inline void xmon_setup(void) { }
21static inline void xmon_register_spus(struct list_head *list) { }
Michael Ellerman476792832006-10-03 14:12:08 +100022#endif
Paul Mackerras60a3d742005-10-11 09:46:10 +100023
Michael Ellerman1c8950f2008-05-08 14:27:17 +100024#if defined(CONFIG_XMON) && defined(CONFIG_SMP)
25extern int cpus_are_in_xmon(void);
26#endif
27
Mathieu Malaterree70d8f52018-03-25 11:06:47 +020028extern __printf(1, 2) void xmon_printf(const char *format, ...);
Benjamin Herrenschmidt243e2512017-04-05 17:54:50 +100029
Michael Ellerman23b8acb2006-10-03 14:12:07 +100030#endif /* __KERNEL __ */
31#endif /* __ASM_POWERPC_XMON_H */