From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753109AbcC2MpY (ORCPT ); Tue, 29 Mar 2016 08:45:24 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:50233 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbcC2MpV convert rfc822-to-8bit (ORCPT ); Tue, 29 Mar 2016 08:45:21 -0400 From: Arnd Bergmann To: okaya@codeaurora.org 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 , vikrams@codeaurora.org, marc.zyngier@arm.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vinod.koul@intel.com, Alex Williamson , agross@codeaurora.org, Dan Carpenter , shankerd@codeaurora.org Subject: Re: [PATCH V3 1/3] vfio, platform: add support for ACPI while detecting the reset driver Date: Tue, 29 Mar 2016 14:44:20 +0200 Message-ID: <4981390.J9tsJr16lM@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <8f766d081b33d91f196e7bd5e13b6f33@codeaurora.org> References: <1459172124-6730-1-git-send-email-okaya@codeaurora.org> <147496989.L43SVC7xRY@wuerfel> <8f766d081b33d91f196e7bd5e13b6f33@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" X-Provags-ID: V03:K0:3CH5zo3itEWqfz2xfVFJmHbSLxFJVu4MLpHHrn5oklGEfNGkMlA PeUxyinozYzWe8X/pPQN+Qu31F3QT40G6LTk8v8EM+XjcZNglMJp0BBb5TFjewflIsC3bhO 7Dpohd0vAPbuRPSU98lQiuDRqGW5s1nvDMtyQ7AQJygUY+mCvvHzi6AbHihs/Q9I8uw8zYJ bn1KtVIkSdrN7xJfBWOTg== X-UI-Out-Filterresults: notjunk:1;V01:K0:kG673cvvnnk=:Fgze1v3GuYS0IK3otrv5RD swdizclV18x9l8vBqpRt3K1AUWxYCPuTc9isqytUNQZfYNmt21aZhhd/G4+FWS6xhWznhCPS0 /rGWch1ZxjIkh+TAgcCL6WhQHrXlPbgS0ufod1BhcSG3kORygbKeWsJovOYqgrAd+5SrvzVm6 HDvTbvqDdA+dppEalCf4kgYxdzOTWwuKpYHb0dVRm13AvMua4Co2NXeZqO38apXO0cEt/vDUm jqYzyZbYvRJBSp2SPqfYLBU1runaCxShfN21RxOQ/kt55wgSDiB8khCXjg3b54IyKQ6Zvb2nO kDfQePN+o/vHmz9J6cyQ1v6WWNFRpsZdtb/iDCObibYUsClSSsNIfHorUp5S6F/r3nVGcJyU6 qu3LwtQdGa/sgLnCsr5DOJ/pAetQjmAMqxEeAtU+vzxdcBUcVPfoPiQb0QUEq4xruLdLo7ipB GTUGnToUKOJdjWqg7eFRaOXcE+GVN0aVaHGQXAPXTOMbrBx82h4639gpwIMy+WtnHyDDa40hl UVkPh29SIb21SJTQc8o+hBaY/il9YPCJNDcisV1g7TBQ3JkNtamx7q8hz+vK0bzz1kd5kX0Fa vZf4FiwDhmhu9jN1gCP0NJYFqegUdjZfWjldC/tKKM8Xhb1U56O62HcTKvQfXceNaETN2SPwG uJTOQ88M5QY7n4HrC8Hlqs6q4MekOkUc1Q8JnAI1ClyAmCZE7uxOLqoKXyApRzR7CXnXUCoUs 8u85TzF3n/MTl7M7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 29 March 2016 08:15:42 okaya@codeaurora.org wrote: > >> > > >> > * 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? 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