From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9526606A32C for ; Thu, 3 Dec 2026 15:52:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=aCKjYZeT; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=hEptfu52 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=QKXwrMpxTmKi4UsETPAlmte3VVY63igVIDjs0nISI4U=; b=aCKjYZeT5FubDmyPXazKZmGBko MEUJ6TWbCMeeZ0l5tM6LA/CbkuCMBmtBiWu3VgxcG5yGNZT/tuKznGdhPCx5gar9GocRh7+fJ1iOU FexyEtZPXcCh/WqMXYEzK+zd/1wFAGXGUrCNmwuHEa/+oYXGbTmKh3HvCjIuw/OnhPEkaKomjLFGC +V7jbtsKwL/m4k0yql+ctciyFB/LOABoZbTfmM6jgIN/jXuwMEZ0+Z+80EgebT7GkupSc4u5ly9kN KNAWanSmDI9W/sYrFSALpfujKgAq5JyggR90+rd4fpoEV1n7ROdNf9vUoeW93g/2EB4UcAXP9aPw6 MWmaipDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ96Q-0000000FCXv-0auI; Thu, 03 Dec 2026 15:52:10 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ96N-0000000FCXU-1d6f for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 15:52:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8D4D61477; Thu, 3 Dec 2026 07:52:03 -0800 (PST) Received: from e129823.arm.com (e129823.arm.com [10.2.213.3]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CCECA3F7D8; Thu, 3 Dec 2026 07:52:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796313126; bh=T+Osb4PJ8hMuSQmdhkI8Bu6ip3hQWRucRgsUb+Wukso=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hEptfu52mbvd50mBwiQYnW5JgdwupsacEp/2ZdLlTONHEm8lUEe0LG/XH2G4xWa6Y ILbi/gbjhaHWOVuq58ZHMJ1d7jwOpPS0+CtwQXg895/7xjhKOEFcR4chbnOF7bmZkT FTnRQTUIBhLuZ/XHMEYCCIcQA8Mmj5EFxHxY4f1k= Date: Thu, 3 Dec 2026 15:52:00 +0000 From: Yeoreum Yun To: Jason Gunthorpe Cc: Jonathan Cameron , Yeoreum Yun , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lorenzo Pieralisi , Catalin Marinas , Suzuki Poulose , Steven Price , Sami Mujawar , "Aneesh Kumar K.V" , Jiri Pirko , GONG Ruiqi , Mark Brown Subject: Re: [PATCH RFC v2 2/6] firmware: arm_firme: introduce arm_firme Message-ID: References: <20261127-firme_interface-v2-0-ab88b2d0b4e0@arm.com> <20261127-firme_interface-v2-2-ab88b2d0b4e0@arm.com> <20261202164941.0000329b@oss.qualcomm.com> <20261203154415.GD1074888@ziepe.ca> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261203154415.GD1074888@ziepe.ca> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_075207_471073_0BF670C3 X-CRM114-Status: GOOD ( 16.44 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Thu, Dec 03, 2026 at 11:44:15AM -0400, Jason Gunthorpe wrote: > On Wed, Dec 02, 2026 at 04:49:41PM -0800, Jonathan Cameron wrote: > > > +config ARM_FIRME > > > + bool "Arm Firmware Interfaces for Realm Management Extension (FIRME)" > > > + depends on ARM64 && HAVE_ARM_SMCCC_DISCOVERY > > > + default n > > > > Unless something else is forcing things, everything is default n so don't > > specify it. > > It is a helper "library" it should be a hidden kconfig selected by the > actual FIRME using subsystem drivers, like attestation and TSM. Yeap. I'll remove this. > > > Use the enum you have so we match them up directly > > [FIRME_ATTEST_SERVICE_ID] = { .dev_name = "arm-firme-attest" }, > > +1 Done. > > > > +/* > > > + * FIRME version encoding > > > + */ > > > +#define FIRME_MAJOR_VERSION_MASK GENMASK(30, 16) > > > +#define FIRME_MINOR_VERSION_MASK GENMASK(15, 0) > > > +#define FIRME_MAJOR_VERSION(x) ((u16)(FIELD_GET(FIRME_MAJOR_VERSION_MASK, (x)))) > > > +#define FIRME_MINOR_VERSION(x) ((u16)(FIELD_GET(FIRME_MINOR_VERSION_MASK, (x)))) > > > +#define FIRME_PACK_VERSION_INFO(major, minor) \ > > > + (FIELD_PREP(FIRME_MAJOR_VERSION_MASK, (major)) | \ > > > + FIELD_PREP(FIRME_MINOR_VERSION_MASK, (minor))) > > > > I'd just use FIELD_PREP / FIELD_GET inline. These sorts of macros > > often just obscure things. Only introduce them if they save a lot of code. > > +1 > > And if you do want further wrappers use a static inline function. Okay. might this FIRME_PACK_VERSION_INFO, wouldn't be used currently. So in this round, I'll remove it. Thanks! -- Sincerely, Yeoreum Yun