Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1317710ybg; Fri, 18 Oct 2019 15:50:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPoiewz0sVxiX4dJvpAt2iiuAafjBBF1hdhnFJnJsAcqNwNnprs5Nvnp/la0pU2lArchsf X-Received: by 2002:aa7:c895:: with SMTP id p21mr12563963eds.38.1571439039460; Fri, 18 Oct 2019 15:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571439039; cv=none; d=google.com; s=arc-20160816; b=eNd7vQrEQu9DtXxs4t/Vsr2psZjJvgwTdKHEM3X+XmN1jM8SZjBARh/unmly7VqGaa EK2mAykaL+a/1ppTM6BO4uuLzJFcWYLGpF5Ce0tXB9CCN4hH520E8q9qkyMWIx8LNz5R U3cTd0f8JURhCRI3C2cQnw7sV04Zfk5wQTZxjHvde8qPuX4U5lmpD/1M13mzzKV3i4Sg by8d4Qlyfhw7KO2fZONz1mflSjI29YLYO8lhdFotjTMitcXtOi/ymQSsB8gklUqPwGdu eMDY8EyrvyCwQ/c2ax9LloY8nEHd285RkkJU4hZNp+6MPkn2xDmhCAIVBwTcdP7wrMil +zdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vu77sOEgLk4hgL40syTM0FGRnGNgVOWc5ZddD0STylA=; b=PYKOR0NvmzmMJmi4BoeFV2qAkQSaYVg/5GlHDYTMPzzE9E8wWV3hMRC0bsG4pkQ6+V KVNVRCR5kBJC2SIu+QlrVZZOGhSmM2OvRAcJkzH2cUuHu+yyu/45y+pwUC0yZYlzofi0 pXhbO9rU5t+okn9/rQQlRfbWK/RRe3LguKQRe9chp96fWyHZtlHA3qOfdrRsIzn/5bTq ZXZ32HvaWJEh1nMss6BzqAg1mSzO9KqY42tkyIWHGMCkt3r9IOKgN1Rl91CVXXaPvcX9 4MK6CEp3BcZ2BQdG1pALOgGIKvNlOpagbLpeI3UBQl0yilpzkHJKX8XzVuUpxQXnMM1C sWGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=bP0txo6K; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si4601741edv.369.2019.10.18.15.50.16; Fri, 18 Oct 2019 15:50:39 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=bP0txo6K; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504090AbfJRFc2 (ORCPT + 99 others); Fri, 18 Oct 2019 01:32:28 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:56100 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727399AbfJRFc2 (ORCPT ); Fri, 18 Oct 2019 01:32:28 -0400 Received: by mail-wm1-f67.google.com with SMTP id a6so4722677wma.5 for ; Thu, 17 Oct 2019 22:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vu77sOEgLk4hgL40syTM0FGRnGNgVOWc5ZddD0STylA=; b=bP0txo6KUPJhsbrp1evgxikGXpmxRRBsxwvXOfWxyVwVHrFi0N9AwXrkV6GrFpjuSt eHZUlVJCzEA8AsKXn3x83pefq7YQbAxz0wSDuYpwSHC+jdEqQ/y0ed9swRJ9apvco+tq Rzm7V8XTWzw76Z8tw928+Z9IX7g4kgXf+TZwssgC/DWmDAyAqLmF1K+2MD1mRT3QQL/1 FtS1rxZdEZ2XzLXpVG7TKzavLCTpRteUY9RIAS/0aiA/Ye8s0Nh1LyrTbuWbqD8yxRTy YQD8EozMsKueRf+2SiUX0iDzl8BybGbCB9nQUG4/xNdxXMIOHWrW2Bsqsi3HHeMhVt1P 0nyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vu77sOEgLk4hgL40syTM0FGRnGNgVOWc5ZddD0STylA=; b=G75Y8FtKmmtKUyDA4joCupGUlT9mA0GEyhsKfOyvbEy1HjIrRtQIWVSaUuhTYHkp7R EcmP6TUKMS1V5zAVDoBpt3tlpccH4xTqLUSir5gOEKd824J98I+7ytNOLh9uyv2XFShM KpS78uNoP0wmSfMIwmULdYZt6GITr5zzr2TeO5IMNEK9syrMo5x6ZXuXWD9XfqFz6sS0 bpUll4R+niz0uW6poP+Cbq9EPl1NXrjekWLAodrDT1WW1JVneESfvrfQ9eq1UAUIZql1 XsDgt62L5vRwPuk+vyuwClf6mdsur8dL+4ZDQaG/Vksy+rC/dFqjxXcbBkyO9HwEGSMt 3iCQ== X-Gm-Message-State: APjAAAW4vj+72XBLYIY/ho7iFjDPXALz9BQrZ1e6fOY1FVokXRV4d5Ic O+D/2aHeC/1AvJms3j7h04gv6CRT7ZbxJCxJBHc8niJkzHU= X-Received: by 2002:a05:600c:2291:: with SMTP id 17mr5045041wmf.171.1571367692099; Thu, 17 Oct 2019 20:01:32 -0700 (PDT) MIME-Version: 1.0 References: <20191017173743.5430-1-hch@lst.de> <20191017173743.5430-12-hch@lst.de> In-Reply-To: <20191017173743.5430-12-hch@lst.de> From: Anup Patel Date: Fri, 18 Oct 2019 08:31:21 +0530 Message-ID: Subject: Re: [PATCH 11/15] riscv: use the correct interrupt levels for M-mode To: Christoph Hellwig Cc: Palmer Dabbelt , Paul Walmsley , Damien Le Moal , linux-riscv , "linux-kernel@vger.kernel.org List" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 17, 2019 at 11:08 PM Christoph Hellwig wrote: > > The numerical levels for External/Timer/Software interrupts differ > between S-mode and M-mode. > > Signed-off-by: Christoph Hellwig > --- > arch/riscv/kernel/irq.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c > index 804ff70bb853..dbd1fd7c22e4 100644 > --- a/arch/riscv/kernel/irq.c > +++ b/arch/riscv/kernel/irq.c > @@ -14,9 +14,15 @@ > /* > * Possible interrupt causes: > */ > -#define INTERRUPT_CAUSE_SOFTWARE IRQ_S_SOFT > -#define INTERRUPT_CAUSE_TIMER IRQ_S_TIMER > -#define INTERRUPT_CAUSE_EXTERNAL IRQ_S_EXT > +#ifdef CONFIG_RISCV_M_MODE > +# define INTERRUPT_CAUSE_SOFTWARE IRQ_M_SOFT > +# define INTERRUPT_CAUSE_TIMER IRQ_M_TIMER > +# define INTERRUPT_CAUSE_EXTERNAL IRQ_M_EXT > +#else > +# define INTERRUPT_CAUSE_SOFTWARE IRQ_S_SOFT > +# define INTERRUPT_CAUSE_TIMER IRQ_S_TIMER > +# define INTERRUPT_CAUSE_EXTERNAL IRQ_S_EXT > +#endif /* CONFIG_RISCV_M_MODE */ > > int arch_show_interrupts(struct seq_file *p, int prec) > { > -- > 2.20.1 > LGTM. Reviewed-by: Anup Patel Regards, Anup