From patchwork Fri Jun 16 15:08:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 109190 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1418694vqr; Fri, 16 Jun 2023 08:18:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6nfdef5pE00GheDcgcoiybVtMzJ3hrewQKJnYwBkEZcjauumZs6pW344gOfeoxSDU8QYqX X-Received: by 2002:a17:90b:3611:b0:25e:91ef:8b1f with SMTP id ml17-20020a17090b361100b0025e91ef8b1fmr2095936pjb.3.1686928703074; Fri, 16 Jun 2023 08:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686928703; cv=none; d=google.com; s=arc-20160816; b=kaWMFjGUwopFdb77LDf9ly/FmBLviItdpAEExEbwGqlM0XOlzC5hYt7Ez/vYI73UlF M3FyvqfSSveq765qOsYudRpHIL0TcJy+vhvISmoVq9PaeD6ME5JEs5ceMAes7PN5GmT9 BpgXC2sVKXSJI18RTBoOnv9LtitsbpQz7V8iynxZP8mKoUf5sAVYgC7mZbhrHDe5gyIU BZuLmYA+AvYe8CjhHWmnhO8CybdE8AGxyVkm1nrnwzinKoo/EnftU68xqZgZwDCTQMMP 27rCanLulHUYsp9O4P4f3oCCGanHO3Z4hIViZdQrvHeMg/gHQstLq2ShkjqgmJPg7mIk Bl1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=iXB+cKgSU3o8/scNiCQIc4BV8pTRs/x28lCF92PTRuI=; b=pKw3VdkvonIxtJ8T30c4/DdKGaUVVVf6Cg2CoLDAJeuu8l8HsxqzsefECgKAJizj44 fdX1s6bVFhfkbGJYCcl6p6mZSXJZuan87RZsJoNhBmt3XyvB18KyA1ujIfhOoysjIo5+ Rp09wcmoyMdz5Vc7h1g0l4iOyFbUI7RS7E6OubavC3N0rWbqKJeB7Hm4g/DgfrjnNdg1 keX6euliXxTHAA57LOuyH5jMK5Vb+0FPsmvkhRa3gRrdEwl1sXxMhK2rUxgsuXJKwZ1P Z3/5YLbuNm2tjPooF+JwrN9U+KYnTfw7VdlabDZt+SpDCn09qg9yj+EPN3eNMyTWWy0o EjqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=a1hwy88D; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f65-20020a17090a704700b0025bc95b20b8si1798931pjk.15.2023.06.16.08.18.10; Fri, 16 Jun 2023 08:18:23 -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=@linutronix.de header.s=2020 header.b=a1hwy88D; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345934AbjFPPI6 (ORCPT + 99 others); Fri, 16 Jun 2023 11:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345884AbjFPPIp (ORCPT ); Fri, 16 Jun 2023 11:08:45 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6208430EB; Fri, 16 Jun 2023 08:08:43 -0700 (PDT) Date: Fri, 16 Jun 2023 15:08:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686928121; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iXB+cKgSU3o8/scNiCQIc4BV8pTRs/x28lCF92PTRuI=; b=a1hwy88DZhY5VM9TtZDohFeAJDSX/qYnJBLu4TS6QqhaBCwujBrfeflQJ0OBv75j26pt0R DbhMNwrj5tJ/CsqpSrLLFpi12D2xrwBR/kqoIGrBGnJV5ICuRaAyQ+ut3iTM2u/u+c41/B N6E+H02SuNrEcsdlzvFWiHaqa+zWJNWCuLcfYlbUBUK7fzH89ilwi3kb5UAkDmz4qPxl9Z fSytWBwsKb8POgQ6kHSQ1G+c1Pe8eRUQSA8bG2Ph5m8c6H+AcOMU9n/nNmDjfp+0uD6PnT AnyCJIG1qt3qh7hMTF0yYU2CVKqCAX4RuXkq2XkX5dpzWpqnh/eTByFRlDiQaw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686928121; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iXB+cKgSU3o8/scNiCQIc4BV8pTRs/x28lCF92PTRuI=; b=ZTeS2yGYvb4CeOJw9XsXEzHIQWBNOVz+Nz73uhPwi/MUlErht4Ry7mXYKio024kVoe19RH yUMVCgwevTTF4mCg== From: "tip-bot2 for Marc Zyngier" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/urgent] perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype Cc: Reiji Watanabe , Marc Zyngier , "Peter Zijlstra (Intel)" , Mark Rutland , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230616114831.3186980-1-maz@kernel.org> References: <20230616114831.3186980-1-maz@kernel.org> MIME-Version: 1.0 Message-ID: <168692812141.404.12009878705497041085.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768860458762555904?= X-GMAIL-MSGID: =?utf-8?q?1768872951765397072?= The following commit has been merged into the perf/urgent branch of tip: Commit-ID: b50f26a44887f3f71ff5457135ee1d5f1d542d7d Gitweb: https://git.kernel.org/tip/b50f26a44887f3f71ff5457135ee1d5f1d542d7d Author: Marc Zyngier AuthorDate: Fri, 16 Jun 2023 12:48:31 +01:00 Committer: Peter Zijlstra CommitterDate: Fri, 16 Jun 2023 16:46:33 +02:00 perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype 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 Signed-off-by: Marc Zyngier Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Tested-by: Reiji Watanabe Link: https://lkml.kernel.org/r/20230616114831.3186980-1-maz@kernel.org --- include/linux/perf_event.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index d5628a7..c8dcfdb 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -1845,9 +1845,9 @@ int perf_event_exit_cpu(unsigned int cpu); #define perf_event_exit_cpu NULL #endif -extern void __weak arch_perf_update_userpage(struct perf_event *event, - struct perf_event_mmap_page *userpg, - u64 now); +extern void arch_perf_update_userpage(struct perf_event *event, + struct perf_event_mmap_page *userpg, + u64 now); #ifdef CONFIG_MMU extern __weak u64 arch_perf_get_page_size(struct mm_struct *mm, unsigned long addr);