drm/rockchip: vop2: Fix the windows switch between different layers
[drm/drm-misc.git] / kernel / trace / rv / reactor_panic.c
blob0186ff4cbd0b4233afd886174e0fab1bb9101091
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org>
5 * Panic RV reactor:
6 * Prints the exception msg to the kernel message log and panic().
7 */
9 #include <linux/ftrace.h>
10 #include <linux/tracepoint.h>
11 #include <linux/kernel.h>
12 #include <linux/module.h>
13 #include <linux/init.h>
14 #include <linux/rv.h>
16 static void rv_panic_reaction(char *msg)
18 panic(msg);
21 static struct rv_reactor rv_panic = {
22 .name = "panic",
23 .description = "panic the system if an exception is found.",
24 .react = rv_panic_reaction
27 static int __init register_react_panic(void)
29 rv_register_reactor(&rv_panic);
30 return 0;
33 static void __exit unregister_react_panic(void)
35 rv_unregister_reactor(&rv_panic);
38 module_init(register_react_panic);
39 module_exit(unregister_react_panic);
41 MODULE_AUTHOR("Daniel Bristot de Oliveira");
42 MODULE_DESCRIPTION("panic rv reactor: panic if an exception is found.");