From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] ahci: don't use MSI when PCI is disabled Date: Mon, 23 Nov 2015 20:34:30 +0100 Message-ID: <6160865.VIglm5oKj3@wuerfel> References: <4754092.OYovO36g28@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Dan Williams Cc: Tejun Heo , IDE/ATA development list , Ricardo Neri , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" List-Id: linux-ide@vger.kernel.org On Monday 23 November 2015 09:25:38 Dan Williams wrote: > > If we had an "static inline ahci_irq_vector(int port)" helper to > compile out the struct msix_entry de-reference would that be > sufficient? Yes, that is probably a nicer way to do it. We should then also do something like this: @@ -2510,7 +2513,8 @@ int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht) int irq = hpriv->irq; int rc; - if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX)) + if (IS_ENABLED(CONFIG_PCI_MSI) && \ + hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX)) rc = ahci_host_activate_multi_irqs(host, sht); else if (hpriv->flags & AHCI_HFLAG_EDGE_IRQ) rc = ata_host_activate(host, irq, ahci_single_edge_irq_intr, which will let gcc leave out the entire ahci_host_activate_multi_irqs() function but still flag compile errors in it even if CONFIG_PCI is disabled. Arnd