Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6837744ybf; Fri, 6 Mar 2020 05:33:46 -0800 (PST) X-Google-Smtp-Source: ADFU+vtxLhDDi5nOzED8+wcTL5vG8JVS6nvKCVkYuojlWNRe2RC/tBfTu/1FehUMPHXa8D3dZm7o X-Received: by 2002:a9d:5e9:: with SMTP id 96mr2507194otd.307.1583501626281; Fri, 06 Mar 2020 05:33:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583501626; cv=none; d=google.com; s=arc-20160816; b=SIFSPzvlblQEH+NokFzntWdnXoxwTUWQcr1BNfDQbx7CyRZTRhp610RZV7q3g+BolB QeiToHWJrTtbnvzronvQyJ3LEIuqxJsNuboJQK7RFAaAPXzGQn09W4if8C8fcvEwxJhj Qf6Ew21N9C9N+xPJqNP9fr0IkdFNg2Krl0JMv4sWpe1XqfmSRDilQl8BSdrFq/spxiDU XCt8LX61+3biL+n6XNmGl1MxUqeAyRbXIqiJP76ja3Pab5dmJwzxMY3geR94T+FQpsNX ABB36/wR8iyIsdm5GG0TM0L2My6DzdWPWgfP32NyPQ3BkkZ7617o3STXEdRn/8gEODIC JJ0w== 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=gcxr+ZOegNmgXQUMUcyBZ1+GTW1eoKzMxxIw2j9Qlyk=; b=FVK8LMdemoCg1lgTT7zntzf5+2J7/fpX0pzRjfE8cIpp8WJ5aVz//t6auvRuoZzCKu YCmL7yF7HTJRTXndR/S81zHBJEyuMAJSKdkNY0U/vKpl5SaYaA4cHBi88W/u5f0HUZG6 Z18nVR5X48L5X8gDnb01Iy5P3dwHaOGBeFtpPNNddI7whIrPvaSW5V51rwpwc9TOHe7N JXaznp79DwRf6C547KGGwFND8qmWca8uhhwaCNwXWSEKeV4oIDPEVCzPgC26cKuhehNc pRS7dnc+8qXlJsTEkDft5Gnj+gW1aJM2L9fYGWoJZ89zwcb/rbFe5fZ2eG1TF4JmHr1a dICQ== 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 e31si1293826ote.47.2020.03.06.05.33.25; Fri, 06 Mar 2020 05:33:46 -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 S1727190AbgCFNdB (ORCPT + 99 others); Fri, 6 Mar 2020 08:33:01 -0500 Received: from foss.arm.com ([217.140.110.172]:33324 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbgCFNdA (ORCPT ); Fri, 6 Mar 2020 08:33:00 -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 E6469101E; Fri, 6 Mar 2020 05:32:59 -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 3201D3F6CF; Fri, 6 Mar 2020 05:32:57 -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 02/20] linux/bits.h: Extract common header for vDSO Date: Fri, 6 Mar 2020 13:32:24 +0000 Message-Id: <20200306133242.26279-3-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 bits.h into linux and common headers to make the latter suitable for inclusion in the vDSO library. Signed-off-by: Vincenzo Frascino --- include/common/bits.h | 9 +++++++++ include/linux/bits.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 include/common/bits.h diff --git a/include/common/bits.h b/include/common/bits.h new file mode 100644 index 000000000000..6da493992e52 --- /dev/null +++ b/include/common/bits.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __COMMON_BITS_H +#define __COMMON_BITS_H + +#include + +#define BIT(nr) (UL(1) << (nr)) + +#endif /* __COMMON_BITS_H */ diff --git a/include/linux/bits.h b/include/linux/bits.h index 669d69441a62..aeb76fede77a 100644 --- a/include/linux/bits.h +++ b/include/linux/bits.h @@ -3,9 +3,9 @@ #define __LINUX_BITS_H #include +#include #include -#define BIT(nr) (UL(1) << (nr)) #define BIT_ULL(nr) (ULL(1) << (nr)) #define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG)) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) -- 2.25.1