Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1398424imm; Wed, 8 Aug 2018 16:43:43 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzSwG/0jSqB/rcshjUOiOPeYt2GTMYgCypYUY+mIFsRl/rG4jBQCuhLrfIykCWfF18ajwM+ X-Received: by 2002:a63:f002:: with SMTP id k2-v6mr4284371pgh.8.1533771823036; Wed, 08 Aug 2018 16:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533771823; cv=none; d=google.com; s=arc-20160816; b=rt298L2TOGsWFC5+ariGRCLwevWSFph8qnF7URJeXM/VRLZUcoLrx7JnRFf95GC1W7 FpmrmOb4JITcFt1B9OV7D5vOV0BpPuUxMA/qcjGE5Fhbcg7YR6VUIYB0C+92JGJer/QG I4z+IDwvOeQCpsHBncGHfHHMtltOmrhfAlTVRu46kD1kcfRt6I6NRscPQ8qvND56it6U ICd2QiqDCKxYJFhCmrBU2PMkrpGITrnrWex07pEMHs6kF3dctCHrSNzHttga4gr5coXt aCUb6musZHFkmJZI3IUXkky3iPEcnI6l772naV3FRcZoqCX4374itq9nrA+IGbB1ZHIo toFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=eLmQcjIvTXsjHLXqUOUF2WfoHuZw4r7CxLWZDyJjpkI=; b=aDaE/n78yEHj9RVXglvpaVT/sHzNKsL7qkq5e6y4Yn3sOFSHRJYPkG2ZI7daNKIbDO ltcoK+LyX9Tretik+4eWkFzPIh0u6PiElJv5zDP8J+hi8dUzkqr75SFVGKR1YVIpjDSD Q+saDpe99dNOtWSX+mCsfUOSucav3crWG07ASaxcXShLFDeB/cWkJmN4AB7/BEtZqjTc yEt/TbvH/I6/945/2nnJu4Ee8510jpZ9YogRVM3sIfd67DOLj8iNz4Q1fiZfiJtoxwr6 4xnd78iwLkW6LLJoKPkwP0oyG5Cv9fA1mZy8LAm5sc4iIe18QqP/tIBajn9eCGTWJf67 n9NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aQCAFTZr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5-v6si4178255plo.380.2018.08.08.16.43.26; Wed, 08 Aug 2018 16:43:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aQCAFTZr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731179AbeHICE3 (ORCPT + 99 others); Wed, 8 Aug 2018 22:04:29 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43578 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729884AbeHICE3 (ORCPT ); Wed, 8 Aug 2018 22:04:29 -0400 Received: by mail-pg1-f194.google.com with SMTP id a14-v6so1805568pgv.10 for ; Wed, 08 Aug 2018 16:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date; bh=eLmQcjIvTXsjHLXqUOUF2WfoHuZw4r7CxLWZDyJjpkI=; b=aQCAFTZr6UT1RVRldreQnn+Rkxhe/4ztfkNgHNni6oYDL9xpRSAHl3Aw5XpGQHgCYH L4DMc0E3vtHV3yzAW56uaBZXx78a2kbzXXbfzpJAcoeMJoZ0tXnXDS/6TqkRHV8kNIZJ w91/Js2Qzp2wDLBRoOGhmrTXwygeLMgjUUg0s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:to:from :in-reply-to:cc:references:message-id:user-agent:subject:date; bh=eLmQcjIvTXsjHLXqUOUF2WfoHuZw4r7CxLWZDyJjpkI=; b=p4L7n7zCBjXu4NYLBwao87IbgH0iw/UP4XQlchn332oKlfBCEVTImKiwuW0aYXOrLz ehFoUcpOW0APEc5Hy5R3iHO83Gb7UEPokt36JFblyL/sF4zMiqXVG3Qg/EkiCyNnFWqS IXc8V+DtT4Gz+iEunf+PjI1kK7p0B8MgV+5/9zkVYHDAKCGU3VwX5HU90R/zmFsR8oTI gOVhMSMgAHaCb5A7M91gmllXPPQK9//5llGTu7+j7DNSC9z+DMMrvMLJg99ygzeCfLqe xGvLtyql30W16Yqb0xmzlNplXUByCAk7Ts6yLc7pj2VFxavYoQb6oPqlnUzVWGWDWlUv HytA== X-Gm-Message-State: AOUpUlGFJsfcw9mwumxNFiwNp+SKvqWwD+/IZgpHKYL47u77fzCYhdHY B7dLTw0WdVX8x2McDxjh8wNnJA== X-Received: by 2002:a62:64d0:: with SMTP id y199-v6mr5027274pfb.255.1533771751039; Wed, 08 Aug 2018 16:42:31 -0700 (PDT) Received: from localhost ([2620:15c:202:201:7e28:b9f3:6afc:5326]) by smtp.gmail.com with ESMTPSA id a81-v6sm10112038pfa.152.2018.08.08.16.42.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Aug 2018 16:42:30 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Julius Werner From: Stephen Boyd In-Reply-To: Cc: Greg Kroah-Hartman , LKML , Wei-Ning Huang , Julius Werner , Brian Norris , samuel@sholland.org, Sudeep.Holla@arm.com References: <20180808172414.29983-1-swboyd@chromium.org> <20180808172414.29983-3-swboyd@chromium.org> Message-ID: <153377174946.220756.11492509142148153962@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v2 2/2] firmware: coreboot: Collapse platform drivers into bus core Date: Wed, 08 Aug 2018 16:42:29 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Julius Werner (2018-08-08 12:07:30) > > +config GOOGLE_COREBOOT_TABLE_ACPI > > + tristate > > + default GOOGLE_COREBOOT_TABLE > = > I don't think this helps in upgrading (as your commit message says) > unless you also keep the 'select GOOGLE_COREBOOT_TABLE' here, right? Oh yes should be select, not default. > = > > -int coreboot_table_init(struct device *dev, void __iomem *ptr) > > +static int coreboot_table_init(struct device *dev, void __iomem *ptr) > = > nit: There's little reason to keep coreboot_table_init() a separate > function now. Could maybe compact the code a little more if you merge > it into probe()? (Also could then do the signature sanity check before > trusting the length values to map the whole thing, which is probably a > good idea.) Sure. I can make another patch for squashing that all together. > = > > if (ptr_header) { > > bus_unregister(&coreboot_bus_type); > > iounmap(ptr_header); > = > Could ptr_header be handled by devm now, somehow? Yes. It hasn't been devmified yet because that would be more things in one big patch. This is quickly blowing up! > Also, don't you have > two bus_unregister() now (here and in coreboot_exit())? Or is that > intentional? That's nice. I didn't notice that module_init() was registering the bus and then platform drivers could remove the bus later with the driver unbind. I'll move them both into the driver bind/unbind path, in another patch. > = > > +static struct platform_driver coreboot_table_driver =3D { > > + .probe =3D coreboot_table_probe, > > + .remove =3D coreboot_table_remove, > > + .driver =3D { > > + .name =3D "coreboot_table", > > + .acpi_match_table =3D ACPI_PTR(cros_coreboot_acpi_match= ), > > + .of_match_table =3D of_match_ptr(coreboot_of_match), > = > Who takes precedence if they both exist? Will we have two > coreboot_table busses? (That would probably not be so good...) I'm not aware of a system that has both ACPI and devicetree, so this isn't a problem.