Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1867672ybh; Fri, 13 Mar 2020 08:46:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvZK0SRkqrNUfzB+umcGMoj3kGJziRckZVLD65wSxtDGS4X06XJjHv5MGuuFUdVn6tzdNB0 X-Received: by 2002:aca:ea46:: with SMTP id i67mr7279652oih.149.1584114415379; Fri, 13 Mar 2020 08:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584114415; cv=none; d=google.com; s=arc-20160816; b=vBD6kfPuzsqLxqRSGPVcPciHYVa5EsFIsLfr4Exc3YPiZ7AcGT5MWxLEk6Z9B++eO5 vZVhOu/MrnUAMB/vi64F/aqFs1k/phS/WbcS1flwY4qLKm9Vcx3pY0Ej+2MNS7EbG7pz OL6eiO/t7IHaSTIvM0jM6ZU66uZOLjyzq37nrL0vzucNj5MZhm92mv1IQE1UjArJoTmD zMU1MRRE2L8ggmsAPXzk9s0RqMc4UKecI+X+Vh0UCwrfUnUDxsXcl0aEqyNECzc26ag0 aD60stQ67CcYUpyYcTiZq6s5wXrV0CUUdFTBNl5RqR530UWSi1Fk4dfq1I4yYT9DD+ix cOEw== 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=tiW2O59no9+QJFKPQIc1RP5hT/jS/N0FxsM4s5QO004=; b=roBYvfJKiztlZTxAi+P7104kw/K71OmHoYHU5EBo82EwXZKHtOM8wPFwTrQddzmQbS 0/aByxI+MNF8BBa4K6jEevgSWyhAhVY3gaAfM0W62sAvzbZJYlctfwgKsZAAaFeUHHJU yvySv5PEG3SA9buJZyEa6PZQb1F6kdkrol0QDEA9+43mxaFnfTCxNJO2IDBnqq0QaTm+ xXxf/Z/DrXF0FAfzODPvhoCWGf7GNgA4/o6p5AQWzqf6447AIYWJxLQpDbQyK7UB4Olr wPPYyzY8V0++MBztZwu6P8+GaLHNmvBas17P2iJN2J+v6oB6r43XQ1zxXYS0z9mJPdeG kxug== 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 p131si788661oib.179.2020.03.13.08.46.43; Fri, 13 Mar 2020 08:46:55 -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; 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 S1727299AbgCMPov (ORCPT + 99 others); Fri, 13 Mar 2020 11:44:51 -0400 Received: from foss.arm.com ([217.140.110.172]:58722 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727281AbgCMPov (ORCPT ); Fri, 13 Mar 2020 11:44:51 -0400 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 53188FEC; Fri, 13 Mar 2020 08:44:50 -0700 (PDT) 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 5C3AD3F67D; Fri, 13 Mar 2020 08:44:47 -0700 (PDT) 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 , Marc Zyngier , Mark Rutland Subject: [PATCH v3 14/26] linux/ktime.h: Extract common header for vDSO Date: Fri, 13 Mar 2020 15:43:33 +0000 Message-Id: <20200313154345.56760-15-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200313154345.56760-1-vincenzo.frascino@arm.com> References: <20200313154345.56760-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/linux/ktime.h | 9 +-------- include/vdso/ktime.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 include/vdso/ktime.h diff --git a/include/linux/ktime.h b/include/linux/ktime.h index b2bb44f87f5a..1fcfce97a020 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -253,14 +253,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) { diff --git a/include/vdso/ktime.h b/include/vdso/ktime.h new file mode 100644 index 000000000000..a0fd07239e0e --- /dev/null +++ b/include/vdso/ktime.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __VDSO_KTIME_H +#define __VDSO_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 /* __VDSO_KTIME_H */ -- 2.25.1