From patchwork Fri Oct 8 20:48:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 12546437 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 223ABC433F5 for ; Fri, 8 Oct 2021 20:48:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 117EF60EFF for ; Fri, 8 Oct 2021 20:48:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242708AbhJHUui (ORCPT ); Fri, 8 Oct 2021 16:50:38 -0400 Received: from smtp.duncanthrax.net ([178.63.180.169]:43324 "EHLO smtp.duncanthrax.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243275AbhJHUuh (ORCPT ); Fri, 8 Oct 2021 16:50:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=duncanthrax.net; s=dkim; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+BjgNCV0/lu3CDm1NJ8AzlrRox5HQiErnYXfhWVfoBc=; b=CQ8nmc5/zTO8SaPAF9h+eN08nH he0lR3rSNxQeAEhKGsraaPX80d7dFCzL414svXxorewZ7CvxRNWm2mPzulSldLnhGq8xysP9HDw8C r4Po3ATAifiwucPgeI7WU9TOOfwm+YJPb8KLOaJ5GgA2Vn+9yzsTBAs33gYbBXyAOr7E=; Received: from hsi-kbw-109-193-149-228.hsi7.kabel-badenwuerttemberg.de ([109.193.149.228] helo=x1.stackframe.org) by smtp.duncanthrax.net with esmtpa (Exim 4.93) (envelope-from ) id 1mYwnH-0006vO-0J; Fri, 08 Oct 2021 22:48:39 +0200 From: Sven Schnelle To: deller@gmx.de Cc: linux-parisc@vger.kernel.org Subject: [PATCH 2/4] parisc: fix preempt_count() check in entry.S Date: Fri, 8 Oct 2021 22:48:24 +0200 Message-Id: <20211008204825.6229-3-svens@stackframe.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211008204825.6229-1-svens@stackframe.org> References: <20211008204825.6229-1-svens@stackframe.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org preempt_count in struct thread_info is unsigned int, but the entry.S code used LDREG, which generates a 64 bit load when compiled for 64 bit. Fix this to use an ldw and also change the condition in the compare one line below to only compares 32 bits, although ldw zero extends, and that should work with a 64 bit compare. Signed-off-by: Sven Schnelle --- arch/parisc/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 9f939afe6b88..e9e598c18cb0 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -974,8 +974,8 @@ intr_do_preempt: /* current_thread_info()->preempt_count */ mfctl %cr30, %r1 - LDREG TI_PRE_COUNT(%r1), %r19 - cmpib,COND(<>) 0, %r19, intr_restore /* if preempt_count > 0 */ + ldw TI_PRE_COUNT(%r1), %r19 + cmpib,<> 0, %r19, intr_restore /* if preempt_count > 0 */ nop /* prev insn branched backwards */ /* check if we interrupted a critical path */