From: Apple <opensource@apple.com>
Date: Sat, 5 Jan 2008 02:34:23 +0000 (+0000)
Subject: xnu-1228.0.2.tar.gz
X-Git-Tag: mac-os-x-1051^0
X-Git-Url: https://git.saurik.com/apple/xnu.git/commitdiff_plain/36401178fd6817c043cc00b0c00c7f723e58efae?ds=inline

xnu-1228.0.2.tar.gz
---

diff --git a/EXTERNAL_HEADERS/machine/limits.h b/EXTERNAL_HEADERS/machine/limits.h
index 65bd37494..4ab4a836d 100644
--- a/EXTERNAL_HEADERS/machine/limits.h
+++ b/EXTERNAL_HEADERS/machine/limits.h
@@ -30,8 +30,6 @@
 #include <ppc/limits.h>
 #elif defined (__i386__)
 #include <i386/limits.h>
-#elif defined (__arm__)
-#include <arm/limits.h>
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/dev/dtrace/dtrace.c b/bsd/dev/dtrace/dtrace.c
index f34ed4fd0..9f2be77c4 100644
--- a/bsd/dev/dtrace/dtrace.c
+++ b/bsd/dev/dtrace/dtrace.c
@@ -14836,13 +14836,6 @@ dtrace_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
 	    dtrace_provider, NULL, NULL, "END", 0, NULL);
 	dtrace_probeid_error = dtrace_probe_create((dtrace_provider_id_t)
 	    dtrace_provider, NULL, NULL, "ERROR", 3, NULL);
-#elif defined(__arm__)
-	dtrace_probeid_begin = dtrace_probe_create((dtrace_provider_id_t)
-	    dtrace_provider, NULL, NULL, "BEGIN", 2, NULL);
-	dtrace_probeid_end = dtrace_probe_create((dtrace_provider_id_t)
-	    dtrace_provider, NULL, NULL, "END", 1, NULL);
-	dtrace_probeid_error = dtrace_probe_create((dtrace_provider_id_t)
-	    dtrace_provider, NULL, NULL, "ERROR", 4, NULL);
 #else
 #error Unknown Architecture
 #endif /* __APPLE__ */
diff --git a/bsd/dev/dtrace/profile_prvd.c b/bsd/dev/dtrace/profile_prvd.c
index 249060cd3..14895f8d9 100644
--- a/bsd/dev/dtrace/profile_prvd.c
+++ b/bsd/dev/dtrace/profile_prvd.c
@@ -69,8 +69,6 @@
 extern struct savearea *find_kern_regs(thread_t);
 #elif defined(__i386__) || defined(__x86_64__)
 extern x86_saved_state32_t *find_kern_regs(thread_t);
-#elif defined (__arm__)
-extern struct arm_saved_state *find_kern_regs(thread_t);
 #else
 #error Unknown architecture
 #endif
@@ -139,8 +137,6 @@ static dtrace_provider_id_t profile_id;
 #define PROF_ARTIFICIAL_FRAMES 8
 #elif defined(__i386__) || defined(__x86_64__)
 #define PROF_ARTIFICIAL_FRAMES  9
-#elif defined(__arm__)
-#define PROF_ARTIFICIAL_FRAMES 3 /* XXX BOGUS ARMTODO */
 #else
 #error Unknown architecture
 #endif
diff --git a/bsd/dev/dtrace/systrace.c b/bsd/dev/dtrace/systrace.c
index d625d7e80..ad19d6df0 100644
--- a/bsd/dev/dtrace/systrace.c
+++ b/bsd/dev/dtrace/systrace.c
@@ -54,8 +54,6 @@
 #define I386_SYSCALL_NUMBER_MASK (0xFFFF)
 
 typedef x86_saved_state_t savearea_t;
-#elif defined(__arm__)
-typedef struct arm_saved_state savearea_t;
 #endif
 
 #include <sys/param.h>
@@ -81,9 +79,6 @@ typedef struct arm_saved_state savearea_t;
 #elif defined(__i386__) || defined (__x86_64__)
 #define	SYSTRACE_ARTIFICIAL_FRAMES	2
 #define MACHTRACE_ARTIFICIAL_FRAMES 3
-#elif defined(__arm__)
-#define	SYSTRACE_ARTIFICIAL_FRAMES	2 /* XXX ARMTODO */
-#define MACHTRACE_ARTIFICIAL_FRAMES 3 /* XXX ARMTODO */
 #else
 #error Unknown Architecture
 #endif
@@ -159,8 +154,6 @@ dtrace_systrace_syscall(struct proc *pp, void *uap, int *rv)
 			 */
 		}
 	}
-#elif defined(__arm__)
-	do {} while(0); /* XXX what is the right ABI */
 #else
 #error Unknown Architecture
 #endif
@@ -868,8 +861,6 @@ dtrace_machtrace_syscall(struct mach_call_args *args)
 			code = -saved_state32(tagged_regs)->eax;
 		}
 	}
-#elif defined(__arm__)
-	do {} while(0); /* XXX ARMTODO */
 #else
 #error Unknown Architecture
 #endif
diff --git a/bsd/kern/kern_core.c b/bsd/kern/kern_core.c
index 5d149c7db..fcd359b61 100644
--- a/bsd/kern/kern_core.c
+++ b/bsd/kern/kern_core.c
@@ -92,14 +92,6 @@ mythread_state_flavor_t thread_flavor_array [] = {
 		{x86_EXCEPTION_STATE, x86_EXCEPTION_STATE_COUNT},
 		};
 int mynum_flavors=3;
-#elif defined (__arm__)
-mythread_state_flavor_t thread_flavor_array[]={
-		{ARM_THREAD_STATE , ARM_THREAD_STATE_COUNT},
-		{ARM_VFP_STATE, ARM_VFP_STATE_COUNT}, 
-		{ARM_EXCEPTION_STATE, ARM_EXCEPTION_STATE_COUNT}
-		};
-int mynum_flavors=3;
-
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/kern/kern_mib.c b/bsd/kern/kern_mib.c
index e5a10c5b2..0b8f8f024 100644
--- a/bsd/kern/kern_mib.c
+++ b/bsd/kern/kern_mib.c
@@ -484,8 +484,6 @@ sysctl_mib_init(void)
     cpu64bit = (_cpu_capabilities & k64Bit) == k64Bit;
 #elif defined(__i386__)
     cpu64bit = (_get_cpu_capabilities() & k64Bit) == k64Bit;
-#elif defined(__arm__)
-    cpu64bit = 0; // FIXME make this not hard-coded
 #endif
 
 	/*
@@ -652,28 +650,6 @@ sysctl_mib_init(void)
 	packages = ml_cpu_cache_sharing(0) /
 			cpuid_info()->cpuid_cores_per_package;
 	
-#elif defined(__arm__) /* end __i386 */
-	switch (cpuid_info()->arm_info.arm_part) {
-		case CPU_PART_1136JFS:
-		case CPU_PART_1176JZFS:
-			cpufamily = CPUFAMILY_ARM_11;
-			break;
-		case CPU_PART_920T:
-			cpufamily = CPUFAMILY_ARM_9;
-			break;
-		default:
-			cpufamily = CPUFAMILY_UNKNOWN;
-	}
-
-	cacheconfig[0] = cache_info()->c_unified;
-	cacheconfig[1] = cache_info()->c_isize;
-	cacheconfig[2] = cache_info()->c_dsize;
-	cacheconfig[3] = cache_info()->c_type;
-	cacheconfig[4] = cache_info()->c_linesz;
-	cacheconfig[5] = cache_info()->c_assoc;
-	cacheconfig[6] = 0;
-
-	packages = 1;
 #else /* end __arm__ */
 # warning we do not support this platform yet
 #endif /* __ppc__ */
diff --git a/bsd/kern/pthread_synch.c b/bsd/kern/pthread_synch.c
index 153a2fa81..980c1ad89 100644
--- a/bsd/kern/pthread_synch.c
+++ b/bsd/kern/pthread_synch.c
@@ -819,8 +819,6 @@ bsdthread_create(__unused struct proc *p, struct bsdthread_create_args  *uap, us
 	stackaddr = 0xF0000000;
 #elif defined(__i386__)
 	stackaddr = 0xB0000000;
-#elif defined(__arm__)
-	stackaddr = 0xB0000000; /* XXX ARM */
 #else
 #error Need to define a stack address hint for this architecture
 #endif
@@ -943,24 +941,6 @@ bsdthread_create(__unused struct proc *p, struct bsdthread_create_args  *uap, us
 		thread_set_wq_state64(th, (thread_state_t)ts64);
 	}
 	}
-#elif defined(__arm__)
-	{
-	int flavor=0, count=0;
-	void * state;
-
-	kret = thread_getstatus(th, flavor, (thread_state_t)&state, &count);
-	if (kret != KERN_SUCCESS) {
-		error = EINVAL;
-		goto out1;
-	}
-
-	/* XXX ARM TODO */
-
-	kret = thread_setstatus(th, flavor, (thread_state_t)&state, count);
-	if (kret != KERN_SUCCESS)
-		error = EINVAL;
-		goto out1;
-	}
 #else
 #error bsdthread_create  not defined for this architecture
 #endif
@@ -1385,8 +1365,6 @@ workqueue_addnewthread(struct workqueue *wq)
 	stackaddr = 0xF0000000;
 #elif defined(__i386__)
 	stackaddr = 0xB0000000;
-#elif defined(__arm__)
-	stackaddr = 0xB0000000; /* XXX ARM */
 #else
 #error Need to define a stack address hint for this architecture
 #endif
@@ -2070,15 +2048,6 @@ setup_wqthread(proc_t p, thread_t th, user_addr_t item, int reuse_thread, struct
 
 		thread_set_wq_state64(th, (thread_state_t)ts64);
 	}
-#elif defined(__arm__)
-	arm_thread_state_t state;
-	arm_thread_state_t *ts = &state;
-
-	/* XXX ARM add more */
-	ts->pc = p->p_wqthread;
-	ts->sp = tl->th_stackaddr + PTH_DEFAULT_GUARDSIZE;
-
-	thread_set_wq_state32(th, (thread_state_t)ts);
 #else
 #error setup_wqthread  not defined for this architecture
 #endif
diff --git a/bsd/libkern/libkern.h b/bsd/libkern/libkern.h
index c7588d418..81b719c2e 100644
--- a/bsd/libkern/libkern.h
+++ b/bsd/libkern/libkern.h
@@ -76,9 +76,6 @@
 #include <sys/cdefs.h>
 #include <sys/types.h>
 #include <mach/vm_param.h>
-#if __arm__
-#include <arm/arch.h> /* for _ARM_ARCH_* */
-#endif
 
 #ifdef __APPLE_API_OBSOLETE
 /* BCD conversions. */
