Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932503AbcLBKGc (ORCPT ); Fri, 2 Dec 2016 05:06:32 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36839 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757484AbcLBKG2 (ORCPT ); Fri, 2 Dec 2016 05:06:28 -0500 Subject: Re: [Linaro-acpi] [PATCH V1 1/2] PCI: thunder: Enable ACPI PCI controller for ThunderX pass2.x silicon version To: Duc Dang , Jon Masters , Bjorn Helgaas References: <1479201298-25494-1-git-send-email-tn@semihalf.com> <1479201298-25494-2-git-send-email-tn@semihalf.com> <20161201002812.GB9409@bhelgaas-glaptop.roam.corp.google.com> Cc: Jayachandran C , Gabriele Paoloni , Arnd Bergmann , Rafael Wysocki , Catalin Marinas , Ard Biesheuvel , Will Deacon , David Daney , Jeremy Linton , Linux Kernel Mailing List , Linaro ACPI Mailman List , linux-acpi@vger.kernel.org, Robert Richter , linux-pci@vger.kernel.org, Marcin Wojtas , Andrea Gallo , linux-arm , Christopher Covington From: Tomasz Nowicki Message-ID: <30ad6c65-4a4a-6346-00f6-11250133a251@semihalf.com> Date: Fri, 2 Dec 2016 11:06:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 10052 Lines: 127 On 02.12.2016 07:42, Duc Dang wrote: > On Thu, Dec 1, 2016 at 9:50 PM, Jon Masters wrote: >> On 11/30/2016 07:28 PM, Bjorn Helgaas wrote: >> >>> I'm hoping to end up with something like this: >>> https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?h=pci/ecam&id=51ad4df79a9b7f2a66b346a46b21a785a2937469 >> >> The following build warnings happen using your branch on RHELSA7.3: >> >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> THUNDER_PEM_QUIRK(2, 0), /* off-chip devices */ >> ^ >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[44].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[44].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[45].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[45].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[46].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[46].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[47].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[47].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[48].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[48].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[49].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:101:2: warning: (near initialization for ‘mcfg_quirks[49].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> THUNDER_PEM_QUIRK(2, 1), /* off-chip devices */ >> ^ >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[50].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[50].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[51].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[51].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[52].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[52].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[53].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[53].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[54].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[54].cfgres.end’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[55].cfgres.start’) [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: left shift count >= width of type [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: initializer element is not a constant expression [enabled by default] >> drivers/acpi/pci_mcfg.c:102:2: warning: (near initialization for ‘mcfg_quirks[55].cfgres.end’) [enabled by default] > > I saw this too. It can be fixed by changes below: > > diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c > index 7319188..3d7c5cc 100644 > --- a/drivers/acpi/pci_mcfg.c > +++ b/drivers/acpi/pci_mcfg.c > @@ -98,16 +98,16 @@ struct mcfg_fixup { > { "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY, \ > &pci_thunder_ecam_ops } > /* SoC pass1.x */ > - THUNDER_PEM_QUIRK(2, 0), /* off-chip devices */ > - THUNDER_PEM_QUIRK(2, 1), /* off-chip devices */ > - THUNDER_ECAM_QUIRK(2, 0), > - THUNDER_ECAM_QUIRK(2, 1), > - THUNDER_ECAM_QUIRK(2, 2), > - THUNDER_ECAM_QUIRK(2, 3), > - THUNDER_ECAM_QUIRK(2, 10), > - THUNDER_ECAM_QUIRK(2, 11), > - THUNDER_ECAM_QUIRK(2, 12), > - THUNDER_ECAM_QUIRK(2, 13), > + THUNDER_PEM_QUIRK(2, 0UL), /* off-chip devices */ > + THUNDER_PEM_QUIRK(2, 1UL), /* off-chip devices */ > + THUNDER_ECAM_QUIRK(2, 0UL), > + THUNDER_ECAM_QUIRK(2, 1UL), > + THUNDER_ECAM_QUIRK(2, 2UL), > + THUNDER_ECAM_QUIRK(2, 3UL), > + THUNDER_ECAM_QUIRK(2, 10UL), > + THUNDER_ECAM_QUIRK(2, 11UL), > + THUNDER_ECAM_QUIRK(2, 12UL), > + THUNDER_ECAM_QUIRK(2, 13UL), > The UL suffix is needed for *THUNDER_PEM_QUIRK* only. THUNDER_ECAM_QUIRK is fine. - THUNDER_PEM_QUIRK(2, 0), /* off-chip devices */ - THUNDER_PEM_QUIRK(2, 1), /* off-chip devices */ + THUNDER_PEM_QUIRK(2, 0UL), /* off-chip devices */ + THUNDER_PEM_QUIRK(2, 1UL), /* off-chip devices */ Tomasz