Révision | ec1cc55d6fa0b34029419634125fadc77dce1e88 (tree) |
---|---|
l'heure | 2016-01-30 09:10:16 |
Auteur | Linus Torvalds <torvalds@linu...> |
Commiter | Linus Torvalds |
Merge tag 'powerpc-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman:
* tag 'powerpc-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
@@ -50,7 +50,9 @@ | ||
50 | 50 | * set of bits not changed in pmd_modify. |
51 | 51 | */ |
52 | 52 | #define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ |
53 | - _PAGE_ACCESSED | _PAGE_THP_HUGE) | |
53 | + _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE | \ | |
54 | + _PAGE_SOFT_DIRTY) | |
55 | + | |
54 | 56 | |
55 | 57 | #ifdef CONFIG_PPC_64K_PAGES |
56 | 58 | #include <asm/book3s/64/hash-64k.h> |
@@ -223,7 +223,6 @@ static inline pte_t *pmdp_ptep(pmd_t *pmd) | ||
223 | 223 | #define pmd_pfn(pmd) pte_pfn(pmd_pte(pmd)) |
224 | 224 | #define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd)) |
225 | 225 | #define pmd_young(pmd) pte_young(pmd_pte(pmd)) |
226 | -#define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd)) | |
227 | 226 | #define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd))) |
228 | 227 | #define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd))) |
229 | 228 | #define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd))) |
@@ -383,3 +383,4 @@ SYSCALL(ni_syscall) | ||
383 | 383 | SYSCALL(ni_syscall) |
384 | 384 | SYSCALL(ni_syscall) |
385 | 385 | SYSCALL(mlock2) |
386 | +SYSCALL(copy_file_range) |
@@ -12,7 +12,7 @@ | ||
12 | 12 | #include <uapi/asm/unistd.h> |
13 | 13 | |
14 | 14 | |
15 | -#define NR_syscalls 379 | |
15 | +#define NR_syscalls 380 | |
16 | 16 | |
17 | 17 | #define __NR__exit __NR_exit |
18 | 18 |
@@ -389,5 +389,6 @@ | ||
389 | 389 | #define __NR_userfaultfd 364 |
390 | 390 | #define __NR_membarrier 365 |
391 | 391 | #define __NR_mlock2 378 |
392 | +#define __NR_copy_file_range 379 | |
392 | 393 | |
393 | 394 | #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ |
@@ -883,32 +883,29 @@ void eeh_pe_restore_bars(struct eeh_pe *pe) | ||
883 | 883 | const char *eeh_pe_loc_get(struct eeh_pe *pe) |
884 | 884 | { |
885 | 885 | struct pci_bus *bus = eeh_pe_bus_get(pe); |
886 | - struct device_node *dn = pci_bus_to_OF_node(bus); | |
886 | + struct device_node *dn; | |
887 | 887 | const char *loc = NULL; |
888 | 888 | |
889 | - if (!dn) | |
890 | - goto out; | |
889 | + while (bus) { | |
890 | + dn = pci_bus_to_OF_node(bus); | |
891 | + if (!dn) { | |
892 | + bus = bus->parent; | |
893 | + continue; | |
894 | + } | |
891 | 895 | |
892 | - /* PHB PE or root PE ? */ | |
893 | - if (pci_is_root_bus(bus)) { | |
894 | - loc = of_get_property(dn, "ibm,loc-code", NULL); | |
895 | - if (!loc) | |
896 | + if (pci_is_root_bus(bus)) | |
896 | 897 | loc = of_get_property(dn, "ibm,io-base-loc-code", NULL); |
898 | + else | |
899 | + loc = of_get_property(dn, "ibm,slot-location-code", | |
900 | + NULL); | |
901 | + | |
897 | 902 | if (loc) |
898 | - goto out; | |
903 | + return loc; | |
899 | 904 | |
900 | - /* Check the root port */ | |
901 | - dn = dn->child; | |
902 | - if (!dn) | |
903 | - goto out; | |
905 | + bus = bus->parent; | |
904 | 906 | } |
905 | 907 | |
906 | - loc = of_get_property(dn, "ibm,loc-code", NULL); | |
907 | - if (!loc) | |
908 | - loc = of_get_property(dn, "ibm,slot-location-code", NULL); | |
909 | - | |
910 | -out: | |
911 | - return loc ? loc : "N/A"; | |
908 | + return "N/A"; | |
912 | 909 | } |
913 | 910 | |
914 | 911 | /** |
@@ -701,31 +701,3 @@ _GLOBAL(kexec_sequence) | ||
701 | 701 | li r5,0 |
702 | 702 | blr /* image->start(physid, image->start, 0); */ |
703 | 703 | #endif /* CONFIG_KEXEC */ |
704 | - | |
705 | -#ifdef CONFIG_MODULES | |
706 | -#if defined(_CALL_ELF) && _CALL_ELF == 2 | |
707 | - | |
708 | -#ifdef CONFIG_MODVERSIONS | |
709 | -.weak __crc_TOC. | |
710 | -.section "___kcrctab+TOC.","a" | |
711 | -.globl __kcrctab_TOC. | |
712 | -__kcrctab_TOC.: | |
713 | - .llong __crc_TOC. | |
714 | -#endif | |
715 | - | |
716 | -/* | |
717 | - * Export a fake .TOC. since both modpost and depmod will complain otherwise. | |
718 | - * Both modpost and depmod strip the leading . so we do the same here. | |
719 | - */ | |
720 | -.section "__ksymtab_strings","a" | |
721 | -__kstrtab_TOC.: | |
722 | - .asciz "TOC." | |
723 | - | |
724 | -.section "___ksymtab+TOC.","a" | |
725 | -/* This symbol name is important: it's used by modpost to find exported syms */ | |
726 | -.globl __ksymtab_TOC. | |
727 | -__ksymtab_TOC.: | |
728 | - .llong 0 /* .value */ | |
729 | - .llong __kstrtab_TOC. | |
730 | -#endif /* ELFv2 */ | |
731 | -#endif /* MODULES */ |
@@ -326,7 +326,10 @@ static void dedotify_versions(struct modversion_info *vers, | ||
326 | 326 | } |
327 | 327 | } |
328 | 328 | |
329 | -/* Undefined symbols which refer to .funcname, hack to funcname (or .TOC.) */ | |
329 | +/* | |
330 | + * Undefined symbols which refer to .funcname, hack to funcname. Make .TOC. | |
331 | + * seem to be defined (value set later). | |
332 | + */ | |
330 | 333 | static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab) |
331 | 334 | { |
332 | 335 | unsigned int i; |
@@ -334,8 +337,11 @@ static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab) | ||
334 | 337 | for (i = 1; i < numsyms; i++) { |
335 | 338 | if (syms[i].st_shndx == SHN_UNDEF) { |
336 | 339 | char *name = strtab + syms[i].st_name; |
337 | - if (name[0] == '.') | |
340 | + if (name[0] == '.') { | |
341 | + if (strcmp(name+1, "TOC.") == 0) | |
342 | + syms[i].st_shndx = SHN_ABS; | |
338 | 343 | memmove(name, name+1, strlen(name)); |
344 | + } | |
339 | 345 | } |
340 | 346 | } |
341 | 347 | } |
@@ -351,7 +357,7 @@ static Elf64_Sym *find_dot_toc(Elf64_Shdr *sechdrs, | ||
351 | 357 | numsyms = sechdrs[symindex].sh_size / sizeof(Elf64_Sym); |
352 | 358 | |
353 | 359 | for (i = 1; i < numsyms; i++) { |
354 | - if (syms[i].st_shndx == SHN_UNDEF | |
360 | + if (syms[i].st_shndx == SHN_ABS | |
355 | 361 | && strcmp(strtab + syms[i].st_name, "TOC.") == 0) |
356 | 362 | return &syms[i]; |
357 | 363 | } |
@@ -560,12 +560,12 @@ subsys_initcall(add_system_ram_resources); | ||
560 | 560 | */ |
561 | 561 | int devmem_is_allowed(unsigned long pfn) |
562 | 562 | { |
563 | + if (page_is_rtas_user_buf(pfn)) | |
564 | + return 1; | |
563 | 565 | if (iomem_is_exclusive(PFN_PHYS(pfn))) |
564 | 566 | return 0; |
565 | 567 | if (!page_is_ram(pfn)) |
566 | 568 | return 1; |
567 | - if (page_is_rtas_user_buf(pfn)) | |
568 | - return 1; | |
569 | 569 | return 0; |
570 | 570 | } |
571 | 571 | #endif /* CONFIG_STRICT_DEVMEM */ |
@@ -816,7 +816,7 @@ static struct power_pmu power8_pmu = { | ||
816 | 816 | .get_constraint = power8_get_constraint, |
817 | 817 | .get_alternatives = power8_get_alternatives, |
818 | 818 | .disable_pmc = power8_disable_pmc, |
819 | - .flags = PPMU_HAS_SSLOT | PPMU_HAS_SIER | PPMU_ARCH_207S, | |
819 | + .flags = PPMU_HAS_SIER | PPMU_ARCH_207S, | |
820 | 820 | .n_generic = ARRAY_SIZE(power8_generic_events), |
821 | 821 | .generic_events = power8_generic_events, |
822 | 822 | .cache_events = &power8_cache_events, |
@@ -594,7 +594,8 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname) | ||
594 | 594 | if (strncmp(symname, "_restgpr0_", sizeof("_restgpr0_") - 1) == 0 || |
595 | 595 | strncmp(symname, "_savegpr0_", sizeof("_savegpr0_") - 1) == 0 || |
596 | 596 | strncmp(symname, "_restvr_", sizeof("_restvr_") - 1) == 0 || |
597 | - strncmp(symname, "_savevr_", sizeof("_savevr_") - 1) == 0) | |
597 | + strncmp(symname, "_savevr_", sizeof("_savevr_") - 1) == 0 || | |
598 | + strcmp(symname, ".TOC.") == 0) | |
598 | 599 | return 1; |
599 | 600 | /* Do not ignore this symbol */ |
600 | 601 | return 0; |