* Re: [PATCH v1 06/10] clocksource: Remove "weak" from clocksource_default_clock() declaration [not found] ` <20141015170624.4063.24678.stgit@bhelgaas-glaptop2.roam.corp.google.com> @ 2014-10-15 23:30 ` Bjorn Helgaas 2014-10-16 7:22 ` Martin Schwidefsky 0 siblings, 1 reply; 9+ messages in thread From: Bjorn Helgaas @ 2014-10-15 23:30 UTC (permalink / raw) To: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton Cc: linux-kernel@vger.kernel.org, Daniel Lezcano, Martin Schwidefsky, linux-s390@vger.kernel.org [+cc Daniel, Martin, linux-s390; sorry, I botched my "stg mail" so you weren't included the first time. s390 could see issues from this.] On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote: > kernel/time/jiffies.c provides a default clocksource_default_clock() > definition explicitly marked "weak". arch/s390 provides its own definition > intended to override the default, but the "weak" attribute on the > declaration applied to the s390 definition 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 clocksource_default_clock() > declaration so we always prefer a non-weak definition over the weak one, > independent of link order. > > Fixes: f1b82746c1e9 ("clocksource: Cleanup clocksource selection") > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > CC: Daniel Lezcano <daniel.lezcano@linaro.org> > CC: Martin Schwidefsky <schwidefsky@de.ibm.com> > --- > include/linux/clocksource.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h > index 653f0e2b6ca9..abcafaa20b86 100644 > --- a/include/linux/clocksource.h > +++ b/include/linux/clocksource.h > @@ -287,7 +287,7 @@ extern struct clocksource* clocksource_get_next(void); > extern void clocksource_change_rating(struct clocksource *cs, int rating); > extern void clocksource_suspend(void); > extern void clocksource_resume(void); > -extern struct clocksource * __init __weak clocksource_default_clock(void); > +extern struct clocksource * __init clocksource_default_clock(void); > extern void clocksource_mark_unstable(struct clocksource *cs); > > extern u64 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 06/10] clocksource: Remove "weak" from clocksource_default_clock() declaration 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 0 siblings, 1 reply; 9+ messages in thread From: Martin Schwidefsky @ 2014-10-16 7:22 UTC (permalink / raw) To: Bjorn Helgaas Cc: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton, linux-kernel@vger.kernel.org, Daniel Lezcano, linux-s390@vger.kernel.org On Wed, 15 Oct 2014 17:30:33 -0600 Bjorn Helgaas <bhelgaas@google.com> wrote: > [+cc Daniel, Martin, linux-s390; sorry, I botched my "stg mail" so you > weren't included the first time. s390 could see issues from this.] > > On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote: > > kernel/time/jiffies.c provides a default clocksource_default_clock() > > definition explicitly marked "weak". arch/s390 provides its own definition > > intended to override the default, but the "weak" attribute on the > > declaration applied to the s390 definition 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 clocksource_default_clock() > > declaration so we always prefer a non-weak definition over the weak one, > > independent of link order. > > > > Fixes: f1b82746c1e9 ("clocksource: Cleanup clocksource selection") > > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > > CC: Daniel Lezcano <daniel.lezcano@linaro.org> > > CC: Martin Schwidefsky <schwidefsky@de.ibm.com> > > --- > > include/linux/clocksource.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h > > index 653f0e2b6ca9..abcafaa20b86 100644 > > --- a/include/linux/clocksource.h > > +++ b/include/linux/clocksource.h > > @@ -287,7 +287,7 @@ extern struct clocksource* clocksource_get_next(void); > > extern void clocksource_change_rating(struct clocksource *cs, int rating); > > extern void clocksource_suspend(void); > > extern void clocksource_resume(void); > > -extern struct clocksource * __init __weak clocksource_default_clock(void); > > +extern struct clocksource * __init clocksource_default_clock(void); > > extern void clocksource_mark_unstable(struct clocksource *cs); > > > > extern u64 > > s390 compiles and boots without the __weak for clocksource_default_clock. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 06/10] clocksource: Remove "weak" from clocksource_default_clock() declaration 2014-10-16 7:22 ` Martin Schwidefsky @ 2014-10-16 13:40 ` Bjorn Helgaas 2014-10-16 13:45 ` Martin Schwidefsky 0 siblings, 1 reply; 9+ messages in thread From: Bjorn Helgaas @ 2014-10-16 13:40 UTC (permalink / raw) To: Martin Schwidefsky Cc: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton, linux-kernel@vger.kernel.org, Daniel Lezcano, linux-s390@vger.kernel.org On Thu, Oct 16, 2014 at 1:22 AM, Martin Schwidefsky <schwidefsky@de.ibm.com> wrote: > On Wed, 15 Oct 2014 17:30:33 -0600 > Bjorn Helgaas <bhelgaas@google.com> wrote: > >> [+cc Daniel, Martin, linux-s390; sorry, I botched my "stg mail" so you >> weren't included the first time. s390 could see issues from this.] >> >> On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote: >> > kernel/time/jiffies.c provides a default clocksource_default_clock() >> > definition explicitly marked "weak". arch/s390 provides its own definition >> > intended to override the default, but the "weak" attribute on the >> > declaration applied to the s390 definition 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 clocksource_default_clock() >> > declaration so we always prefer a non-weak definition over the weak one, >> > independent of link order. >> > >> > Fixes: f1b82746c1e9 ("clocksource: Cleanup clocksource selection") >> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> >> > CC: Daniel Lezcano <daniel.lezcano@linaro.org> >> > CC: Martin Schwidefsky <schwidefsky@de.ibm.com> >> > --- >> > include/linux/clocksource.h | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h >> > index 653f0e2b6ca9..abcafaa20b86 100644 >> > --- a/include/linux/clocksource.h >> > +++ b/include/linux/clocksource.h >> > @@ -287,7 +287,7 @@ extern struct clocksource* clocksource_get_next(void); >> > extern void clocksource_change_rating(struct clocksource *cs, int rating); >> > extern void clocksource_suspend(void); >> > extern void clocksource_resume(void); >> > -extern struct clocksource * __init __weak clocksource_default_clock(void); >> > +extern struct clocksource * __init clocksource_default_clock(void); >> > extern void clocksource_mark_unstable(struct clocksource *cs); >> > >> > extern u64 >> > > > s390 compiles and boots without the __weak for clocksource_default_clock. I assume this means you've tested this patch and s390 compiles and boots? I assume you *don't* mean that s390 could drop its clocksource_default_clock() implementation and use the generic one, right? Bjorn ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 06/10] clocksource: Remove "weak" from clocksource_default_clock() declaration 2014-10-16 13:40 ` Bjorn Helgaas @ 2014-10-16 13:45 ` Martin Schwidefsky 0 siblings, 0 replies; 9+ messages in thread From: Martin Schwidefsky @ 2014-10-16 13:45 UTC (permalink / raw) To: Bjorn Helgaas Cc: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton, linux-kernel@vger.kernel.org, Daniel Lezcano, linux-s390@vger.kernel.org On Thu, 16 Oct 2014 07:40:16 -0600 Bjorn Helgaas <bhelgaas@google.com> wrote: > On Thu, Oct 16, 2014 at 1:22 AM, Martin Schwidefsky > <schwidefsky@de.ibm.com> wrote: > > On Wed, 15 Oct 2014 17:30:33 -0600 > > Bjorn Helgaas <bhelgaas@google.com> wrote: > > > >> [+cc Daniel, Martin, linux-s390; sorry, I botched my "stg mail" so you > >> weren't included the first time. s390 could see issues from this.] > >> > >> On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote: > >> > kernel/time/jiffies.c provides a default clocksource_default_clock() > >> > definition explicitly marked "weak". arch/s390 provides its own definition > >> > intended to override the default, but the "weak" attribute on the > >> > declaration applied to the s390 definition 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 clocksource_default_clock() > >> > declaration so we always prefer a non-weak definition over the weak one, > >> > independent of link order. > >> > > >> > Fixes: f1b82746c1e9 ("clocksource: Cleanup clocksource selection") > >> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > >> > CC: Daniel Lezcano <daniel.lezcano@linaro.org> > >> > CC: Martin Schwidefsky <schwidefsky@de.ibm.com> > >> > --- > >> > include/linux/clocksource.h | 2 +- > >> > 1 file changed, 1 insertion(+), 1 deletion(-) > >> > > >> > diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h > >> > index 653f0e2b6ca9..abcafaa20b86 100644 > >> > --- a/include/linux/clocksource.h > >> > +++ b/include/linux/clocksource.h > >> > @@ -287,7 +287,7 @@ extern struct clocksource* clocksource_get_next(void); > >> > extern void clocksource_change_rating(struct clocksource *cs, int rating); > >> > extern void clocksource_suspend(void); > >> > extern void clocksource_resume(void); > >> > -extern struct clocksource * __init __weak clocksource_default_clock(void); > >> > +extern struct clocksource * __init clocksource_default_clock(void); > >> > extern void clocksource_mark_unstable(struct clocksource *cs); > >> > > >> > extern u64 > >> > > > > > s390 compiles and boots without the __weak for clocksource_default_clock. > > I assume this means you've tested this patch and s390 compiles and boots? Correct. > I assume you *don't* mean that s390 could drop its > clocksource_default_clock() implementation and use the generic one, > right? Sorry, but I want to keep the s390 TOD clock as default. The jiffies clock is not precise enough, even if it is used only at the beginning. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20141015170644.4063.6843.stgit@bhelgaas-glaptop2.roam.corp.google.com>]
* Re: [PATCH v1 09/10] memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration [not found] ` <20141015170644.4063.6843.stgit@bhelgaas-glaptop2.roam.corp.google.com> @ 2014-10-15 23:38 ` Bjorn Helgaas 2014-10-16 7:23 ` Martin Schwidefsky 0 siblings, 1 reply; 9+ messages in thread From: Bjorn Helgaas @ 2014-10-15 23:38 UTC (permalink / raw) To: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton Cc: linux-kernel@vger.kernel.org, Rashika Kheria, Nathan Fontenot, Anton Blanchard, Heiko Carstens, Yinghai Lu, Martin Schwidefsky, linux-s390@vger.kernel.org [+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 */ > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 09/10] memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration 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 0 siblings, 0 replies; 9+ messages in thread From: Martin Schwidefsky @ 2014-10-16 7:23 UTC (permalink / raw) To: Bjorn Helgaas Cc: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton, linux-kernel@vger.kernel.org, Rashika Kheria, Nathan Fontenot, Anton Blanchard, Heiko Carstens, Yinghai Lu, linux-s390@vger.kernel.org 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. ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20141015170631.4063.50854.stgit@bhelgaas-glaptop2.roam.corp.google.com>]
[parent not found: <CAErSpo7zzofNsoGHuzfgfSEODyfkRs2FmyU-r3GjGDnNUF_0gw@mail.gmail.com>]
* Re: [PATCH v1 07/10] vmcore: Remove "weak" from function declarations [not found] ` <CAErSpo7zzofNsoGHuzfgfSEODyfkRs2FmyU-r3GjGDnNUF_0gw@mail.gmail.com> @ 2014-10-15 23:44 ` Bjorn Helgaas 2014-10-16 7:23 ` Martin Schwidefsky 2014-10-16 20:11 ` Vivek Goyal 0 siblings, 2 replies; 9+ messages in thread From: Bjorn Helgaas @ 2014-10-15 23:44 UTC (permalink / raw) To: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton Cc: linux-kernel@vger.kernel.org, Michael Holzheu, Vivek Goyal, Martin Schwidefsky, Heiko Carstens, linux-s390@vger.kernel.org [+cc Martin, Heiko, linux-s390, since s390 could see issues from this. Sorry for all the spam; I should have gotten this right the first time.] On Wed, Oct 15, 2014 at 5:31 PM, Bjorn Helgaas <bhelgaas@google.com> wrote: > [+cc Michael, Vivek; sorry, I botched my "stg mail" so you weren't > included the first time] > > On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote: >> For the following functions: >> >> elfcorehdr_alloc() >> elfcorehdr_free() >> elfcorehdr_read() >> elfcorehdr_read_notes() >> remap_oldmem_pfn_range() >> >> fs/proc/vmcore.c provides default definitions explicitly marked "weak". >> arch/s390 provides its own definitions intended to override the default >> ones, but the "weak" attribute on the declarations applied to the s390 >> 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 declarations so we always prefer a >> non-weak definition over the weak one, independent of link order. >> >> Fixes: be8a8d069e50 ("vmcore: introduce ELF header in new memory feature") >> Fixes: 9cb218131de1 ("vmcore: introduce remap_oldmem_pfn_range()") >> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> >> CC: Michael Holzheu <holzheu@linux.vnet.ibm.com> >> CC: Vivek Goyal <vgoyal@redhat.com> >> --- >> include/linux/crash_dump.h | 15 +++++++-------- >> 1 file changed, 7 insertions(+), 8 deletions(-) >> >> diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h >> index 72ab536ad3de..3849fce7ecfe 100644 >> --- a/include/linux/crash_dump.h >> +++ b/include/linux/crash_dump.h >> @@ -14,14 +14,13 @@ >> extern unsigned long long elfcorehdr_addr; >> extern unsigned long long elfcorehdr_size; >> >> -extern int __weak elfcorehdr_alloc(unsigned long long *addr, >> - unsigned long long *size); >> -extern void __weak elfcorehdr_free(unsigned long long addr); >> -extern ssize_t __weak elfcorehdr_read(char *buf, size_t count, u64 *ppos); >> -extern ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); >> -extern int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma, >> - unsigned long from, unsigned long pfn, >> - unsigned long size, pgprot_t prot); >> +extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size); >> +extern void elfcorehdr_free(unsigned long long addr); >> +extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos); >> +extern ssize_t elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); >> +extern int remap_oldmem_pfn_range(struct vm_area_struct *vma, >> + unsigned long from, unsigned long pfn, >> + unsigned long size, pgprot_t prot); >> >> extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, >> unsigned long, int); >> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 07/10] vmcore: Remove "weak" from function declarations 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 1 sibling, 0 replies; 9+ messages in thread From: Martin Schwidefsky @ 2014-10-16 7:23 UTC (permalink / raw) To: Bjorn Helgaas Cc: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton, linux-kernel@vger.kernel.org, Michael Holzheu, Vivek Goyal, Heiko Carstens, linux-s390@vger.kernel.org On Wed, 15 Oct 2014 17:44:29 -0600 Bjorn Helgaas <bhelgaas@google.com> wrote: > [+cc Martin, Heiko, linux-s390, since s390 could see issues from this. > Sorry for all the spam; I should have gotten this right the first > time.] > > On Wed, Oct 15, 2014 at 5:31 PM, Bjorn Helgaas <bhelgaas@google.com> wrote: > > [+cc Michael, Vivek; sorry, I botched my "stg mail" so you weren't > > included the first time] > > > > On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote: > >> For the following functions: > >> > >> elfcorehdr_alloc() > >> elfcorehdr_free() > >> elfcorehdr_read() > >> elfcorehdr_read_notes() > >> remap_oldmem_pfn_range() > >> > >> fs/proc/vmcore.c provides default definitions explicitly marked "weak". > >> arch/s390 provides its own definitions intended to override the default > >> ones, but the "weak" attribute on the declarations applied to the s390 > >> 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 declarations so we always prefer a > >> non-weak definition over the weak one, independent of link order. > >> > >> Fixes: be8a8d069e50 ("vmcore: introduce ELF header in new memory feature") > >> Fixes: 9cb218131de1 ("vmcore: introduce remap_oldmem_pfn_range()") > >> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > >> CC: Michael Holzheu <holzheu@linux.vnet.ibm.com> > >> CC: Vivek Goyal <vgoyal@redhat.com> > >> --- > >> include/linux/crash_dump.h | 15 +++++++-------- > >> 1 file changed, 7 insertions(+), 8 deletions(-) > >> > >> diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h > >> index 72ab536ad3de..3849fce7ecfe 100644 > >> --- a/include/linux/crash_dump.h > >> +++ b/include/linux/crash_dump.h > >> @@ -14,14 +14,13 @@ > >> extern unsigned long long elfcorehdr_addr; > >> extern unsigned long long elfcorehdr_size; > >> > >> -extern int __weak elfcorehdr_alloc(unsigned long long *addr, > >> - unsigned long long *size); > >> -extern void __weak elfcorehdr_free(unsigned long long addr); > >> -extern ssize_t __weak elfcorehdr_read(char *buf, size_t count, u64 *ppos); > >> -extern ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); > >> -extern int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma, > >> - unsigned long from, unsigned long pfn, > >> - unsigned long size, pgprot_t prot); > >> +extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size); > >> +extern void elfcorehdr_free(unsigned long long addr); > >> +extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos); > >> +extern ssize_t elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); > >> +extern int remap_oldmem_pfn_range(struct vm_area_struct *vma, > >> + unsigned long from, unsigned long pfn, > >> + unsigned long size, pgprot_t prot); > >> > >> extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, > >> unsigned long, int); > >> These __weak attributes can be removed as well without ill effect for s390. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 07/10] vmcore: Remove "weak" from function declarations 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 1 sibling, 0 replies; 9+ messages in thread From: Vivek Goyal @ 2014-10-16 20:11 UTC (permalink / raw) To: Bjorn Helgaas Cc: Jason Wessel, Ralf Baechle, Ingo Molnar, John Stultz, Eric Paris, H. Peter Anvin, Thomas Gleixner, Andrew Morton, linux-kernel@vger.kernel.org, Michael Holzheu, Martin Schwidefsky, Heiko Carstens, linux-s390@vger.kernel.org On Wed, Oct 15, 2014 at 05:44:29PM -0600, Bjorn Helgaas wrote: > [+cc Martin, Heiko, linux-s390, since s390 could see issues from this. > Sorry for all the spam; I should have gotten this right the first > time.] > > On Wed, Oct 15, 2014 at 5:31 PM, Bjorn Helgaas <bhelgaas@google.com> wrote: > > [+cc Michael, Vivek; sorry, I botched my "stg mail" so you weren't > > included the first time] > > > > On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote: > >> For the following functions: > >> > >> elfcorehdr_alloc() > >> elfcorehdr_free() > >> elfcorehdr_read() > >> elfcorehdr_read_notes() > >> remap_oldmem_pfn_range() > >> > >> fs/proc/vmcore.c provides default definitions explicitly marked "weak". > >> arch/s390 provides its own definitions intended to override the default > >> ones, but the "weak" attribute on the declarations applied to the s390 > >> 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 declarations so we always prefer a > >> non-weak definition over the weak one, independent of link order. > >> > >> Fixes: be8a8d069e50 ("vmcore: introduce ELF header in new memory feature") > >> Fixes: 9cb218131de1 ("vmcore: introduce remap_oldmem_pfn_range()") > >> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > >> CC: Michael Holzheu <holzheu@linux.vnet.ibm.com> > >> CC: Vivek Goyal <vgoyal@redhat.com> Looks good to me. Acked-by: Vivek Goyal <vgoyal@redhat.com> Thanks Vivek > >> --- > >> include/linux/crash_dump.h | 15 +++++++-------- > >> 1 file changed, 7 insertions(+), 8 deletions(-) > >> > >> diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h > >> index 72ab536ad3de..3849fce7ecfe 100644 > >> --- a/include/linux/crash_dump.h > >> +++ b/include/linux/crash_dump.h > >> @@ -14,14 +14,13 @@ > >> extern unsigned long long elfcorehdr_addr; > >> extern unsigned long long elfcorehdr_size; > >> > >> -extern int __weak elfcorehdr_alloc(unsigned long long *addr, > >> - unsigned long long *size); > >> -extern void __weak elfcorehdr_free(unsigned long long addr); > >> -extern ssize_t __weak elfcorehdr_read(char *buf, size_t count, u64 *ppos); > >> -extern ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); > >> -extern int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma, > >> - unsigned long from, unsigned long pfn, > >> - unsigned long size, pgprot_t prot); > >> +extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size); > >> +extern void elfcorehdr_free(unsigned long long addr); > >> +extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos); > >> +extern ssize_t elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); > >> +extern int remap_oldmem_pfn_range(struct vm_area_struct *vma, > >> + unsigned long from, unsigned long pfn, > >> + unsigned long size, pgprot_t prot); > >> > >> extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, > >> unsigned long, int); > >> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-10-16 20:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
[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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox