Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3688243pxb; Sun, 7 Feb 2021 19:18:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwafrH6Cc62R5PzgwCHITTSDZkBMNE/ysUEOYcsktkZglgF9Zjjye4z/C3BaSgs+MjgzNwY X-Received: by 2002:a05:6402:3552:: with SMTP id f18mr14988274edd.111.1612754303345; Sun, 07 Feb 2021 19:18:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612754303; cv=none; d=google.com; s=arc-20160816; b=jagi7xTpnet0VitNnA/ms11rpZRny8ZTlufkjruuBmuMlUOKMtF/Zx4R1x4nXJSqAt DB3uJOSN5PbetGw2Y9ykdNZdLV2qvGdm43VzrHAc81Tj+qhHm5pPglwPNctv7CV/KqZ2 fQiIYTfZ6e1Fd9Fs1OMA+vwXiyEPezVvN6NEzfshlB/p1yv8U2u0PcUv7Zf9ttxEJ+0e kUW9JQ2++fN1Nsg34wdXTx+2Vrq9vWZwBnIvLLZqAw0DAducX1Qgv8HMoI/fjcob2MhS KKIclwE4lK0ODeiTKzz2PwycHHeu/P1pJE0NnM8Oe0pRGOK42kV3OEfDrQVCi6GO4BUK v/Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=LpDE5MKA0igbQobXPj75d7o0eSvngcC6eI75s/HLhxw=; b=fpBSv7LXbqby6BO3Ic1mRQBG/rkdhH50r/y36LBlbFYObL48KuHYVpgOREYn1NP3I2 t0ss/DZ+fXy2tjhF0K3LUXCRLU6uRi8byGM1jCn1ts27LsxlMP72T+/oGktcTfEi9YuI h+HEnnNRXF+9OFrYL+x1fDvgonInPZ3m9p8ivihxDiOFtjOmYbnRVjv3l5wLyZT8eUec MPlPvja/Z3z33eJzk8wQZFklZaHgRVqC2z/PujHI69dPZUZjcaBjBBdreuEVzOZJMdSk kaYUzL3JKt1gNj/INUB7P7ie8r4tevPejP/LAYd6n/kt9qqFBx0xEvhnh8KKFWfqFYTT 2zyg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m23si10277621ejc.322.2021.02.07.19.17.59; Sun, 07 Feb 2021 19:18:23 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbhBHDRY (ORCPT + 99 others); Sun, 7 Feb 2021 22:17:24 -0500 Received: from foss.arm.com ([217.140.110.172]:55294 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbhBHDRX (ORCPT ); Sun, 7 Feb 2021 22:17:23 -0500 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 9B1061FB; Sun, 7 Feb 2021 19:16:37 -0800 (PST) Received: from [192.168.0.130] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E46963F719; Sun, 7 Feb 2021 19:16:31 -0800 (PST) Subject: Re: [PATCH] mm/memtest: Add ARCH_USE_MEMTEST To: Vladimir Murzin , linux-mm@kvack.org Cc: Chris Zankel , Thomas Bogendoerfer , Benjamin Herrenschmidt , Michael Ellerman , linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Russell King , linux-mips@vger.kernel.org, Max Filippov , Ingo Molnar , Paul Mackerras , Catalin Marinas , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org References: <1612498242-31579-1-git-send-email-anshuman.khandual@arm.com> From: Anshuman Khandual Message-ID: Date: Mon, 8 Feb 2021 08:47:01 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/5/21 2:50 PM, Vladimir Murzin wrote: > Hi Anshuman, > > On 2/5/21 4:10 AM, Anshuman Khandual wrote: >> early_memtest() does not get called from all architectures. Hence enabling >> CONFIG_MEMTEST and providing a valid memtest=[1..N] kernel command line >> option might not trigger the memory pattern tests as would be expected in >> normal circumstances. This situation is misleading. > > Documentation already mentions which architectures support that: > > memtest= [KNL,X86,ARM,PPC] Enable memtest > > yet I admit that not all reflected there But there is nothing that prevents CONFIG_MEMTEST from being set on other platforms that do not have an affect, which is not optimal. > >> >> The change here prevents the above mentioned problem after introducing a >> new config option ARCH_USE_MEMTEST that should be subscribed on platforms >> that call early_memtest(), in order to enable the config CONFIG_MEMTEST. >> Conversely CONFIG_MEMTEST cannot be enabled on platforms where it would >> not be tested anyway. >> > > Is that generic pattern? What about other cross arch parameters? Do they already > use similar subscription or they rely on documentation? Depending solely on the documentation should not be sufficient. > > I'm not against the patch just want to check if things are consistent... Not sure about other similar situations but those if present should get fixed as well.