From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
catalin.marinas-5wv7dgnIgG8@public.gmane.org,
matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org,
leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH] efi: arm64: add debugfs node to dump UEFI runtime page tables
Date: Thu, 30 Jun 2016 15:09:31 +0100 [thread overview]
Message-ID: <20160630140930.GD20363@leverpostej> (raw)
In-Reply-To: <1467280906-31158-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On Thu, Jun 30, 2016 at 12:01:46PM +0200, Ard Biesheuvel wrote:
> Register the debugfs node 'efi_page_tables' to allow the UEFI runtime
> page tables to be inspected. Note that ARM does not have 'asm/ptdump.h'
> [yet] so for now, this is arm64 only.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>
> This patch could be helpful in assessing the series 'arm64: avoid block
> entries that we need to split later' that I sent out yesterday.
It's probably worth noting that this is based on the arm64 for-next/core
branch. I don't know if/how we can orgnise branches for merging this.
> drivers/firmware/efi/arm-runtime.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
> index 17ccf0a8787a..4197a1da013d 100644
> --- a/drivers/firmware/efi/arm-runtime.c
> +++ b/drivers/firmware/efi/arm-runtime.c
> @@ -39,6 +39,26 @@ static struct mm_struct efi_mm = {
> .mmlist = LIST_HEAD_INIT(efi_mm.mmlist),
> };
>
> +#ifdef CONFIG_ARM64
If you use CONFIG_ARM64_PTDUMP for the moment, then we won't have some
unused structs lying around when the feature is unused.
Otherwise, I agree that this is a useful debuging feature. FWIW, either
way:
Acked-by: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Thanks,
Mark.
> +#include <asm/ptdump.h>
> +
> +static struct ptdump_info efi_ptdump_info = {
> + .mm = &efi_mm,
> + .markers = (struct addr_marker[]){
> + { 0, "UEFI runtime start" },
> + { TASK_SIZE_64, "UEFI runtime end" }
> + },
> + .base_addr = 0,
> +};
> +
> +static int __init ptdump_init(void)
> +{
> + return ptdump_register(&efi_ptdump_info, "efi_page_tables");
> +}
> +device_initcall(ptdump_init);
> +
> +#endif
> +
> static bool __init efi_virtmap_init(void)
> {
> efi_memory_desc_t *md;
> --
> 2.7.4
>
WARNING: multiple messages have this Message-ID (diff)
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] efi: arm64: add debugfs node to dump UEFI runtime page tables
Date: Thu, 30 Jun 2016 15:09:31 +0100 [thread overview]
Message-ID: <20160630140930.GD20363@leverpostej> (raw)
In-Reply-To: <1467280906-31158-1-git-send-email-ard.biesheuvel@linaro.org>
On Thu, Jun 30, 2016 at 12:01:46PM +0200, Ard Biesheuvel wrote:
> Register the debugfs node 'efi_page_tables' to allow the UEFI runtime
> page tables to be inspected. Note that ARM does not have 'asm/ptdump.h'
> [yet] so for now, this is arm64 only.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>
> This patch could be helpful in assessing the series 'arm64: avoid block
> entries that we need to split later' that I sent out yesterday.
It's probably worth noting that this is based on the arm64 for-next/core
branch. I don't know if/how we can orgnise branches for merging this.
> drivers/firmware/efi/arm-runtime.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
> index 17ccf0a8787a..4197a1da013d 100644
> --- a/drivers/firmware/efi/arm-runtime.c
> +++ b/drivers/firmware/efi/arm-runtime.c
> @@ -39,6 +39,26 @@ static struct mm_struct efi_mm = {
> .mmlist = LIST_HEAD_INIT(efi_mm.mmlist),
> };
>
> +#ifdef CONFIG_ARM64
If you use CONFIG_ARM64_PTDUMP for the moment, then we won't have some
unused structs lying around when the feature is unused.
Otherwise, I agree that this is a useful debuging feature. FWIW, either
way:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Thanks,
Mark.
> +#include <asm/ptdump.h>
> +
> +static struct ptdump_info efi_ptdump_info = {
> + .mm = &efi_mm,
> + .markers = (struct addr_marker[]){
> + { 0, "UEFI runtime start" },
> + { TASK_SIZE_64, "UEFI runtime end" }
> + },
> + .base_addr = 0,
> +};
> +
> +static int __init ptdump_init(void)
> +{
> + return ptdump_register(&efi_ptdump_info, "efi_page_tables");
> +}
> +device_initcall(ptdump_init);
> +
> +#endif
> +
> static bool __init efi_virtmap_init(void)
> {
> efi_memory_desc_t *md;
> --
> 2.7.4
>
next prev parent reply other threads:[~2016-06-30 14:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 10:01 [PATCH] efi: arm64: add debugfs node to dump UEFI runtime page tables Ard Biesheuvel
2016-06-30 10:01 ` Ard Biesheuvel
[not found] ` <1467280906-31158-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-06-30 14:09 ` Mark Rutland [this message]
2016-06-30 14:09 ` Mark Rutland
2016-07-01 13:18 ` Ard Biesheuvel
2016-07-01 13:18 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160630140930.GD20363@leverpostej \
--to=mark.rutland-5wv7dgnigg8@public.gmane.org \
--cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
--cc=leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.