From patchwork Mon Oct 2 16:45:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13406467 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 B339AE748F8 for ; Mon, 2 Oct 2023 16:46:49 +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=NoA1QLwRLJBQcAh2z9zEQBYziAm/LhenRxYWev2XR8o=; b=jBSC6FlxH4z8Sg AyLJ5IOK6a2k695Esdr+NkAOZFOI+XiaVl3MO7CN/wU3XAvxQI4plmcrmb1RbwDBECewmADnIX/Md tPUgXR1atr6X6mgwxxtuOPZUqY2M+IS+Q/CNMuR1av3/wUk/4mwTk8vlAW7mO9J54v+bX/dxrRQRp gDkhzZAOfmn7ZULev+4fllWxCbrVxzEycLeyrmAcy5bGKEZPy3u35qGY0lCe2hILrwZIKq9VP88Pm z1vHStR+lNzY8eRWnxFAVdAMpx9pidoi4XOcICkS5VqDJaBMe4Wt9anzpXSHKJo9R4UUrD90Zg6yq I4VSTnSZf5xOlNvy8f9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qnM3p-00D5qj-0m; Mon, 02 Oct 2023 16:46:21 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qnM3l-00D5oX-1i for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2023 16:46:20 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-690bccb0d8aso13428423b3a.0 for ; Mon, 02 Oct 2023 09:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696265176; x=1696869976; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+OYydoz0zgcPlyOphP3bRXT7u9ruoeqId11POu4ytwI=; b=Qrjf7NHo7Q1AhV5YkomElOmt+OFncStr5TEN7KVilUhy4LUN/1dkl8fz/8EP0fDlkg aaaIzOSmdc0ERo4muAbGzLalmIlzYzTgL8zHl5YkZtgQuGPz01HjKlCfb/5h5tSTZB4C Ok9PeSWRWOowUJGz1G3OGjalhrsoUUpGmMpO0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696265176; x=1696869976; 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=+OYydoz0zgcPlyOphP3bRXT7u9ruoeqId11POu4ytwI=; b=fwIZ9CffIXq9wE6L2u1bmxUpL2d9hks5EcJ7jtdBBElRhkPqir/ExnaEl8S4RU1qft PImMHIDt0yxIXFycJX0Pq4HbJgvXQfCTYKjYEp3UJtoX6/3oWyGMQJ+7BeXS3NU0gTqH CBpbDzjp8YNbEhLMy3dt4LkrHT1sljWPNIzuXdcTFKZF+CrEDQdrgWiADlq49+iNfU8a SM0nO4UXijieWqJGz9ISVhihH5lWsXzpAC3klcn7Id/KxRbW/sELsGvmxtVNbX1MhJTA LWoKGYPtpayd3ZUm+IiJAJAUaEIhbs5ov8jekCjY/8M36V+9OVFVmWjsJzflOlsWUQ9b i1rw== X-Gm-Message-State: AOJu0YxE+Vz0K/AR5vguvCLfn9geG55Ck1QcvqEQdFQXlC6tW84cUpTE kylUsCO49/ZBkyp94ZmoS1I1Ew== X-Google-Smtp-Source: AGHT+IHLivOZAOPYQoFyzGuRgSJcfrcRS4DH8AgOzW7A69owybG54PttqaXKEA5bmpeD5DDV61nKAQ== X-Received: by 2002:a05:6a21:47cb:b0:163:e1a1:5a16 with SMTP id as11-20020a056a2147cb00b00163e1a15a16mr4527290pzc.31.1696265175774; Mon, 02 Oct 2023 09:46:15 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:bb:b2b6:1831:5edd]) by smtp.gmail.com with ESMTPSA id n3-20020a170902d2c300b001c737950e4dsm8455904plc.2.2023.10.02.09.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 09:46:15 -0700 (PDT) From: Douglas Anderson To: Catalin Marinas , Will Deacon , Mark Rutland , Marc Zyngier Cc: Stephen Boyd , Valentin Schneider , Chen-Yu Tsai , Douglas Anderson , D Scott Phillips , Josh Poimboeuf , Peter Zijlstra , Sumit Garg , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] arm64: smp: Don't directly call arch_smp_send_reschedule() for wakeup Date: Mon, 2 Oct 2023 09:45:30 -0700 Message-ID: <20231002094526.2.I2e6d22fc42ccbf6b26465a28a10e36e05ccf3075@changeid> X-Mailer: git-send-email 2.42.0.582.g8ccd20d70d-goog In-Reply-To: <20231002094526.1.Ie8f760213053e3d11592f892b30912dbac6b8b48@changeid> References: <20231002094526.1.Ie8f760213053e3d11592f892b30912dbac6b8b48@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231002_094617_567665_FE41FC10 X-CRM114-Status: GOOD ( 17.81 ) 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 In commit 2b2d0a7a96ab ("arm64: smp: Remove dedicated wakeup IPI") we started using a scheduler IPI to avoid a dedicated reschedule. When we did this, we used arch_smp_send_reschedule() directly rather than calling smp_send_reschedule(). The only difference is that calling arch_smp_send_reschedule() directly avoids tracing. Presumably we _don't_ want to avoid tracing here, so switch to smp_send_reschedule(). Fixes: 2b2d0a7a96ab ("arm64: smp: Remove dedicated wakeup IPI") Signed-off-by: Douglas Anderson Acked-by: Mark Rutland --- I don't 100% know if this is correct and I don't have any hardware that uses the "ACPI parking protocol", but I think it's right. My main incentive for this is that it makes it easier to backport pseudo-NMI to kernels that don't have arch_smp_send_reschedule(), but I think it's also more correct. If for some reason we truly did want to avoid tracing here, please shout and we can drop this patch. arch/arm64/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 0a6002243a8c..b530d8ef9c1d 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -1063,7 +1063,7 @@ void arch_send_wakeup_ipi(unsigned int cpu) * We use a scheduler IPI to wake the CPU as this avoids the need for a * dedicated IPI and we can safely handle spurious scheduler IPIs. */ - arch_smp_send_reschedule(cpu); + smp_send_reschedule(cpu); } #endif