From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754941AbbLDQfS (ORCPT ); Fri, 4 Dec 2015 11:35:18 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:54598 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753617AbbLDQfR (ORCPT ); Fri, 4 Dec 2015 11:35:17 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Dan Williams , Tejun Heo , IDE/ATA development list , Ricardo Neri , "linux-kernel@vger.kernel.org" , Chen-Yu Tsai Subject: Re: [PATCH] ahci: don't use MSI when PCI is disabled Date: Fri, 04 Dec 2015 17:34:29 +0100 Message-ID: <2230814.fGlctTNBzj@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <6160865.VIglm5oKj3@wuerfel> References: <4754092.OYovO36g28@wuerfel> <6160865.VIglm5oKj3@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:lSQEnl59u4XKh1hi/+ncMpYnTKAedc4H12WeauyZHEJB7CwuCqX fBfr1KrUj/ZBq2DEOftlP5LPCAuCKBx9LJtOE+yUrP7oQiB8pkxByAo58Qy0+D2FWYfn18L 6EkveUM8DYrpcE8UJJGB4kFlueRP5sY0TJzk+iSYAANkyDHtTSPA4+zz7ilGGacHEOwKSx6 vDpOT1pPKlD3dRvaypisQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:A8PXAJdkNlA=:aUbmZ0qJ7LlcpURD/gi7Jj WFtvf4ATnCxy3VKrJsrnyaMDH9tQjR6h0tXW/7QfHm5Vl4mIyzbqihlq2SUtnrrhYRqIffcKC 6Vsn0TDgvPVI0zsBk2eXfsJVL+j4qWFv2IuPALIeubD1VvHbX0nosJugoOR4p6z8RgbTxDqVE Dl/A30yCEqOmrVmqGegMCg31N4jviu/4ZfzHnBpjMDQGRty57KB9QrRJOS0qtns6//2pbcvqe NYHcBSPSgXenvLYk8FGfHiNjTUjTELZzN38G0oQn+m182HOZ/Ipgs6hW4RbHSuqUS3AJfVrJ1 3KdchdrdBjAzX7YRhcL6oY1lAdtHfZKSxmL/HwbMNn1d0VVLNkw9hpjObDAY3Z844/F06yh78 FbcdtXirS07ep7sVyHX9wvkjncMu7PFshusFx1am+K4BFCwQANoneCZ01qLG71WaY9k0Nhh6l +BciFAJQGarpacG7RJFG/un6xOOtsaId2JLC3YpvOdZPj/3ocPBV4Vo42U9qTz3TC7UX/dy0w W8r5nYVyxbt5A8VNvOy41kVePyWCxpSD/b1elbRGTeQY9Ltv17K67Or1WwT1NjPF+5IRz3Kk4 5VpQtaJJkNgx4G2K8gQ1NHAvDUxlBWOxAEYJaRC4HUkhgA8Jp4wRQJ58wPZQ2B2n0eTLe5aNS OTqoPJmDlfCItZDPvCb9QQfmJVUOBkEWBnhy/ztWT7R2Rvp5VJJRfnInJuvAZruM2+z80lEeQ fFHuk1eaRVC/dEud Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 23 November 2015 20:34:30 Arnd Bergmann wrote: > 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. > Dan, are you going to do the ahci_irq_vector patch, or should we use my original patch to fix up the build error? Chen-Yu Tsai just stumbled over the same problem that I noticed, and I'm sure others have run into it too. Arnd