1. 05 6月, 2018 2 次提交
  2. 04 6月, 2018 1 次提交
  3. 03 6月, 2018 15 次提交
  4. 28 5月, 2018 1 次提交
  5. 25 5月, 2018 8 次提交
    • M
      powerpc/chrp/time: Make some functions static, add missing header include · b87a358b
      Mathieu Malaterre 提交于
      Add a missing include <platforms/chrp/chrp.h>.
      
      These functions can all be static, make it so. Fix warnings treated as
      errors with W=1:
      
        arch/powerpc/platforms/chrp/time.c:41:13: error: no previous prototype for ‘chrp_time_init’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/time.c:66:5: error: no previous prototype for ‘chrp_cmos_clock_read’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/time.c:74:6: error: no previous prototype for ‘chrp_cmos_clock_write’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/time.c:86:5: error: no previous prototype for ‘chrp_set_rtc_time’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/time.c:130:6: error: no previous prototype for ‘chrp_get_rtc_time’ [-Werror=missing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      b87a358b
    • M
      powerpc/powermac: Add missing prototype for note_bootable_part() · f72cf3f1
      Mathieu Malaterre 提交于
      Add a missing prototype for function `note_bootable_part` to silence a
      warning treated as error with W=1:
      
        arch/powerpc/platforms/powermac/setup.c:361:12: error: no previous prototype for ‘note_bootable_part’ [-Werror=missing-prototypes]
      Suggested-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f72cf3f1
    • M
      powerpc/powermac: Move pmac_pfunc_base_install prototype to header file · f91d5998
      Mathieu Malaterre 提交于
      The pmac_pfunc_base_install prototype was declared in powermac/smp.c since
      function was used there, move it to pmac_pfunc.h header to be visible in
      pfunc_base.c. Fix a warning treated as error with W=1:
      
        arch/powerpc/platforms/powermac/pfunc_base.c:330:12: error: no previous prototype for ‘pmac_pfunc_base_install’ [-Werror=missing-prototypes]
      Suggested-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f91d5998
    • M
      powerpc/chrp/pci: Make some functions static · 910be6be
      Mathieu Malaterre 提交于
      These functions can all be static, make it so. Fix warnings treated as
      errors with W=1:
      
        arch/powerpc/platforms/chrp/pci.c:34:5: error: no previous prototype for ‘gg2_read_config’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/pci.c:61:5: error: no previous prototype for ‘gg2_write_config’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/pci.c:97:5: error: no previous prototype for ‘rtas_read_config’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/pci.c:112:5: error: no previous prototype for ‘rtas_write_config’ [-Werror=missing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      910be6be
    • M
      powerpc/powermac: Mark variable x as unused · 5a4b475c
      Mathieu Malaterre 提交于
      Since the value of x is never intended to be read, declare it with gcc
      attribute as unused. Fix warning treated as error with W=1:
      
        arch/powerpc/platforms/powermac/bootx_init.c:471:21: error: variable ‘x’ set but not used [-Werror=unused-but-set-variable]
      Suggested-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5a4b475c
    • M
      powerpc/chrp/setup: Remove idu_size variable and make some functions static · f0e0b866
      Mathieu Malaterre 提交于
      Remove variable declaration idu_size and associated code since not used.
      
      These functions can all be static, make it so. Fix warnings treated as
      errors with W=1:
      
        arch/powerpc/platforms/chrp/setup.c:97:6: error: no previous prototype for ‘chrp_show_cpuinfo’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/setup.c:302:13: error: no previous prototype for ‘chrp_setup_arch’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/setup.c:385:16: error: variable ‘idu_size’ set but not used [-Werror=unused-but-set-variable]
        arch/powerpc/platforms/chrp/setup.c:526:13: error: no previous prototype for ‘chrp_init_IRQ’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/setup.c:559:1: error: no previous prototype for ‘chrp_init2’ [-Werror=missing-prototypes]
      Suggested-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f0e0b866
    • M
      powerpc/wii: Make hlwd_pic_init function static · eed6964b
      Mathieu Malaterre 提交于
      The function hlwd_pic_init can be made static, so do it. Fix the following
      warning treated as error (W=1):
      
      ../arch/powerpc/platforms/embedded6xx/hlwd-pic.c:158:20: error: no previous prototype for ‘hlwd_pic_init’ [-Werror=missing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      eed6964b
    • M
      powerpc/sparse: Fix plain integer as NULL pointer warning · d8731527
      Mathieu Malaterre 提交于
      Trivial fix to remove the following sparse warnings:
      
        arch/powerpc/kernel/module_32.c:112:74: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/module_32.c:117:74: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:1155:28: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:1230:20: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:1385:36: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:1752:23: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:2084:19: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:2110:32: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:2167:19: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:2183:19: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:277:20: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/setup.c:155:67: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/setup.c:247:27: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/setup.c:249:27: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/setup.c:252:37: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:127:21: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:148:21: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:44:21: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:57:21: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:87:21: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/btext.c:160:31: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/btext.c:167:22: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/btext.c:274:21: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/btext.c:285:31: warning: Using plain integer as NULL pointer
        arch/powerpc/include/asm/hugetlb.h:204:16: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/ppc_mmu_32.c:170:21: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/pci.c:1227:23: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/pci.c:65:24: warning: Using plain integer as NULL pointer
      
      Also use `--fix` command line option from `script/checkpatch --strict` to
      remove the following:
      
        CHECK: Comparison to NULL could be written "!dispDeviceBase"
        #72: FILE: arch/powerpc/kernel/btext.c:160:
        +	if (dispDeviceBase == NULL)
      
        CHECK: Comparison to NULL could be written "!vbase"
        #80: FILE: arch/powerpc/kernel/btext.c:167:
        +	if (vbase == NULL)
      
        CHECK: Comparison to NULL could be written "!base"
        #89: FILE: arch/powerpc/kernel/btext.c:274:
        +	if (base == NULL)
      
        CHECK: Comparison to NULL could be written "!dispDeviceBase"
        #98: FILE: arch/powerpc/kernel/btext.c:285:
        +	if (dispDeviceBase == NULL)
      
        CHECK: Comparison to NULL could be written "strstr"
        #117: FILE: arch/powerpc/kernel/module_32.c:117:
        +		if (strstr(secstrings + sechdrs[i].sh_name, ".debug") != NULL)
      
        CHECK: Comparison to NULL could be written "!Hash"
        #130: FILE: arch/powerpc/mm/ppc_mmu_32.c:170:
        +	if (Hash == NULL)
      
        CHECK: Comparison to NULL could be written "Hash"
        #143: FILE: arch/powerpc/mm/tlb_hash32.c:44:
        +	if (Hash != NULL) {
      
        CHECK: Comparison to NULL could be written "!Hash"
        #152: FILE: arch/powerpc/mm/tlb_hash32.c:57:
        +	if (Hash == NULL) {
      
        CHECK: Comparison to NULL could be written "!Hash"
        #161: FILE: arch/powerpc/mm/tlb_hash32.c:87:
        +	if (Hash == NULL) {
      
        CHECK: Comparison to NULL could be written "!Hash"
        #170: FILE: arch/powerpc/mm/tlb_hash32.c:127:
        +	if (Hash == NULL) {
      
        CHECK: Comparison to NULL could be written "!Hash"
        #179: FILE: arch/powerpc/mm/tlb_hash32.c:148:
        +	if (Hash == NULL) {
      
        ERROR: space required after that ';' (ctx:VxV)
        #192: FILE: arch/powerpc/platforms/powermac/pci.c:65:
        +	for (; node != NULL;node = node->sibling) {
      
        CHECK: Comparison to NULL could be written "node"
        #192: FILE: arch/powerpc/platforms/powermac/pci.c:65:
        +	for (; node != NULL;node = node->sibling) {
      
        CHECK: Comparison to NULL could be written "!region"
        #201: FILE: arch/powerpc/platforms/powermac/pci.c:1227:
        +	if (region == NULL)
      
        CHECK: Comparison to NULL could be written "of_get_property"
        #214: FILE: arch/powerpc/platforms/powermac/setup.c:155:
        +		if (of_get_property(np, "cache-unified", NULL) != NULL && dc) {
      
        CHECK: Comparison to NULL could be written "!np"
        #223: FILE: arch/powerpc/platforms/powermac/setup.c:247:
        +		if (np == NULL)
      
        CHECK: Comparison to NULL could be written "np"
        #226: FILE: arch/powerpc/platforms/powermac/setup.c:249:
        +		if (np != NULL) {
      
        CHECK: Comparison to NULL could be written "l2cr"
        #230: FILE: arch/powerpc/platforms/powermac/setup.c:252:
        +			if (l2cr != NULL) {
      
        CHECK: Comparison to NULL could be written "via"
        #243: FILE: drivers/macintosh/via-pmu.c:277:
        +	if (via != NULL)
      
        CHECK: Comparison to NULL could be written "current_req"
        #252: FILE: drivers/macintosh/via-pmu.c:1155:
        +	if (current_req != NULL) {
      
        CHECK: Comparison to NULL could be written "!req"
        #261: FILE: drivers/macintosh/via-pmu.c:1230:
        +	if (req == NULL || pmu_state != idle
      
        CHECK: Comparison to NULL could be written "!req"
        #270: FILE: drivers/macintosh/via-pmu.c:1385:
        +			if (req == NULL) {
      
        CHECK: Comparison to NULL could be written "!pp"
        #288: FILE: drivers/macintosh/via-pmu.c:2084:
        +	if (pp == NULL)
      
        CHECK: Comparison to NULL could be written "!pp"
        #297: FILE: drivers/macintosh/via-pmu.c:2110:
        +	if (count < 1 || pp == NULL)
      
        CHECK: Comparison to NULL could be written "!pp"
        #306: FILE: drivers/macintosh/via-pmu.c:2167:
        +	if (pp == NULL)
      
        CHECK: Comparison to NULL could be written "pp"
        #315: FILE: drivers/macintosh/via-pmu.c:2183:
        +	if (pp != NULL) {
      
      Link: https://github.com/linuxppc/linux/issues/37Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d8731527
  6. 24 5月, 2018 1 次提交
  7. 22 5月, 2018 1 次提交
  8. 21 5月, 2018 1 次提交
  9. 18 5月, 2018 2 次提交
  10. 17 5月, 2018 2 次提交
    • N
      powerpc/powernv: Fix NVRAM sleep in invalid context when crashing · c1d2a313
      Nicholas Piggin 提交于
      Similarly to opal_event_shutdown, opal_nvram_write can be called in
      the crash path with irqs disabled. Special case the delay to avoid
      sleeping in invalid context.
      
      Fixes: 3b807033 ("powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops")
      Cc: stable@vger.kernel.org # v3.2
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c1d2a313
    • N
      powerpc/powernv: Fix opal_event_shutdown() called with interrupts disabled · c0beffc4
      Nicholas Piggin 提交于
      A kernel crash in process context that calls emergency_restart from
      panic will end up calling opal_event_shutdown with interrupts disabled
      but not in interrupt. This causes a sleeping function to be called
      which gives the following warning with sysrq+c:
      
          Rebooting in 10 seconds..
          BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238
          in_atomic(): 0, irqs_disabled(): 1, pid: 7669, name: bash
          CPU: 20 PID: 7669 Comm: bash Tainted: G      D W         4.17.0-rc5+ #3
          Call Trace:
          dump_stack+0xb0/0xf4 (unreliable)
          ___might_sleep+0x174/0x1a0
          mutex_lock+0x38/0xb0
          __free_irq+0x68/0x460
          free_irq+0x70/0xc0
          opal_event_shutdown+0xb4/0xf0
          opal_shutdown+0x24/0xa0
          pnv_shutdown+0x28/0x40
          machine_shutdown+0x44/0x60
          machine_restart+0x28/0x80
          emergency_restart+0x30/0x50
          panic+0x2a0/0x328
          oops_end+0x1ec/0x1f0
          bad_page_fault+0xe8/0x154
          handle_page_fault+0x34/0x38
          --- interrupt: 300 at sysrq_handle_crash+0x44/0x60
          LR = __handle_sysrq+0xfc/0x260
          flag_spec.62335+0x12b844/0x1e8db4 (unreliable)
          __handle_sysrq+0xfc/0x260
          write_sysrq_trigger+0xa8/0xb0
          proc_reg_write+0xac/0x110
          __vfs_write+0x6c/0x240
          vfs_write+0xd0/0x240
          ksys_write+0x6c/0x110
      
      Fixes: 9f0fd049 ("powerpc/powernv: Add a virtual irqchip for opal events")
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c0beffc4
  11. 16 5月, 2018 1 次提交
  12. 15 5月, 2018 3 次提交
    • J
      powerpc/embedded6xx/hlwd-pic: Prevent interrupts from being handled by Starlet · 9dcb3df4
      Jonathan Neuschäfer 提交于
      The interrupt controller inside the Wii's Hollywood chip is connected to
      two masters, the "Broadway" PowerPC and the "Starlet" ARM926, each with
      their own interrupt status and mask registers.
      
      When booting the Wii with mini[1], interrupts from the SD card
      controller (IRQ 7) are handled by the ARM, because mini provides SD
      access over IPC. Linux however can't currently use or disable this IPC
      service, so both sides try to handle IRQ 7 without coordination.
      
      Let's instead make sure that all interrupts that are unmasked on the PPC
      side are masked on the ARM side; this will also make sure that Linux can
      properly talk to the SD card controller (and potentially other devices).
      
      If access to a device through IPC is desired in the future, interrupts
      from that device should not be handled by Linux directly.
      
      [1]: https://github.com/lewurm/miniSigned-off-by: NJonathan Neuschäfer <j.neuschaefer@gmx.net>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      9dcb3df4
    • J
      powerpc/embedded6xx/flipper-pic: Don't match all IRQ domains · c068e6b8
      Jonathan Neuschäfer 提交于
      On the Wii, there is a secondary IRQ controller (hlwd-pic), so
      flipper-pic's match operation should not be hardcoded to return 1.
      In fact, the default matching logic is sufficient, and we can completely
      omit flipper_pic_match.
      Signed-off-by: NJonathan Neuschäfer <j.neuschaefer@gmx.net>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c068e6b8
    • A
      powerpc/book3s64: Enable split pmd ptlock. · 675d9952
      Aneesh Kumar K.V 提交于
      Testing with a threaded version of mmap_bench which allocate 1G chunks and
      with large number of threads we find:
      
      without patch
      
          32.72%  mmap_bench  [kernel.vmlinux]            [k] do_raw_spin_lock
                  |
                  ---do_raw_spin_lock
                     |
                      --32.68%--0
                                |
                                |--15.82%--pte_fragment_alloc
                                |          |
                                |           --15.79%--do_huge_pmd_anonymous_page
                                |                     __handle_mm_fault
                                |                     handle_mm_fault
                                |                     __do_page_fault
                                |                     handle_page_fault
                                |                     test_mmap
                                |                     test_mmap
                                |                     start_thread
                                |                     __clone
                                |
                                |--14.95%--do_huge_pmd_anonymous_page
                                |          __handle_mm_fault
                                |          handle_mm_fault
                                |          __do_page_fault
                                |          handle_page_fault
                                |          test_mmap
                                |          test_mmap
                                |          start_thread
                                |          __clone
                                |
      
      with patch
      
          12.89%  mmap_bench  [kernel.vmlinux]            [k] do_raw_spin_lock
                  |
                  ---do_raw_spin_lock
                     |
                      --12.83%--0
                                |
                                |--3.21%--pagevec_lru_move_fn
                                |          __lru_cache_add
                                |          |
                                |           --2.74%--do_huge_pmd_anonymous_page
                                |                     __handle_mm_fault
                                |                     handle_mm_fault
                                |                     __do_page_fault
                                |                     handle_page_fault
                                |                     test_mmap
                                |                     test_mmap
                                |                     start_thread
                                |                     __clone
                                |
                                |--3.11%--do_huge_pmd_anonymous_page
                                |          __handle_mm_fault
                                |          handle_mm_fault
                                |          __do_page_fault
                                |          handle_page_fault
                                |          test_mmap
                                |          test_mmap
                                |          start_thread
                                |          __clone
      
      .....
                                |
                                 --0.55%--pte_fragment_alloc
                                           |
                                            --0.55%--do_huge_pmd_anonymous_page
                                                      __handle_mm_fault
                                                      handle_mm_fault
                                                      __do_page_fault
                                                      handle_page_fault
                                                      test_mmap
                                                      test_mmap
                                                      start_thread
                                                      __clone
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      675d9952
  13. 14 5月, 2018 2 次提交