Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp189119pxu; Wed, 2 Dec 2020 19:21:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJydx38mPIVoIVGSVRuQqIRkDBCx/rKLm/EGxFwjWvjXwBwjo3HkL5kiqyk7C6h9ZVyQXM4I X-Received: by 2002:a17:906:1945:: with SMTP id b5mr828105eje.388.1606965690051; Wed, 02 Dec 2020 19:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606965690; cv=none; d=google.com; s=arc-20160816; b=a00gAYpq6mOqIJrsxxlUu36FmtJ63BKyJ4ngjE+OB1VshNmLx3QDWvyTX8U9cDztex ZpMuAmEZkkWV3kSFnMiHwG5KKE9bz1cKYIp2ugmaMqcQL3BVjf4L9A7IvcbA9ZOx49P7 eY7Sz5tGd78Ppe7v2jUqzRh7Jp1NNloWZnV1D4VFfD+sXYI4yWrFkp4WSnn7QydbSaD6 vZIV/Tno/1+oI/VSlBt5gXFwIS9myWKEbgbV69krDiopMNwWHrQy01H0EuuYWgdajIK7 7URlZ4GKY8saqlLlv0Vwdy2Thdg4KLeGvVJO3o9qZi4LC/cQXA1AkYuc4pgK40JOrEYR HTFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=auyvYJJcEG+QKzcQqbtg5Fk1JdOQlSCpBRrCD+8TREI=; b=yfeYpQaLcTX+Az1ipT6ojFppqxqnnkjaupqx0b/ydT0Cwb9N4MwFu0lJRtRsSGLcd4 jF66LdBIs5VEldODMRfPRlp+Z+EBLs3atZWJPuxfu/yFanRi8mwR/wYLCrEFsVCMps5W MtNgA2Tpq22R8zrqDnqaK5U22Q3gss2y8AdlAPqApUodT/tDw9TDUkOSjsMEsbUSKr8c pJnjoMZ9eWUDuLFehKapdAs6o9jldR0/NKfZgVYhylIZ57M3XOgDsrrN1KBcmaj4olCz +4FRnlUIJcbdkLXZ6j1WKSUJfoqp5/D27Gny3RGXBph0bFyFUVzYw5XoeyRO3XAnWPkT wWgA== 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 h19si367359ejy.455.2020.12.02.19.21.06; Wed, 02 Dec 2020 19:21:30 -0800 (PST) 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 S1729654AbgLCDTt (ORCPT + 99 others); Wed, 2 Dec 2020 22:19:49 -0500 Received: from mail.loongson.cn ([114.242.206.163]:43146 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729538AbgLCDTs (ORCPT ); Wed, 2 Dec 2020 22:19:48 -0500 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxv9MoWchfqUYZAA--.49875S4; Thu, 03 Dec 2020 11:19:06 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li Subject: [PATCH 2/2] MIPS: Select ARCH_KEEP_MEMBLOCK to enable sysfs memblock debug Date: Thu, 3 Dec 2020 11:19:04 +0800 Message-Id: <1606965544-22611-3-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1606965544-22611-1-git-send-email-yangtiezhu@loongson.cn> References: <1606965544-22611-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9Dxv9M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gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUza0QUUUUU= X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the current code, CONFIG_ARCH_KEEP_MEMBLOCK is not set for MIPS arch, memblock_discard() will discard memory and reserved arrays if they were allocated, select ARCH_KEEP_MEMBLOCK to give a chance to track "memory" and "reserved" memblocks after early boot, with this patch, we can see the following two sysfs interfaces under DEBUG_FS. /sys/kernel/debug/memblock/memory /sys/kernel/debug/memblock/reserved Signed-off-by: Tiezhu Yang --- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 44a47ad..f65da197 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -9,6 +9,7 @@ config MIPS select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI) select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_UBSAN_SANITIZE_ALL + select ARCH_KEEP_MEMBLOCK select ARCH_SUPPORTS_UPROBES select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF if 64BIT -- 2.1.0