From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Yinghai Lu <yinghai@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Len Brown <lenb@kernel.org>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Lv Zheng <lv.zheng@intel.com>, Huang Ying <ying.huang@intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>, x86 list <x86@kernel.org>,
Tony Luck <tony.luck@intel.com>,
Matthew Garrett <mjg59@srcf.ucam.org>,
Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH 5/5] ACPI: Add support for platform bus type
Date: Fri, 02 Nov 2012 00:17:37 +0100 [thread overview]
Message-ID: <2690277.s5TEOPtmaZ@vostro.rjw.lan> (raw)
In-Reply-To: <CAE9FiQWiRcaC3dKQFUHoC0qe0TneW2T+CYNZPEic5At_QcP0rw@mail.gmail.com>
On Thursday, November 01, 2012 03:38:19 PM Yinghai Lu wrote:
> On Thu, Nov 1, 2012 at 2:21 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> >> So you are going to replace acpi_device/acpi_driver with
> >> platform_device/platform_driver ?
> >
> > Not exactly. Let me start from the big picture, though. :-)
> >
> > First off, we need to unify the handling of devices by the ACPI subsystem
> > regardless of whether they are on a specific bus, like PCI, or they are
> > busless "platform" devices.
> >
> > Currently, if a device is on a specific bus *and* there is a device node in the
> > ACPI namespace corresponding to it, there will be two objects based on
> > struct device for it eventually, the "physical node", like struct pci_dev, and
> > the "ACPI node" represented by struct acpi_device. They are associated with
> > each other through the code in drivers/acpi/glue.c. In turn, if the device is
> > busless and not discoverable natively, we only create the "ACPI node" struct
> > acpi_device thing for it. Those ACPI nodes are then *sometimes* bind to
> > drivers (represented by struct acpi_driver).
> >
> > The fact that the busless devices are *sometimes* handled by binding drivers
> > directly to struct acpi_device while the other devices are handled through
> > glue.c confuses things substantially and causes problems to happen right now
> > (for example, acpi_driver drivers sometimes attempt to bind to things that have
> > other native drivers and should really be handled by them).
> > Furthermore, the situation will only get worse over time if we don't do
> > anything about that, because we're going to see more and more devices that
> > won't be discoverable natively and will have corresponding nodes in the ACPI
> > namespace and we're going to see more buses whose devices will have such
> > nodes.
> >
> > Moreover, for many of those devices there are native drivers present in
> > the kernel tree already, because they will be based on IP blocks used in
> > the current hardware (for example, we may see ARM-based systems based on
> > exactly the same hardware with ACPI BIOSes and without them). That applies
> > to busless devices as well as to devices on specific buses.
> >
> > Now, the problem is how the unification is going to be done and I honestly
> > don't think we have much *choice* here. Namely, for PCI (and other devices
> > discoverable natively) we pretty much have to do the glue.c thing (or something
> > equivalent), because we need to match what we've discovered natively against
> > the information from the ACPI tables in the BIOS. This means that for busless
> > devices we need to create "physical" nodes as well, so that all of them are
> > handled by drivers binding to the "physical" node rather than to struct
> > acpi_device. This also will allow us to reuse the existing drivers with
> > minimum modifications (well, hopefully).
>
> ok, acpi_driver will be killed at first.
>
> acpi_pci_root_driver will be converted to platform driver or
> add acpi_pci_host_bridge to work with pci_host_bridge.
Yup.
> BTW, the problem for hotadd pci root bus,
> the acpi_driver ops.add can pci root bus and create pci dev before all
> acpi device get
> created still there.
> https://lkml.org/lkml/2012/10/5/569
Yes, I'm aware of that, it's on my todo list FWIW. :-)
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2012-11-01 23:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 9:31 [PATCH 0/5] ACPI-based enumeration of devices that are not discoverable natively Rafael J. Wysocki
2012-10-31 9:33 ` [PATCH 2/5] ACPI: Provide generic functions for matching ACPI device nodes Rafael J. Wysocki
2012-10-31 9:34 ` [PATCH 3/5] ACPI / x86: Export acpi_[un]register_gsi() Rafael J. Wysocki
2012-10-31 9:35 ` [PATCH 4/5] ACPI / ia64: " Rafael J. Wysocki
2012-10-31 9:36 ` [PATCH 5/5] ACPI: Add support for platform bus type Rafael J. Wysocki
2012-11-01 6:34 ` Yinghai Lu
2012-11-01 14:35 ` Rafael J. Wysocki
2012-11-01 16:19 ` Yinghai Lu
2012-11-01 21:21 ` Rafael J. Wysocki
2012-11-01 22:38 ` Yinghai Lu
2012-11-01 23:17 ` Rafael J. Wysocki [this message]
2012-10-31 9:38 ` [PATCH 1/5] driver core / ACPI: Move ACPI support to core device and driver types Rafael J. Wysocki
2012-10-31 16:24 ` Greg Kroah-Hartman
2012-10-31 18:42 ` Rafael J. Wysocki
2012-10-31 18:44 ` H. Peter Anvin
2012-10-31 19:00 ` Rafael J. Wysocki
2012-10-31 20:03 ` Luck, Tony
2012-10-31 20:30 ` Rafael J. Wysocki
2012-10-31 20:33 ` Luck, Tony
2012-10-31 21:06 ` Rafael J. Wysocki
2012-10-31 21:19 ` Mika Westerberg
2012-10-31 21:36 ` Luck, Tony
2012-10-31 21:46 ` Rafael J. Wysocki
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=2690277.s5TEOPtmaZ@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=mathias.nyman@linux.intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mjg59@srcf.ucam.org \
--cc=rui.zhang@intel.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=ying.huang@intel.com \
--cc=yinghai@kernel.org \
/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
all inboxes | Powered by JetHome®