Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp778189rwb; Tue, 4 Oct 2022 10:27:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7JK35qsBxVLNe01W+UK68K7zru5Nlp2XY9cr0rKEMYUJP96knUAeq2BuRccsjerZ1MsySD X-Received: by 2002:aa7:838a:0:b0:550:5e4a:ab55 with SMTP id u10-20020aa7838a000000b005505e4aab55mr29041185pfm.10.1664904470183; Tue, 04 Oct 2022 10:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664904470; cv=none; d=google.com; s=arc-20160816; b=Muc9k2WWRciWgP86OBWTfPfguwmylHA3JrfGoj3mY1X+Dsj0/kxaYorOUotCG4k6Bd hfdfDjG8qayeDHbzNH3ynSO3O6XYA12UC6FgsNb56K3E4OxPxk7mJxhtJDQGLuO9sA7u 7cAsE9+GG7mX7FwLwzhm39960ShKf90QI4O9+YLFCZlbx5oUCFZ/jgkvySamJJIoW0Pk maMt4lhJkRulKLIVKAK02PGVyExTnnt/eebnZuPfdelBL/Jcso2KqGW1uJQuUPqXm7Mc uJNcsAY7XZupZQjZ8uhpR5xnXSp01N17qEZIiG7wkylqrXDBgQFrfPF6vAekfSYlHEhU bzbw== 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=xYocWPQrNbWx+7gY+AMKwaYO3vK65k+DGS6yLXb6hVw=; b=DumapdiGJRDXz3VZoKso8Mx1zgGKC8Hc8U5/qs7U27G+8U5vVhRSXDaHWhPuLJp3ES NprlgPDbvziDipvJYPvKbJ1zn/efxDxvlGv2ahmYjYF7xElYqOIIu2jtxdTDcKAcBNCQ 10tEBQ2vAodoxVYT0/Khc2pr8M5vXQopexyB/SsAO1vID9VAEKDQiLXpcmwmiVICcqxc ewEZKCi+JTmBin/sy162/bzF/Nv3kiBzN1JxI9TqCIZ6bHwiMrcjsuc2gzqpvkzDYUtR pJeEj81WETMOAOyxFoGghgahSZzVN4QkRJln3nBtOP/dJ5zkRGnmoIqGxssniT6wSToB XlNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I3ufTjFh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a170903230600b0017e20ec5490si10455337plh.301.2022.10.04.10.27.35; Tue, 04 Oct 2022 10:27:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I3ufTjFh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229702AbiJDR00 (ORCPT + 99 others); Tue, 4 Oct 2022 13:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbiJDR0X (ORCPT ); Tue, 4 Oct 2022 13:26:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CA9D53D33 for ; Tue, 4 Oct 2022 10:26:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E1175614E3 for ; Tue, 4 Oct 2022 17:26:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF7EAC433D7; Tue, 4 Oct 2022 17:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664904382; bh=b4vDS1cfOtzBJ1Onjersmj68vUlXcU0XfHH6VT+SKdk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I3ufTjFh2GqLgdYsBrRDyAEVvPXs8aQZ3TDl1fxUuzT9aQhJkBLplwrVjDKmPyecw CRrviPdcL84KqXn8ZEAlVwqytCjxnP/2q6RueWCglPgAMe94jMdKx8HGigAQYde478 SROeBnASkgIkapRokop4nmdAa3HlMsfd6fpPZN/4= Date: Tue, 4 Oct 2022 19:26:19 +0200 From: Greg KH To: Jack Rosenthal Cc: linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev, Stephen Boyd , Tzung-Bi Shih , Guenter Roeck , Julius Werner Subject: Re: [PATCH v12] firmware: google: Implement cbmem in sysfs driver Message-ID: References: <20221004003811.4075765-1-jrosenth@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 04, 2022 at 10:56:58AM -0600, Jack Rosenthal wrote: > On 2022-10-04 at 10:51 +0200, Greg KH wrote: > > > + A list of ids known to Coreboot can be found in the coreboot > > > + source tree at > > > + ``src/commonlib/bsd/include/commonlib/bsd/cbmem_id.h``. > > > > That will not age well, why not point to the reference in the kernel > > tree instead? > > There is no copy in the kernel tree. Then how does the kernel know what to print out? Why not add such a reference somewhere? > > > config GOOGLE_COREBOOT_TABLE > > > tristate "Coreboot Table Access" > > > depends on HAS_IOMEM && (ACPI || OF) > > > diff --git a/drivers/firmware/google/Makefile b/drivers/firmware/google/Makefile > > > index d17caded5d88..8151e323cc43 100644 > > > --- a/drivers/firmware/google/Makefile > > > +++ b/drivers/firmware/google/Makefile > > > @@ -7,5 +7,8 @@ obj-$(CONFIG_GOOGLE_MEMCONSOLE) += memconsole.o > > > obj-$(CONFIG_GOOGLE_MEMCONSOLE_COREBOOT) += memconsole-coreboot.o > > > obj-$(CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY) += memconsole-x86-legacy.o > > > > > > +# Must come after coreboot_table.o, as this driver depends on that bus type. > > > > Doesn't the linker handle this for us? > > Not in the case of compiling as a built-in module: I observed in this > scenario the order in the Makefile deterimined the module initialization > order, and, if this were to be listed alphabetically, the coreboot_table > module would not have been loaded before the cbmem module. So is this a runtime dependancy or a symbol/link dependancy? link one is easy, we always go off of the Makefile order, and if you move it and it breaks, well obviously move it back. If it's a runtime order, then how will you handle one being a module and the other not? thanks, greg k-h