Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp394304ybi; Sat, 15 Jun 2019 03:22:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG50ec/lVHtMJD7eauc7fxX7mvXboB965gCbaHnbVL886iqza+e7QyDn90Wfq/oSk9+Bwe X-Received: by 2002:a17:902:f01:: with SMTP id 1mr97035925ply.170.1560594144413; Sat, 15 Jun 2019 03:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560594144; cv=none; d=google.com; s=arc-20160816; b=F9XUMGPanUX95kAuMdZYWm2F5Hs2G9aPNwHVdAZdck8YLCfdFuLXj3Auu4yVzTtY8o 0ZoDuanmrkfYPGoxI+MACHq7B29O55ds59Sv/Q28urZJQRerSUsTcA2NTWrB8Hyr+TD2 lLrVZhvSWjkuOUr+grEBdwPzb3A7KiA8z5mlge9joe/7h+XAD5FQFrzQOUjI69sXx0KQ 6zTYI3g1jf/3lEciYNmd4rkk7cfR2oWtFpKhygG2kJmrOwNLlQvmFl0POBGto9lwEm+D RSnZ71VGpoOagYbIRVDQYTyOY8WBgq0JNdWvg2CNuXDGVnxhf6/JGGcwaqNufEoM5+aj +Oxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject; bh=DnOoarFUm6W7iXpk4p81SHdYmyVmzs1KzWc+pXMdbKw=; b=Sk9/RaU0+SwwRtmTar3/GBdrEKyKp6HZy8OuptKrFHqjX2HBexDadbFSSlyzzr7+Xy ATjcMzkO3NZqo0NBC5S+Q4FeUBpzhTwSsjHRNj4gQGMrk5IC9wtDcxqf0QBAeVCWM1M7 GMGtQCYWxcXP5zis/Pt32hDP+SbQ47X3l6VPd9IKNVw6FJjLcPUaV20lLTmZ6jCupDGa M9KmKgiUPsNq7P1xkKo2TozWld8bBWVVnwRPWWPQhnYXLbLuH2QzVwOnW/YZppzW93u3 xD6leULsyufB07r1B68gkZFJuKjOUGL+CISlCMYoNM8y5cT8LjH5CCa5Kt0yucFKfMnY BUAw== 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 u2si4501673pjn.13.2019.06.15.03.22.09; Sat, 15 Jun 2019 03:22:24 -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 S1726592AbfFOKWF (ORCPT + 99 others); Sat, 15 Jun 2019 06:22:05 -0400 Received: from mx2.yrkesakademin.fi ([85.134.45.195]:56319 "EHLO mx2.yrkesakademin.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbfFOKWF (ORCPT ); Sat, 15 Jun 2019 06:22:05 -0400 Subject: Re: Linux 5.1.9 build failure with CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n To: Greg Kroah-Hartman , Daniel Vetter CC: Sven Joachim , stable , Linux Kernel Mailing List , Dave Airlie References: <87k1dsjkdo.fsf@turtle.gmx.de> <20190611153656.GA5084@kroah.com> <20190611174006.GB31662@kroah.com> <20190613074210.GA16875@kroah.com> From: Thomas Backlund Message-ID: <7c9602d9-0619-2a01-5793-dbcf259d10df@mageia.org> Date: Sat, 15 Jun 2019 13:21:59 +0300 MIME-Version: 1.0 In-Reply-To: <20190613074210.GA16875@kroah.com> Content-Type: multipart/mixed; boundary="------------B6AA626F6239144D016D5C9F" Content-Language: en-US X-WatchGuard-Spam-ID: str=0001.0A0C0209.5D04C6CA.008E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-WatchGuard-Spam-Score: 0, clean; 0, virus threat unknown X-WatchGuard-Mail-Client-IP: 85.134.45.195 X-WatchGuard-Mail-From: tmb@mageia.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --------------B6AA626F6239144D016D5C9F Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Den 13-06-2019 kl. 10:42, skrev Greg Kroah-Hartman: > I've just reverted it now. > > If someone can send me a patch series of all of what needs to be > applied, in a format that I can actually apply them in, I will be glad > to do so. But for now, I'd like to get people's systems building again. > That would be basically re-adding the b30a43ac7132 commit and adding the following patch (also attached in case the inlined version gets mangled): From 0d91b155a7f9c1f4a2b360bc2b79dc728aee8b48 Mon Sep 17 00:00:00 2001 From: Thomas Backlund Date: Sat, 15 Jun 2019 12:22:44 +0300 Subject: [PATCH] nouveau: Fix build with CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT disabled Not-entirely-upstream-sha1-but-equivalent: bed2dd8421 ("drm/ttm: Quick-test mmap offset in ttm_bo_mmap()") Setting CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n (added by commit: b30a43ac7132) causes the build to fail with: ERROR: "drm_legacy_mmap" [drivers/gpu/drm/nouveau/nouveau.ko] undefined! This does not happend upstream as the offending code got removed in: bed2dd8421 ("drm/ttm: Quick-test mmap offset in ttm_bo_mmap()") Fix that by adding check for CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT around the drm_legacy_mmap() call. Also, as Sven Joachim pointed out, we need to make the check in CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n case return -EINVAL as its done for basically all other gpu drivers, especially in upstream kernels drivers/gpu/drm/ttm/ttm_bo_vm.c as of the upstream commit bed2dd8421. NOTE. This is a minimal stable-only fix for trees where b30a43ac7132 is backported as the build error affects nouveau only. Fixes: b30a43ac7132 ("drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v3)") Signed-off-by: Thomas Backlund Cc: stable@vger.kernel.org Cc: Daniel Vetter Cc: Sven Joachim --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 1543c2f8d3d3..05d513d54555 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -169,7 +169,11 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma) struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev); if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) +#if defined(CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT) return drm_legacy_mmap(filp, vma); +#else + return -EINVAL; +#endif return ttm_bo_mmap(filp, vma, &drm->ttm.bdev); } -- 2.21.0 --------------B6AA626F6239144D016D5C9F Content-Type: text/x-patch; name="nouveau-Fix-build-with-CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT-disabled.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="nouveau-Fix-build-with-CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT-dis"; filename*1="abled.patch" From 0d91b155a7f9c1f4a2b360bc2b79dc728aee8b48 Mon Sep 17 00:00:00 2001 From: Thomas Backlund Date: Sat, 15 Jun 2019 12:22:44 +0300 Subject: [PATCH] nouveau: Fix build with CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT disabled Not-entirely-upstream-sha1-but-equivalent: bed2dd8421 ("drm/ttm: Quick-test mmap offset in ttm_bo_mmap()") Setting CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n (added by commit: b30a43ac7132) causes the build to fail with: ERROR: "drm_legacy_mmap" [drivers/gpu/drm/nouveau/nouveau.ko] undefined! This does not happend upstream as the offending code got removed in: bed2dd8421 ("drm/ttm: Quick-test mmap offset in ttm_bo_mmap()") Fix that by adding check for CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT around the drm_legacy_mmap() call. Also, as Sven Joachim pointed out, we need to make the check in CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n case return -EINVAL as its done for basically all other gpu drivers, especially in upstream kernels drivers/gpu/drm/ttm/ttm_bo_vm.c as of the upstream commit bed2dd8421. NOTE. This is a minimal stable-only fix for trees where b30a43ac7132 is backported as the build error affects nouveau only. Fixes: b30a43ac7132 ("drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v3)") Signed-off-by: Thomas Backlund Cc: stable@vger.kernel.org Cc: Daniel Vetter Cc: Sven Joachim --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 1543c2f8d3d3..05d513d54555 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -169,7 +169,11 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma) struct nouveau_drm *drm = nouveau_drm(file_priv->minor->dev); if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) +#if defined(CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT) return drm_legacy_mmap(filp, vma); +#else + return -EINVAL; +#endif return ttm_bo_mmap(filp, vma, &drm->ttm.bdev); } -- 2.21.0 --------------B6AA626F6239144D016D5C9F--