Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2496533imm; Mon, 24 Sep 2018 05:28:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV636rP0xADVMCGnMu5pRTZYMoRNV1HxQ27GS+GGmPknPIDrMD4iHw16Z+aQuArGb1q7dLyHN X-Received: by 2002:a65:6654:: with SMTP id z20-v6mr9450153pgv.186.1537792122880; Mon, 24 Sep 2018 05:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792122; cv=none; d=google.com; s=arc-20160816; b=vqtf6Hfjk3m9rmAdspzeGaVtwgc/e+kHWYjjug/HCLhHEXWt8HE9qY7kc+GuGwnaS5 A4LxZnQjK9ZdFzpPbSyyAuZmd7mP9Op8jdc7vMdRkAE6AjivELXXjjhM+nqg0UCOtlVP xwh2RLE6PJp6ElvsMPfXhkrrq+pQNqP73vnj7G9Ac+qX9TB6S/mf2/yNX3zsK33hp7Xf Jq7PB6YybLxjHNJxVCwi2tEpaxXSR7XogMu5z+DMw7ClsMnlDtz5S1Jp5FYq6HPqhPmt RiCTQgUMGm+zdMNdf1cuzeq/sv/Hrnqq4l95GiwAbXqDTUqIWb/8fYiY0dj6/m4wyELa oIgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=SGUkOEKKpqzWJ45N6KAoePUpODSWQ/H3kTjtJG4J3vY=; b=SPHVZYUQb/H/CWEME1WuMZeBFwzbe/nGmuQ0xIlhH4n68zrg9H/10i5YANYor5ZtrC zpufu04posLbfasp8JW7Kl+dYHXzO2ok+s5LwqLJ0HVrasiAXjQ0M+d4qnJNYPTtfaAN U3OKqHGWDrO89IUCH8uuT5Bxms0lm5FfpQvjju8bnk5iLreFQ3vVvES4tkgJ8pQxRzsC ZQbgwsE6obgxr6FxSB9iU56tVBoh6ZcF7UqXmR529yhIEjxRnSqG17LFJ4A4yGbYpVsQ rH85awLQyVvKq5W+OMTq8syvl46GX7BXWV43zRuGQiQkjsxdkLT9r/oSngj6uCWwWcmG aMAw== ARC-Authentication-Results: i=1; mx.google.com; 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 x192-v6si1423393pgx.686.2018.09.24.05.28.27; Mon, 24 Sep 2018 05:28:42 -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; 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 S1733302AbeIXS33 (ORCPT + 99 others); Mon, 24 Sep 2018 14:29:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57316 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730233AbeIXS32 (ORCPT ); Mon, 24 Sep 2018 14:29:28 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1449D1018; Mon, 24 Sep 2018 12:27:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jean-Philippe Brucker , Will Deacon , Sasha Levin Subject: [PATCH 4.18 019/235] iommu/io-pgtable-arm: Fix pgtable allocation in selftest Date: Mon, 24 Sep 2018 13:50:05 +0200 Message-Id: <20180924113106.524637591@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jean-Philippe Brucker [ Upstream commit fac83d29d95471ad6a104f8c0d21669a3d59097b ] Commit 4b123757eeaa ("iommu/io-pgtable-arm: Make allocations NUMA-aware") added a NUMA hint to page table allocation, but the pgtable selftest doesn't provide an SMMU device parameter. Since dev_to_node doesn't accept a NULL argument, add a special case for selftest. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/io-pgtable-arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/iommu/io-pgtable-arm.c +++ b/drivers/iommu/io-pgtable-arm.c @@ -237,7 +237,8 @@ static void *__arm_lpae_alloc_pages(size void *pages; VM_BUG_ON((gfp & __GFP_HIGHMEM)); - p = alloc_pages_node(dev_to_node(dev), gfp | __GFP_ZERO, order); + p = alloc_pages_node(dev ? dev_to_node(dev) : NUMA_NO_NODE, + gfp | __GFP_ZERO, order); if (!p) return NULL;