Add "riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL"

See:
https://patchwork.kernel.org/project/linux-riscv/patch/1609593874-64422-1-git-send-email-guoren@kernel.org/
https://lists.infradead.org/pipermail/linux-riscv/2021-January/004064.html

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2021-01-12 11:42:16 +02:00
parent 50cdc4f8cb
commit f66e79a66f
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
2 changed files with 137 additions and 0 deletions

View File

@ -863,6 +863,9 @@ Patch105: 0001-ALSA-hda-via-Fix-runtime-PM-for-Clevo-W35xSS.patch
# Nouveau mDP detection fix
Patch107: 0001-drm-nouveau-kms-handle-mDP-connectors.patch
# RISC-V (riscv64)
Patch150: riscv-fixup-CONFIG_GENERIC_TIME_VSYSCALL.patch
# END OF PATCH DEFINITIONS
%endif

View File

@ -0,0 +1,134 @@
From patchwork Sat Jan 2 13:24:34 2021
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Guo Ren <guoren@kernel.org>
X-Patchwork-Id: 11995163
Return-Path:
<SRS0=P1Ac=GF=lists.infradead.org=linux-riscv-bounces+linux-riscv=archiver.kernel.org@kernel.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH,
DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,
SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham
autolearn_force=no version=3.4.0
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
by smtp.lore.kernel.org (Postfix) with ESMTP id F39D6C433DB
for <linux-riscv@archiver.kernel.org>; Sat, 2 Jan 2021 13:25:58 +0000 (UTC)
Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.kernel.org (Postfix) with ESMTPS id 07AC7224DF
for <linux-riscv@archiver.kernel.org>; Sat, 2 Jan 2021 13:25:57 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07AC7224DF
Authentication-Results: mail.kernel.org;
dmarc=fail (p=none dis=none) header.from=kernel.org
Authentication-Results: mail.kernel.org;
spf=none
smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding:
Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive:
List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:In-Reply-To:References:List-Owner;
bh=qWgSDTwZ0joz8awBi7xiP1uOZVRCGH8rG766c1k8vlo=; b=Eleynw646f0FV5MpJYKSY58f62
RKr9Cppk1SIeozGBqcWKpk5VeMIaTZYaP9b7hUHeHidGPB2j6uHvjz7soxm86ws/t+aAMobHRNiu8
45qpPEVV/soiDpcHjjjYCgRqC9k6V/YF6/sHBAuqImoAatvoSDrIoHsK0HVQdHH6sKz1rhN3YUNYt
+qf2Yzf2tbQ1yfZEs5R7q0f9ymmbQZBDGQMbHBVWgiZI3VEIPzd7c/J5Rq2hWbgjwLmW+PrC3/lZQ
86AqzO8+cFDQqYioqRaG3z0rz6w8TlaW+C6/unoR5g/npRYPkt325wkROMPD6LkaWUR5T4x3Y1XXA
1Hk0GkFg==;
Received: from localhost ([::1] helo=merlin.infradead.org)
by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
id 1kvguh-0002ys-5F; Sat, 02 Jan 2021 13:25:47 +0000
Received: from mail.kernel.org ([198.145.29.99])
by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
id 1kvguf-0002yC-7O
for linux-riscv@lists.infradead.org; Sat, 02 Jan 2021 13:25:46 +0000
Received: by mail.kernel.org (Postfix) with ESMTPSA id BF2A0224D2;
Sat, 2 Jan 2021 13:25:31 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1609593942;
bh=TVsidi0zzSt/PgVGHSye3zjeAkDC4WSqDayvsSzjYbE=;
h=From:To:Cc:Subject:Date:From;
b=etiRHgnGy4cY/GQAen8hsZsp0G2TlXhAWwSmpk6YPupEvE8OAY4/t6ZoObClBymsG
tEFudifXAeESBt8pyZTKKZBKg8KUFFT0fNjSZzKqQpPbE6+i+u85lBccXkqbz51E6B
d4NQpqKMTiqKMBJznTqoC/Q7NE9eLPYZ+RQyUsRoJrNHtol8EVUOmm5u3aaxGsWt/F
MXXuYjMRi8ss1VQt8lpKu4QZuCSWL4DC/QI70NTXGjXhu3Hu4oM0iOml4YqzpqwsWw
rOIKb2J19ViqEYkBQdOX2pIkTdWrhWnOhC/GPu8X3wXumS9RlAWYxCH/C6uHSUoCo0
DwMchROSS1NMA==
From: guoren@kernel.org
To: palmerdabbelt@google.com, paul.walmsley@sifive.com, anup@brainfault.org,
atish.patra@wdc.com
Subject: [PATCH] riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL
Date: Sat, 2 Jan 2021 13:24:34 +0000
Message-Id: <1609593874-64422-1-git-send-email-guoren@kernel.org>
X-Mailer: git-send-email 2.7.4
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20210102_082545_358224_738434CD
X-CRM114-Status: UNSURE ( 9.82 )
X-CRM114-Notice: Please train this message.
X-BeenThere: linux-riscv@lists.infradead.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <linux-riscv.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-riscv>,
<mailto:linux-riscv-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-riscv/>
List-Post: <mailto:linux-riscv@lists.infradead.org>
List-Help: <mailto:linux-riscv-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-riscv>,
<mailto:linux-riscv-request@lists.infradead.org?subject=subscribe>
Cc: Guo Ren <guoren@linux.alibaba.com>, linux-kernel@vger.kernel.org,
linux-csky@vger.kernel.org, Vincent Chen <vincent.chen@sifive.com>,
guoren@kernel.org, linux-riscv@lists.infradead.org
MIME-Version: 1.0
Sender: "linux-riscv" <linux-riscv-bounces@lists.infradead.org>
Errors-To:
linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org
From: Guo Ren <guoren@linux.alibaba.com>
The patch fix commit: ad5d112 ("riscv: use vDSO common flow to
reduce the latency of the time-related functions").
The GENERIC_TIME_VSYSCALL should be CONFIG_GENERIC_TIME_VSYSCALL
or vgettimeofday won't work.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Cc: Atish Patra <atish.patra@wdc.com>
Cc: Palmer Dabbelt <palmerdabbelt@google.com>
Cc: Vincent Chen <vincent.chen@sifive.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
---
arch/riscv/include/asm/vdso.h | 2 +-
arch/riscv/kernel/vdso.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/include/asm/vdso.h b/arch/riscv/include/asm/vdso.h
index 8454f74..1453a2f 100644
--- a/arch/riscv/include/asm/vdso.h
+++ b/arch/riscv/include/asm/vdso.h
@@ -10,7 +10,7 @@
#include <linux/types.h>
-#ifndef GENERIC_TIME_VSYSCALL
+#ifndef CONFIG_GENERIC_TIME_VSYSCALL
struct vdso_data {
};
#endif
diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c
index 6782042..3f1d35e 100644
--- a/arch/riscv/kernel/vdso.c
+++ b/arch/riscv/kernel/vdso.c
@@ -12,7 +12,7 @@
#include <linux/binfmts.h>
#include <linux/err.h>
#include <asm/page.h>
-#ifdef GENERIC_TIME_VSYSCALL
+#ifdef CONFIG_GENERIC_TIME_VSYSCALL
#include <vdso/datapage.h>
#else
#include <asm/vdso.h>