Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp719353ybv; Thu, 13 Feb 2020 08:17:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyS7XomTRXCLeNarmT/z12ZTgCHHLTBW30Q5HHgQ/XkIjnBMA0sqduJIOvI+8unVhPS21bt X-Received: by 2002:a05:6830:9a:: with SMTP id a26mr14312989oto.273.1581610641269; Thu, 13 Feb 2020 08:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581610641; cv=none; d=google.com; s=arc-20160816; b=xSGQZA91SdNYQyjHw0XSFwb3yNZFcBiQYXAoMVEsLpPvPKoJ1oL/ZZS780f4JbQUP6 4+uBlbp7CD0u6ik/maCr9Ust5n9/HgnKpayhsIGJ3X0VlCXMSDgyu08yJZZV2JWn6Ujt AzhOMGcV43ZmD4gqp1+VC/F88aclhQBhR3XCRM/tVmtdwlxAPcUKnHLrB2YqpN2jwY88 EtQEURSW7HQdf/IrVPXwQ1QVU7vyLohX0WG3tP6EGno3sJ6u21V/9NQ+7zh/CxlfFdVn R3OCEPFzyx/0vDl02CxysHvEagDLYmgg4WeZh67PyaaLCJ2zNBhWhEcKo/C1zGhPIVvM +iGQ== 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=XCVUQ58nsw60E98Izgnu/A8pJKbNkkdWIqEBudYT7YQ=; b=dmXm7ZMZVIoN3B60hdVYWDQjYNBMw61jwCqppyk02hQ2Opd4bCM6ZizdyhpdmUAAOi k8lG/o/8OmefyJr5ZnAAZBbrFFLAQ3o22br5sY+i8FYAuuJPho4MBX4bw0CtFlSkjiku u0KrRhUZys4156/TUeMvFb5d7vdaMpsG9kgVeG+pHpA430G844HRBkhrfFrrZ6iZz4CF lQOiVFNxU7pVVR+QslMAcRZxDXqCNUwEsb+IJucXJ9kbUIbrGoW59s9EA9zzCJFwkdYv sQ9QdNx8g+wztMzhc+LleeO+9LoiyrWp25bynt6AQV2ieX5A7jU23GZEU/day0EJBtb4 6sOA== 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 b191si1313974oii.266.2020.02.13.08.17.07; Thu, 13 Feb 2020 08:17:21 -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 S1728225AbgBMQQx (ORCPT + 99 others); Thu, 13 Feb 2020 11:16:53 -0500 Received: from foss.arm.com ([217.140.110.172]:49752 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbgBMQQv (ORCPT ); Thu, 13 Feb 2020 11:16:51 -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 2A0FF106F; Thu, 13 Feb 2020 08:16:51 -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 9D1063F6CF; Thu, 13 Feb 2020 08:16:48 -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: catalin.marinas@arm.com, will.deacon@arm.com, arnd@arndb.de, linux@armlinux.org.uk, paul.burton@mips.com, tglx@linutronix.de, luto@kernel.org, mingo@redhat.com, bp@alien8.de, sboyd@kernel.org, salyzyn@android.com, pcc@google.com, 0x7f454c46@gmail.com, ndesaulniers@google.com, avagin@openvz.org Subject: [PATCH 03/19] linux/limits.h: Extract common header for vDSO Date: Thu, 13 Feb 2020 16:15:58 +0000 Message-Id: <20200213161614.23246-4-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 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 limits.h into linux and common headers to make the latter suitable for inclusion in the vDSO library. Signed-off-by: Vincenzo Frascino --- include/common/limits.h | 18 ++++++++++++++++++ include/linux/limits.h | 13 +------------ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 include/common/limits.h diff --git a/include/common/limits.h b/include/common/limits.h new file mode 100644 index 000000000000..587269010add --- /dev/null +++ b/include/common/limits.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __COMMON_LIMITS_H +#define __COMMON_LIMITS_H + +#define USHRT_MAX ((unsigned short)~0U) +#define SHRT_MAX ((short)(USHRT_MAX >> 1)) +#define SHRT_MIN ((short)(-SHRT_MAX - 1)) +#define INT_MAX ((int)(~0U >> 1)) +#define INT_MIN (-INT_MAX - 1) +#define UINT_MAX (~0U) +#define LONG_MAX ((long)(~0UL >> 1)) +#define LONG_MIN (-LONG_MAX - 1) +#define ULONG_MAX (~0UL) +#define LLONG_MAX ((long long)(~0ULL >> 1)) +#define LLONG_MIN (-LLONG_MAX - 1) +#define ULLONG_MAX (~0ULL) + +#endif /* __COMMON_LIMITS_H */ diff --git a/include/linux/limits.h b/include/linux/limits.h index 76afcd24ff8c..ac20d2b2edd9 100644 --- a/include/linux/limits.h +++ b/include/linux/limits.h @@ -4,19 +4,8 @@ #include #include +#include -#define USHRT_MAX ((unsigned short)~0U) -#define SHRT_MAX ((short)(USHRT_MAX >> 1)) -#define SHRT_MIN ((short)(-SHRT_MAX - 1)) -#define INT_MAX ((int)(~0U >> 1)) -#define INT_MIN (-INT_MAX - 1) -#define UINT_MAX (~0U) -#define LONG_MAX ((long)(~0UL >> 1)) -#define LONG_MIN (-LONG_MAX - 1) -#define ULONG_MAX (~0UL) -#define LLONG_MAX ((long long)(~0ULL >> 1)) -#define LLONG_MIN (-LLONG_MAX - 1) -#define ULLONG_MAX (~0ULL) #define SIZE_MAX (~(size_t)0) #define PHYS_ADDR_MAX (~(phys_addr_t)0) -- 2.25.0