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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54005EB64D7 for ; Fri, 16 Jun 2023 12:52:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344036AbjFPMwa (ORCPT ); Fri, 16 Jun 2023 08:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229560AbjFPMw2 (ORCPT ); Fri, 16 Jun 2023 08:52:28 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7500E30F7 for ; Fri, 16 Jun 2023 05:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Pc2nHptoZyvja0c5oQk9KVyr6kxRddZ7zBs/vCuF+04=; b=UWzwiNkzX105QrRhSoW5b6JVvK jlUrrcskV14PjmWR0YtuSThtVVaqhVEiC9ThwV4dmiIMRPb/rVyUmPeG2WVzhw+ZQ9EH9+P4kTo8Q ZHJP+aKZOwkM1Cb3pDd1IO5cHgvOV8nV9yrSpTkunzC5r7ObWCnamOLWjR0AiZejVSofQLbZZVssv C43IXwhUHESuAJ6kBSLfRZedMHRbG6U5+sEdteufFSeAlYve+SEj4AoOA3LAQIB6ZGsNzA5VfyuRz KfQ+IFRL2YABACnV7EMz3IiJi3Q4oEzqNg5Aol2nq4KNgrYt3uB5lA52RRXt/i/+0y+hxQd/uuTon aG8a3Tbw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qA8w9-0090kh-05; Fri, 16 Jun 2023 12:52:21 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B440530020B; Fri, 16 Jun 2023 14:52:19 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 955AA27438941; Fri, 16 Jun 2023 14:52:19 +0200 (CEST) Date: Fri, 16 Jun 2023 14:52:19 +0200 From: Peter Zijlstra To: Marc Zyngier Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Reiji Watanabe , Mark Rutland , Will Deacon Subject: Re: [PATCH v2] perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype Message-ID: <20230616125219.GF4253@hirez.programming.kicks-ass.net> References: <20230616114831.3186980-1-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230616114831.3186980-1-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 16, 2023 at 12:48:31PM +0100, Marc Zyngier wrote: > Reiji reports that the arm64 implementation of arch_perf_update_userpage() > is now ignored and replaced by the dummy stub in core code. > This seems to happen since the PMUv3 driver was moved to driver/perf. > > As it turns out, dropping the __weak attribute from the *prototype* > of the function solves the problem. You're right, this doesn't seem > to make much sense. And yet... It appears that both symbols get > flagged as weak, and that the first one to appear in the link order > wins: > > $ nm drivers/perf/arm_pmuv3.o|grep arch_perf_update_userpage > 0000000000001db0 W arch_perf_update_userpage > > Dropping the attribute from the prototype restores the expected > behaviour, and arm64 is able to enjoy arch_perf_update_userpage() > again. > > Fixes: 7755cec63ade ("arm64: perf: Move PMUv3 driver to drivers/perf") > Fixes: f1ec3a517b43 ("kernel/events: Add a missing prototype for arch_perf_update_userpage()") > Reported-by: Reiji Watanabe > Tested-by: Reiji Watanabe > Acked-by: Mark Rutland > Signed-off-by: Marc Zyngier > Cc: Peter Zijlstra > Cc: Will Deacon Thanks! in perf/urgent it goes