From patchwork Thu Nov 24 12:03:04 2022 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: 25491 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3356724wrr; Thu, 24 Nov 2022 04:09:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf7i3xzQceNBcdtuWTjpPBjMvvA5aRSEhLO21VrOxjIx4MgkjxTiAPH9wAHJImfC3OYJ7kEb X-Received: by 2002:a17:906:32ce:b0:78d:9022:f146 with SMTP id k14-20020a17090632ce00b0078d9022f146mr11280349ejk.656.1669291774066; Thu, 24 Nov 2022 04:09:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669291774; cv=none; d=google.com; s=arc-20160816; b=zvV3DEK6kqnHS67ct1g/u29cwRxj16hZ2jvKsthqEeveH7piU2n8hlA8I5ayFLYdYD UzWlQQnCct9+ogF2vtX2/P3zy6FaP/uJiNIlKkQaLzJ3H6xZfPwhaYr4mFIwIGzeWNjA W+XYw71jKQ+UpJRPme5Ff3RA8nTCHDXYy2bL1m1a8yH2zJMMXciF4l0pIVRCHT2dX5A7 vtvLOgLSyuBV5N3aETNHCw3QFzTHXwXzD6oZwAHHBGS55hynvjwQOEvM+xa9HwRojny7 xSoOxOqShQBWlSWrTwcgffyvcspqvc56kTq4sOk14mpdBSy90ga4VCyN1Ek/1/all7mK BT3w== 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:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=xqEjEcL0906OzkqaFV8QMEyw4W77Lb+HyFLuikr0780=; b=JM2HSmTq6N6+TawKhHFSkYEoPDi/TzKuw+AmMtKDwhGr16dyYbYIVetstdGuydC03q wWVMbvZZ2sBbdlAD/pEHQag37/BMTULwloETw/4OYPpqHtJ+MsseCHR4Kf8XNZbLf+bq Up0Nvlqkuf33cAzOl6UvkHJC+Tz0E5Bipn/kNF6bHTYq606JZegrx8xF7KefAAyoa0yU xqDGaIfk8sfee9VeFo3RpbLX5PFgPWFyDTED4e1+p/Aj7ne9kSoe4rYz0dYDAPFSf453 mAI6feKicDMUoHomj53AhZA4/3OGPD15uK2k6AegKFm4vfsBjWvC/DbdKDr3CtX6jY+W FzWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="NaUw8Ct/"; dkim=neutral (no key) header.i=@linutronix.de; 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 eb5-20020a0564020d0500b0046a711ae23csi269744edb.515.2022.11.24.04.09.10; Thu, 24 Nov 2022 04:09:34 -0800 (PST) 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="NaUw8Ct/"; dkim=neutral (no key) header.i=@linutronix.de; 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 S229668AbiKXMEK (ORCPT + 99 others); Thu, 24 Nov 2022 07:04:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230339AbiKXMDn (ORCPT ); Thu, 24 Nov 2022 07:03:43 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5029664A01; Thu, 24 Nov 2022 04:03:07 -0800 (PST) Date: Thu, 24 Nov 2022 12:03:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669291385; 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; bh=xqEjEcL0906OzkqaFV8QMEyw4W77Lb+HyFLuikr0780=; b=NaUw8Ct/wQ51M21IlEEsRiEBcSmOfvIaxNTEHFxYnyoMfB1m/8XSNxxOSOs/0NjeRY63tP YBqfGqXuskfzgc7C9GpJvTJzKCFmM/G/wcSEhl9pwzJkgKviBhbSL/ibjp5qvwQMBfWkpK ZEBzxYw3B0HtGrQL+T1f98JzMRhyucienji2OIhRJXFBpX6uJqKYOTSs5YXYMBOoI/LrK1 yADo4De3mXiJr/Ne6m4JWsHiiR67cjgzYig3pDRqyxVy72V4d6ge1y07P0acms09+XHhnt h56NBa+jnu0WudSN0QggkTmTatbqktfCRbSLCIzgE/7iFHYYWcJA/yi/LHTJaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669291385; 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; bh=xqEjEcL0906OzkqaFV8QMEyw4W77Lb+HyFLuikr0780=; b=9tTP3yHouq7z6fZ0TjFPXV2A02uU7nyzKcXDkeD0gko5oymE8Qr+XMdknQhfvRnn5gRNg3 OQ0i3zP3QBZimSAg== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf: Fix function pointer case Cc: kernel test robot , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <166929138452.4906.418857021586058320.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 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?1750379291636499346?= X-GMAIL-MSGID: =?utf-8?q?1750379291636499346?= The following commit has been merged into the perf/core branch of tip: Commit-ID: 1af6239d1d3e61d33fd2f0ba53d3d1a67cc50574 Gitweb: https://git.kernel.org/tip/1af6239d1d3e61d33fd2f0ba53d3d1a67cc50574 Author: Peter Zijlstra AuthorDate: Wed, 16 Nov 2022 22:40:17 +01:00 Committer: Peter Zijlstra CommitterDate: Thu, 24 Nov 2022 11:09:18 +01:00 perf: Fix function pointer case With the advent of CFI it is no longer acceptible to cast function pointers. The robot complains thusly: kernel-events-core.c:warning:cast-from-int-(-)(struct-perf_cpu_pmu_context-)-to-remote_function_f-(aka-int-(-)(void-)-)-converts-to-incompatible-function-type Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) --- kernel/events/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 5f262f9..f2b865c 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -1119,6 +1119,11 @@ static int perf_mux_hrtimer_restart(struct perf_cpu_pmu_context *cpc) return 0; } +static int perf_mux_hrtimer_restart_ipi(void *arg) +{ + return perf_mux_hrtimer_restart(arg); +} + void perf_pmu_disable(struct pmu *pmu) { int *count = this_cpu_ptr(pmu->pmu_disable_count); @@ -11270,8 +11275,7 @@ perf_event_mux_interval_ms_store(struct device *dev, cpc = per_cpu_ptr(pmu->cpu_pmu_context, cpu); cpc->hrtimer_interval = ns_to_ktime(NSEC_PER_MSEC * timer); - cpu_function_call(cpu, - (remote_function_f)perf_mux_hrtimer_restart, cpc); + cpu_function_call(cpu, perf_mux_hrtimer_restart_ipi, cpc); } cpus_read_unlock(); mutex_unlock(&mux_interval_mutex);