diff --git a/bsd/machine/_limits.h b/bsd/machine/_limits.h
index 373e726f0..dd32b6197 100644
--- a/bsd/machine/_limits.h
+++ b/bsd/machine/_limits.h
@@ -32,8 +32,6 @@
 #include "ppc/_limits.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/_limits.h"
-#elif defined (__arm__)
-#include "arm/_limits.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/_param.h b/bsd/machine/_param.h
index 4171fd03c..844370744 100644
--- a/bsd/machine/_param.h
+++ b/bsd/machine/_param.h
@@ -29,8 +29,6 @@
 #include "ppc/_param.h"
 #elif defined (__i386__) || defined (__x86_64__)
 #include "i386/_param.h"
-#elif defined (__arm__)
-#include "arm/_param.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/_structs.h b/bsd/machine/_structs.h
index 0e359387e..a0e15996e 100644
--- a/bsd/machine/_structs.h
+++ b/bsd/machine/_structs.h
@@ -29,8 +29,6 @@
 #include "ppc/_structs.h"
 #elif defined (__i386__) || defined (__x86_64__)
 #include "i386/_structs.h"
-#elif defined (__arm__)
-#include "arm/_structs.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/_types.h b/bsd/machine/_types.h
index 9f2d6d255..ceac56ea0 100644
--- a/bsd/machine/_types.h
+++ b/bsd/machine/_types.h
@@ -32,8 +32,6 @@
 #include "ppc/_types.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/_types.h"
-#elif defined (__arm__)
-#include "arm/_types.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/cons.h b/bsd/machine/cons.h
index 38b771d86..bddd7e989 100644
--- a/bsd/machine/cons.h
+++ b/bsd/machine/cons.h
@@ -32,8 +32,6 @@
 #include <dev/ppc/cons.h>
 #elif defined (__i386__) || defined(__x86_64__)
 #include <dev/i386/cons.h>
-#elif defined (__arm__)
-#include <dev/arm/cons.h>
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/disklabel.h b/bsd/machine/disklabel.h
index 1a2e2b230..93fa986ed 100644
--- a/bsd/machine/disklabel.h
+++ b/bsd/machine/disklabel.h
@@ -32,8 +32,6 @@
 #include "ppc/disklabel.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/disklabel.h"
-#elif defined (__arm__)
-#include "arm/disklabel.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/endian.h b/bsd/machine/endian.h
index a49d52ac9..879cf17bd 100644
--- a/bsd/machine/endian.h
+++ b/bsd/machine/endian.h
@@ -35,8 +35,6 @@
 #include "ppc/endian.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/endian.h"
-#elif defined (__arm__)
-#include "arm/endian.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/exec.h b/bsd/machine/exec.h
index d866b9b42..fc8a27279 100644
--- a/bsd/machine/exec.h
+++ b/bsd/machine/exec.h
@@ -55,8 +55,6 @@ int grade_binary(cpu_type_t, cpu_subtype_t);
 #include "ppc/exec.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/exec.h"
-#elif defined (__arm__)
-#include "arm/exec.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/fasttrap_isa.h b/bsd/machine/fasttrap_isa.h
index fa881d329..d57bac1ba 100644
--- a/bsd/machine/fasttrap_isa.h
+++ b/bsd/machine/fasttrap_isa.h
@@ -32,8 +32,6 @@
 #include "ppc/fasttrap_isa.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/fasttrap_isa.h"
-#elif defined (__arm__)
-#include "arm/fasttrap_isa.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/param.h b/bsd/machine/param.h
index 0b2a2ad30..6253a5fb4 100644
--- a/bsd/machine/param.h
+++ b/bsd/machine/param.h
@@ -35,8 +35,6 @@
 #include "ppc/param.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/param.h"
-#elif defined (__arm__)
-#include "arm/param.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/profile.h b/bsd/machine/profile.h
index 45e4de8da..ea28264c6 100644
--- a/bsd/machine/profile.h
+++ b/bsd/machine/profile.h
@@ -37,8 +37,6 @@
 #include "ppc/profile.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/profile.h"
-#elif defined (__arm__)
-#include "arm/profile.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/psl.h b/bsd/machine/psl.h
index 5abfaef6f..711639e4f 100644
--- a/bsd/machine/psl.h
+++ b/bsd/machine/psl.h
@@ -32,8 +32,6 @@
 #include "ppc/psl.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/psl.h"
-#elif defined (__arm__)
-#include "arm/psl.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/ptrace.h b/bsd/machine/ptrace.h
index 964abe15c..031327fe4 100644
--- a/bsd/machine/ptrace.h
+++ b/bsd/machine/ptrace.h
@@ -35,8 +35,6 @@
 #include "ppc/ptrace.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/ptrace.h"
-#elif defined (__arm__)
-#include "arm/ptrace.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/reboot.h b/bsd/machine/reboot.h
index 50c61c021..cf91c27da 100644
--- a/bsd/machine/reboot.h
+++ b/bsd/machine/reboot.h
@@ -32,8 +32,6 @@
 #include "ppc/reboot.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/reboot.h"
-#elif defined (__arm__)
-#include "arm/reboot.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/reg.h b/bsd/machine/reg.h
index f5eb3b9e1..95ec0f7d1 100644
--- a/bsd/machine/reg.h
+++ b/bsd/machine/reg.h
@@ -32,8 +32,6 @@
 #include "ppc/reg.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/reg.h"
-#elif defined (__arm__)
-#include "arm/reg.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/setjmp.h b/bsd/machine/setjmp.h
index 9aa71b5af..4f37be1d3 100644
--- a/bsd/machine/setjmp.h
+++ b/bsd/machine/setjmp.h
@@ -35,8 +35,6 @@
 #include "ppc/setjmp.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/setjmp.h"
-#elif defined (__arm__)
-#include "arm/setjmp.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/signal.h b/bsd/machine/signal.h
index 7457d1ca2..227d4182e 100644
--- a/bsd/machine/signal.h
+++ b/bsd/machine/signal.h
@@ -32,8 +32,6 @@
 #include "ppc/signal.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/signal.h"
-#elif defined (__arm__)
-#include "arm/signal.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/types.h b/bsd/machine/types.h
index 2bff80981..ed113ddde 100644
--- a/bsd/machine/types.h
+++ b/bsd/machine/types.h
@@ -35,8 +35,6 @@
 #include "ppc/types.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/types.h"
-#elif defined (__arm__)
-#include "arm/types.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/ucontext.h b/bsd/machine/ucontext.h
index 6ecf3e26f..a0e91489a 100644
--- a/bsd/machine/ucontext.h
+++ b/bsd/machine/ucontext.h
@@ -32,8 +32,6 @@
 #include "ppc/ucontext.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/ucontext.h"
-#elif defined (__arm__)
-#include "arm/ucontext.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/machine/vmparam.h b/bsd/machine/vmparam.h
index d9d0d74ed..8911ea054 100644
--- a/bsd/machine/vmparam.h
+++ b/bsd/machine/vmparam.h
@@ -32,8 +32,6 @@
 #include "ppc/vmparam.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "i386/vmparam.h"
