Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp383709ybz; Fri, 17 Apr 2020 02:58:05 -0700 (PDT) X-Google-Smtp-Source: APiQypLdM09VrWaNFvDbKwGoIDwKPn8jiwWFeVVNicAioRcVkMGjI/1YMvX0UyMyGNk04mMZxMXK X-Received: by 2002:a17:906:35cd:: with SMTP id p13mr2293101ejb.206.1587117485713; Fri, 17 Apr 2020 02:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587117485; cv=none; d=google.com; s=arc-20160816; b=qNkbWCWHLj5hMqFofsmbdJXiwlp8p5QrpEZbvVX0eycvfqgGWL9oUa/uOQkSO2/cNB wFCf92ni0q+vZ7mBCbuZRF2ZOiHSZwSDlu/Y7R7503tqXPy+NLBGRuujbhb4Xd+xmEnS VixfDzdUYc2sUTlbmHjvNqvYD7pTIufG8YYdRil0yEXIRXEUnLo7Kb5drQ7RwWdh0u65 G+6BkMDcER0GXScgLacdlWMwV76hTvcdauAugQ2vt/Y4DW4YVUkelzsEGWEnNdmGqzJf TDALTwtYcK09Cpc/3W0I3eahgZiO/VWIBNMIMx0Lm7bjvM/M71bHU7tQ1V5FHn6qM79+ Bknw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=AMCGyp1iP1zafdaL0VrgbFtoyPY4hRD1CEY14YPdJXQ=; b=QORgUBONAIyxEaTFlbngnkrw/lk4BPvV9nGFsdk+zsDGRTJEzx6s9Ko1o7GnBl7N9M sh38WYZj/tZMyotjcsBuaFH+hVczo77XQeFTUfoIe5VPEfdgCVlt2qIGgm0fxOXreZcf jfsq4DVHNLClUxVdmHUoa7BRsqo4AJvNBkdEkCkDd/cUTOCXfD8NKyitASTGxXz3NJFY 3SYxKnyTMBxLf+UWvcTvY7zvMGaT3tHm8Jv+AD/tuGnkGLdQRruxw5oAHiEb8gy0vcZP mP4GkcoZZk+n4i/Sc7E4KWzZGTZlzqSb9EbOC162p2+HkTjh33yErZNEFANjvX5CXTCC 4oyw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si15658968edn.385.2020.04.17.02.57.42; Fri, 17 Apr 2020 02:58:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726753AbgDQJ4r (ORCPT + 99 others); Fri, 17 Apr 2020 05:56:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbgDQJ4q (ORCPT ); Fri, 17 Apr 2020 05:56:46 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC79BC061A0C; Fri, 17 Apr 2020 02:56:46 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jPNjo-0005eQ-UI; Fri, 17 Apr 2020 11:56:45 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 9AE901C03A9; Fri, 17 Apr 2020 11:56:44 +0200 (CEST) Date: Fri, 17 Apr 2020 09:56:44 -0000 From: "tip-bot2 for Atish Patra" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] irqchip/sifive-plic: Fix maximum priority threshold value Cc: Atish Patra , Marc Zyngier , x86 , LKML In-Reply-To: <20200403014609.71831-1-atish.patra@wdc.com> References: <20200403014609.71831-1-atish.patra@wdc.com> MIME-Version: 1.0 Message-ID: <158711740426.28353.7000758061891659113.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/urgent branch of tip: Commit-ID: d727be7bbf7b68ccc18a3278469325d8f486d75b Gitweb: https://git.kernel.org/tip/d727be7bbf7b68ccc18a3278469325d8f486d75b Author: Atish Patra AuthorDate: Thu, 02 Apr 2020 18:46:09 -07:00 Committer: Marc Zyngier CommitterDate: Fri, 17 Apr 2020 08:59:28 +01:00 irqchip/sifive-plic: Fix maximum priority threshold value As per the PLIC specification, maximum priority threshold value is 0x7 not 0xF. Even though it doesn't cause any error in qemu/hifive unleashed, there may be some implementation which checks the upper bound resulting in an illegal access. Fixes: ccbe80bad571 ("irqchip/sifive-plic: Enable/Disable external interrupts upon cpu online/offline") Signed-off-by: Atish Patra Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200403014609.71831-1-atish.patra@wdc.com --- drivers/irqchip/irq-sifive-plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index c34fb3a..d0a71fe 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -56,7 +56,7 @@ #define CONTEXT_THRESHOLD 0x00 #define CONTEXT_CLAIM 0x04 -#define PLIC_DISABLE_THRESHOLD 0xf +#define PLIC_DISABLE_THRESHOLD 0x7 #define PLIC_ENABLE_THRESHOLD 0 struct plic_priv {