Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1510028ybe; Fri, 6 Sep 2019 20:09:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXOZCqTyQoEXpC27Dqlrl2EdardKbnyNZtkSjcugt5zH9j0he2AQw1digu96QJ0s+nt4Cb X-Received: by 2002:a17:90a:c501:: with SMTP id k1mr13168953pjt.37.1567825775040; Fri, 06 Sep 2019 20:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567825775; cv=none; d=google.com; s=arc-20160816; b=OGOqc5Tz8FBv1PhhO/2HzJZ7YlL5FC7UGGpBoh+S5JLvOKJDMESPKs4BT7AUod6acT Q16EQ2YVWdC4FuQ3M1suvnodnqmFs+s0+aIeDT7sITNLM7JorMzBMl2UZjolekki5yTG kdNtoflVFR4CE/Be4T0RG6l1j1gE94tC8/OPetX9e3nWFNfRZ1JfyTIG3DzaMBU9uXK0 /0Td8Acl5iks67zzFegr0OELDUtUci9ruD9J/fl7Zq8Pw7QD8m7gQxmTj/3u+pwuhvT2 SZCL91uyUijTxJcE1jJHZUhUPkWVKWq76W6L+MqWskXUpDOo/mLhDNPZ3U5aQdHMWOAe 8JSg== 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 :message-id:date:subject:cc:to:from; bh=LExnptYl3eRIXlnTNJHd+dHX4QMH9ebKP9KfX4K4XGo=; b=e0SA/XatAHu0ZNmbTxWcB0u78k+VugDx00RjZYbc4ve9Cyl1GBG7sTYQIqwVHrCuin Sz6ssxV8uVBOtM3q7i59hBLXtJOM6qCWnYSJzdLlS6LJjGoWFTPTO1+gq5QQRCMimCzV 0Td5nvjE2f3TpHOLNa+WN6Kej+zv1OUT27L5wjsVitvEHlyezUdeK4Ht8VWN2tlDG94p GiHTlCkb+HVAN7URX7AtIvZJ82jHEJstww5/cew0Zjr9Yj6gHa43nrTptwyA9BSUWDJW LyYZeBgx+ORODbp9XKRW3k8HkB7vxIcrUE4Smh+56uijNw9dGlXv5elkAxjdvu8WvYeo ES0Q== 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 x19si7862040pfq.258.2019.09.06.20.08.44; Fri, 06 Sep 2019 20:09:35 -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 S1733254AbfIFPKs (ORCPT + 99 others); Fri, 6 Sep 2019 11:10:48 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:33453 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728377AbfIFPKr (ORCPT ); Fri, 6 Sep 2019 11:10:47 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1N7Qkv-1iEFdy0ONB-017jD5; Fri, 06 Sep 2019 17:10:31 +0200 From: Arnd Bergmann To: Bernard Metzler , Doug Ledford , Jason Gunthorpe Cc: Arnd Bergmann , Jason Gunthorpe , Stephen Rothwell , Andrew Morton , John Hubbard , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rdma/siw: fix NOMMU build Date: Fri, 6 Sep 2019 17:10:10 +0200 Message-Id: <20190906151028.1064531-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1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XLHOjO2N7jmJMFfVdJMJL5l0Q 15KEpk93ekCEUIzD+zLf93uWD6M6o6i/cds3OZHbQsC73EwzBA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On kernels without CONFIG_MMU, we get a link error for the siw driver: drivers/infiniband/sw/siw/siw_mem.o: In function `siw_umem_get': siw_mem.c:(.text+0x4c8): undefined reference to `can_do_mlock' I don't know whether this driver is able to work at all without an MMU, but it's easy to avoid the link problem by adding another compile-time check. Fixes: 2251334dcac9 ("rdma/siw: application buffer management") Signed-off-by: Arnd Bergmann --- drivers/infiniband/sw/siw/siw_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/siw/siw_mem.c b/drivers/infiniband/sw/siw/siw_mem.c index e99983f07663..b3b614c07fdb 100644 --- a/drivers/infiniband/sw/siw/siw_mem.c +++ b/drivers/infiniband/sw/siw/siw_mem.c @@ -374,7 +374,7 @@ struct siw_umem *siw_umem_get(u64 start, u64 len, bool writable) unsigned int foll_flags = FOLL_WRITE; int num_pages, num_chunks, i, rv = 0; - if (!can_do_mlock()) + if (!IS_ENABLED(CONFIG_MMU) || !can_do_mlock()) return ERR_PTR(-EPERM); if (!len) -- 2.20.0