From: okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
cov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Baptiste Reynal
<b.reynal-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>,
vikrams-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
marc.zyngier-5wv7dgnIgG8@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
Alex Williamson
<alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
Dan Carpenter
<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
shankerd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Subject: Re: [PATCH V3 1/3] vfio, platform: add support for ACPI while detecting the reset driver
Date: Tue, 29 Mar 2016 08:15:42 -0400 [thread overview]
Message-ID: <8f766d081b33d91f196e7bd5e13b6f33@codeaurora.org> (raw)
In-Reply-To: <147496989.L43SVC7xRY@wuerfel>
On 2016-03-29 07:25, Arnd Bergmann wrote:
> On Tuesday 29 March 2016 06:59:15 okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org wrote:
>> On 2016-03-29 05:25, Arnd Bergmann wrote:
>> > On Monday 28 March 2016 09:35:22 Sinan Kaya wrote:
>> >> The code is using the compatible DT string to associate a reset driver
>> >> with
>> >> the actual device itself. The compatible string does not exist on ACPI
>> >> based systems. HID is the unique identifier for a device driver
>> >> instead.
>> >> The change allows a driver to register with DT compatible string or
>> >> ACPI
>> >> HID and then match the object with one of these conditions.
>> >>
>> >> Rules for loading the reset driver are as follow:
>> >> - ACPI HID needs match for ACPI systems
>> >> - DT compat needs to match for OF systems
>> >>
>> >> Tested-by: Eric Auger <eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> (device tree only)
>> >> Tested-by: Shanker Donthineni <shankerd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> (ACPI only)
>> >> Signed-off-by: Sinan Kaya <okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
>> >>
>> >
>> >
>> > This really feels wrong for two reasons:
>> >
>> > * device assignment of non-PCI devices is really special and doesn't
>> > seem to make sense on general purpose servers that would be the
>> > target
>> > for ACPI normally
>>
>>
>> Why is it special? Acpi is not equal to pci. Platform devices are
>> first
>> class devices too. Especially, _cls was introduced for this reason.
>
> It still feels like a hack. The normal design for a server is to have
> all internal devices show up on the PCI host bridge, next to the PCIe
> ports, to have a simple way to manage any device, both internal and
> off-chip. Putting a device on random MMIO registers outside of the
> discoverable buses and have the firmware work around the lack of
> discoverability will always be inferior.
>
It is a HW implementation choice. Having everything as pci problem has
been already solved. I would vote for it when we had SW pci bridge layer
just to use usb and sata. Not anymore. Especially, _cls solves this
problem
>> >
>> > * If there is indeed a requirement for ACPI to handle something like
>> > this,
>> > it should be part of the ACPI spec, with a well-defined method of
>> > handling
>> > reset, rather than having to add a device specific hack for each
>> > device separately.
>> >
>>
>> I see. Normally, this is done by calling _rst method. AFAIK, Linux
>> doesn’t support _rst. I can check its presence and call it if it is
>> there.
>
> Yes, that sounds reasonable: In patch 2 where you check for the
> presence of the reset method, just keep the existing logic for
> DT based systems, and use _rst on ACPI based systems instead,
> then you can drop both patches 1 and 3.
>
I can certainly drop patch #3 and push the reset responsibility to acpi.
I never liked having a fragmented sw design across multiple drivers.
I need something for patch #1. Compatible is a DT property not ACPI.but
then, I won't have a reset driver anymore.
If we think about how vfio pci works, we pass the pci vendor and device
id to new_id file to find out which pci device needs to be pass thru.
I can go to a similar route. This time we pass the object id through
new_id and I call reset method on this object.
Let me know what you think?
> Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-29 12:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-28 13:35 [PATCH V3 0/3] vfio, platform: add HIDMA and ACPI support Sinan Kaya
2016-03-28 13:35 ` [PATCH V3 1/3] vfio, platform: add support for ACPI while detecting the reset driver Sinan Kaya
2016-03-29 9:25 ` Arnd Bergmann
2016-03-29 10:59 ` okaya
2016-03-29 11:25 ` Arnd Bergmann
2016-03-29 12:15 ` okaya-sgV2jX0FEOL9JmXXK+q4OQ [this message]
2016-03-29 12:44 ` Arnd Bergmann
2016-05-01 17:55 ` Sinan Kaya
2016-03-28 13:35 ` [PATCH V3 2/3] vfio, platform: make reset driver a requirement by default Sinan Kaya
2016-03-28 13:35 ` [PATCH V3 3/3] vfio, platform: add QTI HIDMA reset driver Sinan Kaya
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=8f766d081b33d91f196e7bd5e13b6f33@codeaurora.org \
--to=okaya-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=b.reynal-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org \
--cc=cov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marc.zyngier-5wv7dgnIgG8@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=shankerd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=vikrams-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).