From owner-svn-src-head@freebsd.org Wed Nov 18 22:20:14 2015 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 5EB87A32A18; Wed, 18 Nov 2015 22:20:14 +0000 (UTC) (envelope-from cem@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 29FEC1086; Wed, 18 Nov 2015 22:20:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAIMKDwG084203; Wed, 18 Nov 2015 22:20:13 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAIMKD7o084202; Wed, 18 Nov 2015 22:20:13 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511182220.tAIMKD7o084202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 18 Nov 2015 22:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291030 - head/sys/dev/ntb/ntb_hw 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.20 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: Wed, 18 Nov 2015 22:20:14 -0000 Author: cem Date: Wed Nov 18 22:20:13 2015 New Revision: 291030 URL: https://svnweb.freebsd.org/changeset/base/291030 Log: ntb_hw: Add tunable to disable write-combining The tunable 'hw.ntb.enable_writecombine' may be set to zero to administratively disable write combining the mapped NTB region. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Nov 18 22:20:04 2015 (r291029) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Nov 18 22:20:13 2015 (r291030) @@ -326,6 +326,10 @@ SYSCTL_UINT(_hw_ntb, OID_AUTO, debug_lev } \ } while (0) +static unsigned g_ntb_enable_wc = 1; +SYSCTL_UINT(_hw_ntb, OID_AUTO, enable_writecombine, CTLFLAG_RDTUN, + &g_ntb_enable_wc, 0, "Set to 1 to map memory windows write combining"); + static struct ntb_hw_info pci_ids[] = { /* XXX: PS/SS IDs left out until they are supported. */ { 0x0C4E8086, "BWD Atom Processor S1200 Non-Transparent Bridge B2B", @@ -766,10 +770,13 @@ map_memory_window_bar(struct ntb_softc * save_bar_parameters(bar); } + print_map_success(ntb, bar, "mw"); + if (g_ntb_enable_wc == 0) + return (0); + /* Mark bar region as write combining to improve performance. */ rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, VM_MEMATTR_WRITE_COMBINING); - print_map_success(ntb, bar, "mw"); if (rc == 0) device_printf(ntb->device, "Marked BAR%d v:[%p-%p] p:[%p-%p] as "