Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3696901ybv; Mon, 10 Feb 2020 04:54:25 -0800 (PST) X-Google-Smtp-Source: APXvYqzbhuie/7DYFvKHqZeUz+UKo9oAskYAfbrsmC7bzQfX7gHdRSktv/jcqTsf3aRFgeUaCB9G X-Received: by 2002:aca:af49:: with SMTP id y70mr755707oie.162.1581339265102; Mon, 10 Feb 2020 04:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339265; cv=none; d=google.com; s=arc-20160816; b=mnG+xuMub1YfKMz9Rh5aT6OUTlSaT5uUUqjQpKicrR3UQArfddt2bQXTpFJIjeJ97H tGhcl2tqdninsn4Na/cxCMpw+5OaQFUGsQk0OqEUIydqdHm0DdIJ0oSMjGPwTC4B/eoe 2Hffmxya3spAQtmEZ0PQgtmorunbwc4/7PFv2c+ED+kqjHz5aJao/cbhJ2Xf3Se83O22 E42HES0Cr90egP7HiXlfQYsI20e2XxD9bo1LXDb9PlqjGKhtCylLJ/5uZKBF/MXbQh30 By156yAZbVblvfHF4goggRHnB9i430VxC4cYLzGwhryj15A0E/iBU34tX+g7TLFbwWbs 3/xQ== 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:dkim-signature; bh=/oWNB8OZKZvKmu7bo0eUZJyGzaM+TA9ueIb32KLKBOQ=; b=Sj0dgF5gvJSGz75WHvAZaPlo5OlKD0zXkA/XUGwmZstvi/+GMO5BW4PYizyHBuUT9R rga1Fwu54N+Oheyl9EnFVSObgpOy/vN1CBrPQH1gjbe/R90KFgNk3OpxSBAEAq4wv+hE F0B1ZpKDr+IemLBwx1EZnI+AnN8mpGRhk6iIMTynJHz9Vyx1AoXpvlMiv/2OOFqZy2Tz E/ttxT5BYDWSpo13/MldX9FcSPBUmWXgQidGiGUS8mBsA25iZbbr8XAQM5pNHhFYJwI7 qH161LjQqNfi3oIxN4A2PLrwfsT5JG9GfAktxs1lCSNWH4NOM9kWhWiJJ8/8Qt1rMppB fN1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zpDVDW3G; 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 m24si145385otn.67.2020.02.10.04.54.13; Mon, 10 Feb 2020 04:54:25 -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=@kernel.org header.s=default header.b=zpDVDW3G; 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 S1729496AbgBJMxL (ORCPT + 99 others); Mon, 10 Feb 2020 07:53:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:45926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730188AbgBJMmO (ORCPT ); Mon, 10 Feb 2020 07:42:14 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2BE0F21739; Mon, 10 Feb 2020 12:42:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338534; bh=FxDB79vcx4G5QmW2++YxBtmlc+Bcn40MOvGOEo/+95Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zpDVDW3GQI4ixAyJEiizdUtrLIF5Es3K+t4+jaSbv9V6of790WqiLkWhku/wmD0eL fZ/lHB3+XS8EGkEvz8nkgjx+buV469nXVbUwOvk8wLYNNVlGA1Sqd1oKap4EQjopcs hhwqSEb//udqJi/uJ8dug9/dLIR2Vq7vq7feZx7s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.5 361/367] IB/core: Fix build failure without hugepages Date: Mon, 10 Feb 2020 04:34:34 -0800 Message-Id: <20200210122455.688619849@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Arnd Bergmann [ Upstream commit 74f75cda754eb69a77f910ceb5bc85f8e9ba56a5 ] HPAGE_SHIFT is only defined on architectures that support hugepages: drivers/infiniband/core/umem_odp.c: In function 'ib_umem_odp_get': drivers/infiniband/core/umem_odp.c:245:26: error: 'HPAGE_SHIFT' undeclared (first use in this function); did you mean 'PAGE_SHIFT'? Enclose this in an #ifdef. Fixes: 9ff1b6466a29 ("IB/core: Fix ODP with IB_ACCESS_HUGETLB handling") Link: https://lore.kernel.org/r/20200109084740.2872079-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/core/umem_odp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c index f42fa31c24a29..b9baf7d0a5cb7 100644 --- a/drivers/infiniband/core/umem_odp.c +++ b/drivers/infiniband/core/umem_odp.c @@ -241,10 +241,11 @@ struct ib_umem_odp *ib_umem_odp_get(struct ib_udata *udata, unsigned long addr, umem_odp->umem.owning_mm = mm = current->mm; umem_odp->notifier.ops = ops; + umem_odp->page_shift = PAGE_SHIFT; +#ifdef CONFIG_HUGETLB_PAGE if (access & IB_ACCESS_HUGETLB) umem_odp->page_shift = HPAGE_SHIFT; - else - umem_odp->page_shift = PAGE_SHIFT; +#endif umem_odp->tgid = get_task_pid(current->group_leader, PIDTYPE_PID); ret = ib_init_umem_odp(umem_odp, ops); -- 2.20.1