-#elif defined (__arm__)
-#include "arm/vmparam.h"
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/net/ether_if_module.c b/bsd/net/ether_if_module.c
index 4673b53a3..8a4da6c6c 100644
--- a/bsd/net/ether_if_module.c
+++ b/bsd/net/ether_if_module.c
@@ -149,14 +149,6 @@ struct ether_desc_blk_str {
 __private_extern__ u_char	etherbroadcastaddr[ETHER_ADDR_LEN] =
 								{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
-#if defined (__arm__)
-static __inline__ int
-_ether_cmp(const void * a, const void * b)
-{
-	return (memcmp(a, b, ETHER_ADDR_LEN));
-}
-
-#else
 static __inline__ int
 _ether_cmp(const void * a, const void * b)
 {
@@ -170,7 +162,6 @@ _ether_cmp(const void * a, const void * b)
 	}
 	return (0);
 }
-#endif
 
 /*
  * Release all descriptor entries owned by this protocol (there may be several).
diff --git a/bsd/net/ether_inet_pr_module.c b/bsd/net/ether_inet_pr_module.c
index 062109012..f0b0f5b54 100644
--- a/bsd/net/ether_inet_pr_module.c
+++ b/bsd/net/ether_inet_pr_module.c
@@ -112,22 +112,12 @@ extern void *kdp_get_interface(void);
 extern void kdp_set_ip_and_mac_addresses(struct in_addr *ipaddr,
 										 struct ether_addr *macaddr);
 
-#if defined (__arm__)
-static __inline__ void
-_ip_copy(struct in_addr * dst, const struct in_addr * src)
-{
-	memcpy(dst, src, sizeof(*dst));
-	return;
-}
-
-#else
 static __inline__ void
 _ip_copy(struct in_addr * dst, const struct in_addr * src)
 {
 	*dst = *src;
 	return;
 }
-#endif
 
 static void
 ether_inet_arp_input(
diff --git a/bsd/nfs/nfs_bio.c b/bsd/nfs/nfs_bio.c
index 8b2ab3e1f..b1dccb036 100644
--- a/bsd/nfs/nfs_bio.c
+++ b/bsd/nfs/nfs_bio.c
@@ -689,13 +689,11 @@ loop:
 
 			ts.tv_sec = 2;
 			ts.tv_nsec = 0;
-			error = msleep(bp, nfs_buf_mutex, slpflag|(PRIBIO+1)|PDROP,
+			msleep(bp, nfs_buf_mutex, slpflag|(PRIBIO+1)|PDROP,
 					"nfsbufget", (slpflag == PCATCH) ? NULL : &ts);
-			if (error == EWOULDBLOCK)
-				error = 0;
 			slpflag = 0;
 			FSDBG_BOT(543, np, blkno, bp, bp->nb_flags);
-			if (error || ((error = nfs_sigintr(VTONMP(vp), NULL, thd, 0)))) {
+			if ((error = nfs_sigintr(VTONMP(vp), NULL, thd, 0))) {
 				FSDBG_BOT(541, np, blkno, 0, error);
 				return (error);
 			}
@@ -847,9 +845,9 @@ loop:
 			nfs_buf_delwri_push(1);
 
 			nfsneedbuffer = 1;
-			error = msleep(&nfsneedbuffer, nfs_buf_mutex, PCATCH|PDROP, "nfsbufget", NULL);
+			msleep(&nfsneedbuffer, nfs_buf_mutex, PCATCH|PDROP, "nfsbufget", NULL);
 			FSDBG_BOT(546, np, blkno, nfsbufcnt, nfsbufmax);
-			if (error || ((error = nfs_sigintr(VTONMP(vp), NULL, thd, 0)))) {
+			if ((error = nfs_sigintr(VTONMP(vp), NULL, thd, 0))) {
 				FSDBG_BOT(541, np, blkno, 0, error);
 				return (error);
 			}
@@ -2334,12 +2332,11 @@ nfs_async_write_start(struct nfsmount *nmp)
 	if (nfs_max_async_writes <= 0)
 		return (0);
 	lck_mtx_lock(&nmp->nm_lock);
-	while (!error && (nfs_max_async_writes > 0) && (nmp->nm_asyncwrites >= nfs_max_async_writes)) {
+	while ((nfs_max_async_writes > 0) && (nmp->nm_asyncwrites >= nfs_max_async_writes)) {
 		if ((error = nfs_sigintr(nmp, NULL, current_thread(), 1)))
 			break;
-		error = msleep(&nmp->nm_asyncwrites, &nmp->nm_lock, slpflag|(PZERO-1), "nfsasyncwrites", &ts);
-		if (error == EWOULDBLOCK)
-			error = 0;
+		msleep(&nmp->nm_asyncwrites, &nmp->nm_lock, slpflag|(PZERO-1), "nfsasyncwrites", &ts);
+		slpflag = 0;
 	}
 	if (!error)
 		nmp->nm_asyncwrites++;
diff --git a/bsd/nfs/nfs_socket.c b/bsd/nfs/nfs_socket.c
index 4c21d2115..fdb3ae1c5 100644
--- a/bsd/nfs/nfs_socket.c
+++ b/bsd/nfs/nfs_socket.c
@@ -263,11 +263,7 @@ nfs_connect(struct nfsmount *nmp)
 			}
 			if ((error = nfs_sigintr(nmp, NULL, current_thread(), 1)))
 				break;
-			error = msleep(&nmp->nm_so, &nmp->nm_lock, PSOCK, "nfs_socket_connect", &ts);
-			if (error == EWOULDBLOCK)
-				error = 0;
-			if (error)
-				break;
+			msleep(&nmp->nm_so, &nmp->nm_lock, PSOCK, "nfs_socket_connect", &ts);
 		}
 		if (tocnt > 15)
 			log(LOG_INFO, "nfs_connect: socket connect %s for %s\n",
@@ -692,7 +688,7 @@ nfs_send(struct nfsreq *req, int wait)
 {
 	struct nfsmount *nmp;
 	socket_t so;
-	int error, error2, sotype, rexmit, slpflag = PSOCK, needrecon;
+	int error, error2, sotype, rexmit, slpflag = 0, needrecon;
 	struct msghdr msg;
 	struct sockaddr *sendnam;
 	mbuf_t mreqcopy;
@@ -750,11 +746,8 @@ again:
 			nfs_mount_sock_thread_wake(nmp);
 			if ((error = nfs_sigintr(req->r_nmp, req, req->r_thread, 1)))
 				break;
-			error = msleep(req, &nmp->nm_lock, slpflag, "nfsconnectwait", &ts);
-			if (error == EWOULDBLOCK)
-				error = 0;
-			if ((error == EINTR) || (error == ERESTART))
-				break;
+			msleep(req, &nmp->nm_lock, slpflag|PSOCK, "nfsconnectwait", &ts);
+			slpflag = 0;
 		}
 		lck_mtx_unlock(&nmp->nm_lock);
 		if (error)
@@ -793,17 +786,14 @@ again:
 				if ((error = nfs_sigintr(req->r_nmp, req, req->r_thread, 1)))
 					break;
 				TAILQ_INSERT_TAIL(&nmp->nm_cwndq, req, r_cchain);
-				error = msleep(req, &nmp->nm_lock, slpflag | (PZERO - 1), "nfswaitcwnd", &ts);
+				msleep(req, &nmp->nm_lock, slpflag | (PZERO - 1), "nfswaitcwnd", &ts);
+				slpflag = 0;
 				if ((req->r_cchain.tqe_next != NFSREQNOLIST)) {
 					TAILQ_REMOVE(&nmp->nm_cwndq, req, r_cchain);
 					req->r_cchain.tqe_next = NFSREQNOLIST;
 				}
-				if ((error == EINTR) || (error == ERESTART))
-					break;
 			}
 			lck_mtx_unlock(&nmp->nm_lock);
-			if ((error == EINTR) || (error == ERESTART))
-				return (error);
 			goto again;
 		}
 		/*
@@ -1333,11 +1323,8 @@ nfs_wait_reply(struct nfsreq *req)
 		/* need to poll if we're P_NOREMOTEHANG */
 		if (nfs_noremotehang(req->r_thread))
 			ts.tv_sec = 1;
-		error = msleep(req, &req->r_mtx, slpflag | (PZERO - 1), "nfswaitreply", &ts);
-		if (error == EWOULDBLOCK)
-			error = 0;
-		if ((error == EINTR) || (error == ERESTART))
-			break;
+		msleep(req, &req->r_mtx, slpflag | (PZERO - 1), "nfswaitreply", &ts);
+		slpflag = 0;
 	}
 	lck_mtx_unlock(&req->r_mtx);
 
