15cea2
--- redhat-lsb-3.2.orig/redhat_lsb_trigger.c	2008-04-16 13:50:14.000000000 -0400
15cea2
+++ redhat-lsb-3.2/redhat_lsb_trigger.c	2009-02-03 04:39:06.000000000 -0500
15cea2
@@ -223,6 +223,42 @@ register void *__thread_self __asm ("g7"
15cea2
 # define ASMFMT_1 , "0" (gpr2)
15cea2
 # define ASMFMT_2 , "0" (gpr2), "d" (gpr3)
15cea2
 # define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
15cea2
+#elif defined __arm__
15cea2
+# if defined (__ARM_EABI__)
15cea2
+#undef INTERNAL_SYSCALL_DECL
15cea2
+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
15cea2
+#undef INTERNAL_SYSCALL_RAW
15cea2
+#define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
15cea2
+  ({								\
15cea2
+       register int _a1 asm ("r0"), _nr asm ("r7");		\
15cea2
+       LOAD_ARGS_##nr (args)					\
15cea2
+       _nr = name;						\
15cea2
+       asm volatile ("swi	0x0	@ syscall " #name	\
15cea2
+		     : "=r" (_a1)				\
15cea2
+		     : "r" (_nr) ASM_ARGS_##nr			\
15cea2
+		     : "memory");				\
15cea2
+       _a1; })
15cea2
+
15cea2
+#undef INTERNAL_SYSCALL
15cea2
+#define INTERNAL_SYSCALL(name, err, nr, args...)		\
15cea2
+	INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
15cea2
+
15cea2
+#define LOAD_ARGS_0()
15cea2
+#define ASM_ARGS_0
15cea2
+#define LOAD_ARGS_1(a1)				\
15cea2
+  int _a1tmp = (int) (a1);			\
15cea2
+  LOAD_ARGS_0 ()				\
15cea2
+  _a1 = _a1tmp;
15cea2
+#define ASM_ARGS_1	ASM_ARGS_0, "r" (_a1)
15cea2
+#define LOAD_ARGS_2(a1, a2)			\
15cea2
+  int _a2tmp = (int) (a2);			\
15cea2
+  LOAD_ARGS_1 (a1)				\
15cea2
+  register int _a2 asm ("a2") = _a2tmp;
15cea2
+#define ASM_ARGS_2	ASM_ARGS_1, "r" (_a2)
15cea2
+#undef SYS_ify
15cea2
+#define SWI_BASE  (0x900000)
15cea2
+#define SYS_ify(syscall_name)	(__NR_##syscall_name)
15cea2
+#endif
15cea2
 #elif defined __sparc__
15cea2
 # ifndef __arch64__
15cea2
 #  define __INTERNAL_SYSCALL_STRING					\