From owner-svn-src-head@freebsd.org Tue Jun 20 11:09:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FB34D95A07; Tue, 20 Jun 2017 11:09:39 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ADC87D41E; Tue, 20 Jun 2017 11:09:39 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KB9cBk086956; Tue, 20 Jun 2017 11:09:38 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KB9cmU086955; Tue, 20 Jun 2017 11:09:38 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201706201109.v5KB9cmU086955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 20 Jun 2017 11:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320141 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 11:09:39 -0000 Author: zbb Date: Tue Jun 20 11:09:38 2017 New Revision: 320141 URL: https://svnweb.freebsd.org/changeset/base/320141 Log: Implement workaround for Armada 38X family HW issue between CPU and devices There is a hardware problem between Cortex-A9 CPUs and on-chip devices in Armada 38X SoCs that may cause hang on heavy load. This can be however worked around by mapping all registers and PCI IO as strongly ordered instead of device memory. Submitted by: Zbigniew Bodek Reviewed by: mmel Tested by: mw_semihalf.com Obtained from: Semihalf Differential revision: https://reviews.freebsd.org/D10218 Modified: head/sys/arm/mv/mv_machdep.c Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Tue Jun 20 08:44:03 2017 (r320140) +++ head/sys/arm/mv/mv_machdep.c Tue Jun 20 11:09:38 2017 (r320141) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #else #include +#include #endif #include /* XXX */ @@ -257,6 +258,15 @@ platform_late_init(void) #endif #if defined(SOC_MV_ARMADA38X) + /* + * Workaround for Marvell Armada38X family HW issue + * between Cortex-A9 CPUs and on-chip devices that may + * cause hang on heavy load. + * To avoid that, map all registers including PCIe IO + * as strongly ordered instead of device memory. + */ + pmap_remap_vm_attr(PTE2_ATTR_DEVICE, PTE2_ATTR_SO); + /* Set IO Sync Barrier bit for all Mbus devices */ if (armada38x_win_set_iosync_barrier() != 0) printf("WARNING: could not map CPU Subsystem registers\n");