~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/s390/include/asm/bug.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
#ifdef CONFIG_BUG
7
7
 
8
 
#ifdef CONFIG_64BIT
9
 
#define S390_LONG ".quad"
10
 
#else
11
 
#define S390_LONG ".long"
12
 
#endif
13
 
 
14
8
#ifdef CONFIG_DEBUG_BUGVERBOSE
15
9
 
16
10
#define __EMIT_BUG(x) do {                                      \
21
15
                "2:     .asciz  \""__FILE__"\"\n"               \
22
16
                ".previous\n"                                   \
23
17
                ".section __bug_table,\"a\"\n"                  \
24
 
                "3:\t"  S390_LONG "\t1b,2b\n"                   \
 
18
                "3:     .long   1b-3b,2b-3b\n"                  \
25
19
                "       .short  %0,%1\n"                        \
26
20
                "       .org    3b+%2\n"                        \
27
21
                ".previous\n"                                   \
37
31
                "0:     j       0b+2\n"                 \
38
32
                "1:\n"                                  \
39
33
                ".section __bug_table,\"a\"\n"          \
40
 
                "2:\t"  S390_LONG "\t1b\n"              \
 
34
                "2:     .long   1b-2b\n"                \
41
35
                "       .short  %0\n"                   \
42
36
                "       .org    2b+%1\n"                \
43
37
                ".previous\n"                           \
49
43
 
50
44
#define BUG() do {                                      \
51
45
        __EMIT_BUG(0);                                  \
52
 
        for (;;);                                       \
 
46
        unreachable();                                  \
 
47
} while (0)
 
48
 
 
49
#define __WARN_TAINT(taint) do {                        \
 
50
        __EMIT_BUG(BUGFLAG_TAINT(taint));               \
53
51
} while (0)
54
52
 
55
53
#define WARN_ON(x) ({                                   \
56
54
        int __ret_warn_on = !!(x);                      \
57
55
        if (__builtin_constant_p(__ret_warn_on)) {      \
58
56
                if (__ret_warn_on)                      \
59
 
                        __EMIT_BUG(BUGFLAG_WARNING);    \
 
57
                        __WARN();                       \
60
58
        } else {                                        \
61
59
                if (unlikely(__ret_warn_on))            \
62
 
                        __EMIT_BUG(BUGFLAG_WARNING);    \
 
60
                        __WARN();                       \
63
61
        }                                               \
64
62
        unlikely(__ret_warn_on);                        \
65
63
})