From patchwork Fri Oct 7 15:45:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 1687541 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=gandalf.ozlabs.org; envelope-from=srs0=bacq=2i=vger.kernel.org=sparclinux-owner@ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R6ivKPGV; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MkXjJ3F4dz20Pd for ; Sat, 8 Oct 2022 02:46:28 +1100 (AEDT) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4MkXjJ366Zz4xGQ for ; Sat, 8 Oct 2022 02:46:28 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4MkXjJ33PMz4xGR; Sat, 8 Oct 2022 02:46:28 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=sparclinux-owner@vger.kernel.org; receiver=) Authentication-Results: gandalf.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R6ivKPGV; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4MkXjJ2zP0z4xGQ for ; Sat, 8 Oct 2022 02:46:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbiJGPq0 (ORCPT ); Fri, 7 Oct 2022 11:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbiJGPqM (ORCPT ); Fri, 7 Oct 2022 11:46:12 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB0741217E9 for ; Fri, 7 Oct 2022 08:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665157565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O4Pqcbma7I8CmezCzayfM2Dc1cTkJUS9uBKY5V7UMK0=; b=R6ivKPGV1WTUPftIQ6GlVAUdzCKgQYR9SPf9kGVdAxCGR3xkl5KbAOX2ggSG0qiYX4Vgel aZb8X8lgZltAT1DLITy3H+GBWxuuhkA/2iPZQBQRrfU2pv3FW+GcgSe+VYm3oQBBSa9DAc 2Sos5slU8mT7LTPJ6D29W6Zmqc8IjcI= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-509-2EzLDhVPMxqAUi3SmTW2-Q-1; Fri, 07 Oct 2022 11:46:04 -0400 X-MC-Unique: 2EzLDhVPMxqAUi3SmTW2-Q-1 Received: by mail-wm1-f70.google.com with SMTP id p24-20020a05600c1d9800b003b4b226903dso4535273wms.4 for ; Fri, 07 Oct 2022 08:46:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O4Pqcbma7I8CmezCzayfM2Dc1cTkJUS9uBKY5V7UMK0=; b=j00Zf51AP1/WRypXwI+C/rFt/SUAKNwh8qJ6v4Cuq0PSh2jZPJ8fPHpxWXMv+Vzf+2 nu1pxGqIvcLQ+VA9oPAyv7dt8noyaQ+R7l2HqFww0DScFMeG6X72WpbbwUx2tWFi8uvp 64xq0VJ9qyVU8gFna+Y1IJFCe1fWP5PL1WfM0HYirVURu7yENqUaSLLXIfzb5cOJ7+rW Wm0rUsp3AsVcO/v7PfHR1bs4WdCpZhIq3Lskh6fIoVWkgSpVwpp3myzNhURgm9ypZVrJ yMw2w3sZNnrDLvJEsqkbZ97r1Zh2R0440aJZLGqAdF+stytZ1m2WA3Gp0yrnm4MkXTXt YmpA== X-Gm-Message-State: ACrzQf0sJNMHhJI+7rl9Q4We/4Ghiyl00g/pTnAPSWvfsbxK4cnJKcx0 38llt+dwkJ5dmmEbXDp2KTTVzxlM/kxko11vj9yDH2UQqSlESxBbMPmABYvE+PmKErs4X2HD9gD 61z0Q9PZVNyGEyX639vBagw== X-Received: by 2002:a05:600c:474c:b0:3b4:cbca:5677 with SMTP id w12-20020a05600c474c00b003b4cbca5677mr3615496wmo.76.1665157563624; Fri, 07 Oct 2022 08:46:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5BU2FP8ts0HH9McA8hGqt4EcEkhUio8tUw5hjcE8rRRaWGVB+HCzlKu55T50nu8VVd2MVS1w== X-Received: by 2002:a05:600c:474c:b0:3b4:cbca:5677 with SMTP id w12-20020a05600c474c00b003b4cbca5677mr3615475wmo.76.1665157563388; Fri, 07 Oct 2022 08:46:03 -0700 (PDT) Received: from vschneid.remote.csb ([149.71.65.94]) by smtp.gmail.com with ESMTPSA id i18-20020adfb652000000b0022e38c93195sm2339428wre.34.2022.10.07.08.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 08:46:01 -0700 (PDT) From: Valentin Schneider To: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, x86@kernel.org Cc: "Paul E. McKenney" , Steven Rostedt , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Frederic Weisbecker , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Marc Zyngier , Mark Rutland , Russell King , Nicholas Piggin , Guo Ren , "David S. Miller" Subject: [RFC PATCH 3/5] smp: Add a multi-CPU variant to send_call_function_single_ipi() Date: Fri, 7 Oct 2022 16:45:31 +0100 Message-Id: <20221007154533.1878285-3-vschneid@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221007154145.1877054-1-vschneid@redhat.com> References: <20221007154145.1877054-1-vschneid@redhat.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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: sparclinux@vger.kernel.org This simply wraps around the arch function and prepends it with a tracepoint, bringing parity with send_call_function_single_ipi(). Signed-off-by: Valentin Schneider --- kernel/smp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/smp.c b/kernel/smp.c index 7a7a22d69972..387735180aed 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -160,6 +160,12 @@ void __init call_function_init(void) smpcfd_prepare_cpu(smp_processor_id()); } +static inline void send_call_function_ipi_mask(const struct cpumask *mask) +{ + trace_ipi_send_cpumask(_RET_IP_, mask); + arch_send_call_function_ipi_mask(mask); +} + #ifdef CONFIG_CSD_LOCK_WAIT_DEBUG static DEFINE_STATIC_KEY_FALSE(csdlock_debug_enabled); @@ -970,7 +976,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask, if (nr_cpus == 1) send_call_function_single_ipi(last_cpu); else if (likely(nr_cpus > 1)) - arch_send_call_function_ipi_mask(cfd->cpumask_ipi); + send_call_function_ipi_mask(cfd->cpumask_ipi); cfd_seq_store(this_cpu_ptr(&cfd_seq_local)->pinged, this_cpu, CFD_SEQ_NOCPU, CFD_SEQ_PINGED); }