From patchwork Wed Jun 26 22:32:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 13713494 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 BEB2BC30653 for ; Wed, 26 Jun 2024 22:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JOs5Kn24ROEdyQZwTchGck2F/qhD6P7sPKafRuCx4Lo=; b=iwwYxtPFrSdih6h6HDdonrh3z2 wUYsUonKEjGSJ+UWwb8HiUW1GhehMXbvg3PhuB0Fi5MjekTg5dddUN8S+lySkrr9rfZ9JmE/rmHT1 XNobaXCBwr6K6ge6+4WT27OOQ2r1LMNoLtezwdfXZGek3hQXBopF+2rNq7HaOPb7w5sSId4Mlmuxv KfjPGOItjYCxe7b+XhB+VO/NkG1oZRrLdza19QnT5YGDZzWsQi4Mz4VbKWMLYanIypjWEOXlS7rb5 pjYDfPwxawvk/am6rG3aFUyiW+W+X4rVRk1H+QEmAokwrt47p5XVK7cx6pX5kYSc2huVtagl1fyUd by31Yb8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMbCj-00000008VmB-2wHV; Wed, 26 Jun 2024 22:33:29 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMbC2-00000008VSJ-3KEw for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2024 22:32:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2931F61D65; Wed, 26 Jun 2024 22:32:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D086C4AF10; Wed, 26 Jun 2024 22:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719441165; bh=6GkA/fPaiRxw9Ny+x8zxq13aEdGN9LuiDrvGZ0QKC6M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kKW1at+GlPWFliTg1aXL9AfLvX2rYNkYnNxrlEq1EzaDOqWieeI+cv1OpZ2HzNP7Q Mbe7HPge4Gx8DuJYHFSeHixvC/cvDeW9F7pwcb8x+2U/iYGwCcEeUEp7cmsqGCs+iY n3rAMVhdFyYCiFqjM2MLeobXTT6/jYCaHIGc58maRu6HI3bml2TJ9Zb74HygUbck8v 4qou3lYjS7iW7H7L1T/nKGBYAP6E4pJlzlauVjcAZFZkQeFaIYNnoTr5+wT46k2gBE OJzXmL0+MLlrKlqahrpxxy9v0GQzUWWi4KbXsyAhCtQ7Fy944kgom2je2wW+Nzynjv MpV5mRZiH63QQ== From: "Rob Herring (Arm)" Date: Wed, 26 Jun 2024 16:32:29 -0600 Subject: [PATCH v2 05/12] perf: arm_pmuv3: Include asm/arm_pmuv3.h from linux/perf/arm_pmuv3.h MIME-Version: 1.0 Message-Id: <20240626-arm-pmu-3-9-icntr-v2-5-c9784b4f4065@kernel.org> References: <20240626-arm-pmu-3-9-icntr-v2-0-c9784b4f4065@kernel.org> In-Reply-To: <20240626-arm-pmu-3-9-icntr-v2-0-c9784b4f4065@kernel.org> To: Russell King , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , James Clark Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kvmarm@lists.linux.dev X-Mailer: b4 0.14-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_153247_044746_8D3D8C55 X-CRM114-Status: GOOD ( 14.57 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The arm64 asm/arm_pmuv3.h depends on defines from linux/perf/arm_pmuv3.h. Rather than depend on include order, follow the usual pattern of "linux" headers including "asm" headers of the same name. With this change, the include of linux/kvm_host.h is problematic due to circular includes: In file included from ../arch/arm64/include/asm/arm_pmuv3.h:9, from ../include/linux/perf/arm_pmuv3.h:312, from ../include/kvm/arm_pmu.h:11, from ../arch/arm64/include/asm/kvm_host.h:38, from ../arch/arm64/mm/init.c:41: ../include/linux/kvm_host.h:383:30: error: field 'arch' has incomplete type Switching to asm/kvm_host.h solves the issue. Signed-off-by: Rob Herring (Arm) --- v2: - new patch --- arch/arm64/include/asm/arm_pmuv3.h | 2 +- arch/arm64/kvm/pmu-emul.c | 1 - drivers/perf/arm_pmuv3.c | 2 -- include/linux/perf/arm_pmuv3.h | 2 ++ 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/arm_pmuv3.h b/arch/arm64/include/asm/arm_pmuv3.h index c27404fa4418..a4697a0b6835 100644 --- a/arch/arm64/include/asm/arm_pmuv3.h +++ b/arch/arm64/include/asm/arm_pmuv3.h @@ -6,7 +6,7 @@ #ifndef __ASM_PMUV3_H #define __ASM_PMUV3_H -#include +#include #include #include diff --git a/arch/arm64/kvm/pmu-emul.c b/arch/arm64/kvm/pmu-emul.c index a35ce10e0a9f..d1a476b08f54 100644 --- a/arch/arm64/kvm/pmu-emul.c +++ b/arch/arm64/kvm/pmu-emul.c @@ -14,7 +14,6 @@ #include #include #include -#include #define PERF_ATTR_CFG1_COUNTER_64BIT BIT(0) diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c index 3e51cd7062b9..6cbd37fd691a 100644 --- a/drivers/perf/arm_pmuv3.c +++ b/drivers/perf/arm_pmuv3.c @@ -25,8 +25,6 @@ #include #include -#include - /* ARMv8 Cortex-A53 specific event types. */ #define ARMV8_A53_PERFCTR_PREF_LINEFILL 0xC2 diff --git a/include/linux/perf/arm_pmuv3.h b/include/linux/perf/arm_pmuv3.h index 46377e134d67..7867db04ec98 100644 --- a/include/linux/perf/arm_pmuv3.h +++ b/include/linux/perf/arm_pmuv3.h @@ -309,4 +309,6 @@ } \ } while (0) +#include + #endif