Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp989434rwl; Wed, 12 Apr 2023 06:58:59 -0700 (PDT) X-Google-Smtp-Source: AKy350a2UY69wCdFUG3es9pqn0vtSZ0r89HJlQoknjY+52iZVkN0Uwrby8hAMjy0xOJ3MCcG0q8k X-Received: by 2002:a05:6a20:71c8:b0:db:36f0:a5c2 with SMTP id t8-20020a056a2071c800b000db36f0a5c2mr6114033pzb.59.1681307938654; Wed, 12 Apr 2023 06:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681307938; cv=none; d=google.com; s=arc-20160816; b=cxEAKger7gDfU0BG8A/Gg74R7eMhGQ+lpHt7bssILaES+ewjJabg5trrSXfBvJBcGr EXWujlfsEHoJggoLyCoE/J06rgazRqQ6i4mrTMb9tXYz5S3hN0xzarNteu/3vhHgfHr6 uHpI0dGsleT3LTcyMagK87FnoovNZXY4Im0cb8bdnVkenlhuVENaFm5H8sw+GwcEm5j1 dtH+uk2AHWKAs+trgqNJhXkwRaL8DotV+ePa6abORGQVoq+H4XAGhTUOv0yQcna80DLc WwP1ruZ4yX67pdPZIhp1Qx35CgEkB0XlJ0wru04qZ8Rek3DPH0XwVUFJGMK0DCZollvl xVfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NzZAoXXcoIMa3kRLS/nVXGjx6gMyKpK0r682ol5tSRY=; b=zueuWdlwQxLAHL7gfcOz6NpWLuPvc0N3CB6jRPGUxE5W0wS/o6a/2kVG3GuNNb4qhf deIjGInMZ9ojz+ocyu4aMGXgH+iS+ycm4JI5VS0DlLHuC+av9Zcc0/qsIxtgwkyuF4L+ 0kYReIlA8y9hK4ptmViiC38UmlSk2Zaem9IgebjQl0D2NjoConvzEyW9H92JOmKQPFAZ ASBiCR3Wca4I+Ah/DbOnd/Zutippnp570AvoxqyAZXPdpsMbEGCdbqOhVc3NLc/VMRha xoZ0yGmNvYUkMxsN90W3Qbzu9QyxIPD9pw1aUrJiLMrQdvWJN6vRvV7Knya64jzLcNb9 GDgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ontkxAZv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g127-20020a636b85000000b0051b37c000dcsi1187819pgc.81.2023.04.12.06.58.47; Wed, 12 Apr 2023 06:58:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ontkxAZv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231400AbjDLNuL (ORCPT + 99 others); Wed, 12 Apr 2023 09:50:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231307AbjDLNuI (ORCPT ); Wed, 12 Apr 2023 09:50:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EA381705 for ; Wed, 12 Apr 2023 06:50:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C185563557 for ; Wed, 12 Apr 2023 13:50:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8F09C4339B; Wed, 12 Apr 2023 13:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681307406; bh=d697myxGSMJrs0cYzQKYhNiKu5vdRz1Wz5siV1nSnso=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ontkxAZvHVytSkZNIN+YM5FRNn6R+X4cYx0X6UCqwa6+fw69SADfidxVgJ0eLU172 NEODlNMeKgtjHslGeelGIRdJkZb944Fp9Xp8sZjBEz3Z+DEvKkre4GxXcb0SQQ7/Ic 7h1duizmRldqOpNb8fVqFnEBBIEkbt9twF0vppTqVvov7M3cgRbHvVLxerUUpx/S5o uw27NKO4NvWw500yaA4fQozVJEmJUWB8r5oxuJmnd0T28V13tIeI85o5SbPpfmWgXT 2TiIw8p0nab97xH47C72ucO41qxhujGvxr2hWTVVsuPWAcZ9RF6+czvb4lDNefOU/1 XsUp5+3IbeSSA== Date: Wed, 12 Apr 2023 14:50:01 +0100 From: Conor Dooley To: Pierre Gondois Cc: Conor Dooley , linux-kernel@vger.kernel.org, Radu Rendec , Alexandre Ghiti , Will Deacon , Greg Kroah-Hartman , "Rafael J. Wysocki" , Sudeep Holla , Palmer Dabbelt , Gavin Shan , Jeremy Linton Subject: Re: [PATCH v2 1/3] cacheinfo: Check sib_leaf in cache_leaves_are_shared() Message-ID: <20230412-catalyze-putt-4a0d48042e4f@spud> References: <20230412071809.12670-1-pierre.gondois@arm.com> <20230412071809.12670-2-pierre.gondois@arm.com> <20230412-viewpoint-refutable-a31f3657093c@wendy> <20230412-hut-unused-21d683fcb8b0@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="31Nhce6gARzTUXUy" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --31Nhce6gARzTUXUy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 12, 2023 at 03:20:19PM +0200, Pierre Gondois wrote: > > On Wed, Apr 12, 2023 at 02:34:11PM +0200, Pierre Gondois wrote: > > Another silly question: > > For two caches of level M & N; M !=3D N; M, N > 1 should they be detect= ed > > as shared in the absence of any information in DT/ACPI? > > The comment (to me) reads as if they should not, but it is rather vague. >=20 > I think they should. The naming of cache_leaves_are_shared() might be > misleading. The function is more trying to find out if 2 cache leaves str= uct > are representing the same cache. So maybe renaming the function to > cache_leaves_identical() might be better? Nah, I don't think this is really the fault of anything other than the !DT && !ACPI situation. I'm just trying to make sure I understand the intended behaviour in that scenario, that's all. > If there is no DT/ACPI, it is not possible to identify whether 2 cache le= aves > are representing the same cache. The desired behaviour is just: > - If this_leaf or sib_leaf is a L1 cache, then the caches are not identic= al > (or shared if we use this wording) > So the meaning of cache_leaves_identical() is a bit bent for this > configuration. Fair enough. --31Nhce6gARzTUXUy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZDa3BgAKCRB4tDGHoIJi 0vrcAQCW6Qv7JEnbOaLRCie9bWqvTjhTS9wIpR4saBeeRVODrAEA8WU4D22dkSnN K5Zhe/I9KdRpdhwCHiO1hBJaBHUdago= =7IKn -----END PGP SIGNATURE----- --31Nhce6gARzTUXUy--