From patchwork Thu Jan 7 00:12:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1423100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=a8Nx0+sq; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=mail header.b=IC/mVtE0; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DB6BK1czlz9sRK for ; Thu, 7 Jan 2021 11:12:41 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=ruXKPk8NMi/+QfJMotVcGBuM1yA6mVUwxaEMEowdquE=; b=a8Nx0+sqUf0yhM/apAADOdvUIQ nf/elbasn3++2d38MFN27vJtrj5fY3lcIAsAmWnOhk9mIE+s/uWSX6+PkoX5ba6eYmNdw6YPx9esN 9PAfYUL8z00KqwRr5UlF+xqUyYHWo5ej+WatXDrUdS/lNdoxyt56U68YOViVzWDpE7v+LfzE16BUt sgqTzRbEzPGOcmhaFtyBnA2RUhBYbxQDqc1vlQ5UmubcrOEgVJdwcEuYwXZlSO3kpbiiITFxDfWnG ahoELN+2MlK3GIhfEvG+gjSwbGrhskNA5rtZz5Wno8i0m8h+JRFIUpMy2HnCvwltDVQgPS8M0Yec7 pnbySiGA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxIus-0008K2-2Z; Thu, 07 Jan 2021 00:12:38 +0000 Received: from smtprelay-out1.synopsys.com ([149.117.87.133]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxIup-0008JK-PM for linux-snps-arc@lists.infradead.org; Thu, 07 Jan 2021 00:12:37 +0000 Received: from mailhost.synopsys.com (sv2-mailhost2.synopsys.com [10.205.2.134]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 4F751C009A; Thu, 7 Jan 2021 00:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1609978352; bh=VEDI60u1cbWLwMz2J6HNd2ehfUiLmU2NYKL62iOlY48=; h=From:To:Cc:Subject:Date:From; b=IC/mVtE0bhrhHnF1QyG21ZD/UNOYLvTO+K5zWmIA/pY/YRkH1cbCDx4QiiKD5h7Xq JkKix3yDM11I2UkDNlQ/miPvCzAzT9vE8Ncvodt1FGcxJwg/OSNgECf+c9VbuTdDZj IHIL3gaqQYzuJyAfsqkHwowMbf8veSA56h34zQmTgXZG1Af0set1D3L+vcqQOZ+XIa ceCkyIu+7HKaK/pvmqy/CkXhNfj0JYGhkXgLNl+/eY98hASPYfgIDU69/Iy5Oomwzh d7ddizmfV4IfupKD9E4cBjPtpJHQaBkDA+PXiV9rzpJcWE549xunbh8bAJn52Dw0me OT59WX0HC8dQg== Received: from vineetg-Latitude-7400.internal.synopsys.com (unknown [10.13.183.89]) by mailhost.synopsys.com (Postfix) with ESMTP id E9579A009C; Thu, 7 Jan 2021 00:12:27 +0000 (UTC) X-SNPS-Relay: synopsys.com From: Vineet Gupta To: linux-snps-arc@lists.infradead.org Subject: [PATCH] ARC: unbork 5.11 bootup: fix snafu in _TIF_NOTIFY_SIGNAL handling Date: Wed, 6 Jan 2021 16:12:25 -0800 Message-Id: <20210107001225.3063163-1-vgupta@synopsys.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_191236_030429_36FE473C X-CRM114-Status: GOOD ( 11.45 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [149.117.87.133 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , Vineet Gupta , linux-kernel@vger.kernel.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Linux 5.11.rcX was failing to boot on ARC HSDK board. Turns out we have a couple of issues, this being the first one, and I'm to blame as I didn't pay attention during review. TIF_NOTIFY_SIGNAL support requires checking multiple TIF_* bits in kernel return code path. Old code only needed to check a single bit so BBIT0 worked. New code needs to check multiple bits so AND instruction. So needs to use bit mask variant _TIF_SIGPENDING Cc: Jens Axboe Fixes: 53855e12588743ea128 ("arc: add support for TIF_NOTIFY_SIGNAL") Link: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/34 Signed-off-by: Vineet Gupta --- arch/arc/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S index 1f5308abf36d..1743506081da 100644 --- a/arch/arc/kernel/entry.S +++ b/arch/arc/kernel/entry.S @@ -307,7 +307,7 @@ resume_user_mode_begin: mov r0, sp ; pt_regs for arg to do_signal()/do_notify_resume() GET_CURR_THR_INFO_FLAGS r9 - and.f 0, r9, TIF_SIGPENDING|TIF_NOTIFY_SIGNAL + and.f 0, r9, _TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL bz .Lchk_notify_resume ; Normal Trap/IRQ entry only saves Scratch (caller-saved) regs