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 D6BB73F1670 for ; Wed, 13 May 2026 10:47:18 +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=1778669240; cv=none; b=G+j3gij7JxJeGqO8Yi0lkht1/qLlVUDV2zTgUhSQ2JiPfFOmtfsy365EO/PHFH1UETqjT4zxPyXCvLMPUNd0WTdDo0CNX3stt/8P5qtg84+5j9NZ+ira3i9Ekgp17nwtsmXObVNESTcUAk3bkQmPYq52sHVrjJK3Tk1Q2FhkMZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778669240; c=relaxed/simple; bh=OgqGS/kY8nvnh9OETRtKIcNbhfvLGdyeAmEexN8EN5M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=j43vNqK/dyuoorQy/mGxeHxtYo0Mr9tSSsIj6l5FJu3AFFo/Nan1A6FLxbPYayGnEPQ1kvVd7S8GE7PrTfl9fRFPSVSgRK+5UHn7lvXojpqud5jOePeN78rP0Z1RQcWLrmgxMHETvCvstVwCmCee2IZLEX0W0TIp1w/9odLpXtU= 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=GXyuBGl7; 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="GXyuBGl7" 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 F30841595; Wed, 13 May 2026 03:47:12 -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 6BFD63F7B4; Wed, 13 May 2026 03:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1778669238; bh=OgqGS/kY8nvnh9OETRtKIcNbhfvLGdyeAmEexN8EN5M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GXyuBGl7N+I9IrOMPtW/uKNjpwmAhSM7gBxsvvNyB2BVi+wu62ix2lIf/thUSfhBG fAeLABPGaXBAzwr+4YQY5SKBBeRr6T5chr3rbQn0ghulUpMxmbtJ4b9S5hj6xNIfmc dKet3A/A6fqE8bVbVSoXPHed9KMKjjnENhfSGJZ4= Date: Wed, 13 May 2026 11:47:09 +0100 From: Catalin Marinas To: "Aneesh Kumar K.V" 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: On Wed, May 13, 2026 at 12:26:13PM +0530, Aneesh Kumar K.V wrote: > Catalin Marinas writes: > > 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? > > > > register_rsi_device() does check for > > if (arm_smccc_1_1_get_conduit() != SMCCC_CONDUIT_SMC) > return; Yes but I meant for the "arm-smccc" platform device, not the rsi one. You don't want it create if SMCCC_CONDUIT_NONE. -- Catalin