1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

bug.h: move runtime BUG/WARN macros into <linux/bug.h>

Collect runtime BUG/WARN into a self-contained header <linux/bug.h>
to make these macros easier to use.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Masahiro Yamada
2017-09-16 14:10:45 +09:00
committed by Tom Rini
parent 059a48096c
commit 0a70fb4c1c
4 changed files with 29 additions and 24 deletions

View File

@@ -23,6 +23,7 @@ typedef volatile unsigned char vu_char;
#include <time.h>
#include <asm-offsets.h>
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/delay.h>
#include <linux/types.h>
#include <linux/printk.h>
@@ -90,14 +91,6 @@ void __assert_fail(const char *assertion, const char *file, unsigned line,
({ if (!(x) && _DEBUG) \
__assert_fail(#x, __FILE__, __LINE__, __func__); })
#ifndef BUG
#define BUG() do { \
printf("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
panic("BUG!"); \
} while (0)
#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
#endif /* BUG */
typedef void (interrupt_handler_t)(void *);
#include <asm/u-boot.h> /* boot information for Linux kernel */