1. 04 8月, 2016 1 次提交
    • M
      tree-wide: replace config_enabled() with IS_ENABLED() · 97f2645f
      Masahiro Yamada 提交于
      The use of config_enabled() against config options is ambiguous.  In
      practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the
      author might have used it for the meaning of IS_ENABLED().  Using
      IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc.  makes the intention
      clearer.
      
      This commit replaces config_enabled() with IS_ENABLED() where possible.
      This commit is only touching bool config options.
      
      I noticed two cases where config_enabled() is used against a tristate
      option:
      
       - config_enabled(CONFIG_HWMON)
        [ drivers/net/wireless/ath/ath10k/thermal.c ]
      
       - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
        [ drivers/gpu/drm/gma500/opregion.c ]
      
      I did not touch them because they should be converted to IS_BUILTIN()
      in order to keep the logic, but I was not sure it was the authors'
      intention.
      
      Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.comSigned-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Cc: Stas Sergeev <stsp@list.ru>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Joshua Kinard <kumba@gentoo.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: "Dmitry V. Levin" <ldv@altlinux.org>
      Cc: yu-cheng yu <yu-cheng.yu@intel.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Nikolay Martynov <mar.kolya@gmail.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Rafal Milecki <zajec5@gmail.com>
      Cc: James Cowgill <James.Cowgill@imgtec.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
      Cc: Qais Yousef <qais.yousef@imgtec.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Mikko Rapeli <mikko.rapeli@iki.fi>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
      Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Roland McGrath <roland@hack.frob.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Tony Wu <tung7970@gmail.com>
      Cc: Huaitong Han <huaitong.han@intel.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrea Gelmini <andrea.gelmini@gelma.net>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Rabin Vincent <rabin@rab.in>
      Cc: "Maciej W. Rozycki" <macro@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97f2645f
  2. 13 5月, 2016 1 次提交
    • M
      MIPS: pm-cps: Avoid offset overflow on MIPSr6 · 0f2a1484
      Markos Chandras 提交于
      This is similar to commit 934c7923 ("MIPS: asm: r4kcache: Add MIPS
      R6 cache unroll functions"). The CACHE instruction has been redefined
      for MIPSr6 and it reduced its offset field to 8 bits. This leads to
      micro-assembler field overflow warnings when booting SMP MIPSr6 cores
      like the following one:
      
      Call Trace:
      [<ffffffff8010af88>] show_stack+0x68/0x88
      [<ffffffff8056ddf0>] dump_stack+0x68/0x88
      [<ffffffff801305bc>] warn_slowpath_common+0x8c/0xc8
      [<ffffffff80130630>] warn_slowpath_fmt+0x38/0x48
      [<ffffffff80125814>] build_insn+0x514/0x5c0
      [<ffffffff806ee134>] cps_gen_cache_routine.isra.3+0xe0/0x1b8
      [<ffffffff806ee570>] cps_pm_init+0x364/0x9ec
      [<ffffffff80100538>] do_one_initcall+0x90/0x1a8
      [<ffffffff806e8c14>] kernel_init_freeable+0x160/0x21c
      [<ffffffff8056b6a0>] kernel_init+0x10/0xf8
      [<ffffffff801059f8>] ret_from_kernel_thread+0x14/0x1c
      
      We fix this by incrementing the base register on every loop.
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/12329/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0f2a1484
  3. 03 4月, 2016 1 次提交
  4. 26 8月, 2015 1 次提交
  5. 31 7月, 2014 2 次提交
  6. 16 6月, 2014 1 次提交
    • P
      MIPS: pm-cps: convert smp_mb__*() · 7c5491b8
      Paul Burton 提交于
      Commit 91bbefe6 "arch,mips: Convert smp_mb__*()" replaced the
      smp_mb__* functions with a simpler API, whilst commit 3179d37e
      "MIPS: pm-cps: add PM state entry code for CPS systems" introduced
      new uses of smp_mb__before_atomic_inc & smp_mb__after_clear_bit.
      Replace those calls with the corresponding before & after atomic
      functions of the new, simpler API in order to avoid a build failure:
      
        arch/mips/kernel/pm-cps.c: In function 'coupled_barrier':
        arch/mips/kernel/pm-cps.c:104:2: error: 'smp_mb__before_atomic_inc' is
          deprecated (declared at include/linux/atomic.h:11)
          [-Werror=deprecated-declarations]
      
        arch/mips/kernel/pm-cps.c: In function 'cps_pm_enter_state':
        arch/mips/kernel/pm-cps.c:161:2: error: 'smp_mb__after_clear_bit' is
          deprecated (declared at include/linux/bitops.h:48)
          [-Werror=deprecated-declarations]
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Reviewed-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/7086/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      7c5491b8
  7. 28 5月, 2014 1 次提交
    • P
      MIPS: pm-cps: add PM state entry code for CPS systems · 3179d37e
      Paul Burton 提交于
      This patch adds code to generate entry & exit code for various low power
      states available on systems based around the MIPS Coherent Processing
      System architecture (ie. those with a Coherence Manager, Global
      Interrupt Controller & for >=CM2 a Cluster Power Controller). States
      supported are:
      
        - Non-coherent wait. This state first leaves the coherent domain and
          then executes a regular MIPS wait instruction. Power savings are
          found from the elimination of coherency interventions between the
          core and any other coherent requestors in the system.
      
        - Clock gated. This state leaves the coherent domain and then gates
          the clock input to the core. This removes all dynamic power from the
          core but leaves the core at the mercy of another to restart its
          clock. Register state is preserved, but the core can not service
          interrupts whilst its clock is gated.
      
        - Power gated. This deepest state removes all power input to the core.
          All register state is lost and the core will restart execution from
          its BEV when another core powers it back up. Because register state
          is lost this state requires cooperation with the CONFIG_MIPS_CPS SMP
          implementation in order for the core to exit the state successfully.
      
      The code will detect which states are available on the current system
      during boot & generate the entry/exit code for those states. This will
      be used by cpuidle & hotplug implementations.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      3179d37e