From patchwork Wed May 6 23:50:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 11532051 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B93481 for ; Wed, 6 May 2020 23:51:50 +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 1A0742075A for ; Wed, 6 May 2020 23:51:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="K5vaRCXG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tLmNih9w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A0742075A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=G8csNRY4+5SVlBgJ2Q23ECPdiBQXiQ/iJq57x8nvrJk=; b=K5vaRCXGYgRN2Dn8vlWSV7TFgb 3jfSddCv7ZHujqfg2VyRzL7yKLElWWd3C/JFSjmtlEezBtgP2ShNrdWs3drIYO1PYgyviidpqzc6l W8/GcEdffEuIAGQdjy/kz90kMj+qJnPL7C6aEPkZfMK2xioTHBU5MVkrOEQcqbtHGbCHPqzvYYcMt leFQhDQc4ir1FXUS3/1DG4OQzAQrYd8yzedRUioGNUajfubrRyUTV5OwR+LosJzlUKfTTd7ZiUT8f Q++oaVn4ylXKAMjDNsl7mwLxwR6ME9Ta8PVy37KlHD0fs2Ab05sIdR2uSIsfuvhc91DM1kTUPZv8Q qQmjGV1g==; 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 1jWTpJ-0000GO-NJ; Wed, 06 May 2020 23:51:45 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWTp8-0008TW-0X for linux-arm-kernel@lists.infradead.org; Wed, 06 May 2020 23:51:35 +0000 Received: by mail-wm1-x342.google.com with SMTP id x25so4394467wmc.0 for ; Wed, 06 May 2020 16:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ltGioWcYxUH4N8+ZRYzzTejLF96hqh5RHCyUIqstWAY=; b=tLmNih9wiY2CWcjFxudlYQuX6H3Kf4bfNZbbmHJKhKgYL+WQFI2N+jYIo6mL0LX0fV ogZVhc/NnpYvgwzEl8D0qyO4rYPaRKJ9j1D7PxNlndIlJ3T8Pyqg9m8EXZKnHKalK2Sg dRM8cD8FO6DfPxmpMdEezaGB6ATaKwGkUPDsCtdvvRyuBCWdc+FRl3+K9oy4GWB5lGpk XcCjSQ+Qo/22jMeTY/oFX8foJfYJRXrC1dggnMBahu/BRpqzyOwgwvP0/BrROAt8lnIt BAGrEf3pxOZojPAD0SKsjyHuEiHyTBpjiS6G/r/jtXPO4XDlrfZxLNe1+ct4k7R7zja7 8Fzw== 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:in-reply-to :references; bh=ltGioWcYxUH4N8+ZRYzzTejLF96hqh5RHCyUIqstWAY=; b=HmHCUSXIHxcgKY2DPsYi0Li/7rl8QoGIRL6ginwK15LH2Ho3KVuTgXsimVGU0S0nXj lqChRZORf5Fpki+rAUZ9pZ+rULCIVU5JA7NJRFSjaXlOKRiVFTaE+eKHjPGnImKPDIz6 Mg9pkg38Y3qzZXv2JxQAlF9IwnmvvVTdZBWqQdth9Ltp4gPpt9UsT8j54dOdQCSK7k9D zH+aDTHBXa5OSTZ/EZMmnv/D/+Zr2XnhioEp/5p7cXQm7vh3RoT+lQ8OAZzgxuLkY+8I en3Sp4b3iERyVFlZZ4vlSGSh0xPto9w7ytECMpavpP31/xW61OjF70gNbUghRfTiHKk+ 9Q5w== X-Gm-Message-State: AGi0PuYwbVB8zvVmkRzpM3NHfT0qV+QGh8dM4Kz7B6wj+iF/1XUqD2wE oHP8sdOG+tGbtTzuhnvywIN90g0T X-Google-Smtp-Source: APiQypIRNUWPoKZfJRvKeY1tuTmoKgwnoco8aUv+s3MsXUO7VI6LJklbO0NLJWK77vnimYoE5rk9tw== X-Received: by 2002:a1c:9cc6:: with SMTP id f189mr6972476wme.75.1588809092307; Wed, 06 May 2020 16:51:32 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id b20sm3693161wme.9.2020.05.06.16.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 16:51:31 -0700 (PDT) From: Florian Fainelli To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] ARM: Remove redundant ARCH_SPARSEMEM_DEFAULT setting Date: Wed, 6 May 2020 16:50:08 -0700 Message-Id: <20200506235009.25023-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200506235009.25023-1-f.fainelli@gmail.com> References: <20200506235009.25023-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200506_165134_050700_EE37A146 X-CRM114-Status: GOOD ( 12.17 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:342 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [f.fainelli[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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 , Mike Rapoport , rmk+kernel@armlinux.org.uk, Florian Fainelli , Gregory Fong MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Kevin Cernekee If ARCH_SPARSEMEM_ENABLE=y and ARCH_{FLATMEM,DISCONTIGMEM}_ENABLE=n, then the logic in mm/Kconfig already makes CONFIG_SPARSEMEM the only choice. This is true for all of the existing ARM users of ARCH_SPARSEMEM_ENABLE. Forcing ARCH_SPARSEMEM_DEFAULT=y if ARCH_SPARSEMEM_ENABLE=y prevents us from ever defaulting to FLATMEM, so we should remove this setting. Link: https://lkml.org/lkml/2015/6/4/757 Signed-off-by: Kevin Cernekee Tested-by: Stephen Boyd Acked-by: Arnd Bergmann Signed-off-by: Gregory Fong Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Reviewed-by: Mike Rapoport Tested-by: Florian Fainelli --- arch/arm/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 66a04f6f4775..5986277296c3 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1518,9 +1518,6 @@ config ARCH_HAS_HOLES_MEMORYMODEL config ARCH_SPARSEMEM_ENABLE bool -config ARCH_SPARSEMEM_DEFAULT - def_bool ARCH_SPARSEMEM_ENABLE - config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM From patchwork Wed May 6 23:50:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 11532053 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FA2B81 for ; Wed, 6 May 2020 23:52:07 +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 210702075A for ; Wed, 6 May 2020 23:52:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FfEybLpC"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="apPwHFu1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 210702075A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=j4qxVJCd2BZD5YTKIPw7qJw8/9FoXQMsoaYQqR2kfgo=; b=FfEybLpCnnqLQXViYXGw90FDHq jf7GAhnkCiSl5UQwrGHD9rbprtB3zPBMbEFh9nclBIgBuiUeMPdQz+OVgpnaqRHIiThgk1Nc4RGPn yHzDp293sfDZ+X3V/yIfx5s/YA38GaHbL4LLDJj9gp4g45Biuh3CZau5ZVVB51uQdgkr4PYZKmkob NqUWhwvJQ78XwYiKK/BrO2HiF3GJVB3B7H8+lt/UH2dzETYYCCY63IdtVHjj5+klFhn3Ss3SexC1o q+PsrJb85lX5QZvLs5fg6mWIZ2fvOIP7Y378CLwhFi2a5P+/1oc7RiEWPsFiSdNSyOPcyhpTdfQ7o yJTlePtA==; 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 1jWTpX-0000Vv-VA; Wed, 06 May 2020 23:51:59 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWTpA-0008VH-RV for linux-arm-kernel@lists.infradead.org; Wed, 06 May 2020 23:51:38 +0000 Received: by mail-wm1-x344.google.com with SMTP id u127so4660215wmg.1 for ; Wed, 06 May 2020 16:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=L6lgwXPpMh2GtBwOjnERxrnC7AaO1OA7jICyPp9jmNs=; b=apPwHFu1P6UNTbkrrbtI543/u8/jdj8sEUqcw4VRCQcGNWrcanVwuKrxIH3yQKYLaL yUGDZTRCazWcVb5fUZjRZ2P7vtfwNAjDY6s8LEuzu0IAwBfYzmZM1s5mu/+lhnDuaASN RsX+UQTtK5JyHQppY/VH6xVcft7bkEKPKSk2+VAaPbtxtj6zJYMsPb/g+bE7fxSLxaBW OARDyCpFXVj1qxTHAS/Ec1KgGRjcyGaeSOuk6WnUrE8jJtWHO3oKcCZEoaVqRDeqlqdO HVieYTwmnC+Hr10RXk5222q1qxSC24sBBR7k7UY9uMyYaPdAOj+BMTCZcXe/zQQ4wA+f zdSw== 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:in-reply-to :references; bh=L6lgwXPpMh2GtBwOjnERxrnC7AaO1OA7jICyPp9jmNs=; b=qaATxe9Z55Lc+8Z5bJoYkM9Bh1AnryYn+Br3pScyEIsq6QFff7XAG4/Vb15CH0kDAZ e4U14I0VVHYB0iZ+ZmUnLSV6TGPhYOJC7wkUfRQ/uRIsWzPeZR3fdZ4pCYJ0SFM3Q1to heceau4waBvDul3lNJ/y62GBqUeEgdHmsQ4sJOO/iBGZkKu4QtFnWzmkbEGoyB9dnwZ7 /hqkvJGgTXZXxqRiZ0068tlrf9PvEohYByRaGmDxgKSQFYpWxPzc06V9N+Q0iSGMfW3U MGueLZbUccudDq0OTPIl8+oa99tLVMRW9hfQtHjFdNW0gfk8neTLEnODDr+ziAqTeXWr LHKQ== X-Gm-Message-State: AGi0PuaROFRLquSKCUKeyY7+5fk9C9PD9VMdzQtFiHvfrfy3bwLO/2QW lxwsmeth9B+xxWSsspsj5lEl1cfn X-Google-Smtp-Source: APiQypK2VMD1eXgHEZ9tdRtcyCXbhsFg4EUcUl9jgjtMdK4mscTZ7/kWpHqrDiPB1AVGlnnWgrDLJQ== X-Received: by 2002:a1c:44b:: with SMTP id 72mr7010886wme.58.1588809094835; Wed, 06 May 2020 16:51:34 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id b20sm3693161wme.9.2020.05.06.16.51.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 16:51:34 -0700 (PDT) From: Florian Fainelli To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: Allow either FLATMEM or SPARSEMEM on the multiplatform build Date: Wed, 6 May 2020 16:50:09 -0700 Message-Id: <20200506235009.25023-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200506235009.25023-1-f.fainelli@gmail.com> References: <20200506235009.25023-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200506_165136_909355_65B32EF4 X-CRM114-Status: GOOD ( 13.42 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [f.fainelli[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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 , Mike Rapoport , rmk+kernel@armlinux.org.uk, Florian Fainelli , Gregory Fong MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Tested-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 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