Commit 5ab03ac5 authored by Bjorn Helgaas's avatar Bjorn Helgaas

vmcore: Remove "weak" from function declarations

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
10629d71 ("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: be8a8d06 ("vmcore: introduce ELF header in new memory feature")
Fixes: 9cb21813 ("vmcore: introduce remap_oldmem_pfn_range()")
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarVivek Goyal <vgoyal@redhat.com>
CC: Michael Holzheu <holzheu@linux.vnet.ibm.com>
parent 96a2adbc
...@@ -14,14 +14,13 @@ ...@@ -14,14 +14,13 @@
extern unsigned long long elfcorehdr_addr; extern unsigned long long elfcorehdr_addr;
extern unsigned long long elfcorehdr_size; extern unsigned long long elfcorehdr_size;
extern int __weak elfcorehdr_alloc(unsigned long long *addr, extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size);
unsigned long long *size); extern void elfcorehdr_free(unsigned long long addr);
extern void __weak elfcorehdr_free(unsigned long long addr); extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos);
extern ssize_t __weak elfcorehdr_read(char *buf, size_t count, u64 *ppos); extern ssize_t elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos);
extern ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); extern int remap_oldmem_pfn_range(struct vm_area_struct *vma,
extern int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn,
unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot);
unsigned long size, pgprot_t prot);
extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
unsigned long, int); unsigned long, int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment