From patchwork Wed May 20 23:46:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 225512 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=no 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 1C073C433E0 for ; Wed, 20 May 2020 23:46:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBA1C20823 for ; Wed, 20 May 2020 23:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590018401; bh=B7YrcQDkd1BKM+w20pbPLj/CV31guf6ed94E2pDUfU0=; h=Date:From:To:Subject:In-Reply-To:List-ID:From; b=ofrsV+eKYc+k2pdMlr3vrbQ65DAlUffJneDpr1A3lMa9Xj4XyEMhA3okXFq8VbanR LpHx8tMpJr98GW5Yi9yXTaxooVxNUvH3faejJxQ3v9q1I5voyCTxwDJj48Itypa9ix Ns90ijyOCTbEyByZ3ClDabNnUVZtmAAayKwVhXOM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726999AbgETXql (ORCPT ); Wed, 20 May 2020 19:46:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:37912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726566AbgETXql (ORCPT ); Wed, 20 May 2020 19:46:41 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (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 AEC4F2072C; Wed, 20 May 2020 23:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590018399; bh=B7YrcQDkd1BKM+w20pbPLj/CV31guf6ed94E2pDUfU0=; h=Date:From:To:Subject:In-Reply-To:From; b=l1Gpfi0yjW44OxcVrXtiGDNqE+fSxkd+Ys2slZf5LV9ev4ncPN/oIXkyuFG/pvP0S aLrasx24RHMlBTbkNnlmtaixZvd9c5DnDnOZ440AzBeSEm8x7+5y9Y+u1Yry/aS/ud eCTK3wMha6bVm6zYPdgJQ5LsodaEMy0E6kj+jGfE= Date: Wed, 20 May 2020 16:46:39 -0700 From: Andrew Morton To: davem@davemloft.net, lkp@intel.com, matorola@gmail.com, mm-commits@vger.kernel.org, rppt@linux.ibm.com, stable@vger.kernel.org Subject: + sparc32-use-pud-rather-than-pgd-to-get-pmd-in-srmmu_nocache_init.patch added to -mm tree Message-ID: <20200520234639.Bjq6Hhiq6%akpm@linux-foundation.org> In-Reply-To: <20200513175005.1f4839360c18c0238df292d1@linux-foundation.org> User-Agent: s-nail v14.8.16 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch titled Subject: sparc32: use PUD rather than PGD to get PMD in srmmu_nocache_init() has been added to the -mm tree. Its filename is sparc32-use-pud-rather-than-pgd-to-get-pmd-in-srmmu_nocache_init.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/sparc32-use-pud-rather-than-pgd-to-get-pmd-in-srmmu_nocache_init.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/sparc32-use-pud-rather-than-pgd-to-get-pmd-in-srmmu_nocache_init.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Mike Rapoport Subject: sparc32: use PUD rather than PGD to get PMD in srmmu_nocache_init() The kbuild test robot reported the following warning: arch/sparc/mm/srmmu.c: In function 'srmmu_nocache_init': >> arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used >> [-Werror=unused-but-set-variable] 300 | pud_t *pud; This warning is caused by misprint in the page table traversal in srmmu_nocache_init() function which accessed a PMD entry using PGD rather than PUD. Since sparc32 has only 3 page table levels, the PGD and PUD are essentially the same and usage of __nocache_fix() removed the type checking. Use PUD for the consistency and to silence the compiler warning. Link: http://lkml.kernel.org/r/20200520132005.GM1059226@linux.ibm.com Fixes: 7235db268a2777bc38 ("sparc32: use pgtable-nopud instead of 4level-fixup") Signed-off-by: Mike Rapoport Reported-by: kbuild test robot Cc: David S. Miller Cc: Anatoly Pugachev Cc: Signed-off-by: Andrew Morton --- arch/sparc/mm/srmmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/sparc/mm/srmmu.c~sparc32-use-pud-rather-than-pgd-to-get-pmd-in-srmmu_nocache_init +++ a/arch/sparc/mm/srmmu.c @@ -333,7 +333,7 @@ static void __init srmmu_nocache_init(vo pgd = pgd_offset_k(vaddr); p4d = p4d_offset(__nocache_fix(pgd), vaddr); pud = pud_offset(__nocache_fix(p4d), vaddr); - pmd = pmd_offset(__nocache_fix(pgd), vaddr); + pmd = pmd_offset(__nocache_fix(pud), vaddr); pte = pte_offset_kernel(__nocache_fix(pmd), vaddr); pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV);