Received: by 10.223.185.116 with SMTP id b49csp3204420wrg; Mon, 5 Mar 2018 16:29:45 -0800 (PST) X-Google-Smtp-Source: AG47ELul87GrZTFt55Gb5UjYPqmDaQkm0ABNH80qcsm4c2A4FCsE7T01HKwQtOnyCIOh+AYCYaEA X-Received: by 10.101.76.204 with SMTP id n12mr13712893pgt.249.1520296185433; Mon, 05 Mar 2018 16:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520296185; cv=none; d=google.com; s=arc-20160816; b=I0j7RUKM25R2fqQYBMF5Onwz+u922f9VBs+ozbgCKHTY8aeq0bnjtzmRLbMtoA8/bI W1oN+pTOram/Of9Lgn1xVs6BJqtd6mIrBxxjJTdM7ZJaXA5W9e7f5hAcv6K0H/71iqnT zaLxZhtQLQlScw3tViqP38xO0uoWcLjd+F4lY5sLXBQahag8+E0v4d4fggPlMjTHJQPM pX9+3mTY/9pBVKUPfhvxDlsqoNw0rc65yWO6DighsWB1E55PCSZiXD64mTxxLTOjfqih 6WKavAEX/0WyAxYI0zd7+oC57fJOnE2UIDy4PnZ5N8hn287L++5kI4r1SsmOsSZdOAY2 c/TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=0cYr+0NPwIj5ilA6C0rxScjQVRMD5lMs+dR2smeb4ro=; b=LiKN7AR1SRd3TDyvzrU+cLCDWNxKTGKA9CCA9yjuaPaoreOWKaUgg5Dia6gQcNDMT7 6fGzPHwi8uTBSymGA7iojHS0A9v3iI1vgPIHlvaiZkqLyRhRuHTiuHrCj+4onTXRZq0q 0eR8VD7MzNfMUNd5sXZEVElV78FzA6jL9MsO89pXWxqU2nP8s5EpYPsPsgmRd01JP3To /8FPNRetQCO5HwKejNT+20KfIw2zveP2B07qyn8HPcIIQK48pVV0OPyXooL7eOSu/I5i V7yw6Ij+KdNdyUcm0+B2EiivcSAdoYpzAJfTJzdH9xfpx+m87gQXziHRJyRgMCct29Pi B9Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=fm8e5pkb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si10236070plk.592.2018.03.05.16.29.31; Mon, 05 Mar 2018 16:29:45 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=fm8e5pkb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933663AbeCFA17 (ORCPT + 99 others); Mon, 5 Mar 2018 19:27:59 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:35266 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933537AbeCFA1A (ORCPT ); Mon, 5 Mar 2018 19:27:00 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w260LgPv115076; Tue, 6 Mar 2018 00:26:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=0cYr+0NPwIj5ilA6C0rxScjQVRMD5lMs+dR2smeb4ro=; b=fm8e5pkbz0jtdm0WlEmAEzqtoGahMdrZ24uQgmEa9iL6GIyDWapIq24kZKQVs8jEM5oj KMEtYqgMUKANYYXdx6n0M+1SoHJ0XhUpjn/axWhKyUf38dFj05GqFuon8vStJv2oQk58 dwl9ABLFd01VLn/b1QQAk7gx+TbyeRQkqRd6iykJOWmr7B/xG2JmlzlvIuvWyZhg32h7 7yvzUkoNNq2/VW2d9fhCTKvJyVh46FYkXrjLYpNEUUoUwFFexD6dNbbgH9mCFuLK+Lgx 0tryA8JlZw3BS3W4DSlDpqz5rP1DHGAJArUZGBlngAbPo53eQLmYDRCEY8XtxEAsq0+Y 7Q== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2ghdxf8k5v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Mar 2018 00:26:48 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w260QmG4031229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Mar 2018 00:26:48 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w260QlPS029245; Tue, 6 Mar 2018 00:26:47 GMT Received: from localhost.localdomain (/98.216.35.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Mar 2018 16:26:47 -0800 From: Pavel Tatashin To: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, Alexander.Levin@microsoft.com, dan.j.williams@intel.com, sathyanarayanan.kuppuswamy@intel.com, pankaj.laxminarayan.bharadiya@intel.com, akuster@mvista.com, cminyard@mvista.com, pasha.tatashin@oracle.com, gregkh@linuxfoundation.org, stable@vger.kernel.org Subject: [PATCH 4.1 54/65] kaiser: drop is_atomic arg to kaiser_pagetable_walk() Date: Mon, 5 Mar 2018 19:25:27 -0500 Message-Id: <20180306002538.1761-55-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180306002538.1761-1-pasha.tatashin@oracle.com> References: <20180306002538.1761-1-pasha.tatashin@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8823 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803060003 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hugh Dickins I have not observed a might_sleep() warning from setup_fixmap_gdt()'s use of kaiser_add_mapping() in our tree (why not?), but like upstream we have not provided a way for that to pass is_atomic true down to kaiser_pagetable_walk(), and at startup it's far from a likely source of trouble: so just delete the walk's is_atomic arg and might_sleep(). Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 28c6de5441740f868a5b371804a0e8dde03757fb) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/mm/kaiser.c --- arch/x86/mm/kaiser.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index a8ce2e4737e0..c64bfef99ee8 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -108,19 +108,13 @@ static inline unsigned long get_pa_from_mapping(unsigned long vaddr) * * Returns a pointer to a PTE on success, or NULL on failure. */ -static pte_t *kaiser_pagetable_walk(unsigned long address, bool is_atomic) +static pte_t *kaiser_pagetable_walk(unsigned long address) { pmd_t *pmd; pud_t *pud; pgd_t *pgd = native_get_shadow_pgd(pgd_offset_k(address)); gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); - if (is_atomic) { - gfp &= ~GFP_KERNEL; - gfp |= __GFP_HIGH; - } else - might_sleep(); - if (pgd_none(*pgd)) { WARN_ONCE(1, "All shadow pgds should have been populated"); return NULL; @@ -195,7 +189,7 @@ static int kaiser_add_user_map(const void *__start_addr, unsigned long size, ret = -EIO; break; } - pte = kaiser_pagetable_walk(address, false); + pte = kaiser_pagetable_walk(address); if (!pte) { ret = -ENOMEM; break; -- 2.16.2