Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp757477ybl; Wed, 14 Aug 2019 05:37:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6c6cwdjhjGL4SRK7Qf93IvpsXJXsqPz1pyLEsWeXzN9ZoqDBQJyAPakKn+AQJrGYcF2xx X-Received: by 2002:a17:90a:3321:: with SMTP id m30mr7099836pjb.2.1565786251275; Wed, 14 Aug 2019 05:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565786251; cv=none; d=google.com; s=arc-20160816; b=o/JChexYzQ3S7gg7InuhbEZk+YzmTcU7XBWw/WJqkabYMq42ASL6XdGr2ZoVJz1wh/ 7UsslvQEW6OImRX3D+13pEvDjH8Ax7KUSq8LmFgz1FwTe4LxLLv1PVILeWY1n64ycZNI fml1Cy0jYMXxgaN7xRPbU6EiWgfCqCISgJh353a9TvpALNVMiFmgc8gJtKdV9JpEWxQX 7QF+xr+DX1zTp2NJXX00PI0wP+Jc95p+pIbTveSx5eop6Dm7gn2OLg3FYH5VGqAKRgZC UH+9R9pDHavrhKPM/xAlmcf07uoqbl+19o9JXOOR5qkuoSZ+Z+Q5RgyjogLtPtYQfPXB kV4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=j53zhLU4XpoQzfSNT9XXEWPvWLs4ubINbP/2nTf1KCA=; b=UA2NoKIf/E3479uWWJ9EpsNJDQtP3k1WtEW5hlzNRjMfZ7CWlNaOEi8kORnHNAMKsv YUNXFZ4Jqqz4r+XHQtN3A0VmcdflYqZrd+wdy49Doq6CpkHK0U8cZtaFHBP1vULNTlO3 U1jaHTmKn+w/F1Fo7oPRkmbatzcitJLjoEX9OeQo8k7+Ef4AVl8NesGTJKonxYbz6CCw 1k0bZJZmaZ3DhjQmkSSlhV62V+VDgoPKRFcmZz2nzP40cS/4AIkjU7kZFe2pMUZ6+ocq JxsXhiDitncr73nAisE3ZTAyNsVh29aioKImTqr/5rSQJ+P1AbrdknCDM20UUXDjJ/Hy px8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=Rz0c0+sj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v19si65742872pff.229.2019.08.14.05.37.15; Wed, 14 Aug 2019 05:37:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=Rz0c0+sj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727750AbfHNMgP (ORCPT + 99 others); Wed, 14 Aug 2019 08:36:15 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:16845 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727730AbfHNMgN (ORCPT ); Wed, 14 Aug 2019 08:36:13 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 467pwV3DsMz9v0dL; Wed, 14 Aug 2019 14:36:10 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=Rz0c0+sj; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id kTsp-fp0g39O; Wed, 14 Aug 2019 14:36:10 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 467pwV23YGz9v0dJ; Wed, 14 Aug 2019 14:36:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1565786170; bh=j53zhLU4XpoQzfSNT9XXEWPvWLs4ubINbP/2nTf1KCA=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=Rz0c0+sjJg4wVqTb4YxG3UFvvQBoskwRzoeUHILsBatWuKQksYf0OUyreBHAo8mlI fDOIlWJ96GTKwuRNIs9JY3X1EKTl1xNT55Acau1MoBAlS1fLKpYYQgVPav4P9fFNFb AIY8u1LRs6N7SE/wp8rBrnYlolfreh/u2NNiVkD4= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C79428B7F5; Wed, 14 Aug 2019 14:36:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id COM_VehBFVgZ; Wed, 14 Aug 2019 14:36:11 +0200 (CEST) Received: from pc17473vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.101]) by messagerie.si.c-s.fr (Postfix) with ESMTP id ABFC18B761; Wed, 14 Aug 2019 14:36:11 +0200 (CEST) Received: by pc17473vm.idsi0.si.c-s.fr (Postfix, from userid 0) id A29996B6C0; Wed, 14 Aug 2019 12:36:11 +0000 (UTC) Message-Id: <334632b1df4775b0ccf3bdc8d6b201d14e3daedd.1565786091.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH 3/5] powerpc/ptdump: drop dummy KERN_VIRT_START on PPC32 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Wed, 14 Aug 2019 12:36:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PPC32 doesn't have KERN_VIRT_START. Make PAGE_OFFSET the default starting address for the dump, and drop the dummy definition of KERN_VIRT_START. Only use KERN_VIRT_START for non radix PPC64. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ptdump/ptdump.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c index 74ff2bff4ea0..9a2186c133e6 100644 --- a/arch/powerpc/mm/ptdump/ptdump.c +++ b/arch/powerpc/mm/ptdump/ptdump.c @@ -26,10 +26,6 @@ #include "ptdump.h" -#ifdef CONFIG_PPC32 -#define KERN_VIRT_START 0 -#endif - /* * To visualise what is happening, * @@ -362,12 +358,13 @@ static int ptdump_show(struct seq_file *m, void *v) struct pg_state st = { .seq = m, .marker = address_markers, + .start_address = PAGE_OFFSET, }; - if (radix_enabled()) - st.start_address = PAGE_OFFSET; - else +#ifdef CONFIG_PPC64 + if (!radix_enabled()) st.start_address = KERN_VIRT_START; +#endif /* Traverse kernel page tables */ walk_pagetables(&st); @@ -405,12 +402,13 @@ void ptdump_check_wx(void) .seq = NULL, .marker = address_markers, .check_wx = true, + .start_address = PAGE_OFFSET, }; - if (radix_enabled()) - st.start_address = PAGE_OFFSET; - else +#ifdef CONFIG_PPC64 + if (!radix_enabled()) st.start_address = KERN_VIRT_START; +#endif walk_pagetables(&st); -- 2.13.3