Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6837771ybf; Fri, 6 Mar 2020 05:33:48 -0800 (PST) X-Google-Smtp-Source: ADFU+vv2xT7PiIc8PR5Lg8Yj69nAN0x0kVTgRkYHtX6YzHRcFuh8Cg/R4E2UuZZx0uI3QDiYinOW X-Received: by 2002:a9d:7b4c:: with SMTP id f12mr2524975oto.345.1583501628459; Fri, 06 Mar 2020 05:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583501628; cv=none; d=google.com; s=arc-20160816; b=FEmxqVC63KeVuWW8LyUI1A/6O7ViLuBFZ4Bd0pCV/m6weRVYQh0djuOOM+33L2lQIh gfOhaJ7ETfw/zegi7eaQTQMT4iGxDY0A5rVlWoGvPWXqAmNGp6e2+VJjJk0zDCtVLqwx 81TScp6vTI8ZDmY1dKKtutfWaoSNom6aRzlHa2X8xH5deyeRjJZi3ZShLzqdFCcI1rP8 wS3rCJYHepkjxKvzLnTAyAYGgdEDubqwKPVP4sz9s8431qJnYZuUQhmfxRe5RIxViLrW wwqzBLQghe91UIars3R1p7YL1qCnc5vLmQojD72wI+7CT4iWlAQcXPM5F1nao+qid7Kw ASrQ== 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=9uMWn0ZG93KcIzmsh2Epu55kZNkfspB1ilSxN5/M8x4=; b=bw4Y2E6SACBweWLVedjtaMQocYugZFfU9P4yHb9sANYb/mIzp6SyjDXJioSeQHwhvo Xz0Y8VpWhIFV2LrvrUwRdn9k3iz3786Skgr7fj49L/UI1tjxPNHnsKuP2A6APnMALe4y 1o85G0iBmVtJDoXiOo/OqhIb5OpP81JtLdwQVc87j+q50xeDzSrOgZnVHA+z5MmlYsFV nF3I98ts15HDmLO8+il26R6zd5uzyhVLn3xuL9akZzVyqrVKAe2kuqyjQEjW7l/aR0EN AnFeLkXT1+iKjwso8DO5mgx++83ypQGcuw2YkcrCXwCgr5vDkBF3LGjSdwbIYG62y7SZ aXrg== 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 n17si1345812oic.145.2020.03.06.05.33.30; Fri, 06 Mar 2020 05:33:48 -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 S1727265AbgCFNdE (ORCPT + 99 others); Fri, 6 Mar 2020 08:33:04 -0500 Received: from foss.arm.com ([217.140.110.172]:33358 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbgCFNdD (ORCPT ); Fri, 6 Mar 2020 08:33:03 -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 DC9E81063; Fri, 6 Mar 2020 05:33:02 -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 2794E3F6CF; Fri, 6 Mar 2020 05:33:00 -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 03/20] linux/limits.h: Extract common header for vDSO Date: Fri, 6 Mar 2020 13:32:25 +0000 Message-Id: <20200306133242.26279-4-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 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.1