linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Haicheng Li <haicheng.li@linux.intel.com>
To: Jiang Liu <liuj97@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Haicheng Li <haicheng.lee@gmail.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH 1/3] PCI: Add hide_device support to pci subsystem.
Date: Tue, 9 Jul 2013 22:21:13 +0800	[thread overview]
Message-ID: <20130709142113.GA5954@hli22-desktop> (raw)
In-Reply-To: <51D8D5D7.3010701@gmail.com>

On Sun, Jul 07, 2013 at 10:43:35AM +0800, Jiang Liu wrote:
> On 07/04/2013 12:09 AM, Bjorn Helgaas wrote:
> > On Wed, Jul 3, 2013 at 9:16 AM, Haicheng Li <haicheng.li@linux.intel.com> wrote:
> >> With more and more SOCs having pci device integrated into chip (e.g. Intel
> >> Atom series), it's useful to add an interface to cleanly hide pci devices from
> >> pci device scanning, which is because:
> >>
> >> 1. phone or tablet OEMs may choose disabling some pci device in the SOC,
> >>    such as camera ISP in Intel Atom Z2580 chip, and etc.
> >> 2. if such disabled devices are not cleanly removed from pci device tree,
> >>    then pci-core will still try to operate on the relative device control
> >>    registers while S3 suspend and resume.
> >> 3. so hiding such devices from early begining will not only reduce the kernel
> >>    boot time, but also optimize the latency of system suspend and resume.
> > 
> > Normally the chip provides a way to disable devices by writing a
> > configuration register.  Then the device doesn't respond when Linux
> > enumerates devices, so nothing special is required in the kernel.
> > What's different about the Z2580?  I'd be surprised if Intel forgot to
> > include such a register.  Maybe the firmware just isn't smart enough
> > to disable the device?  If so, it would be better to fix the firmware
> > than to add kludges in the kernel.

Sorry for slow response due to a travel recently.
> Agree, it would be great if chipset and firmware could cooperate to
> handle this issue. Otherwise the interface may be abused and causes
> trouble to PCI hotplug operations because the notation seg:bus:dev.func
> isn't reliable. The PCI bus number may reassigned by OS.
I quickly went thru the code and thought the bus # should not be changed in runtime
by current code. do you mean after a reboot, the bus# maybe changed with new slot hotplugged?

Can you please elabrate this case? hopefully I can enhance the patch to cover it.
 
> > 
> >> To hide pci devices, just pass such parameters to kernel at boot stage:
> >>         pci=hide=[<domain>:]<bus>:<slot>.<func>[; ...]

      reply	other threads:[~2013-07-09 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 15:16 [PATCH 1/3] PCI: Add hide_device support to pci subsystem Haicheng Li
2013-07-03 15:16 ` [PATCH 2/3] doc: add the description for pci=hide kernel parameter Haicheng Li
2013-07-03 16:00   ` Bjorn Helgaas
2013-07-04  2:22     ` Haicheng Li
2013-07-03 16:09 ` [PATCH 1/3] PCI: Add hide_device support to pci subsystem Bjorn Helgaas
2013-07-03 16:41   ` Jiang Liu
2013-07-04  4:53   ` Haicheng Li
2013-07-05 17:28     ` Bjorn Helgaas
2013-07-09 14:22       ` Haicheng Li
2013-07-07  2:43   ` Jiang Liu
2013-07-09 14:21     ` Haicheng Li [this message]

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=20130709142113.GA5954@hli22-desktop \
    --to=haicheng.li@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=haicheng.lee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuj97@gmail.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).