From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D09C3B810D for ; Tue, 12 May 2026 14:36:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778596607; cv=none; b=HTf+3Ii33Ed4w59GBdBDi54Z8hODWBO6gq1XD+KqWO1iAFlRc5GFwDDLkdgWeypDQL80LaXiUBrV3SLJ3iaLu4s8nDJLNuk7hIufegywhWheDRp80kk8ATBtBUnSsPmgOIOoZ6nsJLAKkR7JbQqcqOK9RQd14OAWNut03fqJIb8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778596607; c=relaxed/simple; bh=QmAgh1IVWGWULMF4dhinH/gWH7u1s9tJt0lMBXUirdE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EejYi40KQbYnYbBP7E3a3XJ+0iWOYleZ05yoaTgmTqEONv++7VpdzHz2OvaAp6b7huAoUnxxY9OxIG1U5BefxvRHhVBGhJnIU+2o5DBE2QYKXxw1RUrAjtDxdWvWnp4FDb9TmlI+6sFP0ZLtxzXObr/pF08MgaskhEPnr+4KUjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=iIV0RW8X; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="iIV0RW8X" 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 5FC011688; Tue, 12 May 2026 07:36:40 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14EF23F836; Tue, 12 May 2026 07:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1778596605; bh=QmAgh1IVWGWULMF4dhinH/gWH7u1s9tJt0lMBXUirdE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iIV0RW8XFFjNZCmZBbL/boBzDWtytxxxKsMf4ztunC9xu6qfdu9CFUHRgVpF5MpF+ H7tTpU9mf3YNQYxS3u8iEGh5hniSY1MtbOMNCSfX1dV3UYTEQiCF75CSTLkNtCA3s+ z+WBspdt419dmI7HQryUBdB13IGo2dMzsfrC4PEs= Date: Tue, 12 May 2026 15:36:39 +0100 From: Catalin Marinas To: "Aneesh Kumar K.V (Arm)" Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Greg KH , Jeremy Linton , Jonathan Cameron , Lorenzo Pieralisi , Mark Rutland , Sudeep Holla , Will Deacon , Suzuki K Poulose Subject: Re: [PATCH v4 1/2] firmware: smccc: coco: Manage arm-smccc platform device and CCA auxiliary drivers Message-ID: References: <20260427061615.905018-1-aneesh.kumar@kernel.org> <20260427061615.905018-2-aneesh.kumar@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260427061615.905018-2-aneesh.kumar@kernel.org> + Suzuki On Mon, Apr 27, 2026 at 11:46:14AM +0530, Aneesh Kumar K.V (Arm) wrote: > diff --git a/arch/arm64/include/asm/rsi.h b/arch/arm64/include/asm/rsi.h > index 88b50d660e85..2d2d363aaaee 100644 > --- a/arch/arm64/include/asm/rsi.h > +++ b/arch/arm64/include/asm/rsi.h > @@ -10,7 +10,7 @@ > #include > #include > > -#define RSI_PDEV_NAME "arm-cca-dev" > +#define RSI_DEV_NAME "arm-rsi-dev" [...] > diff --git a/drivers/firmware/smccc/smccc.c b/drivers/firmware/smccc/smccc.c > index bdee057db2fd..fc9b44b7c687 100644 > --- a/drivers/firmware/smccc/smccc.c > +++ b/drivers/firmware/smccc/smccc.c > @@ -12,6 +12,8 @@ > #include > #include > > +#include "rmm.h" > + > static u32 smccc_version = ARM_SMCCC_VERSION_1_0; > static enum arm_smccc_conduit smccc_conduit = SMCCC_CONDUIT_NONE; > > @@ -85,6 +87,18 @@ static int __init smccc_devices_init(void) > { > struct platform_device *pdev; > > + pdev = platform_device_register_simple("arm-smccc", > + PLATFORM_DEVID_NONE, NULL, 0); > + if (IS_ERR(pdev)) { > + pr_err("arm-smccc: could not register device: %ld\n", PTR_ERR(pdev)); > + } else { > + /* > + * Register the RMI and RSI devices only when firmware exposes > + * the required SMCCC function IDs at a supported revision. > + */ > + register_rsi_device(pdev); > + } So as per the cover letter, instead of "arm-cca-dev" as a platform device, we get "arm-smccc" as a platform device with an auxiliary "arm-rsi-dev" child device. This does not get rid of the platform device, it just creates a synthetic platform device to represent the SMCCC firmware interface. Looking at the earlier discussion, I think this is what Greg/Jason were suggesting, except that we do not currently have an SMCCC platform device: https://lore.kernel.org/all/2025101534-frosty-shank-00b1@gregkh/ If we go this route, shouldn't the platform device above be created only if !SMCCC_CONDUIT_NONE? "smccc_trng" would also fit this model (together with the driver), assuming we don't break any user-space (searching the Debian codebase did not find any use). -- Catalin