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: 13001256 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4EEF2C433FE for ; Fri, 7 Oct 2022 15:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=My8lTZx/HQ+R3Kl9mUuF396Ktpm71mAWs6YTWY2TJGA=; b=v0JM8lCyKFgHiC sy1TMUB21jU8eVWn+fc59YN8ID1zicqgVCteiQJ7NgN4dS/SWLypEH9w/xshYzJU+1Js6smfpFdLR DdWD3zIdnXIjONl+ufRzySKw/WA6GmiXLLsMi50H4ChPJRy1W3sdulAdB+1HlYl1PQTB8sAHD8ngJ yFkjwP39UDc8nScfz5MGURQdNtPytom/MMwWshxtvwIXYIPA4xCXo1BHYNvM1k19XGRESOnMv2rZr 8nhvw38LTG+EfG+it43ebMo3F78rrgKH0ki8qvZbHlWvE/FeVUQfGUvtvDndB4WFRqEsHwQZETs+T c7iQioq8E1gf63n3a2yQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogpYf-009Yud-8w; Fri, 07 Oct 2022 15:46:41 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogpYE-009YWr-F6 for linux-arm-kernel@lists.infradead.org; Fri, 07 Oct 2022 15:46:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665157573; h=from:from: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=O4Pqcbma7I8CmezCzayfM2Dc1cTkJUS9uBKY5V7UMK0=; b=Z34aUyNcSoKrB2Thju31/dEEHuB3z5X8/aW3LqJTN8CMSddAnt9ER5qRX5Rr5xCVmI6BDW 0wApv/aKsJ8bseOiXy7la3EcXhcSYrBJOY1DXFsUwiTk1CgjN7zy/WC9NHjF9qb967G3Uo kSvanby2h0kAbYgSyQu2fq1MK3+2oqo= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-655-3zvQtJXRPHmk5BS96cGAcw-1; Fri, 07 Oct 2022 11:46:04 -0400 X-MC-Unique: 3zvQtJXRPHmk5BS96cGAcw-1 Received: by mail-wr1-f71.google.com with SMTP id t1-20020adfba41000000b0022cc6bcd8dbso1556310wrg.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=NvaQcI8sxbj8EghDaEsHpwhrhgRwFHlXX9hNEyhuhdFzICtVmFLZzZ2uITFK1+misC cnT1Fsp3ZNJKJeXY8b/1dZbEZE0vszsIZPY0WnReVQD9kkgaLJQpQArIRbU+zIX13+Jz KYpI2FvuzzRVS6GYQCQ+6dLfPtFKoIMNTeG5qk0uj8wfS2tunE/ZRcHYKizF6zH6UYGg S2NiQDb9Iy2esJ6G85JOkmBTdmIqVqZaES7IIEp1CVNePGwRCsSnMTzHFIZ6Q/vod84B dJTfpT7N5L+Bb75/J4cBdUP3pwXAy8Q8G+6Q05O290fTuIDqF3rgvhJsS57sdYcyU/CJ Xr5g== X-Gm-Message-State: ACrzQf2/niE2fqkU1KZb6yHBJRY9jGnMaVeqEa+J2xIgMaWVdNooFa5e LL1ZLt2bAJX/bu6j9xooRzoYaGSZJk/Bmda0PBay4HRHWallEbS+UO5QSI6iSnIIwgl1pUnJziI /saiPAPpCkXOlohlvD5ZKUgCiqWCVxU0bUck= X-Received: by 2002:a05:600c:474c:b0:3b4:cbca:5677 with SMTP id w12-20020a05600c474c00b003b4cbca5677mr3615507wmo.76.1665157563641; 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-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221007_084614_592749_E7316A48 X-CRM114-Status: GOOD ( 14.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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); }