Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4998227ybi; Tue, 11 Jun 2019 17:03:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6cpgU8wr2Uayo1lEayvtTENKT27WJ6WJhVkP6YTvnBNsF+CCUxWCAYi7fKkMnIQsqlYxC X-Received: by 2002:a65:620d:: with SMTP id d13mr22923835pgv.109.1560297796234; Tue, 11 Jun 2019 17:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560297796; cv=none; d=google.com; s=arc-20160816; b=C2IfZS8r5lWJUTB1BMOQGNMYLM/ykeSU/yNGE1CrHY/dB28Vza0zqnCIoc+HniUTuY fWdcWwBOGebgaPIXJ5LFg/uNWns6MPgkcMUgq7EVVUyse/77deXYCjm5Wzp06vMmCeoD AUxwZ7Z2QEnCGdhM8fzo9Vz0dePZZYGwqKjf5f6RqY7nw7mQeyVcK8ZAeVxCDu1lmWik ub2x67NX9h++gFqp6Ctv2rHK4yybtT0daXxcr2TfAIKOd1Df61nzQX/MjykMEwRHDeyL fIIJ+wd65qbV48Vp8k6sd+xp49/DtNY7EJy0kslUm9sva2fd7djQqFTiMNPjULRID7zC JDTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GulUsqBf8T027861ToGt8N8Fkx90aYJ3H5Xyw39pJCk=; b=VeiE0Hymied49TYj115hMXeOFOu9W7Vu4RaVwXgxf/ro3fiRSQVy8ukbkrf4C2tJ+L qutiTGMG99q3xFmAcuyVRggGXZpRCeO3/xR+mPgDi4AQ4xqlesFIr4546sZBt0OXLOdd ercuh5B58Amllh8vBxC8ttEeIdMyOxYGuGd/9PJBIU2Au3DYguae1ou5noPuy+mDnMjq xAJQyZBlEw+G5SmMnmLH/NGe2vaJ7zllpZRtFzIhHKHxML/STsGIoA8eU9hXchcMbPiG P7+EkdkbjhZshonbi0YFCSIDpfPqJJpi2yOeE08GIRPCQR10/tuzf2GwMAdnF4ow8oAc v4kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=BLs92YLh; 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 m7si3503524pjs.63.2019.06.11.17.03.00; Tue, 11 Jun 2019 17:03:16 -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=@ffwll.ch header.s=google header.b=BLs92YLh; 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 S2404906AbfFKTlw (ORCPT + 99 others); Tue, 11 Jun 2019 15:41:52 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37621 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387563AbfFKTlw (ORCPT ); Tue, 11 Jun 2019 15:41:52 -0400 Received: by mail-ot1-f66.google.com with SMTP id r10so13094996otd.4 for ; Tue, 11 Jun 2019 12:41:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GulUsqBf8T027861ToGt8N8Fkx90aYJ3H5Xyw39pJCk=; b=BLs92YLhBG37uFU+cv1zbVt054d9bpwDQzV1xZdsuQvcZDtafmxwl3DJq0QAi99ly3 fTguFr0mXqAua8mxzGmXTgGYpHcfHxqRKkJpiGKRnDImCIFJ1PVOtToClVzTp0NXuMhg TzGHhfcrfHwSFtwxEU3vqrb6CJ3kaZAF1OmBE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GulUsqBf8T027861ToGt8N8Fkx90aYJ3H5Xyw39pJCk=; b=V2N4GG0K76bTVSG+cNUMfIhuRHbBDPSiLlToankXQPEBeEVhVm6xH47dqdhUgUhyKh kgeRwVou0Ql6dNKGa+H73AS4ojO56cRZToGb1YMgLSaS136QUOyVPhCqommA9B024hAP CzxkZXPHolPsjGUjWsU6AcPGgnlUKYQpAiIRsGn4nySLgmPypYxUjb23SaB+APgC6UZl dDx8Ixz4UsYTtXU1n/snRd7+66kQiZs9FHj1niAHLQx8Pl65Mfyt7YnmW7or0dTuknPd KmmV2iNJiSaMVUShMkSbtNTndsr0SyDsHXUBqUb74hnEcz3XvykoGPX6lbi9pl1/EGCg 98hQ== X-Gm-Message-State: APjAAAUjgdtnbEkbs1iHCtqltaEuak42b1CxjH5Kihh8WpGmV7ECuvGl vHnKaU/axtk72Zdt6xXg6jRfHmd1OGzbiA1I9DA4oA== X-Received: by 2002:a9d:7451:: with SMTP id p17mr4483924otk.204.1560282111688; Tue, 11 Jun 2019 12:41:51 -0700 (PDT) MIME-Version: 1.0 References: <87k1dsjkdo.fsf@turtle.gmx.de> <20190611153656.GA5084@kroah.com> <87ef40j6mx.fsf@turtle.gmx.de> In-Reply-To: <87ef40j6mx.fsf@turtle.gmx.de> From: Daniel Vetter Date: Tue, 11 Jun 2019 21:41:40 +0200 Message-ID: Subject: Re: Linux 5.1.9 build failure with CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n To: Sven Joachim Cc: Greg Kroah-Hartman , stable , Linux Kernel Mailing List , Dave Airlie Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 11, 2019 at 8:53 PM Sven Joachim wrote: > > On 2019-06-11 19:33 +0200, Daniel Vetter wrote: > > > On Tue, Jun 11, 2019 at 5:37 PM Greg Kroah-Hartman > > wrote: > >> On Tue, Jun 11, 2019 at 03:56:35PM +0200, Sven Joachim wrote: > >> > Commit 1e07d63749 ("drm/nouveau: add kconfig option to turn off nouveau > >> > legacy contexts. (v3)") has caused a build failure for me when I > >> > actually tried that option (CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n): > >> > > >> > ,---- > >> > | Kernel: arch/x86/boot/bzImage is ready (#1) > >> > | Building modules, stage 2. > >> > | MODPOST 290 modules > >> > | ERROR: "drm_legacy_mmap" [drivers/gpu/drm/nouveau/nouveau.ko] undefined! > >> > | scripts/Makefile.modpost:91: recipe for target '__modpost' failed > >> > `---- > > > > Calling drm_legacy_mmap is definitely not a great idea. > > Certainly not, but it was done by Dave in commit 2036eaa7403 ("nouveau: > bring back legacy mmap handler") for compatibility with old > xf86-video-nouveau versions (older than 1.0.4) that call DRIOpenDRMMaster. > > If that is really necessary, it probably has been broken in Linus' tree > by commit bed2dd8421 where the test has been moved to ttm_bo_mmap() and > returns -EINVAL on failure. Looking at the commit it's actually 1.0.1, which was release in 2012. I'd say lets keep current upstream as-is, and hope no one cares anymore ... -Daniel > > I think either > > we need a custom patch to remove that out on older kernels, or maybe > > even #ifdef if you want to be super paranoid about breaking stuff ... > > > >> > Upstream does not have that problem, as commit bed2dd8421 ("drm/ttm: > >> > Quick-test mmap offset in ttm_bo_mmap()") has removed the use of > >> > drm_legacy_mmap from nouveau_ttm.c. Unfortunately that commit does not > >> > apply in 5.1.9. > >> > > >> > Most likely 4.19.50 and 4.14.125 are also affected, I haven't tested > >> > them yet. > >> > >> They probably are. > >> > >> Should I just revert this patch in the stable tree, or add some other > >> patch (like the one pointed out here, which seems an odd patch for > >> stable...) > > > > ... or backport the above patch, that should be save to do too. Not > > sure what stable folks prefer? > > -Daniel > > Cheers, > Sven -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch