Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4618617pxj; Wed, 12 May 2021 09:21:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf5ZiXDAKggte/20hTysjYO9C/e3NX73rTVSMA6vNl1jopd3sKzHjtt/tF0OMFYYNXhaYT X-Received: by 2002:a2e:8512:: with SMTP id j18mr30755506lji.196.1620836480746; Wed, 12 May 2021 09:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836480; cv=none; d=google.com; s=arc-20160816; b=h7Nsx5tNbU1dxZJM4S9XSiehEDK6gFRUCwJSXmv65hbR0I1y55GbAsmZpuS+DfI+/q Dkf3GAIKmREtBexPaQJ3nuCcMqoK7jLx8eZEFKG98z3cMq4Ofcwf+2esJcvruCPshhGQ JQp+zzGd5TRwdGqJZtfX708vIqy7SWn3t5RVnu0Vhoclh2MwqqfmYwHKrA/2/n/cqFRO AvqD6VEuor4/ppIKVLOZ/aZka/ru8FQBZoYSuz3xjRd9fv7cI7jNc1mI4J0rXHYRU/wW 9fOKqIELXf2A+RLgrqfoPC0d4wqek5JOq+3nriEG57/gQbh9+Ib5DiZdiBJljZM0lVvh gc0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1mBojZNAVQHxLnJ3tVFydldtqRaPqZH7SaNFZjTtbEI=; b=DwR/h9mgmE6FkW/E93QBpge2hbeDOI0swePT8YoREF3o9JwIuNVr7MIa1I3NR5ocDf ee9G75dLI/lzn1GCwWl6PmigW4xtyWNcVdniwn72He4DQXBWupxekW9SD3DSmRGnCLuD f+LNKITD2st5cxnIg0tLb8ty7DJuHMyCFrP+MArg0EPmNL1ZkhdIH1Tvqog1pj4dzipk v1OpxLN+Edoqstq/qvfV1gIAYTcApKVauHiWBmpw/8p4FEWRvuqR6m/Dj0ntz7o78d+K /uA3qcJXsuDRc+gRvuA9FJotJ50AUuJbdtq3Ta9qG4IQnLWzGWvrsnNzTLfPg1eWls7u d3dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2MBmWyU1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z20si255273ljk.579.2021.05.12.09.20.50; Wed, 12 May 2021 09:21:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2MBmWyU1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240325AbhELQRx (ORCPT + 99 others); Wed, 12 May 2021 12:17:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:48196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234885AbhELPeu (ORCPT ); Wed, 12 May 2021 11:34:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A8CF16195C; Wed, 12 May 2021 15:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832649; bh=h1xEYbGRZj8V32Gf8SC2xsEOB47uOLaCUPpJUX7bZ68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2MBmWyU1niBaHjDswkhdCSGuvnVZqgzsHtdf61LUfiBIpukyl/nRgLe1ZW+k8g2/P WPeUTEm+BxnmGADzGtNDTzi6X7oGVxXrlwrh1r8bxdesdHYDgQ/VQ5zydHO0mNUsu0 0EebHrVfRLI8EyIRwTWbW6nS32zVAKMNfUHHUTek= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Huang Pei , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.10 365/530] MIPS: fix local_irq_{disable,enable} in asmmacro.h Date: Wed, 12 May 2021 16:47:55 +0200 Message-Id: <20210512144831.780090650@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huang Pei [ Upstream commit 05c4e2721d7af0df7bc1378a23712a0fd16947b5 ] commit ba9196d2e005 ("MIPS: Make DIEI support as a config option") use CPU_HAS_DIEI to indicate whether di/ei is implemented correctly, without this patch, "local_irq_disable" from entry.S in 3A1000 (with buggy di/ei) lose protection of commit e97c5b609880 ("MIPS: Make irqflags.h functions preempt-safe for non-mipsr2 cpus") Fixes: ba9196d2e005 ("MIPS: Make DIEI support as a config option") Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/include/asm/asmmacro.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h index 86f2323ebe6b..ca83ada7015f 100644 --- a/arch/mips/include/asm/asmmacro.h +++ b/arch/mips/include/asm/asmmacro.h @@ -44,8 +44,7 @@ .endm #endif -#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR5) || \ - defined(CONFIG_CPU_MIPSR6) +#ifdef CONFIG_CPU_HAS_DIEI .macro local_irq_enable reg=t0 ei irq_enable_hazard -- 2.30.2