[PATCHv1,1/5] arm64: dts: amlogic: Add cache information to the Amlogic GXBB and GXL SoC
Message ID | 20240205171930.968-2-linux.amoon@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-53081-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1020875dyb; Mon, 5 Feb 2024 09:20:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IG24ksHkNqrgde/K2NmMn7SAVW1JS/QTMno9jWeaNumPYu4cl1tK+fMdstmNN5Oc82FuDNZ X-Received: by 2002:ac8:6217:0:b0:42a:b2b1:a800 with SMTP id ks23-20020ac86217000000b0042ab2b1a800mr7275qtb.26.1707153641631; Mon, 05 Feb 2024 09:20:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707153641; cv=pass; d=google.com; s=arc-20160816; b=c4fIF1cZley1DU69A9BxBRwnTNv4V+jatv8906n8EuAUVOGXeQLV5KaSv8u1/KjCj6 2RKn34FZ49flefF8+0AZNagZOe1K/A52lwMT9ctnacGlYcP3zRVJmn9N8ZtsxRZJC9jk grmAkJ2XugKJVfZpmQil0xnvANlafsYQBS2FeJmKq7APXKYhNvXgAzyAwefJ3bUZEH8z c/P9TcBOAzAPl0H20im/xnfRFmx/nxfBXzrUVPT0BljN8kUVyiEhBQsmB1J0eYnaNbqw Tgv4KTRRBwCyRPPq4WaAMcXy9hXUZUq/HuUXWjEo8kIp1DlTWl8Ld8aSaZJykDPgK7zE oHjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IQKgDn03i1GuOds6l+szL2kWc+E6jwK9dMeqY6Pk45o=; fh=sItjSRmoWtYGdRu3kUq1/WJ7XDTB/xz9EhynT44wUAQ=; b=Erkn0g3sQxvKF9QWtYIXVF8Z3/2+S24Mk3E1BnguzrIwVswmQHznIEbhBg3oMaOfzv /d3OthEU2rmh6cJXFJ2pw3deMcQ8yiBdwP4dJpid+mrM7h6fWcwzYRXFHgOGwXP0kJoJ ElDUdiQnS5VZncuxlxDwua7pXc58eToDPclTOphx4SJQBvzzTHnn3kEp5Q54CMByTh5e blBUbHUM8XsEVDSERl2+L/eKKpmRjSaiS+kBH0j3Tq48iGNvXv6Hef2ipHf6lrtWg8YV ojPXzrFBEpPY/7pb5DY3ZEP/qAzT8hcN+yyqTAvo/WsZF58gMNyLx4pTzh5+vbPdoHtJ UvOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BXCx+wYw; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-53081-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53081-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCV/fFvhrjoZv1D091ahwr/r4ILOLYViwWGbkFaOv6iZAMUGkoMJE3mBrVwpuGaX7XqzZgB/aHat79bVWbhmsl09ArA/fg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a15-20020a05622a064f00b0042c268a9666si267213qtb.799.2024.02.05.09.20.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:20:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53081-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BXCx+wYw; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-53081-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53081-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AA1A21C20AA0 for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 17:20:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D68544C7F; Mon, 5 Feb 2024 17:20:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BXCx+wYw" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 DD8624121B; Mon, 5 Feb 2024 17:20:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707153623; cv=none; b=jQfBGyyV8YdH4hBR8MW63M9YYyFjV+CLTEyvqCyzYvco9/C8YNZgtKaq4O9hchLXVRgUYqt28YA7Ov47WHH6rNa2gB3WlFrGFnXV5qVKaYgifqQ5Xs4HG5HM1uE1OcxGFhR8dOZTuAuoe2nbJ755I2EzOi14RzFgEoe6YUNNvyM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707153623; c=relaxed/simple; bh=tfG76yRqDK/luXO6etvpkAupEzDugyfS3UQHqVynP5Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W0MW4X4Xm+GCVwcGyaVTbsDaYrw95oNQFBw1D9W441QOaknHiQYbgkQx/3KXQ1+JULZNyuTOgO6qs+Q2szMlwP+eRFjYOMtvi8sbjQ7vHcEkXoiicYDI5SHqQ2sF8cUOuaYMMFXh8FjQvtGcKAZIXENx0hkG1hXHNywesnVHE58= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BXCx+wYw; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1d76671e5a4so37446085ad.0; Mon, 05 Feb 2024 09:20:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707153621; x=1707758421; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IQKgDn03i1GuOds6l+szL2kWc+E6jwK9dMeqY6Pk45o=; b=BXCx+wYwUqyk6x3MltxyYmF2L8RfgwcjB4CrWleM/zcwu8kWK82foi3s11J/8p4aVn 4LMdmVwXngmuQy3FBoZY4CjC08EMUXbVazddvMO/U0fmdDKEjMlyP7aE/KhttAFsLL7X WolmI3yH7VvVVhFnADKcxTuwtDjNh1VIbXV+LpqqpuqU4SgctxUKevBs+EWVqY69gcHa BwTLif+L2ofkqWJ5cElwKzSLfDBTMCeMTceFmCc5uCLpH6TTPqDXYWLTwBjSMjcK6uQf HNrzbok11jT8ajMPUdVbrjFW7kBcPL03zMqFtMX2bvWLi2fBrUv7ImYtvITDVEngQVlM yCzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707153621; x=1707758421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IQKgDn03i1GuOds6l+szL2kWc+E6jwK9dMeqY6Pk45o=; b=hW59uytXEok5LQAs6MxwXeft+XVEGU8USZpISLLKtZVQ3MC5JcTFJI4XtGeqxygpi9 SJLYTf9AzG7AtpM1GfXnQ0ewiCUrtOxbigy8kwir2+nR8L3O+NG9sZ4hamRvSQSHTk5E 7KsfDKh8klOHaiovaqGK3lSCNhkej8NGElIBSElCSQIQaXjXI/iq5MQzEc5kJWN5LZD+ /Jw6NtljWRBmU58r4jnN+SMeU8zGnpFIA3WBPBUmjYe8h+j8H24ss7WxZXcLg38p/GBf VO5QfrG+nN6maNjgr2euZL4S7mUhieXnGKUb5xmXSOIW2DOhXz2HfqRG/C02EZFBUC4q JKRw== X-Gm-Message-State: AOJu0YwSGBIT7iV3TBHsUjommiQ5jijiVjC3mwp9/LIbhc+NTZoZy6OG DUo7+EWSEbiEH9JFENGegFFeUP4/trUG9VhOleV1z17IGteSSerR X-Received: by 2002:a17:902:6b08:b0:1d9:c367:201b with SMTP id o8-20020a1709026b0800b001d9c367201bmr127932plk.29.1707153621183; Mon, 05 Feb 2024 09:20:21 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUFDNn7JCUbUV3ym9LXRogPi6B/69fTu5XgtGm6JfDORTFNSkvLThm4P3H00hXfqDGOngeghOPWvrt88Nclu682qJ+d7/MaTSyfYUtjHAUyynDy+tzzWPAVpGFWYNsFQfR/8D1WSFS6NeBRyeu6bxfWl1p+DI4zrxpj/B1ErQLccrRmEm+S3P06NnYEHk0yFrsVU/y2Ar/M7h3EDPYxffiKZukgfEQNRDLKb+3b2/5GLlwiFr49eTFbL71cohH+9hWi0jVBJAf4Re/mLDTnXxtXiQUC10r/O0XGH7ZoXg7HtlS3bQrn2A8T6dx6xKEu1yjHLFiK46vvLJVXT1ZZehieSXHkjKJyUs9DzVB04vS5Jz4+Z2tacBfzeAc/2nCVj6rMTvGTrJGPwcBEW2GsG3Zo/OAxMX/oQSurUHyitdfgYZF7ek7fWwl3tc36+Ydf6uTrDJKz Received: from localhost.localdomain ([113.30.217.222]) by smtp.gmail.com with ESMTPSA id iy15-20020a170903130f00b001d8f3c7fb96sm107518plb.166.2024.02.05.09.20.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:20:20 -0800 (PST) From: Anand Moon <linux.amoon@gmail.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Jerome Brunet <jbrunet@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.com> Cc: Anand Moon <linux.amoon@gmail.com>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCHv1 1/5] arm64: dts: amlogic: Add cache information to the Amlogic GXBB and GXL SoC Date: Mon, 5 Feb 2024 22:49:19 +0530 Message-ID: <20240205171930.968-2-linux.amoon@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240205171930.968-1-linux.amoon@gmail.com> References: <20240205171930.968-1-linux.amoon@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790080337156313883 X-GMAIL-MSGID: 1790080337156313883 |
Series |
[PATCHv1,1/5] arm64: dts: amlogic: Add cache information to the Amlogic GXBB and GXL SoC
|
|
Commit Message
Anand Moon
Feb. 5, 2024, 5:19 p.m. UTC
As per S905 and S905X datasheet add missing cache information to
the Amlogic GXBB and GXL SoC.
- Each Cortex-A53 core has 32KB of L1 instruction cache available and
32KB of L1 data cache available.
- Along with 512KB Unified L2 cache.
To improve system performance.
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
Datasheet
[0] https://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf
---
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 27 +++++++++++++++++++++++
1 file changed, 27 insertions(+)
Comments
Hi Neil, On Mon, 5 Feb 2024 at 22:50, Anand Moon <linux.amoon@gmail.com> wrote: > > As per S905 and S905X datasheet add missing cache information to > the Amlogic GXBB and GXL SoC. > > - Each Cortex-A53 core has 32KB of L1 instruction cache available and > 32KB of L1 data cache available. > - Along with 512KB Unified L2 cache. > > To improve system performance. > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > --- > Datasheet > [0] https://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf > --- As per the Arm Cortex A53 TRM documentation [0] https://developer.arm.com/documentation/ddi0500/j/Introduction/Implementation-options?lang=en Since this SoC supports arm-pmu we could read cache info using perf [1] https://www.baeldung.com/linux/analyze-cache-misses [alarm@archl-librecm ~]$ sudo perf list List of pre-defined events (to be used in -e or -M): branch-instructions OR branches [Hardware event] branch-misses [Hardware event] bus-cycles [Hardware event] cache-misses [Hardware event] cache-references [Hardware event] cpu-cycles OR cycles [Hardware event] instructions [Hardware event] alignment-faults [Software event] bpf-output [Software event] cgroup-switches [Software event] context-switches OR cs [Software event] cpu-clock [Software event] cpu-migrations OR migrations [Software event] dummy [Software event] emulation-faults [Software event] major-faults [Software event] minor-faults [Software event] page-faults OR faults [Software event] task-clock [Software event] duration_time [Tool event] user_time [Tool event] system_time [Tool event] armv8_cortex_a53: L1-dcache-loads OR armv8_cortex_a53/L1-dcache-loads/ L1-dcache-load-misses OR armv8_cortex_a53/L1-dcache-load-misses/ L1-dcache-prefetch-misses OR armv8_cortex_a53/L1-dcache-prefetch-misses/ L1-icache-loads OR armv8_cortex_a53/L1-icache-loads/ L1-icache-load-misses OR armv8_cortex_a53/L1-icache-load-misses/ dTLB-load-misses OR armv8_cortex_a53/dTLB-load-misses/ iTLB-load-misses OR armv8_cortex_a53/iTLB-load-misses/ branch-loads OR armv8_cortex_a53/branch-loads/ branch-load-misses OR armv8_cortex_a53/branch-load-misses/ node-loads OR armv8_cortex_a53/node-loads/ node-stores OR armv8_cortex_a53/node-stores/ br_immed_retired OR armv8_cortex_a53/br_immed_retired/[Kernel PMU event] br_mis_pred OR armv8_cortex_a53/br_mis_pred/ [Kernel PMU event] br_pred OR armv8_cortex_a53/br_pred/ [Kernel PMU event] bus_access OR armv8_cortex_a53/bus_access/ [Kernel PMU event] bus_cycles OR armv8_cortex_a53/bus_cycles/ [Kernel PMU event] cid_write_retired OR armv8_cortex_a53/cid_write_retired/[Kernel PMU event] cpu_cycles OR armv8_cortex_a53/cpu_cycles/ [Kernel PMU event] exc_return OR armv8_cortex_a53/exc_return/ [Kernel PMU event] [alarm@archl-librecm ~]$ perf stat -B -e cache-references,cache-misses,cycles,instructions,branches,faults,migrations sleep 5 Performance counter stats for 'sleep 5': 52794 cache-references:u 2311 cache-misses:u # 4.38% of all cache refs 480343 cycles:u 140018 instructions:u # 0.29 insn per cycle 15012 branches:u 46 faults:u 0 migrations:u 5.008073381 seconds time elapsed 0.000000000 seconds user 0.006952000 seconds sys Thanks -Anand
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi index 2673f0dbafe7..e141ade5e49b 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi @@ -95,6 +95,12 @@ cpu0: cpu@0 { compatible = "arm,cortex-a53"; reg = <0x0 0x0>; enable-method = "psci"; + d-cache-line-size = <32>; + d-cache-size = <0x8000>; + d-cache-sets = <32>; + i-cache-line-size = <32>; + i-cache-size = <0x8000>; + i-cache-sets = <32>; next-level-cache = <&l2>; clocks = <&scpi_dvfs 0>; #cooling-cells = <2>; @@ -105,6 +111,12 @@ cpu1: cpu@1 { compatible = "arm,cortex-a53"; reg = <0x0 0x1>; enable-method = "psci"; + d-cache-line-size = <32>; + d-cache-size = <0x8000>; + d-cache-sets = <32>; + i-cache-line-size = <32>; + i-cache-size = <0x8000>; + i-cache-sets = <32>; next-level-cache = <&l2>; clocks = <&scpi_dvfs 0>; #cooling-cells = <2>; @@ -115,6 +127,12 @@ cpu2: cpu@2 { compatible = "arm,cortex-a53"; reg = <0x0 0x2>; enable-method = "psci"; + d-cache-line-size = <32>; + d-cache-size = <0x8000>; + d-cache-sets = <32>; + i-cache-line-size = <32>; + i-cache-size = <0x8000>; + i-cache-sets = <32>; next-level-cache = <&l2>; clocks = <&scpi_dvfs 0>; #cooling-cells = <2>; @@ -125,6 +143,12 @@ cpu3: cpu@3 { compatible = "arm,cortex-a53"; reg = <0x0 0x3>; enable-method = "psci"; + d-cache-line-size = <32>; + d-cache-size = <0x8000>; + d-cache-sets = <32>; + i-cache-line-size = <32>; + i-cache-size = <0x8000>; + i-cache-sets = <32>; next-level-cache = <&l2>; clocks = <&scpi_dvfs 0>; #cooling-cells = <2>; @@ -134,6 +158,9 @@ l2: l2-cache0 { compatible = "cache"; cache-level = <2>; cache-unified; + cache-size = <0x7d000>; /* L2. 512 KB */ + cache-line-size = <64>; + cache-sets = <512>; }; };