Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1280059ybg; Fri, 18 Oct 2019 15:08:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRUK3b282NdTjaVRX9O/gZ2l5eXwlFGvKto0C1ehpfvTNRjjZPMinIs97udljHFFm/QcH+ X-Received: by 2002:a17:906:fcac:: with SMTP id qw12mr10797794ejb.31.1571436490008; Fri, 18 Oct 2019 15:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571436490; cv=none; d=google.com; s=arc-20160816; b=jfRsC06FZLeMphjVsmCzzd3eEBaZioT36gV5l2eQjYOnWkG2Z7kNhPtEdbFUT0w4TU 33sPpZjbwsNxX2hd55OD8OiY32EjeAwKtlIDdhWcy/ntH68Zy3eq0Qjfv8rluRprUbT9 EmBnXI3ljgWwpai7of8x9o0pqsdrKKWPVQr9wUsm7CkcDP5cY1GrIxpwwfsyVHP8S3pr c9WBPNmi98Crd/F2MoAOoS6IJsaUKoKy3XmHoaPsyR+1OYCALlBXlGtYLTwsx/6O8esr GNiF+aEYujaXF9ZQA0yt1QExta9CQzLvFWxPWGkH4cSYdIz3OPNC6YP+HRStvtJzCNgc amPw== 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=LLpec60MoDQbwYXoM+rURRw9OFWVy4VxOZVL1I8YkmU=; b=xorLLyixtOA7gMogCej0uSK4NrLOXRqRyqetCecifPviacgBks6NLXbx2VXKzR6iz6 vdwUr3cmU/2pFjvU2Kn0+EQE9lLwsTR9rJQGSwRcJcdkJzVNTKTb0+Kt1kMnbCzdzhg8 b7G1JXSIumVh1Fvn+ChiyjmBbP3eZtBcwsP6pOPwpl2Kr7JNMBRMojZn4/8t08hakb3g uRWOL+PXu4H3P/ulFHLx58+p5hAiuOJbwizmK/G7gNKpSvXII1aC5BOcLl1IkHwvLVkj bRxddI5QL+y/lUipgF2s0UuBZf3u7wpyLHr0giQbdo3bDipWU9E9wlwwK12CNDuXETug VYsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=IvcvFRaU; 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 z33si5321153edz.314.2019.10.18.15.07.46; Fri, 18 Oct 2019 15:08:09 -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=IvcvFRaU; 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 S2503091AbfJQRiS (ORCPT + 99 others); Thu, 17 Oct 2019 13:38:18 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37654 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440755AbfJQRiR (ORCPT ); Thu, 17 Oct 2019 13:38:17 -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=LLpec60MoDQbwYXoM+rURRw9OFWVy4VxOZVL1I8YkmU=; b=IvcvFRaURq+9FwFkXZ8l0+3JAp LuymAl0gTOchgj5hvCgshO/4OjK9lywhpOjfsgE09RKZJVQ4Z3b9tubPVPSDjwYNp7SrpiZvyZcTq TJTn7NJ55k7Pr6+RkkphW/K9xUU7IF9yCWh7FwSqvtfnOzBV8922w5mjfKQbO1QSx9yF+cYiSjROV l47EmlACP9tM7+XnKZX8LSbZ96e3FjswUhTimwZpJDfQMEo/EWLTPWkMq2hZNjAN8wn4uDxwXSOX0 GYs8KMPUX/VYXUdnD1FKfV3/IE8CVppoQiLZ64QVLkNMEcfc7/Fcg2ifei11Uynf7uv920pHcqIVh RgRMWb0w==; Received: from [2001:4bb8:18c:d7b:c70:4a89:bc61:3] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iL9j3-0007y5-CO; Thu, 17 Oct 2019 17:38:13 +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 11/15] riscv: use the correct interrupt levels for M-mode Date: Thu, 17 Oct 2019 19:37:39 +0200 Message-Id: <20191017173743.5430-12-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191017173743.5430-1-hch@lst.de> References: <20191017173743.5430-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..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