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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 829DCC2BB55 for ; Thu, 16 Apr 2020 16:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 652EF21D7E for ; Thu, 16 Apr 2020 16:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394314AbgDPQmM (ORCPT ); Thu, 16 Apr 2020 12:42:12 -0400 Received: from elvis.franken.de ([193.175.24.41]:42207 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727800AbgDPQld (ORCPT ); Thu, 16 Apr 2020 12:41:33 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1jP7Zy-0001kl-01; Thu, 16 Apr 2020 18:41:30 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 130E2C0144; Thu, 16 Apr 2020 18:35:21 +0200 (CEST) Date: Thu, 16 Apr 2020 18:35:21 +0200 From: Thomas Bogendoerfer To: Mike Rapoport Cc: Paolo Bonzini , Peter Xu , maobibo , Sergei Shtylyov , linux-mips@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: Re: [PATCH] mips: define pud_index() regardless of page table folding Message-ID: <20200416163521.GB24743@alpha.franken.de> References: <20200402081614.5696-1-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200402081614.5696-1-rppt@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 02, 2020 at 11:16:14AM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Commit 31168f033e37 ("mips: drop __pXd_offset() macros that duplicate > pXd_index() ones") is correct that pud_index() & __pud_offset() are the > same when pud_index() is actually provided, however it does not take into > account the __PAGETABLE_PUD_FOLDED case. This has broken MIPS KVM > compilation because it relied on availability of pud_index(). > > Define pud_index() regardless of page table folded. It will evaluate to > actual index for 4-level pagetables and to 0 for folded PUD level. > > Link: https://lore.kernel.org/lkml/20200331154749.5457-1-pbonzini@redhat.com > Reported-by: Paolo Bonzini > Signed-off-by: Mike Rapoport > --- > arch/mips/include/asm/pgtable-64.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]