Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4369226ybb; Tue, 7 Apr 2020 06:15:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJh2yxBP2AtTk4vLSArBXRiLt0HubG5gz7TnCNOrTNuyVHQGmMBdiGyanOOJCXfB/LoB7OQ X-Received: by 2002:a05:6830:1b64:: with SMTP id d4mr1444715ote.368.1586265351687; Tue, 07 Apr 2020 06:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586265351; cv=none; d=google.com; s=arc-20160816; b=c4zXjJrYXofxBbNtpuMFh2DT24OHBo7uDOaDFqLwReGMgweoaLTxt+khWpdHDG+zc+ kV8XnByNWgolazd8gJMmCeYxPCRT5g5kMeoYJyid8cxPOYpoHVZ5QavCb/zIGSkjCOSB FBrsas/CxDfRvISLplXp60PVHZixorT53svKLhGug0eploxgtCvIoZeBrdnjMSHaXY05 qGvxdkVAXzSkVXQL93HDOORjFC6ZMToOGGgPa60hUvDVOEOa8zBEsZHSuYhl/AOJKIl4 dsGskqP4A67S3cRRTBZfy4cg22nW+C0K/UzJrSJt9jynPyYONvrjmNXlIvnxWGFlagbJ fxdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=UPDaSeoTITdgPbCgjM+NltBDEuNbcuKw8CZpyU9Hygc=; b=o2at30ImU88wT8PEhAqmZDbzx1A1EKrMwMqEKB7TtoU2IW7AcW4J6g8zurO+gh5D0A UbRXA1qELouGFKjK8LWjDvuLX1NvaBUOUbzdejyHql+VibnaGK+6c9gSJicuSeuvWnb5 IBi56P4gWYOIOf++s2QGimilN3ZKx1yheQ9RRib0JtBvMKSWpYQp2DZtaE56+coBcNEF 8/NJKyIOsli3xXYDClGcaD0Q8tVaHJIMuRtiBVoR1oZgOUfsZm08riPvpU2U/aW/0QKu nZ5LD52s07zyGlZqirxBflWEmns4Rw7Rh6qvb+GHqxNCCtsuS74DZ8zeTFdl1yH69hon kB0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=ga88shwg; 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 a18si1328243otq.286.2020.04.07.06.15.28; Tue, 07 Apr 2020 06:15:51 -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=pass header.i=@c-s.fr header.s=mail header.b=ga88shwg; 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 S1728735AbgDGNNz (ORCPT + 99 others); Tue, 7 Apr 2020 09:13:55 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:61041 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728152AbgDGNNz (ORCPT ); Tue, 7 Apr 2020 09:13:55 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48xSXc0v7mz9ty2T; Tue, 7 Apr 2020 15:13:52 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=ga88shwg; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id Qz2HClTgpfVO; Tue, 7 Apr 2020 15:13:52 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 48xSXb6sw4z9vDCK; Tue, 7 Apr 2020 15:13:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1586265232; bh=UPDaSeoTITdgPbCgjM+NltBDEuNbcuKw8CZpyU9Hygc=; h=From:Subject:To:Cc:Date:From; b=ga88shwg2cV5JbrbDN0iaLvKTTDp6xX/kUFvNXkf06MwgEuWn8G9ut4c4/Gkt1cEy E9PH1gUTmE5XdHek3cBS7Q1jq4VQCPEhK7u7eYXsFjP4+ZLEDU3+ezn6OUbSS5+scv 6I0l+QqwO35OVqI+hWCYdhksoyyChP/4/EyF3KRA= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id F2A4E8B7B9; Tue, 7 Apr 2020 15:13:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id TngpBxE_ZTa0; Tue, 7 Apr 2020 15:13:52 +0200 (CEST) Received: from pc16570vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 825F58B79C; Tue, 7 Apr 2020 15:13:52 +0200 (CEST) Received: by pc16570vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 374F765746; Tue, 7 Apr 2020 13:13:52 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH v6 0/4] powerpc: switch VDSO to C implementation To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , nathanl@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, arnd@arndb.de, tglx@linutronix.de, vincenzo.frascino@arm.com, luto@kernel.org Date: Tue, 7 Apr 2020 13:13:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a sixth version of a series to switch powerpc VDSO to generic C implementation. There is no major change since v5, mainly rebasing. Generic changes are all in linus/master now, so the series only includes powerpc parts now. Patch 3 is new, required following rework of header files for VDSO. This series applies on today's powerpc/merge branch. See the last patch for details on changes and performance. Christophe Leroy (4): powerpc/vdso64: Switch from __get_datapage() to get_datapage inline macro powerpc/vdso: Remove __kernel_datapage_offset and simplify __get_datapage() powerpc/processor: Move cpu_relax() into asm/vdso/processor.h powerpc/vdso: Switch VDSO to generic C implementation. arch/powerpc/Kconfig | 2 + arch/powerpc/include/asm/clocksource.h | 7 + arch/powerpc/include/asm/processor.h | 10 +- arch/powerpc/include/asm/vdso/clocksource.h | 7 + arch/powerpc/include/asm/vdso/gettimeofday.h | 175 +++++++++++ arch/powerpc/include/asm/vdso/processor.h | 23 ++ arch/powerpc/include/asm/vdso/vsyscall.h | 25 ++ arch/powerpc/include/asm/vdso_datapage.h | 51 ++-- arch/powerpc/kernel/asm-offsets.c | 49 +--- arch/powerpc/kernel/time.c | 91 +----- arch/powerpc/kernel/vdso.c | 58 +--- arch/powerpc/kernel/vdso32/Makefile | 32 +- arch/powerpc/kernel/vdso32/cacheflush.S | 2 +- arch/powerpc/kernel/vdso32/config-fake32.h | 34 +++ arch/powerpc/kernel/vdso32/datapage.S | 7 +- arch/powerpc/kernel/vdso32/gettimeofday.S | 291 +------------------ arch/powerpc/kernel/vdso32/vdso32.lds.S | 7 +- arch/powerpc/kernel/vdso32/vgettimeofday.c | 29 ++ arch/powerpc/kernel/vdso64/Makefile | 23 +- arch/powerpc/kernel/vdso64/cacheflush.S | 9 +- arch/powerpc/kernel/vdso64/datapage.S | 31 +- arch/powerpc/kernel/vdso64/gettimeofday.S | 243 +--------------- arch/powerpc/kernel/vdso64/vdso64.lds.S | 7 +- arch/powerpc/kernel/vdso64/vgettimeofday.c | 29 ++ 24 files changed, 443 insertions(+), 799 deletions(-) create mode 100644 arch/powerpc/include/asm/clocksource.h create mode 100644 arch/powerpc/include/asm/vdso/clocksource.h create mode 100644 arch/powerpc/include/asm/vdso/gettimeofday.h create mode 100644 arch/powerpc/include/asm/vdso/processor.h create mode 100644 arch/powerpc/include/asm/vdso/vsyscall.h create mode 100644 arch/powerpc/kernel/vdso32/config-fake32.h create mode 100644 arch/powerpc/kernel/vdso32/vgettimeofday.c create mode 100644 arch/powerpc/kernel/vdso64/vgettimeofday.c -- 2.25.0