From: "Suzuki K. Poulose" <suzuki@in.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: mahesh@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [powerpc] Export memory limit via device tree
Date: Thu, 19 Jul 2012 13:30:50 +0530 [thread overview]
Message-ID: <5007BEB2.5060405@in.ibm.com> (raw)
In-Reply-To: <1341985013.18850.29.camel@pasglop>
On 07/11/2012 11:06 AM, Benjamin Herrenschmidt wrote:
>> diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
>> index c957b12..0c9695d 100644
>> --- a/arch/powerpc/kernel/machine_kexec.c
>> +++ b/arch/powerpc/kernel/machine_kexec.c
>> @@ -207,6 +207,12 @@ static struct property crashk_size_prop = {
>> .value = &crashk_size,
>> };
>>
>> +static struct property memory_limit_prop = {
>> + .name = "linux,memory-limit",
>> + .length = sizeof(phys_addr_t),
>> + .value = &memory_limit,
>> +};
>> +
>
> AFAIK. phys_addr_t can change size, so instead make it point to a known
> fixes size quantity (a u64).
Ben,
Sorry for the delay in the response.
Some of the other properties are also of phys_addr_t, (e.g
linux,crashkernel-base, linux,kernel-end ). Should we fix them as well ?
Or
Should we leave this also a phys_addr_t and let the userspace handle it ?
>
>> +
>> + /* memory-limit is needed for constructing the crash regions */
>> + prop = of_find_property(node, memory_limit_prop.name, NULL);
>> + if (prop)
>> + prom_remove_property(node, prop);
>> +
>> + if (memory_limit)
>> + prom_add_property(node, &memory_limit_prop);
>> +
>
> There's a patch floating around making prom_update_property properly
> handle both pre-existing and non-pre-existing props, you should probably
> base yourself on top of it. I'm about to stick that patch in powerpc
> -next
>
OK. I am testing the new patch based on the above commit. I will wait
for the clarification on the issue of the type, before I post it here.
Thanks
Suzuki
prev parent reply other threads:[~2012-07-19 8:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 11:49 [PATCH] [powerpc] Export memory limit via device tree Suzuki K. Poulose
2012-07-11 5:36 ` Benjamin Herrenschmidt
2012-07-19 8:00 ` Suzuki K. Poulose [this message]
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=5007BEB2.5060405@in.ibm.com \
--to=suzuki@in.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).