From: dyoung@redhat.com (Dave Young)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/8] arm64/kexec: Add core kexec support
Date: Fri, 11 Jul 2014 17:47:48 +0800 [thread overview]
Message-ID: <20140711094747.GA16936@darkstar.nay.redhat.com> (raw)
In-Reply-To: <20140707073337.GA1108@dhcp-16-198.nay.redhat.com>
On 07/07/14 at 03:33pm, Dave Young wrote:
> [snip]
>
> > +
> > +/**
> > + * kexec_cpu_info_init - Initialize an array of kexec_cpu_info structures.
> > + *
> > + * Allocates a cpu info array and fills it with info for all cpus found in
> > + * the device tree passed. The cpu info array is zero terminated.
> > + */
> > +
> > +int kexec_cpu_info_init(const struct device_node *dn,
> > + struct kexec_dt_info *info)
> > +{
> > + int result;
> > + unsigned int cpu;
> > + const struct device_node *i;
> > +
> > + info->cpu_info = kmalloc(
> > + (1 + info->cpu_count) * sizeof(struct kexec_cpu_info),
> > + GFP_KERNEL);
> > +
> > + if (!info->cpu_info) {
> > + pr_debug("%s: out of memory", __func__);
> > + return -ENOMEM;
> > + }
> > +
> > + info->spinner_count = 0;
> > +
> > + for (cpu = 0, i = dn; cpu < info->cpu_count; cpu++) {
> > + struct kexec_cpu_info *cpu_info = &info->cpu_info[cpu];
> > +
> > + i = of_find_node_by_type((struct device_node *)i, "cpu");
> > +
> > + BUG_ON(!i);
> > +
> > + cpu_info->cpu = cpu;
> > +
> > + result = cpu_read_ops((struct device_node *)i, cpu,
> > + &cpu_info->cpu_ops);
>
> cpu_ops memory is not allocated?
Oops, I misread the code, it should be not a problem. Just ignore above comment
But I surely have some problem, probably caused by some random issues.
>
> BTW cpu_read_ops will call cpu_get_ops which is marked as __init
>
> Thanks
> Dave
>
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-07-11 9:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 0:48 [PATCH 0/8] arm64 kexec kernel patches Geoff Levand
2014-05-09 0:48 ` [PATCH 6/8] arm64/kexec: kexec needs cpu_die Geoff Levand
2014-05-09 8:24 ` Mark Rutland
2014-05-13 22:27 ` Geoff Levand
2014-05-09 0:48 ` [PATCH 8/8] arm64: Enable kexec in defconfig Geoff Levand
2014-05-09 0:48 ` [PATCH 2/8] arm64: Make cpu_read_ops generic Geoff Levand
2014-05-09 0:48 ` [PATCH 1/8] arm64: Use cpu_ops for smp_stop Geoff Levand
2014-05-09 8:44 ` Mark Rutland
2014-05-13 22:27 ` Geoff Levand
2014-05-09 0:48 ` [PATCH 5/8] arm64: Split soft_restart into two stages Geoff Levand
2014-05-09 0:48 ` [PATCH 3/8] arm64: Add spin-table cpu_die Geoff Levand
2014-05-09 8:54 ` Mark Rutland
2014-05-09 0:48 ` [PATCH 7/8] arm64/kexec: Add core kexec support Geoff Levand
2014-05-09 15:36 ` Mark Rutland
2014-05-13 22:27 ` Geoff Levand
2014-05-16 10:26 ` Mark Rutland
2014-05-14 10:54 ` Catalin Marinas
2014-05-14 23:20 ` Geoff Levand
2014-07-07 7:33 ` Dave Young
2014-07-11 9:47 ` Dave Young [this message]
2014-05-09 0:48 ` [PATCH 4/8] arm64: Add smp_spin_table_set_die Geoff Levand
2014-05-09 16:22 ` [PATCH 0/8] arm64 kexec kernel patches Mark Rutland
2014-05-13 22:26 ` Geoff Levand
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=20140711094747.GA16936@darkstar.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).