Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6838041ybf; Fri, 6 Mar 2020 05:34:07 -0800 (PST) X-Google-Smtp-Source: ADFU+vvGjhH9ELD4QYgxYZGhvKFwkC125D3uFBQ7J/aBu7v4QXx8bDMr7zhxMBW7B+IpRBz5sn2h X-Received: by 2002:aca:4b57:: with SMTP id y84mr2657017oia.16.1583501646985; Fri, 06 Mar 2020 05:34:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583501646; cv=none; d=google.com; s=arc-20160816; b=utO77uUyOuNKbGYaU7cO+vhI6wVECGgSsS/HAkyHSqlefoQkwHLNms576jzMLzXpQn Uxw2fEGpDMwHttJRrE0K1F8eRRQicbH13R+Er+hpXUQ7RGMPggepQlSgQgWMLhk90RCZ T2Yxq+8x+sUnmOuOe8GlbbdR1mhSsMxXe5Esn0CDEihHu/7USPlWHth09ExLrMNOBuEt yp1NNj5HvV3L1nDtT7LWLfssP65Bf3hjxIzgreO7qRx4AGVrkmRsxcddbwifNE4BPKRh HMQ51ZxSPekPJ6PIMS+DbQl7Y06NE22FLzKfK0uopIzioldvQ1N2LhkF2TSRWkgG0Ukx YBTA== 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=Kho25LdnmaJuyRGEui60L4sdGc2nDJoDvgJc2PLzy/w=; b=g1Rbepj7O5isjpAmbllY5yzXnUF+92QAYuB/6tvuD+ykEbCrp73TOqGQhjWLcfYh9q uJqwDVgqLJOjrBFiFYSFHXd59iTxDK59KnOXeuqYISP5RnEvgs6rE2YOG2OAmEv5l7mT BdTne8lwhVCitfKnCb9luZYdnENL+26KXhg+CYk5cslOPjL4XPbkXDsWhkL/pYUWeFS7 WP+ZZ1vDiKqIOoO8i7kcaY9aHYevlo5Av1fQ+X9OnHLLIw7T5D9WBNCiYyTx+JDO0OxN Yyd+A8HOBdkAfKgLvQhaisA6OgAQw+OoRVQHgfRUikmWOCwldnuppm1TMeuRHwtc1TmS 7gNA== 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 t26si1374682otc.205.2020.03.06.05.33.50; Fri, 06 Mar 2020 05:34:06 -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 S1727426AbgCFNdS (ORCPT + 99 others); Fri, 6 Mar 2020 08:33:18 -0500 Received: from foss.arm.com ([217.140.110.172]:33530 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726733AbgCFNdS (ORCPT ); Fri, 6 Mar 2020 08:33:18 -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 AE5DD4B2; Fri, 6 Mar 2020 05:33:17 -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 ECC3E3F6CF; Fri, 6 Mar 2020 05:33:14 -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 08/20] linux/jiffies.h: Extract common header for vDSO Date: Fri, 6 Mar 2020 13:32:30 +0000 Message-Id: <20200306133242.26279-9-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 jiffies.h into linux and common headers to make the latter suitable for inclusion in the vDSO library. Signed-off-by: Vincenzo Frascino --- include/common/jiffies.h | 11 +++++++++++ include/linux/jiffies.h | 4 +--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 include/common/jiffies.h diff --git a/include/common/jiffies.h b/include/common/jiffies.h new file mode 100644 index 000000000000..ff0207f00550 --- /dev/null +++ b/include/common/jiffies.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __COMMON_JIFFIES_H +#define __COMMON_JIFFIES_H + +#include /* for HZ */ +#include + +/* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ +#define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ) + +#endif /* __COMMON_JIFFIES_H */ diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index e3279ef24d28..710539d1e39b 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -8,6 +8,7 @@ #include #include #include +#include #include /* for HZ */ #include @@ -59,9 +60,6 @@ extern int register_refined_jiffies(long clock_tick_rate); -/* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ -#define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ) - /* TICK_USEC is the time between ticks in usec assuming SHIFTED_HZ */ #define TICK_USEC ((USEC_PER_SEC + HZ/2) / HZ) -- 2.25.1