Merge tag 'powerpc-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: - Wire up copy_file_range() syscall from Chandan Rajendra - Simplify module TOC handling from Alan Modra - Remove newly added extra definition of pmd_dirty from Stephen Rothwell - Allow user space to map rtas_rmo_buf from Vasant Hegde - Fix PE location code from Gavin Shan - Remove PPMU_HAS_SSLOT flag for Power8 from Madhavan Srinivasan - Fixup _HPAGE_CHG_MASK from Aneesh Kumar K.V * tag 'powerpc-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fixup _HPAGE_CHG_MASK powerpc/perf: Remove PPMU_HAS_SSLOT flag for Power8 powerpc/eeh: Fix PE location code powerpc/mm: Allow user space to map rtas_rmo_buf powerpc: Remove newly added extra definition of pmd_dirty powerpc: Simplify module TOC handling powerpc: Wire up copy_file_range() syscall
This commit is contained in:
@@ -883,32 +883,29 @@ void eeh_pe_restore_bars(struct eeh_pe *pe)
|
||||
const char *eeh_pe_loc_get(struct eeh_pe *pe)
|
||||
{
|
||||
struct pci_bus *bus = eeh_pe_bus_get(pe);
|
||||
struct device_node *dn = pci_bus_to_OF_node(bus);
|
||||
struct device_node *dn;
|
||||
const char *loc = NULL;
|
||||
|
||||
if (!dn)
|
||||
goto out;
|
||||
while (bus) {
|
||||
dn = pci_bus_to_OF_node(bus);
|
||||
if (!dn) {
|
||||
bus = bus->parent;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* PHB PE or root PE ? */
|
||||
if (pci_is_root_bus(bus)) {
|
||||
loc = of_get_property(dn, "ibm,loc-code", NULL);
|
||||
if (!loc)
|
||||
if (pci_is_root_bus(bus))
|
||||
loc = of_get_property(dn, "ibm,io-base-loc-code", NULL);
|
||||
if (loc)
|
||||
goto out;
|
||||
else
|
||||
loc = of_get_property(dn, "ibm,slot-location-code",
|
||||
NULL);
|
||||
|
||||
/* Check the root port */
|
||||
dn = dn->child;
|
||||
if (!dn)
|
||||
goto out;
|
||||
if (loc)
|
||||
return loc;
|
||||
|
||||
bus = bus->parent;
|
||||
}
|
||||
|
||||
loc = of_get_property(dn, "ibm,loc-code", NULL);
|
||||
if (!loc)
|
||||
loc = of_get_property(dn, "ibm,slot-location-code", NULL);
|
||||
|
||||
out:
|
||||
return loc ? loc : "N/A";
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -701,31 +701,3 @@ _GLOBAL(kexec_sequence)
|
||||
li r5,0
|
||||
blr /* image->start(physid, image->start, 0); */
|
||||
#endif /* CONFIG_KEXEC */
|
||||
|
||||
#ifdef CONFIG_MODULES
|
||||
#if defined(_CALL_ELF) && _CALL_ELF == 2
|
||||
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
.weak __crc_TOC.
|
||||
.section "___kcrctab+TOC.","a"
|
||||
.globl __kcrctab_TOC.
|
||||
__kcrctab_TOC.:
|
||||
.llong __crc_TOC.
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Export a fake .TOC. since both modpost and depmod will complain otherwise.
|
||||
* Both modpost and depmod strip the leading . so we do the same here.
|
||||
*/
|
||||
.section "__ksymtab_strings","a"
|
||||
__kstrtab_TOC.:
|
||||
.asciz "TOC."
|
||||
|
||||
.section "___ksymtab+TOC.","a"
|
||||
/* This symbol name is important: it's used by modpost to find exported syms */
|
||||
.globl __ksymtab_TOC.
|
||||
__ksymtab_TOC.:
|
||||
.llong 0 /* .value */
|
||||
.llong __kstrtab_TOC.
|
||||
#endif /* ELFv2 */
|
||||
#endif /* MODULES */
|
||||
|
@@ -326,7 +326,10 @@ static void dedotify_versions(struct modversion_info *vers,
|
||||
}
|
||||
}
|
||||
|
||||
/* Undefined symbols which refer to .funcname, hack to funcname (or .TOC.) */
|
||||
/*
|
||||
* Undefined symbols which refer to .funcname, hack to funcname. Make .TOC.
|
||||
* seem to be defined (value set later).
|
||||
*/
|
||||
static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -334,8 +337,11 @@ static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab)
|
||||
for (i = 1; i < numsyms; i++) {
|
||||
if (syms[i].st_shndx == SHN_UNDEF) {
|
||||
char *name = strtab + syms[i].st_name;
|
||||
if (name[0] == '.')
|
||||
if (name[0] == '.') {
|
||||
if (strcmp(name+1, "TOC.") == 0)
|
||||
syms[i].st_shndx = SHN_ABS;
|
||||
memmove(name, name+1, strlen(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -351,7 +357,7 @@ static Elf64_Sym *find_dot_toc(Elf64_Shdr *sechdrs,
|
||||
numsyms = sechdrs[symindex].sh_size / sizeof(Elf64_Sym);
|
||||
|
||||
for (i = 1; i < numsyms; i++) {
|
||||
if (syms[i].st_shndx == SHN_UNDEF
|
||||
if (syms[i].st_shndx == SHN_ABS
|
||||
&& strcmp(strtab + syms[i].st_name, "TOC.") == 0)
|
||||
return &syms[i];
|
||||
}
|
||||
|
Reference in New Issue
Block a user