summaryrefslogtreecommitdiffstats
path: root/include/asm-i386
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-22 23:05:57 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-22 23:05:57 +0000
commit51d3b7814cdccef9188240fe0cbd8d97ff2c7470 (patch)
tree5cbb01d0323d4f63ade66bdf48ba4a91aaa6df16 /include/asm-i386
parent52273a23c9a84336b93a35e4847fc88fac7eb0e4 (diff)
Merge with Linux 2.3.7.
WARNING: 2.3.7 is known to eat filesystems for breakfast and little children for lunch, so if you try this on your machine make backups first ...
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/page.h13
-rw-r--r--include/asm-i386/smplock.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h
index 0490404b7..847dffbd0 100644
--- a/include/asm-i386/page.h
+++ b/include/asm-i386/page.h
@@ -84,6 +84,19 @@ typedef unsigned long pgprot_t;
#define __PAGE_OFFSET (PAGE_OFFSET_RAW)
+#ifndef __ASSEMBLY__
+
+#define BUG() do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ __asm__ __volatile__(".byte 0x0f,0x0b"); \
+} while (0)
+
+#define PAGE_BUG(page) do { \
+ BUG(); \
+} while (0)
+
+#endif /* __ASSEMBLY__ */
+
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
diff --git a/include/asm-i386/smplock.h b/include/asm-i386/smplock.h
index 73c9cf927..4d44a2919 100644
--- a/include/asm-i386/smplock.h
+++ b/include/asm-i386/smplock.h
@@ -49,6 +49,8 @@ extern __inline__ void lock_kernel(void)
extern __inline__ void unlock_kernel(void)
{
+ if (current->lock_depth < 0)
+ BUG();
__asm__ __volatile__(
"decl %1\n\t"
"jns 9f\n\t"