Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1619867pxb; Mon, 11 Oct 2021 09:36:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG9kVcMY5tC8K10z7Ic0t5vRVJUTS7FuzPcCuUWUGdn+OUP8eaRPj9EWbpgi6LkcAoVYzb X-Received: by 2002:a05:6402:11d4:: with SMTP id j20mr42562474edw.267.1633970212631; Mon, 11 Oct 2021 09:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633970212; cv=none; d=google.com; s=arc-20160816; b=WJLCzSCmLUqXljjn1IPrmithM+4Wn1USDQVjQG+h8ec6j/cI1JXf3JsMEp6ZO5itC+ /0CR8EQYIDV6vHAdffHQmnMCiocz8aIjpHUicG2Lg0MDiSC+YA7+Z+0OYFvd85fVGh6r 9DcXXtfNn4ZZuDVa3i/moGCYJ+NTyQULPbdn9R+N+E3njCW5JRH+jXHdUjOoYUsvD+Ui IX8OZP2Y4oIeUCOwksYMYtrS/uvh0LDO1An88L+NnphEy4Ggzvn/7f+tG/awPB85rgva X8nmHF76Z9rLekolxZENGNxlES8LT5MJ1QDOAwpOA/iNTJHr9N6NXAWSEHlUovI/sKdr O76g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2ykx9PCtCuVjz6jUJT92uduNGTDEi+Fs6MeLgG3Swbg=; b=S53C1dHCAG4M2cHiRN21agSZL3FABIN2GdCtA7EKHAA8T27x8cNTEPyH0bK+LCMkHj 9NKnKMpxVOLMkm5K9wd1ddFTBfgZePcmaHUxG9eG/4lT/PXA3sWIsOqsY9TZre1PM330 YjiNsyk0Cmn4mpdahKeRVmfZRY9SQOsz+UP7NazHAVPYOO1lVC3EBlCXPjUIZrLnDkPT 6xPyuMEhIZZIA0Is3zW7qgqOEbN8nfhmGvqTOjv64aQRekgo8BvTGJjiJENAtsYlQ1j2 2HVs2VYDw+TCHBbjBOi31WbSHWkHqnRHJDqXdrvpP4xTD+n9e5GgmSTKTJfbzy6b0QrF acQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FbaUL8GD; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si12013077ejb.64.2021.10.11.09.36.28; Mon, 11 Oct 2021 09:36:52 -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=@linuxfoundation.org header.s=korg header.b=FbaUL8GD; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239757AbhJKOMw (ORCPT + 99 others); Mon, 11 Oct 2021 10:12:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:34544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238598AbhJKOKU (ORCPT ); Mon, 11 Oct 2021 10:10:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 75D9B6115C; Mon, 11 Oct 2021 14:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633960948; bh=CPxWgP9a5q/4Ip6Nzx4G6n/3ul9tIw6KZbcbEi/iPYI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FbaUL8GDbH8byjIljQMfwuevo3qovTRt1tCa0GfeMZ4kFrI67z6VT46AFOVVgUdgW nYpBQ8S9M5bzQamZ25usmUSCpOdn3IABfLKoe4HrOYCv46MNoffCpyiJER/tkkbAzl y5gZj7wbxcoyagUiExnajptYUMPRTiueDba89/JY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Palmer Dabbelt , Sasha Levin Subject: [PATCH 5.14 122/151] RISC-V: Fix VDSO build for !MMU Date: Mon, 11 Oct 2021 15:46:34 +0200 Message-Id: <20211011134521.758548651@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211011134517.833565002@linuxfoundation.org> References: <20211011134517.833565002@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Palmer Dabbelt [ Upstream commit a290f510a178830a01bfc06e66a54bbe4ece5d2a ] We don't have a VDSO for the !MMU configurations, so don't try to build one. Fixes: fde9c59aebaf ("riscv: explicitly use symbol offsets for VDSO") Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/Makefile | 2 ++ arch/riscv/include/asm/vdso.h | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index e026b2d0a5a4..83ee0e71204c 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -108,9 +108,11 @@ PHONY += vdso_install vdso_install: $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@ +ifeq ($(CONFIG_MMU),y) prepare: vdso_prepare vdso_prepare: prepare0 $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso include/generated/vdso-offsets.h +endif ifneq ($(CONFIG_XIP_KERNEL),y) ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy) diff --git a/arch/riscv/include/asm/vdso.h b/arch/riscv/include/asm/vdso.h index d8d003c2b5a3..893e47195e30 100644 --- a/arch/riscv/include/asm/vdso.h +++ b/arch/riscv/include/asm/vdso.h @@ -8,6 +8,13 @@ #ifndef _ASM_RISCV_VDSO_H #define _ASM_RISCV_VDSO_H + +/* + * All systems with an MMU have a VDSO, but systems without an MMU don't + * support shared libraries and therefor don't have one. + */ +#ifdef CONFIG_MMU + #include #include @@ -19,6 +26,8 @@ struct vdso_data { #define VDSO_SYMBOL(base, name) \ (void __user *)((unsigned long)(base) + __vdso_##name##_offset) +#endif /* CONFIG_MMU */ + asmlinkage long sys_riscv_flush_icache(uintptr_t, uintptr_t, uintptr_t); #endif /* _ASM_RISCV_VDSO_H */ -- 2.33.0