From patchwork Wed Jul 12 07:43:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 107448 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp488557qge; Wed, 12 Jul 2017 00:44:08 -0700 (PDT) X-Received: by 10.84.142.129 with SMTP id 1mr2791992plx.10.1499845448421; Wed, 12 Jul 2017 00:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499845448; cv=none; d=google.com; s=arc-20160816; b=NA9KwyNE2xdC13EcI8iTliqNhIpTlKuGmeh21LOmMC6MIqQmnbiD0ip5PoL9oddFpM Wdwhl31wjfMxwFVOhWqaBVEE46T+U0/mSGX75G+Y/9VRWJY3M2KudcgCVC29L2k0BVpD XJUO86ir25Uswrqr9wHaBUOhBq545v3HKZFDL5Ho4unsJU5lTiLc674J9tQ2+UAw4I7K eC0z4fglBMI3dPAE780Sr7gUCWg5dhH/rcGc1dOJIap5qpEztFpq/YDq6phPaCgWKqIn rd6JxyEyRn2fEeomxV/mgp/bgZnGvLCXHIF+Z4HjDkn+uKgdb9GYaaORvXZNxn+fVci9 0RXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=RB7ZsX7OzxW2Kc6AsqvL+RxVBKnQimvCzBz3cqDn9/w=; b=pvp9yTyW7h1Cq80A2lW6GZStP2wJQOfHYH6fAMzoR8LuyDk1w7O2/yERBcKq1EBwQi 9STlzkhG5ZUu/ycJ5MW5ZdrkXK1dYY4L1G0jJ9LMgI0gIk2YG9ZCayqwBJXseIrRPdjL 5CHGvO7qM+hyO6JO6h+EzpADYoztuzEOKiXKdtvTdmCECLEb2nOgsiEsxuDCXqafGRVk mjBwZcizppyOzro2vIxovi5ONhZ3G1OG3wQHjvTtfGtojhkD6EfZYA0PIZnSOBmYPZ4v h8u/bL4Ygm63uXoMVimN9q4hfwDjPVTpGDA8SWEuhoD0UnSTn8cRHG9ePHn0uvDbnnWA 163A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=IemeuZ7M; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si1416152plj.403.2017.07.12.00.44.08; Wed, 12 Jul 2017 00:44:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=IemeuZ7M; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756812AbdGLHoH (ORCPT + 2 others); Wed, 12 Jul 2017 03:44:07 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:36780 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756783AbdGLHoG (ORCPT ); Wed, 12 Jul 2017 03:44:06 -0400 Received: by mail-wr0-f181.google.com with SMTP id c11so21632473wrc.3 for ; Wed, 12 Jul 2017 00:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=u+rzPaJfbyXXghfUFsJZjNAWTawxdfpaP3lJ0ROME98=; b=IemeuZ7MggNJTVIXlBPUuQKxvlnih60Fh05i1ut4ICEBK0Xga+wkuEPWoVeR8sbt4F 6WjacIcw0uW1DjZtJRebCdo/wDfQvKdonjnff7CtTYfIvY870JIG5HsMcNclDd4xId6Y JDlMt/F72vbKPMY/ktQTpr/dBAxxkzxEX93nk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=u+rzPaJfbyXXghfUFsJZjNAWTawxdfpaP3lJ0ROME98=; b=I6veaTtQZPNfdfbitDiPMXCVzQTefYE1khjmF86tOhSUfz4SOFBvIPjLxhnSsBVhoZ NyBiAplZw8jQvvxGYTPHWOjQ1RI735nniHWbzh3MOYQC9+0bFTWnfA36jKMQjpHy9tw2 Sjs45TKTVysFRCbrG3o1S2ITYG0d1OZGYR/ISHuJzmnHF+1B0URUfeyZUmVGYxhRm3oN xLjBmCaSgYFTkWvJPt2LVzj7xDKhlUoN0zWvrgeYmHHBWRmCl6/Kf6mftpTyDDHxfVyN TcmeR9tPIutfYIa3JGxsOfjPcOjY5Y7DW/lMhxHnrRMIF8UBDqRpnFX07cJr+VIbhmjz vnyA== X-Gm-Message-State: AIVw110JYddkGXaIIEbfpxHJFCYK6wxhPACcIFyfqXgqJEUaxR2SRJIx UfKCMew8tHQM8fAz8KMHsQ== X-Received: by 10.223.175.37 with SMTP id z34mr1934909wrc.11.1499845445491; Wed, 12 Jul 2017 00:44:05 -0700 (PDT) Received: from lmenx321.st.com. ([80.214.75.225]) by smtp.gmail.com with ESMTPSA id x21sm1564980wme.24.2017.07.12.00.44.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Jul 2017 00:44:04 -0700 (PDT) From: Benjamin Gaignard To: b.zolnierkie@samsung.com, daniel.vetter@ffwll.ch, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, noralf@tronnes.org, dri-devel@lists.freedesktop.org, emil.l.velikov@gmail.com, yannick.fertre@st.com, eric.engestrom@imgtec.com Cc: Benjamin Gaignard Subject: [PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU Date: Wed, 12 Jul 2017 09:43:07 +0200 Message-Id: <1499845387-10394-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected do not compile and use get_fb_unmapped_area() if CONFIG_MMU is also set. This will avoid mmap errors when compiling multi architectures at same time. Signed-off-by: Benjamin Gaignard --- version 2: - remove duplicated "\" drivers/video/fbdev/core/fbmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 069fe79..f20c5d2 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1492,7 +1492,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, return 0; } -#ifdef CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA +#if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && !defined(CONFIG_MMU) unsigned long get_fb_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) @@ -1519,7 +1519,8 @@ unsigned long get_fb_unmapped_area(struct file *filp, .open = fb_open, .release = fb_release, #if defined(HAVE_ARCH_FB_UNMAPPED_AREA) || \ - defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) + (defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && \ + !defined(CONFIG_MMU)) .get_unmapped_area = get_fb_unmapped_area, #endif #ifdef CONFIG_FB_DEFERRED_IO