From owner-svn-src-projects@FreeBSD.ORG Tue Jan 31 15:38:06 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74A8E106566C; Tue, 31 Jan 2012 15:38:06 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63CDB8FC13; Tue, 31 Jan 2012 15:38:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0VFc6Gr042367; Tue, 31 Jan 2012 15:38:06 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0VFc6G6042364; Tue, 31 Jan 2012 15:38:06 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201201311538.q0VFc6G6042364@svn.freebsd.org> From: Grzegorz Bernacki Date: Tue, 31 Jan 2012 15:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230814 - projects/armv6/sys/arm/arm X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2012 15:38:06 -0000 Author: gber Date: Tue Jan 31 15:38:06 2012 New Revision: 230814 URL: http://svn.freebsd.org/changeset/base/230814 Log: Fix TTB setup When multiprocessor system is used, shareable flag must be set when TTB is stored in CP15 register. Submitted by: Lukasz Plachno Obtained from: Marvell, Semihalf Modified: projects/armv6/sys/arm/arm/cpufunc_asm_pj4b.S projects/armv6/sys/arm/arm/locore.S Modified: projects/armv6/sys/arm/arm/cpufunc_asm_pj4b.S ============================================================================== --- projects/armv6/sys/arm/arm/cpufunc_asm_pj4b.S Tue Jan 31 15:36:21 2012 (r230813) +++ projects/armv6/sys/arm/arm/cpufunc_asm_pj4b.S Tue Jan 31 15:38:06 2012 (r230814) @@ -40,6 +40,9 @@ __FBSDID("$FreeBSD$"); ENTRY(pj4b_setttb) /* Cache synchronization is not required as this core has PIPT caches */ mcr p15, 0, r1, c7, c10, 4 /* drain the write buffer */ +#ifdef SMP + orr r0, r0, #2 /* Set TTB shared memory flag */ +#endif mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ RET Modified: projects/armv6/sys/arm/arm/locore.S ============================================================================== --- projects/armv6/sys/arm/arm/locore.S Tue Jan 31 15:36:21 2012 (r230813) +++ projects/armv6/sys/arm/arm/locore.S Tue Jan 31 15:38:06 2012 (r230814) @@ -160,6 +160,9 @@ Lunmapped: orrne r5, r5, #PHYSADDR movne pc, r5 +#if defined(SMP) + orr r0, r0, #2 /* Set TTB shared memory flag */ +#endif mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ @@ -335,6 +338,9 @@ ASENTRY_NP(mpentry) Ltag: ldr r0, Lstartup_pagetable +#if defined(SMP) + orr r0, r0, #2 /* Set TTB shared memory flag */ +#endif mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */