From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37372388386 for ; Tue, 24 Mar 2026 15:33:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774366392; cv=none; b=k+UsCq1cSeZaWS/8aPxFzcmnejyYxpRrNoLjdByrQKRegSSeM9twy9GgjlMVzU+63RJIR9j7IevrqOmnGtsluSeyfQWJbiNQtlNtnDR9tESEaWZyoGG1MetXu3GrYk31H5bxo6MN9Mwbv9fhvXxbkzbbD3/ZG9P5OgceoQowDho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774366392; c=relaxed/simple; bh=KaQjYumsYMcWfc8vtCYt/kFSYK3h1OhtYSBTNjozRFo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ddKK156Vdtd67eB39iqJWFYRZ8XrwQjuhtxV7/88AGnb1W78tJyd5x8iB+1gb3feDDQnCiq6VcUITOawbRQ+VoHDKAfw3nlwmT7MWxb8UhmBkMM6M7T/YSbHHlvfgzqKdo4ANOqkQ94Nud8bL7NcQUnAcQuxAM6gsOnAJwu/zn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.222.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-f53.google.com with SMTP id a1e0cc1a2514c-950baad7b69so731525241.3 for ; Tue, 24 Mar 2026 08:33:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774366390; x=1774971190; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dX91cjvlM2yf0by5+MQRb4126il7+nZRZllt3soyyC4=; b=IyvRA9FCK7GVOHIhPjqnTTyvqfyPRBX0Slo4EG3LDhsmEkEXD0WudhNCoA8oXgVIfn 6OMhl3Hxn67ic51CQbpD4EWeaEA0fZc2gFk73ad9RY4aDzccR/34A4QHdhVXqWqMSCh5 jzfWfJ1EketGr6iz1K22Ab8xp5HdObXMRuqIysNKO+LhDaLXs/pcgviC6NgfsHKM3Rtm aIQL9uGWwmW/C2qN89rdUtzdpk8e4gP0EB6v6MOvL88RBFq4UziJabme6yrfzU4VHBR8 8FVuffXUMA8bdVGp+AzzjUSc9QU0ORO0lsjvIe+8lKs/CJZ1JzcqQ+W8YVGyQcuxv6J+ m+Pw== X-Forwarded-Encrypted: i=1; AJvYcCUSUYq2aRSUX5A+jsIGcTFSlfZt1wO7s+ZsNh2mtJ1X9j9y09iUAKD+iJgD7CxyPxJ4oGPfH3tQvUTzC4I=@vger.kernel.org X-Gm-Message-State: AOJu0YwpGSf0kRM+iKNQqi2cgySr3Jv8HU2bJrMD/djy+p84lHqKIs9u BAz9b/gLWFMTWkrA7F+6Wq9mJbVTb2al0l0WYWBGOZzOwaaag51/Q8LbuFXAxlrUkTs= X-Gm-Gg: ATEYQzxVjx13fDZ7S6CkPgCCdIRLV7ndWv0Es2ee+ag2R+O4kQ+a/B+5wCoOImFRG4D EnYyJK/SYbDWa9jGFRwwj0y6HqcIt4C1cxLLAbfdSLc/mTd5UP6kqGUy9Q7d02801lQGdR0WK0x SxF2TOPdubHBiCMCOkMdKln3KIKnNMbihfWM9UY46WbinRLqH2gFEa4CNBpvbHeTqxb4WWhEbUj SN+z3Wcf3cUmhuqKZEJFp5DrnOsFl2WWf0ecOzwnNiOODu7dY+QrsKERBG/2fxVI1JJu8RYg6em Y0fcJcSXvlykxAUA+GBX1nLnEdaNe0hxa5YEEfkATlY9sJiFOFX8NiWzHDkc/SiX99kxDALTz7e LpVZS4rqJPPQRdpmWa466cbzbv9oNOj4g2KH4CnNkiXHyaOmLI4qJ95BbEzEqpN0mWXxh5SrLTr jms3Xuo8bWr+fJ3oHfcrEc2Hs0oJk0yZzfl9wJHZESe3B3I6MtjFpJRVFBt+kfxd9IwAduf7k= X-Received: by 2002:a67:e70f:0:b0:5ff:b3f7:48de with SMTP id ada2fe7eead31-6036ceac83amr191888137.0.1774366390042; Tue, 24 Mar 2026 08:33:10 -0700 (PDT) Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com. [209.85.222.47]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-95136de53d9sm12564097241.8.2026.03.24.08.33.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Mar 2026 08:33:08 -0700 (PDT) Received: by mail-ua1-f47.google.com with SMTP id a1e0cc1a2514c-94ac8cbf3feso713541241.0 for ; Tue, 24 Mar 2026 08:33:08 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCW/Fd1LHS9h+4sFdXk3W39O2Pn3/r2g08SRZEOGoUVnfDyBMT905RPIMf6PmvPalmPI7RkfaTcv5GjwOqs=@vger.kernel.org X-Received: by 2002:a05:6102:3710:b0:602:6c8b:4c1 with SMTP id ada2fe7eead31-60394984ea4mr160731137.34.1774366387796; Tue, 24 Mar 2026 08:33:07 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260324-scmi-clock-fix-v1-v1-1-65c21935824b@nxp.com> <20260324-lean-bobcat-of-reputation-6628b5@sudeepholla> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 24 Mar 2026 16:32:55 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AQROBzBN0dbSC98PQ2QVW1vr96tinjmd_XI_AcUn3qO4saxxiTbxjn88h5qmDk0 Message-ID: Subject: Re: [PATCH] firmware: arm_scmi: clock: Relax check in scmi_clock_protocol_init To: Cristian Marussi Cc: Sudeep Holla , "Peng Fan (OSS)" , Jacky Bai , arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Content-Type: text/plain; charset="UTF-8" Hi Cristian, On Tue, 24 Mar 2026 at 15:35, Cristian Marussi wrote: > On Tue, Mar 24, 2026 at 02:15:36PM +0100, Geert Uytterhoeven wrote: > > On Tue, 24 Mar 2026 at 09:41, Cristian Marussi wrote: > > > Looking at the spec 3.6.2.5 CLOCK_ATTRIBUTES > > > > > > "This command returns the attributes that are associated with a specific clock. An agent might be allowed access to only > > > a subset of the clocks available in the system. The platform must thus guarantee that clocks that an agent cannot access > > > are not visible to it." > > > > > > ...not sure if this sheds some light or it is ambiguos anyway...I'd say that > > > NOT_FOUND does NOT equate to be invisible... > > > > > > ...BUT at the same time I think that this practice of exposing a non-contiguos > > > set of resources IDs (a set with holes in it) is the a well-known spec-loophole > > > used by many vendors to deploy one single FW image across all of their platforms > > > without having to reconfigure their reosurces IDs ro expose a common set of > > > contiguos IDs like the spec would suggest... > > > > > > Having said that, since we unfortunately left this door open in the > > > implementation, now this loophole has become common practice > > > apparently... > > > > When I first read that paragraph, I was also confused. > > What does "not visible" mean? > > - Not present in the clock ID space exposed to that client of > > the system? > > Yeah, multiple different sequences of contiguous IDs, depending > > on client! > > Yes that is the most spec-compliant interpretation usually; in general > across all protocols the SCMI server, through customized enumeration > results, should provide a per-agent view of the system: this should help > handling shared or virtualized resources, since the agent always see > only the 'illusion' provided by the server... > > ...under this assumption if you dont even need a resource at all (not > RW nor RO) you should NOT even be able to see it...this in turn of > course means that in order to expose a contiguous set of IDs you should > be able to properly configure at build time the FW resources on a per > platform basis... > > > - Return failure on CLOCK_ATTRIBUTES? > > Which is what implementations seem to do. > > Yes this is what is done leveraging the gap in the implementation...I am > not sure that the non-contiguous set of IDs is supported if not by > chance as of now :P (especially in other protocols) > > > The next step in the fun is when the system actually needs to know the > > clock rate of such a clock... > > Well...that seems a bit of wishful thinking ... Unfortunately it is real... [cliffhanger, to be continued... :-] Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds