From patchwork Mon Jul 10 14:48:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 107302 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3520601qge; Mon, 10 Jul 2017 07:49:14 -0700 (PDT) X-Received: by 10.84.129.71 with SMTP id 65mr18871176plb.183.1499698154859; Mon, 10 Jul 2017 07:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499698154; cv=none; d=google.com; s=arc-20160816; b=LX0mSQO3Gdm7LjEcUmto84c2rCAmnE5benCLLBXOCGT8Tkep4iDcNR9Zvf9OA6K592 uxy0T6bhOKnAUHaEIoVy5EXA9nulALZBqAFGL4YhR0l2ifLvYBLNUckd1WDNe4BrC8hh H0Mgdu4DGmv+0XbbBpAu1uiQSwlJrKXv+K/zM2PcunSjBduER/LaWkam7gNd3LJOHqhA 9ZW7UWh7uz466e90WQmF7AhuS3LzTP/t+WZMhUIypNY51seRdkXeLq7lHEK+sdxxDcws CKEQKmglwzDKtln4PNHO4Sn9kMZd1XX0txhiBhJONQefjpBKW7Viguh+BWngt9mEt7GW xRdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=EpjHaNE/+9h7jDp2yxuxuNmgAWMkyaJErc0Qun4L7ak=; b=lEY3ylE38vqDJrlvxsLqzoN/7/dutZYvPktY65DzLxXTkgO5/9RYUwd+6aX9/iPPmC P2/q0PB+Mg8oqJrLP5lYrAZ+zEXSCqOrAXWzeXbRvDnmnx+MIJAhyhHV6l1ccVinTOfW TYdheqAciCA7iAW82ZWgH1OeuyLYk056IzQGKBDCIxPMEVlyKNN1OGiXGmOnvgrZpCLm A7xjSdjWvWfjNRqMCnL1rkgnnHgnfXZ5LD3QRHNOq+naVGRKLK/z7K7yhpEfUegg9M4C X8vRPbia16icz72Rhh/YQDUlB31Mcz302yOMxQ1uj421HkPQRydhNQ1yngFVZVJHh5OK fqfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=ZgXpMF4I; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id p6si5540933pfj.417.2017.07.10.07.49.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 07:49:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=ZgXpMF4I; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9C8F6E153; Mon, 10 Jul 2017 14:49:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D9196E153 for ; Mon, 10 Jul 2017 14:49:11 +0000 (UTC) Received: by mail-wr0-x234.google.com with SMTP id k67so141450122wrc.2 for ; Mon, 10 Jul 2017 07:49:11 -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=HyVluSqHaJCl9iDPE9zGQDTgPrYCoJDSzyuUa65JcMM=; b=ZgXpMF4I46wQwQeEQaTWAqtGECDADrb+RL1FG+A8rG56VADsqLoDKz3npukunTzQGb UVEaWN6m75YhvXAH8gyXl2Hyg9qf3fiD0CDoOhWwFWrT+hEuyy3RQwvobGekvBI+xrya lKSKzJgHK7a0OnovErnJIs21TBL9bupJq+GLQ= 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=HyVluSqHaJCl9iDPE9zGQDTgPrYCoJDSzyuUa65JcMM=; b=p8MFVZqNv9J4WnmfOrLcz4OQAGroBgV1j0hHnd6s2M5RafWwyuOBMXtaZBoF+5nAE3 OgyJl+1yGjkwHBT1A418DiCirscn0y24HwDZrL/z9bdElDkIY1BqVgPXRlGT174/0KfS 3dE5TMBhXipScLm8exCOGIybtKR7PBEaOPJfhLW8pX3K8jeHXSzzznRuHZd94e/3r2pl /osDTnzt8yt3dElUzmb+0Rp6Us7ZjUY60HD0kheM+DCKvAd1YSG7+M/BUrTv/ddE5yeT VXKetelpUQ1aBCd6l64fGnKMXXtBlPUy+5WlnDAZUdupVhzXu3T6s8EbtX7/+KA+wt1f Tj2g== X-Gm-Message-State: AIVw113FJhJ7PyLetkqyz5wZutStepKXlfMpJaKNfGZGJ0rHRN7PNBrX wYkRg8lN1F+bg/xk X-Received: by 10.223.171.146 with SMTP id s18mr8583207wrc.38.1499698149876; Mon, 10 Jul 2017 07:49:09 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.173.155]) by smtp.gmail.com with ESMTPSA id i136sm7924813wmf.33.2017.07.10.07.49.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 07:49:09 -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 Subject: [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU Date: Mon, 10 Jul 2017 16:48:55 +0200 Message-Id: <1499698135-24526-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- drivers/video/fbdev/core/fbmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 069fe79..16b5aef 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