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=-10.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,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 5B9AFC433B4 for ; Thu, 22 Apr 2021 03:08:49 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 1493061404 for ; Thu, 22 Apr 2021 03:08:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1493061404 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: Cc:To:Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Dh5wTpgmEKNhPkM+ttiXriTpBb1vc6PuD3pRFvS9nHY=; b=EkaNgqzFQfjws25ZB0gMUUdmv aneOAIriOCdfSvgpPh61uRW92ifxwGPHYH6WDtVj2oKcsxV4uU48LwS4Hn/4LY8X/VCuWwu1zTEVR JzkBVmtHGJnGxnU++zHLWXa2I8d8R2FmUu8u/u8ZiHsZ+MU7bSNmX3UdvFrvEF+X9wofJ79pB7YeM wrvyaGBil2+IERMrokG60B0n85ulsTp8Su0VkwzMRs/rby6v04nQ3i0ufMC+yeFhUIUvnhcECBBI+ WMt+bVoqIbhfhW9hM1HfttoYX2IB7+IAcuO8eualo7R7ggbrQSrE4/XQsjEF9rSlpSmdHOxQcId6x HbkjkvpSA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZPcv-00FfI2-A4; Thu, 22 Apr 2021 03:03:37 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZPcs-00FfHV-5a for linux-arm-kernel@desiato.infradead.org; Thu, 22 Apr 2021 03:03:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:References:Cc:To: Subject:From:Sender:Reply-To:Content-ID:Content-Description; bh=oTS5sPLdM+Iw7x4vOQ0empmRvbQNHOYLfCV8kgMV3Ko=; b=YMq7Ei/71XKDlqF2hKJzK7YK4h t7ogLQwIGuVJ3CwpLKWjN9sEGCzxHylyY1bmBCMvht47GfJfEt4fSQj6enpHMtHGvsSfYkwTNaLYn phiLkaKKRr2FmKDukSTnZTgVbzDDOygeRi3i5WaDB4BqALotWBQufG+5oGj99c+1I+wzdb9i0hxtT jEzEAHxQTlM2eRElxArLJERJcpZ69eR93LVuIiw60mqgOVd23h/XZeY4PO2KUj57HBdDb6dgQpfN4 uNkALXrJDZr5M7RPXoDoE0rwR7snot39yt4k6DDfC/yr7qxHzDvrB0n6W5ls6WIEJ3PUNzKb7rn6p S9HIvERA==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZPcm-00DKg2-4N for linux-arm-kernel@lists.infradead.org; Thu, 22 Apr 2021 03:03:30 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 10EC811FB; Wed, 21 Apr 2021 20:03:25 -0700 (PDT) Received: from [192.168.0.130] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D6CC23F774; Wed, 21 Apr 2021 20:03:22 -0700 (PDT) From: Anshuman Khandual Subject: Re: [PATCH] arm64: Force SPARSEMEM_VMEMMAP as the only memory management model To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Marc Zyngier , Mark Rutland , Will Deacon References: <20210420093559.23168-1-catalin.marinas@arm.com> <20210421130235.GC18635@arm.com> Message-ID: Date: Thu, 22 Apr 2021 08:34:10 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210421130235.GC18635@arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210421_200328_248604_2B67D796 X-CRM114-Status: GOOD ( 15.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/21/21 6:32 PM, Catalin Marinas wrote: > On Wed, Apr 21, 2021 at 10:18:56AM +0530, Anshuman Khandual wrote: >> On 4/20/21 3:05 PM, Catalin Marinas wrote: >>> diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h >>> index b943879c1c24..15018dc59554 100644 >>> --- a/arch/arm64/include/asm/memory.h >>> +++ b/arch/arm64/include/asm/memory.h >>> @@ -329,7 +329,7 @@ static inline void *phys_to_virt(phys_addr_t x) >>> */ >>> #define ARCH_PFN_OFFSET ((unsigned long)PHYS_PFN_OFFSET) >>> >>> -#if !defined(CONFIG_SPARSEMEM_VMEMMAP) || defined(CONFIG_DEBUG_VIRTUAL) >>> +#if defined(CONFIG_DEBUG_VIRTUAL) >> >> A small nit. Should this be #ifdef CONFIG_DEBUG_VIRTUAL instead ? > > Yeah, for consistency I changed it to #ifdef. > >> This is >> an user selectable config and the conditional check here does not have an >> #elseif part either. But then there are similar such instances else where >> on arm64 platform as well. > > I'm not sure I get it. What would an #elseif need to check? We already > have an #else block for this #ifdef. IIUC #elif always requires a defined() construct. In such cases #if defined() might be preferable, in order to match the subsequent #elif. The point being, in this particular case there is no #elif which would have probably justified a preceding #if defined() construct though #ifdef is preferred. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel