• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂ec1cc55d6fa0b34029419634125fadc77dce1e88 (tree)
時間2016-01-30 09:10:16
作者Linus Torvalds <torvalds@linu...>
CommiterLinus Torvalds

Log Message

powerpc fixes for 4.5

- 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJWqy1MAAoJEFHr6jzI4aWAlcsP/1I1WbD3Ek8pL/ljTxD9bfxb
DxF/HklYphzJDEvupgjDrmJO0RuMHrItAqTqsFbpWfCgn6OtIL/QHgZK3Aebtgjq
7u6V6SqjfYO7vWnmknvzcG+wDrPb3FrXyrFDE/Stz8IIh9OYrO9HzamqPxfhovh1
RQzD5eh3FWS9gzKDTiwh5w/lqwgP9Mv0b7BJEUvkQWv9Y9ZG4ZQeQwelUqTD2MKx
UIVYHjHXiuYYiMP5u59V/VFULq5C7s+DqCENTwfVERfN75p3K/JnO0x/87uiz+U+
0Y5owkK7sTr/Ozo9rMF5mqd+JNUAutkiD/+xDBivnZlxM/cnGtPpc+D/g7+CT0ar
oh0GDtCEQeEzyoFHsizSAr1FvXfo7NelhzY9CIoi7KHwCBtZDOIhUndkEfsKnYea
oZSf86F5KqSw8vTOrrKT5gZLYu5ro513vQHg0vw+tNHIWppsIeW/Pbr9e0o7I6bV
px3EmKkuUJfSNBNyDscWdUetRWilZsGW+Gg47mlf8Dck091exJ6o1n7HU8Y83KP+
7QDGwT5AQAZ47Z1N1DyNY5V+9SiYYSrgWi9hQTCtQXKjgd0Cia4zTDaEEMGotfQM
7DoR6r9tdCphc1oIiUJHhdSgbnR7Yq8804Bc8LSy7gkv9ZjcPvbirgDDLnIJ9zib
yCt6l6sRkDKZqvlV4wqN
=KZ85
-----END PGP SIGNATURE-----

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

Change Summary

差異

--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -50,7 +50,9 @@
5050 * set of bits not changed in pmd_modify.
5151 */
5252 #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+
5456
5557 #ifdef CONFIG_PPC_64K_PAGES
5658 #include <asm/book3s/64/hash-64k.h>
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -223,7 +223,6 @@ static inline pte_t *pmdp_ptep(pmd_t *pmd)
223223 #define pmd_pfn(pmd) pte_pfn(pmd_pte(pmd))
224224 #define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd))
225225 #define pmd_young(pmd) pte_young(pmd_pte(pmd))
226-#define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd))
227226 #define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd)))
228227 #define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd)))
229228 #define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd)))
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -383,3 +383,4 @@ SYSCALL(ni_syscall)
383383 SYSCALL(ni_syscall)
384384 SYSCALL(ni_syscall)
385385 SYSCALL(mlock2)
386+SYSCALL(copy_file_range)
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -12,7 +12,7 @@
1212 #include <uapi/asm/unistd.h>
1313
1414
15-#define NR_syscalls 379
15+#define NR_syscalls 380
1616
1717 #define __NR__exit __NR_exit
1818
--- a/arch/powerpc/include/uapi/asm/unistd.h
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -389,5 +389,6 @@
389389 #define __NR_userfaultfd 364
390390 #define __NR_membarrier 365
391391 #define __NR_mlock2 378
392+#define __NR_copy_file_range 379
392393
393394 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
--- a/arch/powerpc/kernel/eeh_pe.c
+++ b/arch/powerpc/kernel/eeh_pe.c
@@ -883,32 +883,29 @@ void eeh_pe_restore_bars(struct eeh_pe *pe)
883883 const char *eeh_pe_loc_get(struct eeh_pe *pe)
884884 {
885885 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;
887887 const char *loc = NULL;
888888
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+ }
891895
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))
896897 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+
897902 if (loc)
898- goto out;
903+ return loc;
899904
900- /* Check the root port */
901- dn = dn->child;
902- if (!dn)
903- goto out;
905+ bus = bus->parent;
904906 }
905907
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";
912909 }
913910
914911 /**
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -701,31 +701,3 @@ _GLOBAL(kexec_sequence)
701701 li r5,0
702702 blr /* image->start(physid, image->start, 0); */
703703 #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 */
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -326,7 +326,10 @@ static void dedotify_versions(struct modversion_info *vers,
326326 }
327327 }
328328
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+ */
330333 static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab)
331334 {
332335 unsigned int i;
@@ -334,8 +337,11 @@ static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab)
334337 for (i = 1; i < numsyms; i++) {
335338 if (syms[i].st_shndx == SHN_UNDEF) {
336339 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;
338343 memmove(name, name+1, strlen(name));
344+ }
339345 }
340346 }
341347 }
@@ -351,7 +357,7 @@ static Elf64_Sym *find_dot_toc(Elf64_Shdr *sechdrs,
351357 numsyms = sechdrs[symindex].sh_size / sizeof(Elf64_Sym);
352358
353359 for (i = 1; i < numsyms; i++) {
354- if (syms[i].st_shndx == SHN_UNDEF
360+ if (syms[i].st_shndx == SHN_ABS
355361 && strcmp(strtab + syms[i].st_name, "TOC.") == 0)
356362 return &syms[i];
357363 }
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -560,12 +560,12 @@ subsys_initcall(add_system_ram_resources);
560560 */
561561 int devmem_is_allowed(unsigned long pfn)
562562 {
563+ if (page_is_rtas_user_buf(pfn))
564+ return 1;
563565 if (iomem_is_exclusive(PFN_PHYS(pfn)))
564566 return 0;
565567 if (!page_is_ram(pfn))
566568 return 1;
567- if (page_is_rtas_user_buf(pfn))
568- return 1;
569569 return 0;
570570 }
571571 #endif /* CONFIG_STRICT_DEVMEM */
--- a/arch/powerpc/perf/power8-pmu.c
+++ b/arch/powerpc/perf/power8-pmu.c
@@ -816,7 +816,7 @@ static struct power_pmu power8_pmu = {
816816 .get_constraint = power8_get_constraint,
817817 .get_alternatives = power8_get_alternatives,
818818 .disable_pmc = power8_disable_pmc,
819- .flags = PPMU_HAS_SSLOT | PPMU_HAS_SIER | PPMU_ARCH_207S,
819+ .flags = PPMU_HAS_SIER | PPMU_ARCH_207S,
820820 .n_generic = ARRAY_SIZE(power8_generic_events),
821821 .generic_events = power8_generic_events,
822822 .cache_events = &power8_cache_events,
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -594,7 +594,8 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)
594594 if (strncmp(symname, "_restgpr0_", sizeof("_restgpr0_") - 1) == 0 ||
595595 strncmp(symname, "_savegpr0_", sizeof("_savegpr0_") - 1) == 0 ||
596596 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)
598599 return 1;
599600 /* Do not ignore this symbol */
600601 return 0;