1. 04 10月, 2013 1 次提交
  2. 25 9月, 2013 2 次提交
  3. 13 9月, 2013 7 次提交
    • M
      MIPS: kernel: vpe: Make vpe_attrs an array of pointers. · 1b467633
      Markos Chandras 提交于
      Commit 567b21e9
      "mips: convert vpe_class to use dev_groups"
      
      broke the build on MIPS since vpe_attrs should be an array
      of 'struct device_attribute' pointers.
      
      Fixes the following build problem:
      arch/mips/kernel/vpe.c:1372:2: error: missing braces around initializer
      [-Werror=missing-braces]
      arch/mips/kernel/vpe.c:1372:2: error: (near initialization for 'vpe_attrs[0]')
      [-Werror=missing-braces]
      
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: John Crispin <blogic@openwrt.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5819/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1b467633
    • M
      Remove GENERIC_HARDIRQ config option · 0244ad00
      Martin Schwidefsky 提交于
      After the last architecture switched to generic hard irqs the config
      options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
      for !CONFIG_GENERIC_HARDIRQS can be removed.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0244ad00
    • L
      MIPS: Fix SMP core calculations when using MT support. · 670bac3a
      Leonid Yegoshin 提交于
      The TCBIND register is only available if the core has MT support. It
      should not be read otherwise. Secondly, the number of TCs (siblings)
      are calculated differently depending on if the kernel is configured
      as SMVP or SMTC.
      Signed-off-by: NLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Signed-off-by: NSteven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5822/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      670bac3a
    • M
      MIPS: DECstation I/O ASIC DMA interrupt handling fix · 5359b938
      Maciej W. Rozycki 提交于
      This change complements commit d0da7c002f7b2a93582187a9e3f73891a01d8ee4
      and brings clear_ioasic_irq back, renaming it to clear_ioasic_dma_irq at
      the same time, to make I/O ASIC DMA interrupts functional.
      
      Unlike ordinary I/O ASIC interrupts DMA interrupts need to be deasserted
      by software by writing 0 to the respective bit in I/O ASIC's System
      Interrupt Register (SIR), similarly to how CP0.Cause.IP0 and CP0.Cause.IP1
      bits are handled in the CPU (the difference is SIR DMA interrupt bits are
      R/W0C so there's no need for an RMW cycle).  Otherwise the handler is
      reentered over and over again.
      
      The only current user is the DEC LANCE Ethernet driver and its extremely
      uncommon DMA memory error handler that does not care when exactly the
      interrupt is cleared.  Anticipating the use of DMA interrupts by the Zilog
      SCC driver this change however exports clear_ioasic_dma_irq for device
      drivers to choose the right application-specific sequence to clear the
      request explicitly rather than calling it implicitly in the .irq_eoi
      handler of `struct irq_chip'.  Previously these interrupts were cleared in
      the .end handler of the said structure, before it was removed.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5826/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5359b938
    • M
      MIPS: DECstation HRT initialization rearrangement · daed1285
      Maciej W. Rozycki 提交于
      Not all I/O ASIC versions have the free-running counter implemented, an
      early revision used in the 5000/1xx models aka 3MIN and 4MIN did not have
      it.  Therefore we cannot unconditionally use it as a clock source.
      Fortunately if not implemented its register slot has a fixed value so it
      is enough if we check for the value at the end of the calibration period
      being the same as at the beginning.
      
      This also means we need to look for another high-precision clock source on
      the systems affected.  The 5000/1xx can have an R4000SC processor
      installed where the CP0 Count register can be used as a clock source.
      Unfortunately all the R4k DECstations suffer from the missed timer
      interrupt on CP0 Count reads erratum, so we cannot use the CP0 timer as a
      clock source and a clock event both at a time.  However we never need an
      R4k clock event device because all DECstations have a DS1287A RTC chip
      whose periodic interrupt can be used as a clock source.
      
      This gives us the following four configuration possibilities for I/O ASIC
      DECstations:
      
      1. No I/O ASIC counter and no CP0 timer, e.g. R3k 5000/1xx (3MIN).
      
      2. No I/O ASIC counter but the CP0 timer, i.e. R4k 5000/150 (4MIN).
      
      3. The I/O ASIC counter but no CP0 timer, e.g. R3k 5000/240 (3MAX+).
      
      4. The I/O ASIC counter and the CP0 timer, e.g. R4k 5000/260 (4MAX+).
      
      For #1 and #2 this change stops the I/O ASIC free-running counter from
      being installed as a clock source of a 0Hz frequency.  For #2 it also
      arranges for the CP0 timer to be used as a clock source rather than a
      clock event device, because having an accurate wall clock is more
      important than a high-precision interval timer.  For #3 there is no
      change.  For #4 the change makes the I/O ASIC free-running counter
      installed as a clock source so that the CP0 timer can be used as a clock
      event device.
      
      Unfortunately the use of the CP0 timer as a clock event device relies on a
      succesful completion of c0_compare_interrupt.  That never happens, because
      while waiting for a CP0 Compare interrupt to happen the function spins in
      a loop reading the CP0 Count register.  This makes the CP0 Count erratum
      trigger reliably causing the interrupt waited for to be lost in all cases.
      As a result #4 resorts to using the CP0 timer as a clock source as well,
      just as #2.  However we want to keep this separate arrangement in case
      (hope) c0_compare_interrupt is eventually rewritten such that it avoids
      the erratum.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5825/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      daed1285
    • J
      arch: mm: pass userspace fault flag to generic fault handler · 759496ba
      Johannes Weiner 提交于
      Unlike global OOM handling, memory cgroup code will invoke the OOM killer
      in any OOM situation because it has no way of telling faults occuring in
      kernel context - which could be handled more gracefully - from
      user-triggered faults.
      
      Pass a flag that identifies faults originating in user space from the
      architecture-specific fault handlers to generic code so that memcg OOM
      handling can be improved.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Reviewed-by: NMichal Hocko <mhocko@suse.cz>
      Cc: David Rientjes <rientjes@google.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: azurIt <azurit@pobox.sk>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      759496ba
    • J
      arch: mm: do not invoke OOM killer on kernel fault OOM · 87134102
      Johannes Weiner 提交于
      Kernel faults are expected to handle OOM conditions gracefully (gup,
      uaccess etc.), so they should never invoke the OOM killer.  Reserve this
      for faults triggered in user context when it is the only option.
      
      Most architectures already do this, fix up the remaining few.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Reviewed-by: NMichal Hocko <mhocko@suse.cz>
      Acked-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: azurIt <azurit@pobox.sk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      87134102
  4. 12 9月, 2013 1 次提交
    • N
      mm: migrate: check movability of hugepage in unmap_and_move_huge_page() · 83467efb
      Naoya Horiguchi 提交于
      Currently hugepage migration works well only for pmd-based hugepages
      (mainly due to lack of testing,) so we had better not enable migration of
      other levels of hugepages until we are ready for it.
      
      Some users of hugepage migration (mbind, move_pages, and migrate_pages) do
      page table walk and check pud/pmd_huge() there, so they are safe.  But the
      other users (softoffline and memory hotremove) don't do this, so without
      this patch they can try to migrate unexpected types of hugepages.
      
      To prevent this, we introduce hugepage_migration_support() as an
      architecture dependent check of whether hugepage are implemented on a pmd
      basis or not.  And on some architecture multiple sizes of hugepages are
      available, so hugepage_migration_support() also checks hugepage size.
      Signed-off-by: NNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Hillf Danton <dhillf@gmail.com>
      Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      83467efb
  5. 07 9月, 2013 1 次提交
    • J
      MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code · d451e734
      Jerin Jacob 提交于
      The use of current_cpu_type() in cpu_is_noncoherent_r10000() is not preemption-safe.
      Use boot_cpu_type() instead to make it preemption-safe.
      
      <log>
      / # insmod mtd_readtest.ko dev=4
      mtd_readtest: MTD device: 4
      mtd_readtest: MTD device size 996671488, eraseblock size 524288, page size 4096, count of eraseblocks 1901, pages per eraseblock 128, OOB size 224
      mtd_readtest: scanning for bad eraseblocks
      mtd_readtest: scanned 1901 eraseblocks, 0 are bad
      mtd_readtest: testing page read
      BUG: using smp_processor_id() in preemptible [00000000] code: insmod/99
      caller is mips_dma_sync_single_for_cpu+0x2c/0x128
      CPU: 2 PID: 99 Comm: insmod Not tainted 3.10.4 #67
      Stack : 00000006 69735f63 00000000 00000000 00000000 00000000 808273d6 00000032
                80820000 00000002 8d700000 8de48fa0 00000000 00000000 00000000 00000000
                00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
                00000000 00000000 00000000 8d6afb00 8d6afb24 80721f24 807b9927 8012c130
                80820000 80721f24 00000002 00000063 8de48fa0 8082333c 807b98e6 8d6afaa0
                ...
      Call Trace:
      [<80109984>] show_stack+0x64/0x7c
      [<80666230>] dump_stack+0x20/0x2c
      [<803a2210>] debug_smp_processor_id+0xe0/0xf0
      [<801116f0>] mips_dma_sync_single_for_cpu+0x2c/0x128
      [<8043456c>] nand_plat_read_page+0x16c/0x234
      [<8042fad4>] nand_do_read_ops+0x194/0x480
      [<804301dc>] nand_read+0x50/0x7c
      [<804261c8>] part_read+0x70/0xc0
      [<804231dc>] mtd_read+0x80/0xe4
      [<c0431354>] init_module+0x354/0x6f8 [mtd_readtest]
      [<8010057c>] do_one_initcall+0x140/0x1a4
      [<80176d7c>] load_module+0x1b5c/0x2258
      [<8017752c>] SyS_init_module+0xb4/0xec
      [<8010f3fc>] stack_done+0x20/0x44
      
      BUG: using smp_processor_id() in preemptible [00000000] code: insmod/99
      </log>
      Signed-off-by: NJerin Jacob <jerinjacobk@gmail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5800/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      d451e734
  6. 06 9月, 2013 4 次提交
    • P
      MIPS: kexec: Fix random crashes while loading crashkernel · c2882b7f
      Prem Mallappa 提交于
      Fixed compilation errors in case of non-KEXEC kernel
      Rearranging code so that crashk_res gets updated.
      - crashk_res is updated after mips_parse_crashkernel(),
         after resource_init(), which is after arch_mem_init().
      - The reserved memory is actually treated as Usable memory,
         Unless we load the crash kernel, everything works.
      Signed-off-by: NPrem Mallappa <pmallappa@caviumnetworks.com>
      Cc: linux-mips <linux-mips@linux-mips.org>
      Patchwork: http://patchwork.linux-mips.org/patch/5805/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c2882b7f
    • P
      MIPS: kdump: Skip walking indirection page for crashkernels · 273463b7
      Prem Mallappa 提交于
      KDUMP: skip indirection page, as crashkernel has already copied to destination
      
      [ralf@linux-mips.org: cosmetic changes.]
      Signed-off-by: NPrem Mallappa <pmallappa@caviumnetworks.com>
      Cc: linux-mips <linux-mips@linux-mips.org>
      Patchwork: https://patchwork.linux-mips.org/patch/5786/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      273463b7
    • M
      MIPS: DECstation HRT calibration bug fixes · 8533966a
      Maciej W. Rozycki 提交于
      This change corrects DECstation HRT calibration, by removing the following
      bugs:
      
      1. Calibration period selection -- HZ / 10 has been chosen, however on
         DECstation computers, HZ never divides by 10, as the choice for HZ is
         among 128, 256 and 1024.  The choice therefore results in a systematic
         calibration error, e.g. 6.25% for the usual choice of 128 for HZ:
      
         128 / 10 * 10 = 120
      
         (128 - 120) / 128 -> 6.25%
      
         The change therefore makes calibration use HZ / 8 that is always
         accurate for the HZ values available, getting rid of the systematic
         error.
      
      2. Calibration starting point synchronisation -- the duration of a number
         of intervals between DS1287A periodic interrupt assertions is measured,
         however code does not ensure at the beginning that the interrupt has
         not been previously asserted.  This results in a variable error of e.g.
         up to another 6.25% for the period of HZ / 8 (8.(3)% with the original
         HZ / 10 period) and the usual choice of 128 for HZ:
      
         1 / 16 -> 6.25%
      
         1 / 12 -> 8.(3)%
      
         The change therefore adds an initial call to ds1287_timer_state that
         clears any previous periodic interrupt pending.
      
      The same issue applies to both I/O ASIC counter and R4k CP0 timer
      calibration on DECstation systems as similar code is used in both cases
      and both pieces of code are covered by this fix.
      
      On an R3400 test system used this fix results in a change of the I/O ASIC
      clock frequency reported from values like:
      
      I/O ASIC clock frequency 23185830Hz
      
      to:
      
      I/O ASIC clock frequency 24999288Hz
      
      removing the miscalculation by 6.25% from the systematic error and (for
      the individual sample provided) a further 1.00% from the variable error,
      accordingly.  The nominal I/O ASIC clock frequency is 25MHz on this
      system.
      
      Here's another result, with the fix applied, from a system that has both
      HRTs available (using an R4400 at 60MHz nominal):
      
      MIPS counter frequency 59999328Hz
      I/O ASIC clock frequency 24999432Hz
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5807/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      8533966a
    • G
      MIPS: Export copy_from_user_page() (needed by lustre) · bf9621aa
      Geert Uytterhoeven 提交于
      ERROR: "copy_from_user_page" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/5808/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      bf9621aa
  7. 05 9月, 2013 3 次提交
  8. 04 9月, 2013 21 次提交