From patchwork Tue Nov 3 20:32:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 316767 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=-12.8 required=3.0 tests=BAYES_00,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, USER_AGENT_GIT autolearn=unavailable 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 93407C4742C for ; Tue, 3 Nov 2020 22:06:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F70E21556 for ; Tue, 3 Nov 2020 22:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604441174; bh=Bj8LSiMZRQVLtlb3hBMRZPTWT1vNBA/ozfgaMs8Rr00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BqbBf/Uj0f1iB2fbcC+87nn7zR9IZ4yeR5I/3Ry86wrQCx3UzpVm/LTa/TU6NrHNc XJY2nwCYZF8dLyOmmQ8P8wupJGkGA5wouQBhkVeJp+MthDueATsj6ULFAXVr9f3n61 moQ5I9i4bnn0PF9eIkPTyBvsoNCuE2XUeZAPhY04= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730417AbgKCUlq (ORCPT ); Tue, 3 Nov 2020 15:41:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:53708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730420AbgKCUlp (ORCPT ); Tue, 3 Nov 2020 15:41:45 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22016223AB; Tue, 3 Nov 2020 20:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604436105; bh=Bj8LSiMZRQVLtlb3hBMRZPTWT1vNBA/ozfgaMs8Rr00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r/H8RZI54PQwjPgzV/tkcB9IxIpt23KgpM4xbUmrkVPM1p3zpaKBdtYNm1W/meAnR AdhozAzFCdceXf5RranAN2Wb3YRfopHRW0Hg1QneuYiVZnITA8xuBJuPYnu3pKX5FX 66PIErqgFnPu90qT+uuuw55/I3Hzs7/7iSZqBdeU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman , Sasha Levin Subject: [PATCH 5.9 098/391] selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac Date: Tue, 3 Nov 2020 21:32:29 +0100 Message-Id: <20201103203353.472365895@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203348.153465465@linuxfoundation.org> References: <20201103203348.153465465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Michael Ellerman [ Upstream commit 34c103342be3f9397e656da7c5cc86e97b91f514 ] These platforms don't show the MMU in /proc/cpuinfo, but they always use hash, so teach using_hash_mmu() that. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-1-mpe@ellerman.id.au Signed-off-by: Sasha Levin --- tools/testing/selftests/powerpc/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/utils.c b/tools/testing/selftests/powerpc/utils.c index 18b6a773d5c73..638ffacc90aa1 100644 --- a/tools/testing/selftests/powerpc/utils.c +++ b/tools/testing/selftests/powerpc/utils.c @@ -318,7 +318,9 @@ int using_hash_mmu(bool *using_hash) rc = 0; while (fgets(line, sizeof(line), f) != NULL) { - if (strcmp(line, "MMU : Hash\n") == 0) { + if (!strcmp(line, "MMU : Hash\n") || + !strcmp(line, "platform : Cell\n") || + !strcmp(line, "platform : PowerMac\n")) { *using_hash = true; goto out; }