Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1410171pxb; Thu, 21 Oct 2021 23:48:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKJBOqswmxqyVakGEZC05AMxq8I7FHjUJ3L9qf8ll6zgF4yfoM1SKX0fxqiPuZww9QGFnq X-Received: by 2002:a17:90b:251:: with SMTP id fz17mr12179760pjb.52.1634885290230; Thu, 21 Oct 2021 23:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634885290; cv=none; d=google.com; s=arc-20160816; b=pmCdsG9UHx68MznCKcxQempfLJhpCsI03N6oeTbqzqkX/Mi/3rYk/WQ0QOHgzyKZmP oX9ppCkEik6Vy62DuPc6xZXHC9qbQpJNuEAfrocOVklQorPP+h8R9HzbCjrveCPAJP5X mjxHJzfHN8JiGGeXWWvvyTp2sRNBhCs+gvVnDwKTmsWa+UKszMOCEHgAnlX+X0eyZ+MP Sm8nyboyInKnTyJz6aWAOD5Gwq1zt4HsMO0x7Y4bja7LUY357qJoUHBy0x8ojzc+lqMb Gl65KLJHtY6th1L0DV1THeCHzkCPgs8+/NTcPF/0mYK/4LMBCEEWmhpca5fZ0KcBgiR6 rcMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/b17XGVMpVgdhBBtNonwGuzt0Nd/oeX0QBPk8eD6odk=; b=cD0Luqbv41IN/b5sdDUbSm8BomjP5O51/R4mdc/BL2xerjZ+trS5lOHdLgQOJYRg8g BWqidUpfZ4mg8vNuTvYOKtnu/k3sxfDWmYHClAIigcS9qJWqh1zb4ygiW/p6CTi6Qqxe QpX9Q3WIRCFRocjj6aGmbcnXkq3SAj4aCsaSQuZdEZXvhp641FpzHSVFLKIO2XjZOJg0 PsZohYQbuvFFbMUb7/7A+7dy9jbosmk4rj64MFOY+ii/gFfyphEaAiy6pTYVgC5tuvEt 756pvnuceOLtPfTcQNERgV/Kb96GVlawsOCdXS0CpN7NERI7svl1qHIgk/XQVI27rHSH 7kpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jq3iY2JK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si10535619pgm.281.2021.10.21.23.47.57; Thu, 21 Oct 2021 23:48:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jq3iY2JK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231773AbhJVGtT (ORCPT + 99 others); Fri, 22 Oct 2021 02:49:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:57752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbhJVGtS (ORCPT ); Fri, 22 Oct 2021 02:49:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 488E560F50; Fri, 22 Oct 2021 06:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634885221; bh=+Fkp4XMTW4DD+TiuV8fRU7EzH5a/UJyx5ELdTnoO+vk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jq3iY2JKlAX0xOntAT8OGpltqeTISuwgz9HM/ViUZxGGBAkGBpWCFtN5QwmUL3Klh pfe6nt3IzzL8gQpJixVJyghPQe8Xb47mIFZpYdwC2qrrFLVuf669y7dnCCFN8AgvoV 4nSyjbrHqJTYIHyauyIpVbelASHdZvypS4/QAP5A= Date: Fri, 22 Oct 2021 08:46:56 +0200 From: Greg Kroah-Hartman To: Zev Weiss Cc: Frank Rowand , Rob Herring , openbmc@lists.ozlabs.org, Jeremy Kerr , Joel Stanley , Andrew Jeffery , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Dave Jiang , Vinod Koul , Kirti Wankhede , Alex Williamson , Cornelia Huck , Saravana Kannan , Konrad Rzeszutek Wilk , Thomas Gleixner , Bhaskar Chowdhury , Jianxiong Gao , Mauro Carvalho Chehab , Rajat Jain , Andy Shevchenko , dmaengine@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH 4/5] driver core: inhibit automatic driver binding on reserved devices Message-ID: References: <20211022020032.26980-1-zev@bewilderbeest.net> <20211022020032.26980-5-zev@bewilderbeest.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211022020032.26980-5-zev@bewilderbeest.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 21, 2021 at 07:00:31PM -0700, Zev Weiss wrote: > Devices whose fwnodes are marked as reserved are instantiated, but > will not have a driver bound to them unless userspace explicitly > requests it by writing to a 'bind' sysfs file. This is to enable > devices that may require special (userspace-mediated) preparation > before a driver can safely probe them. > > Signed-off-by: Zev Weiss > --- > drivers/base/bus.c | 2 +- > drivers/base/dd.c | 13 ++++++++----- > drivers/dma/idxd/compat.c | 3 +-- > drivers/vfio/mdev/mdev_core.c | 2 +- > include/linux/device.h | 14 +++++++++++++- > 5 files changed, 24 insertions(+), 10 deletions(-) Ugh, no, I don't really want to add yet-another-state to the driver core like this. Why are these devices even in the kernel with a driver that wants to bind to them registered if the driver somehow should NOT be bound to it? Shouldn't all of that logic be in the crazy driver itself as that is a very rare and odd thing to do that the driver core should not care about at all. And why does a device need userspace interaction at all? Again, why would the driver not know about this and handle it all directly? thanks, greg k-h