From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CCC7C83004 for ; Wed, 29 Apr 2020 11:54:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A3D42087E for ; Wed, 29 Apr 2020 11:54:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726760AbgD2Ly2 (ORCPT ); Wed, 29 Apr 2020 07:54:28 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:43740 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbgD2Ly1 (ORCPT ); Wed, 29 Apr 2020 07:54:27 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id AFEC4804EF; Wed, 29 Apr 2020 13:54:19 +0200 (CEST) Date: Wed, 29 Apr 2020 13:54:17 +0200 From: Sam Ravnborg To: Bartlomiej Zolnierkiewicz , Christoph Hellwig Cc: Stephen Rothwell , kbuild test robot , Daniel Vetter , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] video: fbdev: controlfb: fix build for COMPILE_TEST=y && PPC_PMAC=y && PPC32=n Message-ID: <20200429115417.GA12801@ravnborg.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=MOBOZvRl c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=kj9zAlcOel0A:10 a=rOUgymgbAAAA:8 a=QyXUC8HyAAAA:8 a=7gkXJVJtAAAA:8 a=hD80L64hAAAA:8 a=TBqdQqTh5Vb_MQszC5cA:9 a=CjuIK1q_8ugA:10 a=MP9ZtiD8KjrkvI0BhSjB:22 a=E9Po1WZjFZOl8hwRPBS3:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bartlomiej. On Wed, Apr 29, 2020 at 12:48:24PM +0200, Bartlomiej Zolnierkiewicz wrote: > > powerpc allyesconfig fails like this: > > drivers/video/fbdev/controlfb.c: In function 'controlfb_mmap': > drivers/video/fbdev/controlfb.c:756:23: error: implicit declaration of function 'pgprot_cached_wthru'; did you mean 'pgprot_cached'? [-Werror=implicit-function-declaration] > 756 | vma->vm_page_prot = pgprot_cached_wthru(vma->vm_page_prot); > | ^~~~~~~~~~~~~~~~~~~ > | pgprot_cached > drivers/video/fbdev/controlfb.c:756:23: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct '} from type 'int' > > Fix it by adding missing PPC32 dependency. Is this really the right fix? Short term I htink it is OK, but I think there should be a common way to do the same for all archtectures so no conditional compilation is needed. In other words the use of pgprot_cached_wthru looks like we need a better abstraction. Added Christoph to the mail as he has a good overview of the area. Sam > > Fixes: a07a63b0e24d ("video: fbdev: controlfb: add COMPILE_TEST support") > Reported-by: Stephen Rothwell > Reported-by: kbuild test robot > Cc: Sam Ravnborg > Cc: Daniel Vetter > Signed-off-by: Bartlomiej Zolnierkiewicz > --- > v2: fix implicit btext_update_display() function declaration error > > drivers/video/fbdev/controlfb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: b/drivers/video/fbdev/controlfb.c > =================================================================== > --- a/drivers/video/fbdev/controlfb.c > +++ b/drivers/video/fbdev/controlfb.c > @@ -55,7 +55,7 @@ > #include "macmodes.h" > #include "controlfb.h" > > -#ifndef CONFIG_PPC_PMAC > +#if !defined(CONFIG_PPC_PMAC) || !defined(CONFIG_PPC32) > #define invalid_vram_cache(addr) > #undef in_8 > #undef out_8