Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1457519ybb; Sat, 11 Apr 2020 04:02:02 -0700 (PDT) X-Google-Smtp-Source: APiQypJC7ffcuvA/fi2AkM3J4knM3yRloW+0NqmwHtfBP0BX8gR0ArcBmNGomaroSFnx876cQXrT X-Received: by 2002:ac8:5057:: with SMTP id h23mr3101113qtm.287.1586602922816; Sat, 11 Apr 2020 04:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586602922; cv=none; d=google.com; s=arc-20160816; b=wqNrTRKLiNRSC3rZblt/pEswAUjak6DxBA6ybfhz8wezia6ZfIoIC2Hcil8WUgDOR7 cUtv8JNlgo/FVMRiAnrSRE7ftWSNOoZoXxkRFknXo3/lXjP3Jw5dAszDkjl26weLG+kH ZhWdRQW6xzN1W9/SkBZRPH7DKfJywh/bvdP+CHEKkmROAIpfcA+rWTY7EtR+akRXyjnS u2ome62xuKhA0cJnoQW1S/KzIYkJhu8THkwAu2W9eznYdbfJIonyDDwwOve6mRd5OjN8 whtD+eptj257sWzKA/Boj0gInKK5sF6i3vF8YrqjrpW8ll58IswycUKtBPnlzVIzAvY1 pRvw== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=hvUTqsfDxEcmkj57GjLQ4iA3if4T8tLEmoSprkM7jLQ=; b=QF4+jqPXwWZMH6INOsdJNZ0LRUCgWqIKDFqWXfEuJJsjDm1P/OleNJ2QWTgQ1Zm73G QUWMNlIYc7WOj+QbFB6Pqsr9CxFs9Q6EBD0ksL1vcIbqkfjaT775Pj/z15FbFnFvWT93 ynM9DcpdzFYm2Jy4HZQuaB3VUwzWpNf0pFeAibevlxSFMjV5wKc63cg7XyymeA+vtfP3 9KvkVnd7BsXrG9AT69rrS4cenussrP57MnX8xdaL9C+fymG1xWrmj1XoeAUE+mWRZWLY eK5D6TY9nEhxjDQIDehM1siURUowvapzoE/rg3Q5u54Y5urRWOX6TAmTp/7Org3pl28c S33w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=F8XpckS2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e23si2823924qkm.130.2020.04.11.04.01.35; Sat, 11 Apr 2020 04:02:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=F8XpckS2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726094AbgDKK7X (ORCPT + 99 others); Sat, 11 Apr 2020 06:59:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:37568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726025AbgDKK7X (ORCPT ); Sat, 11 Apr 2020 06:59:23 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 29EB920732; Sat, 11 Apr 2020 10:59:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586602763; bh=xk5Kskag+XVsBHxWNEZ7J/RewiRmLUecphBYR2cj9yo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=F8XpckS2+wv/5IBH2mA0/TmqmYb5fbc9QUpEpizKARVx9lzVjoMYoF+UvF/96kpR2 jiU+pbzEU8VUJyjaAcApFTjRnlLB8kKPvsXLRvb/c64dVwpApQAxvx89C8vlbswjAF rLQXPMVcju7hvUXs/Dm/dcDmxPtqKWb7dh/5Y+gg= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNDr7-002MZc-Bt; Sat, 11 Apr 2020 11:59:21 +0100 Date: Sat, 11 Apr 2020 11:59:19 +0100 From: Marc Zyngier To: Atish Patra Cc: linux-kernel@vger.kernel.org, Anup Patel , Jason Cooper , linux-riscv@lists.infradead.org, Palmer Dabbelt , Paul Walmsley , Thomas Gleixner Subject: Re: [PATCH] irqchip/sifive-plic: Fix maximum priority threshold value Message-ID: <20200411115919.32fc0455@why> In-Reply-To: <20200403014609.71831-1-atish.patra@wdc.com> References: <20200403014609.71831-1-atish.patra@wdc.com> Organization: Approximate X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: atish.patra@wdc.com, linux-kernel@vger.kernel.org, anup@brainfault.org, jason@lakedaemon.net, linux-riscv@lists.infradead.org, palmer@dabbelt.com, paul.walmsley@sifive.com, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Apr 2020 18:46:09 -0700 Atish Patra wrote: > 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) Small nit: please write the "Fixes:" tag as documented in process/submitting-patches.rst: Fixes: ccbe80bad571 ("irqchip/sifive-plic: Enable/Disable external interrupts upon cpu online/offline") (with quotes, and on a single line), as it otherwise breaks with the lore-scrapping tooling which a bunch of us are now using. > Signed-off-by: Atish Patra > --- > 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 c34fb3ae0ff8..d0a71febdadc 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 { Queued for post -rc1. Thanks, M. -- Jazz is not dead. It just smells funny...