Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6838019ybf; Fri, 6 Mar 2020 05:34:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vs2N8ldlNkqFHn7yB+r6CjEYqYyWgBwm+VgOJvfnU8oqNXbpxC0Pn+0SgMTfIO/eWmj/r+A X-Received: by 2002:aca:ad11:: with SMTP id w17mr2539441oie.66.1583501645199; Fri, 06 Mar 2020 05:34:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583501645; cv=none; d=google.com; s=arc-20160816; b=k0qRLdqgF1hI57Spp8UoGxbLLJoX2qoccsbPhDjOt/afyhqO/GLbpL8qV1PYTULkzv 5tQWdp2ng9GMvcIiIKHPN9BcsutFMZ3PUhzu9f2NZuoZvHnV+4EUYt25+5y+tClkv3Zc CP8Pgd5hpS/I4GQ0OOPOU2e07Tp02OjFtnhY29Lquw1I44PxfjLqmBYS6sEKhXIuu/Oa UjWXTaAz2HADby8DsAX5kpWvheetjmSJcskgR3ED1Hl7kRWyOAXCuiaZWHLZ8OBdmsib /mjiMjsUZ2EUzZmoqFzgXHL+yujxZlR3pzd3gon8OqgzT7N3ABu94oB9t92ua8WTNkos VOWw== 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=PfBgg3F1queAS6eFOhOQEpdxG8VeH6gXWcByfa5O8uk=; b=AYC+1bxRXMrCQG+jDDvg8RgA7BYAsc7tFVJ/6CKMS38ShjWT3xd4r5AoZ+dEQ9s8FR bn63xhh6oD+Yxj3URMOrER3syYd9sfHWjwHu3AsgFknkdJxRuJ3pMKUUq5frUJd6Qmj/ e4GvKonjCABHSPVl4wO1BBv6p1KRFa87bON417OcP0c3nNMaJau1t5Jwct0COafXkXlQ hMYHz+BijuVoB0wK/akEHKC+UH59CfG9+ZFWn6qY85allZRODY68T2vVmLD4tv8SUHsa ZY5J4bUUjvi17WQdv2NbvOxgmFbuhQhpr1tDh8ZzSpYpzKMkzLbnjrS9wXSAYKDKxnDX cb7g== 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 s70si1355957oie.178.2020.03.06.05.33.47; Fri, 06 Mar 2020 05:34: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 S1727405AbgCFNdQ (ORCPT + 99 others); Fri, 6 Mar 2020 08:33:16 -0500 Received: from foss.arm.com ([217.140.110.172]:33498 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727186AbgCFNdP (ORCPT ); Fri, 6 Mar 2020 08:33:15 -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 B900A31B; Fri, 6 Mar 2020 05:33:14 -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 00F583F6CF; Fri, 6 Mar 2020 05:33:11 -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 07/20] linux/time64.h: Extract common header for vDSO Date: Fri, 6 Mar 2020 13:32:29 +0000 Message-Id: <20200306133242.26279-8-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 time64.h into linux and common headers to make the latter suitable for inclusion in the vDSO library. Signed-off-by: Vincenzo Frascino --- include/common/time64.h | 14 ++++++++++++++ include/linux/time64.h | 10 +--------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 include/common/time64.h diff --git a/include/common/time64.h b/include/common/time64.h new file mode 100644 index 000000000000..ff5a72fafb30 --- /dev/null +++ b/include/common/time64.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __COMMON_TIME64_H +#define __COMMON_TIME64_H + +/* Parameters used to convert the timespec values: */ +#define MSEC_PER_SEC 1000L +#define USEC_PER_MSEC 1000L +#define NSEC_PER_USEC 1000L +#define NSEC_PER_MSEC 1000000L +#define USEC_PER_SEC 1000000L +#define NSEC_PER_SEC 1000000000L +#define FSEC_PER_SEC 1000000000000000LL + +#endif /* __COMMON_TIME64_H */ diff --git a/include/linux/time64.h b/include/linux/time64.h index 19125489ae94..3d8b3739e885 100644 --- a/include/linux/time64.h +++ b/include/linux/time64.h @@ -3,6 +3,7 @@ #define _LINUX_TIME64_H #include +#include typedef __s64 time64_t; typedef __u64 timeu64_t; @@ -19,15 +20,6 @@ struct itimerspec64 { struct timespec64 it_value; }; -/* Parameters used to convert the timespec values: */ -#define MSEC_PER_SEC 1000L -#define USEC_PER_MSEC 1000L -#define NSEC_PER_USEC 1000L -#define NSEC_PER_MSEC 1000000L -#define USEC_PER_SEC 1000000L -#define NSEC_PER_SEC 1000000000L -#define FSEC_PER_SEC 1000000000000000LL - /* Located here for timespec[64]_valid_strict */ #define TIME64_MAX ((s64)~((u64)1 << 63)) #define TIME64_MIN (-TIME64_MAX - 1) -- 2.25.1