linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Liviu.Dudau@arm.com" <Liviu.Dudau@arm.com>,
	nofooter <nofooter@xilinx.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: Memory and IO space Enabling different in x86 and ARM64
Date: Fri, 15 Jul 2016 16:47:57 -0500	[thread overview]
Message-ID: <20160715214757.GA1706@localhost> (raw)
In-Reply-To: <8520D5D51A55D047800579B094147198258B9376@XAP-PVEXMBX01.xlnx.xilinx.com>

On Fri, Jul 15, 2016 at 08:29:49AM +0000, Bharat Kumar Gogada wrote:
> Hi,
> 
> I observe that memory and IO space are enabled by BIOS in x86.
> 
> In ARM64 we need to call pci_enable_device form End Point to enable these resources.
> 
> Why the resource enablement is different in x86 and ARM64 ?

A portable driver should call pci_enable_device() if it needs access
to any BARs.  As you've observed, the command register enable bits may
be set differently on different architectures, and the PCI core
doesn't set them automatically for you, so the driver can't rely on
their initial settings.

One reason why Linux doesn't enable them automatically before calling
the driver's probe method is that it may not be possible to allocate
space for all the BARs (e.g., if the platform doesn't support I/O port
space, or if we just run out of space), but the driver may be able to
operate the device even without all the BARs.

Bjorn

  parent reply	other threads:[~2016-07-15 21:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  8:29 Memory and IO space Enabling different in x86 and ARM64 Bharat Kumar Gogada
2016-07-15  8:33 ` Arnd Bergmann
2016-07-16  3:22   ` Bharat Kumar Gogada
2016-07-15 21:47 ` Bjorn Helgaas [this message]
2016-07-16  3:25   ` Bharat Kumar Gogada

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=20160715214757.GA1706@localhost \
    --to=helgaas@kernel.org \
    --cc=Liviu.Dudau@arm.com \
    --cc=arnd@arndb.de \
    --cc=bharat.kumar.gogada@xilinx.com \
    --cc=bhelgaas@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=nofooter@xilinx.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).