trace_irq.c 657 B

123456789101112131415161718192021222324252627
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2022 Changbin Du <changbin.du@gmail.com>
  4. */
  5. #include <linux/irqflags.h>
  6. #include <linux/kprobes.h>
  7. #include "trace_irq.h"
  8. /*
  9. * trace_hardirqs_on/off require the caller to setup frame pointer properly.
  10. * Otherwise, CALLER_ADDR1 might trigger an pagging exception in kernel.
  11. * Here we add one extra level so they can be safely called by low
  12. * level entry code which $fp is used for other purpose.
  13. */
  14. void __trace_hardirqs_on(void)
  15. {
  16. trace_hardirqs_on();
  17. }
  18. NOKPROBE_SYMBOL(__trace_hardirqs_on);
  19. void __trace_hardirqs_off(void)
  20. {
  21. trace_hardirqs_off();
  22. }
  23. NOKPROBE_SYMBOL(__trace_hardirqs_off);