From patchwork Sun Jun 4 11:59:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9764925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5A746032D for ; Sun, 4 Jun 2017 13:22:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93FAD27F88 for ; Sun, 4 Jun 2017 13:22:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83D73283BB; Sun, 4 Jun 2017 13:22:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ED62B27F88 for ; Sun, 4 Jun 2017 13:22:08 +0000 (UTC) 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=mEwJive48xuW2hHJLUR7IoS3MJZDD4GFzbtiz9LDAqE=; b=XTJSYsXrKc8QdJ 60GtG7t32RT079K2Su87EBcqma3PywWB7ezcCCCGcsiIXtUQSZ03+2bxecmz6UXrmtcMUbnF7Ck4B +9Gei7Pxmiif9oB+wdAe8lay9Jo5ekGv14VPffeo/teO9My6FBIuaEM/duI314rpM90Muf/iR9Ovr JevpUW2sgnMGIugDbRIsmiRrINdZlVWo0ed4cnymHlM/ydEYOI2tTGcWV0YvaAov8FcyoliCuwMl2 NH5NbHdf+pwMsTrVt4Q+qO86t2I3Fh7famBNc2xZ8667xb59GN+UOqluti/ck/0J6i90wnbXCZykR I7s3bM21F2t8yMNi8JaQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dHVTr-0004oI-CJ; Sun, 04 Jun 2017 13:22:07 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dHVDs-0006y0-US for linux-arm-kernel@bombadil.infradead.org; Sun, 04 Jun 2017 13:05:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Y1iVlrEjWItRZd/tRLn5+7ISpzRbMk57TlHHGGlEt8U=; b=E+lwx8G3cxjXPn/W2ObAdc6oY T0ZOcBCjL69dWdmV+mExyGD+FytYwKl9EhSERK1KTfz+tRSEwa4mAnBIoDGmiy4XnLW85KjxGesNw qBYlDcPPqeKSoPe6Qjx1pR4mc7SnwFayfkgg7xbrbzwacIHn9D7U+3rgTlD3pe41SY7oJn/GHYHJG WDfEU41b7KIaUf15xzOJUkfk82r6wt5iIR6RaM69FBb+Gbc22u2L/PVNGZ0AXg8FcKhdMqHJcz4ld 7LbGajbra2t5UCV6UP9CAA865dEjAWDtEr0nCmKOTrtUOIlLN1lziNuPUD6g3bV2Q8Yq7TMJsKVGr LG0W94xng==; Received: from mail-sn1nam02on0050.outbound.protection.outlook.com ([104.47.36.50] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dHUEs-0005HR-93 for linux-arm-kernel@lists.infradead.org; Sun, 04 Jun 2017 12:02:35 +0000 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=Y1iVlrEjWItRZd/tRLn5+7ISpzRbMk57TlHHGGlEt8U=; b=AB13sVf0s5YxcMJgj9ejdjFZJ27iQzJAQx2nz+D5+etYRjE9PeUJoywJBtqOeZBKBzmLBAcG1XW6ABMdij/7Sh3XXHCcneOmhWd5yTh154qdlcMJ5aQvLErJWZM0sgxb4szfe6WmjEXY/gthkXfakC9PL6fdj6xTftdFHlMM4a0= 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 (176.59.55.28) by BN3PR0701MB1267.namprd07.prod.outlook.com (10.160.118.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Sun, 4 Jun 2017 12:02:00 +0000 From: Yury Norov To: Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann Subject: [PATCH 08/20] thread: move thread bits accessors to separated file Date: Sun, 4 Jun 2017 14:59:57 +0300 Message-Id: <20170604120009.342-9-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170604120009.342-1-ynorov@caviumnetworks.com> References: <20170604120009.342-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [176.59.55.28] X-ClientProxiedBy: HE1PR09CA0074.eurprd09.prod.outlook.com (10.174.50.146) To BN3PR0701MB1267.namprd07.prod.outlook.com (10.160.118.141) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PR0701MB1267: X-MS-Office365-Filtering-Correlation-Id: 318525a0-31bf-4a1a-236e-08d4ab418259 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BN3PR0701MB1267; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1267; 3:tK1fZf/sIOFnP85gOiyf/q/hGd3uwpDG9k559x8ba44FbYDrpKLv2XSq0kFkXzbMYT6ETUGJ6waVtVJS9MlrlcT+Fw1Fgs9T04JZlMXEIMBRrViKe9qZDI7/cIq291DVG4K+14MnlnJJC96AtkYbbSqgVpEYNdQVusB8eCscwDNyDSSi6QoDwJ2YUu/W0TJXVHXIH4zR6W+x8fz1+0kjwwl5iT56bHUd5UPCE5RruGRc6TySYj3Hu9CZyCotl0jCFF+10hW9mV1foF9fLnJHSUNV7fOPCUj4e1vxIu/52J3sDYS8db6oVpVAkbbjGGEsenIpwraiBC7f5hGQPyE6eg==; 25:W3LLagwAoMFUPGI4LGz4zeFcmOgZvAmVN7w3dNVccv5gaugfu0+FLd/bLyT4/LZY4HTLqaY2iAtbGu6rwlBZ0WxW2T/tED43U2433AhqJhcxaSdvJrHJ070GMLOerCJSni6+GW2JwRplhdcMOjS3X2BGxz1U47sW7kg5MqRxBDF3g6S/9TQok9B59cdXcS3c+NQBYA5PGkRXdZmQbgrTERNOWN5nJGKvwsoeEShqo9zO0e/REsWmRmivHYPxxFKZp5wLd18eYZhqOmvnljQjW9+Mq3YmBqB+Mfw7wVf+HisStmPT6LRQeYiTB/UoYuDo75zFyqSK3ouOONJ563NNsoipKpevbgaYXiIZrLwLsa7+5sTABtZtB2m5miNdLwOnHt13633V+gn1xEUv4nIpFg8w3JRtoJHar1YNkB5FvePTbCpdZwiltP5t7WY9fVeCgNLTPzVrjT5+Sr0U6R/mDkfEZ/lePBdNWhT8dsT4q/M= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1267; 31:m7TCy59qDbq/xAZFyP2VKyowoOit2UahV26D+ZUO9bXrWtHTeHKm1amjB/uMWGNwmr3GnWEjcYt+RV47fAx8ednn+cnlNob6pQdZGBfPMNSlJ5JmILErIXAYv/RQeUR4DrOUcWdLOe4ZbuEaURuT/K/5qbhciXyqSH/AGoJNkM6BGZZlXFhjQgUNW/I6cid9mly/OTtxArYmxJXata5EJVqcHaF8+C+q7Po7aQ2vN6A=; 20:BlSUFvPSNf4sUepOikVrQpgeurM+39QagfF3je9tKkZdrsZoKfacp5iG5JPTk/KaHBwDHWdJ/P2Y8ql8W0ZDY7T5PA1keMt9Nm2VU4I/Df2zC+LxSKvOYpxlNLQydODilrDhtdtOzeJup0i0h0/EKi5Ia6GYgYn32Gy0ItJ8bV1tW/DbJb+uthFlq1rakGYLcKAPzKq8dGC5u+F2etwkBHyqoxHCZhIUSECEQQrH75rS/1Hcisa5nN/Vg/0nsp/cenPCypHRKH3LcD5ofwEeb/3lBrru+2Pgz293hUQIsRsoTJhBNJo0/LRl6eUjdeefXuBVKHEtqAhHR0ijy599DpnThx4T+Dra4wJKfvIksfjHG56NetJro29MFaDuxNdlIg07aTKC4CkKBaC7oxz3Z21Dui+aAxaAPPHVXnM/nR+0a6fGyEwHE5EyZhTMDeahrgfoFVBia2eFOXsLx3MS1h57Yu4RIzopgKQNPOX7e+9FVkpEoOvvHO22xivRirXqmujpOr6MavOxHmFDtgvRcCf/LfCzJR74t61+03SFy6WVJwAcq+N7FHB1+dA5zv8RtuIVVINxiyFEbOufr1WQGzKQ8A7tGjc5H7aR0tkXbdQ= 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)(100000703101)(100105400095)(93006095)(10201501046)(3002001)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0701MB1267; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0701MB1267; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1267; 4:8U8HIhum97lgsNTdYVFD78a3sD9dhPEwL7hr+OCu?= =?us-ascii?Q?g+rqri7FuQwEW6uMHdqqCi3f8C4kbR9TidV945KaPfdfiibm9jTko0ZH0I+3?= =?us-ascii?Q?5n710/ZUXlVFVM8inlX1LAG9TqKxxSHwgR2LrrNBIFSEL2MyejZN852DbBXN?= =?us-ascii?Q?lOKmlpHOTFYOh0bCMFMwF2gI+cem3+aG5X5kWK5z/fZJe8bESQSd1p3LRIZD?= =?us-ascii?Q?y1hDA87LCkP9Ps78y+XBh4Z1xFd0OC5/b46ALIVBZ+goTOdFu7lvmxrzjcLv?= =?us-ascii?Q?6IQfDbXJRvjU6fhv8IYurH1UjfH7VffPPrfKiWoBasM7+Xg5nEGLmR7pinY6?= =?us-ascii?Q?N/LxBk5EHl/vY4l+Cm3OaowpDrNc7VQy6Oj5qu5CK0MZ9mZF7xjoJ4Drx2Q7?= =?us-ascii?Q?/RUz107952I/L6dnRNbJ/z1pANBFciPJ49ZeJQqQD1Q7yFwVQCRIfJAVLJKZ?= =?us-ascii?Q?Xpvy2aSLzl9HCcRbLDdTbZmeW3nZ7vHhNFTD92PHVgex3+qoCakTdAUQ8G13?= =?us-ascii?Q?fvdWJZzOOtMKX2ilxdgaaqhLmpa0LtgeNfyNr3CAdiPYmlAnplZKpLovSQVb?= =?us-ascii?Q?3e3lqeXxY+lYvlPrZo0g0sZUNa7wh6Eey26QT7+72SuQLHWtEd/oAxUclKJ0?= =?us-ascii?Q?txWuMbMsPq5ogD7H7xdjQ/XFlJj1+3ccSaViKHo7tq/2UGVBS0zVEkS+flya?= =?us-ascii?Q?KaqlpJ3FYrfqFhDMIT1yw7IzraYDOBuxZIWWhoHxIeiAs2MPnlavDq5zj6dj?= =?us-ascii?Q?ngR1tf7g8mB5ll9tmbbz85rc3FCH43YKJSHf2pxvIS3FLbRb9ufH9cfyKihk?= =?us-ascii?Q?OGWaoicseS1DHVT5BkCkv8ucmZmS8ScGug10YDCS/AoPucqD5LGaM7fGa5sM?= =?us-ascii?Q?MTRGTBUeB03kAKOqN8X8MsSo08T7xxyAS2f80d1RytZBPtcN5au2cXTunzH7?= =?us-ascii?Q?kj3Y8C7/AIwQ9smHYcGT8hAzw5U6eE5sFB2+DBkSt9MiiM+KivGGtHmVrjuw?= =?us-ascii?Q?H294lSkg5xKCcXP8PxggLhZdPIo0X3gGSIxX7pT4a2n06xOPdCRwletQKKP1?= =?us-ascii?Q?sTBcoQKM4Qnv6ryrn3utGtzOlM1/YU4sYmioffogIe41oi+TFH6Lru0Ljque?= =?us-ascii?Q?2omH0+W13Os=3D?= X-Forefront-PRVS: 03283976A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39400400002)(39850400002)(39410400002)(2906002)(72206003)(6666003)(189998001)(2950100002)(42882006)(5003940100001)(478600001)(66066001)(6486002)(53936002)(54906002)(50986999)(76176999)(47776003)(38730400002)(6496005)(48376002)(50466002)(5660300001)(7416002)(76506005)(8676002)(81166006)(36756003)(305945005)(42186005)(33646002)(4326008)(50226002)(25786009)(1076002)(6116002)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1267; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1267; 23:eOKN+L3Da5KeyBQw8cuzpoTtsXlcEhIy+PHjRTL?= =?us-ascii?Q?3PLUWKXo6HDR5MnABkWsspx2/riitrdCoILtm+T48TjItRKRYm25wo+9w2F4?= =?us-ascii?Q?EBFe4QOKp29Vfn0eWo/45BlWGFTuNdLxXy43VL7awyiwn4i0f4gKxIDOeOKT?= =?us-ascii?Q?9CRFxVBh4jLkwe2z1IVLf9ZYmOArd5y1Sh2CYRXOHTuVEBg9yeuqRUaQfeJO?= =?us-ascii?Q?oIP+8/STnkchoYJrril8WLUmdqz42Opc50of9pi4og2sBHPeDbLiiAdNxepE?= =?us-ascii?Q?n9S+g/XdtF8JQZe2ThXCwLOP+KduQPeukEwAf5JXgwq5lIVEvz71M2TUTutR?= =?us-ascii?Q?qNV5UoUeVgA0A9UMEJAOr0BGWO011+NSU1X3dI3saftxWzXjvifisBO7H1Mo?= =?us-ascii?Q?7nkDSxj+UguV3ZgQEjRdv/Zzl5ySX+vhMSHs0vfQ7E3XaDAdlZeIFTtQZ9Ta?= =?us-ascii?Q?k7hBUgc2bDe4sC7MW4sPQ2+h+9vgevc5BzsLzREx80rgup9mS6istX/eTYXA?= =?us-ascii?Q?Lry3CU1KZmcM+Z5pwZ8qmztXbnDz+4MKI/vTgTwZbr3AQ+E86SN11IEWICzT?= =?us-ascii?Q?fIlMoehscXHSaK0VKk+dB2OTbdSCfhoThr6migQzu8eKCZ+2Tnv06DrZq8Xv?= =?us-ascii?Q?+Xf8JxMKE0vR9ZP2zR/nTmmAoC1w6xQVtmbt0xraa6qFZVcBDS3h3tnHsA49?= =?us-ascii?Q?TawqZJVKMoF67UAjN2YdvPs7xaqHnPdkhlcjH2RgQnBeCaUfYysWAHJYVpkO?= =?us-ascii?Q?wid1zFqji56lc58BmeXLUI7nvwvR46zaFmqNNGpYAjybphGT855wqKX7c3pm?= =?us-ascii?Q?AIbT8NBF6kh+o0dyyxYVsTAkChv8+2D/5bCMwlH435/thc3Mzecrkkn/kxDO?= =?us-ascii?Q?NLsWBHGeGm2thj/mjVIhTaTQsOmcjama5ms2VrlCPfakgYH1ZZinNlOEYaQF?= =?us-ascii?Q?WGP5DfZghl+yLXirWFe3Voaj9wQy3LMdpPeVUaw6NKnnHaFHoC5iigjRJkW5?= =?us-ascii?Q?CdIHN1unBQ9A1MYorK8gn8YgY?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1267; 6:AkkluWQo3iPKbdnVjcKjp/loSH43BPDd1i5qv6BI4fybTBHAnhsVtQczb2EgDL2BTB9MT3h06izjxPGen+LCJxSweGYB7X0gS1w2X3uY5sb1GdEHTyS41pwcOVOxuBT120g+1pXtlH6ktJgmhBg+g3l1UCnCnSTT2aJgZdTNQYW2bxCvFUlGXasfg3xuNFLhNQcpqtoxVYohrRm54SZvcQPMtObenJTd38KnsJKyWbdS9Af4svJyl5J1wbPj4SEtVj07/XXYkIys+oj9akrwqoNqRhRE9nMSDEN1anKD/HyLN6lzXUyIhsNXo2s31WXge/45F8dvBb6TjiNKNflPdVySTyXb7jGzF2uaBD/8hZgLkjQcrfOs9WAvi9cOe1/XQafn6FF+c0bEegy3RTw12V1hjn40+1Ci9agD0JUVlGazM+r07f59fMkmgUV6j4vyIn0mnzSyNismqnoTYSp8HpP+1+jhQPSOsW7MfERgpZBQ8bncNriP+lZp3kCQqOLhvgpFt5cjvUA6TEJenzopJw== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1267; 5:M2cS4HJDPuhixJ5uCY4YngsOlEK/So6vmpEjTcQXwdgNYGkR7tJKlLEC+pSG07RpkUtjPn2mIsEWyYQDia/p9OqgLbhvvgz3Rpcb2DM+sEI5S/39gSPKarAxL8atwoiJQPwf+9R6fL6OV9Q2dxUm3oT+gTr5kxnagFvw0E0v9BmasrTX/V3mdtkeJoN0a2HmGScFibpjKbxj1WlA9MsNozDWip0fAbCsIngiutmnkBarwvK4chnsVEfEAix8Qz23XpqqreQ/YsaBnf2e2NXUqzMav718pVZItWDLzZ9cBntnY8bsACibNBNI64qjHyN+Ymi7ytEH3JjxGHr3HXnP/LlR1t7ES/IVygQjF+zs8FXIN6xF6C58FuLOhBZ5TsK1IKTvs2EFFMvanbIj1E55UZyf1OlvA94M0o7E3GMYeq9j5D7R6XwdPZkvn+Ff/vrTYfcxKZnno0yUBNsndGqahTJEO33PaJTNzAYBxTuau3RhobFLM1RNlgUK4WsM3G7U; 24:AVn35akino1+3p3Wt0j8eD5QozAFPTSKxFQd1hwbyTHECCrJGrLzkJGrpfh1x06aXi4pUxaqs2QA1I4z8E2AMidPS4AIfa43O1aszhztwUA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1267; 7:5wALkDrwThAfPDQXfNmv7iZ+PDyTg5l8nY8Qu6GIFMGRHGipRklWQsXKw9UHj91cTRsN6Xgl5XIeR/0AlHNP8/svjfIul19lupnJ/oZSm/8BoW+dQxVPouN5/6KQeOVyandm4bsjt5AHpWiOMghQ9PT0xoodnG69zl7WCHR4r7s6AJFMP5KUgYpyGsRLbwoL4vwUXbcMHnQ7N19NArormLV1PLm+7cO6hRHKlYww5EBvgYQtx7PCxaKwj/Eb5CCra2EAqZtmmhG1nhWkE/TTktvDmzeYWvD7wtCIylF/BsTHvBlZqfSefCmXAVCPOL1P5Fl+EkzK12UgeAaDoBsDKg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2017 12:02:00.8862 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1267 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170604_080234_499659_2A78D459 X-CRM114-Status: GOOD ( 15.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Pinski , Heiko Carstens , Chris Metcalf , Yury Norov , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , agraf@suse.de, szabolcs.nagy@arm.com, geert@linux-m68k.org, Adam Borowski , manuel.montezelo@gmail.com, Chris Metcalf , Andrew Pinski , linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, Bamvor Zhangjian , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 66 +++++++++------------------------------------ 2 files changed, 75 insertions(+), 54 deletions(-) create mode 100644 include/linux/thread_bits.h 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..2467f350d659 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 /* @@ -21,19 +33,6 @@ #define current_thread_info() ((struct thread_info *)current) #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 +44,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