From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pxa: remove incorrect __init annotation on pxa27x_set_pwrmode
Date: Mon, 12 Oct 2015 21:20:17 +0200 [thread overview]
Message-ID: <5395757.goqVg4VzNo@wuerfel> (raw)
In-Reply-To: <87r3kz6hq9.fsf@belgarion.home>
On Monday 12 October 2015 20:53:50 Robert Jarzmik wrote:
> Robert Jarzmik <robert.jarzmik@free.fr> writes:
>
> > Arnd Bergmann <arnd@arndb.de> writes:
> >
> >> The z2 machine calls pxa27x_set_pwrmode() in order to power off
> >> the machine, but this function gets discarded early at boot because
> >> it is marked __init, as pointed out by kbuild:
> >>
> >> WARNING: vmlinux.o(.text+0x145c4): Section mismatch in reference from the function z2_power_off() to the function .init.text:pxa27x_set_pwrmode()
> >> The function z2_power_off() references
> >> the function __init pxa27x_set_pwrmode().
> >> This is often because z2_power_off lacks a __init
> >> annotation or the annotation of pxa27x_set_pwrmode is wrong.
> >>
> >> This removes the __init section modifier to fix rebooting and the
> >> build error.
> >>
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >> Fixes: ba4a90a6d86a ("ARM: pxa/z2: fix building error of pxa27x_cpu_suspend() no longer available")
> >> ---
> >> This is a fix for an old bug, I'd just put it into 4.4
> >>
> >> It showed up now because section mismatches now produce errors instead
> >> of warnings.
> >
> > Hi Arnd,
> >
> > I already have this queued for 4.4 from Thierry's patch in :
> > http://www.spinics.net/lists/arm-kernel/msg449414.html
> >
> > Yet your patch is more complete, as it deals also with the header in pxa27x.h
> > and has the fixes tag.
> >
> > Now I'm wondering if I should enhance Thierry's patch with yours and keeping
> > your signoff with your permission, or drop Thierry's one to replace by yours (I
> > don't know if it's sane behavior to drop an already queued patch ...)
>
> Actually, I've rethought it over and Thierry's patch approach looks somehow more
> appealing to me. What Thierry did is that he modified the _use_ of
> pxa27x_set_pwrmode() to be called from a __init annonated function. While your
> patch makes pxa27x_set_pwrmode() non __init.
>
> It looks to me the powermode should be initialized once and for all in the
> machine init code. So unless I've overseen something, I'll keep Thierry's patch.
Ah, sorry. I should have looked at the link you sent.
Thierry's patch indeed looks much nicer if that works, but I'm not entirely
sure if it is safe or not. Only two other pxa27x machines set the PWRMODE_DEEPSLEEP
flag, so it looks like there is a reason for some machines not to set it.
The z2 in particular never did, except in the powerdown handler. So if it
is unable to wake up reliably from DEEPSLEEP, that may be a reason to use
that flag only in the poweroff function but not during normal operation.
Arnd
next prev parent reply other threads:[~2015-10-12 19:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 13:44 [PATCH] ARM: pxa: fix pxa3xx DFI lockup hack Arnd Bergmann
2015-10-12 13:46 ` [PATCH] pxa: remove incorrect __init annotation on pxa27x_set_pwrmode Arnd Bergmann
2015-10-12 17:10 ` Robert Jarzmik
2015-10-12 18:53 ` Robert Jarzmik
2015-10-12 19:20 ` Arnd Bergmann [this message]
2015-10-12 21:07 ` Robert Jarzmik
2015-10-13 7:57 ` Arnd Bergmann
2015-10-12 18:57 ` Arnd Bergmann
2015-10-12 17:03 ` [PATCH] ARM: pxa: fix pxa3xx DFI lockup hack Robert Jarzmik
2015-10-12 18:57 ` Arnd Bergmann
2015-10-14 15:14 ` Arnd Bergmann
2015-10-14 19:05 ` Robert Jarzmik
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=5395757.goqVg4VzNo@wuerfel \
--to=arnd@arndb.de \
--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