* [PATCH 00/16] PCI: Re-factor 'pcibios_setup()'
@ 2012-06-26 3:30 Myron Stowe
2012-06-26 3:30 ` [PATCH 01/16] PCI: Pull 'pcibios_setup' up into PCI's core Myron Stowe
` (16 more replies)
0 siblings, 17 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:30 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
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 then be over-ridden by
architecture-specific code.
This series also cleans up 'pcibios_setup()' as necessary to consistently
use the "__init" section annotation.
Suggested by Bjorn Helgaas -
http://marc.info/?l=linux-kernel&m=134023745124680&w=2
It looks as if there is a bug in the CRIS architecture's version of
'pcibios_setup()'. It implements pcibios_setup() such that pci_setup()
doesn't look for any generic options. I included the fix for this in this
series. If this ends up not being correct - i.e. PCI support for CRIS
should be dropped - then that specific patch (which I included last in the
series) can be dropped.
Note: I do not have a cross-compile environment so I have only tested x86.
---
Myron Stowe (16):
cris/PCI: Factor 'pcibios_setup()' out of cris
xtensa/PCI: Factor 'pcibios_setup()' out of xtensa
x86/PCI: adjust section annotations for 'pcibios_setup()'
unicore32/PCI: adjust section annotations for 'pcibios_setup()'
tile/PCI: Factor 'pcibios_setup()' out of tile
sparc/PCI: Factor 'pcibios_setup()' out of sparc
sh/PCI: adjust section annotations for 'pcibios_setup()'
sh/PCI: Factor 'pcibios_setup()' out of sh
powerpc/PCI: Factor 'pcibios_setup()' out of powerpc
parisc/PCI: Factor 'pcibios_setup()' out of parisc
MIPS/PCI: adjust section annotations for 'pcibios_setup()'
MIPS/PCI: Factor 'pcibios_setup()' out of MIPS/pmc-sierra
microblaze/PCI: Factor 'pcibios_setup()' out of microblaze
ia64/PCI: Factor 'pcibios_setup' out of ia64
alpha/PCI: Factor 'pcibios_setup()' out of alpha
PCI: Pull 'pcibios_setup' up into PCI's core
arch/alpha/kernel/pci.c | 6 ------
arch/cris/arch-v32/drivers/pci/bios.c | 5 -----
arch/ia64/pci/pci.c | 9 ---------
arch/microblaze/pci/pci-common.c | 5 -----
arch/mips/pci/pci.c | 4 ++--
arch/mips/pmc-sierra/yosemite/ht.c | 11 -----------
arch/mips/txx9/generic/pci.c | 4 ++--
arch/parisc/kernel/pci.c | 5 -----
arch/powerpc/kernel/pci-common.c | 5 -----
arch/sh/drivers/pci/fixups-sdk7786.c | 4 ++--
arch/sh/drivers/pci/pci.c | 5 -----
arch/sparc/kernel/leon_pci.c | 8 --------
arch/sparc/kernel/pci.c | 5 -----
arch/sparc/kernel/pcic.c | 8 --------
arch/tile/kernel/pci.c | 10 ----------
arch/unicore32/kernel/pci.c | 2 +-
arch/x86/pci/common.c | 2 +-
arch/xtensa/kernel/pci.c | 6 ------
drivers/pci/pci.c | 12 ++++++++++++
include/linux/pci.h | 1 +
20 files changed, 21 insertions(+), 96 deletions(-)
--
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 01/16] PCI: Pull 'pcibios_setup' up into PCI's core
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
@ 2012-06-26 3:30 ` Myron Stowe
2012-06-26 3:31 ` [PATCH 02/16] alpha/PCI: Factor 'pcibios_setup()' out of alpha Myron Stowe
` (15 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:30 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
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 */
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 02/16] alpha/PCI: Factor 'pcibios_setup()' out of alpha
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
2012-06-26 3:30 ` [PATCH 01/16] PCI: Pull 'pcibios_setup' up into PCI's core Myron Stowe
@ 2012-06-26 3:31 ` 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
` (14 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:31 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine
that can be used by all architectures as a default. Drop alpha's
architecture specific version in favor of that as it does not need to be
over-ridden.
No functional change.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/alpha/kernel/pci.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 1a62963..133d2d4 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -198,12 +198,6 @@ pcibios_init(void)
subsys_initcall(pcibios_init);
-char * __devinit
-pcibios_setup(char *str)
-{
- return str;
-}
-
#ifdef ALPHA_RESTORE_SRM_SETUP
static struct pdev_srm_saved_conf *srm_saved_configs;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 03/16] ia64/PCI: Factor 'pcibios_setup' out of ia64
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
2012-06-26 3:30 ` [PATCH 01/16] PCI: Pull 'pcibios_setup' up into PCI's core Myron Stowe
2012-06-26 3:31 ` [PATCH 02/16] alpha/PCI: Factor 'pcibios_setup()' out of alpha Myron Stowe
@ 2012-06-26 3:31 ` Myron Stowe
2012-06-26 3:31 ` [PATCH 04/16] microblaze/PCI: Factor 'pcibios_setup()' out of microblaze Myron Stowe
` (13 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:31 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine that
can be used by all architectures as a default. Drop ia64's architecture
specific version in favor of that as it does not need to be over-ridden.
No functional change.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/ia64/pci/pci.c | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 524df42..e51941f 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -496,15 +496,6 @@ pcibios_align_resource (void *data, const struct resource *res,
return res->start;
}
-/*
- * PCI BIOS setup, always defaults to SAL interface
- */
-char * __init
-pcibios_setup (char *str)
-{
- return str;
-}
-
int
pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine)
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 04/16] microblaze/PCI: Factor 'pcibios_setup()' out of microblaze
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (2 preceding siblings ...)
2012-06-26 3:31 ` [PATCH 03/16] ia64/PCI: Factor 'pcibios_setup' out of ia64 Myron Stowe
@ 2012-06-26 3:31 ` 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
` (12 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:31 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine that
can be used by all architectures as a default. Drop microblaze's
architecture specific version in favor of that as it does not need to be
over-ridden.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/microblaze/pci/pci-common.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index ed22bfc..7b510ae 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -192,11 +192,6 @@ void pcibios_set_master(struct pci_dev *dev)
/* No special bus mastering setup handling */
}
-char __devinit *pcibios_setup(char *str)
-{
- return str;
-}
-
/*
* Reads the interrupt pin to determine if interrupt is use by card.
* If the interrupt is used, then gets the interrupt line from the
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 05/16] MIPS/PCI: Factor 'pcibios_setup()' out of MIPS/pmc-sierra
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (3 preceding siblings ...)
2012-06-26 3:31 ` [PATCH 04/16] microblaze/PCI: Factor 'pcibios_setup()' out of microblaze Myron Stowe
@ 2012-06-26 3:31 ` Myron Stowe
2012-06-26 3:31 ` [PATCH 06/16] MIPS/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
` (11 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:31 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine that
can be used by all architectures as a default. Drop MIPS/pmc-sierra's
architecture specific version in favor of that as it does not need to be
over-ridden.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/mips/pmc-sierra/yosemite/ht.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/arch/mips/pmc-sierra/yosemite/ht.c b/arch/mips/pmc-sierra/yosemite/ht.c
index 63be40e..14dc9c8 100644
--- a/arch/mips/pmc-sierra/yosemite/ht.c
+++ b/arch/mips/pmc-sierra/yosemite/ht.c
@@ -395,17 +395,6 @@ void __init pcibios_init(void)
pci_scan_bus(3, &titan_pci_ops, NULL);
}
-/*
- * for parsing "pci=" kernel boot arguments.
- */
-char *pcibios_setup(char *str)
-{
- printk(KERN_INFO "rr: pcibios_setup\n");
- /* Nothing to do for now. */
-
- return str;
-}
-
unsigned __init int pcibios_assign_all_busses(void)
{
/* We want to use the PCI bus detection done by PMON */
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 06/16] MIPS/PCI: adjust section annotations for 'pcibios_setup()'
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (4 preceding siblings ...)
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 ` Myron Stowe
2012-06-26 3:31 ` [PATCH 07/16] parisc/PCI: Factor 'pcibios_setup()' out of parisc Myron Stowe
` (10 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:31 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
Make pcibios_setup() consistently use the "__init" section annotation.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/mips/pci/pci.c | 4 ++--
arch/mips/txx9/generic/pci.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 271e8c4..0e111d2 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -348,9 +348,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
vma->vm_end - vma->vm_start, vma->vm_page_prot);
}
-char * (*pcibios_plat_setup)(char *str) __devinitdata;
+char * (*pcibios_plat_setup)(char *str) __initdata;
-char *__devinit pcibios_setup(char *str)
+char *__init pcibios_setup(char *str)
{
if (pcibios_plat_setup)
return pcibios_plat_setup(str);
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
index 682efb0..f028e3d 100644
--- a/arch/mips/txx9/generic/pci.c
+++ b/arch/mips/txx9/generic/pci.c
@@ -398,9 +398,9 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
return txx9_board_vec->pci_map_irq(dev, slot, pin);
}
-char * (*txx9_board_pcibios_setup)(char *str) __devinitdata;
+char * (*txx9_board_pcibios_setup)(char *str) __initdata;
-char *__devinit txx9_pcibios_setup(char *str)
+char *__init txx9_pcibios_setup(char *str)
{
if (txx9_board_pcibios_setup && !txx9_board_pcibios_setup(str))
return NULL;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 07/16] parisc/PCI: Factor 'pcibios_setup()' out of parisc
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (5 preceding siblings ...)
2012-06-26 3:31 ` [PATCH 06/16] MIPS/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
@ 2012-06-26 3:31 ` Myron Stowe
2012-06-26 3:31 ` [PATCH 08/16] powerpc/PCI: Factor 'pcibios_setup()' out of powerpc Myron Stowe
` (9 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:31 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine that
can be used by all architectures as a default. Drop parisc's architecture
specific version in favor of that as it does not need to be over-ridden.
No functional change.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/parisc/kernel/pci.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index 24644ac..6030905 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -139,11 +139,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
}
-char *pcibios_setup(char *str)
-{
- return str;
-}
-
/*
* Called by pci_set_master() - a driver interface.
*
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 08/16] powerpc/PCI: Factor 'pcibios_setup()' out of powerpc
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (6 preceding siblings ...)
2012-06-26 3:31 ` [PATCH 07/16] parisc/PCI: Factor 'pcibios_setup()' out of parisc Myron Stowe
@ 2012-06-26 3:31 ` 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
` (8 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:31 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine
that can be used by all architectures as a default. Drop powerpc's
architecture specific version in favor of that as it does not need to be
over-ridden.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/powerpc/kernel/pci-common.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 8e78e93..bf2306b 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -200,11 +200,6 @@ int pcibios_add_platform_entries(struct pci_dev *pdev)
return device_create_file(&pdev->dev, &dev_attr_devspec);
}
-char __devinit *pcibios_setup(char *str)
-{
- return str;
-}
-
/*
* Reads the interrupt pin to determine if interrupt is use by card.
* If the interrupt is used, then gets the interrupt line from the
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 09/16] sh/PCI: Factor 'pcibios_setup()' out of sh
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (7 preceding siblings ...)
2012-06-26 3:31 ` [PATCH 08/16] powerpc/PCI: Factor 'pcibios_setup()' out of powerpc Myron Stowe
@ 2012-06-26 3:31 ` 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
` (7 subsequent siblings)
16 siblings, 2 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:31 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine that can
be used by all architectures as a default. Drop sh's architecture specific
version in favor of that as it does not need to be over-ridden.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/sh/drivers/pci/pci.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 9d10a3c..7d42288 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -197,11 +197,6 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq)
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
}
-char * __devinit __weak pcibios_setup(char *str)
-{
- return str;
-}
-
static void __init
pcibios_bus_report_status_early(struct pci_channel *hose,
int top_bus, int current_bus,
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 10/16] sh/PCI: adjust section annotations for 'pcibios_setup()'
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (8 preceding siblings ...)
2012-06-26 3:31 ` [PATCH 09/16] sh/PCI: Factor 'pcibios_setup()' out of sh Myron Stowe
@ 2012-06-26 3:32 ` Myron Stowe
2012-06-26 3:32 ` [PATCH 11/16] sparc/PCI: Factor 'pcibios_setup()' out of sparc Myron Stowe
` (6 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:32 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
Make pcibios_setup() consistently use the "__init" section annotation.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/sh/drivers/pci/fixups-sdk7786.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sh/drivers/pci/fixups-sdk7786.c b/arch/sh/drivers/pci/fixups-sdk7786.c
index 0e18ee3..36eb6fc 100644
--- a/arch/sh/drivers/pci/fixups-sdk7786.c
+++ b/arch/sh/drivers/pci/fixups-sdk7786.c
@@ -23,9 +23,9 @@
* Misconfigurations can be detected through the FPGA via the slot
* resistors to determine card presence. Hotplug remains unsupported.
*/
-static unsigned int slot4en __devinitdata;
+static unsigned int slot4en __initdata;
-char *__devinit pcibios_setup(char *str)
+char *__init pcibios_setup(char *str)
{
if (strcmp(str, "slot4en") == 0) {
slot4en = 1;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 11/16] sparc/PCI: Factor 'pcibios_setup()' out of sparc
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (9 preceding siblings ...)
2012-06-26 3:32 ` [PATCH 10/16] sh/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
@ 2012-06-26 3:32 ` 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
` (5 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:32 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine
that can be used by all architectures as a default. Drop sparc's
architecture specific version in favor of that as it does not need to be
over-ridden.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/sparc/kernel/leon_pci.c | 8 --------
arch/sparc/kernel/pci.c | 5 -----
arch/sparc/kernel/pcic.c | 8 --------
3 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c
index 19f5605..21dcda7 100644
--- a/arch/sparc/kernel/leon_pci.c
+++ b/arch/sparc/kernel/leon_pci.c
@@ -91,14 +91,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *pbus)
}
}
-/*
- * Other archs parse arguments here.
- */
-char * __devinit pcibios_setup(char *str)
-{
- return str;
-}
-
resource_size_t pcibios_align_resource(void *data, const struct resource *res,
resource_size_t size, resource_size_t align)
{
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index fdaf218..3e7fba0 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -747,11 +747,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
return 0;
}
-char * __devinit pcibios_setup(char *str)
-{
- return str;
-}
-
/* Platform support for /proc/bus/pci/X/Y mmap()s. */
/* If the user uses a host-bridge as the PCI device, he may use
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index ded3f60..97eb529 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -767,14 +767,6 @@ static void watchdog_reset() {
}
#endif
-/*
- * Other archs parse arguments here.
- */
-char * __devinit pcibios_setup(char *str)
-{
- return str;
-}
-
resource_size_t pcibios_align_resource(void *data, const struct resource *res,
resource_size_t size, resource_size_t align)
{
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 12/16] tile/PCI: Factor 'pcibios_setup()' out of tile
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (10 preceding siblings ...)
2012-06-26 3:32 ` [PATCH 11/16] sparc/PCI: Factor 'pcibios_setup()' out of sparc Myron Stowe
@ 2012-06-26 3:32 ` Myron Stowe
2012-06-26 13:18 ` Chris Metcalf
2012-06-26 3:32 ` [PATCH 13/16] unicore32/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
` (4 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:32 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine
that can be used by all architectures as a default. Drop tile's
architecture specific version in favor of that as it does not need to be
over-ridden.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/tile/kernel/pci.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c
index b56d12b..e257226 100644
--- a/arch/tile/kernel/pci.c
+++ b/arch/tile/kernel/pci.c
@@ -401,16 +401,6 @@ void pcibios_set_master(struct pci_dev *dev)
}
/*
- * This can be called from the generic PCI layer, but doesn't need to
- * do anything.
- */
-char __devinit *pcibios_setup(char *str)
-{
- /* Nothing needs to be done. */
- return str;
-}
-
-/*
* This is called from the generic Linux layer.
*/
void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 13/16] unicore32/PCI: adjust section annotations for 'pcibios_setup()'
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (11 preceding siblings ...)
2012-06-26 3:32 ` [PATCH 12/16] tile/PCI: Factor 'pcibios_setup()' out of tile Myron Stowe
@ 2012-06-26 3:32 ` Myron Stowe
2012-06-26 7:01 ` guanxuetao
2012-06-26 3:32 ` [PATCH 14/16] x86/PCI: " Myron Stowe
` (3 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:32 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
Make pcibios_setup() consistently use the "__init" section annotation.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/unicore32/kernel/pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c
index 2fc2b1b..46cb6c9 100644
--- a/arch/unicore32/kernel/pci.c
+++ b/arch/unicore32/kernel/pci.c
@@ -296,7 +296,7 @@ static int __init pci_common_init(void)
}
subsys_initcall(pci_common_init);
-char * __devinit pcibios_setup(char *str)
+char * __init pcibios_setup(char *str)
{
if (!strcmp(str, "debug")) {
debug_pci = 1;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 14/16] x86/PCI: adjust section annotations for 'pcibios_setup()'
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (12 preceding siblings ...)
2012-06-26 3:32 ` [PATCH 13/16] unicore32/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
@ 2012-06-26 3:32 ` Myron Stowe
2012-06-26 3:32 ` [PATCH 15/16] xtensa/PCI: Factor 'pcibios_setup()' out of xtensa Myron Stowe
` (2 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:32 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
Make pcibios_setup() consistently use the "__init" section annotation.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/x86/pci/common.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 0ad990a..720e973 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -494,7 +494,7 @@ int __init pcibios_init(void)
return 0;
}
-char * __devinit pcibios_setup(char *str)
+char * __init pcibios_setup(char *str)
{
if (!strcmp(str, "off")) {
pci_probe = 0;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 15/16] xtensa/PCI: Factor 'pcibios_setup()' out of xtensa
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (13 preceding siblings ...)
2012-06-26 3:32 ` [PATCH 14/16] x86/PCI: " Myron Stowe
@ 2012-06-26 3:32 ` 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
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:32 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
The PCI core provides a generic (__weak) 'pcibios_setup()' routine
that can be used by all architectures as a default. Drop xtensa's
architecture specific version in favor of that as it does not need to be
over-ridden.
No functional change.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/xtensa/kernel/pci.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index eb30e35..3a2cae4 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -46,7 +46,6 @@
* pcibios_fixups
* pcibios_align_resource
* pcibios_fixup_bus
- * pcibios_setup
* pci_bus_add_device
* pci_mmap_page_range
*/
@@ -206,11 +205,6 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
}
}
-char __init *pcibios_setup(char *str)
-{
- return str;
-}
-
void pcibios_set_master(struct pci_dev *dev)
{
/* No special bus mastering setup handling */
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 16/16] cris/PCI: Factor 'pcibios_setup()' out of cris
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (14 preceding siblings ...)
2012-06-26 3:32 ` [PATCH 15/16] xtensa/PCI: Factor 'pcibios_setup()' out of xtensa Myron Stowe
@ 2012-06-26 3:32 ` Myron Stowe
2012-07-05 21:33 ` [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Bjorn Helgaas
16 siblings, 0 replies; 28+ messages in thread
From: Myron Stowe @ 2012-06-26 3:32 UTC (permalink / raw)
To: bhelgaas
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
This patch fixes what looks like a bug in cris, which implements
pcibios_setup() such that pci_setup() doesn't look for any generic
options.
The PCI core provides a generic (__weak) 'pcibios_setup()' routine
that can be used by all architectures as a default. Drop cris's
architecture specific version in favor of that as it does not need to be
over-ridden.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
arch/cris/arch-v32/drivers/pci/bios.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c
index bc0cfda..5b1ee82 100644
--- a/arch/cris/arch-v32/drivers/pci/bios.c
+++ b/arch/cris/arch-v32/drivers/pci/bios.c
@@ -6,11 +6,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b)
{
}
-char * __devinit pcibios_setup(char *str)
-{
- return NULL;
-}
-
void pcibios_set_master(struct pci_dev *dev)
{
u8 lat;
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH 11/16] sparc/PCI: Factor 'pcibios_setup()' out of sparc
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
0 siblings, 0 replies; 28+ messages in thread
From: David Miller @ 2012-06-26 3:36 UTC (permalink / raw)
To: myron.stowe
Cc: bhelgaas, linux-pci, rth, ink, mattst88, linux, starvik,
jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, benh, paulus, lethal, cmetcalf,
gxt, tglx, mingo, hpa, x86, chris, linux-kernel
From: Myron Stowe <myron.stowe@redhat.com>
Date: Mon, 25 Jun 2012 21:32:12 -0600
> The PCI core provides a generic (__weak) 'pcibios_setup()' routine
> that can be used by all architectures as a default. Drop sparc's
> architecture specific version in favor of that as it does not need to be
> over-ridden.
>
> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 08/16] powerpc/PCI: Factor 'pcibios_setup()' out of powerpc
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
0 siblings, 0 replies; 28+ messages in thread
From: Benjamin Herrenschmidt @ 2012-06-26 4:37 UTC (permalink / raw)
To: Myron Stowe
Cc: bhelgaas, linux-pci, rth, ink, mattst88, linux, starvik,
jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, paulus, lethal, davem, cmetcalf,
gxt, tglx, mingo, hpa, x86, chris, linux-kernel
On Mon, 2012-06-25 at 21:31 -0600, Myron Stowe wrote:
> The PCI core provides a generic (__weak) 'pcibios_setup()' routine
> that can be used by all architectures as a default. Drop powerpc's
> architecture specific version in favor of that as it does not need to be
> over-ridden.
>
> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> arch/powerpc/kernel/pci-common.c | 5 -----
> 1 files changed, 0 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
> index 8e78e93..bf2306b 100644
> --- a/arch/powerpc/kernel/pci-common.c
> +++ b/arch/powerpc/kernel/pci-common.c
> @@ -200,11 +200,6 @@ int pcibios_add_platform_entries(struct pci_dev *pdev)
> return device_create_file(&pdev->dev, &dev_attr_devspec);
> }
>
> -char __devinit *pcibios_setup(char *str)
> -{
> - return str;
> -}
> -
> /*
> * Reads the interrupt pin to determine if interrupt is use by card.
> * If the interrupt is used, then gets the interrupt line from the
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 09/16] sh/PCI: Factor 'pcibios_setup()' out of sh
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
1 sibling, 0 replies; 28+ messages in thread
From: Nobuhiro Iwamatsu @ 2012-06-26 4:57 UTC (permalink / raw)
To: Myron Stowe
Cc: bhelgaas, linux-pci, rth, ink, mattst88, linux, starvik,
jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, benh, paulus, lethal, davem,
cmetcalf, gxt, tglx, mingo, hpa, x86, chris, linux-kernel
2012/6/26 Myron Stowe <myron.stowe@redhat.com>:
> The PCI core provides a generic (__weak) 'pcibios_setup()' routine that can
> be used by all architectures as a default. Drop sh's architecture specific
> version in favor of that as it does not need to be over-ridden.
>
> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Tested-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
--
Nobuhiro Iwamatsu
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/16] microblaze/PCI: Factor 'pcibios_setup()' out of microblaze
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
0 siblings, 0 replies; 28+ messages in thread
From: Michal Simek @ 2012-06-26 5:47 UTC (permalink / raw)
To: Myron Stowe
Cc: bhelgaas, linux-pci, rth, ink, mattst88, linux, starvik,
jesper.nilsson, tony.luck, fenghua.yu, ralf, yasutake.koichi,
jejb, deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx,
mingo, hpa, x86, chris, linux-kernel
On 06/26/2012 05:31 AM, Myron Stowe wrote:
> The PCI core provides a generic (__weak) 'pcibios_setup()' routine that
> can be used by all architectures as a default. Drop microblaze's
> architecture specific version in favor of that as it does not need to be
> over-ridden.
>
> Signed-off-by: Myron Stowe<myron.stowe@redhat.com>
> ---
>
> arch/microblaze/pci/pci-common.c | 5 -----
> 1 files changed, 0 insertions(+), 5 deletions(-)
>
> diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
> index ed22bfc..7b510ae 100644
> --- a/arch/microblaze/pci/pci-common.c
> +++ b/arch/microblaze/pci/pci-common.c
> @@ -192,11 +192,6 @@ void pcibios_set_master(struct pci_dev *dev)
> /* No special bus mastering setup handling */
> }
>
> -char __devinit *pcibios_setup(char *str)
> -{
> - return str;
> -}
> -
> /*
> * Reads the interrupt pin to determine if interrupt is use by card.
> * If the interrupt is used, then gets the interrupt line from the
>
Acked-by: Michal Simek <monstr@monstr.eu>
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 09/16] sh/PCI: Factor 'pcibios_setup()' out of sh
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
1 sibling, 0 replies; 28+ messages in thread
From: Paul Mundt @ 2012-06-26 5:51 UTC (permalink / raw)
To: Myron Stowe
Cc: bhelgaas, linux-pci, rth, ink, mattst88, linux, starvik,
jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, benh, paulus, davem, cmetcalf,
gxt, tglx, mingo, hpa, x86, chris, linux-kernel
On Mon, Jun 25, 2012 at 09:31:58PM -0600, Myron Stowe wrote:
> The PCI core provides a generic (__weak) 'pcibios_setup()' routine that can
> be used by all architectures as a default. Drop sh's architecture specific
> version in favor of that as it does not need to be over-ridden.
>
> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 13/16] unicore32/PCI: adjust section annotations for 'pcibios_setup()'
2012-06-26 3:32 ` [PATCH 13/16] unicore32/PCI: adjust section annotations for 'pcibios_setup()' Myron Stowe
@ 2012-06-26 7:01 ` guanxuetao
0 siblings, 0 replies; 28+ messages in thread
From: guanxuetao @ 2012-06-26 7:01 UTC (permalink / raw)
To: Myron Stowe
Cc: bhelgaas, linux-pci, rth, ink, mattst88, linux, starvik,
jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, benh, paulus, lethal, davem,
cmetcalf, gxt, tglx, mingo, hpa, x86, chris, linux-kernel
> Make pcibios_setup() consistently use the "__init" section annotation.
>
> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 12/16] tile/PCI: Factor 'pcibios_setup()' out of tile
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
0 siblings, 1 reply; 28+ messages in thread
From: Chris Metcalf @ 2012-06-26 13:18 UTC (permalink / raw)
To: Myron Stowe
Cc: bhelgaas, linux-pci, rth, ink, mattst88, linux, starvik,
jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, benh, paulus, lethal, davem, gxt,
tglx, mingo, hpa, x86, chris, linux-kernel
On 6/25/2012 11:32 PM, Myron Stowe wrote:
> The PCI core provides a generic (__weak) 'pcibios_setup()' routine
> that can be used by all architectures as a default. Drop tile's
> architecture specific version in favor of that as it does not need to be
> over-ridden.
>
> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
> ---
>
> arch/tile/kernel/pci.c | 10 ----------
> 1 files changed, 0 insertions(+), 10 deletions(-)
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
In our internal tree we have x86-like support for "pci=off" here. When I
push that I can just push it as a new function to override the removed one,
so I'm happy with your change as proposed. But perhaps it would make sense
to move the support for "pci=off" to common code, since multiple
architectures handle this the same way?
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 02/16] alpha/PCI: Factor 'pcibios_setup()' out of alpha
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
0 siblings, 0 replies; 28+ messages in thread
From: Richard Henderson @ 2012-06-26 15:43 UTC (permalink / raw)
To: Myron Stowe
Cc: bhelgaas, linux-pci, ink, mattst88, linux, starvik,
jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, benh, paulus, lethal, davem,
cmetcalf, gxt, tglx, mingo, hpa, x86, chris, linux-kernel
On 06/25/2012 08:31 PM, Myron Stowe wrote:
> The PCI core provides a generic (__weak) 'pcibios_setup()' routine
> that can be used by all architectures as a default. Drop alpha's
> architecture specific version in favor of that as it does not need to be
> over-ridden.
>
> No functional change.
>
> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
> ---
>
> arch/alpha/kernel/pci.c | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
Acked-by: Richard Henderson <rth@twiddle.net>
r~
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 12/16] tile/PCI: Factor 'pcibios_setup()' out of tile
2012-06-26 13:18 ` Chris Metcalf
@ 2012-06-28 17:30 ` Myron Stowe
2012-06-28 17:44 ` Chris Metcalf
0 siblings, 1 reply; 28+ messages in thread
From: Myron Stowe @ 2012-06-28 17:30 UTC (permalink / raw)
To: Chris Metcalf
Cc: Myron Stowe, bhelgaas, linux-pci, rth, ink, mattst88, linux,
starvik, jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, benh, paulus, lethal, davem, gxt,
tglx, mingo, hpa, x86, chris, linux-kernel
On Tue, 2012-06-26 at 09:18 -0400, Chris Metcalf wrote:
> On 6/25/2012 11:32 PM, Myron Stowe wrote:
> > The PCI core provides a generic (__weak) 'pcibios_setup()' routine
> > that can be used by all architectures as a default. Drop tile's
> > architecture specific version in favor of that as it does not need to be
> > over-ridden.
> >
> > Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
> > ---
> >
> > arch/tile/kernel/pci.c | 10 ----------
> > 1 files changed, 0 insertions(+), 10 deletions(-)
>
> Acked-by: Chris Metcalf <cmetcalf@tilera.com>
>
> In our internal tree we have x86-like support for "pci=off" here. When I
> push that I can just push it as a new function to override the removed one,
> so I'm happy with your change as proposed.
Yes, that should be fine. Just an FYI - when you introduce the
over-ride, I believe that it should be __init and not __devinit as the
previous tile version of 'pcibios_setup()' was.
> But perhaps it would make sense
> to move the support for "pci=off" to common code, since multiple
> architectures handle this the same way?
Looking at the tree I only see three of the architectures currently
using/implementing "pci=off" (four with the 'tile' addition). Perhaps
there is a way to avoid such but it seems like adding this to the core
would require introducing the global variable 'pci_probe' which seems
like unnecessary pollution?
Myron
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 12/16] tile/PCI: Factor 'pcibios_setup()' out of tile
2012-06-28 17:30 ` Myron Stowe
@ 2012-06-28 17:44 ` Chris Metcalf
0 siblings, 0 replies; 28+ messages in thread
From: Chris Metcalf @ 2012-06-28 17:44 UTC (permalink / raw)
To: Myron Stowe
Cc: Myron Stowe, bhelgaas, linux-pci, rth, ink, mattst88, linux,
starvik, jesper.nilsson, tony.luck, fenghua.yu, monstr, ralf,
yasutake.koichi, jejb, deller, benh, paulus, lethal, davem, gxt,
tglx, mingo, hpa, x86, chris, linux-kernel
On 6/28/2012 1:30 PM, Myron Stowe wrote:
> On Tue, 2012-06-26 at 09:18 -0400, Chris Metcalf wrote:
>> On 6/25/2012 11:32 PM, Myron Stowe wrote:
>>> The PCI core provides a generic (__weak) 'pcibios_setup()' routine
>>> that can be used by all architectures as a default. Drop tile's
>>> architecture specific version in favor of that as it does not need to be
>>> over-ridden.
>>>
>>> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
>>> ---
>>>
>>> arch/tile/kernel/pci.c | 10 ----------
>>> 1 files changed, 0 insertions(+), 10 deletions(-)
>> [...]
>> In our internal tree we have x86-like support for "pci=off" here. [...]
>> But perhaps it would make sense
>> to move the support for "pci=off" to common code, since multiple
>> architectures handle this the same way?
> Looking at the tree I only see three of the architectures currently
> using/implementing "pci=off" (four with the 'tile' addition). Perhaps
> there is a way to avoid such but it seems like adding this to the core
> would require introducing the global variable 'pci_probe' which seems
> like unnecessary pollution?
I'd argue that the core might expose a pci_probing_disabled() function that
returns whether "pci=off" was seen, and modify the other architectures that
already support pci_probe to call that function instead. It's true that
x86 has a much more elaborate use of pci_probe than the other
architectures, which means x86 would probably want to keep the variable
as-is and just call pci_probing_disabled() to set pci_probe to zero and return.
All that said, I'm not volunteering to make this change, so if it doesn't
seem right to you, I certainly won't insist. :-)
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 00/16] PCI: Re-factor 'pcibios_setup()'
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
` (15 preceding siblings ...)
2012-06-26 3:32 ` [PATCH 16/16] cris/PCI: Factor 'pcibios_setup()' out of cris Myron Stowe
@ 2012-07-05 21:33 ` Bjorn Helgaas
16 siblings, 0 replies; 28+ messages in thread
From: Bjorn Helgaas @ 2012-07-05 21:33 UTC (permalink / raw)
To: Myron Stowe
Cc: linux-pci, rth, ink, mattst88, linux, starvik, jesper.nilsson,
tony.luck, fenghua.yu, monstr, ralf, yasutake.koichi, jejb,
deller, benh, paulus, lethal, davem, cmetcalf, gxt, tglx, mingo,
hpa, x86, chris, linux-kernel
On Mon, Jun 25, 2012 at 9:30 PM, Myron Stowe <myron.stowe@redhat.com> wrote:
> 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 then be over-ridden by
> architecture-specific code.
>
> This series also cleans up 'pcibios_setup()' as necessary to consistently
> use the "__init" section annotation.
>
> Suggested by Bjorn Helgaas -
> http://marc.info/?l=linux-kernel&m=134023745124680&w=2
>
>
> It looks as if there is a bug in the CRIS architecture's version of
> 'pcibios_setup()'. It implements pcibios_setup() such that pci_setup()
> doesn't look for any generic options. I included the fix for this in this
> series. If this ends up not being correct - i.e. PCI support for CRIS
> should be dropped - then that specific patch (which I included last in the
> series) can be dropped.
>
> Note: I do not have a cross-compile environment so I have only tested x86.
> ---
>
> Myron Stowe (16):
> cris/PCI: Factor 'pcibios_setup()' out of cris
> xtensa/PCI: Factor 'pcibios_setup()' out of xtensa
> x86/PCI: adjust section annotations for 'pcibios_setup()'
> unicore32/PCI: adjust section annotations for 'pcibios_setup()'
> tile/PCI: Factor 'pcibios_setup()' out of tile
> sparc/PCI: Factor 'pcibios_setup()' out of sparc
> sh/PCI: adjust section annotations for 'pcibios_setup()'
> sh/PCI: Factor 'pcibios_setup()' out of sh
> powerpc/PCI: Factor 'pcibios_setup()' out of powerpc
> parisc/PCI: Factor 'pcibios_setup()' out of parisc
> MIPS/PCI: adjust section annotations for 'pcibios_setup()'
> MIPS/PCI: Factor 'pcibios_setup()' out of MIPS/pmc-sierra
> microblaze/PCI: Factor 'pcibios_setup()' out of microblaze
> ia64/PCI: Factor 'pcibios_setup' out of ia64
> alpha/PCI: Factor 'pcibios_setup()' out of alpha
> PCI: Pull 'pcibios_setup' up into PCI's core
>
>
> arch/alpha/kernel/pci.c | 6 ------
> arch/cris/arch-v32/drivers/pci/bios.c | 5 -----
> arch/ia64/pci/pci.c | 9 ---------
> arch/microblaze/pci/pci-common.c | 5 -----
> arch/mips/pci/pci.c | 4 ++--
> arch/mips/pmc-sierra/yosemite/ht.c | 11 -----------
> arch/mips/txx9/generic/pci.c | 4 ++--
> arch/parisc/kernel/pci.c | 5 -----
> arch/powerpc/kernel/pci-common.c | 5 -----
> arch/sh/drivers/pci/fixups-sdk7786.c | 4 ++--
> arch/sh/drivers/pci/pci.c | 5 -----
> arch/sparc/kernel/leon_pci.c | 8 --------
> arch/sparc/kernel/pci.c | 5 -----
> arch/sparc/kernel/pcic.c | 8 --------
> arch/tile/kernel/pci.c | 10 ----------
> arch/unicore32/kernel/pci.c | 2 +-
> arch/x86/pci/common.c | 2 +-
> arch/xtensa/kernel/pci.c | 6 ------
> drivers/pci/pci.c | 12 ++++++++++++
> include/linux/pci.h | 1 +
> 20 files changed, 21 insertions(+), 96 deletions(-)
I pushed these to my -next branch, for inclusion in 3.6. Thanks for
the cleanups!
Bjorn
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2012-07-05 21:33 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-26 3:30 [PATCH 00/16] PCI: Re-factor 'pcibios_setup()' Myron Stowe
2012-06-26 3:30 ` [PATCH 01/16] PCI: Pull 'pcibios_setup' up into PCI's core Myron Stowe
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
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).