From patchwork Fri Sep 6 15:10:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 173249 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp846346ilq; Fri, 6 Sep 2019 08:10:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzN5OlIZ+dYFL0wtqM6W7fbNeOn9ZUkwhNiRqRq93dj0tjJ8pcEYyymgvEpYFC2jjlO89K9 X-Received: by 2002:a63:904:: with SMTP id 4mr8209503pgj.36.1567782649747; Fri, 06 Sep 2019 08:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567782649; cv=none; d=google.com; s=arc-20160816; b=fMeQVbs7eK+b5s6wtuRlTkKcQUq5/7NyAMae1L7f2dD3FrQv8Q06Z53N4NOpZXXHsL cCSyXHC/SybjaRGJrdhiwV8U1x4dowlINlKr/7P1s0Zsf3kQDa0LiBHjParaDadrHUE6 VEPO61IZVuOOBhB4kRkWd+f/h0y+qs4sgegDkKzwWkji2MNur4uVY7f29CjVVXRvprmU 9B7YPgDyVqIvqPnhO5K4senc4LBQooDUtu5E6yP74Qpz43/6ku4/VjC52+y7ZFlgfBUq 45o/2OxoNiesabZiXWAOQEjkYXK5c/bAKfYzR7AN6G3QVwMHLn+HSg9va9VQ1uMxnoiu f+lw== 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 a3si5764772pfo.115.2019.09.06.08.10.49; Fri, 06 Sep 2019 08:10:49 -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 S1733280AbfIFPKs (ORCPT + 28 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 X-Provags-ID: V03:K1:svnOKkIwvMMN2TxIk68gqKt+i1qDuao/nvUUaSm/PJwqOnp+jxZ FRL3NKODlVWYldlmMkjhkWkhBFWYySN3Lqy+N17P9/LUGuUZQqx43KD4zEyMw2Nr0WGHZVN nTlusUYKmQfhofqMp7rDc23pa4DBTPRMmSGtLZzmCD3Zt9aWbpDk//Q9p7Ynm2VgJMVWq7k 2xxfn4CAxM9aLzBIy91Kw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:YvGC+Z3bvOY=:BV6BpiMQShEh3d1hmzWknQ IHO/49nosEcLepL0ERAotL3z4HUhFWqzzn2hwUkBO8qttq7As+E7x6fvQ2P6kiwjC71LteDJV Ym6O8PuVMzTRV+He5JYY7OTws8Vdj/CgPUigLJ/F2qDtV9reQ3LHTpkvY6GKK+eOxHVuVjN6q oys8Dz/HQR7JLvzoMgX7lrt9IMBNoFmbQqs346/3VfL7GGEuyPrbKu3UD7BkkoJzQ+/1zKKwU 7NKjPDxPMocy9V2EyuE0RvKUCFSyvyC1t1av2TRwAnPb/03u8W1nWb6ldmuzI7p/PElczYMsb 9PgXlVqq6ZWplUWOuTFld3q3g8pw8v9vC0YhOTQ6tV6vtnEE1V7dduTB6r1MWncL7M1pYC/jf 4ZNCpLwPPDRHmkb88t3LiV96TSSWoqtIsKP4EpkGmfaaBkBaTWt7g+tRe2DbQPSYlsfqU7ARq I6n3eyyN2euNZASADbgkdax180Vki0w48HyoEARNqeVaKP8DqLqDxllKET8wCMdhz9af89Co4 002wVbkDT9eMCfBIo7+C6s+mw/fJ32CI9K9o8E3SeIDwQ6zpQY03XAKYTrurRpTHgDucNGdbx fJozbT7doO533cGGqP0eZNHH7MraDBH1zn+lZFhRK9ItoTcRrYdzjZoX1io55PA7YqMDzo2aw pjHfdMz/FFNOY9a4TM+V5+yVbIhQA+D+9PCkEd6ooPsG+YXJXJciEynZELSUt5K1hMZEgeo+z QUUOWbPsQ3LaCxjRey1DOQDXtPcm/fzYLSPjgCAr2a8A24GmXLHOjO2N7jmJMFfVdJMJL5l0Q 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(-) -- 2.20.0 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)