From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756872AbcC2K7V (ORCPT ); Tue, 29 Mar 2016 06:59:21 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42680 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756736AbcC2K7S (ORCPT ); Tue, 29 Mar 2016 06:59:18 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 29 Mar 2016 06:59:15 -0400 From: okaya@codeaurora.org To: Arnd Bergmann 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 In-Reply-To: <98854818.NJS35fvhsb@wuerfel> References: <1459172124-6730-1-git-send-email-okaya@codeaurora.org> <1459172124-6730-2-git-send-email-okaya@codeaurora.org> <98854818.NJS35fvhsb@wuerfel> Message-ID: User-Agent: Roundcube Webmail/1.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 (device tree only) >> Tested-by: Shanker Donthineni (ACPI only) >> Signed-off-by: Sinan Kaya >> > > > 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. > > * 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. > Arnd