Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2027961ybd; Sun, 23 Jun 2019 22:47:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSOKKasVQcEb2QfcE2Twkd3D/28zVz6FqyJm457oXMQ1FGQnFBtXxLBBrpXcSbuWA2UwMS X-Received: by 2002:a17:902:e58b:: with SMTP id cl11mr123930788plb.24.1561355249132; Sun, 23 Jun 2019 22:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561355249; cv=none; d=google.com; s=arc-20160816; b=lQ22IrewL9pp/jo9yynZdmnjeDFpGDR/tGMDPMXuJ0YlE52/grw/tC2l3n9IqmO/p5 JXvIX5AgujMkKtvRG4t+wYb4D/D+6UqIDqnVDCWFsDu+5ohDw4BaXGFUR4eXPuxuL8AY 0hQksadUQWjveZwYkuWCjuYcu6eJTVohKyOEUXpEhbHJfLHlc74AJago4K+EXI32870o rPpWkVURpCV++MdL3nhqP1Zs5/xcm5TdbTqLBPKxse5grPoC4/rkJML6CSZlGmN7K+PO xz1r0nGOj6X5DitdKDUDw3uI6trl+VkPOR30D7uQBlleDfFGED/u9mxZAaa5DChhM33o sZ9w== 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=AJasF59xeqe/AFU2BmSEjm5tkATzsgO1FsTmlPlb1K3ZmML1sSl34e/Za2AgJEeQjf ULigpWnzy/ajzTot+Ne0tTKkM2f45so37dN9CDMvyS9X5tGz4YP/nQ5ZsOoYA/MCqwb3 q4NTVe8PqJl4Fq09pWsjtDExixXiHhioMlxdK2ZyxqB4mqz2jR/pyFbqxiYBKE5DTiFP +VioL9rIULm3Bms20QgLqPVs3yN6gzxom1m8t4gOzBxXdcVOsAC/Yi125t3GHlDSH2mO KRyQbEnsQGegd3ekINoSdd3HBKaKhiX2YeY6oD92BTXLmeRGjmRshf7caQv/Z2KzgJBt KzFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=aGN6dTub; 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 28si9560043pgy.252.2019.06.23.22.47.13; Sun, 23 Jun 2019 22:47:29 -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=aGN6dTub; 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 S1727633AbfFXFo3 (ORCPT + 99 others); Mon, 24 Jun 2019 01:44:29 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38558 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727541AbfFXFoI (ORCPT ); Mon, 24 Jun 2019 01:44:08 -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=aGN6dTubD0D69mjO3WVEYJFyjB 5y1YlY/6WZAOlD+aKcYvIOSCcaua7/aYGOliKS7XJuG4hrrjZ8LENcRaGw3h5Qxcn3tfYP+glU6+8 mawXoplRfU0xqHBf5u8/l3kyzWnAhIMkD8V+mrzNMUQYSaO+kjzJcogITGDZnZKasWvnBP9oNNDgK hj3dWYDaI2wLnybTsj2wZ6SjoTGq1z5k6vzU9VlJQhSORsNP5/hU0NvVargMZNfFhht1yqHP2bUto Utoklu47DO5TT2RGMSMPZhgFQ9KoMDLkL98EyoGYczUHATr8gAs+6BZbwI6bJ6VBLCCW0dmXV/Ie/ GJwuemoA==; Received: from 213-225-6-159.nat.highway.a1.net ([213.225.6.159] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hfHlu-0006sF-4K; Mon, 24 Jun 2019 05:44:06 +0000 From: Christoph Hellwig To: Palmer Dabbelt , Paul Walmsley Cc: Damien Le Moal , linux-riscv@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/17] riscv: use the correct interrupt levels for M-mode Date: Mon, 24 Jun 2019 07:43:09 +0200 Message-Id: <20190624054311.30256-16-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190624054311.30256-1-hch@lst.de> References: <20190624054311.30256-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