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 X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A08BAC433ED for ; Wed, 21 Apr 2021 13:56:25 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id BE25A61452 for ; Wed, 21 Apr 2021 13:56:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE25A61452 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3D4644B48B; Wed, 21 Apr 2021 09:56:24 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TLTzZAjL6C5p; Wed, 21 Apr 2021 09:56:22 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 673654B49D; Wed, 21 Apr 2021 09:56:22 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4F06E4B457 for ; Wed, 21 Apr 2021 09:56:21 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5o+VpbJ6mjB4 for ; Wed, 21 Apr 2021 09:56:20 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 3DD974B36B for ; Wed, 21 Apr 2021 09:56:20 -0400 (EDT) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F5366144B; Wed, 21 Apr 2021 13:56:19 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lZDKy-008hhW-W1; Wed, 21 Apr 2021 14:56:17 +0100 Date: Wed, 21 Apr 2021 14:56:16 +0100 Message-ID: <87y2dbpwqn.wl-maz@kernel.org> From: Marc Zyngier To: Arnd Bergmann Subject: Re: [PATCH] KVM: arm64: build perf support only when enabled In-Reply-To: <20210421134922.3309033-1-arnd@kernel.org> References: <20210421134922.3309033-1-arnd@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: arnd@kernel.org, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, tabba@google.com, ascull@google.com, dbrazdil@google.com, qperret@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Catalin Marinas , linux-kernel@vger.kernel.org, Will Deacon , kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Wed, 21 Apr 2021 14:49:01 +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS > is enabled: > > arch/arm64/kvm/perf.c: In function 'kvm_perf_init': > arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration] > 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0 > | ^~~~~~~~~~~~~~~~~ > > Use conditional compilation to disable this feature entirely when > CONFIG_PERF_EVENTS is disabled in the host. > > Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key") > Signed-off-by: Arnd Bergmann > --- > Not sure if this is the correct symbol to check for, but this is > one way to avoid the build failure. I think a better way is to get rid of perf_num_counters() entirely, see [1]. If someone acks the second and last patches, I'll even take the whole series in (nudge nudge...). Thanks, M. [1] https://lore.kernel.org/r/20210414134409.1266357-1-maz@kernel.org -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91783C433B4 for ; Wed, 21 Apr 2021 13:58:25 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37D2961445 for ; Wed, 21 Apr 2021 13:58:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37D2961445 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Subject:Cc:To: From:Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2UkyA7ac+yf2uvgtlEmusRrwb/cZ0P1Hpi2ghOOrh7s=; b=J7WNeffY8niGU/3GdVAR7hqmU +ospdEBujHdbhJuyQ2dbWiM7gx7QH9TgiNSbqEAqpX/vRwjmoiBmJlMWYubpYkK4TUJeXDgZmbrz9 wUn5HpGnlB5/Cu9smBh5Vh9YbCWXrU0oma9pRN5Zk9fqj39RtcIGjGlVPvFAVT9tRieXETFWgiyHQ cdzTnYHhBhKoCvnFGouICo7ugoqbi5LTJFpidokE2DO36GU9etFZfbJuw+8ESiOZsbf/Yjah5NpsN NZ+0+PfjLkOdB58yUo7N1ZPBmezjpHoK7axxXnOEDTugaISLbF/8Aen6ikPmYNgLh57Cv7y3BWz1O Ya7j9/xzg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZDLD-00EVmT-Km; Wed, 21 Apr 2021 13:56:32 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZDL4-00EVln-Qo for linux-arm-kernel@desiato.infradead.org; Wed, 21 Apr 2021 13:56:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=y4f/nhx85TSrTFWxCGeoYbvwuyyU+ZJC36M24VzCwYY=; b=c+cx5OTQpoboIHVQEu5NGzGXu+ tI0iJVRJbH8ojnWBsUeFbvyiTvACCVqRYjwyGJSbZfx/BGI8kOxJPRZyRcaVfoCa/uS5SPTNwSi3Z VC6ejcSXgrGAhP6U2yjl8Md4ANODUcGYm2/qVUegJlr1a2tINrA/kYzV2Klk34CPkRyGEXhU/1Eke z7whVNMcJ6MQhkUzBfYAXRikdHcIuPgLPiFjYf/N2QST2yWKsgTTH5uzm0DjSGt/FWhRuCafBwIJJ qoa8gnuUPiFZJr1Vt+Zk9+aMH2RgvEdW6+DiCnpD38PPYPIfw8mnC5dR+QuxCkiYrN/vkBwBbDS65 9EuSn+dg==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZDL1-00Cw02-Fq for linux-arm-kernel@lists.infradead.org; Wed, 21 Apr 2021 13:56:21 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F5366144B; Wed, 21 Apr 2021 13:56:19 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lZDKy-008hhW-W1; Wed, 21 Apr 2021 14:56:17 +0100 Date: Wed, 21 Apr 2021 14:56:16 +0100 Message-ID: <87y2dbpwqn.wl-maz@kernel.org> From: Marc Zyngier To: Arnd Bergmann Cc: Catalin Marinas , Will Deacon , Arnd Bergmann , James Morse , Alexandru Elisei , Suzuki K Poulose , Fuad Tabba , Andrew Scull , David Brazdil , Quentin Perret , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: build perf support only when enabled In-Reply-To: <20210421134922.3309033-1-arnd@kernel.org> References: <20210421134922.3309033-1-arnd@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: arnd@kernel.org, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, tabba@google.com, ascull@google.com, dbrazdil@google.com, qperret@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210421_065619_578423_AFFB34CB X-CRM114-Status: GOOD ( 22.14 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 21 Apr 2021 14:49:01 +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS > is enabled: > > arch/arm64/kvm/perf.c: In function 'kvm_perf_init': > arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration] > 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0 > | ^~~~~~~~~~~~~~~~~ > > Use conditional compilation to disable this feature entirely when > CONFIG_PERF_EVENTS is disabled in the host. > > Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key") > Signed-off-by: Arnd Bergmann > --- > Not sure if this is the correct symbol to check for, but this is > one way to avoid the build failure. I think a better way is to get rid of perf_num_counters() entirely, see [1]. If someone acks the second and last patches, I'll even take the whole series in (nudge nudge...). Thanks, M. [1] https://lore.kernel.org/r/20210414134409.1266357-1-maz@kernel.org -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03E68C43460 for ; Wed, 21 Apr 2021 13:56:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD96A61445 for ; Wed, 21 Apr 2021 13:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243067AbhDUN5T (ORCPT ); Wed, 21 Apr 2021 09:57:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:33508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243034AbhDUN4w (ORCPT ); Wed, 21 Apr 2021 09:56:52 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F5366144B; Wed, 21 Apr 2021 13:56:19 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lZDKy-008hhW-W1; Wed, 21 Apr 2021 14:56:17 +0100 Date: Wed, 21 Apr 2021 14:56:16 +0100 Message-ID: <87y2dbpwqn.wl-maz@kernel.org> From: Marc Zyngier To: Arnd Bergmann Cc: Catalin Marinas , Will Deacon , Arnd Bergmann , James Morse , Alexandru Elisei , Suzuki K Poulose , Fuad Tabba , Andrew Scull , David Brazdil , Quentin Perret , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: build perf support only when enabled In-Reply-To: <20210421134922.3309033-1-arnd@kernel.org> References: <20210421134922.3309033-1-arnd@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: arnd@kernel.org, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, tabba@google.com, ascull@google.com, dbrazdil@google.com, qperret@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Apr 2021 14:49:01 +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS > is enabled: > > arch/arm64/kvm/perf.c: In function 'kvm_perf_init': > arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration] > 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0 > | ^~~~~~~~~~~~~~~~~ > > Use conditional compilation to disable this feature entirely when > CONFIG_PERF_EVENTS is disabled in the host. > > Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key") > Signed-off-by: Arnd Bergmann > --- > Not sure if this is the correct symbol to check for, but this is > one way to avoid the build failure. I think a better way is to get rid of perf_num_counters() entirely, see [1]. If someone acks the second and last patches, I'll even take the whole series in (nudge nudge...). Thanks, M. [1] https://lore.kernel.org/r/20210414134409.1266357-1-maz@kernel.org -- Without deviation from the norm, progress is not possible.