From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E104C76195 for ; Mon, 27 Mar 2023 13:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To: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-Owner; bh=lQuFs6YmoSZ5TXaqmjLc/Lhc4QiRWABPvbfOkatif/A=; b=VqVUvi9VmGWtzIM8ExY1JwNA5j DgiWW45qfXf3QlZ7I6+Dc+X6A4tgX3s2rYRJV3fXr3lO3pd5yqrnZgHIOLqrkAFwhVJDp+KjTdelE EgsKaPGKvQHMY2eSz0JYZ95qD/6zd5WrUlH+rPtRVHO+/ChR3y4kX9XqRIWsP/8JpsnvqDlO7yxKg +Giml4uLeEOTVUlDFVdsU0M8uqxnteqwqZRUq95FjeOE83t7Rnmdx28jma3cgXZm1ll9IBf4CuUzK QmGgGtpvdGLBW/eR/3pspe37FzdEwTjBj7DVK/a1vQVDcmfKrO18PXjjgiP9IN1lMXCrzUpDBgLZj QEXlTSfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgnHa-00BBFB-1Y; Mon, 27 Mar 2023 13:53:10 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgnHX-00BBEm-2K for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2023 13:53:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1679925187; x=1711461187; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Q0aw3R6eyNVabVWBk/6BbTOvpxSvBhHjFUEn9k6dIDM=; b=vQJ9HnJy3Aw4WYkVChQ+xzJa3TMtVoFTr+M4uYKAjdr320g22Kkp4DaM sihHY675CF0vVBVU+iHzFBtPNRc0MulU3ZcJNk8RgUqohrHsZthQfWZYK MWVBHoq1AAUEcM1iTWwfI9o9s79Kd9I0zu7dho+1VO2+e37XKGcfKSljA 1mZtLiZsoVFkZQxW4iW4L6i4yYctDzMUBX2wcZooeIXhK9RJjuzsjCMpF DCvzzNmpMqvcfEjWM6bYvk3JgNRKNWnluOLOhydi1qDWFCw/HT22qPOjb hzlQKcxH5N/X9BDqIh/RFtUrYr4wPI8vinIT7+5khewtJM6EqqbFaMm83 Q==; X-IronPort-AV: E=Sophos;i="5.98,294,1673938800"; d="asc'?scan'208";a="207438968" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Mar 2023 06:53:03 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 27 Mar 2023 06:53:00 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 27 Mar 2023 06:52:58 -0700 Date: Mon, 27 Mar 2023 15:04:15 +0100 From: Conor Dooley To: Pierre Gondois CC: , Radu Rendec , Catalin Marinas , Will Deacon , Greg Kroah-Hartman , "Rafael J. Wysocki" , Sudeep Holla , Oliver Upton , Akihiko Odaki , Palmer Dabbelt , Gavin Shan , Subject: Re: [PATCH 1/3] cacheinfo: Check sib_leaf in cache_leaves_are_shared() Message-ID: <267f5e37-2cfd-4833-a74c-bfc56fe3671c@spud> References: <20230327115953.788244-1-pierre.gondois@arm.com> <20230327115953.788244-2-pierre.gondois@arm.com> MIME-Version: 1.0 In-Reply-To: <20230327115953.788244-2-pierre.gondois@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230327_065307_845227_6A0E2BD4 X-CRM114-Status: GOOD ( 20.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6643424666456879808==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6643424666456879808== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b0IIy94NXv1sQNWD" Content-Disposition: inline --b0IIy94NXv1sQNWD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 27, 2023 at 01:59:49PM +0200, Pierre Gondois wrote: > If 'this_leaf' is a L2 cache (or higher) and 'sib_leaf' is a L1 cache, > the caches are detected as shared. > Indeed, cache_leaves_are_shared() only checks the cache level of > 'this_leaf' when 'sib_leaf''s cache level should also be checked. nit: this commit message reads quite weirdly as there's a missing "do foo" statement, followed by "also do bar". >=20 > Also update the comment: the function is called when populating > 'shared_cpu_map'. >=20 > Signed-off-by: Pierre Gondois > --- > drivers/base/cacheinfo.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c > index f6573c335f4c..4ca117574af1 100644 > --- a/drivers/base/cacheinfo.c > +++ b/drivers/base/cacheinfo.c > @@ -38,11 +38,10 @@ static inline bool cache_leaves_are_shared(struct cac= heinfo *this_leaf, > { > /* > * For non DT/ACPI systems, assume unique level 1 caches, > - * system-wide shared caches for all other levels. This will be used > - * only if arch specific code has not populated shared_cpu_map > + * system-wide shared caches for all other levels. > */ > if (!(IS_ENABLED(CONFIG_OF) || IS_ENABLED(CONFIG_ACPI))) > - return !(this_leaf->level =3D=3D 1); > + return (this_leaf->level !=3D 1) || (sib_leaf->level !=3D 1); So this is Fixes: f16d1becf96f ("cacheinfo: Use cache identifiers to check if the cach= es are shared if available") then? Cheers, Conor. > =20 > if ((sib_leaf->attributes & CACHE_ID) && > (this_leaf->attributes & CACHE_ID)) > --=20 > 2.25.1 >=20 >=20 --b0IIy94NXv1sQNWD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZCGiXwAKCRB4tDGHoIJi 0t/EAQDXe23dRWv4M0HrXDodpHLa9o3/okRxwNua4LZCvcOoRQD9EcPHWFt02qKp clMayBcdu3gCTiSmliJnj8sLQ9YpLgI= =G6Qk -----END PGP SIGNATURE----- --b0IIy94NXv1sQNWD-- --===============6643424666456879808== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6643424666456879808==--