PCI: pull pcibios_setup() up into core
authorMyron Stowe <myron.stowe@redhat.com>
Tue, 26 Jun 2012 03:30:57 +0000 (21:30 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 26 Jun 2012 12:22:31 +0000 (06:22 -0600)
Currently, all of the architectures implement their own pcibios_setup()
routine.  Most of the implementations do nothing so this patch introduces
a generic (__weak) routine in the core that can be used by all
architectures as a default.  If necessary, it can be overridden by
architecture-specific code.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
include/linux/pci.h

index 447e83472c01558705d0685f7fd6af17a6f8deef..c87d518acacec192f85caa1f50ca82f1dc403b2c 100644 (file)
@@ -2665,6 +2665,18 @@ static void __pci_set_master(struct pci_dev *dev, bool enable)
        dev->is_busmaster = enable;
 }
 
+/**
+ * pcibios_setup - process "pci=" kernel boot arguments
+ * @str: string used to pass in "pci=" kernel boot arguments
+ *
+ * Process kernel boot arguments.  This is the default implementation.
+ * Architecture specific implementations can override this as necessary.
+ */
+char * __weak __init pcibios_setup(char *str)
+{
+       return str;
+}
+
 /**
  * pcibios_set_master - enable PCI bus-mastering for device dev
  * @dev: the PCI device to enable
index d8c379dba6adbb36ae9df6c18adea304e2c6b45c..f91143e86f8521a433895b5c4d82c23626b1bf4c 100644 (file)
@@ -642,6 +642,7 @@ extern int no_pci_devices(void);
 
 void pcibios_fixup_bus(struct pci_bus *);
 int __must_check pcibios_enable_device(struct pci_dev *, int mask);
+/* Architecture specific versions may override this (weak) */
 char *pcibios_setup(char *str);
 
 /* Used only when drivers/pci/setup.c is used */
This page took 0.034213 seconds and 5 git commands to generate.