aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/bug.h
blob: b1066b9fb5f89f84cb80fbfa38218ccca2c0ea0a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef _ASM_S390_BUG_H
#define _ASM_S390_BUG_H

#include <linux/kernel.h>

#ifdef CONFIG_BUG

#ifdef CONFIG_64BIT
#define S390_LONG ".quad"
#else
#define S390_LONG ".long"
#endif

#ifdef CONFIG_DEBUG_BUGVERBOSE

#define __EMIT_BUG(x) do {					\
	asm volatile(						\
		"0:	j	0b+2\n"				\
		"1:\n"						\
		".section .rodata.str,\"aMS\",@progbits,1\n"	\
		"2:	.asciz	\""__FILE__"\"\n"		\
		".previous\n"					\
		".section __bug_table,\"a\"\n"			\
		"3:\t"	S390_LONG "\t1b,2b\n"			\
		"	.short	%0,%1\n"			\
		"	.org	3b+%2\n"			\
		".previous\n"					\
		: : "i" (__LINE__),				\
		    "i" (x),					\
		    "i" (sizeof(struct bug_entry)));		\
} while (0)

#else /* CONFIG_DEBUG_BUGVERBOSE */

#define __EMIT_BUG(x) do {				\
	asm volatile(					\
		"0:	j	0b+2\n"			\
		"1:\n"					\
		".section __bug_table,\"a\"\n"		\
		"2:\t"	S390_LONG "\t1b\n"		\
		"	.short	%0\n"			\
		"	.org	2b+%1\n"		\
		".previous\n"				\
		: : "i" (x),				\
		    "i" (sizeof(struct bug_entry)));	\
} while (0)

#endif /* CONFIG_DEBUG_BUGVERBOSE */

#define BUG() do {					\
	__EMIT_BUG(0);					\
	unreachable();					\
} while (0)

#define __WARN() do {					\
	__EMIT_BUG(BUGFLAG_WARNING);			\
} while (0)

#define WARN_ON(x) ({					\
	int __ret_warn_on = !!(x);			\
	if (__builtin_constant_p(__ret_warn_on)) {	\
		if (__ret_warn_on)			\
			__EMIT_BUG(BUGFLAG_WARNING);	\
	} else {					\
		if (unlikely(__ret_warn_on))		\
			__EMIT_BUG(BUGFLAG_WARNING);	\
	}						\
	unlikely(__ret_warn_on);			\
})

#define HAVE_ARCH_BUG
#define HAVE_ARCH_WARN_ON
#endif /* CONFIG_BUG */

#include <asm-generic/bug.h>

#endif /* _ASM_S390_BUG_H */
27 22:41:46 -0800'>2002-10-27[PATCH] kill tqueue in dzAlan Cox1-1/+0 2002-10-27[PATCH] make gscd compile againAlan Cox1-1/+1 2002-10-27[PATCH] xd_open is goneAlan Cox1-1/+0 2002-10-27[PATCH] fix umem driver to use pci_get/set..Alan Cox1-8/+3 2002-10-27[PATCH] merge befs file system from 2.4 (no core changes)Alan Cox23-1/+3940 2002-10-27[PATCH] get the right thing out of se401 on gcc 3.2Alan Cox1-2/+4 2002-10-27[PATCH] update qlogicfas driverAlan Cox2-273/+388 2002-10-27[PATCH] correct notes on scsi generic releaseAlan Cox1-2/+2 2002-10-27[PATCH] SCSI configure helpAlan Cox1-8/+21 2002-10-27[PATCH] next NCR5380 updatesAlan Cox15-537/+507 2002-10-27[PATCH] u14-34f update from maintainerAlan Cox2-18/+48 2002-10-27[PATCH] finish updating sym53c416Alan Cox2-25/+47 2002-10-27[PATCH] nsp_cs update from maintainerAlan Cox5-291/+722 2002-10-27[PATCH] fix scsi irq errors on seagateAlan Cox2-0/+9 2002-10-27[PATCH] nsp32 needs updating for scsi_hn_getAlan Cox1-5/+3 2002-10-27[PATCH] resurrect the NCR53c406aAlan Cox2-806/+777 2002-10-27[PATCH] ncr53c8xxx needs updating for scsi_hn_getAlan Cox1-9/+4 2002-10-27[PATCH] inia100 just has to lose a next: NULLAlan Cox1-2/+1 2002-10-27[PATCH] fix all the IRQ breakage on the in2000Alan Cox2-14/+13 2002-10-27[PATCH] initial eata driver updatesAlan Cox4-88/+216 2002-10-27[PATCH] fix aic7xxx on gcc 3.2 warning spewAlan Cox1-20/+20 2002-10-27[PATCH] move advansys from pcibios to pci_Alan Cox1-23/+11 2002-10-27[PATCH] ressurect the aha1740 driverAlan Cox1-12/+19 2002-10-27[PATCH] move 53c7,8xx to pci_ not pcibiosAlan Cox2-11/+7 2002-10-27[PATCH] small scsi compile fixesAlan Cox7-24/+15 2002-10-27[PATCH] MCA bus basic cleanupsAlan Cox8-1540/+1323 2002-10-18Linux v2.5.44v2.5.44Linus Torvalds1-1/+1 2002-10-18[PATCH] device removalPatrick Mochel2-3/+4