Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2602072rdg; Mon, 16 Oct 2023 09:06:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxyVoYuDHfgvywRmv2xaZ2TOtj6dJT2mDhb0/hM5vegZdU1MvppUSKynI7znZ9aya+GO82 X-Received: by 2002:a05:6a21:197:b0:149:122b:6330 with SMTP id le23-20020a056a21019700b00149122b6330mr45804458pzb.10.1697472407618; Mon, 16 Oct 2023 09:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697472407; cv=none; d=google.com; s=arc-20160816; b=HW0kd1fI/92ZW3GY2rz0riKkGsixsGkbbEtpa3NX4Y4/Fp6RLefgT0ztDl9MRgqXdd Hw/Qa1j4Ilm6wwq06XEJP84/F7R/L/rto4c4hFxv6gUZeK5yWzCbFofPJU6+RxE8NSk8 uqwJmdNOtua/51HYpVwK37OI0JyuPj4fHBqrmDuQeZhZNnZ2BteHLDzKoIKvAmm+PEoi WM0z85NZb1GwU6hCfR4DnTpYK3ppLZRCzkQnQeNl9bOEMbJJRmEbAVjZB+MS6W0Dpi81 Nstl2dHfrrdlaiXcpsgaOFxdpi6uAQn7TR7wNSY5GNvqDPU/a9/4g72C7rcJPGcQY7YA +DOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:content-language:references:cc:to:subject:user-agent :mime-version:date:message-id; bh=+rnLxQo5eelNbmmpcb1pKWJtTi7UWGIITuft2Y85i5I=; fh=B8DG3CDXnrsRBPI2Jlqe+YL0KB1TKtVgmk5/TiIO+0I=; b=WBvCjcgdstMHe991KhGNBV59ugViAjscn2V9EYh6jNX/YgLpdh1CMNIz0fhbUhssif gRjmEW4Wey0Nl6Y9SQ89db0OZk5D9RayaVYuOFj8vSqVEloNnsT5+XZHPa8yiVDq9+8X 3Ob5kGh0Zm0anJ1U2LLq8JYV3xyFuD2rrzpaoLC2yROQJk2M9cwCLbfmWext8hrj7AWo Qa0A/yD1KCBFHSoMAFxqpci5bRXArCyf3AHEMg+4hhLseVJ110cuYQGei98P5l3DjVRu xYwyUqnpTIisO8ofTpBcTAt96XKYzPaGhCp5BBKgPa6BOF5avHHX7nxsN+eRY0DmfZ0v xK7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id r145-20020a632b97000000b00578b37ad24bsi10561042pgr.619.2023.10.16.09.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 09:06:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2FF53807C87F; Mon, 16 Oct 2023 09:06:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232310AbjJPQGD (ORCPT + 99 others); Mon, 16 Oct 2023 12:06:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbjJPQGB (ORCPT ); Mon, 16 Oct 2023 12:06:01 -0400 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA78083; Mon, 16 Oct 2023 09:05:58 -0700 (PDT) Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1qsQ6M-0000kQ-Os; Mon, 16 Oct 2023 18:05:54 +0200 Message-ID: Date: Mon, 16 Oct 2023 18:05:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6.5 006/191] arm_pmu: acpi: Add a representative platform device for TRBE To: Greg Kroah-Hartman , stable@vger.kernel.org Cc: patches@lists.linux.dev, Catalin Marinas , Will Deacon , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anshuman Khandual , Sasha Levin References: <20231016084015.400031271@linuxfoundation.org> <20231016084015.550509169@linuxfoundation.org> Content-Language: en-US, de-DE From: Thorsten Leemhuis Autocrypt: addr=linux@leemhuis.info; keydata= xsFNBFJ4AQ0BEADCz16x4kl/YGBegAsYXJMjFRi3QOr2YMmcNuu1fdsi3XnM+xMRaukWby47 JcsZYLDKRHTQ/Lalw9L1HI3NRwK+9ayjg31wFdekgsuPbu4x5RGDIfyNpd378Upa8SUmvHik apCnzsxPTEE4Z2KUxBIwTvg+snEjgZ03EIQEi5cKmnlaUynNqv3xaGstx5jMCEnR2X54rH8j QPvo2l5/79Po58f6DhxV2RrOrOjQIQcPZ6kUqwLi6EQOi92NS9Uy6jbZcrMqPIRqJZ/tTKIR OLWsEjNrc3PMcve+NmORiEgLFclN8kHbPl1tLo4M5jN9xmsa0OZv3M0katqW8kC1hzR7mhz+ Rv4MgnbkPDDO086HjQBlS6Zzo49fQB2JErs5nZ0mwkqlETu6emhxneAMcc67+ZtTeUj54K2y Iu8kk6ghaUAfgMqkdIzeSfhO8eURMhvwzSpsqhUs7pIj4u0TPN8OFAvxE/3adoUwMaB+/plk sNe9RsHHPV+7LGADZ6OzOWWftk34QLTVTcz02bGyxLNIkhY+vIJpZWX9U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blqV6EjenJu+pR9A 7EElGPPmYdO1WQbBrmuOrFuO6wQrbo0TbUiaxYWyoM9cA7v7eFyaxgwXBSWKbo/bcAAViqLW ysaCIZqWxrlhHWWmJMvowVMkB92uPVkxs5IMhSxHS4c2PfZ6D5kvrs3URvIc6zyOrgIaHNzR 8AF4PXWPAuZu1oaG/XKwzMqN/Y/AoxWrCFZNHE27E1RrMhDgmyzIzWQTffJsVPDMQqDfLBhV ic3b8Yec+Kn+ExIF5IuLfHkUgIUs83kDGGbV+wM8NtlGmCXmatyavUwNCXMsuI24HPl7gV2h n7RI In-Reply-To: <20231016084015.550509169@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;linux@leemhuis.info;1697472358;155127a0; X-HE-SMSGID: 1qsQ6M-0000kQ-Os X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 16 Oct 2023 09:06:21 -0700 (PDT) On 16.10.23 10:39, Greg Kroah-Hartman wrote: > 6.5-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Anshuman Khandual > > [ Upstream commit 1aa3d0274a4aac338ee45a3dfc3b17c944bcc2bc ] > > ACPI TRBE does not have a HID for identification which could create and add > a platform device into the platform bus. Also without a platform device, it > cannot be probed and bound to a platform driver. > > This creates a dummy platform device for TRBE after ascertaining that ACPI > provides required interrupts uniformly across all cpus on the system. This > device gets created inside drivers/perf/arm_pmu_acpi.c to accommodate TRBE > being built as a module. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual > Link: https://lore.kernel.org/r/20230817055405.249630-3-anshuman.khandual@arm.com > Signed-off-by: Will Deacon > Stable-dep-of: 4785aa802853 ("cpuidle, ACPI: Evaluate LPI arch_flags for broadcast timer") > Signed-off-by: Sasha Levin Got a compiler error when using Fedora's stable kernel config and compiling 6.5.8-rc1 for ARM64; not totally sure, but from the error msg I suspect it's caused by the change quoted above. """ + /usr/bin/make -s 'HOSTCFLAGS=-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes' ARCH=arm64 'KCFLAGS= ' WITH_GCOV=0 -j4 vmlinuz.efi drivers/perf/arm_pmu_acpi.c: In function 'arm_trbe_acpi_register_device': drivers/perf/arm_pmu_acpi.c:164:19: error: implicit declaration of function 'arm_acpi_register_pmu_device'; did you mean 'arm_spe_acpi_register_device'? [-Werror=implicit-function-declaration] 164 | int ret = arm_acpi_register_pmu_device(&trbe_dev, ACPI_MADT_GICC_TRBE, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | arm_spe_acpi_register_device cc1: some warnings being treated as errors make[4]: *** [scripts/Makefile.build:243: drivers/perf/arm_pmu_acpi.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [scripts/Makefile.build:480: drivers/perf] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:480: drivers] Error 2 make[1]: *** [/builddir/build/BUILD/kernel-6.5.8-rc1/linux-6.5.8-0.rc1.150.vanilla.fc37.aarch64/Makefile:2036: .] Error 2 make: *** [Makefile:236: __sub-make] Error 2 """ Full build log: https://copr-be.cloud.fedoraproject.org/results/@kernel-vanilla/stable-rc/fedora-37-aarch64/06529454-stablerc-stablerc-releases/builder-live.log.gz Ciao, Thorsten > --- > arch/arm64/include/asm/acpi.h | 3 +++ > drivers/perf/arm_pmu_acpi.c | 35 +++++++++++++++++++++++++++++++++++ > include/linux/perf/arm_pmu.h | 1 + > 3 files changed, 39 insertions(+) > > diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h > index bd68e1b7f29f3..4d537d56eb847 100644 > --- a/arch/arm64/include/asm/acpi.h > +++ b/arch/arm64/include/asm/acpi.h > @@ -42,6 +42,9 @@ > #define ACPI_MADT_GICC_SPE (offsetof(struct acpi_madt_generic_interrupt, \ > spe_interrupt) + sizeof(u16)) > > +#define ACPI_MADT_GICC_TRBE (offsetof(struct acpi_madt_generic_interrupt, \ > + trbe_interrupt) + sizeof(u16)) > + > /* Basic configuration for ACPI */ > #ifdef CONFIG_ACPI > pgprot_t __acpi_get_mem_attribute(phys_addr_t addr); > diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c > index 90815ad762ebc..8baeeb369118e 100644 > --- a/drivers/perf/arm_pmu_acpi.c > +++ b/drivers/perf/arm_pmu_acpi.c > @@ -139,6 +139,40 @@ static inline void arm_spe_acpi_register_device(void) > } > #endif /* CONFIG_ARM_SPE_PMU */ > > +#if IS_ENABLED(CONFIG_CORESIGHT_TRBE) > +static struct resource trbe_resources[] = { > + { > + /* irq */ > + .flags = IORESOURCE_IRQ, > + } > +}; > + > +static struct platform_device trbe_dev = { > + .name = ARMV8_TRBE_PDEV_NAME, > + .id = -1, > + .resource = trbe_resources, > + .num_resources = ARRAY_SIZE(trbe_resources) > +}; > + > +static u16 arm_trbe_parse_gsi(struct acpi_madt_generic_interrupt *gicc) > +{ > + return gicc->trbe_interrupt; > +} > + > +static void arm_trbe_acpi_register_device(void) > +{ > + int ret = arm_acpi_register_pmu_device(&trbe_dev, ACPI_MADT_GICC_TRBE, > + arm_trbe_parse_gsi); > + if (ret) > + pr_warn("ACPI: TRBE: Unable to register device\n"); > +} > +#else > +static inline void arm_trbe_acpi_register_device(void) > +{ > + > +} > +#endif /* CONFIG_CORESIGHT_TRBE */ > + > static int arm_pmu_acpi_parse_irqs(void) > { > int irq, cpu, irq_cpu, err; > @@ -374,6 +408,7 @@ static int arm_pmu_acpi_init(void) > return 0; > > arm_spe_acpi_register_device(); > + arm_trbe_acpi_register_device(); > > return 0; > } > diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h > index a0801f68762bf..143fbc10ecfe0 100644 > --- a/include/linux/perf/arm_pmu.h > +++ b/include/linux/perf/arm_pmu.h > @@ -187,5 +187,6 @@ void armpmu_free_irq(int irq, int cpu); > #endif /* CONFIG_ARM_PMU */ > > #define ARMV8_SPE_PDEV_NAME "arm,spe-v1" > +#define ARMV8_TRBE_PDEV_NAME "arm,trbe" > > #endif /* __ARM_PMU_H__ */