Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2027057ybd; Sun, 23 Jun 2019 22:46:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZoFzknbnewsZQZfubllGC17duJWMVyEYrbMevveA4SsEdv7ppHumqFAxvcegPlJVn3tkM X-Received: by 2002:a65:664d:: with SMTP id z13mr6612694pgv.99.1561355171580; Sun, 23 Jun 2019 22:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561355171; cv=none; d=google.com; s=arc-20160816; b=rBq+HqrhRduoHDsM6d9QbluVPdbpgJAO/+fyYXdwiGXgaQuECPRnI90iHBhbuK3WvR Kkz46j/PvWUoUb0BBybX4Qn9tweYgTrMhPTp0MnfawwMevRAf4s2vQfk9fx6D4e5pZxu y7nhSK2QZXb2TwWz0Px41AAtT2FGQswxrH/qiWuEU6Dd90tV2139XPoJ1ELNIKBoKpN8 I4aJRJIA5BJ0g10qzdgCzHgejHh/+8Qe0XboAy1G2YgekcMYMLnFNNVAcv5x/Un5vOU3 z+tpaK/8JTINQYWLju9AOlqRkTfne31SZHi8RuoLpJqxb+kUck6fuuyrCc74IzEo0sSL J+pg== 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=4ocWky3c08iK0yepv2gQs0SBg5KjT+xunPaTv4oC5uw=; b=iIkRrhKs1tVXpKXrI4J0Cuo/0vZDRmlU0zS8v+em/qruRCohfr8E3Rwj1u/Y46QHzV LSzVOSEdIWG5A15WnOnYg9PzNZSVPSqq87gL7+BswG+59sf03fqocItZpFgehBcCq8p7 i6q/nWjcWcQa2cFBqW/btJxWHemG0WCY9Tmicv35ICOpMV38X5NZnRE2X7tAlX5OaiPY LnzC/sLJJVxar+bcaNqJ1loiAGSn6GYwToKplhv8A4Go/MoFR+b9EV+mtDSbujaIZY7E vUBe1rgKYEdGlAVrQhFfHVixa1m0HKo4OHr6bOK01hYaoCWTZKJfCh7MAmg1K2kkbYfz KQ2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=r5n6pCeH; 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 t23si10035905pjw.56.2019.06.23.22.45.56; Sun, 23 Jun 2019 22:46:11 -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=r5n6pCeH; 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 S1727517AbfFXFoC (ORCPT + 99 others); Mon, 24 Jun 2019 01:44:02 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37886 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727229AbfFXFoA (ORCPT ); Mon, 24 Jun 2019 01:44:00 -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=4ocWky3c08iK0yepv2gQs0SBg5KjT+xunPaTv4oC5uw=; b=r5n6pCeH/gadzSXK5KdI2Tqxv8 YODK6eN48ucCegAYBApmU91XF9qDbVsH6tKFA77OewDRe6wqTI7SOkxxGuNy9Sqic+I0WUPShkgI5 Q1lzoYmneNbpVbOUPj+V3mJQXEi+aDzQsaS8iujdNcz5g+2YOFVvO09khJr31WiotohZZLvZ1sZxX Au7/D6AWMmPm2BTMHXivfuRi7XYiZI3SmPmvmgQznl97DnHs/ShMX+Jt4xrDoWzclv6O8NDl/VF15 MEZtZEouwgD3Ybb8UXfWgU8hWoGgN6ZUV08QMBzBJNpFVg/90QTwtKFUM9bKrgLFEMLNGW7/C5meg uw+VkyYQ==; 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 1hfHln-0006kL-1n; Mon, 24 Jun 2019 05:43:59 +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 13/17] riscv: poison SBI calls for M-mode Date: Mon, 24 Jun 2019 07:43:07 +0200 Message-Id: <20190624054311.30256-14-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 There is no SBI when we run in M-mode, so fail the compile for any code trying to use SBI calls. Signed-off-by: Christoph Hellwig --- arch/riscv/include/asm/sbi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index 21134b3ef404..1e17f07eadaf 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -8,6 +8,7 @@ #include +#ifndef CONFIG_M_MODE #define SBI_SET_TIMER 0 #define SBI_CONSOLE_PUTCHAR 1 #define SBI_CONSOLE_GETCHAR 2 @@ -94,4 +95,5 @@ static inline void sbi_remote_sfence_vma_asid(const unsigned long *hart_mask, SBI_CALL_4(SBI_REMOTE_SFENCE_VMA_ASID, hart_mask, start, size, asid); } -#endif +#endif /* CONFIG_M_MODE */ +#endif /* _ASM_RISCV_SBI_H */ -- 2.20.1