All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@codeaurora.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
	timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com,
	eric.auger@linaro.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org,
	Baptiste Reynal <b.reynal@virtualopensystems.com>,
	vikrams@codeaurora.org, marc.zyngier@arm.com,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	vinod.koul@intel.com,
	Alex Williamson <alex.williamson@redhat.com>,
	agross@codeaurora.org, Dan Carpenter <dan.carpenter@oracle.com>,
	shankerd@codeaurora.org
Subject: Re: [PATCH V3 1/3] vfio, platform: add support for ACPI while detecting the reset driver
Date: Sun, 1 May 2016 13:55:43 -0400	[thread overview]
Message-ID: <5726431F.7070106@codeaurora.org> (raw)
In-Reply-To: <4981390.J9tsJr16lM@wuerfel>

On 3/29/2016 8:44 AM, Arnd Bergmann wrote:
>>  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?
> It would certainly be nice to make it work more like PCI VFIO does
> here, where you can assign any device as long as it has an IOMMU
> (and a _rst method in this case).
> 
> 	Arnd

I looked at the code today. This doesn't have to be as convoluted as PCI is. 
The VFIO platform driver already has a pointer to the actual object in
vdev->pdev.dev.

This is really as simple as calling _RST method on the passed oject at the last
step below. We don't need to create a dynamic list like PCI does. 

This is how the driver gets called. 

echo vfio-platform | tee -a /sys/bus/platform/devices/QCOM8061:00/driver_override
echo QCOM8061:00 | tee -a  /sys/bus/platform/devices/QCOM8061:00/driver/unbind
echo QCOM8061:00 |tee -a /sys/bus/platform/drivers_probe

I'll post a patch as soon as I test it.

-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: okaya@codeaurora.org (Sinan Kaya)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 1/3] vfio, platform: add support for ACPI while detecting the reset driver
Date: Sun, 1 May 2016 13:55:43 -0400	[thread overview]
Message-ID: <5726431F.7070106@codeaurora.org> (raw)
In-Reply-To: <4981390.J9tsJr16lM@wuerfel>

On 3/29/2016 8:44 AM, Arnd Bergmann wrote:
>>  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?
> It would certainly be nice to make it work more like PCI VFIO does
> here, where you can assign any device as long as it has an IOMMU
> (and a _rst method in this case).
> 
> 	Arnd

I looked at the code today. This doesn't have to be as convoluted as PCI is. 
The VFIO platform driver already has a pointer to the actual object in
vdev->pdev.dev.

This is really as simple as calling _RST method on the passed oject at the last
step below. We don't need to create a dynamic list like PCI does. 

This is how the driver gets called. 

echo vfio-platform | tee -a /sys/bus/platform/devices/QCOM8061:00/driver_override
echo QCOM8061:00 | tee -a  /sys/bus/platform/devices/QCOM8061:00/driver/unbind
echo QCOM8061:00 |tee -a /sys/bus/platform/drivers_probe

I'll post a patch as soon as I test it.

-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

  reply	other threads:[~2016-05-01 17:55 UTC|newest]

Thread overview: 21+ 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 ` 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-28 13:35   ` Sinan Kaya
2016-03-29  9:25   ` Arnd Bergmann
2016-03-29  9:25     ` Arnd Bergmann
2016-03-29 10:59     ` okaya
2016-03-29 10:59       ` okaya at codeaurora.org
2016-03-29 11:25       ` Arnd Bergmann
2016-03-29 11:25         ` Arnd Bergmann
2016-03-29 12:15         ` okaya-sgV2jX0FEOL9JmXXK+q4OQ
2016-03-29 12:15           ` okaya
2016-03-29 12:15           ` okaya at codeaurora.org
2016-03-29 12:44           ` Arnd Bergmann
2016-03-29 12:44             ` Arnd Bergmann
2016-05-01 17:55             ` Sinan Kaya [this message]
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   ` Sinan Kaya
2016-03-28 13:35 ` [PATCH V3 3/3] vfio, platform: add QTI HIDMA reset driver Sinan Kaya
2016-03-28 13:35   ` 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=5726431F.7070106@codeaurora.org \
    --to=okaya@codeaurora.org \
    --cc=agross@codeaurora.org \
    --cc=alex.williamson@redhat.com \
    --cc=arnd@arndb.de \
    --cc=b.reynal@virtualopensystems.com \
    --cc=cov@codeaurora.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eric.auger@linaro.org \
    --cc=jcm@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=shankerd@codeaurora.org \
    --cc=timur@codeaurora.org \
    --cc=vikrams@codeaurora.org \
    --cc=vinod.koul@intel.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.