patch-2.4.4 linux/arch/s390x/lib/misaligned.c
Next file: linux/arch/s390x/mm/init.c
Previous file: linux/arch/s390x/lib/delay.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Wed Apr 11 19:02:30 2001
- Orig file:
v2.4.3/linux/arch/s390x/lib/misaligned.c
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.4.3/linux/arch/s390x/lib/misaligned.c linux/arch/s390x/lib/misaligned.c
@@ -0,0 +1,34 @@
+/*
+ * arch/s390/lib/misaligned.c
+ * S390 misalignment panic stubs
+ *
+ * S390 version
+ * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com).
+ *
+ * xchg wants to panic if the pointer is not aligned. To avoid multiplying
+ * the panic message over and over again, the panic is done in the helper
+ * functions __misaligned_u64, __misaligned_u32 and __misaligned_u16.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+
+void __misaligned_u16(void)
+{
+ panic("misaligned (__u16 *) in __xchg\n");
+}
+
+void __misaligned_u32(void)
+{
+ panic("misaligned (__u32 *) in __xchg\n");
+}
+
+void __misaligned_u64(void)
+{
+ panic("misaligned (__u64 *) in __xchg\n");
+}
+
+EXPORT_SYMBOL(__misaligned_u16);
+EXPORT_SYMBOL(__misaligned_u32);
+EXPORT_SYMBOL(__misaligned_u64);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)