debug.h: merge both instances into ihk/debug.h
We do not need two debug.h files. Take Fujitsu's STATIC_ASSERT over BUILD_BUG_ON because it is more used Change-Id: If04c17fbb7406ab15fe86267fed8d6da460cec62 Fujitsu: POSTK_DEBUG_ARCH_DEP_9
This commit is contained in:
committed by
Dominique Martinet
parent
06e96005a6
commit
9ec0aeeab5
@@ -21,7 +21,6 @@
|
||||
#include <kmsg.h>
|
||||
#include <ihk/cpu.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <process.h>
|
||||
#include <init.h>
|
||||
#include <march.h>
|
||||
@@ -29,7 +28,7 @@
|
||||
#include <time.h>
|
||||
#include <syscall.h>
|
||||
#include <rusage_private.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
//#define DEBUG_PRINT_AP
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <kmsg.h>
|
||||
#include <ihk/ihk_debug.h>
|
||||
#include <ihk/cpu.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/lock.h>
|
||||
#include <ihk/monitor.h>
|
||||
#include <errno.h>
|
||||
#include <sysfs.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <limits.h>
|
||||
|
||||
struct ihk_kmsg_buf *kmsg_buf;
|
||||
|
||||
@@ -11,32 +11,16 @@
|
||||
* HISTORY:
|
||||
*/
|
||||
|
||||
#if 0
|
||||
#include <ihk/cpu.h>
|
||||
#endif
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/lock.h>
|
||||
#if 0
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/types.h>
|
||||
#include <cls.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <kmalloc.h>
|
||||
#if 0
|
||||
#include <kmsg.h>
|
||||
#endif
|
||||
#include <memobj.h>
|
||||
#if 0
|
||||
#include <memory.h>
|
||||
#endif
|
||||
#include <page.h> /* for allocate_pages() */
|
||||
#include <pager.h>
|
||||
#include <string.h>
|
||||
#include <syscall.h>
|
||||
#include <process.h>
|
||||
#include <rusage_private.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
//#define DEBUG_PRINT_DEVOBJ
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
#include <ihk/cpu.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/lock.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/types.h>
|
||||
@@ -27,7 +26,7 @@
|
||||
#include <string.h>
|
||||
#include <syscall.h>
|
||||
#include <rusage_private.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <mman.h>
|
||||
|
||||
//#define DEBUG_PRINT_FILEOBJ
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
#include <cls.h>
|
||||
#include <kmsg.h>
|
||||
#include <timer.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <syscall.h>
|
||||
|
||||
//#define DEBUG_PRINT_FUTEX
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <kmsg.h>
|
||||
#include <ihk/cpu.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/ikc.h>
|
||||
#include <ikc/master.h>
|
||||
#include <cls.h>
|
||||
@@ -34,7 +33,7 @@
|
||||
#include <sysfs.h>
|
||||
#include <ihk/perfctr.h>
|
||||
#include <rusage_private.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
//#define DEBUG_PRINT_HOST
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <kmsg.h>
|
||||
#include <kmalloc.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
#if DEBUG_HUGEFILEOBJ
|
||||
#undef DDEBUG_DEFAULT
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
#include "lwk/compiler.h"
|
||||
|
||||
void panic(const char *);
|
||||
|
||||
/* when someone has a lot of time, add attribute __printf(1, 2) to kprintf */
|
||||
int kprintf(const char *format, ...);
|
||||
|
||||
struct ddebug {
|
||||
const char *file;
|
||||
const char *func;
|
||||
const char *fmt;
|
||||
unsigned int line:24;
|
||||
unsigned int flags:8;
|
||||
} __aligned(8);
|
||||
|
||||
#define DDEBUG_NONE 0x0
|
||||
#define DDEBUG_PRINT 0x1
|
||||
|
||||
#define DDEBUG_DEFAULT DDEBUG_NONE
|
||||
|
||||
#define DDEBUG_SYMBOL() \
|
||||
static struct ddebug __aligned(8) \
|
||||
__attribute__((section("__verbose"))) ddebug = { \
|
||||
.file = __FILE__, \
|
||||
.func = __func__, \
|
||||
.line = __LINE__, \
|
||||
.flags = DDEBUG_DEFAULT, \
|
||||
}
|
||||
|
||||
#define DDEBUG_TEST ddebug.flags
|
||||
|
||||
|
||||
|
||||
#define dkprintf(fmt, args...) \
|
||||
do { \
|
||||
DDEBUG_SYMBOL(); \
|
||||
if (DDEBUG_TEST) \
|
||||
kprintf(fmt, ##args); \
|
||||
} while (0)
|
||||
#define ekprintf(fmt, args...) kprintf(fmt, ##args)
|
||||
|
||||
#define BUG_ON(condition) do { \
|
||||
if (condition) { \
|
||||
kprintf("PANIC: %s: %s(line:%d)\n", \
|
||||
__FILE__, __func__, __LINE__); \
|
||||
panic(""); \
|
||||
} \
|
||||
} while (0)
|
||||
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
|
||||
|
||||
#endif
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "ihk/mm.h"
|
||||
#include "cls.h"
|
||||
#include "debug.h"
|
||||
#include <ihk/debug.h>
|
||||
|
||||
#define kmalloc(size, flag) ({\
|
||||
void *r = _kmalloc(size, flag, __FILE__, __LINE__);\
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <memobj.h>
|
||||
#include <rusage.h>
|
||||
#include <ihk/ihk_monitor.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
#ifdef ENABLE_RUSAGE
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <mc_xpmem.h>
|
||||
#include <xpmem.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
#define XPMEM_CURRENT_VERSION 0x00026003
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <kmalloc.h>
|
||||
#include <ihk/cpu.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/dma.h>
|
||||
#include <ihk/perfctr.h>
|
||||
#include <process.h>
|
||||
@@ -32,7 +31,7 @@
|
||||
#include <syscall.h>
|
||||
#include <sysfs.h>
|
||||
#include <ihk/monitor.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <rusage.h>
|
||||
|
||||
//#define IOCTL_FUNC_EXTENSION
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
#include <kmsg.h>
|
||||
#include <ihk/cpu.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/ikc.h>
|
||||
#include <ikc/master.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
//#define DEBUG_LISTENERS
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <kmalloc.h>
|
||||
#include <string.h>
|
||||
#include <ihk/cpu.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/lock.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/page_alloc.h>
|
||||
@@ -44,7 +43,7 @@
|
||||
#include <process.h>
|
||||
#include <limits.h>
|
||||
#include <sysfs.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
//#define DEBUG_PRINT_MEM
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <ihk/cpu.h>
|
||||
#include <cpulocal.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/ikc.h>
|
||||
#include <errno.h>
|
||||
#include <cls.h>
|
||||
@@ -22,7 +21,7 @@
|
||||
#include <kmalloc.h>
|
||||
#include <process.h>
|
||||
#include <swapfmt.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
#define O_RDONLY 00000000
|
||||
#define O_WRONLY 00000001
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <errno.h>
|
||||
#include <kmalloc.h>
|
||||
#include <cls.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <page.h>
|
||||
#include <cpulocal.h>
|
||||
#include <auxvec.h>
|
||||
@@ -36,7 +35,7 @@
|
||||
#include <xpmem.h>
|
||||
#include <rusage_private.h>
|
||||
#include <ihk/monitor.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
//#define DEBUG_PRINT_PROCESS
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <ihk/cpu.h>
|
||||
#include <cpulocal.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/ikc.h>
|
||||
#include <errno.h>
|
||||
#include <cls.h>
|
||||
@@ -39,7 +38,7 @@
|
||||
#include <limits.h>
|
||||
#include <march.h>
|
||||
#include <process.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
extern char *syscall_name[];
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
|
||||
#include <ihk/atomic.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/lock.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <errno.h>
|
||||
@@ -23,7 +22,7 @@
|
||||
#include <shm.h>
|
||||
#include <string.h>
|
||||
#include <rusage_private.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
|
||||
static LIST_HEAD(shmobj_list_head);
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <ihk/cpu.h>
|
||||
#include <cpulocal.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/ikc.h>
|
||||
#include <errno.h>
|
||||
#include <cls.h>
|
||||
@@ -59,7 +58,7 @@
|
||||
#include <rusage_private.h>
|
||||
#include <ihk/monitor.h>
|
||||
#include <profile.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
#include "../executer/include/uti.h"
|
||||
|
||||
/* Headers taken from kitten LWK */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <sysfs.h>
|
||||
#include <sysfs_msg.h>
|
||||
#include <vsprintf.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
static size_t sysfs_data_bufsize;
|
||||
static void *sysfs_data_buf;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <ihk/cpu.h>
|
||||
#include <cpulocal.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/ikc.h>
|
||||
#include <errno.h>
|
||||
#include <cls.h>
|
||||
@@ -32,7 +31,7 @@
|
||||
#include <futex.h>
|
||||
#include <bitops.h>
|
||||
#include <timer.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
//#define DEBUG_PRINT_TIMER
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
|
||||
#include <ihk/atomic.h>
|
||||
#include <ihk/debug.h>
|
||||
#include <ihk/lock.h>
|
||||
#include <ihk/mm.h>
|
||||
#include <errno.h>
|
||||
@@ -21,7 +20,7 @@
|
||||
#include <memory.h>
|
||||
#include <page.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <ihk/debug.h>
|
||||
|
||||
struct zeroobj {
|
||||
struct memobj memobj; /* must be first */
|
||||
|
||||
Reference in New Issue
Block a user