diff mbox series

[2/2,powerpc/powernv] powerpc/powernv: Tweak PCI_DEV_FLAGS_QUIET_PCI_REALIGN on/off during boot

Message ID 20180314163455.15854-3-desnesn@linux.vnet.ibm.com
State Superseded
Delegated to: Bjorn Helgaas
Headers show
Series Silent PCI realignment messages during boot | expand

Commit Message

Desnes A. Nunes do Rosario March 14, 2018, 4:34 p.m. UTC
Turn on PCI_DEV_FLAGS_QUIET_PCI_REALIGN flag on powernv's pci driver
to silent PCI realignment messages through a early stage hook, and turn
it off right before the pci device is enabled with a final stage hook.

Fixes: 38274637699 ("powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned")
Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/pci.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

kernel test robot March 16, 2018, 8:41 a.m. UTC | #1
Hi Desnes,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc5 next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Desnes-A-Nunes-do-Rosario/powerpc-powernv-Tweak-PCI_DEV_FLAGS_QUIET_PCI_REALIGN-on-off-during-boot/20180316-112524
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   arch/powerpc/platforms/powernv/pci.c: In function 'disable_realign_menssages':
>> arch/powerpc/platforms/powernv/pci.c:1114:20: error: 'PCI_DEV_FLAGS_QUIET_PCI_REALIGN' undeclared (first use in this function); did you mean 'PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS'?
     dev->dev_flags |= PCI_DEV_FLAGS_QUIET_PCI_REALIGN;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS
   arch/powerpc/platforms/powernv/pci.c:1114:20: note: each undeclared identifier is reported only once for each function it appears in
   arch/powerpc/platforms/powernv/pci.c: In function 'enable_realign_menssages':
   arch/powerpc/platforms/powernv/pci.c:1121:20: error: 'PCI_DEV_FLAGS_QUIET_PCI_REALIGN' undeclared (first use in this function); did you mean 'PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS'?
     dev->dev_flags ^= PCI_DEV_FLAGS_QUIET_PCI_REALIGN;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                       PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS

vim +1114 arch/powerpc/platforms/powernv/pci.c

  1110	
  1111	/* Fixup that disables PCI realignment menssages for all PCI devices */
  1112	static void disable_realign_menssages(struct pci_dev *dev)
  1113	{
> 1114		dev->dev_flags |= PCI_DEV_FLAGS_QUIET_PCI_REALIGN;
  1115	}
  1116	DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, disable_realign_menssages);
  1117	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index 69d102cbf48f..d28ce0899487 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -1108,6 +1108,20 @@  static void pnv_p7ioc_rc_quirk(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IBM, 0x3b9, pnv_p7ioc_rc_quirk);
 
+/* Fixup that disables PCI realignment menssages for all PCI devices */
+static void disable_realign_menssages(struct pci_dev *dev)
+{
+	dev->dev_flags |= PCI_DEV_FLAGS_QUIET_PCI_REALIGN;
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, disable_realign_menssages);
+
+/* Fixup that enables PCI realignment messages for all PCI devices */
+static void enable_realign_menssages(struct pci_dev *dev)
+{
+	dev->dev_flags ^= PCI_DEV_FLAGS_QUIET_PCI_REALIGN;
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, enable_realign_menssages);
+
 void __init pnv_pci_init(void)
 {
 	struct device_node *np;