1. 21 6月, 2013 8 次提交
  2. 20 6月, 2013 2 次提交
    • D
      powerpc/mm: Make mmap_64.c compile on 32bit powerpc · d5d8ec89
      Daniel Walker 提交于
      There appears to be no good reason to keep this as 64bit only. It works
      on 32bit also, and has checks so that it can work correctly with 32bit
      binaries on 64bit hardware which is why I think this works.
      
      I tested this on qemu using the virtex-ml507 machine type.
      
      Before,
      
      /bin2 # ./test & cat /proc/${!}/maps
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      48000000-48020000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      48021000-48023000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bfd03000-bfd24000 rw-p 00000000 00:00 0          [stack]
      /bin2 # ./test & cat /proc/${!}/maps
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      0fe6e000-0ffd8000 r-xp 00000000 00:01 214        /lib/libc-2.11.3.so
      0ffd8000-0ffe8000 ---p 0016a000 00:01 214        /lib/libc-2.11.3.so
      0ffe8000-0ffed000 rw-p 0016a000 00:01 214        /lib/libc-2.11.3.so
      0ffed000-0fff0000 rw-p 00000000 00:00 0
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      48000000-48020000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      48020000-48021000 rw-p 00000000 00:00 0
      48021000-48023000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bf98a000-bf9ab000 rw-p 00000000 00:00 0          [stack]
      /bin2 # ./test & cat /proc/${!}/maps
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      0fe6e000-0ffd8000 r-xp 00000000 00:01 214        /lib/libc-2.11.3.so
      0ffd8000-0ffe8000 ---p 0016a000 00:01 214        /lib/libc-2.11.3.so
      0ffe8000-0ffed000 rw-p 0016a000 00:01 214        /lib/libc-2.11.3.so
      0ffed000-0fff0000 rw-p 00000000 00:00 0
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      48000000-48020000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      48020000-48021000 rw-p 00000000 00:00 0
      48021000-48023000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bfa54000-bfa75000 rw-p 00000000 00:00 0          [stack]
      
      After,
      
      bash-4.1# ./test & cat /proc/${!}/maps
      [7] 803
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      b7eb0000-b7ed0000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      b7ed1000-b7ed3000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bfbc0000-bfbe1000 rw-p 00000000 00:00 0          [stack]
      bash-4.1# ./test & cat /proc/${!}/maps
      [8] 805
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      b7b03000-b7b23000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      b7b24000-b7b26000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bfc27000-bfc48000 rw-p 00000000 00:00 0          [stack]
      bash-4.1# ./test & cat /proc/${!}/maps
      [9] 807
      00100000-00103000 r-xp 00000000 00:00 0          [vdso]
      10000000-10007000 r-xp 00000000 00:01 454        /bin2/test
      10017000-10018000 rw-p 00007000 00:01 454        /bin2/test
      b7f37000-b7f57000 r-xp 00000000 00:01 224        /lib/ld-2.11.3.so
      b7f58000-b7f5a000 rw-p 00021000 00:01 224        /lib/ld-2.11.3.so
      bff96000-bffb7000 rw-p 00000000 00:00 0          [stack]
      Signed-off-by: NDaniel Walker <dwalker@fifo90.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d5d8ec89
    • S
      powerpc/mm/nohash: Ignore NULL stale_map entries · 39a421ff
      Scott Wood 提交于
      This happens with threads that are offline due to CPU hotplug
      (including threads that were never "plugged in" to begin with because
      SMT is disabled).
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      39a421ff
  3. 01 6月, 2013 1 次提交
  4. 14 5月, 2013 2 次提交
  5. 06 5月, 2013 1 次提交
  6. 30 4月, 2013 18 次提交
  7. 26 4月, 2013 6 次提交
  8. 18 4月, 2013 2 次提交
    • L
      powerpc: Try to insert the hptes repeatedly in kernel_map_linear_page() · 016af59f
      Li Zhong 提交于
      This patch fixes the following oops, which could be trigged by build the kernel
      with many concurrent threads, under CONFIG_DEBUG_PAGEALLOC.
      
      hpte_insert() might return -1, indicating that the bucket (primary here)
      is full. We are not necessarily reporting a BUG in this case. Instead, we could
      try repeatedly (try secondary, remove and try again) until we find a slot.
      
      [  543.075675] ------------[ cut here ]------------
      [  543.075701] kernel BUG at arch/powerpc/mm/hash_utils_64.c:1239!
      [  543.075714] Oops: Exception in kernel mode, sig: 5 [#1]
      [  543.075722] PREEMPT SMP NR_CPUS=16 DEBUG_PAGEALLOC NUMA pSeries
      [  543.075741] Modules linked in: binfmt_misc ehea
      [  543.075759] NIP: c000000000036eb0 LR: c000000000036ea4 CTR: c00000000005a594
      [  543.075771] REGS: c0000000a90832c0 TRAP: 0700   Not tainted  (3.8.0-next-20130222)
      [  543.075781] MSR: 8000000000029032 <SF,EE,ME,IR,DR,RI>  CR: 22224482  XER: 00000000
      [  543.075816] SOFTE: 0
      [  543.075823] CFAR: c00000000004c200
      [  543.075830] TASK = c0000000e506b750[23934] 'cc1' THREAD: c0000000a9080000 CPU: 1
      GPR00: 0000000000000001 c0000000a9083540 c000000000c600a8 ffffffffffffffff
      GPR04: 0000000000000050 fffffffffffffffa c0000000a90834e0 00000000004ff594
      GPR08: 0000000000000001 0000000000000000 000000009592d4d8 c000000000c86854
      GPR12: 0000000000000002 c000000006ead300 0000000000a51000 0000000000000001
      GPR16: f000000003354380 ffffffffffffffff ffffffffffffff80 0000000000000000
      GPR20: 0000000000000001 c000000000c600a8 0000000000000001 0000000000000001
      GPR24: 0000000003354380 c000000000000000 0000000000000000 c000000000b65950
      GPR28: 0000002000000000 00000000000cd50e 0000000000bf50d9 c000000000c7c230
      [  543.076005] NIP [c000000000036eb0] .kernel_map_pages+0x1e0/0x3f8
      [  543.076016] LR [c000000000036ea4] .kernel_map_pages+0x1d4/0x3f8
      [  543.076025] Call Trace:
      [  543.076033] [c0000000a9083540] [c000000000036ea4] .kernel_map_pages+0x1d4/0x3f8 (unreliable)
      [  543.076053] [c0000000a9083640] [c000000000167638] .get_page_from_freelist+0x6cc/0x8dc
      [  543.076067] [c0000000a9083800] [c000000000167a48] .__alloc_pages_nodemask+0x200/0x96c
      [  543.076082] [c0000000a90839c0] [c0000000001ade44] .alloc_pages_vma+0x160/0x1e4
      [  543.076098] [c0000000a9083a80] [c00000000018ce04] .handle_pte_fault+0x1b0/0x7e8
      [  543.076113] [c0000000a9083b50] [c00000000018d5a8] .handle_mm_fault+0x16c/0x1a0
      [  543.076129] [c0000000a9083c00] [c0000000007bf1dc] .do_page_fault+0x4d0/0x7a4
      [  543.076144] [c0000000a9083e30] [c0000000000090e8] handle_page_fault+0x10/0x30
      [  543.076155] Instruction dump:
      [  543.076163] 7c630038 78631d88 e80a0000 f8410028 7c0903a6 e91f01de e96a0010 e84a0008
      [  543.076192] 4e800421 e8410028 7c7107b4 7a200fe0 <0b000000> 7f63db78 48785781 60000000
      [  543.076224] ---[ end trace bd5807e8d6ae186b ]---
      Signed-off-by: NLi Zhong <zhong@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      016af59f
    • L
      powerpc: Split the code trying to insert hpte repeatedly as an helper function · b170bd3d
      Li Zhong 提交于
      Move the logic trying to insert hpte in __hash_page_huge() to an helper
      function, so it could also be used by others.
      Signed-off-by: NLi Zhong <zhong@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      b170bd3d