-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arm64: mm: dump: make page table dumping reusable
For debugging purposes, it would be nice if we could export page tables other than the swapper_pg_dir to userspace. To enable this, this patch refactors the arm64 page table dumping code such that multiple tables may be registered with the framework, and exported under debugfs. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Laura Abbott <labbott@fedoraproject.org> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
- Loading branch information
Mark Rutland
authored and
Catalin Marinas
committed
Jun 21, 2016
1 parent
0e455d8
commit 4674fdb
Showing
2 changed files
with
64 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (C) 2014 ARM Ltd. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#ifndef __ASM_PTDUMP_H | ||
#define __ASM_PTDUMP_H | ||
|
||
#ifdef CONFIG_ARM64_PTDUMP | ||
|
||
#include <linux/mm_types.h> | ||
|
||
struct addr_marker { | ||
unsigned long start_address; | ||
char *name; | ||
}; | ||
|
||
struct ptdump_info { | ||
struct mm_struct *mm; | ||
const struct addr_marker *markers; | ||
unsigned long base_addr; | ||
unsigned long max_addr; | ||
}; | ||
|
||
int ptdump_register(struct ptdump_info *info, const char *name); | ||
|
||
#else | ||
static inline int ptdump_register(struct ptdump_info *info, const char *name) | ||
{ | ||
return 0; | ||
} | ||
#endif /* CONFIG_ARM64_PTDUMP */ | ||
|
||
#endif /* __ASM_PTDUMP_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters