From patchwork Mon Sep 5 14:18:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wonder_rock@126.com X-Patchwork-Id: 12966508 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 EFE0AECAAD3 for ; Mon, 5 Sep 2022 20:22:26 +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: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:In-Reply-To:References: List-Owner; bh=BuHrkpiwzQFCcp4Qc74ZbbQvF6SVD6BZgIiYVAgoDYc=; b=Zlo9hfmxiQm/bv 9BJX6g749XtMr3ykbzM8fAjIBmCk/Cr/D0mbYbLGaaiB+k1ET0qat9kqcHFuy5m4ZTo8gsZJv48Ne 8EkbkqC6AFKNKT62L5Oxwb8+iw4EuHQh4ZvF4ixtlglQVatTBxkMFeqQU3bkYtn6M1OCnvcOj1hK0 ebbeJCeqzkXwBmiqNLPQX9Ws2509Rliy7s8ZcMmxhl5vj3uVVoqB6WZd0pQInFKAdxW1Qh40ew9n5 59uG4+S8s0KnJiA2GEa1UBb8ssLc2ozFtMpP4bNyBuAZ3oSdCFwxRdG7O7Lb9BCTp0Ql2CPrGWtyh xfVi7rzby0aw6rXnp0Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVIb0-00AJEX-9Y; Mon, 05 Sep 2022 20:21:27 +0000 Received: from m15112.mail.126.com ([220.181.15.112]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVCwK-004JRo-PR for linux-arm-kernel@lists.infradead.org; Mon, 05 Sep 2022 14:19:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=Wlj2+ degXH+iEC0bffOo5ceIWENK7IpGnLJ5xjDb3JI=; b=n9vkRqF8UuCxLCetJsYXO uDccjUofUwUVfrJvltvAZDqrDFkmZuuSBflRJP5gSNlEffzC3px/K2oidnSDbNw3 y8yaCHpovxqbzmyrmZFPYtoUwCPtmT6xj0Bwll3YXhedyPXF15Qf3e7e7aWPik8c 7GsD2SH3agguLVTMI4Vkgw= Received: from localhost.localdomain (unknown [180.113.78.212]) by smtp2 (Coremail) with SMTP id DMmowABntbE+BRZjKFbBAw--.25777S2; Mon, 05 Sep 2022 22:18:39 +0800 (CST) From: wonder_rock@126.com To: catalin.marinas@arm.com, will@kernel.org Cc: frederic@kernel.org, ardb@kernel.org, wonder_rock@126.com, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] arm64: preempt: Add NEED_RESCHED to the preempt_count() Date: Mon, 5 Sep 2022 22:18:29 +0800 Message-Id: <20220905141829.28605-1-wonder_rock@126.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: DMmowABntbE+BRZjKFbBAw--.25777S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Wry5JF18WryxArW8Xry3twb_yoW3AFgEyw 1fXr409F40yFnFq3Z0ya4UJr1jkw18XayDWF1rAF97Aw1DCr17Gry3Xry8Kw1fZrs5Grs3 Xa97GrWUAwsFkjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRArc-3UUUUU== X-Originating-IP: [180.113.78.212] X-CM-SenderInfo: xzrqvv5ubu0ubn6rjloofrz/1tbiJABzgVpEFi3VUwAAs1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220905_071905_341891_45008608 X-CRM114-Status: UNSURE ( 7.98 ) X-CRM114-Notice: Please train this message. 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 From: Deyan Wang preempt_count() will be checked in preempt_schedule_irq(), we need check if NEED_RESCHED in preempt point. Signed-off-by: Deyan Wang --- arch/arm64/include/asm/preempt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/preempt.h b/arch/arm64/include/asm/preempt.h index 0159b625cc7f..083b0fd3c52a 100644 --- a/arch/arm64/include/asm/preempt.h +++ b/arch/arm64/include/asm/preempt.h @@ -10,7 +10,7 @@ static inline int preempt_count(void) { - return READ_ONCE(current_thread_info()->preempt.count); + return READ_ONCE(current_thread_info()->preempt_count); } static inline void preempt_count_set(u64 pc)