Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6838890ybf; Fri, 6 Mar 2020 05:35:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vvrvvF6GPa9aitdlXsU+AEmV0suD2MSmw+Q1Xrzkj37kxF56aBR2el3TcyiwpQ+TjM8Cnmn X-Received: by 2002:a9d:6205:: with SMTP id g5mr2629460otj.153.1583501705610; Fri, 06 Mar 2020 05:35:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583501705; cv=none; d=google.com; s=arc-20160816; b=rDXi1Fk9y4WiUU5MNXDSTVAMdTJr/rc4lkqvffxdbrrblOWEij5n0+GmphfZcxDvyR yUumioWR78M6fLkKf7KwnzTKkRFWIfLEP1jlcKNbdsXXMohu5qAUMqhCYYaTYKuUqhND YUCJ2EWow8yxO/ewCFmYGQ76tZcEjompidJlDRRb1afmWOeRxljGB9/VcG7boraouMNz EjnC73wrgwVXUJKqya9IyjTcv10hGXQolaad+DTsatZ+rFHp2vjJsGkOnVkn6akQTp7w Z5lYFEAx94mZahljYOksc7aeYg1cbOuyhEBa6xVrz0FjnhTeJi/HW0frJbGBuF02ncA9 pXGg== 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; bh=L2if2lKbBk/OWnp7+qedCJ6PJlyIqDpSQiULRSTO11o=; b=fQIaLsvWEVNbQtDmQur8UnIkDc/TJ7ZvchMnqnX76FJvsHeRegZUjz9tFTCEUyar5X xAKKBEVdd95eC5M3NQ98R3+etyLoPpHnRFptqHEbjJO/UPLu/yOcDXMXEfb3MhxSMRmG 4Eef9cf6P57gG8EWdEQtc/kN7vPdXGXPQT/H5y8/3F32KzhZI5n61FooyPRI4mqqD/hy 9DwwaLXWuPMS+5Ebu6VSDCFAlAWBzs0pvDTAlPe7wgyo2O2db6WcufONaIO00b7D+e/g xgUH1A9ONmY2uI2eOBIr91hQJsxtqd4M3LmZsJQj0YQJEH+uXrXFIwO36KsM90NdM8WT rmWQ== ARC-Authentication-Results: i=1; mx.google.com; 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 l15si1324772oic.220.2020.03.06.05.34.53; Fri, 06 Mar 2020 05:35:05 -0800 (PST) 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; 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 S1727441AbgCFNdW (ORCPT + 99 others); Fri, 6 Mar 2020 08:33:22 -0500 Received: from foss.arm.com ([217.140.110.172]:33568 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726733AbgCFNdV (ORCPT ); Fri, 6 Mar 2020 08:33:21 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A70D81063; Fri, 6 Mar 2020 05:33:20 -0800 (PST) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E57DA3F6CF; Fri, 6 Mar 2020 05:33:17 -0800 (PST) From: Vincenzo Frascino To: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, clang-built-linux@googlegroups.com, x86@kernel.org Cc: Vincenzo Frascino , Catalin Marinas , Will Deacon , Arnd Bergmann , Russell King , Paul Burton , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , Borislav Petkov , Stephen Boyd , Mark Salyzyn , Kees Cook , Peter Collingbourne , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , Nick Desaulniers Subject: [PATCH v2 09/20] linux/ktime.h: Extract common header for vDSO Date: Fri, 6 Mar 2020 13:32:31 +0000 Message-Id: <20200306133242.26279-10-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200306133242.26279-1-vincenzo.frascino@arm.com> References: <20200306133242.26279-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library. Split ktime.h into linux and common headers to make the latter suitable for inclusion in the vDSO library. Signed-off-by: Vincenzo Frascino --- include/common/ktime.h | 16 ++++++++++++++++ include/linux/ktime.h | 9 +-------- 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 include/common/ktime.h diff --git a/include/common/ktime.h b/include/common/ktime.h new file mode 100644 index 000000000000..4dd6c6762ad4 --- /dev/null +++ b/include/common/ktime.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __COMMON_KTIME_H +#define __COMMON_KTIME_H + +#include + +/* + * The resolution of the clocks. The resolution value is returned in + * the clock_getres() system call to give application programmers an + * idea of the (in)accuracy of timers. Timer values are rounded up to + * this resolution values. + */ +#define LOW_RES_NSEC TICK_NSEC +#define KTIME_LOW_RES (LOW_RES_NSEC) + +#endif /* __COMMON_KTIME_H */ diff --git a/include/linux/ktime.h b/include/linux/ktime.h index d1fb05135665..c456b33c80e1 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -216,14 +216,7 @@ static inline __must_check bool ktime_to_timespec64_cond(const ktime_t kt, } } -/* - * The resolution of the clocks. The resolution value is returned in - * the clock_getres() system call to give application programmers an - * idea of the (in)accuracy of timers. Timer values are rounded up to - * this resolution values. - */ -#define LOW_RES_NSEC TICK_NSEC -#define KTIME_LOW_RES (LOW_RES_NSEC) +#include static inline ktime_t ns_to_ktime(u64 ns) { -- 2.25.1