From patchwork Wed Jan 25 12:54:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9537011 X-Patchwork-Delegate: geert@linux-m68k.org 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 4618A604A8 for ; Wed, 25 Jan 2017 12:56:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39FDF27FBB for ; Wed, 25 Jan 2017 12:56:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EE3927FB0; Wed, 25 Jan 2017 12:56:06 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1754327FA6 for ; Wed, 25 Jan 2017 12:56:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751747AbdAYM4B (ORCPT ); Wed, 25 Jan 2017 07:56:01 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:58636 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751749AbdAYMz6 (ORCPT ); Wed, 25 Jan 2017 07:55:58 -0500 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 25 Jan 2017 21:55:56 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 938F6659F2; Wed, 25 Jan 2017 21:55:56 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 754AD18070; Wed, 25 Jan 2017 21:55:56 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 6E6A41806F; Wed, 25 Jan 2017 21:55:56 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id XAG29070; Wed, 25 Jan 2017 21:55:56 +0900 X-IronPort-AV: E=Sophos;i="5.33,283,1477926000"; d="scan'208";a="232556348" Received: from mail-sg2apc01lp0247.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.247]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 25 Jan 2017 21:55:55 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=D06J84n+mjfg1uZZfXE6SwRaKWt/mUVz72XM93UFuoo=; b=OCjH4QgFsaKy2Epz9upBM8tIzDS3TLjym0IqkRz9lo1q1LzTI8uiMnCNBYQuH7wxIR/CaqdgHrxEzJu0X/vY64OC71ZmALKQtQvAK3Ym3eSMNkrdx1TgdOBai3yVxTna++viBb8jQbdhMiT1KFVZLjuIoKTPIedesKXCgvivPVE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by HKXPR06MB0552.apcprd06.prod.outlook.com (10.161.177.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Wed, 25 Jan 2017 12:55:53 +0000 From: Yoshihiro Shimoda To: CC: , , , Yoshihiro Shimoda Subject: [PATCH/RFC 2/4] iommu: iova: use __alloc_percpu_gfp() with GFP_NOWAIT in init_iova_rcaches() Date: Wed, 25 Jan 2017 21:54:00 +0900 Message-ID: <1485348842-23712-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485348842-23712-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1485348842-23712-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0033.jpnprd01.prod.outlook.com (10.164.161.143) To HKXPR06MB0552.apcprd06.prod.outlook.com (10.161.177.142) X-MS-Office365-Filtering-Correlation-Id: 9c3c3c28-7f39-4fdb-e94a-08d445217fa6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HKXPR06MB0552; X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB0552; 3:tHYiQf9U9/S0BgvT+4FJIdh5Pvv7rDLzgoDwETloa1zub9hz5wv997X3pfqboi3uxdQQp10GnhscfIhkOgUEPi+t7/UUJVr7AGvkOoy1v+u0IuVbc3Tzxc92vfWUOH/uedqDxJSGsusVr+jnlkuv/nLQQWvxd0AQSVSeuS8flkKhRPMyxrgIkAqUS8keHuytWXIJIIjr1slwWBfMhHbRWw54VvOgu8JENNM28xWKDmq8WLMKHgGP+XLWbY01hVDxGSLS7Kl+uudLOnNMme/tww==; 25:AUuCWrYR+MWuTy2c3ZThb9svWta4MIIAjFxrenjktD+p/oaFjb5uC1Bjd9q505j+Td8bUaNHVCmciaY9gpcvH/em4SrWPhrYQHF64YpYBaKxeARlWlI2EaiiZFdrnV8rnL1FEXyL4VztTIRDZyvRl3lwbrRz6Vf0i6GB9JLK/Wr+M7XqUGGzrQ3Pu9smXgvw9yUidLvQtg6r3aTuJEGZZU0uZpdLhFo9xjJd4T3b8Ehy9UAsyTZ+sJHD0JWQhou92f1R29PmmlsNrN6xn5TFVWLAcmV6RX9V7FQ/xlmSGR6S2KTus6fg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: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:HKXPR06MB0552; BCL:0; PCL:0; RULEID:; SRVR:HKXPR06MB0552; X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB0552; 4:SvQwseghuFCBAvRmD0RO8vyy/pPbfSz2bpJc3gcLmjdvr+ipMKI7T3dHfJasnDVxdjGhsztgYAVnR1nycLXGF25CjFS66gBAXZraNAMJypQJ5cox608ZmlSrfdhfDAWkkSPHEWBVvq/qM3HB8egeZn+vZY4ln0svxNM72j3Uzb4zUJSYnBWsO07oA8vH7Mmh3BWK2wFZKaogepw5BGf3jXHTCcQbAQqegH7djc2BKgYV7hoc1ZHy5QAMuOuZ2Fut5TgxL+wXtbutSjvaS8KJ0tUp/iSeG1PJZ3XuJvnpaMljau/Eyaip5R/kyJOVynHnmol5UNx35O6fHVFyprqNV0RQoxcwIrvx9Qie0J8Lks18msdS1PynQKLwaA6INrNID1DXGVIRMp9SA7rghJEGrx6M9eYjL4HWIaFn+sKxxURxD9pnvJy72pb90geZ0hEhgpXnoCmnWocFDIc5sk7r0+EngEOzlYIAgIFrOjG1zkTojopyRzHY4IzVey7eLCZLBXmFoy2m+xgqccpTsg9w35K9EfgIU/Y3p86N/MRJRbILogTob+kO8Pobkaug/NEF4VReex8R/PmfAQEXfq+XzA== X-Forefront-PRVS: 01986AE76B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(39840400002)(39450400003)(39410400002)(39850400002)(39860400002)(199003)(189002)(66066001)(78352004)(42186005)(101416001)(50466002)(48376002)(81156014)(305945005)(50986999)(76176999)(47776003)(5003940100001)(2351001)(7736002)(8676002)(68736007)(97736004)(81166006)(50226002)(107886002)(6506006)(53936002)(92566002)(36756003)(106356001)(105586002)(42882006)(38730400001)(5660300001)(2950100002)(6666003)(189998001)(6486002)(6512007)(39060400001)(4326007)(2906002)(25786008)(6916009)(3846002)(33646002)(4001430100002)(110136003)(6116002)(54906002); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB0552; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:0; LANG:en; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HKXPR06MB0552; 23:pspVHHICBkyjMcB0fjx2LasEI2UClan1C39wJYC/n?= =?us-ascii?Q?VP3yc+R9Hz73QP/deFS7l0uZMJcQ5NmXVbbb/ku526pRDJ+h0dKl5buPPLuO?= =?us-ascii?Q?WGGgk5H23IvZxvuc956HYIdgNaWpfvM9JnUuOj/mnQV6bzkMQzVrlf5R6Bcc?= =?us-ascii?Q?9VcHnbWVmhVG/Bwn1Wqs6stDMo+pltGOEHosY9M/V7IMrqWRLqspZW+uAERi?= =?us-ascii?Q?f0EqNs2b4mL6TJmoylzX4LoOijN3Pt/SQDMgYCSGkoo/Jk8wILz5UjjzsXYr?= =?us-ascii?Q?JIFZ/hNmTduPcyxO4jb4v9Q7WFulao6eXdbweqrBwk+4165aflEmq7aBxP8D?= =?us-ascii?Q?EBSqKLC0OYsVo/HiZWHDzlZrNDilVWsvGWE2P8lnZuRuUyfJlcmCyhp3/RFk?= =?us-ascii?Q?Q5zWn3JqFxLKn6UrhNZciAkicZ+HXabwaD6XNum5xWDoo07VDlWzZloRdYVL?= =?us-ascii?Q?LtyZ3WDYq40M4Q/EbIrqesgYtSNLJVagQ+/ux9A1tXpUFW3w2uBzYF7k65At?= =?us-ascii?Q?IL7HsTL5LM0uyBtVOZLIpX5p9HAuXetn54pa4Iyx0oeqVfB9+2Yivbev4i/R?= =?us-ascii?Q?YwB0tReT5fHs4Wmip2PCyF0e+7pYqUeix1SuJ8KfJsqVAJ5n3zpoPx2nz6Xw?= =?us-ascii?Q?VGguwzOvEJKYi9RlKZdAwEgMKN6SLlmia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sN6XWSBXyOEUsN7khwUyFgb8AF/HSl2dCWQJ4gPAf9FQg==; 20:oJDGRln0rPkt6vZIiInoi4B8jqc6ecKE/2kxTw21Hqr+mwvpAT9LdangsSNSiXizoxp+MbNxrAIqJ7iOafwq+N5Z4SuI9kuxWcRTrlbqO7ezG6G/jBlWTJV/XarQ6IiNPOS++xnPI/WBvVMg5JrZg8y9Knmumxr9nSPjf40JuVw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2017 12:55:53.8891 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKXPR06MB0552 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the future, the init_iova_rcaches will be called in atomic. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/iova.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index b7268a1..866ad65 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -723,7 +723,9 @@ static void init_iova_rcaches(struct iova_domain *iovad) rcache = &iovad->rcaches[i]; spin_lock_init(&rcache->lock); rcache->depot_size = 0; - rcache->cpu_rcaches = __alloc_percpu(sizeof(*cpu_rcache), cache_line_size()); + rcache->cpu_rcaches = __alloc_percpu_gfp(sizeof(*cpu_rcache), + cache_line_size(), + GFP_NOWAIT); if (WARN_ON(!rcache->cpu_rcaches)) continue; for_each_possible_cpu(cpu) {