Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1721582ybg; Sat, 19 Oct 2019 01:04:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyF6+ouePfGIHEw6OwtkZ7Nn3R9xlQnfRfxg1JYTX9XN118M1hZs0OQkjMT85LsBMGrzFwN X-Received: by 2002:a17:906:1911:: with SMTP id a17mr12445064eje.14.1571472291225; Sat, 19 Oct 2019 01:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472291; cv=none; d=google.com; s=arc-20160816; b=fwvWUmo61ilVjM00zFv5MuDmlsLL27iygEbLJZQVk6LgSJr3BdIsh8yci0rbLxnj5x qhRuTQ/4/I3z3el4ppAY5FmXt64ook+jytPCOULozYQOYhuzalPns/didMnYHv4MtZI7 t76cyrNHkjJs1jnA4+7bjhMMxeGlxYVP0ypAUDxy+GCC+6h6yQXitj/MBbweQdokhiD9 wDIKUzWwHBIiPvuhpTheOhCPC4SLKFUrDfPGJvKXsME/Lhw1dr5YHuF384KB26xM8hIa JwdXjDga8nXnCL497G50uuA+CHqkByvfOxKgmBv35vF3wU2s2aC6exBd4mmAvq72S/FJ ZRMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:mail-followup-to:reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=lqNjg+EaGLj4NJ+f3f6IUdn2NqQIeIPYBk4IKGTbgOg=; b=F2KJxrnZV84GYqplaiMyIyJo0NAWIxe5J4FUX9xxG1obZ4RKw8ktCb3SCP8qNMqCUC LqRcGlz8eNSP23CDKLwuxbrgLrSMOhDnk7BcBSZ31fI3pGHy6CmTDV+JNo3Q4MJdN5Hr W3SFYVQi4W+nvAgI/yj5XKr4ZdbXShLFYez/kMiQkUHrINyS4EVPNDrVZCwn+giXddQo YSWjsPwuSb5A3lYBtou609r50Phwbgv3uJ/Bope2TJlw97UVlwMR+WV0595Pd8BPORvJ 7aFlwASWYdzGiF/mdfLUeRol1oJNVSRJUdhBzqFjwoe2+0kXjyIU0/7PPxMGSIiJCyTg 1qiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="R4/Ih84F"; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13si5032454edy.441.2019.10.19.01.04.28; Sat, 19 Oct 2019 01:04:51 -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=@redhat.com header.s=mimecast20190719 header.b="R4/Ih84F"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409665AbfJRJUM (ORCPT + 99 others); Fri, 18 Oct 2019 05:20:12 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:53350 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390499AbfJRJUL (ORCPT ); Fri, 18 Oct 2019 05:20:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571390409; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lqNjg+EaGLj4NJ+f3f6IUdn2NqQIeIPYBk4IKGTbgOg=; b=R4/Ih84FKt7lli57JnZjHf+PvNHaIqny3n7y9OnfhSsLdLQI9/UBVbJ5/flDX/9prz0ahM ipTw0EXV1MsgT+GwaHKuaoEdl8RRLmqIjMYL9dECLuHyATxcirv3xO/E6jUKkK92iyklmk XdC+OH2ia7IoaUjxpX5qNXIsQiAQJww= Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-169-RuTZFAEQP36o0U1mzFLIvQ-1; Fri, 18 Oct 2019 05:20:05 -0400 Received: by mail-io1-f72.google.com with SMTP id r5so7814316iop.2 for ; Fri, 18 Oct 2019 02:20:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=RHTr/G3jxXej8cUMFfKi+HcWzJkXtd79itVbm58x3Nc=; b=O+z8DNpBh99caZkjVEnMfY3chq6nRrbUr3Dx1f0hR76WtQkDd4FmbPIhvlheuxiNO3 b6M2wWiEXOSDnfaH3k628PHYyQycm+ks19GXuktviPc2bsg3bL+PHXZ2XD+Xdk8qFrkZ xY1ewceZBFhKVDILwTJ3af+MpHQTSVFLrDmjDpTEOWM/EzJAohShGGC0R1LCtihMZ70A WkukmQDxql5ZH8Y/Nb04zm6FHiqCIdtAnTvXEwowUfspbGRwq9Y4k7qAroraMtAOrNV9 X06vakw4BkvO2bi8OIV9p9LeHfRj5CaOTs4zaYyu5hBdn96pggTfDsYe+gINTvQFBMvx wGMA== X-Gm-Message-State: APjAAAUjhTRQaNowYSIWP1qJyoYaZ/MCVDOcQ/BtrEt1DiAF/2LxLILn JuycfS2EeHXyGopC1LHzVgY6GXF33fAeacsAydfd4WN5MWRrzJ9n3xNIZN9I0FexqYz+REPbFSQ Ri+idyxAklodM63uOQtoD0ser X-Received: by 2002:a05:6638:3a6:: with SMTP id z6mr8060189jap.33.1571390404917; Fri, 18 Oct 2019 02:20:04 -0700 (PDT) X-Received: by 2002:a05:6638:3a6:: with SMTP id z6mr8060170jap.33.1571390404644; Fri, 18 Oct 2019 02:20:04 -0700 (PDT) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id n26sm2180447ili.8.2019.10.18.02.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 02:20:03 -0700 (PDT) Date: Fri, 18 Oct 2019 02:20:02 -0700 From: Jerry Snitselaar To: Joerg Roedel Cc: iommu@lists.linux-foundation.org, Joerg Roedel , linux-kernel@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH] iommu/amd: Pass gfp flags to iommu_map_page() in amd_iommu_map() Message-ID: <20191018092002.wmgjhfit56ezkyu6@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Joerg Roedel , iommu@lists.linux-foundation.org, Joerg Roedel , linux-kernel@vger.kernel.org, Dan Carpenter References: <20191018090736.18819-1-joro@8bytes.org> MIME-Version: 1.0 In-Reply-To: <20191018090736.18819-1-joro@8bytes.org> User-Agent: NeoMutt/20180716 X-MC-Unique: RuTZFAEQP36o0U1mzFLIvQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri Oct 18 19, Joerg Roedel wrote: >From: Joerg Roedel > >A recent commit added a gfp parameter to amd_iommu_map() to make it >callable from atomic context, but forgot to pass it down to >iommu_map_page() and left GFP_KERNEL there. This caused >sleep-while-atomic warnings and needs to be fixed. > >Reported-by: Qian Cai >Reported-by: Dan Carpenter >Fixes: 781ca2de89ba ("iommu: Add gfp parameter to iommu_ops::map") >Signed-off-by: Joerg Roedel >--- > drivers/iommu/amd_iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c >index 0d2479546b77..fb54df5c2e11 100644 >--- a/drivers/iommu/amd_iommu.c >+++ b/drivers/iommu/amd_iommu.c >@@ -2561,7 +2561,7 @@ static int amd_iommu_map(struct iommu_domain *dom, u= nsigned long iova, > =09if (iommu_prot & IOMMU_WRITE) > =09=09prot |=3D IOMMU_PROT_IW; > >-=09ret =3D iommu_map_page(domain, iova, paddr, page_size, prot, GFP_KERNE= L); >+=09ret =3D iommu_map_page(domain, iova, paddr, page_size, prot, gfp); > > =09domain_flush_np_cache(domain, iova, page_size); > >--=20 >2.16.4 > >_______________________________________________ >iommu mailing list >iommu@lists.linux-foundation.org >https://lists.linuxfoundation.org/mailman/listinfo/iommu Reviewed-by: Jerry Snitselaar