From: Myron Stowe <myron.stowe@redhat.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, rth@twiddle.net,
ink@jurassic.park.msu.ru, mattst88@gmail.com,
linux@arm.linux.org.uk, starvik@axis.com,
jesper.nilsson@axis.com, tony.luck@intel.com,
fenghua.yu@intel.com, monstr@monstr.eu, ralf@linux-mips.org,
yasutake.koichi@jp.panasonic.com, jejb@parisc-linux.org,
deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org,
lethal@linux-sh.org, davem@davemloft.net, cmetcalf@tilera.com,
gxt@mprc.pku.edu.cn, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org, chris@zankel.net,
linux-kernel@vger.kernel.org
Subject: [PATCH 01/16] PCI: Pull 'pcibios_setup' up into PCI's core
Date: Mon, 25 Jun 2012 21:30:57 -0600 [thread overview]
Message-ID: <20120626033057.16434.48634.stgit@amt.stowe> (raw)
In-Reply-To: <20120626033045.16434.17412.stgit@amt.stowe>
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 into PCI's core that can be used by all
architectures as a default. If necessary, it can be over-ridden by
architecture-specific code.
No functional change.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
drivers/pci/pci.c | 12 ++++++++++++
include/linux/pci.h | 1 +
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 77cb54a..0f6d472 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2671,6 +2671,18 @@ static void __pci_set_master(struct pci_dev *dev, bool 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
*
diff --git a/include/linux/pci.h b/include/linux/pci.h
index fefb4e1..fdcff0e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -644,6 +644,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 */
next prev parent reply other threads:[~2012-06-26 3:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
2012-06-26 3:30 ` Myron Stowe [this message]
2012-06-26 3:31 ` [PATCH 02/16] alpha/PCI: Factor 'pcibios_setup()' out of alpha Myron Stowe
2012-06-26 15:43 ` Richard Henderson
2012-06-26 3:31 ` [PATCH 03/16] ia64/PCI: Factor 'pcibios_setup' out of ia64 Myron Stowe
2012-06-26 3:31 ` [PATCH 04/16] microblaze/PCI: Factor 'pcibios_setup()' out of microblaze Myron Stowe
2012-06-26 5:47 ` Michal Simek
2012-06-26 3:31 ` [PATCH 05/16] MIPS/PCI: Factor 'pcibios_setup()' out of MIPS/pmc-sierra Myron Stowe
2012-06-26 3:31 ` [PATCH 06/16] MIPS/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
2012-06-26 3:31 ` [PATCH 07/16] parisc/PCI: Factor 'pcibios_setup()' out of parisc Myron Stowe
2012-06-26 3:31 ` [PATCH 08/16] powerpc/PCI: Factor 'pcibios_setup()' out of powerpc Myron Stowe
2012-06-26 4:37 ` Benjamin Herrenschmidt
2012-06-26 3:31 ` [PATCH 09/16] sh/PCI: Factor 'pcibios_setup()' out of sh Myron Stowe
2012-06-26 4:57 ` Nobuhiro Iwamatsu
2012-06-26 5:51 ` Paul Mundt
2012-06-26 3:32 ` [PATCH 10/16] sh/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
2012-06-26 3:32 ` [PATCH 11/16] sparc/PCI: Factor 'pcibios_setup()' out of sparc Myron Stowe
2012-06-26 3:36 ` David Miller
2012-06-26 3:32 ` [PATCH 12/16] tile/PCI: Factor 'pcibios_setup()' out of tile Myron Stowe
2012-06-26 13:18 ` Chris Metcalf
2012-06-28 17:30 ` Myron Stowe
2012-06-28 17:44 ` Chris Metcalf
2012-06-26 3:32 ` [PATCH 13/16] unicore32/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
2012-06-26 7:01 ` guanxuetao
2012-06-26 3:32 ` [PATCH 14/16] x86/PCI: " Myron Stowe
2012-06-26 3:32 ` [PATCH 15/16] xtensa/PCI: Factor 'pcibios_setup()' out of xtensa Myron Stowe
2012-06-26 3:32 ` [PATCH 16/16] cris/PCI: Factor 'pcibios_setup()' out of cris Myron Stowe
2012-07-05 21:33 ` [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120626033057.16434.48634.stgit@amt.stowe \
--to=myron.stowe@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=chris@zankel.net \
--cc=cmetcalf@tilera.com \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=fenghua.yu@intel.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=hpa@zytor.com \
--cc=ink@jurassic.park.msu.ru \
--cc=jejb@parisc-linux.org \
--cc=jesper.nilsson@axis.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mattst88@gmail.com \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=rth@twiddle.net \
--cc=starvik@axis.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yasutake.koichi@jp.panasonic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).