From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org ([63.228.1.57]:48102 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753428AbaJAW2g (ORCPT ); Wed, 1 Oct 2014 18:28:36 -0400 Message-ID: <1412201390.4285.233.camel@pasglop> Subject: Re: [PATCH 1/4] pci/msi: Move "force_32bit_msi" flag from powerpc to generic pci_dev From: Benjamin Herrenschmidt To: Bjorn Helgaas Cc: Alex Deucher , Dave Airlie , Brian King , Takashi Iwai , linux-pci@vger.kernel.org, Yijing Wang , Anton Blanchard , linuxppc-dev@ozlabs.org Date: Thu, 02 Oct 2014 08:09:50 +1000 In-Reply-To: <20141001203322.GE4171@google.com> References: <1412048401.4285.128.camel@pasglop> <1412108504.4285.155.camel@pasglop> <1412110946.4285.158.camel@pasglop> <1412112324.4285.160.camel@pasglop> <1412129363.4285.190.camel@pasglop> <20141001203322.GE4171@google.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org List-ID: On Wed, 2014-10-01 at 14:33 -0600, Bjorn Helgaas wrote: > I like the idea of handling this more generically, e.g., with a bit like > this in struct pci_dev (I'd probably name it something like "no_64bit_msi" > along the lines of your driver #defines). > > What I don't like is that we haven't done anything to help other > architectures, because the only code that *looks* at this bit is in > arch/powerpc. The next arch that tries to use 64-bit MSI addresses for > these devices will trip over the same problem. I started looking. From my (limited) understanding of x86, it doesn't even look at the "size" of MSIs which makes me think it's always 32-bit, and I plan to look at the others next (though not for stable). > Can we check in pci_enable_msi_range() and pci_enable_msix_range() whether > the MSI addresses allocated by the arch are too big, and fail the call if > they are? Yes, good idea, I'll add something. Cheers, Ben.