From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Amr Bekhit <amr@helmpcb.com>
Cc: linux-arm-kernel@lists.infradead.org
Subject: Re: kexec on arm fails, possibly due to memdup_user
Date: Tue, 4 Jul 2023 21:53:32 +0100 [thread overview]
Message-ID: <ZKSGzJl0kwGiu4Pc@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAHmAUHL9Cfkq0JyNMv-HpY+VUZYSj8vQ-SN7BGjtpY36R6OrKA@mail.gmail.com>
On Tue, Jul 04, 2023 at 06:48:26PM +0100, Amr Bekhit wrote:
> > It could be:
> >
> > /*
> > * Validate that if the current HW supports SMP, then the SW supports
> > * and implements CPU hotplug for the current HW. If not, we won't be
> > * able to kexec reliably, so fail the prepare operation.
> > */
> > if (num_possible_cpus() > 1 && platform_can_secondary_boot() &&
> > !platform_can_cpu_hotplug())
> > return -EINVAL;
>
> Thanks - this was exactly the issue. memdup_user was a red herring
> caused by some missing printk's due to me not adding newlines. It's
> now clear that for my CPU (IPQ4019), the cpu_kill function is not
> implemented in the smp_operations struct.
>
> Looking online, I was able to see that kexec does work on my cpu as
> long as nr_cpus=1 is specified in the kernel command line (see
> https://patchwork.kernel.org/project/linux-arm-msm/patch/CAAGQ2nQNQ-aFkcrQHNA6H5TZ1tTovtfO_0Ohfndn9jXy13Hc6A@mail.gmail.com/#22064531).
>
> I've tried this myself, and indeed setting this option allows the
> kexec load to perform successfully. However, when I run kexec -e,
> after the "Bye!" message the system just hangs and reboots after a
> while, presumably due to a watchdog timeout:
>
> ~ # kexec -d --dtb=/data/image-qcom-ipq4019-nerd.dtb -l /data/zImage-openwrt
...
> Any pointers as to what could be wrong at this point?
Try without --dtb
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-07-04 20:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-01 19:25 kexec on arm fails, possibly due to memdup_user Amr Bekhit
2023-07-02 15:51 ` Russell King (Oracle)
2023-07-04 17:48 ` Amr Bekhit
2023-07-04 20:53 ` Russell King (Oracle) [this message]
2023-07-06 16:47 ` Amr Bekhit
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=ZKSGzJl0kwGiu4Pc@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=amr@helmpcb.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).