LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree
[not found] <200803282348.m2SNmleP016847@imap1.linux-foundation.org>
@ 2008-04-01 15:57 ` Bjorn Helgaas
2008-04-01 17:00 ` Andrew Morton
2008-04-01 20:37 ` Benjamin Herrenschmidt
0 siblings, 2 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2008-04-01 15:57 UTC (permalink / raw)
To: akpm
Cc: mm-commits, davem, greg, m.kozlowski, Benjamin Herrenschmidt,
linux-kernel, Tony Luck, linux-ia64, Ivan Kokshaysky
On Friday 28 March 2008 05:48:47 pm akpm@linux-foundation.org wrote:
>
> The patch titled
> revert gregkh-pci-pci-x86-use-generic-pci_enable_resources
> has been added to the -mm tree. Its filename is
> revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch
OK, I'm not sure where we are with this. Ben listed arches where
the generic pci_enable_resources() should be safe: x86, alpha, and
powerpc. I think we should also include ia64, since I work on that.
If there's no objection to those arches, how should we move forward?
Since Andrew put in "revert gregkh-pci" patches rather than just
dropping things, I assume the original patches are in Greg KH's tree.
Can we just drop the "revert gregkh" patches for x86, alpha, powerpc,
and ia64?
Bjorn
> ------------------------------------------------------
> Subject: revert gregkh-pci-pci-x86-use-generic-pci_enable_resources
> From: Andrew Morton <akpm@linux-foundation.org>
>
> On Fri, 28 Mar 2008 16:10:11 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> > From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
> > Date: Fri, 28 Mar 2008 23:52:10 +0100
> >
> > > The gregkh-pci-pci-sparc64-use-generic-pci_enable_resources.patch which
> > > replaces arch-specific code with generic pci_enable_resources() makes my sparc64
> > > box unable to boot (that's what quilt bisection says). At first I see these messages:
> >
> > Yes, that generic code won't work because of the NULL
> > r->parent check.
> >
> > Alpha, ARM, V32, FRV, IA64, MIPS, MN10300, PARISC, PPC,
> > SH, V850, X86, and Xtensa are all likely to run into
> > problems because of this change.
> >
> > The only platform that did the check as a test of r->parent
> > being NULL is Powerpc.
> >
> > The rest either didn't check (like sparc64), or tested it by going:
> >
> > if (!r->start && r->end)
> >
> > So the amount of potential breakage from this change is enormous.
>
> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
> Cc: Greg KH <greg@kroah.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> arch/x86/pci/common.c | 2 +-
> arch/x86/pci/i386.c | 38 ++++++++++++++++++++++++++++++++++++++
> arch/x86/pci/pci.h | 1 +
> 3 files changed, 40 insertions(+), 1 deletion(-)
>
> diff -puN arch/x86/pci/common.c~revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources arch/x86/pci/common.c
> --- a/arch/x86/pci/common.c~revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources
> +++ a/arch/x86/pci/common.c
> @@ -466,7 +466,7 @@ int pcibios_enable_device(struct pci_dev
> {
> int err;
>
> - if ((err = pci_enable_resources(dev, mask)) < 0)
> + if ((err = pcibios_enable_resources(dev, mask)) < 0)
> return err;
>
> if (!dev->msi_enabled)
> diff -puN arch/x86/pci/i386.c~revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources arch/x86/pci/i386.c
> --- a/arch/x86/pci/i386.c~revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources
> +++ a/arch/x86/pci/i386.c
> @@ -238,6 +238,44 @@ void __init pcibios_resource_survey(void
> */
> fs_initcall(pcibios_assign_resources);
>
> +int pcibios_enable_resources(struct pci_dev *dev, int mask)
> +{
> + u16 cmd, old_cmd;
> + int idx;
> + struct resource *r;
> +
> + pci_read_config_word(dev, PCI_COMMAND, &cmd);
> + old_cmd = cmd;
> + for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
> + /* Only set up the requested stuff */
> + if (!(mask & (1 << idx)))
> + continue;
> +
> + r = &dev->resource[idx];
> + if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
> + continue;
> + if ((idx == PCI_ROM_RESOURCE) &&
> + (!(r->flags & IORESOURCE_ROM_ENABLE)))
> + continue;
> + if (!r->start && r->end) {
> + printk(KERN_ERR "PCI: Device %s not available "
> + "because of resource %d collisions\n",
> + pci_name(dev), idx);
> + return -EINVAL;
> + }
> + if (r->flags & IORESOURCE_IO)
> + cmd |= PCI_COMMAND_IO;
> + if (r->flags & IORESOURCE_MEM)
> + cmd |= PCI_COMMAND_MEMORY;
> + }
> + if (cmd != old_cmd) {
> + printk("PCI: Enabling device %s (%04x -> %04x)\n",
> + pci_name(dev), old_cmd, cmd);
> + pci_write_config_word(dev, PCI_COMMAND, cmd);
> + }
> + return 0;
> +}
> +
> /*
> * If we set up a device for bus mastering, we need to check the latency
> * timer as certain crappy BIOSes forget to set it properly.
> diff -puN arch/x86/pci/pci.h~revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources arch/x86/pci/pci.h
> --- a/arch/x86/pci/pci.h~revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources
> +++ a/arch/x86/pci/pci.h
> @@ -42,6 +42,7 @@ enum pci_bf_sort_state {
> extern unsigned int pcibios_max_latency;
>
> void pcibios_resource_survey(void);
> +int pcibios_enable_resources(struct pci_dev *, int);
>
> /* pci-pc.c */
>
> _
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree
2008-04-01 15:57 ` + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree Bjorn Helgaas
@ 2008-04-01 17:00 ` Andrew Morton
2008-04-01 17:09 ` Bjorn Helgaas
2008-04-01 20:38 ` Benjamin Herrenschmidt
2008-04-01 20:37 ` Benjamin Herrenschmidt
1 sibling, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2008-04-01 17:00 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: davem, greg, m.kozlowski, Benjamin Herrenschmidt, linux-kernel,
Tony Luck, linux-ia64, Ivan Kokshaysky
On Tue, 1 Apr 2008 09:57:15 -0600 Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> On Friday 28 March 2008 05:48:47 pm akpm@linux-foundation.org wrote:
> >
> > The patch titled
> > revert gregkh-pci-pci-x86-use-generic-pci_enable_resources
> > has been added to the -mm tree. Its filename is
> > revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch
>
> OK, I'm not sure where we are with this. Ben listed arches where
> the generic pci_enable_resources() should be safe: x86, alpha, and
> powerpc. I think we should also include ia64, since I work on that.
>
> If there's no objection to those arches, how should we move forward?
> Since Andrew put in "revert gregkh-pci" patches rather than just
> dropping things, I assume the original patches are in Greg KH's tree.
>
> Can we just drop the "revert gregkh" patches for x86, alpha, powerpc,
> and ia64?
So powerpc is OK but ppc might not be?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree
2008-04-01 17:00 ` Andrew Morton
@ 2008-04-01 17:09 ` Bjorn Helgaas
2008-04-01 20:38 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2008-04-01 17:09 UTC (permalink / raw)
To: Andrew Morton
Cc: davem, greg, m.kozlowski, Benjamin Herrenschmidt, linux-kernel,
Tony Luck, linux-ia64, Ivan Kokshaysky
On Tuesday 01 April 2008 11:00:50 am Andrew Morton wrote:
> On Tue, 1 Apr 2008 09:57:15 -0600 Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>
> > On Friday 28 March 2008 05:48:47 pm akpm@linux-foundation.org wrote:
> > >
> > > The patch titled
> > > revert gregkh-pci-pci-x86-use-generic-pci_enable_resources
> > > has been added to the -mm tree. Its filename is
> > > revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch
> >
> > OK, I'm not sure where we are with this. Ben listed arches where
> > the generic pci_enable_resources() should be safe: x86, alpha, and
> > powerpc. I think we should also include ia64, since I work on that.
> >
> > If there's no objection to those arches, how should we move forward?
> > Since Andrew put in "revert gregkh-pci" patches rather than just
> > dropping things, I assume the original patches are in Greg KH's tree.
> >
> > Can we just drop the "revert gregkh" patches for x86, alpha, powerpc,
> > and ia64?
>
> So powerpc is OK but ppc might not be?
I suppose Ben is the expert on that, and he did say he thought both
powerpc and ppc would be OK. I think we just care less about ppc
because powerpc is the new converged one.
Bjorn
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree
2008-04-01 15:57 ` + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree Bjorn Helgaas
2008-04-01 17:00 ` Andrew Morton
@ 2008-04-01 20:37 ` Benjamin Herrenschmidt
2008-04-02 5:15 ` Greg KH
1 sibling, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2008-04-01 20:37 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: akpm, mm-commits, davem, greg, m.kozlowski, linux-kernel,
Tony Luck, linux-ia64, Ivan Kokshaysky
On Tue, 2008-04-01 at 09:57 -0600, Bjorn Helgaas wrote:
>
> Can we just drop the "revert gregkh" patches for x86, alpha, powerpc,
> and ia64?
Considering that the generic is equivalent to what I have today on
powerpc, I'm fine with it.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree
2008-04-01 17:00 ` Andrew Morton
2008-04-01 17:09 ` Bjorn Helgaas
@ 2008-04-01 20:38 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2008-04-01 20:38 UTC (permalink / raw)
To: Andrew Morton
Cc: Bjorn Helgaas, davem, greg, m.kozlowski, linux-kernel, Tony Luck,
linux-ia64, Ivan Kokshaysky
On Tue, 2008-04-01 at 10:00 -0700, Andrew Morton wrote:
> On Tue, 1 Apr 2008 09:57:15 -0600 Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>
> > On Friday 28 March 2008 05:48:47 pm akpm@linux-foundation.org wrote:
> > >
> > > The patch titled
> > > revert gregkh-pci-pci-x86-use-generic-pci_enable_resources
> > > has been added to the -mm tree. Its filename is
> > > revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch
> >
> > OK, I'm not sure where we are with this. Ben listed arches where
> > the generic pci_enable_resources() should be safe: x86, alpha, and
> > powerpc. I think we should also include ia64, since I work on that.
> >
> > If there's no objection to those arches, how should we move forward?
> > Since Andrew put in "revert gregkh-pci" patches rather than just
> > dropping things, I assume the original patches are in Greg KH's tree.
> >
> > Can we just drop the "revert gregkh" patches for x86, alpha, powerpc,
> > and ia64?
>
> So powerpc is OK but ppc might not be?
No, ppc should be fine too.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree
2008-04-01 20:37 ` Benjamin Herrenschmidt
@ 2008-04-02 5:15 ` Greg KH
2008-04-02 14:43 ` Bjorn Helgaas
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2008-04-02 5:15 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Bjorn Helgaas, akpm, mm-commits, davem, m.kozlowski,
linux-kernel, Tony Luck, linux-ia64, Ivan Kokshaysky
On Wed, Apr 02, 2008 at 07:37:56AM +1100, Benjamin Herrenschmidt wrote:
>
> On Tue, 2008-04-01 at 09:57 -0600, Bjorn Helgaas wrote:
> >
> > Can we just drop the "revert gregkh" patches for x86, alpha, powerpc,
> > and ia64?
>
> Considering that the generic is equivalent to what I have today on
> powerpc, I'm fine with it.
Ok, so what ones should I keep in my tree?
Bjorn, any help?
confused,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree
2008-04-02 5:15 ` Greg KH
@ 2008-04-02 14:43 ` Bjorn Helgaas
2008-04-14 22:10 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2008-04-02 14:43 UTC (permalink / raw)
To: Greg KH
Cc: Benjamin Herrenschmidt, akpm, mm-commits, davem, m.kozlowski,
linux-kernel, Tony Luck, linux-ia64, Ivan Kokshaysky,
Kyle McMartin
On Tuesday 01 April 2008 11:15:54 pm Greg KH wrote:
> On Wed, Apr 02, 2008 at 07:37:56AM +1100, Benjamin Herrenschmidt wrote:
> >
> > On Tue, 2008-04-01 at 09:57 -0600, Bjorn Helgaas wrote:
> > >
> > > Can we just drop the "revert gregkh" patches for x86, alpha, powerpc,
> > > and ia64?
> >
> > Considering that the generic is equivalent to what I have today on
> > powerpc, I'm fine with it.
>
> Ok, so what ones should I keep in my tree?
>
> Bjorn, any help?
I think we should keep x86, alpha, powerpc, ppc, and ia64.
Kyle previously acked it for parisc, so maybe he can speak
up about whether to keep it there.
Bjorn
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree
2008-04-02 14:43 ` Bjorn Helgaas
@ 2008-04-14 22:10 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2008-04-14 22:10 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Benjamin Herrenschmidt, akpm, mm-commits, davem, m.kozlowski,
linux-kernel, Tony Luck, linux-ia64, Ivan Kokshaysky,
Kyle McMartin
On Wed, Apr 02, 2008 at 08:43:01AM -0600, Bjorn Helgaas wrote:
> On Tuesday 01 April 2008 11:15:54 pm Greg KH wrote:
> > On Wed, Apr 02, 2008 at 07:37:56AM +1100, Benjamin Herrenschmidt wrote:
> > >
> > > On Tue, 2008-04-01 at 09:57 -0600, Bjorn Helgaas wrote:
> > > >
> > > > Can we just drop the "revert gregkh" patches for x86, alpha, powerpc,
> > > > and ia64?
> > >
> > > Considering that the generic is equivalent to what I have today on
> > > powerpc, I'm fine with it.
> >
> > Ok, so what ones should I keep in my tree?
> >
> > Bjorn, any help?
>
> I think we should keep x86, alpha, powerpc, ppc, and ia64.
>
> Kyle previously acked it for parisc, so maybe he can speak
> up about whether to keep it there.
Ok, I've kept:
x86
alpha
powerpc
ppc
parisc
ia64
and dropped:
arm
cris
frv
mips
mn10300
sh
sparc64
v850
xtensa
from my tree.
If anything further needs to be changed, please let me know.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-04-14 22:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200803282348.m2SNmleP016847@imap1.linux-foundation.org>
2008-04-01 15:57 ` + revert-gregkh-pci-pci-x86-use-generic-pci_enable_resources.patch added to -mm tree Bjorn Helgaas
2008-04-01 17:00 ` Andrew Morton
2008-04-01 17:09 ` Bjorn Helgaas
2008-04-01 20:38 ` Benjamin Herrenschmidt
2008-04-01 20:37 ` Benjamin Herrenschmidt
2008-04-02 5:15 ` Greg KH
2008-04-02 14:43 ` Bjorn Helgaas
2008-04-14 22:10 ` Greg KH
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).