1. 04 9月, 2017 2 次提交
  2. 02 9月, 2017 1 次提交
  3. 30 8月, 2017 2 次提交
  4. 29 8月, 2017 1 次提交
    • P
      MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts · 93c5bba5
      Paul Burton 提交于
      There's no reason for us not to use BIT() & GENMASK() in asm/mips-cm.h
      when declaring macros corresponding to register fields. This patch
      modifies our definitions to do so.
      
      The *_SHF definitions are removed entirely - they duplicate information
      found in the masks, are infrequently used & can be replaced with use of
      __ffs() where needed.
      
      The *_MSK definitions then lose their _MSK suffix which is now somewhat
      redundant, and users are modified to match.
      
      The field definitions are moved to follow the appropriate register's
      accessor functions, which helps to keep the field definitions in order &
      to find the appropriate fields for a given register. Whilst here a
      comment is added describing each register & including its name, which is
      helpful both for linking the register back to hardware documentation &
      for grepping purposes.
      
      This also cleans up a couple of issues that became obvious as a result
      of making the changes described above:
      
        - We previously had definitions for GCR_Cx_RESET_EXT_BASE & a phony
          copy of that named GCR_RESET_EXT_BASE - a register which does not
          exist. The bad definitions were added by commit 497e803e ("MIPS:
          smp-cps: Ensure secondary cores start with EVA disabled") and made
          use of from boot_core(), which is now modified to use the
          GCR_Cx_RESET_EXT_BASE definitions.
      
        - We had a typo in CM_GCR_ERROR_CAUSE_ERRINGO_MSK - we now correctly
          define this as inFo rather than inGo.
      
      Now that we don't duplicate field information between _SHF & _MSK
      definitions, and keep the fields next to the register accessors, it will
      be much easier to spot & prevent any similar oddities being introduced
      in the future.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Acked-by: Thomas Gleixner <tglx@linutronix.de
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17001/
      Patchwork: https://patchwork.linux-mips.org/patch/17216/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      93c5bba5
  5. 14 6月, 2017 1 次提交
  6. 20 4月, 2017 1 次提交
  7. 13 4月, 2017 1 次提交
  8. 10 4月, 2017 1 次提交
    • M
      MIPS: Malta: Fix i8259 irqchip setup · 9eec1c01
      Matt Redfearn 提交于
      Since commit 4cfffcfa ("irqchip/mips-gic: Fix local interrupts"),
      the gic driver has been allocating virq's for local interrupts during
      its initialisation. Unfortunately on Malta platforms, these are the
      first IRQs to be allocated and so are allocated virqs 1-3. The i8259
      driver uses a legacy irq domain which expects to map virqs 0-15. Probing
      of that driver therefore fails because some of those virqs are already
      taken, with the warning:
      
      WARNING: CPU: 0 PID: 0 at kernel/irq/irqdomain.c:344
      irq_domain_associate+0x1e8/0x228
      error: virq1 is already associated
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc6-00011-g4cfffcfa #368
      Stack : 00000000 00000000 807ae03a 0000004d 00000000 806c1010 0000000b ffff0a01
              80725467 807258f4 806a64a4 00000000 00000000 807a9acc 00000100 80713e68
              806d5598 8017593c 8072bf90 8072bf94 806ac358 00000000 806abb60 80713ce4
              00000100 801b22d4 806d5598 8017593c 807ae03a 00000000 80713ce4 80720000
              00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
              ...
      Call Trace:
      [<8010c480>] show_stack+0x88/0xa4
      [<80376758>] dump_stack+0x88/0xd0
      [<8012c4a8>] __warn+0x104/0x118
      [<8012c4ec>] warn_slowpath_fmt+0x30/0x3c
      [<8017edfc>] irq_domain_associate+0x1e8/0x228
      [<8017efd0>] irq_domain_add_legacy+0x7c/0xb0
      [<80764c50>] __init_i8259_irqs+0x64/0xa0
      [<80764ca4>] i8259_of_init+0x18/0x74
      [<8076ddc0>] of_irq_init+0x19c/0x310
      [<80752dd8>] arch_init_irq+0x28/0x19c
      [<80750a08>] start_kernel+0x2a8/0x434
      
      Fix this by reserving the required i8259 virqs in malta platform code
      before probing any irq chips.
      
      Fixes: 4cfffcfa ("irqchip/mips-gic: Fix local interrupts")
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15919/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      9eec1c01
  9. 14 2月, 2017 1 次提交
    • P
      MIPS: Audit and remove any unnecessary uses of module.h · 26dd3e4f
      Paul Gortmaker 提交于
      Historically a lot of these existed because we did not have
      a distinction between what was modular code and what was providing
      support to modules via EXPORT_SYMBOL and friends.  That changed
      when we forked out support for the latter into the export.h file.
      
      This means we should be able to reduce the usage of module.h
      in code that is obj-y Makefile or bool Kconfig.  In the case of
      some code where it is modular, we can extend that to also include
      files that are building basic support functionality but not related
      to loading or registering the final module; such files also have
      no need whatsoever for module.h
      
      The advantage in removing such instances is that module.h itself
      sources about 15 other headers; adding significantly to what we feed
      cpp, and it can obscure what headers we are effectively using.
      
      Since module.h might have been the implicit source for init.h
      (for __init) and for export.h (for EXPORT_SYMBOL) we consider each
      instance for the presence of either and replace/add as needed.
      
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      
      Build coverage of all the mips defconfigs revealed the module.h
      header was masking a couple of implicit include instances, so
      we add the appropriate headers there.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: John Crispin <john@phrozen.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "Steven J. Hill" <steven.hill@cavium.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/15131/
      [james.hogan@imgtec.com: Preserve sort order where it already exists]
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      26dd3e4f
  10. 25 12月, 2016 1 次提交
  11. 07 10月, 2016 2 次提交
    • P
      MIPS: Print CM error reports upon bus errors · dabdc185
      Paul Burton 提交于
      If a bus error occurs on a system with a MIPS Coherence Manager (CM)
      then the CM may hold useful diagnostic information. Printing this out
      has so far been left up to boards, with the requirement that they
      register a board_be_handler function & call mips_cm_error_decode() from
      there.
      
      In order to avoid boards other than Malta needing to duplicate this
      code, call mips_cm_error_decode() automatically if the board registers
      no board_be_handler, and remove the Malta implementation of that.
      
      This patch results in no functional change, but removes a further piece
      of platform-specific code.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14350/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      dabdc185
    • P
      MIPS: Sanitise coherentio semantics · f2302023
      Paul Burton 提交于
      The coherentio variable has previously been used as a boolean value,
      indicating whether the user specified that coherent I/O should be
      enabled or disabled. It failed to take into account the case where the
      user does not specify any preference, in which case it makes sense that
      we should default to coherent I/O if the hardware supports it
      (hw_coherentio is non-zero).
      
      Introduce an enum to clarify the 3 different values of coherentio & use
      it throughout the code, modifying plat_device_is_coherent() &
      r4k_cache_init() to take into account the default case.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Paul Burton <paul.burton@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/14347/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f2302023
  12. 06 10月, 2016 8 次提交
  13. 04 10月, 2016 1 次提交
  14. 30 9月, 2016 1 次提交
    • P
      MIPS: Malta: Fix IOCU disable switch read for MIPS64 · 305723ab
      Paul Burton 提交于
      Malta boards used with CPU emulators feature a switch to disable use of
      an IOCU. Software has to check this switch & ignore any present IOCU if
      the switch is closed. The read used to do this was unsafe for 64 bit
      kernels, as it simply casted the address 0xbf403000 to a pointer &
      dereferenced it. Whilst in a 32 bit kernel this would access kseg1, in a
      64 bit kernel this attempts to access xuseg & results in an address
      error exception.
      
      Fix by accessing a correctly formed ckseg1 address generated using the
      CKSEG1ADDR macro.
      
      Whilst modifying this code, define the name of the register and the bit
      we care about within it, which indicates whether PCI DMA is routed to
      the IOCU or straight to DRAM. The code previously checked that bit 0 was
      also set, but the least significant 7 bits of the CONFIG_GEN0 register
      contain the value of the MReqInfo signal provided to the IOCU OCP bus,
      so singling out bit 0 makes little sense & that part of the check is
      dropped.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Fixes: b6d92b4a ("MIPS: Add option to disable software I/O coherency.")
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14187/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      305723ab
  15. 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
  16. 13 5月, 2016 3 次提交
    • J
      MIPS: malta-time: Take seconds into account · 24e1df66
      James Hogan 提交于
      When estimating the clock frequency based on the RTC, take seconds into
      account in case the Update In Progress (UIP) bit wasn't seen. This can
      happen in virtual machines (which may get pre-empted by the hypervisor
      at inopportune times) with QEMU emulating the RTC (and in fact not
      setting the UIP bit for very long), especially on slow hosts such as
      FPGA systems and hardware emulators. This results in several seconds
      actually having elapsed before seeing the UIP bit instead of just one
      second, and exaggerated timer frequencies.
      
      While updating the comments, they're also fixed to match the code in
      that the rising edge of the update flag is detected first, not the
      falling edge.
      
      The rising edge gives a more precise point to read the counters in a
      virtualised system than the falling edge, resulting in a more accurate
      frequency.
      
      It does however mean that we have to also wait for the falling edge
      before doing the read of the RTC seconds register, otherwise it seems to
      be possible in slow hardware emulation to stray into the interval when
      the RTC time is undefined during the update (at least 244uS after the
      rising edge of the update flag). This can result in both seconds values
      reading the same, and it wrapping to 60 seconds, vastly underestimating
      the frequency.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/13174/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      24e1df66
    • J
      MIPS: malta-time: Start GIC count before syncing to RTC · aab4673b
      James Hogan 提交于
      The sampling of the GIC counter on Malta after observing a rising edge
      of the RTC update flag differs slightly between the first and second
      sample, with the first sample also calling gic_start_count(). The two
      samples should really be taken as similarly as possible to get the most
      accurate figure, so move the gic_start_count() call before detecting the
      rising edge.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/13173/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      aab4673b
    • M
      MIPS: Introduce plat_get_fdt a platform API to retrieve the FDT · 5e7c1c91
      Matt Redfearn 提交于
      Early access to the kernel command line requires early access to the FDT
      for platforms which pass the command line within the device tree. There
      was no common way to retrieve the location of the FDT without incurring
      side effects, such as plat_mem_setup which, on Malta at least,
      initializes a bunch of other stuff.
      
      This patch adds plat_get_ftd() for IMG platforms.
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: kernel-hardening@lists.openwall.com
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/12988/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5e7c1c91
  17. 10 2月, 2016 1 次提交
    • P
      MIPS: Fix early CM probing · 3af5a67c
      Paul Burton 提交于
      Commit c014d164 ("MIPS: Add platform callback before initializing
      the L2 cache") added a platform_early_l2_init function in order to allow
      platforms to probe for the CM before L2 initialisation is performed, so
      that CM GCRs are available to mips_sc_probe.
      
      That commit actually fails to do anything useful, since it checks
      mips_cm_revision to determine whether it should call mips_cm_probe but
      the result of mips_cm_revision will always be 0 until mips_cm_probe has
      been called. Thus the "early" mips_cm_probe call never occurs.
      
      Fix this & drop the useless weak platform_early_l2_init function by
      simply calling mips_cm_probe from setup_arch. For platforms that don't
      select CONFIG_MIPS_CM this will be a no-op, and for those that do it
      removes the requirement for them to call mips_cm_probe manually
      (although doing so isn't harmful for now).
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Reviewed-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Jaedon Shin <jaedon.shin@gmail.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jonas Gorski <jogo@openwrt.org>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/12475/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      3af5a67c
  18. 11 11月, 2015 4 次提交
    • P
      MIPS: Malta: Register UP SMP ops if all else fails · ecafe3e9
      Paul Burton 提交于
      If we fail to register any real SMP implementations, fall back to
      registering the dummy UP implementation. Otherwise when we build an SMP
      kernel & run it on a system where the SMP implementations fail to probe
      (eg. QEMU) the kernel will perform a NULL dereference attempting to call
      mp_ops->smp_setup() from plat_smp_setup().
      
      Notably this fixes booting kernels with CPS SMP enabled on QEMU, which
      doesn't currently implement the CM, CPC or GIC.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11223/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ecafe3e9
    • P
      MIPS: Malta: Setup RAM regions via DT · e81a8c7d
      Paul Burton 提交于
      Move memory configuration to be performed via device tree for the Malta
      board. This moves more Malta specific code to malta-dtshim.c, leaving
      the rest of the mti-malta code a little more board-agnostic. This will
      be useful to share more code between boards, with the device tree
      providing the board specifics as intended.
      
      Since we can't rely upon Malta boards running a bootloader capable of
      handling devictrees & filling in the required information, a piece of
      shim code (malta_dt_shim) is added to consume the (e)memsize variables
      provided as part of the bootloader environment (or on the kernel command
      line) then generate the DT memory node using the provided values.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: Kumar Gala <galak@codeaurora.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11222/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e81a8c7d
    • P
      MIPS: Malta: Remove fw_memblock_t abstraction · ea050714
      Paul Burton 提交于
      The fw_getmdesc function & fw_memblock_t abstraction is only used by
      Malta, and so far as I can tell serves no purpose beyond making the code
      less clear than it could be. Remove the useless level of abstraction.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11221/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ea050714
    • P
      MIPS: Malta: Split obj-y entries across lines · e1137e1d
      Paul Burton 提交于
      Split the obj-y entries to their own lines such that it's easier to see
      what's going on when adding or removing entries.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11220/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e1137e1d
  19. 03 9月, 2015 1 次提交
  20. 26 8月, 2015 2 次提交
  21. 03 8月, 2015 3 次提交
    • F
      MIPS: Export get_c0_perfcount_int() · 0cb0985f
      Felix Fietkau 提交于
      get_c0_perfcount_int is tested from oprofile code. If oprofile is
      compiled as module, get_c0_perfcount_int needs to be exported, otherwise
      it cannot be resolved.
      
      Fixes: a669efc4 ("MIPS: Add hook to get C0 performance counter interrupt")
      Cc: stable@vger.kernel.org # v3.19+
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Cc: linux-mips@linux-mips.org
      Cc: abrestic@chromium.org
      Patchwork: https://patchwork.linux-mips.org/patch/10763/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0cb0985f
    • A
      MIPS: SMP: Don't increment irq_count multiple times for call function IPIs · 4ace6139
      Alex Smith 提交于
      The majority of SMP platforms handle their IPIs through do_IRQ()
      which calls irq_{enter/exit}(). When a call function IPI is received,
      smp_call_function_interrupt() is called which also calls
      irq_{enter,exit}(), meaning irq_count is raised twice.
      
      When tick broadcasting is used (which is implemented via a call
      function IPI), this incorrectly causes all CPU idle time on the core
      receiving broadcast ticks to be accounted as time spent servicing
      IRQs, as account_process_tick() will account as such if irq_count is
      greater than 1. This results in 100% CPU usage being reported on a
      core which receives its ticks via broadcast.
      
      This patch removes the SMP smp_call_function_interrupt() wrapper which
      calls irq_{enter,exit}(). Platforms which handle their IPIs through
      do_IRQ() now call generic_smp_call_function_interrupt() directly to
      avoid incrementing irq_count a second time. Platforms which don't
      (loongson, sgi-ip27, sibyte) call generic_smp_call_function_interrupt()
      wrapped in irq_{enter,exit}().
      Signed-off-by: NAlex Smith <alex.smith@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10770/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      4ace6139
    • J
      MIPS: Malta: Don't reinitialise RTC · 106eccb4
      James Hogan 提交于
      On Malta, since commit a87ea88d ("MIPS: Malta: initialise the RTC at
      boot"), the RTC is reinitialised and forced into binary coded decimal
      (BCD) mode during init, even if the bootloader has already initialised
      it, and may even have already put it into binary mode (as YAMON does).
      This corrupts the current time, can result in the RTC seconds being an
      invalid BCD (e.g. 0x1a..0x1f) for up to 6 seconds, as well as confusing
      YAMON for a while after reset, enough for it to report timeouts when
      attempting to load from TFTP (it actually uses the RTC in that code).
      
      Therefore only initialise the RTC to the extent that is necessary so
      that Linux avoids interfering with the bootloader setup, while also
      allowing it to estimate the CPU frequency without hanging, without a
      bootloader necessarily having done anything with the RTC (for example
      when the kernel is loaded via EJTAG).
      
      The divider control is configured for a 32KHZ reference clock if
      necessary, and the SET bit of the RTC_CONTROL register is cleared if
      necessary without changing any other bits (this bit will be set when
      coming out of reset if the battery has been disconnected).
      
      Fixes: a87ea88d ("MIPS: Malta: initialise the RTC at boot")
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: <stable@vger.kernel.org> # 3.14+
      Patchwork: https://patchwork.linux-mips.org/patch/10739/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      106eccb4
  22. 10 7月, 2015 1 次提交
    • J
      MIPS: Malta: Make GIC FDC IRQ workaround Malta specific · 6249ecbb
      James Hogan 提交于
      Wider testing reveals that the Fast Debug Channel (FDC) interrupt is
      routed through the GIC just fine on Pistachio SoC, even though it
      contains interAptiv cores. Clearly the FDC interrupt routing problems
      previously observed on interAptiv and proAptiv cores are specific to the
      Malta FPGA bitstreams.
      
      Move the workaround for interAptiv and proAptiv out of
      gic_get_c0_fdc_int() in the GIC irqchip driver into Malta's
      get_c0_fdc_int() platform callback, to allow the Pistachio SoC to use
      the FDC interrupt.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: linux-mips@linux-mips.org
      Reviewed-by: NAndrew Bresticker <abrestic@chromium.org>
      Cc: James Hartley <james.hartley@imgtec.com>
      Patchwork: http://patchwork.linux-mips.org/patch/9748/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6249ecbb