Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1531168ybh; Mon, 13 Jul 2020 23:39:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/N7y38aCZAx7b5Qgy4tKja5+7VSaiPMcazG+utdfMfBApaNRL8c4pX2kYZI/ohRD3iPIg X-Received: by 2002:a05:6402:1d14:: with SMTP id dg20mr3013648edb.23.1594708782167; Mon, 13 Jul 2020 23:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594708782; cv=none; d=google.com; s=arc-20160816; b=cJcm3oy8o8dqh3xS7wrhkxHVBkuTqiLUHpprlAdoRV/rnFpYf2TaLo80CmzE253aWW Brv5sF1SH845VHvJoPRbuWQnwi1Ji0NWvXpASccD6t68qsLx+eSPD3CdWcjTlJ8UXE9L VBSI1xaEDXroG4Zz3JaIi0nzhmJjxrStQXSJoKxN2kjTJpPndfMuliS95kHqQjHoJrz2 OK7VaZDyAT8/3ZBy4XS6pxPmYi9k4iwgkqrG+1CfZTZ5RsKt7o0SNzg47N/PNIiimk7u p6oQt0lb+bcwI3r2IpeQVulRa2q/3mbULfEtVVP/cnEWpEv6qfYfRCR5cQbFZSp/gn0L rT2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=237c4j4uaYDSko7T3RTquTq5KbV4VW0SAzFQf0H2fFI=; b=H/sSAQmxl8+qLcIeBcNh05oSEoRiTEq7Fr1yFfU6QHvZImQXXYo4hfOTVALl4nNjgx ar3a9pjWO5pqnf66+zjm51lcMpg3LFB121rL8fJiHW/LZmleCc0qLQ1rK8DllJ9vrcoY q+52jo0vYlh5+s6LdHgHlvyq/k7wUCmhxXFz9QZ8G/0HR0eII32ZgZmBdOrkfXxZXDYI Ycp6mauf1AYkGOt1g33x8C6/FW2Uhf5Cf86eVuvvDIL3D54qFal1EQ/hURJzz13b/LUp NxqCXmWgURkwa6fWL9UZq2XymZUjPii4RmAqwIuQ/ULxH5sLmZma5JFzg+KuHpz4hXfZ 51Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GFtmIWo2; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si5866353ejd.290.2020.07.13.23.39.19; Mon, 13 Jul 2020 23:39:42 -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=@kernel.org header.s=default header.b=GFtmIWo2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726061AbgGNGiW (ORCPT + 99 others); Tue, 14 Jul 2020 02:38:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:37330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbgGNGiW (ORCPT ); Tue, 14 Jul 2020 02:38:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4FF61221F0; Tue, 14 Jul 2020 06:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594708701; bh=jmaTVF/e7rbplwCo+mrwHwjt9sE4SIcnDxlAELMKzbo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GFtmIWo2yDIrJbkBAGZqQsHEhr0AH89WYCQyzf4LeeXCiOGd6U2V6jDz7YMdZaHlW Z7S9V4WAq9dnReIVEPltwp4ORYwb40wl5IyjC3QXtiiCgDboDwMUlyu2cYZL9zP2w5 wu6Ol6Ihqn3CTOPbOWq2XFknbDsaXqjs2JFr/uFQ= Date: Tue, 14 Jul 2020 08:38:20 +0200 From: Greg Kroah-Hartman To: Daniel Gutson Cc: Arnd Bergmann , Derek Kiernan , Mauro Carvalho Chehab , "linux-kernel@vger.kernel.org" , Richard Hughes , Alex Bazhaniuk Subject: Re: [PATCH] SPI LPC information kernel module Message-ID: <20200714063820.GD662760@kroah.com> References: <20200629225932.5036-1-daniel.gutson@eclypsium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 13, 2020 at 07:24:11PM -0300, Daniel Gutson wrote: > On Mon, Jul 6, 2020 at 6:54 AM Arnd Bergmann wrote: > > > On Mon, Jul 6, 2020 at 11:20 AM Arnd Bergmann wrote: > > > > > > > Because of these reasons, I'm proposing a misc (not-device) driver > > that supports > > > > many Intel architectures (and families) to expose the information. > > > > I understand your proposal to first enhance existing _device_ drivers, > > but I > > > > couldn't find suitable options. > > > > > > Maybe try adding an interface to one of the drivers at first, and then > > extend > > > it to the other hardware after an initial code review. Do not bypass the > > driver > > > model or try to do everything at once with a single module that knows > > > details of multiple unrelated hardware implementations. > > > > To clarify further how I think you can have a chance of getting the > > interface you want, here's a step-by-step list: > > > > 1. keep the current securityfs interface (or any other user space > > ABI if you have already changed it), but put it into a separate loadable > > module > > > If it is a loadable module, how can I ensure that it was loaded before the > intel-spi driver, so the latter can call > the API of the former? What if the driver was not loaded, when the > intel-spi driver will try to call > your suggested spi_lpc_register_info? In other words, how can I prevent to > call functions from an unloaded driver? THe symbol will not be resolved so the module will not be able to be loaded in the first place, OR your module will be loaded first by the system to prevent that. > Do I just add the dependency in the Kconfig? But if so, what about the > order of initialization? > A hint please? Try it and see what happens, it should all "just work" :) thanks, greg k-h