Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 2020 13:37:22 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ruslan Bukin <br@freebsd.org>
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>
In-Reply-To: <202010192232.09JMWavp053934@repo.freebsd.org>
References:  <202010192232.09JMWavp053934@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h>
>  __FBSDID("$FreeBSD$");
>  
> +#include "opt_iommu.h"
> +
>  #include <sys/param.h>
>  #include <sys/module.h>
>  #include <sys/systm.h>
> @@ -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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201020103722.GG2643>