Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1279800ybg; Fri, 18 Oct 2019 15:07:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOIpG1Z36f+FOZ1U//2yq0Nb+dXdDi35hvvOQEq2AG71lgLe8ldGtWPPQZeokb2Q+vrrzb X-Received: by 2002:a17:906:2307:: with SMTP id l7mr10687931eja.320.1571436476027; Fri, 18 Oct 2019 15:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571436476; cv=none; d=google.com; s=arc-20160816; b=vaAvB/sHlJEWZ+GkjW6rDRMsjZ/+4x1oJqM+2A/9kplFFpTVvRJXwn58XPSq05JkYF vJMKB3RLcGb1bG0WJ5VVdGaLfoj/KPX2MyDSK8BBen4Ro2EboEV+qae6kAizUoI6tx6x zpxVOmhi5liNpZQ50j5EDAaznqFWT8cZZLgXp7AHnI1I5Ampoce7ZbZ0V8tPlh3Aa0iY kNA82Xen2Zd0VMQaJp7NBsw9+AKo7QEOfQ5tJ+299Z2EvWtd1icH7mIm54ZPxqv9CHEE aBkN0cSg7BerrqFBqsaeHW402msYHtNLhw2XZE2ksPYIpxPEb9SSIW/M45PCLnzntTHI e5/Q== 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=5Q8lZON7PHXLo9s0eo0DiHQm7hbQiEJjd1r4/mRBF0Y=; b=zRAD34unFKTzwLD4FiOx08bmVFkuehyUk9d00uoQHKLqX221ZmF65g6jUsFIP0LTYZ qS+gqndFr0y9gn+y5gKsgfifze5VHZ2hZitpDU9DRZhmZnhi/XDMLn2SZ78rkDO3yZWT VhbGcf5YuZAOLoTMtnfMz6sHh97MfoW6J9GkxNORTXHvjGcFrv7N33NKB9Vast5a2UFZ lEZrLXPHJWyk7PpDSTtL9hXD3//mV8HbTg6qgLnPlMGJ9kttfI9ncgBKT048Gs2dYLmS 6qk0N4oAxGsiMEZmJRrhRpjZpkRRHOYe91TzBpAhfZ7RuofXbbkFZJhY7NlsywiDvjCC kDfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="o97/Kuga"; 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 f57si5043735edb.165.2019.10.18.15.07.33; Fri, 18 Oct 2019 15:07: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="o97/Kuga"; 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 S2503069AbfJQRiD (ORCPT + 99 others); Thu, 17 Oct 2019 13:38:03 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35518 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503056AbfJQRh7 (ORCPT ); Thu, 17 Oct 2019 13:37:59 -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=5Q8lZON7PHXLo9s0eo0DiHQm7hbQiEJjd1r4/mRBF0Y=; b=o97/KugaVY1UxlpS0nnD8ivD2g dSg8zUn1V5xoMny5QLSl/1mPKVOc5fSBb19U24w6gi+fKEPoEMNObt2/B+8XqFFHd4sMvbxitEpQc K3VfbEvqP4h9U57rDPljd9cDKSNgCTJqRXEQGUdXSbHinbF44CpmNhCeXgsfQXrBGiJiHIr5fVB4k P1l3R7DG7CQ4GYoxvpQbA/sj2edlX/bPAogWDjn9ISf22BFF8PWbDhqR52pA4fnERDotFAONqQs6w Blp04x4CL9m0BrScI8OOqOtKVGyeCGjR7aPf3VLmF2p/8bmo5qOPyK9kspfaeYpb5utvlaKU3+xw6 ROA+C6aQ==; 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 1iL9io-0007X1-C7; Thu, 17 Oct 2019 17:37:58 +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 05/15] riscv: poison SBI calls for M-mode Date: Thu, 17 Oct 2019 19:37:33 +0200 Message-Id: <20191017173743.5430-6-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 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index 21134b3ef404..b167af3e7470 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -8,6 +8,7 @@ #include +#ifdef CONFIG_RISCV_SBI #define SBI_SET_TIMER 0 #define SBI_CONSOLE_PUTCHAR 1 #define SBI_CONSOLE_GETCHAR 2 @@ -93,5 +94,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_RISCV_SBI */ +#endif /* _ASM_RISCV_SBI_H */ -- 2.20.1