Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp26804ybh; Wed, 11 Mar 2020 19:59:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvSFRQZss2eqfxZYBk7S97QM3ssgteUnOZupvPqce9eQcQYv28r2Uk6hxmuKKgSKkbaa+Tm X-Received: by 2002:a4a:6c0e:: with SMTP id q14mr2475379ooc.50.1583981960288; Wed, 11 Mar 2020 19:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583981960; cv=none; d=google.com; s=arc-20160816; b=H9kmDi/fZs9bWzpTdMjInr5tZFc02e8mYYH51ItKgY/Zcpl7RDThcBIfUn/qxploJH z2jZiSJ5Kojif49nZ28HtY8JSNAyZM8vkvVVQwysZ/ANqFPlXD9pJTTXYv5jcMt27+7b feOU+UXGMOKjXkcKJIVYEjwIlMXdfJEUwdds+GW5nz9DsqOvCZxu6rUvlMDBNTLfe4Ay eLQT1XcmbhARlZGAmR1dt8RpPdQW+cAb/OB7sNx7Jme7YlwivVuBSsyr+Uu2RbE6Rrzl N4QPqYjD7BimR3dQPGg+Jf+dev5raaoML8l4isUp3e9+d/vqIyL0WvuBdUCjcFERcqAj 9o/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xjmkUAJV0P0YoZQeq03wBLs4ipixrmI828N0sC8YCYY=; b=oTgTLu1iBjMw8MVIYV3fWYbNAxGNiSLqVjSTA8m765lD27sv9JSATq+77NYA8F3QLT S0tcC6Y6VlgFTUxPBtEwQW84Owo8Doz0kgPIsjAXk17Cqmaag1hRwXV2rT424WGUgh07 XTmByuDd5Uqu13r8cjVEMeY26KVPzueExgYxmoXFv+GHRRuxQSXXA0hZW7+XQaKSpaT2 nYxTzZMYsWDVvgonbsxVMbUTqNjGShNr+2hJ4Q+JOiZYCbJhoEEwgvlwtiP/lmGJLuTx 9QFWfGQVl25YgGOxjS2/j1+uxsGrbxzqTk+RTI9IpqorNO6O50YLqa4lz3okG4E/6SRZ 36zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=c1mMG2I+; 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 r29si2105142oth.324.2020.03.11.19.59.05; Wed, 11 Mar 2020 19:59:20 -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=@sifive.com header.s=google header.b=c1mMG2I+; 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 S2387705AbgCLC6m (ORCPT + 99 others); Wed, 11 Mar 2020 22:58:42 -0400 Received: from mail-pf1-f170.google.com ([209.85.210.170]:44538 "EHLO mail-pf1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387396AbgCLC6m (ORCPT ); Wed, 11 Mar 2020 22:58:42 -0400 Received: by mail-pf1-f170.google.com with SMTP id b72so2468918pfb.11 for ; Wed, 11 Mar 2020 19:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xjmkUAJV0P0YoZQeq03wBLs4ipixrmI828N0sC8YCYY=; b=c1mMG2I+a4RImGoQCDTKsYcKG/bwp8PYVHJrAvIK8DRDiZ+lwBG/C2Ky1Q+cSPObRD JGBKmFCmIbAtoEGyFtpRKO8lopfd3fkGBa6Yl75i5sF6D3xIXsNQmZoHGlvS22w+9xEP 2dLJnVqhouZRMMou/QxjzCe7a61hIdZggh9fBni49Vf2WYJ50VvvMkUxZJzg+x4DSna2 /3wrt775hBm1Oyw/WZQPQUo74Eyw/evPVg6+2W+H/6Z7Fl3hQVjH491gbkv/ZRiy2MxZ 5DlyzJU83/zAkozQJBSMeEZC7MrluYWKJ+rrbTxnQnGOWzXm1XD1Nnx9QMYNxjjJGmzS YE7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xjmkUAJV0P0YoZQeq03wBLs4ipixrmI828N0sC8YCYY=; b=qsBPB1x4Hety6EdNAS/gLmPGizx7MY9Dc6ApSK1otqQPcbSTpejXCoP7BXDZ78PP90 1CQtf0B5U8bw0yeq40ZFQBEkDHKJ5/ow5Gypg34hYv0WHtKFYq/AKlJzLW7sPfELQnGW GpCTdoM7Ehl/CqysHfyUH/STUNE6i1003MTO1WgvfOWpWlJiiKli6rkdgduBk9CQmOfn gInySnj7rQU5q+3xQ9wR2LwHFXth1+L0/l4hElgBwdsAmZ5Hltk2FFkJCaI9fb60/Jba FYMFiyUEwNmsZWxQqSo7/5sgSxevTcTPRTHCqoCh7HFCT/rDbkiSvFFj8Kjijy4T1ytM CBAg== X-Gm-Message-State: ANhLgQ1Ia7bWkPHz4F+63aygEhhvFgprCJgCPvsj02dDs+ZsRzg0xVPS sm46h/ZAdVEZYxuzfrrRwZew2te7J94= X-Received: by 2002:a63:c54b:: with SMTP id g11mr5665118pgd.164.1583981921025; Wed, 11 Mar 2020 19:58:41 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (220-132-236-182.HINET-IP.hinet.net. [220.132.236.182]) by smtp.gmail.com with ESMTPSA id i11sm1910322pfd.202.2020.03.11.19.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 19:58:40 -0700 (PDT) From: Zong Li To: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Zong Li Subject: [PATCH v3 0/2] RISC-V page table dumper Date: Thu, 12 Mar 2020 10:58:34 +0800 Message-Id: <20200312025836.68977-1-zong.li@sifive.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch supports dumping page tables, and it's implemented on top of the generic page table dumper patch set. Changed in v3: - Modify warning message. Changed in v2: - Remove unnecessary #ifdef directive. Zong Li (2): riscv: Add support to dump the kernel page tables riscv: Use macro definition instead of magic number arch/riscv/Kconfig | 1 + arch/riscv/include/asm/kasan.h | 2 +- arch/riscv/include/asm/pgtable.h | 10 + arch/riscv/include/asm/ptdump.h | 11 ++ arch/riscv/mm/Makefile | 1 + arch/riscv/mm/ptdump.c | 317 +++++++++++++++++++++++++++++++ 6 files changed, 341 insertions(+), 1 deletion(-) create mode 100644 arch/riscv/include/asm/ptdump.h create mode 100644 arch/riscv/mm/ptdump.c -- 2.25.1