Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4386659pxb; Tue, 2 Nov 2021 08:54:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFV5wxEm7UFscFDTBPFc0jTTIsiCV8zYm2FFsPgxmw8A75eqUVprTopk9tgKYdE6McnsKD X-Received: by 2002:a17:906:58c6:: with SMTP id e6mr15095965ejs.524.1635868490694; Tue, 02 Nov 2021 08:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635868490; cv=none; d=google.com; s=arc-20160816; b=fDKhejkeFg6eImBpJQGBuMAbvSNTlMM2Ewj6zmKyAIMuwmYeR443hFAFg0u16AaoiM 2feTktFCWRjSdCNHLDjAeRlp2I5ADv6tUOCv3aRWh9kAYribzTcB9iVNXqtBtRnYNP3v ZiGfhDcecPvcq0EMEwB0KqceDYMfiMUXUYsl8Da9ueO6p8jKTDHknYhT/B51VRRzDnLJ 6up0Ddym3lviZwD+w+OuLwouGScGQABRU7uty9NHnT8BfglceZK76l6tkS2dcvwbdqBn 1s7PIrqE5swpzSy/C12PrBU/atR9pKLRxTjYtp0I13jSXktiPQD1huJZ1vv/lsEeGJmF 6a4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature:dkim-signature; bh=9Jn3BaAn3lExYJcPf9xUO6RYJ/5roELy886njRhgwJY=; b=iUWBf58M+IPcsEUz0A/w3iez6BscfavKkHRpSHqZgiAgAWLYDdOoCmEB6mThZI0Orr orMDIJikbSuNT0vUIgtP69pdhCIiDtzNwNO/tcjZenesT34F5i0GxSYkj5N/dtNrsioU 9Ef9Yw/zcd83+zQcjL0/YLh1Uzu2se2vGilNYvX0HTtGmPKPdR1kqtmj4Xz+oCAX3ZwT wAVXMYjpG3qe0A9JzMdAcBfRmgZIQlWxtu9niy3JD+TqZEwg+eM/IfMWnvd92gtUXXBe +iXgeNm5NABE9G/ruA37o/Dk1Pms8rc5BcKhpN0OovSq9ZxTVsk9OOJQKDqfEoDafHlw hBZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="wB/1cmf5"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=x2Voycqq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si24337373eda.23.2021.11.02.08.54.23; Tue, 02 Nov 2021 08:54:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="wB/1cmf5"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=x2Voycqq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234338AbhKBPy2 (ORCPT + 99 others); Tue, 2 Nov 2021 11:54:28 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:57796 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbhKBPyZ (ORCPT ); Tue, 2 Nov 2021 11:54:25 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 8D178212C3; Tue, 2 Nov 2021 15:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1635868303; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9Jn3BaAn3lExYJcPf9xUO6RYJ/5roELy886njRhgwJY=; b=wB/1cmf5b6RnbrrA20EJZzimJvULePq1Q91n5m9al5Y+o5W4DDQbL8KMqNyXnCMDaYU96Q /+bUednnEYrxG1wgF4oLwOcQzWohrJAUwmenR3R9lK1YOmhDdcj8FuvxpV6Bo2+/mkBZjO TNcHox+RD6VMaQx3xdVqpQ7S8PO2iBA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1635868303; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9Jn3BaAn3lExYJcPf9xUO6RYJ/5roELy886njRhgwJY=; b=x2VoycqqmoqL5TlYQH6i+IRqs0XEjjGWxwkvnjIbVdtXTSaETvxlUhmsd1EGjdaPacL46G 3Dx5fVZr7FId6aDQ== Received: from hawking.suse.de (hawking.suse.de [10.160.4.0]) by relay2.suse.de (Postfix) with ESMTP id 80F14A3B81; Tue, 2 Nov 2021 15:51:43 +0000 (UTC) Received: by hawking.suse.de (Postfix, from userid 17005) id 666894431CC; Tue, 2 Nov 2021 16:51:43 +0100 (CET) From: Andreas Schwab To: linux-riscv@lists.infradead.org Cc: Saleem Abdulrasool , linux-kernel@vger.kernel.org, Palmer Dabbelt , Nathan Chancellor , Nick Desaulniers , Bill Wendling , clang-built-linux@googlegroups.com Subject: [PATCH] riscv: fix building external modules References: <20210804173214.1027994-1-abdulras@google.com> X-Yow: An INK-LING? Sure -- TAKE one!! Did you BUY any COMMUNIST UNIFORMS?? Date: Tue, 02 Nov 2021 16:51:43 +0100 In-Reply-To: <20210804173214.1027994-1-abdulras@google.com> (Saleem Abdulrasool's message of "Wed, 4 Aug 2021 17:32:14 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building external modules, vdso_prepare should not be run. If the kernel sources are read-only, it will fail. Fixes: fde9c59aebaf ("riscv: explicitly use symbol offsets for VDSO") Signed-off-by: Andreas Schwab --- arch/riscv/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 0eb4568fbd29..41f3a75fe2ec 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -108,11 +108,13 @@ PHONY += vdso_install vdso_install: $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@ +ifeq ($(KBUILD_EXTMOD),) ifeq ($(CONFIG_MMU),y) prepare: vdso_prepare vdso_prepare: prepare0 $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso include/generated/vdso-offsets.h endif +endif ifneq ($(CONFIG_XIP_KERNEL),y) ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy) -- 2.33.1 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."