From owner-svn-src-all@FreeBSD.ORG Sat Jan 26 08:55:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6C3A3BAD; Sat, 26 Jan 2013 08:55:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5EF616D1; Sat, 26 Jan 2013 08:55:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0Q8t4qW031334; Sat, 26 Jan 2013 08:55:04 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0Q8t4Ik031333; Sat, 26 Jan 2013 08:55:04 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301260855.r0Q8t4Ik031333@svn.freebsd.org> From: Andrew Turner Date: Sat, 26 Jan 2013 08:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245942 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2013 08:55:05 -0000 Author: andrew Date: Sat Jan 26 08:55:04 2013 New Revision: 245942 URL: http://svnweb.freebsd.org/changeset/base/245942 Log: Align td_frame as it will be placed into the sp register which must be 8 byte aligned on ARM EABI. Modified: head/sys/arm/arm/vm_machdep.c Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Sat Jan 26 05:27:00 2013 (r245941) +++ head/sys/arm/arm/vm_machdep.c Sat Jan 26 08:55:04 2013 (r245942) @@ -398,6 +398,12 @@ cpu_thread_alloc(struct thread *td) PAGE_SIZE) - 1; td->td_frame = (struct trapframe *) ((u_int)td->td_kstack + USPACE_SVC_STACK_TOP - sizeof(struct pcb)) - 1; + /* + * Ensure td_frame is aligned to an 8 byte boundary as it will be + * placed into the stack pointer which must be 8 byte aligned in + * the ARM EABI. + */ + td->td_frame = (struct trapframe *)((u_int)td->td_frame & ~7); #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE);