From owner-svn-src-all@freebsd.org Tue Oct 20 10:37:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B0F742D191; Tue, 20 Oct 2020 10:37:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CFqnt5XBbz47fc; Tue, 20 Oct 2020 10:37:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 09KAbNNt079774 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 20 Oct 2020 13:37:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 09KAbNNt079774 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 09KAbMss079773; Tue, 20 Oct 2020 13:37:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 20 Oct 2020 13:37:22 +0300 From: Konstantin Belousov To: Ruslan Bukin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r366865 - head/sys/dev/ahci Message-ID: <20201020103722.GG2643@kib.kiev.ua> References: <202010192232.09JMWavp053934@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202010192232.09JMWavp053934@repo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CFqnt5XBbz47fc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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: Tue, 20 Oct 2020 10:37:39 -0000 On Mon, Oct 19, 2020 at 10:32:36PM +0000, Ruslan Bukin wrote: > Author: br > Date: Mon Oct 19 22:32:36 2020 > New Revision: 366865 > URL: https://svnweb.freebsd.org/changeset/base/366865 > > Log: > Fix build: only set iommu buswide flag if IOMMU code is included. > > Sponsored by: Innovate DSbD > > Modified: > head/sys/dev/ahci/ahci_pci.c > > Modified: head/sys/dev/ahci/ahci_pci.c > ============================================================================== > --- head/sys/dev/ahci/ahci_pci.c Mon Oct 19 22:27:21 2020 (r366864) > +++ head/sys/dev/ahci/ahci_pci.c Mon Oct 19 22:32:36 2020 (r366865) > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_iommu.h" > + > #include > #include > #include > @@ -499,6 +501,7 @@ ahci_pci_attach(device_t dev) > i++; > ctlr->quirks = ahci_ids[i].quirks; > > +#ifdef IOMMU > if (ctlr->quirks & AHCI_Q_IOMMU_BUSWIDE) { > /* > * The controller issues DMA requests from PCI function 1, > @@ -507,6 +510,7 @@ ahci_pci_attach(device_t dev) > */ > bus_dma_iommu_set_buswide(dev); > } > +#endif > > /* Limit speed for my onboard JMicron external port. > * It is not eSATA really, limit to SATA 1 */ I would prefer that bus_dma_iommu_set_buswide() was available unconditionally, i.e. do to other arches what is done on x86.