All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Zhu, DengCheng" <dczhu@mips.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"jbarnes@virtuousgeek.org" <jbarnes@virtuousgeek.org>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>,
	"monstr@monstr.eu" <monstr@monstr.eu>,
	"paulus@samba.org" <paulus@samba.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"Barzilay, Eyal" <eyal@mips.com>,
	"Fortuna, Zenon" <zenon@mips.com>,
	"dengcheng.zhu@gmail.com" <dengcheng.zhu@gmail.com>
Subject: RE: [RESEND PATCH v3 0/2] Pass resources to pci_create_bus() and fix MIPS PCI resources
Date: Tue, 11 Oct 2011 09:48:15 +0200	[thread overview]
Message-ID: <1318319295.29415.452.camel@pasglop> (raw)
In-Reply-To: <BD04AF0D5BE72443A0B69C1C0486AD3ECE8D8973@exchdb03.mips.com>

On Mon, 2011-10-10 at 23:49 +0000, Zhu, DengCheng wrote:
> Yes, I can easily understand what you mean, because this point was ever
> considered while writing this patch series. We pass the element list as
> opposed to a list_head for the head of the element list because we simply
> want to link the elements into pci_bus->resources in pci_create_bus(). This
> can be done by a single line:
>     list_add_tail(&b->resources, &bus_res->list);
> 
> In addition, if we need to do list_for_each_entry() on the list, our target
> should always be pci_bus->resources rather than the pci_bus_resource list
> which is passed into pci_create_bus() to be part (the meat) of
> pci_bus->resources. 

I must admit I don't completely understand what this patch is about,
other than it will most probably break the way we do resource management
on powerpc :-)

I don't understand the point about conflicts in scan_slot and I don't
see what you win by "settling down early". Also keep in mind that the
resources read from the device need to be remapped on some archs like
powerpc which we do from a header quirk at the moment.

We also have very different behaviour depending on the platform that we
can trigger ranging from ignoring all resources read from the devices
because we want the kernel to fully re-assign everything, to on the
contrary only every using what the firmware set (no re-assigning
possible), with variants such as re-assigning everything using a custom
algorithm etc....

We do rely in various places on the concept of scan first, alloc/fixup
next, then use. Merging scan & alloc/fixup of resources in one pass is a
major conceptual change. It might be ok but I need to convince myself it
is by understanding better what's going on and what problem you are
really trying to solve here.

Cheers,
Ben.



  reply	other threads:[~2011-10-11  7:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01  2:48 [RESEND PATCH v3 0/2] Pass resources to pci_create_bus() and fix MIPS PCI resources Deng-Cheng Zhu
2011-09-01  2:48 ` Deng-Cheng Zhu
2011-09-01  2:48 ` [RESEND PATCH v3 1/2] PCI: Pass available resources into pci_create_bus() Deng-Cheng Zhu
2011-09-01  2:48   ` Deng-Cheng Zhu
2011-09-01  2:48 ` [RESEND PATCH v3 2/2] MIPS: PCI: Pass controller's resources to pci_create_bus() in pcibios_scanbus() Deng-Cheng Zhu
2011-09-01  2:48   ` Deng-Cheng Zhu
2011-10-07 21:50 ` [RESEND PATCH v3 0/2] Pass resources to pci_create_bus() and fix MIPS PCI resources Bjorn Helgaas
2011-10-10 21:04   ` Bjorn Helgaas
2011-10-10 23:49     ` Zhu, DengCheng
2011-10-11  7:48       ` Benjamin Herrenschmidt [this message]
2011-10-11 16:15         ` Bjorn Helgaas
2011-11-02 21:14           ` Jesse Barnes
2011-11-02 21:37             ` 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=1318319295.29415.452.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=davem@davemloft.net \
    --cc=dczhu@mips.com \
    --cc=dengcheng.zhu@gmail.com \
    --cc=eyal@mips.com \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=zenon@mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.