Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp587252ybt; Sat, 13 Jun 2020 14:27:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTnujwhzxFaAzJqw7/6M0CC2lKQRX7Wb4krSWp2xexw2CxRMPWnsIYG6yzATPIJ26xx+pN X-Received: by 2002:a17:906:fa03:: with SMTP id lo3mr19679527ejb.196.1592083664792; Sat, 13 Jun 2020 14:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592083664; cv=none; d=google.com; s=arc-20160816; b=CPQNzDf2VjXKsX/EUwLcQ82QGpHNYHa1msYoc0R4cAhtDU5ebX9NeSRtO7uAKogMKW JP+xK7IVskHeasbjntjYjIMvcKam2kGgeg9/WOD305YpXYactFxeRJADMk8Msido8Rjr jQUwa5kPJUTVsCukQwybCqS5CYDPKTkY4ULjflEFl/59u/QqWhFZF9hLYlDFbybjYsVJ TfBj9Bw1EWEwHxUkHNJ99jUjJpUSEN0h437Ppfrii9zZEAhkfJejMn/8+gy2BOCB7Rsh VAiowTw+jFZb2ZhfXgyrlxB75hZZ+s/qro5bKYuIKWNF3q0Oi5RrE7O+WLfcNc1vYM5f 1nkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from; bh=oqjC4WvGkUJ2KKeYxXUJpSLilTIQVG/VkM6KsrXlplo=; b=nQ7QjQTB/Z3Xqlj9OXFTmhRog+EPW4G1nudqmPrSu+o+oCJvemzd3gUZX1EiAgFjZ4 vLyuvZE6USLOsJio1NCp61+3VGnQyNCjSpx/6lbyfKsYcZlQMsn1b/lQUQ4CtTrIsnHV vGZ0cCbk2YNrds5efVfv87nxLpJ1ESvwls+P4UnFRpcp62O7JZydquKLHXK84sg+fPNZ fSvO/Sk0vG01/0V7rs02GP08/QOaVl9AryfawWflgrNTDx+fJNsLuIqdcX2z4c4NOWlo 4zoA3fwjnQJD1ZNZrK9WQVygRZNpq5qprzpRt9c/vguQsLcRCtIej+DRpdr/hHwFLiJH /xKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si6947680edn.437.2020.06.13.14.26.51; Sat, 13 Jun 2020 14:27:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726709AbgFMVUf convert rfc822-to-8bit (ORCPT + 99 others); Sat, 13 Jun 2020 17:20:35 -0400 Received: from ispman.iskranet.ru ([62.213.33.10]:33166 "EHLO ispman.iskranet.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbgFMVUf (ORCPT ); Sat, 13 Jun 2020 17:20:35 -0400 Received: from himel (121.253.33.171.ip.orionnet.ru [171.33.253.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: asolokha@kb.kras.ru) by ispman.iskranet.ru (Postfix) with ESMTPSA id 927FE8217A3; Sun, 14 Jun 2020 04:20:27 +0700 (KRAT) From: Arseny Solokha To: Christophe Leroy Cc: Arseny Solokha , Michael Ellerman , Jason Yan , , Scott Wood , Christophe Leroy , , Subject: Re: [PATCH] powerpc/fsl_booke/32: fix build with CONFIG_RANDOMIZE_BASE References: <20200613162801.1946619-1-asolokha@kb.kras.ru> <754d31be-730b-8f18-4ead-ba2f303650d0@csgroup.eu> Date: Sun, 14 Jun 2020 04:20:25 +0700 In-Reply-To: <754d31be-730b-8f18-4ead-ba2f303650d0@csgroup.eu> (Christophe Leroy's message of "Sat, 13 Jun 2020 19:28:19 +0200") Message-ID: <87imfupsrq.fsf@himel> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Le 13/06/2020 à 18:28, Arseny Solokha a écrit : >> Building the current 5.8 kernel for a e500 machine with >> CONFIG_RANDOMIZE_BASE set yields the following failure: >> >> arch/powerpc/mm/nohash/kaslr_booke.c: In function 'kaslr_early_init': >> arch/powerpc/mm/nohash/kaslr_booke.c:387:2: error: implicit declaration >> of function 'flush_icache_range'; did you mean 'flush_tlb_range'? >> [-Werror=implicit-function-declaration] >> >> Indeed, including asm/cacheflush.h into kaslr_booke.c fixes the build. >> >> The issue dates back to the introduction of that file and probably went >> unnoticed because there's no in-tree defconfig with CONFIG_RANDOMIZE_BASE >> set. > > I don't get this problem with mpc85xx_defconfig + RELOCATABLE + > RANDOMIZE_BASE. Ah, OK. So the critical difference between mpc85xx_defconfig and our custom config is that the former sets CONFIG_BLOCK while ours doesn't. Then we have the following dependence chain: arch/powerpc/mm/nohash/kaslr_booke.c include/linux/swap.h include/linux/memcontrol.h include/linux/writeback.h include/linux/blk-cgroup.h include/linux/blkdev.h #ifdef CONFIG_BLOCK #include #endif include/linux/pagemap.h include/linux/highmem.h arch/powerpc/include/asm/cacheflush.h and that's how the latter doesn't get included in arch/powerpc/mm/nohash/kaslr_booke.c, because in our config CONFIG_BLOCK is not defined in the first place. Arseny > Christophe > >> >> Fixes: 2b0e86cc5de6 ("powerpc/fsl_booke/32: implement KASLR infrastructure") >> Cc: stable@vger.kernel.org >> Signed-off-by: Arseny Solokha >> --- >> arch/powerpc/mm/nohash/kaslr_booke.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/powerpc/mm/nohash/kaslr_booke.c b/arch/powerpc/mm/nohash/kaslr_booke.c >> index 4a75f2d9bf0e..bce0e5349978 100644 >> --- a/arch/powerpc/mm/nohash/kaslr_booke.c >> +++ b/arch/powerpc/mm/nohash/kaslr_booke.c >> @@ -14,6 +14,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >>