1. 26 3月, 2011 18 次提交
  2. 24 3月, 2011 6 次提交
  3. 23 3月, 2011 2 次提交
  4. 18 3月, 2011 1 次提交
  5. 17 3月, 2011 1 次提交
  6. 16 3月, 2011 1 次提交
  7. 15 3月, 2011 11 次提交
    • F
      MIPS: Alchemy: Fix reset for MTX-1 and XXS1500 · 9ced9757
      Florian Fainelli 提交于
      Since commit 32fd6901 (MIPS: Alchemy: get rid of common/reset.c)
      Alchemy-based boards use their own reset function. For MTX-1 and XXS1500,
      the reset function pokes at the BCSR.SYSTEM_RESET register, but this does
      not work. According to Bruno Randolf, this was not tested when written.
      
      Previously, the generic au1000_restart() routine called the board specific
      reset function, which for MTX-1 and XXS1500 did not work, but finally made
      a jump to the reset vector, which really triggers a system restart. Fix
      reboot for both targets by jumping to the reset vector.
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      To: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/2093/Acked-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      9ced9757
    • F
      MIPS: MTX-1: Make au1000_eth probe all PHY addresses · bf3a1eb8
      Florian Fainelli 提交于
      When au1000_eth probes the MII bus for PHY address, if we do not set
      au1000_eth platform data's phy_search_highest_address, the MII probing
      logic will exit early and will assume a valid PHY is found at address 0.
      For MTX-1, the PHY is at address 31, and without this patch, the link
      detection/speed/duplex would not work correctly.
      
      CC: stable@kernel.org
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      To: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/2111/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      bf3a1eb8
    • M
      MIPS: Jz4740: Add HAVE_CLK · ab5330eb
      Maurus Cuelenaere 提交于
      Jz4740 supports the clock framework but doesn't have HAVE_CLK defined,
      so define it!
      Signed-off-by: NMaurus Cuelenaere <mcuelenaere@gmail.com>
      To: linux-mips@linux-mips.org
      To: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/2112/Acked-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ab5330eb
    • M
      MIPS: Move idle task creation to work queue · 6667deb6
      Maksim Rayskiy 提交于
      To avoid forking usermode thread when creating an idle task, move fork_idle
      to a work queue.
      
      If kernel starts with maxcpus= option which does not bring all available
      cpus online at boot time, idle tasks for offline cpus are not created. If
      later offline cpus are hotplugged through sysfs, __cpu_up is called in
      the context of the user task, and fork_idle copies its non-zero mm
      pointer.  This causes BUG() in per_cpu_trap_init.
      
      This also avoids issues with resource limits of the CPU writing to sysfs,
      containers, maybe others.
      Signed-off-by: NMaksim Rayskiy <mrayskiy@broadcom.com>
      To: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/2070/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6667deb6
    • D
      MIPS, Perf-events: Use unsigned delta for right shift in event update · ba9786f3
      Deng-Cheng Zhu 提交于
      Leverage the commit for ARM by Will Deacon:
      
      - 446a5a8b
          ARM: 6205/1: perf: ensure counter delta is treated as unsigned
      
          Hardware performance counters on ARM are 32-bits wide but atomic64_t
          variables are used to represent counter data in the hw_perf_event structure.
      
          The armpmu_event_update function right-shifts a signed 64-bit delta variable
          and adds the result to the event count. This can lead to shifting in sign-bits
          if the MSB of the 32-bit counter value is set. This results in perf output
          such as:
      
           Performance counter stats for 'sleep 20':
      
           18446744073460670464  cycles             <-- 0xFFFFFFFFF12A6000
                  7783773  instructions             #      0.000 IPC
                      465  context-switches
                      161  page-faults
                  1172393  branches
      
             20.154242147  seconds time elapsed
      
          This patch ensures that the delta value is treated as unsigned so that the
          right shift sets the upper bits to zero.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: a.p.zijlstra@chello.nl
      To: fweisbec@gmail.com
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: wuzhangjin@gmail.com
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com
      Patchwork: http://patchwork.linux-mips.org/patch/2015/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ba9786f3
    • D
      MIPS, Perf-events: Work with the new callchain interface · 98f92f2f
      Deng-Cheng Zhu 提交于
      This is the MIPS part of the following commits by Frederic Weisbecker:
      
      - f72c1a93
          perf: Factorize callchain context handling
      
          Store the kernel and user contexts from the generic layer instead
          of archs, this gathers some repetitive code.
      
      - 56962b44
          perf: Generalize some arch callchain code
      
          - Most archs use one callchain buffer per cpu, except x86 that needs
            to deal with NMIs. Provide a default perf_callchain_buffer()
            implementation that x86 overrides.
      
          - Centralize all the kernel/user regs handling and invoke new arch
            handlers from there: perf_callchain_user() / perf_callchain_kernel()
            That avoid all the user_mode(), current->mm checks and so...
      
          - Invert some parameters in perf_callchain_*() helpers: entry to the
            left, regs to the right, following the traditional (dst, src).
      
      - 70791ce9
          perf: Generalize callchain_store()
      
          callchain_store() is the same on every archs, inline it in
          perf_event.h and rename it to perf_callchain_store() to avoid
          any collision.
      
          This removes repetitive code.
      
      - c1a65932
          perf: Drop unappropriate tests on arch callchains
      
          Drop the TASK_RUNNING test on user tasks for callchains as
          this check doesn't seem to make any sense.
      
          Also remove the tests for !current that is not supposed to
          happen and current->pid as this should be handled at the
          generic level, with exclude_idle attribute.
      Reported-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: a.p.zijlstra@chello.nl
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: dengcheng.zhu@gmail.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com
      Patchwork: http://patchwork.linux-mips.org/patch/2014/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      98f92f2f
    • D
      MIPS, Perf-events: Fix event check in validate_event() · c049b6a5
      Deng-Cheng Zhu 提交于
      Ignore events that are in off/error state or belong to a different PMU.
      
      This patch originates from the following commit for ARM by Will Deacon:
      
      - 65b4711f
          ARM: 6352/1: perf: fix event validation
      
          The validate_event function in the ARM perf events backend has the
          following problems:
      
          1.) Events that are disabled count towards the cost.
          2.) Events associated with other PMUs [for example, software events or
              breakpoints] do not count towards the cost, but do fail validation,
              causing the group to fail.
      
          This patch changes validate_event so that it ignores events in the
          PERF_EVENT_STATE_OFF state or that are scheduled for other PMUs.
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: a.p.zijlstra@chello.nl
      To: fweisbec@gmail.com
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: wuzhangjin@gmail.com
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: dengcheng.zhu@gmail.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com
      Cc: ddaney@caviumnetworks.com
      Patchwork: http://patchwork.linux-mips.org/patch/2013/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c049b6a5
    • D
      MIPS, Perf-events: Work with the new PMU interface · 404ff638
      Deng-Cheng Zhu 提交于
      This is the MIPS part of the following commits by Peter Zijlstra:
      
      - a4eaf7f1
          perf: Rework the PMU methods
      
          Replace pmu::{enable,disable,start,stop,unthrottle} with
          pmu::{add,del,start,stop}, all of which take a flags argument.
      
          The new interface extends the capability to stop a counter while
          keeping it scheduled on the PMU. We replace the throttled state with
          the generic stopped state.
      
          This also allows us to efficiently stop/start counters over certain
          code paths (like IRQ handlers).
      
          It also allows scheduling a counter without it starting, allowing for
          a generic frozen state (useful for rotating stopped counters).
      
          The stopped state is implemented in two different ways, depending on
          how the architecture implemented the throttled state:
      
           1) We disable the counter:
              a) the pmu has per-counter enable bits, we flip that
              b) we program a NOP event, preserving the counter state
      
           2) We store the counter state and ignore all read/overflow events
      
      For MIPSXX, the stopped state is implemented in the way of 1.b as above.
      
      - 33696fc0
          perf: Per PMU disable
      
          Changes perf_disable() into perf_pmu_disable().
      
      - 24cd7f54
          perf: Reduce perf_disable() usage
      
          Since the current perf_disable() usage is only an optimization,
          remove it for now. This eases the removal of the __weak
          hw_perf_enable() interface.
      
      - b0a873eb
          perf: Register PMU implementations
      
          Simple registration interface for struct pmu, this provides the
          infrastructure for removing all the weak functions.
      
      - 51b0fe39
          perf: Deconstify struct pmu
      
          sed -ie 's/const struct pmu\>/struct pmu/g' `git grep -l "const struct pmu\>"`
      Reported-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: a.p.zijlstra@chello.nl
      To: fweisbec@gmail.com
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: wuzhangjin@gmail.com
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: dengcheng.zhu@gmail.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com
      Cc: ddaney@caviumnetworks.com
      Patchwork: http://patchwork.linux-mips.org/patch/2012/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      404ff638
    • D
      MIPS, Perf-events: Work with irq_work · 91f01737
      Deng-Cheng Zhu 提交于
      This is the MIPS part of the following commit by Peter Zijlstra:
      
      - e360adbe
          irq_work: Add generic hardirq context callbacks
      
          Provide a mechanism that allows running code in IRQ context. It is
          most useful for NMI code that needs to interact with the rest of the
          system -- like wakeup a task to drain buffers.
      
          Perf currently has such a mechanism, so extract that and provide it as
          a generic feature, independent of perf so that others may also
          benefit.
      
          The IRQ context callback is generated through self-IPIs where
          possible, or on architectures like powerpc the decrementer (the
          built-in timer facility) is set to generate an interrupt immediately.
      
          Architectures that don't have anything like this get to do with a
          callback from the timer tick. These architectures can call
          irq_work_run() at the tail of any IRQ handlers that might enqueue such
          work (like the perf IRQ handler) to avoid undue latencies in
          processing the work.
      
      For MIPSXX, we need to call irq_work_run() at the tail of the perf IRQ
      handler as described above.
      Reported-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: fweisbec@gmail.com
      To: will.deacon@arm.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: matt@console-pimps.org
      Cc: sshtylyov@mvista.com,
      Patchwork: http://patchwork.linux-mips.org/patch/2011/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      91f01737
    • Y
      MIPS: Fix always CONFIG_LOONGSON_UART_BASE=y · efe8dc55
      Yoichi Yuasa 提交于
      Signed-off-by: NYoichi Yuasa <yuasa@linux-mips.org>
      Cc: linux-mips <linux-mips@linux-mips.org>
      Patchwork: https://patchwork.linux-mips.org/patch/2055/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      efe8dc55
    • S
      MIPS: Loongson: Fix potentially wrong string handling · 994fed2d
      Stefan Weil 提交于
      This error was reported by cppcheck:
      arch/mips/loongson/common/machtype.c:56: error: Dangerous usage of 'str' (strncpy doesn't always 0-terminate it)
      
      If strncpy copied MACHTYPE_LEN bytes, the destination string str
      was not terminated.
      
      The patch adds one more byte to str and makes sure that this byte is
      always 0.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Cc: Wu Zhangjin <wuzhangjin@gmail.com>
      Cc: Arnaud Patard <apatard@mandriva.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/2053/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      994fed2d