From patchwork Mon Jun 19 15:49:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 105885 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp942259qgd; Mon, 19 Jun 2017 08:56:26 -0700 (PDT) X-Received: by 10.98.211.198 with SMTP id z67mr26123874pfk.231.1497887786092; Mon, 19 Jun 2017 08:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497887786; cv=none; d=google.com; s=arc-20160816; b=0P8W12mMc5TVp1HoQxAdRIO41WZsWCuubciSnT5SOkFDATaZeOUc6J0SRik8529ERZ chYSILecdQCZOf9uSZPPr49vLCfX4mnF2JCFo7KlHAb1wR1MNR2Ire/PlnXlg02mTEEd By01XpUeVD4t7XdfJE9G8ioPm1ntVvq3rgZk8cWVXwVNqMockipsNP5DAlirqAZ8diZH l9FP7mWyamRVO3FVVUKVaY8f3pcCxcdfZn1pjD3L/p46FhO4QFL6j4LaQd67pf2ko9RA XDhth7t8m8qqYWFCUnJlimSLeJoo+7ZWAZdahDlxszYahh47U0rVTn2KXnIYmqbPB8Z1 ENOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=OTFqsrU4T6DSZT7G9z/z46PEm94eyz7kWxiYYzcPr7g=; b=BBv5RnMF19h8r3eVdxP7F/6s5tu5JZv/HhOXA+gtXfSsKGSq8RgcVsoR6Zm75nHVdt n7CuVC9uwfAqxsvcbF/wie+2jtJRjxbnmdmXPLpF/QmL5IK9I/qZXFcncPNAmOSAScj5 qpr29R2CowkjDKPiewV51Ix5gk+UXLIkZMBxteyGXVbB50hrQrRVWd96jxjKzBsjLsaE 3cW86Soclx35r1NO5KSi7LkbT0dQvKOGO9dRdb5Dre1XTXJlKVhs6p2endR82OWODys5 lBwzsBMG2gAs9JQU638k3fEOZiv93n49haGg1pkPuT8cr9cWRD/b2LLc+Kr7CXjB9kgy DGVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=U/6tP1RK; 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 p77si8303258pfj.399.2017.06.19.08.56.25; Mon, 19 Jun 2017 08:56:26 -0700 (PDT) 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; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=U/6tP1RK; 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 S1753771AbdFSP4D (ORCPT + 25 others); Mon, 19 Jun 2017 11:56:03 -0400 Received: from mail-dm3nam03on0056.outbound.protection.outlook.com ([104.47.41.56]:35699 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752112AbdFSPwH (ORCPT ); Mon, 19 Jun 2017 11:52:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=OTFqsrU4T6DSZT7G9z/z46PEm94eyz7kWxiYYzcPr7g=; b=U/6tP1RKSOS/HYOftMDFUlv8Mo9IZ7W0s7RrDc+7lTnNYHZyJOdBSGwYiwTI30i2vmk06Ky5cXhwp/EULDwrQ+hhpZX10DwUVRET3D9AvuNvGXPYcLWReHtdMNJE2epukSJ6vMbtF8sRtCLXN266mdsSxl0zUYp0EUjjJMLSGio= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (85.253.137.34) by SN1PR0701MB1870.namprd07.prod.outlook.com (10.162.100.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Mon, 19 Jun 2017 15:51:57 +0000 From: Yury Norov To: Catalin Marinas , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Yury Norov , Adam Borowski , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Chris Metcalf , Florian Weimer , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Maxim Kuvyrkov , Nathan_Lynch@mentor.com, Prasun.Kapoor@caviumnetworks.com, Ramana Radhakrishnan , Steve Ellcey , Alexander Graf , Mark Brown , christoph.muellner@theobroma-systems.com, davem@davemloft.net, Geert Uytterhoeven , Alexey Klimov , linyongting@huawei.com, manuel.montezelo@gmail.com, philipp.tomsich@theobroma-systems.com, schwidefsky@de.ibm.com, szabolcs.nagy@arm.com, zhouchengming1@huawei.com Subject: [PATCH 08/20] thread: move thread bits accessors to separated file Date: Mon, 19 Jun 2017 18:49:51 +0300 Message-Id: <20170619155003.13218-9-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: VI1P190CA0021.EURP190.PROD.OUTLOOK.COM (10.165.188.162) To SN1PR0701MB1870.namprd07.prod.outlook.com (10.162.100.20) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PR0701MB1870: X-MS-Office365-Filtering-Correlation-Id: a375c05d-d1c0-471a-fd79-08d4b72b1dec X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:SN1PR0701MB1870; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1870; 3:KpArFqkfv+X1lCyO2Y95zppveGB6UGHesc7dGvhQ+GD/xTA1b/168PD5UKsv1+xYNoVvb0l3rmO1x8v7/WfE5B/eEDDqPEtzzrzY/oqU33lKMRn2xf0sfjta+znCER3AH7cqZ7J9gZPdhNgpYnkq76H0lNW2kAmnbkzRBIlv6vbCUnpdW8A+bQsT7IgqSCkLap6c0Hx5TNc5ad6Ev995tgYmxZIt0jStLQfREpgPgSyBC95gRcjdVwwQzV8V5SAy9YigXNxNV+p2QtwIdl/LrLqmsZ6eaE9bCLl+eQwzZc08gqkT9GIo3OcTFpptA9Pl2LDeM2ge7xb1hoaB+nMoEQ==; 25:rgPDJ6w6YyW8KUMXhvSU4UxdBUGEAJKA/AzP/09IVdmxT77Mfew5BCXWAPvu0xbRkgpq+kJSJgupC9QQ6WZ+bIJ/aQSS7VpiZh4Rv9q4oMNm4nbUXCx9aITdyZ+8ivMkm1KPMOt6mwTygt0T7hw5pI4gJy106M/Vy1+pkN7l0pnxlkircCWIbgB3Wl16KSjODhlDbpIz+Ppz3+0GyFJLcvtzfR9wCsQnVCqjkQPmeCTiGPZInFzvVwy+sVWJ3nkAsIRXzEoMXvuci+wbRqrH8FyvU+6xYZp8IHf+wtN6rnratVdB8v20r4DlkuIiOpfeejMlFyDTbvPhKA2iCNECpKc+7JHNQalqD0wDMD3ivs9ZFSEYygqAVl0hS8jTw/S7pb8jAQv8jgQk96wv7suVRmWlaTTnG1aW0z5HXZiGMZtnN4LEjtzkpBiLB4akT7zKZwZxc5qHU8qqe+Ryn0MOllebGDeu9UqovGhPBpISyIQ= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1870; 31:mm6npPla5eKz7WjYfsWkVr2t8h8tES5cjmMgAAs9ge80AcDROkbobBPkTZdBiHxc8ArAxk9SKrCCxQ0TAhyA5DgmhlUleNn+VTq7Qe3WdKinwXhLkp9cY8JXwQ64iXXYBki2Njvn2m1F0ACvb/OPhHARPGWNw9F9OL71eeApDQSRNjQb84J/mYhVfWrdfAGigOU+tQECJKpTip549pcn1875Vk9mOU1Aaaf+uUbfqqZTxGHb3QqMs1jxFQ8sJrjyu+UzM2x12AuHRxrNJvKNJQ==; 20:S4uq6G2213R/wLZk4SSeTGpUK90RPI4p8UN4xaA5IiTxjzhTqeBHe15+Sg9kEoA8Hur5B/QOtkstgHzgvQPzNhJXS/W65PiYkeiJDAMHA80vpugkf2k+bqm7mkymk5ljKGTn8x25tIa9wRPvYGYeIIz0dGnq9kWubdtfYmg3+kSwVOKE+PFGyhSM2Hk2sBiHwb7Z+bEHD+AQnUamPdlfoi6voynQLTUYfh8/9CKrg4FhkwQYv4PVTVNUQNWuV0Pe9mIb0QY/iPNioZmdaN4YUWtJXaZmMyrZZ623c13QXCDbb8zUSPdKlGdQCCtteLboTKI0lHUI1YGSUe/K1UUSEPgcLckuy2lmBNLbh1a6nmsYWD1EOouuI8it4cg2KLePFRsOrgEoZI6J6LVOHRxxchLnzRtRllqIBCRNcag7bi9M9nd8P8Zd5qkbHxhIPTKsrNavJrKtbUOVY/8J/qnnJKE+2hWli3kmo8NZ8O+JSFNvw49CZPVLdUppNYkhBZCEztLJoatJj9XgWEInLhlV3GyowCsuFCjD/n+cfanWK2x7tf2b0xdzEZh2Lld5ynSBI4ubfSJdITPzzM4C3wKI49OF3shZE3zWTnxba35bYMs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(3002001)(100000703101)(100105400095)(10201501046)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0701MB1870; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0701MB1870; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1870; 4:KRFlJEhPI/xUgQ3mNVdmMvKZ83lYqwqT/IqUs54+bKC/5IbuAK2K8z2eCGPXEREgcOWSAISvdt9VA/lBjCV41dYkw2YCzvoouJ1U+NWoIZNn78ScZ4YC0uLOPEumWBAr5R25LiciB9Mk7riOcL6o5h/Oku32nS04hcNKm4q5wDSvlydARPgcDTDZ1KsX5wFNNTyzY6EtT3XMbpVQUS9cwYuJ8kfWMmY83X4QfNO05rgpwm9Thf45ExqZfjxe7GaaLB2I3eU0A9T0AkVtONhZSjDOizWRFbDuEpgKtrDelqIf+Oh0MGPykG08R3LsYHKCwJz7t64mo7NFlqD6xWDxCBh2HFdn9s28z67flKe0Gb0Lnt6MnZESboCEvyF7h8EfD/qoDaNUgqGC+BxJUd4GipTDxYEUKUFs9JhyTmD58fqMDP/RCJW8u36QlrjQHxE/vSGwT9llmIDa+zmsw8uLNFLfiXo84QlBYbtJh9lZLEznLC7s5M9vybWXKSgbq2PRGZ9YJ/QF+Ppcbu/byxjwrTYo6aBejthWWOcI9yebkxoAtsv3M81NEIXqNQTrFJsaAMIG1qBoTPM6P41Imr6H82SEo8QPLBmWw/J5rDCxEd3+u3KIgYJ7A9zQM6qE1Ej6vtTDPqfTOoStn5XZXQjUuQsvuRImKhqL53tEMLW7xdzROCOAJFAaDRaM+DSwzlsUop1skUJZm4wHht7S8lwWBlb93hcj76s9FHuhlU75l007ZvrHq+viZ4oHWpuykX3Vu1lz4ZUrwvPynaGWLk5WUZFQ8+3HK0eps2Q8j2bvXVrI6j4BJaOck/X8eGpTMZAA+Q02xw3jaICH3TXEgsRhLf5qxcBD7Xvf3ns6XfgfqPBOEx96Zc3gx65mDsntsrM8XHL10HNG0TnpfwIxpD+XCWF9g2t5wv0q1zJYUfxc9I+P/BBW3hk+iYA7Fyb3SAPyLmPj4k4NhjosohOPYZWswZ1JhEYuhkCblJ4mBTik1qW2nJBT4Np1lg0Qx3vP45c2F3VkzkuIyjTa8Xu+t+kVxq39EG9immq2WG8366yMQgKgQmrRZvLGXftFCylg3atqvU65Zz+IzaWlToGzoRQnJPNLvSaXWmY/8EY9uv1BRVE= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39840400002)(39850400002)(39400400002)(39410400002)(39450400003)(50466002)(5003940100001)(1076002)(8676002)(50986999)(33646002)(48376002)(76506005)(5660300001)(25786009)(6116002)(2906002)(47776003)(76176999)(189998001)(66066001)(3846002)(50226002)(81166006)(38730400002)(54906002)(478600001)(72206003)(53936002)(6486002)(2950100002)(42882006)(6666003)(6496005)(42186005)(7416002)(7736002)(7406005)(36756003)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0701MB1870; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB1870; 23:qOto5RzSnApDgiJRdpwiBPOu1IU/qt9ZT8yz8nnK8IIph6I0jvJQBF2iapHKVEPrVuLk7jkfX/b9r7XU4JI2/d8hlVZGizJX9MCMzy6V6TcTrhXNJgjWtRPvuDyxKEJD1widucE+2MzawJgC9Y3+lwn70KHGspr7i4JApVmTLjCnjOKGRtWiuqfmvBmuoArehnFN2QN/YSUqGUgN+GHmJu0v39KJwNX0JiM3sWEGk2vFzAY8ErmUlixZxBRcTNWVDOLD5YV5N9VByDmgJmKHM2UYxTmt6t+d4VklcrObGkKm5k1CjeikbOSlIrMnOQcU702c09NGV41brXXYE/FT/7DU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IphYkAUFJ3Jt3UPRGsKaihBT0Tac3Dxq51TGuRhoPBaDzZlYSaDkZSB9e5KZUrsv+2YfHgLlYz6bLsNZAyYZXj3fveLIg/Rkp4ItIhrbmpaObfkeYPDtA2JM2qnIIMMUXC0u69TdpXCdGhUOEc= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:51:57.5254 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0701MB1870 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org They may be accessed from low-level code, so isolating is a measure to avoid circular dependencies in header files. The exact reason for circular dependency is WARN_ON() macro added in patch edd63a27 "set_restore_sigmask() is never called without SIGPENDING (and never should be)" Signed-off-by: Yury Norov --- include/linux/thread_bits.h | 63 +++++++++++++++++++++++++++++++++++++++++++ include/linux/thread_info.h | 65 +++++++++------------------------------------ 2 files changed, 75 insertions(+), 53 deletions(-) create mode 100644 include/linux/thread_bits.h -- 2.11.0 diff --git a/include/linux/thread_bits.h b/include/linux/thread_bits.h new file mode 100644 index 000000000000..87354331bc7b --- /dev/null +++ b/include/linux/thread_bits.h @@ -0,0 +1,63 @@ +/* thread_bits.h: common low-level thread bits accessors */ + +#ifndef _LINUX_THREAD_BITS_H +#define _LINUX_THREAD_BITS_H + +#ifndef __ASSEMBLY__ + +#include +#include + +#ifdef CONFIG_THREAD_INFO_IN_TASK +/* + * For CONFIG_THREAD_INFO_IN_TASK kernels we need for the + * definition of current, but for !CONFIG_THREAD_INFO_IN_TASK kernels, + * including can cause a circular dependency on some platforms. + */ +#include +#define current_thread_info() ((struct thread_info *)current) +#endif + +/* + * flag set/clear/test wrappers + * - pass TIF_xxxx constants to these functions + */ + +static inline void set_ti_thread_flag(struct thread_info *ti, int flag) +{ + set_bit(flag, (unsigned long *)&ti->flags); +} + +static inline void clear_ti_thread_flag(struct thread_info *ti, int flag) +{ + clear_bit(flag, (unsigned long *)&ti->flags); +} + +static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) +{ + return test_and_set_bit(flag, (unsigned long *)&ti->flags); +} + +static inline int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) +{ + return test_and_clear_bit(flag, (unsigned long *)&ti->flags); +} + +static inline int test_ti_thread_flag(struct thread_info *ti, int flag) +{ + return test_bit(flag, (unsigned long *)&ti->flags); +} + +#define set_thread_flag(flag) \ + set_ti_thread_flag(current_thread_info(), flag) +#define clear_thread_flag(flag) \ + clear_ti_thread_flag(current_thread_info(), flag) +#define test_and_set_thread_flag(flag) \ + test_and_set_ti_thread_flag(current_thread_info(), flag) +#define test_and_clear_thread_flag(flag) \ + test_and_clear_ti_thread_flag(current_thread_info(), flag) +#define test_thread_flag(flag) \ + test_ti_thread_flag(current_thread_info(), flag) + +#endif /* !__ASSEMBLY__ */ +#endif /* _LINUX_THREAD_BITS_H */ diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index d7d3ea637dd0..c40a89357329 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -7,9 +7,21 @@ #ifndef _LINUX_THREAD_INFO_H #define _LINUX_THREAD_INFO_H +/* + * For per-arch arch_within_stack_frames() implementations, defined in + * asm/thread_info.h. + */ +enum { + BAD_STACK = -1, + NOT_STACK = 0, + GOOD_FRAME, + GOOD_STACK, +}; + #include #include #include +#include #ifdef CONFIG_THREAD_INFO_IN_TASK /* @@ -22,18 +34,6 @@ #endif #include - -/* - * For per-arch arch_within_stack_frames() implementations, defined in - * asm/thread_info.h. - */ -enum { - BAD_STACK = -1, - NOT_STACK = 0, - GOOD_FRAME, - GOOD_STACK, -}; - #include #ifdef __KERNEL__ @@ -45,47 +45,6 @@ enum { # define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK) #endif -/* - * flag set/clear/test wrappers - * - pass TIF_xxxx constants to these functions - */ - -static inline void set_ti_thread_flag(struct thread_info *ti, int flag) -{ - set_bit(flag, (unsigned long *)&ti->flags); -} - -static inline void clear_ti_thread_flag(struct thread_info *ti, int flag) -{ - clear_bit(flag, (unsigned long *)&ti->flags); -} - -static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) -{ - return test_and_set_bit(flag, (unsigned long *)&ti->flags); -} - -static inline int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) -{ - return test_and_clear_bit(flag, (unsigned long *)&ti->flags); -} - -static inline int test_ti_thread_flag(struct thread_info *ti, int flag) -{ - return test_bit(flag, (unsigned long *)&ti->flags); -} - -#define set_thread_flag(flag) \ - set_ti_thread_flag(current_thread_info(), flag) -#define clear_thread_flag(flag) \ - clear_ti_thread_flag(current_thread_info(), flag) -#define test_and_set_thread_flag(flag) \ - test_and_set_ti_thread_flag(current_thread_info(), flag) -#define test_and_clear_thread_flag(flag) \ - test_and_clear_ti_thread_flag(current_thread_info(), flag) -#define test_thread_flag(flag) \ - test_ti_thread_flag(current_thread_info(), flag) - #define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED) #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES