From patchwork Thu Feb 13 16:16:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Frascino X-Patchwork-Id: 11380759 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9DEB13A4 for ; Thu, 13 Feb 2020 16:19:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 98553206ED for ; Thu, 13 Feb 2020 16:19:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="er3Gyjxd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98553206ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pJFJmlmDLgbymBQHc+faR0Q9PnN4/sMcmCnzGtHcJxo=; b=er3Gyjxd2P0pTZ Eq1CRy3cIo+yUJxBkTfbxLrr0Sx0OmwSYflHNGCd9/P3r2dEd7DU58kks8CUMhdWfSDwKtWj558rA aO/eDfPc+fJJCZ1y0sW4XxaR4QDeGi1S0xekhdY4RJUW07H5RPTsQJz2y4TNSFQpvZAO9ujmxdZ5p m+WdZTJbp9/5q//7cTK+UZVI6fkJ2LbIAlDXbU+vGLeoOdFC/7Uq0gAeNU3309Bsn6BNU290iNCVP dHq+ClSRqF7D9yqHI8BbUBKYpXQCCOH9tUR2u2VPzKmRv18vt3wRJj1n0hpYc58cCzbO1lyaxfPpL uPi6yoVFuHtJyuShB+Qw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2HCb-00061N-Ku; Thu, 13 Feb 2020 16:18:57 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2HAo-00045i-Bo for linux-arm-kernel@lists.infradead.org; Thu, 13 Feb 2020 16:17:09 +0000 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 DE8CC106F; Thu, 13 Feb 2020 08:17:04 -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 5D74E3F6CF; Thu, 13 Feb 2020 08:17:02 -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 Subject: [PATCH 08/19] linux/jiffies.h: Extract common header for vDSO Date: Thu, 13 Feb 2020 16:16:03 +0000 Message-Id: <20200213161614.23246-9-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213161614.23246-1-vincenzo.frascino@arm.com> References: <20200213161614.23246-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200213_081706_705143_942B95EF X-CRM114-Status: GOOD ( 12.22 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ndesaulniers@google.com, 0x7f454c46@gmail.com, avagin@openvz.org, arnd@arndb.de, sboyd@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, linux@armlinux.org.uk, salyzyn@android.com, paul.burton@mips.com, mingo@redhat.com, bp@alien8.de, luto@kernel.org, tglx@linutronix.de, pcc@google.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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)