From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jason Wessel <jason.wessel@windriver.com>,
Ralf Baechle <ralf@linux-mips.org>,
Ingo Molnar <mingo@redhat.com>,
John Stultz <john.stultz@linaro.org>,
Eric Paris <eparis@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Rashika Kheria <rashika.kheria@gmail.com>,
Nathan Fontenot <nfont@austin.ibm.com>,
Anton Blanchard <anton@au1.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Yinghai Lu <yinghai@kernel.org>,
"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>
Subject: Re: [PATCH v1 09/10] memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration
Date: Thu, 16 Oct 2014 09:23:07 +0200 [thread overview]
Message-ID: <20141016092307.4a5981f7@mschwide> (raw)
In-Reply-To: <CAErSpo4fS1fdNvur13LZVYomWdmjZnYO49Gc9BJv_BRxAXX3GA@mail.gmail.com>
On Wed, 15 Oct 2014 17:38:02 -0600
Bjorn Helgaas <bhelgaas@google.com> wrote:
> [+cc Rashika, Nathan, Anton, Blanchard, Heiko, Yinghai, Martin,
> linux-s390; sorry, I botched my "stg mail" so you weren't included the
> first time. s390 and x86 define their own memory_block_size_bytes()
> and are at risk for this problem.]
>
> On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> > drivers/base/memory.c provides a default memory_block_size_bytes()
> > definition explicitly marked "weak". Several architectures provide their
> > own definitions intended to override the default, but the "weak" attribute
> > on the declaration applied to the arch definitions as well, so the linker
> > chose one based on link order (see 10629d711ed7 ("PCI: Remove __weak
> > annotation from pcibios_get_phb_of_node decl")).
> >
> > Remove the "weak" attribute from the declaration so we always prefer a
> > non-weak definition over the weak one, independent of link order.
> >
> > Fixes: 41f107266b19 ("drivers: base: Add prototype declaration to the header file")
> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> > CC: Rashika Kheria <rashika.kheria@gmail.com>
> > CC: Nathan Fontenot <nfont@austin.ibm.com>
> > CC: Anton Blanchard <anton@au1.ibm.com>
> > CC: Heiko Carstens <heiko.carstens@de.ibm.com>
> > CC: Yinghai Lu <yinghai@kernel.org>
> > ---
> > include/linux/memory.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/linux/memory.h b/include/linux/memory.h
> > index bb7384e3c3d8..8b8d8d12348e 100644
> > --- a/include/linux/memory.h
> > +++ b/include/linux/memory.h
> > @@ -35,7 +35,7 @@ struct memory_block {
> > };
> >
> > int arch_get_memory_phys_device(unsigned long start_pfn);
> > -unsigned long __weak memory_block_size_bytes(void);
> > +unsigned long memory_block_size_bytes(void);
> >
> > /* These states are exposed to userspace as text strings in sysfs */
> > #define MEM_ONLINE (1<<0) /* exposed to userspace */
> >
s390 works fine with the __weak on memory_bloc_size_bytes.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2014-10-16 7:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20141015165957.4063.66741.stgit@bhelgaas-glaptop2.roam.corp.google.com>
[not found] ` <20141015170624.4063.24678.stgit@bhelgaas-glaptop2.roam.corp.google.com>
2014-10-15 23:30 ` [PATCH v1 06/10] clocksource: Remove "weak" from clocksource_default_clock() declaration Bjorn Helgaas
2014-10-16 7:22 ` Martin Schwidefsky
2014-10-16 13:40 ` Bjorn Helgaas
2014-10-16 13:45 ` Martin Schwidefsky
[not found] ` <20141015170644.4063.6843.stgit@bhelgaas-glaptop2.roam.corp.google.com>
2014-10-15 23:38 ` [PATCH v1 09/10] memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration Bjorn Helgaas
2014-10-16 7:23 ` Martin Schwidefsky [this message]
[not found] ` <20141015170631.4063.50854.stgit@bhelgaas-glaptop2.roam.corp.google.com>
[not found] ` <CAErSpo7zzofNsoGHuzfgfSEODyfkRs2FmyU-r3GjGDnNUF_0gw@mail.gmail.com>
2014-10-15 23:44 ` [PATCH v1 07/10] vmcore: Remove "weak" from function declarations Bjorn Helgaas
2014-10-16 7:23 ` Martin Schwidefsky
2014-10-16 20:11 ` Vivek Goyal
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=20141016092307.4a5981f7@mschwide \
--to=schwidefsky@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anton@au1.ibm.com \
--cc=bhelgaas@google.com \
--cc=eparis@redhat.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=jason.wessel@windriver.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nfont@austin.ibm.com \
--cc=ralf@linux-mips.org \
--cc=rashika.kheria@gmail.com \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.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