Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4633506rwd; Sun, 4 Jun 2023 09:15:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6D3NKTWw7KnmhMfjN7ftGHByE0nGkJcq/Aj5019kWC8LTDFmZ9mhoKR95z1wtsosGVHSte X-Received: by 2002:a05:6a20:e619:b0:10f:130c:53e4 with SMTP id my25-20020a056a20e61900b0010f130c53e4mr1096931pzb.41.1685895359423; Sun, 04 Jun 2023 09:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685895359; cv=none; d=google.com; s=arc-20160816; b=f8FrbljQSsOoR/pAvEZ1twIljtBRDDaNKcXOQgQIsLZBj/gZDP+54+jbkvKpx3blXD auD8ni74ChKDpRuso5uNYkQjnpodoLTuQaME0oipBQ7SyTKcyCAT9oOKLmasXTJ7dZsS R3NZ9ANrUMBSj+pk5MwSLiZjmq3Y2xdcmZl+7ccaG+NwX/YS6Z4uDLCwiFAkUsZUeLXw 2IWrf8x+jF+591ODk7I2nnQqei1OZjIKAJpqT/TEOAB+9rEGytgSs11cNMTat/ZY2LPQ O/c+qe6alq7GTEPev0sfNZypDHdf6mrSgJjf5YJ7ZFRLbtqafTmgMJYzRZ/ZIl0E0p6R n8UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MT6YZiuz37HgWSCT/DG/v2E2JSUlRRZpIh9BRpWmVMk=; b=lIn21oZ4bVgWFCzWARwvWCjML+3QD0+sna2YjmRoIiJFWP+RpmPklyz9ZGQy3UWipM mVJO+k0pjc3O+T1ssGkQAn1KzuPrHyv4InRTaD30yCNBjLba5dSzUruZO0Xprl20LnLo zMVC48JVRqYaXfmkO9l0s9whYI2FwvbpDSckdfeA2DhJO0tqhKFM4/aGrRstFKTqjA4R azrpCAh2N3rnPeuqbQlI4NehblM2JetuHll83E4KlB8+DF80VOttCndg2yiE00fHukgm iGLYjSijAwAGv1OANI5x9ICIza8YEViWcmbU1+zwNX5XBO6xFm5TNHeUB7MS0lWwzADy Eg9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=GzIgGJ7I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc8-20020a170902930800b001ae8c22791asi3977485plb.477.2023.06.04.09.15.41; Sun, 04 Jun 2023 09:15:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=GzIgGJ7I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231723AbjFDQIS (ORCPT + 99 others); Sun, 4 Jun 2023 12:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjFDQIR (ORCPT ); Sun, 4 Jun 2023 12:08:17 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9497BD for ; Sun, 4 Jun 2023 09:08:16 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1ae64580e9fso95745ad.1 for ; Sun, 04 Jun 2023 09:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1685894896; x=1688486896; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MT6YZiuz37HgWSCT/DG/v2E2JSUlRRZpIh9BRpWmVMk=; b=GzIgGJ7IC/wjbYmLe+r34uKpGISvrOBJAY/A+7q9fE5poImr/gyR2OFea1Bn4lDAsX UZOPJA+9K+rN5UN9BrU0oOvLRIgYOmrzeVpUtLNZtPCXG3yzHMqsJ67HjywY2y81L711 7eHKfWgObGFSragPSFvoHIZDOClyK718aXF9kwuPGcJ44ba9HqxvIZSb8snucKCDLHrR lCOzd3XOqyYdyLLUCaHUVDMlA+ZMdNoE17ltFBB5r5p4BAJA0HFqnlIZzHEZC+eKdvwS IMg1+U+6YY8JNG7eXj2q8IqB634KRzq+5Mu85kdrcmA0rFcWTSJhI1j2nmpUONkgBz1x 26eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685894896; x=1688486896; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MT6YZiuz37HgWSCT/DG/v2E2JSUlRRZpIh9BRpWmVMk=; b=Y+r8j87ccmyB88VmDkwY9zjHSNYB1zetOPl6gTqfPmFYHuqJTTSj8CL6DcPYyGJYVt aXflRxlpkCrYAb9IdF/K76EGRAVeuw21e+IjxeJR660ZdrirMzwyVNbpu5oGD4BcYdg5 1J8HNtbS5jXuKVRdobUvRRsck6rlQqUQfM66jeBCaTsAaoh/7+0+rRj1JHoBmbvRjFOr V2ic2EZCEk+Pi2eyVw+vkexxNJnDbi9LnXygjhRnVRUCmpV0aNl3WMx6TiMJ4GCUxlQh 7DDyqrLqP9sA/Fo6PUAH9h0gNm0Z101REpeEcD+B8fLMdTejbYSdG6hT70HpSETsO7NL vPfw== X-Gm-Message-State: AC+VfDyDbUPo16xqDke/w+ksvT55laPD6fJklYIYZLTNo250N4JGiob4 GHJj9LsITMnVP9jYC/RqXFoCTpyfs+1M6YNKdn6X3w== X-Received: by 2002:a17:903:2055:b0:1af:90ce:525f with SMTP id q21-20020a170903205500b001af90ce525fmr469981pla.22.1685894896164; Sun, 04 Jun 2023 09:08:16 -0700 (PDT) Received: from google.com (223.103.125.34.bc.googleusercontent.com. [34.125.103.223]) by smtp.gmail.com with ESMTPSA id t11-20020a63dd0b000000b00543b4433aa9sm340946pgg.36.2023.06.04.09.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 09:08:14 -0700 (PDT) Date: Sun, 4 Jun 2023 09:08:10 -0700 From: Reiji Watanabe To: Marc Zyngier Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Mark Rutland , Will Deacon Subject: Re: [PATCH] perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype Message-ID: <20230604160810.eu7egpjrcb6ettoh@google.com> References: <20230603082519.1088285-1-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230603082519.1088285-1-maz@kernel.org> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,FSL_HELO_FAKE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 03, 2023 at 09:25:19AM +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. > > Reported-by: Reiji Watanabe > Signed-off-by: Marc Zyngier > Cc: Peter Zijlstra > Cc: Mark Rutland > Cc: Will Deacon Tested-by: Reiji Watanabe