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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E9456C38A24 for ; Thu, 7 May 2020 07:27:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2B6320753 for ; Thu, 7 May 2020 07:27:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FUbL8mlR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2B6320753 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2E37vAtyhRpNx7XzChiAoQuHQLb7NjDb91ynCZvzV5w=; b=FUbL8mlRQBr9RG 7i4Tfxr0g1CPcBP91ubY5P9Mvz8oKr5aoHQJBIXapIZY9uBM1x2NrnUupYty1wDcomFKkNFrM5v4w V8YJC8eKHT+hJLoBqxoeJBHPkhkeH+1+4LizYTSRz2vG4RIjfmyDVuAPXP8KaXAtD8qSAnTmcIWsb XDjaZOWC0DESv9VNc/wYuwuoIynoY7RXK3GpEVYfZK3as7566Mi57sqwm3QuhFpBkElzejCSGvL/b Sta+0vcCaJcZPHwwJULpmskhPsxiUkyF+wkGFSQnHGPaahIITOMcDVbSq+uIf58n+6q2mFZz6N5HW UNqv2pdnaJBO88/Ke9RA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWawP-0002kI-44; Thu, 07 May 2020 07:27:33 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWawM-0002js-A2 for linux-arm-kernel@lists.infradead.org; Thu, 07 May 2020 07:27:31 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047722hI077189; Thu, 7 May 2020 03:27:19 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 30u8t10g2y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 03:27:18 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 04772G4j078293; Thu, 7 May 2020 03:27:18 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 30u8t10g22-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 03:27:18 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 0477OlOJ004251; Thu, 7 May 2020 07:27:16 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03ams.nl.ibm.com with ESMTP id 30s0g5tu12-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 07:27:16 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0477RDYu24445048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 07:27:13 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A7D33A405F; Thu, 7 May 2020 07:27:13 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D226AA4062; Thu, 7 May 2020 07:27:12 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.201.211]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 7 May 2020 07:27:12 +0000 (GMT) Date: Thu, 7 May 2020 10:27:11 +0300 From: Mike Rapoport To: Florian Fainelli Subject: Re: [PATCH 2/2] ARM: Allow either FLATMEM or SPARSEMEM on the multiplatform build Message-ID: <20200507072711.GB683243@linux.ibm.com> References: <20200506235009.25023-1-f.fainelli@gmail.com> <20200506235009.25023-3-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200506235009.25023-3-f.fainelli@gmail.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-07_02:2020-05-05, 2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 phishscore=0 suspectscore=2 clxscore=1011 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070050 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200507_002730_353812_CE7A7C07 X-CRM114-Status: GOOD ( 22.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Berger , Arnd Bergmann , sboyd@kernel.org, Kevin Cernekee , rmk+kernel@armlinux.org.uk, Gregory Fong , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 06, 2020 at 04:50:09PM -0700, Florian Fainelli wrote: > From: Gregory Fong > > ARMv7 chips with LPAE can often benefit from SPARSEMEM, as portions of > system memory can be located deep in the 36-bit address space. Allow > FLATMEM or SPARSEMEM to be selectable at compile time; FLATMEM remains > the default. > > This is based on Kevin's "[PATCH 3/3] ARM: Allow either FLATMEM or > SPARSEMEM on the multi-v7 build" from [1] and shamelessly rips off his > commit message text above. As Arnd pointed out at [2] there doesn't > seem to be any reason to tie this specifically to ARMv7, so this has > been changed to apply to all multiplatform kernels. > > [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-September/286837.html > [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-October/298950.html > > Cc: Kevin Cernekee > Tested-by: Stephen Boyd > Signed-off-by: Gregory Fong > Signed-off-by: Doug Berger > Signed-off-by: Florian Fainelli > --- > arch/arm/Kconfig | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 5986277296c3..7bb5264a9c3a 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -312,6 +312,8 @@ choice > config ARCH_MULTIPLATFORM > bool "Allow multiple platforms to be selected" > depends on MMU > + select ARCH_FLATMEM_ENABLE > + select ARCH_SPARSEMEM_ENABLE The logic in mm/Kconfig is quite convoluted, so selecting ARCH_SPARSEMEM_ENABLE will automatically make SPARSEMEM the only option. On top of this you would need to enable ARCH_SELECT_MEMORY_MODEL, e.g. something like: diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7bb5264a9c3a..b6eb1a28ca27 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -314,6 +314,7 @@ config ARCH_MULTIPLATFORM depends on MMU select ARCH_FLATMEM_ENABLE select ARCH_SPARSEMEM_ENABLE + select ARCH_SELECT_MEMORY_MODEL select ARM_HAS_SG_CHAIN select ARM_PATCH_PHYS_VIRT select AUTO_ZRELADDR @@ -1523,6 +1524,9 @@ config ARCH_FLATMEM_ENABLE config ARCH_SPARSEMEM_ENABLE bool +config ARCH_SELECT_MEMORY_MODEL + bool + config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM > select ARM_HAS_SG_CHAIN > select ARM_PATCH_PHYS_VIRT > select AUTO_ZRELADDR > @@ -1515,6 +1517,9 @@ config OABI_COMPAT > config ARCH_HAS_HOLES_MEMORYMODEL > bool > > +config ARCH_FLATMEM_ENABLE > + bool > + > config ARCH_SPARSEMEM_ENABLE > bool > > -- > 2.17.1 > -- Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel