From: Bhupesh Sharma <bhsharma@redhat.com>
To: AKASHI Takahiro <takahiro.akashi@linaro.org>,
kexec@lists.infradead.org, bhupesh.linux@gmail.com,
dyoung@redhat.com, horms@verge.net.au, james.morse@arm.com
Subject: Re: [PATCH v3 1/2] dt-ops: Add helper API to dump fdt blob
Date: Thu, 21 Jun 2018 13:30:28 +0530 [thread overview]
Message-ID: <f121cde1-2e21-d98b-1a4d-464de90e9467@redhat.com> (raw)
In-Reply-To: <feceb9c5-088b-5db2-c45f-79d53eece79a@redhat.com>
Hi Akashi,
On 06/20/2018 03:59 PM, Bhupesh Sharma wrote:
> Hi Akashi,
>
> Apologies for delay in replying. Somehow my email filter rules messed up
> and the review email was sent to another folder.
>
> Please see my comments inline:
>
> On 05/08/2018 07:44 AM, AKASHI Takahiro wrote:
>> Bhupesh,
>>
>> On Mon, Apr 30, 2018 at 02:52:35AM +0530, Bhupesh Sharma wrote:
>>> At several occasions it would be useful to dump the fdt
>>> blob being passed to the second (kexec/kdump) kernel
>>> when '-d' flag is specified while invoking kexec/kdump.
>>>
>>> This allows one to look at the device-tree fields that
>>> is being passed to the secondary kernel and accordingly
>>> debug issues.
>>>
>>> This can be specially useful for the arm64 case, where
>>> kexec_load() or kdump passes important information like
>>> 'linux,usable-memory' ranges to the second kernel, and
>>> the correctness of the ranges can be verified by
>>> looking at the device-tree dump with '-d' flag specified.
>>>
>>> Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
>>> ---
>>> kexec/dt-ops.c | 143
>>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> kexec/dt-ops.h | 1 +
>>> 2 files changed, 144 insertions(+)
>>>
>>> diff --git a/kexec/dt-ops.c b/kexec/dt-ops.c
>>> index 915dbf55afd2..cb95920e5c3e 100644
>>> --- a/kexec/dt-ops.c
>>> +++ b/kexec/dt-ops.c
>>> @@ -8,6 +8,10 @@
>>> #include "kexec.h"
>>> #include "dt-ops.h"
>>> +#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1))
>>> +#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a))))
>>
>> Pointer doesn't always fit to unsigned long.
>>
>>> +#define GET_CELL(p) (p += 4, *((const uint32_t *)(p-4)))
>>
>> Tricky :) Inline function would be better.
>
> Ok.
>
Well, I was working on converting this into an inline function, but the
final implementation turned out to be more 'trickier' then the macro, so
I would suggest that we stick to the macro for now (for the v4) and
later when I can think of a better approach, I will submit another patch
to fix the issue.
Please let me know in case of any concerns.
I would try to send out v4 later today.
Thanks,
Bhupesh
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2018-06-21 8:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-29 21:22 [PATCH v3 0/2] Add capability to dump fdt blob for arm64 platforms Bhupesh Sharma
2018-04-29 21:22 ` [PATCH v3 1/2] dt-ops: Add helper API to dump fdt blob Bhupesh Sharma
2018-05-08 2:14 ` AKASHI Takahiro
2018-06-20 10:29 ` Bhupesh Sharma
2018-06-21 8:00 ` Bhupesh Sharma [this message]
2018-04-29 21:22 ` [PATCH v3 2/2] kexec-arm64: Add functionality to dump 2nd dtb Bhupesh Sharma
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=f121cde1-2e21-d98b-1a4d-464de90e9467@redhat.com \
--to=bhsharma@redhat.com \
--cc=bhupesh.linux@gmail.com \
--cc=dyoung@redhat.com \
--cc=horms@verge.net.au \
--cc=james.morse@arm.com \
--cc=kexec@lists.infradead.org \
--cc=takahiro.akashi@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox