1. 04 9月, 2017 2 次提交
  2. 02 9月, 2017 1 次提交
  3. 14 6月, 2017 1 次提交
  4. 20 4月, 2017 1 次提交
  5. 25 12月, 2016 1 次提交
  6. 13 5月, 2016 2 次提交
    • 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
  7. 03 8月, 2015 2 次提交
    • 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
    • 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
  8. 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
  9. 31 3月, 2015 2 次提交
  10. 24 11月, 2014 7 次提交
  11. 30 5月, 2014 1 次提交
    • J
      MIPS: KVM: Override guest kernel timer frequency directly · eda3d33c
      James Hogan 提交于
      The KVM_HOST_FREQ Kconfig symbol was used by KVM guest kernels to
      override the timer frequency calculation to a value based on the host
      frequency. Now that the KVM timer emulation is implemented independent
      of the host timer frequency and defaults to 100MHz, adjust the working
      of CONFIG_KVM_HOST_FREQ to match.
      
      The Kconfig symbol now specifies the guest timer frequency directly, and
      has been renamed accordingly to KVM_GUEST_TIMER_FREQ. It now defaults to
      100MHz too and the help text is updated to make it clear that a zero
      value will allow the normal timer frequency calculation to take place
      (based on the emulated RTC).
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: kvm@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: Sanjay Lal <sanjayl@kymasys.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      eda3d33c
  12. 23 1月, 2014 2 次提交
  13. 19 9月, 2013 1 次提交
  14. 15 7月, 2013 1 次提交
    • P
      MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code · 078a55fc
      Paul Gortmaker 提交于
      commit 3747069b25e419f6b51395f48127e9812abc3596 upstream.
      
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      and are flagged as __cpuinit  -- so if we remove the __cpuinit from
      the arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      related content into no-ops as early as possible, since that will get
      rid of these warnings.  In any case, they are temporary and harmless.
      
      Here, we remove all the MIPS __cpuinit from C code and __CPUINIT
      from asm files.  MIPS is interesting in this respect, because there
      are also uasm users hiding behind their own renamed versions of the
      __cpuinit macros.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      [ralf@linux-mips.org: Folded in Paul's followup fix.]
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5494/
      Patchwork: https://patchwork.linux-mips.org/patch/5495/
      Patchwork: https://patchwork.linux-mips.org/patch/5509/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      078a55fc
  15. 09 5月, 2013 2 次提交
    • S
      MIPS: Refactor GIC clocksource code. · dfa762e1
      Steven J. Hill 提交于
      Reorganize some of the GIC clocksource driver code. Below is a list of
      the various changes.
      
        * No longer select CSRC_GIC by default for Malta platform.
        * Limit choice for either the GIC or R4K clocksource, not both.
        * Change location in Makefile.
        * Created new 'gic_read_count' function in common 'irq-gic.c' file.
        * Change 'git_hpt_read' function in 'csrc-gic.c' to use new function.
        * Surround GIC specific code in Malta platform code with #ifdef's.
        * Only initialize the GIC clocksource if it was selected. Original
          code called it unconditionally if a GIC was found.
      Signed-off-by: NSteven J. Hill <Steven.Hill@imgtec.com>
      dfa762e1
    • S
      MIPS: Move 'gic_frequency' to common location. · 28ea2151
      Steven J. Hill 提交于
      Move the global variable 'gic_frequency' to be defined in the file
      'arch/mips/kernel/irq-gic.c' instead of defining it individually
      for each platform making use of the GIC. Also change the type to
      be an unsigned integer instead of signed.
      Signed-off-by: NSteven J. Hill <Steven.Hill@imgtec.com>
      28ea2151
  16. 08 5月, 2013 2 次提交
  17. 17 2月, 2013 1 次提交
  18. 01 2月, 2013 1 次提交
  19. 29 3月, 2012 1 次提交
  20. 09 6月, 2011 1 次提交
  21. 29 3月, 2011 1 次提交
  22. 15 8月, 2009 1 次提交
  23. 16 7月, 2008 5 次提交