@@ -2018,12 +2005,11 @@ nfs_request_async(
 			/* make sure to wait until this async I/O request gets sent */
 			int slpflag = (req->r_nmp && (req->r_nmp->nm_flag & NFSMNT_INT) && req->r_thread) ? PCATCH : 0;
 			struct timespec ts = { 2, 0 };
-			while (!error && !(req->r_flags & R_SENT)) {
+			while (!(req->r_flags & R_SENT)) {
 				if ((error = nfs_sigintr(req->r_nmp, req, req->r_thread, 0)))
 					break;
-				error = msleep(req, &req->r_mtx, slpflag | (PZERO - 1), "nfswaitsent", &ts);
-				if (error == EWOULDBLOCK)
-					error = 0;
+				msleep(req, &req->r_mtx, slpflag | (PZERO - 1), "nfswaitsent", &ts);
+				slpflag = 0;
 			}
 		}
 		sent = req->r_flags & R_SENT;
@@ -2480,15 +2466,13 @@ nfs_sndlock(struct nfsreq *req)
 
 	if ((nmp->nm_flag & NFSMNT_INT) && req->r_thread)
 		slpflag = PCATCH;
-	while (!error && (*statep & NFSSTA_SNDLOCK)) {
+	while (*statep & NFSSTA_SNDLOCK) {
 		if ((error = nfs_sigintr(nmp, req, req->r_thread, 1)))
 			break;
 		*statep |= NFSSTA_WANTSND;
 		if (nfs_noremotehang(req->r_thread))
 			ts.tv_sec = 1;
-		error = msleep(statep, &nmp->nm_lock, slpflag | (PZERO - 1), "nfsndlck", &ts);
-		if (error == EWOULDBLOCK)
-			error = 0;
+		msleep(statep, &nmp->nm_lock, slpflag | (PZERO - 1), "nfsndlck", &ts);
 		if (slpflag == PCATCH) {
 			slpflag = 0;
 			ts.tv_sec = 2;
diff --git a/bsd/sys/dtrace.h b/bsd/sys/dtrace.h
index 7785b9b34..9be90489b 100644
--- a/bsd/sys/dtrace.h
+++ b/bsd/sys/dtrace.h
@@ -2291,9 +2291,6 @@ extern int (*dtrace_return_probe_ptr)(ppc_saved_state_t* regs);
 #elif defined (__i386__) || defined(__x86_64__)
 extern int (*dtrace_pid_probe_ptr)(x86_saved_state_t *regs);
 extern int (*dtrace_return_probe_ptr)(x86_saved_state_t* regs);
-#elif defined (__arm__)
-extern int (*dtrace_pid_probe_ptr)(struct arm_saved_state *regs);
-extern int (*dtrace_return_probe_ptr)(struct arm_saved_state* regs);
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/sys/fasttrap_impl.h b/bsd/sys/fasttrap_impl.h
index 8625c6494..0570f0c5e 100644
--- a/bsd/sys/fasttrap_impl.h
+++ b/bsd/sys/fasttrap_impl.h
@@ -204,8 +204,6 @@ extern int fasttrap_return_probe(ppc_saved_state_t* regs);
 #elif defined (__i386__) || defined(__x86_64__)
 extern int fasttrap_pid_probe(x86_saved_state_t *regs);
 extern int fasttrap_return_probe(x86_saved_state_t* regs);
-#elif defined(__arm__)
-extern int fasttrap_pid_probe(struct arm_saved_state *rp); /* so very, very, very broken... */
 #else
 #error architecture not supported
 #endif
diff --git a/bsd/sys/fbt.h b/bsd/sys/fbt.h
index 8121ebbbe..c72208c99 100644
--- a/bsd/sys/fbt.h
+++ b/bsd/sys/fbt.h
@@ -33,8 +33,6 @@
 typedef uint32_t machine_inst_t;
 #elif defined(__i386__) || defined (__x86_64__)
 typedef uint8_t machine_inst_t;
-#elif defined(__arm__)
-typedef uint32_t machine_inst_t; /* XXX is this correct? Thumb? */
 #else
 #error Unknown Architecture
 #endif
diff --git a/bsd/sys/mcache.h b/bsd/sys/mcache.h
index caa625031..21a169223 100644
--- a/bsd/sys/mcache.h
+++ b/bsd/sys/mcache.h
@@ -59,8 +59,6 @@ extern "C" {
 
 #if defined(__ppc__)
 #define	CPU_CACHE_SIZE	128
-#elif defined(__arm__)
-#define	CPU_CACHE_SIZE	32
 #else
 #define	CPU_CACHE_SIZE	64
 #endif
diff --git a/bsd/vfs/vfs_journal.c b/bsd/vfs/vfs_journal.c
index f1d48861c..8f7145d19 100644
--- a/bsd/vfs/vfs_journal.c
+++ b/bsd/vfs/vfs_journal.c
@@ -1104,7 +1104,11 @@ replay_journal(journal *jnl)
 		    goto bad_txn_handling;
 		}
 
-		if (blhdr->binfo[0].b.sequence_num < last_sequence_num) {
+		if (   (last_sequence_num != 0)
+		    && (blhdr->binfo[0].b.sequence_num != 0)
+		    && (blhdr->binfo[0].b.sequence_num != last_sequence_num)
+		    && (blhdr->binfo[0].b.sequence_num != last_sequence_num+1)) {
+
 		    txn_start_offset = jnl->jhdr->end = blhdr_offset;
 
 		    if (check_past_jnl_end) {
diff --git a/config/MasterVersion b/config/MasterVersion
index d3efc95f2..dfaa71992 100644
--- a/config/MasterVersion
+++ b/config/MasterVersion
@@ -1,4 +1,4 @@
-9.0.0
+9.1.0
 
 # The first line of this file contains the master version number for the kernel.
 # All other instances of the kernel version in xnu are derived from this file.
diff --git a/iokit/IOKit/machine/IOSharedLockImp.h b/iokit/IOKit/machine/IOSharedLockImp.h
index 7746639ba..b348bc820 100644
--- a/iokit/IOKit/machine/IOSharedLockImp.h
+++ b/iokit/IOKit/machine/IOSharedLockImp.h
@@ -30,8 +30,6 @@
 #include "IOKit/ppc/IOSharedLockImp.h"
 #elif defined (__i386__)
 #include "IOKit/i386/IOSharedLockImp.h"
-#elif defined (__arm__)
-#include "IOKit/arm/IOSharedLockImp.h"
 #else
 #error architecture not supported
 #endif
diff --git a/iokit/Kernel/IOHibernateIO.cpp b/iokit/Kernel/IOHibernateIO.cpp
index 58d4836c4..030368a72 100644
--- a/iokit/Kernel/IOHibernateIO.cpp
+++ b/iokit/Kernel/IOHibernateIO.cpp
@@ -942,14 +942,15 @@ if (vars->position & (vars->blockSize - 1)) HIBLOG("misaligned file pos %qx\n",
                 }
 	    }
 
-	    if (vars->extentRemaining <= vars->bufferSize)
-		vars->lastRead = vars->extentRemaining;
-	    else
-		vars->lastRead = vars->bufferSize;
-
+	    uint64_t length;
+	    uint64_t lastReadLength = vars->lastRead;
 	    uint64_t offset = (vars->position 
 				- vars->extentPosition + vars->currentExtent->start);
-	    uint64_t length = (vars->lastRead);
+	    if (vars->extentRemaining <= vars->bufferSize)
+		length = vars->extentRemaining;
+	    else
+		length = vars->bufferSize;
+	    vars->lastRead = length;
 
 //if (length != vars->bufferSize) HIBLOG("short read of %qx ends@ %qx\n", length, offset + length);
 
@@ -967,12 +968,12 @@ if (vars->position & (vars->blockSize - 1)) HIBLOG("misaligned file pos %qx\n",
                 uint8_t thisVector[AES_BLOCK_SIZE];
                 // save initial vector for following decrypts
                 bcopy(&cryptvars->aes_iv[0], &thisVector[0], AES_BLOCK_SIZE);
-                bcopy(vars->buffer + vars->bufferHalf + vars->lastRead - AES_BLOCK_SIZE, 
+                bcopy(vars->buffer + vars->bufferHalf + lastReadLength - AES_BLOCK_SIZE, 
                         &cryptvars->aes_iv[0], AES_BLOCK_SIZE);
                 // decrypt the buffer
                 aes_decrypt_cbc(vars->buffer + vars->bufferHalf,
                                 &thisVector[0],
-                                vars->lastRead / AES_BLOCK_SIZE,
+                                lastReadLength / AES_BLOCK_SIZE,
                                 vars->buffer + vars->bufferHalf,
                                 &cryptvars->ctx.decrypt);
             }
@@ -2306,7 +2307,9 @@ hibernate_machine_init(void)
         uint32_t     tag;
 	vm_offset_t  ppnum, compressedSize;
 
-	IOPolledFileRead(vars->fileVars, src, 8, cryptvars);
+	err = IOPolledFileRead(vars->fileVars, src, 8, cryptvars);
+	if (kIOReturnSuccess != err)
+	    break;
 
 	ppnum = header[0];
 	count = header[1];
@@ -2318,9 +2321,17 @@ hibernate_machine_init(void)
 
 	for (page = 0; page < count; page++)
 	{
-	    IOPolledFileRead(vars->fileVars, (uint8_t *) &tag, 4, cryptvars);
+	    err = IOPolledFileRead(vars->fileVars, (uint8_t *) &tag, 4, cryptvars);
+	    if (kIOReturnSuccess != err)
+		break;
 
 	    compressedSize = kIOHibernateTagLength & tag;
+	    if (kIOHibernateTagSignature != (tag & ~kIOHibernateTagLength))
+	    {
+		err = kIOReturnIPCError;
+		break;
+	    }
+
 	    if (!compressedSize)
 	    {
 		ppnum++;
@@ -2328,9 +2339,11 @@ hibernate_machine_init(void)
 		continue;
 	    }
 
-	    IOPolledFileRead(vars->fileVars, src, (compressedSize + 3) & ~3, cryptvars);
-   
-	    if (compressedSize != page_size)
+	    err = IOPolledFileRead(vars->fileVars, src, (compressedSize + 3) & ~3, cryptvars);
+   	    if (kIOReturnSuccess != err)
+		break;
+
+	    if (compressedSize < page_size)
 	    {
 		decoOffset = page_size;
 		WKdm_decompress((WK_word*) src, (WK_word*) (src + decoOffset), PAGE_SIZE_IN_WORDS);
@@ -2342,7 +2355,10 @@ hibernate_machine_init(void)
 
 	    err = IOMemoryDescriptorReadToPhysical(vars->srcBuffer, decoOffset, ptoa_64(ppnum), page_size);
 	    if (err)
+	    {
 		HIBLOG("IOMemoryDescriptorReadToPhysical [%d] %x\n", ppnum, err);
+		break;
+	    }
 
 	    ppnum++;
 	    pagesDone++;
@@ -2375,6 +2391,9 @@ hibernate_machine_init(void)
     }
     while (true);
 
+    if (kIOReturnSuccess != err)
+	panic("Hibernate restore error %x", err);
+
     gIOHibernateCurrentHeader->actualImage2Sum = sum;
 
     if (vars->fileVars->io)
diff --git a/iokit/Kernel/IOHibernateRestoreKernel.c b/iokit/Kernel/IOHibernateRestoreKernel.c
index 255f93221..405d64646 100644
--- a/iokit/Kernel/IOHibernateRestoreKernel.c
+++ b/iokit/Kernel/IOHibernateRestoreKernel.c
@@ -519,9 +519,6 @@ hibernate_kernel_entrypoint(IOHibernateImageHeader * header,
     // flush caches
     __asm__("wbinvd");
     proc();
-#elif __arm__
-    proc = (ResetProc)0x00000000;
-    proc();
 #endif
   
     return -1;
diff --git a/iokit/Kernel/IOWorkLoop.cpp b/iokit/Kernel/IOWorkLoop.cpp
index 09135d172..54eaa0e3c 100644
--- a/iokit/Kernel/IOWorkLoop.cpp
+++ b/iokit/Kernel/IOWorkLoop.cpp
@@ -301,7 +301,10 @@ do {									\
     bool more;
     do {
 	CLRP(&fFlags, kLoopRestart);
-	workToDo = more = false;
+	more = false;
+	IOInterruptState is = IOSimpleLockLockDisableInterrupt(workToDoLock);
+	workToDo = false;
+	IOSimpleLockUnlockEnableInterrupt(workToDoLock, is);
 	for (IOEventSource *evnt = eventChain; evnt; evnt = evnt->getNext()) {
 
 	    IOTimeClientS();
diff --git a/libkern/gen/OSDebug.cpp b/libkern/gen/OSDebug.cpp
index 43544373f..3690714e8 100644
--- a/libkern/gen/OSDebug.cpp
+++ b/libkern/gen/OSDebug.cpp
@@ -50,9 +50,6 @@ extern vm_offset_t max_valid_stack_address(void);
 extern void kmod_dump_log(vm_offset_t *addr, unsigned int cnt);
 
 extern addr64_t kvtophys(vm_offset_t va);
-#if __arm__
-extern int copyinframe(vm_address_t fp, uint32_t *frame);
-#endif
 
 __END_DECLS
 
@@ -222,30 +219,6 @@ pad:
 
     for ( ; frame_index < maxAddrs; frame_index++)
 	    bt[frame_index] = (void *) 0;
-#elif __arm__
-    uint32_t i= 0;
-    uint32_t frameb[2];
-    uint32_t fp= 0;
-    
-    // get the current frame pointer for this thread
-    __asm__ volatile("mov %0,r7" : "=r" (fp)); 
-    
-    // now crawl up the stack recording the link value of each frame
-    do {
-      // check bounds
-      if ((fp == 0) || ((fp & 3) != 0) || (fp > VM_MAX_KERNEL_ADDRESS) || (fp < VM_MIN_KERNEL_ADDRESS)) {
-	break;
-      }
-      // safely read frame
-      if (copyinframe(fp, frameb) != 0) {
-	break;
-      }
-      
-      // No need to use copyin as this is always a kernel address, see check above
-      bt[i] = (void*)frameb[1];        // link register
-      fp = frameb[0]; 
-    } while (++i < maxAddrs);
-    frame= i;
 #else
 #error arch
 #endif
diff --git a/libkern/libkern/OSAtomic.h b/libkern/libkern/OSAtomic.h
index 19fe32cc4..17e5dbd2d 100644
--- a/libkern/libkern/OSAtomic.h
+++ b/libkern/libkern/OSAtomic.h
@@ -341,10 +341,6 @@ static __inline__ void OSSynchronizeIO(void)
 #if defined(__ppc__)
         __asm__ ("eieio");
 #endif
-#if defined(__arm__)
-	UInt32 temp = 0;
-	__asm__ volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (temp));
-#endif
 }
 #endif
 
diff --git a/libkern/libkern/OSByteOrder.h b/libkern/libkern/OSByteOrder.h
index 7b96a2264..48659ca20 100644
--- a/libkern/libkern/OSByteOrder.h
+++ b/libkern/libkern/OSByteOrder.h
@@ -43,8 +43,6 @@
 #include <libkern/ppc/OSByteOrder.h>
 #elif (defined(__i386__) || defined(__x86_64__))
 #include <libkern/i386/OSByteOrder.h>
-#elif defined(__arm__)
-#include <libkern/arm/OSByteOrder.h>
 #else
 #include <libkern/machine/OSByteOrder.h>
 #endif
diff --git a/libkern/libkern/_OSByteOrder.h b/libkern/libkern/_OSByteOrder.h
index e6a30a1d8..f01425b02 100644
--- a/libkern/libkern/_OSByteOrder.h
+++ b/libkern/libkern/_OSByteOrder.h
@@ -66,9 +66,6 @@
 #include <libkern/i386/_OSByteOrder.h>
 #endif
 
-#if defined(__arm__)
-#include <libkern/arm/OSByteOrder.h>
-#endif
 
 
 #define __DARWIN_OSSwapInt16(x) \
diff --git a/libsa/libsa/setjmp.h b/libsa/libsa/setjmp.h
index 7c13293ea..1a67e8576 100644
--- a/libsa/libsa/setjmp.h
+++ b/libsa/libsa/setjmp.h
@@ -32,8 +32,6 @@
 #include "ppc/setjmp.h"
 #elif defined (__i386__)
 #include "i386/setjmp.h"
-#elif defined (__arm__)
-#include "arm/setjmp.h"
 #else
 #error architecture not supported
 #endif
diff --git a/libsyscall/custom/SYS.h b/libsyscall/custom/SYS.h
index 3f95dbbaf..53039d9e3 100644
--- a/libsyscall/custom/SYS.h
+++ b/libsyscall/custom/SYS.h
@@ -213,183 +213,6 @@ LEAF(_##pseudo, 0)					;\
 	PSEUDO(pseudo, name, nargs)			;\
 	ret
 
-#elif defined(__arm__)
-
-#define SWI_SYSCALL 0x80	// from <mach/vm_param.h>
-
-/*
- * ARM system call interface:
- *
- * swi 0x80
- * args: r0-r6
- * return code: r0
- * on error, carry bit is set in the psr, otherwise carry bit is cleared.
- */
-
-/*
- * Macros.
- */
-
-/*
- * until we update the architecture project, these live here
- */
-
-#if defined(__DYNAMIC__)
-#define MI_GET_ADDRESS(reg,var)  \
-	ldr	reg, 4f					;\
-3:	ldr	reg, [pc, reg]				;\
-	b	5f					;\
-4:	.long	6f - (3b + 8)				;\
-5:							;\
-	.non_lazy_symbol_pointer			;\
-6:							;\
-	.indirect_symbol var				;\
-	.long 0						;\
-	.text						;\
-	.align 2
-#else
-#define MI_GET_ADDRESS(reg,var)  \
-	ldr	reg, 3f	;\
-	b	4f	;\
-3:	.long var	;\
-4:
-#endif
-
-#if defined(__DYNAMIC__)
-#define MI_BRANCH_EXTERNAL(var)				\
-	.globl	var								;\
-	MI_GET_ADDRESS(ip, var)				;\
- 	bx	ip
-#else
-#define MI_BRANCH_EXTERNAL(var)				;\
-	.globl	var								;\
- 	b	var
-#endif
-
-#if defined(__DYNAMIC__)
-#define MI_CALL_EXTERNAL(var)    \
-	.globl	var				;\
-	MI_GET_ADDRESS(ip,var)	;\
-	mov	lr, pc		;\
-	bx	ip
-#else
-#define MI_CALL_EXTERNAL(var)				\
-	.globl	var								;\
- 	bl	var
-#endif
-
-#define MI_ENTRY_POINT(name)				\
-	.align 2	;\
-	.globl  name							;\
-	.text									;\
-name:
-
-/* load the syscall number into r12 and trap */
-#define DO_SYSCALL(num)		\
-	.if (((num) & 0xff) == (num)) 	       				;\
-	mov		r12, #(num)		       			;\
-	.elseif (((num) & 0x3fc) == (num))				;\
-	mov		r12, #(num)					;\
-	.else								;\
-	mov		r12, #((num) & 0xffffff00)	/* top half of the syscall number */ ;\
-	orr		r12, r12, #((num) & 0xff)	/* bottom half */ ;\
-	.endif								;\
-	swi		#SWI_SYSCALL
-
-/* simple syscalls (0 to 4 args) */
-#define	SYSCALL_0to4(name)					\
-	MI_ENTRY_POINT(_##name)					;\
-	DO_SYSCALL(SYS_##name)					;\
-	bxcc	lr								/* return if carry is clear (no error) */ ; \
-1:	MI_BRANCH_EXTERNAL(cerror)
-
-/* syscalls with 5 args is different, because of the single arg register load */
-#define	SYSCALL_5(name)						\
-	MI_ENTRY_POINT(_##name)					;\
-	mov		ip, sp							/* save a pointer to the args */ ; \
-	stmfd	sp!, { r4-r5 }					/* save r4-r5 */ ;\
-	ldr		r4, [ip]						/* load 5th arg */ ; \
-	DO_SYSCALL(SYS_##name)					;\
-	ldmfd	sp!, { r4-r5 }					/* restore r4-r5 */ ; \
-	bxcc	lr								/* return if carry is clear (no error) */ ; \
-1:	MI_BRANCH_EXTERNAL(cerror)
-
-/* syscalls with 6 to 8 args */
-#define SYSCALL_6to8(name, save_regs, arg_regs) \
-	MI_ENTRY_POINT(_##name)					;\
-	mov		ip, sp							/* save a pointer to the args */ ; \
-	stmfd	sp!, { save_regs }				/* callee saved regs */ ;\
-	ldmia	ip, { arg_regs }				/* load arg regs */ ; \
-	DO_SYSCALL(SYS_##name)					;\
-	ldmfd	sp!, { save_regs }				/* restore callee saved regs */ ; \
-	bxcc	lr								/* return if carry is clear (no error) */ ; \
-1:	MI_BRANCH_EXTERNAL(cerror)
-
-#define COMMA ,
-
-#define SYSCALL_0(name)						SYSCALL_0to4(name)
-#define SYSCALL_1(name)						SYSCALL_0to4(name)
-#define SYSCALL_2(name)						SYSCALL_0to4(name)
-#define SYSCALL_3(name)						SYSCALL_0to4(name)
-#define SYSCALL_4(name)						SYSCALL_0to4(name)
-/* SYSCALL_5 declared above */
-#define SYSCALL_6(name)						SYSCALL_6to8(name, r4-r5, r4-r5)
-#define SYSCALL_7(name)						SYSCALL_6to8(name, r4-r6 COMMA r8, r4-r6)
-#define SYSCALL_8(name)						SYSCALL_6to8(name, r4-r6 COMMA r8, r4-r6 COMMA r8)
-
-/* select the appropriate syscall code, based on the number of arguments */
-#define SYSCALL(name, nargs)	SYSCALL_##nargs(name)
-
-#define	SYSCALL_NONAME_0to4(name)			\
-	DO_SYSCALL(SYS_##name)					;\
-	bcc		1f								/* branch if carry bit is clear (no error) */ ; \
-	MI_BRANCH_EXTERNAL(cerror)				/* call cerror */ ; \
-1:
-
-#define	SYSCALL_NONAME_5(name)				\
-	mov		ip, sp 							/* save a pointer to the args */ ; \
-	stmfd	sp!, { r4-r5 }					/* save r4-r5 */ ;\
-	ldr		r4, [ip]						/* load 5th arg */ ; \
-	DO_SYSCALL(SYS_##name)					;\
-	ldmfd	sp!, { r4-r5 }					/* restore r4-r7 */ ; \
-	bcc		1f								/* branch if carry bit is clear (no error) */ ; \
-	MI_BRANCH_EXTERNAL(cerror)				/* call cerror */ ; \
-1:
-
-#define	SYSCALL_NONAME_6to8(name, save_regs, arg_regs)	\
-	mov		ip, sp 							/* save a pointer to the args */ ; \
-	stmfd	sp!, { save_regs }				/* callee save regs */ ;\
-	ldmia	ip, { arg_regs }				/* load arguments */ ; \
-	DO_SYSCALL(SYS_##name)					;\
-	ldmfd	sp!, { save_regs }				/* restore callee saved regs */ ; \
-	bcc		1f								/* branch if carry bit is clear (no error) */ ; \
-	MI_BRANCH_EXTERNAL(cerror)				/* call cerror */ ; \
-1:
-
-#define SYSCALL_NONAME_0(name)				SYSCALL_NONAME_0to4(name)
-#define SYSCALL_NONAME_1(name)				SYSCALL_NONAME_0to4(name)
-#define SYSCALL_NONAME_2(name)				SYSCALL_NONAME_0to4(name)
-#define SYSCALL_NONAME_3(name)				SYSCALL_NONAME_0to4(name)
-#define SYSCALL_NONAME_4(name)				SYSCALL_NONAME_0to4(name)
-/* SYSCALL_NONAME_5 declared above */
-#define SYSCALL_NONAME_6(name)				SYSCALL_NONAME_6to8(name, r4-r5, r4-r5)
-#define SYSCALL_NONAME_7(name)				SYSCALL_NONAME_6to8(name, r4-r6 COMMA r8, r4-r6)
-#define SYSCALL_NONAME_8(name)				SYSCALL_NONAME_6to8(name, r4-r6 COMMA r8, r4-r6 COMMA r8)
-
-/* select the appropriate syscall code, based on the number of arguments */
-#define SYSCALL_NONAME(name, nargs)	SYSCALL_NONAME_##nargs(name)
-
-#define	PSEUDO(pseudo, name, nargs)			\
-	.globl	_##pseudo						;\
-	.text									;\
-	.align  2								;\
-_##pseudo:									;\
-	SYSCALL_NONAME(name, nargs)
-
-#define __SYSCALL(pseudo, name, nargs)		\
-	PSEUDO(pseudo, name, nargs)				;\
-	bx lr
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__fork.s b/libsyscall/custom/__fork.s
index 227812ecc..baff6eb82 100644
--- a/libsyscall/custom/__fork.s
+++ b/libsyscall/custom/__fork.s
@@ -243,70 +243,6 @@ L2:
 	addq	$24, %rsp   // restore the stack
 	ret		
 
-#elif defined(__arm__)
-	
-	.globl	cerror
-	MI_ENTRY_POINT(_fork)
-	stmfd	sp!, {r4, r7, lr}
-	add	r7, sp, #4
-	MI_CALL_EXTERNAL(__cthread_fork_prepare)
-	mov	r1, #1					// prime results
-	mov	r12, #SYS_fork
-	swi	#SWI_SYSCALL				// make the syscall
-	bcs	Lbotch					// error?
-	cmp	r1, #0					// parent (r1=0) or child(r1=1)
-	beq	Lparent
-
-	//child here...
-	MI_GET_ADDRESS(r3, __current_pid)
-	mov	r0, #0
-	str	r0, [r3]		// clear cached pid in child
-
-#if defined(__DYNAMIC__)
-// Here on the child side of the fork we need to tell the dynamic linker that
-// we have forked.  To do this we call __dyld_fork_child in the dyanmic
-// linker.  But since we can't dynamicly bind anything until this is done we
-// do this by using the private extern __dyld_func_lookup() function to get the
-// address of __dyld_fork_child (the 'C' code equivlent):
-//
-//	_dyld_func_lookup("__dyld_fork_child", &address);
-//	address();
-//
-	.cstring
-	.align 2
-LC0:
-	.ascii "__dyld_fork_child\0"
-.text
-.align 2
-	sub	sp, sp, #4				// allocate space for the address parameter
-	mov	r1, sp					// get the address of the allocated space
-	ldr	r0, LP0					// get the name of the function to look up
-L0:	add	r0, pc, r0
-	bl	__dyld_func_lookup
-	mov	lr, pc
-	ldr	pc, [sp], #4				// call __dyld_fork_child indirectly and pop
-#endif
-	MI_CALL_EXTERNAL(__cthread_fork_child)		// let child get ready
-	mov	r0, #0
-        ldmfd   sp!, {r4, r7, pc}
-
-Lbotch:
-	MI_CALL_EXTERNAL(cerror)			// jump here on error
-	mov	r0,#-1					// set the error
-	// fall thru
-	
-Lparent:	
-	mov	r4, r0					// save child pid
-	MI_CALL_EXTERNAL(__cthread_fork_parent)
-	mov	r0, r4					// restore child pid
-	ldmfd   sp!, {r4, r7, pc}			// pop and return
-
-	.align 2
-#if defined(__DYNAMIC__)
-LP0:
-	.long	LC0-(L0+8)
-#endif
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__getpid.s b/libsyscall/custom/__getpid.s
index a6cc5a5f4..1299a1645 100644
--- a/libsyscall/custom/__getpid.s
+++ b/libsyscall/custom/__getpid.s
@@ -135,51 +135,6 @@ LEAF(___getpid, 0)
 	movl		%edx, %eax
 	ret
 
-#elif defined(__arm__)
-
-#include <arm/arch.h>
-	
-	.data
-	.globl	__current_pid
-	.align 2
-__current_pid:
-	/* Cached pid.  Possible values:
-	 *	0:		no value cached
-	 *	> 0:		cached PID of current process
-	 *	< 0:		negative number of vforks in progress
-	 *	INT_MIN:	for pre-ARMv6, "looking" value (0x80000000)
-	 */
-	.long 0
-
-MI_ENTRY_POINT(_getpid)
-	ldr	r3, L__current_pid
-L1:	add	r3, pc, r3		// r3 = &__current_pid
-	ldr	r0, [r3]		// get the cached pid
-	cmp	r0, #0
-	bxgt	lr			// if positive, return it
-
-	SYSCALL_NONAME(getpid, 0)
-
-#ifdef _ARM_ARCH_6
-	ldrex	r2, [r3]		// see if we can cache it
-	cmp	r2, #0			// we can't if there are any...
-	bxlt	lr			// ...vforks in progress
-	strex	r2, r0, [r3]		// ignore conflicts
-#else
-	mov	r1, #0x80000000		// load "looking" value
-	swp	r2, r1, [r3]		// look at the value, lock others out
-	cmp	r2, r1			// anyone else trying to look?
-	bxeq	lr			// yes, so return immediately/	
-	cmp	r2, #0			// see if we can cache it
-	streq	r0, [r3]		// if zero, we can
-	strne	r2, [r3]		// otherwise restore previous value
-#endif
-		
-	bx	lr
-				
-L__current_pid:	
-	.long	__current_pid - (L1+8)		
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__gettimeofday.s b/libsyscall/custom/__gettimeofday.s
index aa1a7d1f0..c43ee761e 100644
--- a/libsyscall/custom/__gettimeofday.s
+++ b/libsyscall/custom/__gettimeofday.s
@@ -68,17 +68,6 @@ LABEL(___gettimeofday)
     xorl	%eax, %eax
     ret
 
-#elif defined(__arm__)
-/*
- * This syscall is special cased: the timeval is returned in r0/r1.
- */
-MI_ENTRY_POINT(___gettimeofday)
-    mov     r3, r0                  // save ptr to timeval
-    SYSCALL_NONAME(gettimeofday,2)
-    stmia   r3, { r0, r1 }
-    mov     r0, #0
-    bx      lr
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__lseek.s b/libsyscall/custom/__lseek.s
index b2d9215a3..909443b17 100644
--- a/libsyscall/custom/__lseek.s
+++ b/libsyscall/custom/__lseek.s
@@ -36,10 +36,6 @@ __SYSCALL(__lseek, lseek, 3)
 
 __SYSCALL_INT(__lseek, lseek, 3)
 
-#elif defined(__arm__)
-
-__SYSCALL(__lseek, lseek, 4)
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__pipe.s b/libsyscall/custom/__pipe.s
index b0eaf9ea2..107a37799 100644
--- a/libsyscall/custom/__pipe.s
+++ b/libsyscall/custom/__pipe.s
@@ -56,16 +56,6 @@ PSEUDO(__pipe, pipe, 0)
 	xorl	%eax, %eax
 	ret
 
-#elif defined(__arm__)
-
-MI_ENTRY_POINT(_pipe)
-	mov		r3,r0              // save fildes across syscall
-	SYSCALL_NONAME(pipe, 0)
-	str     r0, [r3, #0]
-	str     r1, [r3, #4]
-	mov		r0,#0
-	bx		lr
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__ptrace.s b/libsyscall/custom/__ptrace.s
index 400b75497..2fd53b460 100644
--- a/libsyscall/custom/__ptrace.s
+++ b/libsyscall/custom/__ptrace.s
@@ -58,17 +58,6 @@ LEAF(___ptrace, 0)
 UNIX_SYSCALL_NONAME(ptrace, 4)
 	ret
 
-#elif defined(__arm__)
-
-MI_ENTRY_POINT(_ptrace)
-	MI_GET_ADDRESS(ip,_errno)
-	str	r8, [sp, #-4]!
-	mov     r8, #0
-	str     r8, [ip]
-	ldr	r8, [sp], #4	
-	SYSCALL_NONAME(ptrace, 4)
-	bx		lr
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__sigaltstack.s b/libsyscall/custom/__sigaltstack.s
index f4ce94d63..514822ba2 100644
--- a/libsyscall/custom/__sigaltstack.s
+++ b/libsyscall/custom/__sigaltstack.s
@@ -36,10 +36,6 @@ __SYSCALL(__sigaltstack, sigaltstack, 3)
 
 __SYSCALL_INT(__sigaltstack, sigaltstack, 3)
 
-#elif defined(__arm__)
-
-__SYSCALL(__sigaltstack, sigaltstack, 3)
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__sigreturn.s b/libsyscall/custom/__sigreturn.s
index 64a4adb57..776351abb 100644
--- a/libsyscall/custom/__sigreturn.s
+++ b/libsyscall/custom/__sigreturn.s
@@ -36,10 +36,6 @@ __SYSCALL(__sigreturn, sigreturn, 2)
 
 __SYSCALL_INT(__sigreturn, sigreturn, 2)
 
-#elif defined(__arm__)
-
-__SYSCALL(__sigreturn, sigreturn, 2)
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__syscall.s b/libsyscall/custom/__syscall.s
index 88f1f08e0..dae18a831 100644
--- a/libsyscall/custom/__syscall.s
+++ b/libsyscall/custom/__syscall.s
@@ -54,10 +54,6 @@ END(___syscall)
 // that value anyway.
 __SYSCALL(__syscall, syscall, 0);
 
-#elif defined(__arm__)
-
-__SYSCALL(__syscall, syscall, 7)
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/__vfork.s b/libsyscall/custom/__vfork.s
index c6e559ccd..dc201e852 100644
--- a/libsyscall/custom/__vfork.s
+++ b/libsyscall/custom/__vfork.s
@@ -176,71 +176,6 @@ L2:
 	addq		$1, (%rdx)
 	jmp		*%rdi
 
-#elif defined(__arm__)
-
-#include <arm/arch.h>
-		
-	.globl	cerror
-	MI_ENTRY_POINT(_vfork)
-
-	MI_GET_ADDRESS(r3, __current_pid)	// get address of __current_pid
-#ifdef _ARM_ARCH_6
-L0:	
-	ldrex	r1, [r3]
-	subs	r1, r1, #1			// if __current_pid <= 0, decrement it
-	movpl	r1, #-1				// otherwise put -1 in there
-	strex	r2, r1, [r3]
-	cmp	r2, #0
-	bne	L0
-#else
-	mov	r2, #0x80000000			// load "looking" value
-L0:	
-	swp	r1, r2, [r3]			// look at the value, lock others out
-	cmp	r1, r2				// anyone else trying to look?
-	beq	L0				// yes, so wait our turn
-        subs    r1, r1, #1                      // if __current_pid <= 0, decrement it
-	movpl   r1, #-1                         // otherwise put -1 in there
-	str	r1, [r3]
-#endif
-		
-	mov	r1, #1					// prime results
-	mov	r12, #SYS_vfork
-	swi	#SWI_SYSCALL				// make the syscall
-	bcs	Lbotch					// error?
-	cmp	r1, #0					// parent (r1=0) or child(r1=1)
-	beq	Lparent
-
-	//child here...
-	mov	r0, #0
-	bx	lr					// return
-
-Lbotch:
-	MI_CALL_EXTERNAL(cerror)			// jump here on error
-	mov	r0,#-1					// set the error
-	// reload values clobbered by cerror (so we can treat them as live in Lparent)
-	MI_GET_ADDRESS(r3, __current_pid)		// get address of __current_pid
-#ifndef _ARM_ARCH_6
-	mov	r2, #0x80000000			// load "looking" value
-#endif
-	// fall thru
-	
-Lparent:	
-#ifdef _ARM_ARCH_6
-	ldrex	r1, [r3]
-	add	r1, r1, #1			// we're back, decrement vfork count
-	strex	r2, r1, [r3]
-	cmp	r2, #0
-	bne	Lparent
-#else
-	swp	r1, r2, [r3]			// look at the value, lock others out
-	cmp	r1, r2				// anyone else trying to look?
-	beq	Lparent				// yes, so wait our turn
-	add	r1, r1, #1			// we're back, decrement vfork count
-	str	r1, [r3]
-#endif
-
-	bx	lr					// return
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/libsyscall/custom/custom.s b/libsyscall/custom/custom.s
index c18fabc0e..5f34a7434 100644
--- a/libsyscall/custom/custom.s
+++ b/libsyscall/custom/custom.s
@@ -101,20 +101,6 @@ LABEL(cerror)
 	movq	$-1,%rdx /* in case a 128-bit value is returned */
 	ret
 
-#elif defined(__arm__)
-
-	.globl	_errno
-
-MI_ENTRY_POINT(cerror)
-	stmfd	sp!, {r7, lr}
-	mov		r7, sp
-	MI_GET_ADDRESS(r3,_errno)
-	str		r0, [r3]
-	MI_CALL_EXTERNAL(_cthread_set_errno_self)
-	mov		r0, #-1
-	mov		r1, #-1
-	ldmfd	sp!, {r7, pc}
-
 #else
 #error Unsupported architecture
 #endif
diff --git a/osfmk/chud/chud_thread.c b/osfmk/chud/chud_thread.c
index 13f03940b..6af57de1e 100644
--- a/osfmk/chud/chud_thread.c
+++ b/osfmk/chud/chud_thread.c
@@ -48,8 +48,6 @@
 #	include <i386/mp.h>	
 #elif defined(__ppc__) || defined(__ppc64__)
 #	include <ppc/cpu_internal.h>
-#elif defined(__arm__)
-#	include <arm/cpu_internal.h>
 #else
 // fall back on declaring it extern.  The linker will sort us out.
 extern unsigned int real_ncpus;
diff --git a/osfmk/chud/chud_xnu_glue.h b/osfmk/chud/chud_xnu_glue.h
index 876c72513..437c21a01 100644
--- a/osfmk/chud/chud_xnu_glue.h
+++ b/osfmk/chud/chud_xnu_glue.h
@@ -30,8 +30,6 @@
 #include "ppc/chud_xnu_glue.h"
 #elif defined (__i386__)
 #include "i386/chud_xnu_glue.h"
-#elif defined (__arm__)
-#include "arm/chud_xnu_glue.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/chud/chud_xnu_private.h b/osfmk/chud/chud_xnu_private.h
index 2908bfccb..6951cbee3 100644
--- a/osfmk/chud/chud_xnu_private.h
+++ b/osfmk/chud/chud_xnu_private.h
@@ -37,8 +37,6 @@
 #include "chud/ppc/chud_xnu_private.h"
 #elif defined (__i386__)
 #include "chud/i386/chud_xnu_private.h"
-#elif defined (__arm__)
-#include "chud/arm/chud_xnu_private.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/device/iokit_rpc.c b/osfmk/device/iokit_rpc.c
index 667c1323f..3e750473e 100644
--- a/osfmk/device/iokit_rpc.c
+++ b/osfmk/device/iokit_rpc.c
@@ -553,9 +553,6 @@ ppnum_t IOGetLastPageNumber(void)
     for (idx = 0; idx < pmap_memory_region_count; idx++)
     {
 	lastPage = pmap_memory_regions[idx].end - 1;
-#elif __arm__
-    if (0) /* XXX */
-    {
 #else
 #error arch
 #endif
diff --git a/osfmk/kern/syscall_sw.h b/osfmk/kern/syscall_sw.h
index 4aab31696..c6259eeb0 100644
--- a/osfmk/kern/syscall_sw.h
+++ b/osfmk/kern/syscall_sw.h
@@ -73,16 +73,12 @@ typedef struct {
 	int			(*mach_trap_function)(void);
 #if defined(__i386__)
 	boolean_t		mach_trap_stack;
-#elif defined(__arm__)
-	/* no space */
 #else
 	mach_munge_t		*mach_trap_arg_munge32; /* system call arguments for 32-bit */
 	mach_munge_t		*mach_trap_arg_munge64; /* system call arguments for 64-bit */
 #endif
 #if	!MACH_ASSERT
-#if !defined(__arm__)
 	int			mach_trap_unused;
-#endif
 #else
 	const char*		mach_trap_name;
 #endif /* !MACH_ASSERT */
@@ -102,14 +98,6 @@ extern int			mach_trap_count;
 #define MACH_TRAP(name, arg_count, munge32, munge64)		\
 		{ (arg_count), (int (*)(void)) (name), FALSE, #name }
 #endif /* !MACH_ASSERT */
-#elif defined(__arm__)
-#if	!MACH_ASSERT
-#define	MACH_TRAP(name, arg_count, munge32, munge64)	\
-		{ (arg_count), (int (*)(void)) (name) }
-#else
-#define MACH_TRAP(name, arg_count, munge32, munge64)		\
-		{ (arg_count), (int (*)(void)) (name), #name }
-#endif /* !MACH_ASSERT */
 #else  /* !defined(__i386__) */
 #if	!MACH_ASSERT
 #define	MACH_TRAP(name, arg_count, munge32, munge64)	\
diff --git a/osfmk/libsa/machine/types.h b/osfmk/libsa/machine/types.h
index 4a6b16e71..abe727554 100644
--- a/osfmk/libsa/machine/types.h
+++ b/osfmk/libsa/machine/types.h
@@ -32,8 +32,6 @@
 #include "ppc/types.h"
 #elif defined (__i386__)
 #include "i386/types.h"
-#elif defined (__arm__)
-#include "arm/types.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/asm.h b/osfmk/mach/machine/asm.h
index 59e1da299..ba98269a5 100644
--- a/osfmk/mach/machine/asm.h
+++ b/osfmk/mach/machine/asm.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/asm.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/asm.h"
-#elif defined (__arm__)
-#include "mach/arm/asm.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/boolean.h b/osfmk/mach/machine/boolean.h
index 1bec00d4b..97ffd0766 100644
--- a/osfmk/mach/machine/boolean.h
+++ b/osfmk/mach/machine/boolean.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/boolean.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/boolean.h"
-#elif defined (__arm__)
-#include "mach/arm/boolean.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/exception.h b/osfmk/mach/machine/exception.h
index 5ce83f254..5fc148663 100644
--- a/osfmk/mach/machine/exception.h
+++ b/osfmk/mach/machine/exception.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/exception.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/exception.h"
-#elif defined (__arm__)
-#include "mach/arm/exception.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/kern_return.h b/osfmk/mach/machine/kern_return.h
index df3739699..82c0adf0c 100644
--- a/osfmk/mach/machine/kern_return.h
+++ b/osfmk/mach/machine/kern_return.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/kern_return.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/kern_return.h"
-#elif defined (__arm__)
-#include "mach/arm/kern_return.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/ndr_def.h b/osfmk/mach/machine/ndr_def.h
index a7b5a9bdd..10e8e3e2f 100644
--- a/osfmk/mach/machine/ndr_def.h
+++ b/osfmk/mach/machine/ndr_def.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/ndr_def.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/ndr_def.h"
-#elif defined (__arm__)
-#include "mach/arm/ndr_def.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/processor_info.h b/osfmk/mach/machine/processor_info.h
index ca9636795..a4c6d639e 100644
--- a/osfmk/mach/machine/processor_info.h
+++ b/osfmk/mach/machine/processor_info.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/processor_info.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/processor_info.h"
-#elif defined (__arm__)
-#include "mach/arm/processor_info.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/rpc.h b/osfmk/mach/machine/rpc.h
index b969bd4d3..849260ae4 100644
--- a/osfmk/mach/machine/rpc.h
+++ b/osfmk/mach/machine/rpc.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/rpc.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/rpc.h"
-#elif defined (__arm__)
-#include "mach/arm/rpc.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/sdt_isa.h b/osfmk/mach/machine/sdt_isa.h
index a8e1379cd..000690744 100644
--- a/osfmk/mach/machine/sdt_isa.h
+++ b/osfmk/mach/machine/sdt_isa.h
@@ -32,8 +32,6 @@
 #include <mach/ppc/sdt_isa.h>
 #elif defined (__i386__) || defined(__x86_64__)
 #include <mach/i386/sdt_isa.h>
-#elif defined (__arm__)
-#include <mach/arm/sdt_isa.h>
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/syscall_sw.h b/osfmk/mach/machine/syscall_sw.h
index e5aaa900a..972331769 100644
--- a/osfmk/mach/machine/syscall_sw.h
+++ b/osfmk/mach/machine/syscall_sw.h
@@ -35,8 +35,6 @@
 #include "mach/ppc/syscall_sw.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/syscall_sw.h"
-#elif defined (__arm__)
-#include "mach/arm/syscall_sw.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/thread_state.h b/osfmk/mach/machine/thread_state.h
index 18ffca4e5..bf9a155d9 100644
--- a/osfmk/mach/machine/thread_state.h
+++ b/osfmk/mach/machine/thread_state.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/thread_state.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/thread_state.h"
-#elif defined (__arm__)
-#include "mach/arm/thread_state.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/thread_status.h b/osfmk/mach/machine/thread_status.h
index ad5eff08f..10ed68996 100644
--- a/osfmk/mach/machine/thread_status.h
+++ b/osfmk/mach/machine/thread_status.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/thread_status.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/thread_status.h"
-#elif defined (__arm__)
-#include "mach/arm/thread_status.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/vm_param.h b/osfmk/mach/machine/vm_param.h
index c71121b92..685342999 100644
--- a/osfmk/mach/machine/vm_param.h
+++ b/osfmk/mach/machine/vm_param.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/vm_param.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/vm_param.h"
-#elif defined (__arm__)
-#include "mach/arm/vm_param.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/mach/machine/vm_types.h b/osfmk/mach/machine/vm_types.h
index b36609214..a5c4c8ba1 100644
--- a/osfmk/mach/machine/vm_types.h
+++ b/osfmk/mach/machine/vm_types.h
@@ -33,8 +33,6 @@
 #include "mach/ppc/vm_types.h"
 #elif defined (__i386__) || defined(__x86_64__)
 #include "mach/i386/vm_types.h"
-#elif defined (__arm__)
-#include "mach/arm/vm_types.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/asm.h b/osfmk/machine/asm.h
index 2f8346ffc..8dc4a261f 100644
--- a/osfmk/machine/asm.h
+++ b/osfmk/machine/asm.h
@@ -32,8 +32,6 @@
 #include "ppc/asm.h"
 #elif defined (__i386__)
 #include "i386/asm.h"
-#elif defined (__arm__)
-#include "arm/asm.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/ast.h b/osfmk/machine/ast.h
index 722602d0e..866a1c606 100644
--- a/osfmk/machine/ast.h
+++ b/osfmk/machine/ast.h
@@ -32,8 +32,6 @@
 #include "ppc/ast.h"
 #elif defined (__i386__)
 #include "i386/ast.h"
-#elif defined (__arm__)
-#include "arm/ast.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/ast_types.h b/osfmk/machine/ast_types.h
index 97c932d87..604033e35 100644
--- a/osfmk/machine/ast_types.h
+++ b/osfmk/machine/ast_types.h
@@ -32,8 +32,6 @@
 #include "ppc/ast_types.h"
 #elif defined (__i386__)
 #include "i386/ast_types.h"
-#elif defined (__arm__)
-#include "arm/ast_types.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/commpage.h b/osfmk/machine/commpage.h
index 80c9e23db..226f76cd8 100644
--- a/osfmk/machine/commpage.h
+++ b/osfmk/machine/commpage.h
@@ -33,8 +33,6 @@
 #include "ppc/commpage/commpage.h"
 #elif defined (__i386__)
 #include "i386/commpage/commpage.h"
-#elif defined (__arm__)
-#include "arm/commpage/commpage.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/cpu_affinity.h b/osfmk/machine/cpu_affinity.h
index 7d61bb445..ee32b2748 100644
--- a/osfmk/machine/cpu_affinity.h
+++ b/osfmk/machine/cpu_affinity.h
@@ -34,8 +34,6 @@
 #include "ppc/cpu_affinity.h"
 #elif defined (__i386__)
 #include "i386/cpu_affinity.h"
-#elif defined (__arm__)
-#include "arm/cpu_affinity.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/cpu_capabilities.h b/osfmk/machine/cpu_capabilities.h
index bfc586bbd..0dc5d4514 100644
--- a/osfmk/machine/cpu_capabilities.h
+++ b/osfmk/machine/cpu_capabilities.h
@@ -35,8 +35,6 @@
 #include "ppc/cpu_capabilities.h"
 #elif defined (__i386__)
 #include "i386/cpu_capabilities.h"
-#elif defined (__arm__)
-#include "arm/cpu_capabilities.h"
 #else
 #error architecture not supported
 #endif
@@ -46,8 +44,6 @@
 #include <System/ppc/cpu_capabilities.h>
 #elif defined (__i386__) || defined(__x86_64__)
 #include <System/i386/cpu_capabilities.h>
-#elif defined (__arm__)
-#include <System/arm/cpu_capabilities.h>
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/cpu_data.h b/osfmk/machine/cpu_data.h
index ae3f3b616..507d487c5 100644
--- a/osfmk/machine/cpu_data.h
+++ b/osfmk/machine/cpu_data.h
@@ -32,8 +32,6 @@
 #include "ppc/cpu_data.h"
 #elif defined (__i386__)
 #include "i386/cpu_data.h"
-#elif defined (__arm__)
-#include "arm/cpu_data.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/cpu_number.h b/osfmk/machine/cpu_number.h
index 0097d4562..135b6848f 100644
--- a/osfmk/machine/cpu_number.h
+++ b/osfmk/machine/cpu_number.h
@@ -34,8 +34,6 @@
 #include "ppc/cpu_number.h"
 #elif defined (__i386__)
 #include "i386/cpu_number.h"
-#elif defined (__arm__)
-#include "arm/cpu_number.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/db_machdep.h b/osfmk/machine/db_machdep.h
index dd6f51752..e935f4f44 100644
--- a/osfmk/machine/db_machdep.h
+++ b/osfmk/machine/db_machdep.h
@@ -32,8 +32,6 @@
 #include "ppc/db_machdep.h"
 #elif defined (__i386__)
 #include "i386/db_machdep.h"
-#elif defined (__arm__)
-#include "arm/db_machdep.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/endian.h b/osfmk/machine/endian.h
index e292ec80e..a777a649b 100644
--- a/osfmk/machine/endian.h
+++ b/osfmk/machine/endian.h
@@ -32,8 +32,6 @@
 #include "ppc/endian.h"
 #elif defined (__i386__)
 #include "i386/endian.h"
-#elif defined (__arm__)
-#include "arm/endian.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/io_map_entries.h b/osfmk/machine/io_map_entries.h
index cc084f515..59ac6de80 100644
--- a/osfmk/machine/io_map_entries.h
+++ b/osfmk/machine/io_map_entries.h
@@ -34,8 +34,6 @@
 #include "ppc/io_map_entries.h"
 #elif defined (__i386__)
 #include "i386/io_map_entries.h"
-#elif defined (__arm__)
-#include "arm/io_map_entries.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/lock.h b/osfmk/machine/lock.h
index 4cf25284c..7b501e604 100644
--- a/osfmk/machine/lock.h
+++ b/osfmk/machine/lock.h
@@ -34,8 +34,6 @@
 #include "ppc/lock.h"
 #elif defined (__i386__)
 #include "i386/lock.h"
-#elif defined (__arm__)
-#include "arm/lock.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/locks.h b/osfmk/machine/locks.h
index eff32fb17..2a5f21d78 100644
--- a/osfmk/machine/locks.h
+++ b/osfmk/machine/locks.h
@@ -32,8 +32,6 @@
 #include "ppc/locks.h"
 #elif defined (__i386__)
 #include "i386/locks.h"
-#elif defined (__arm__)
-#include "arm/locks.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/machine_cpu.h b/osfmk/machine/machine_cpu.h
index 059d0eaf1..dbcc4d006 100644
--- a/osfmk/machine/machine_cpu.h
+++ b/osfmk/machine/machine_cpu.h
@@ -32,8 +32,6 @@
 #include "ppc/machine_cpu.h"
 #elif defined (__i386__)
 #include "i386/machine_cpu.h"
-#elif defined (__arm__)
-#include "arm/machine_cpu.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/machine_routines.h b/osfmk/machine/machine_routines.h
index 00dfc3216..4a99e78fc 100644
--- a/osfmk/machine/machine_routines.h
+++ b/osfmk/machine/machine_routines.h
@@ -32,8 +32,6 @@
 #include "ppc/machine_routines.h"
 #elif defined (__i386__)
 #include "i386/machine_routines.h"
-#elif defined (__arm__)
-#include "arm/machine_routines.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/machine_rpc.h b/osfmk/machine/machine_rpc.h
index 9307c9191..4dd1ed876 100644
--- a/osfmk/machine/machine_rpc.h
+++ b/osfmk/machine/machine_rpc.h
@@ -32,8 +32,6 @@
 #include "ppc/machine_rpc.h"
 #elif defined (__i386__)
 #include "i386/machine_rpc.h"
-#elif defined (__arm__)
-#include "arm/machine_rpc.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/machlimits.h b/osfmk/machine/machlimits.h
index 5b970101c..dd46d4f4f 100644
--- a/osfmk/machine/machlimits.h
+++ b/osfmk/machine/machlimits.h
@@ -32,8 +32,6 @@
 #include "ppc/machlimits.h"
 #elif defined (__i386__)
 #include "i386/machlimits.h"
-#elif defined (__arm__)
-#include "arm/machlimits.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/machparam.h b/osfmk/machine/machparam.h
index 02ddd8c34..42de1defc 100644
--- a/osfmk/machine/machparam.h
+++ b/osfmk/machine/machparam.h
@@ -32,8 +32,6 @@
 #include "ppc/machparam.h"
 #elif defined (__i386__)
 #include "i386/machparam.h"
-#elif defined (__arm__)
-#include "arm/machparam.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/pmap.h b/osfmk/machine/pmap.h
index 336336309..c9a1a00d8 100644
--- a/osfmk/machine/pmap.h
+++ b/osfmk/machine/pmap.h
@@ -32,8 +32,6 @@
 #include "ppc/pmap.h"
 #elif defined (__i386__)
 #include "i386/pmap.h"
-#elif defined (__arm__)
-#include "arm/pmap.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/sched_param.h b/osfmk/machine/sched_param.h
index 082690f0a..426f9698a 100644
--- a/osfmk/machine/sched_param.h
+++ b/osfmk/machine/sched_param.h
@@ -32,8 +32,6 @@
 #include "ppc/sched_param.h"
 #elif defined (__i386__)
 #include "i386/sched_param.h"
-#elif defined (__arm__)
-#include "arm/sched_param.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/setjmp.h b/osfmk/machine/setjmp.h
index 08a73f43a..89064d8c5 100644
--- a/osfmk/machine/setjmp.h
+++ b/osfmk/machine/setjmp.h
@@ -32,8 +32,6 @@
 #include "ppc/setjmp.h"
 #elif defined (__i386__)
 #include "i386/setjmp.h"
-#elif defined (__arm__)
-#include "arm/setjmp.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/simple_lock.h b/osfmk/machine/simple_lock.h
index 67456c61d..e265f398b 100644
--- a/osfmk/machine/simple_lock.h
+++ b/osfmk/machine/simple_lock.h
@@ -34,8 +34,6 @@
 #include "ppc/simple_lock.h"
 #elif defined (__i386__)
 #include "i386/simple_lock.h"
-#elif defined (__arm__)
-#include "arm/simple_lock.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/task.h b/osfmk/machine/task.h
index f39e0adbe..a94687c81 100644
--- a/osfmk/machine/task.h
+++ b/osfmk/machine/task.h
@@ -32,8 +32,6 @@
 #include "ppc/task.h"
 #elif defined (__i386__)
 #include "i386/task.h"
-#elif defined (__arm__)
-#include "arm/task.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/thread.h b/osfmk/machine/thread.h
index 2b6153bd4..35f964d52 100644
--- a/osfmk/machine/thread.h
+++ b/osfmk/machine/thread.h
@@ -32,8 +32,6 @@
 #include "ppc/thread.h"
 #elif defined (__i386__)
 #include "i386/thread.h"
-#elif defined (__arm__)
-#include "arm/thread.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/timer.h b/osfmk/machine/timer.h
index d39778ed9..e6b145be9 100644
--- a/osfmk/machine/timer.h
+++ b/osfmk/machine/timer.h
@@ -32,8 +32,6 @@
 #include "ppc/timer.h"
 #elif defined (__i386__)
 #include "i386/timer.h"
-#elif defined (__arm__)
-#include "arm/timer.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/trap.h b/osfmk/machine/trap.h
index 737682fec..046f216ba 100644
--- a/osfmk/machine/trap.h
+++ b/osfmk/machine/trap.h
@@ -32,8 +32,6 @@
 #include "ppc/trap.h"
 #elif defined (__i386__)
 #include "i386/trap.h"
-#elif defined (__arm__)
-#include "arm/trap.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/vm_tuning.h b/osfmk/machine/vm_tuning.h
index 00c50d283..203708bc5 100644
--- a/osfmk/machine/vm_tuning.h
+++ b/osfmk/machine/vm_tuning.h
@@ -32,8 +32,6 @@
 #include "ppc/vm_tuning.h"
 #elif defined (__i386__)
 #include "i386/vm_tuning.h"
-#elif defined (__arm__)
-#include "arm/vm_tuning.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/machine/xpr.h b/osfmk/machine/xpr.h
index a5b64812d..a74850310 100644
--- a/osfmk/machine/xpr.h
+++ b/osfmk/machine/xpr.h
@@ -32,8 +32,6 @@
 #include "ppc/xpr.h"
 #elif defined (__i386__)
 #include "i386/xpr.h"
-#elif defined (__arm__)
-#include "arm/xpr.h"
 #else
 #error architecture not supported
 #endif
diff --git a/osfmk/profiling/machine/profile-md.h b/osfmk/profiling/machine/profile-md.h
index ec48f8f8d..b1c30115b 100644
--- a/osfmk/profiling/machine/profile-md.h
+++ b/osfmk/profiling/machine/profile-md.h
@@ -32,8 +32,6 @@
 #include "profiling/ppc/profile-md.h"
 #elif defined (__i386__)
 #include "profiling/i386/profile-md.h"
-#elif defined (__arm__)
-#include "profiling/arm/profile-md.h"
 #else
 #error architecture not supported
 #endif
diff --git a/pexpert/pexpert/machine/boot.h b/pexpert/pexpert/machine/boot.h
index 97edae887..e78f39c34 100644
--- a/pexpert/pexpert/machine/boot.h
+++ b/pexpert/pexpert/machine/boot.h
@@ -32,8 +32,6 @@
 #include "pexpert/ppc/boot.h"
 #elif defined (__i386__)
 #include "pexpert/i386/boot.h"
-#elif defined (__arm__)
-#include "pexpert/arm/boot.h"
 #else
 #error architecture not supported
 #endif
diff --git a/pexpert/pexpert/machine/protos.h b/pexpert/pexpert/machine/protos.h
index 7412f19e8..3735c930b 100644
--- a/pexpert/pexpert/machine/protos.h
+++ b/pexpert/pexpert/machine/protos.h
@@ -32,8 +32,6 @@
 #include "pexpert/ppc/protos.h"
 #elif defined (__i386__)
 #include "pexpert/i386/protos.h"
-#elif defined (__arm__)
-#include "pexpert/arm/protos.h"
 #else
 #error architecture not supported
 #endif