From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Suzuki K. Poulose" <suzuki@in.ibm.com>
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: Wed, 11 Jul 2012 15:36:53 +1000 [thread overview]
Message-ID: <1341985013.18850.29.camel@pasglop> (raw)
In-Reply-To: <20120702114855.22333.95335.stgit@suzukikp.in.ibm.com>
> 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).
> +
> + /* 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
Cheers,
Ben.
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Suzuki K. Poulose" <suzuki@in.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
mahesh@linux.vnet.ibm.com, hbabu@us.ibm.com
Subject: Re: [PATCH] [powerpc] Export memory limit via device tree
Date: Wed, 11 Jul 2012 15:36:53 +1000 [thread overview]
Message-ID: <1341985013.18850.29.camel@pasglop> (raw)
In-Reply-To: <20120702114855.22333.95335.stgit@suzukikp.in.ibm.com>
> 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).
> +
> + /* 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
Cheers,
Ben.
next prev parent reply other threads:[~2012-07-11 5:37 UTC|newest]
Thread overview: 6+ 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-02 11:49 ` Suzuki K. Poulose
2012-07-11 5:36 ` Benjamin Herrenschmidt [this message]
2012-07-11 5:36 ` Benjamin Herrenschmidt
2012-07-19 8:00 ` Suzuki K. Poulose
2012-07-19 8:00 ` Suzuki K. Poulose
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=1341985013.18850.29.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=suzuki@in.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 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.