Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1199338ybl; Tue, 13 Aug 2019 08:51:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzV+g9B1EshO+9Va6Pp688o5AYFKjxoe/A/aLp1j74D9/jhNF0/16bs6+kU03mPrKKdc1N2 X-Received: by 2002:a17:90a:ab01:: with SMTP id m1mr2713473pjq.69.1565711516477; Tue, 13 Aug 2019 08:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565711516; cv=none; d=google.com; s=arc-20160816; b=w74Zac3xXDRSv6DgVjy2Vaylv0GdgBM3PxfwnAQfp0KPl0SHmWdzzFaiPPpNQDbppa jZJKeLLfHeilmQowqxTVEYZtQFkOwZW4ru+ONiH+iSAqdXXxrkGhqiIa8TnxERohuIZk 7Z3isOPH25vSuFlrBFc+k7a2/KDl/tqaIli5UWN6NIczxg6WODDXHmewvZpKN3dcpXt+ 5LL6D61TOi47WkGwfGwunKYjtTjhdQe+DvKEsAxCMwNgOCZimAdowAYLzJEso8jyRad4 DiPTpHbxj2mBb1UfYanXAEy0cU8V/Hc8oOYeLt3CrAVc0I/858ErsI9sNKbwpi3e3V6I p+Vw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+BjmfBU5ZU5hXn/L4jPTIPV2WW0RF6JWpSgCnxtzPjA=; b=HAdGfNe1DA5mxE0FIMK3QBJU9cgvu5I78aHTNv5PkIsfAiyYCpD8367ij99sTaFjkc DjWKZ5DlT3JSiDBI8iSkojYKXfM+bklGMemPe9st2HbBRtL6Cgnk4xJiIJf2rLpJ+29O fNEFWs9bhw5+rpfiKEwxiATGRUpHvxixImWFQN7bT+aXcX2Gzy7Em5TIEqzZFcUjRWWW AntDu43n/s8PD+Y3HMjHMrXYVjNURb+MAzAAdXyiWgEg6++Aqh1X0YHERIDNjEOVAvSj Z5LyoYnCu9GzhCWwYLmriCR9N4WY7pK0YQDKpqitQhfYBCNvUc0kwbHz057MFAlBWI/g cucw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qvm60YfE; 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 143si66341237pgc.479.2019.08.13.08.51.40; Tue, 13 Aug 2019 08:51:56 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qvm60YfE; 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 S1730249AbfHMPsZ (ORCPT + 99 others); Tue, 13 Aug 2019 11:48:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45970 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730237AbfHMPsX (ORCPT ); Tue, 13 Aug 2019 11:48:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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=+BjmfBU5ZU5hXn/L4jPTIPV2WW0RF6JWpSgCnxtzPjA=; b=qvm60YfEiDMVkjnCZE/E1JiVzr qzVvwfuG9dS54dUu+FDcBwADj2QjVsSYVoLSFbQVUVwsGoYUys3gayvEFlqn0EUfXIHD43zuuVYC4 06a9/iFuCbkxO5YhiOanE7Duo6Krjq1zxWb4a/9ZENT7XNMRG8sZqfBI6N8JGGUmXpaVV6x1DxeZw CKJS3nKLfdWQ38wWiBFCJIlJKODRCHG5XnQtNTT5SCcBj9ta+3XI3rLyzHRUHlZGQkwYVaZcCYS3A ocUkpWcVNOi9R5xkFB5lPpyQ5T9N2R3efLLZPDuThmop83wsQVjOinUGzA3ojbt+aa+5PmRmd6kJR xnpLoIxw==; Received: from [2001:4bb8:180:1ec3:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hxZ26-0005H9-5p; Tue, 13 Aug 2019 15:48:22 +0000 From: Christoph Hellwig To: Palmer Dabbelt , Paul Walmsley Cc: Damien Le Moal , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/15] riscv: use the correct interrupt levels for M-mode Date: Tue, 13 Aug 2019 17:47:44 +0200 Message-Id: <20190813154747.24256-13-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190813154747.24256-1-hch@lst.de> References: <20190813154747.24256-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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..9566aabbe50b 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_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_M_MODE */ int arch_show_interrupts(struct seq_file *p, int prec) { -- 2.20.1