1. 16 11月, 2012 1 次提交
  2. 09 11月, 2012 4 次提交
  3. 29 10月, 2012 3 次提交
    • W
      ARM: 7567/1: io: avoid GCC's offsettable addressing modes for halfword accesses · 7629a9f6
      Will Deacon 提交于
      Using the 'o' memory constraint in inline assembly can result in GCC
      generating invalid immediate offsets for memory access instructions with
      reduced addressing capabilities (i.e. smaller than 12-bit immediate
      offsets):
      
        http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54983
      
      As there is no constraint to specify the exact addressing mode we need,
      fallback to using 'Q' exclusively for halfword I/O accesses. This may
      emit an additional add instruction (using an extra register) in order
      to construct the address but it will always be accepted by GAS.
      Reported-by: NBastian Hecht <hechtb@googlemail.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7629a9f6
    • P
      ARM: 7566/1: vfp: fix save and restore when running on pre-VFPv3 and CONFIG_VFPv3 set · 39141ddf
      Paul Walmsley 提交于
      After commit 846a1368 ("ARM: vfp: fix
      saving d16-d31 vfp registers on v6+ kernels"), the OMAP 2430SDP board
      started crashing during boot with omap2plus_defconfig:
      
      [    3.875122] mmcblk0: mmc0:e624 SD04G 3.69 GiB
      [    3.915954]  mmcblk0: p1
      [    4.086639] Internal error: Oops - undefined instruction: 0 [#1] SMP ARM
      [    4.093719] Modules linked in:
      [    4.096954] CPU: 0    Not tainted  (3.6.0-02232-g759e00b8 #570)
      [    4.103149] PC is at vfp_reload_hw+0x1c/0x44
      [    4.107666] LR is at __und_usr_fault_32+0x0/0x8
      
      It turns out that the context save/restore fix unmasked a latent bug
      in commit 5aaf2544 ("ARM: 6203/1: Make
      VFPv3 usable on ARMv6").  When CONFIG_VFPv3 is set, but the kernel is
      booted on a pre-VFPv3 core, the code attempts to save and restore the
      d16-d31 VFP registers.  These are only present on non-D16 VFPv3+, so
      this results in an undefined instruction exception.  The code didn't
      crash before commit 846a1368 because the save and restore code was
      only touching d0-d15, present on all VFP.
      
      Fix by implementing a request from Russell King to add a new HWCAP
      flag that affirmatively indicates the presence of the d16-d31
      registers:
      
         http://marc.info/?l=linux-arm-kernel&m=135013547905283&w=2
      
      and some feedback from Måns to clarify the name of the HWCAP flag.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Martin <dave.martin@linaro.org>
      Cc: Måns Rullgård <mans.rullgard@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      39141ddf
    • F
      ARM: 7565/1: sched: stop sched_clock() during suspend · 6a4dae5e
      Felipe Balbi 2 提交于
      The scheduler imposes a requirement to sched_clock()
      which is to stop the clock during suspend, if we don't
      do that any RT thread will be rescheduled in the future
      which might cause any sort of problems.
      
      This became an issue on OMAP when we converted omap-i2c.c
      to use threaded IRQs, it turned out that depending on how
      much time we spent on suspend, the I2C IRQ thread would
      end up being rescheduled so far in the future that I2C
      transfers would timeout and, because omap_hsmmc depends
      on an I2C-connected device to detect if an MMC card is
      inserted in the slot, our rootfs would just vanish.
      
      arch/arm/kernel/sched_clock.c already had an optional
      implementation (sched_clock_needs_suspend()) which would
      handle scheduler's requirement properly, what this patch
      does is simply to make that implementation non-optional.
      
      Note that this has the side-effect that printk timings
      won't reflect the actual time spent on suspend so other
      methods to measure that will have to be used.
      
      This has been tested with beagleboard XM (OMAP3630) and
      pandaboard rev A3 (OMAP4430). Suspend to RAM is now working
      after this patch.
      
      Thanks to Kevin Hilman for helping out with debugging.
      Acked-by: NKevin Hilman <khilman@ti.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6a4dae5e
  4. 26 10月, 2012 1 次提交
  5. 23 10月, 2012 1 次提交
    • M
      ARM: dma-mapping: support debug_dma_mapping_error · 871ae57a
      Ming Lei 提交于
      Without the patch, kind of below warning will be dumped if DMA-API
      debug is enabled:
      
      [   11.069763] ------------[ cut here ]------------
      [   11.074645] WARNING: at lib/dma-debug.c:948 check_unmap+0x770/0x860()
      [   11.081420] ehci-omap ehci-omap.0: DMA-API: device driver failed to
      check map error[device address=0x0000000
      0adb78e80] [size=8 bytes] [mapped as single]
      [   11.095611] Modules linked in:
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      871ae57a
  6. 20 10月, 2012 4 次提交
  7. 13 10月, 2012 1 次提交
  8. 12 10月, 2012 1 次提交
  9. 10 10月, 2012 2 次提交
    • A
      ARM: warnings in arch/arm/include/asm/uaccess.h · 8e7fc18b
      Arnd Bergmann 提交于
      On NOMMU ARM, the __addr_ok() and __range_ok() macros do not evaluate
      their arguments, which may lead to harmless build warnings in some
      code where the variables are not used otherwise. Adding a cast to void
      gets rid of the warning and does not make any semantic changes.
      
      Without this patch, building at91x40_defconfig results in:
      
      fs/read_write.c: In function 'rw_copy_check_uvector':
      fs/read_write.c:684:9: warning: unused variable 'buf' [-Wunused-variable]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      8e7fc18b
    • A
      ARM: binfmt_flat: unused variable 'persistent' · f6d5d8a5
      Arnd Bergmann 提交于
      The flat_get_addr_from_rp() macro does not use the 'persistent' argument
      on ARM, causing a harmless compiler warning. A cast to void removes
      that warning.
      
      Without this patch, building at91x40_defconfig results in:
      
      fs/binfmt_flat.c: In function 'load_flat_file':
      fs/binfmt_flat.c:746:17: warning: unused variable 'persistent' [-Wunused-variable]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      f6d5d8a5
  10. 09 10月, 2012 2 次提交
  11. 05 10月, 2012 1 次提交
    • W
      ARM: 7548/1: include linux/sched.h in syscall.h · 8ef102c6
      Wade Farnsworth 提交于
      The syscall tracing patch introduces a compile bug in lttng-modules
      when the latter calls syscall_get_nr(), similar to the following:
      
      <path-to-linux>/arch/arm/include/asm/syscall.h:21:2: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]
      
      The issue is that we are using task_thread_info() in the
      syscall_get_nr() function in asm/syscall.h, but not explicitly
      including sched.h from this file, so we can expect this bug might
      surface any time that syscall_get_nr() is called.
      
      Explicitly including sched.h solves the problem.
      
      Cc: <stable@vger.kernel.org> [3.5, 3.6]
      Signed-off-by: NWade Farnsworth <wade_farnsworth@mentor.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      8ef102c6
  12. 03 10月, 2012 1 次提交
  13. 02 10月, 2012 2 次提交
    • R
      ARM: kill off arch_is_coherent · 48aa820f
      Rob Herring 提交于
      With ixp2xxx removed, there are no platforms that define arch_is_coherent,
      so the last occurrences of arch_is_coherent can be removed. Any new
      platform with coherent i/o should use coherent dma mapping functions.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      48aa820f
    • R
      ARM: add coherent dma ops · dd37e940
      Rob Herring 提交于
      arch_is_coherent is problematic as it is a global symbol. This
      doesn't work for multi-platform kernels or platforms which can support
      per device coherent DMA.
      
      This adds arm_coherent_dma_ops to be used for devices which connected
      coherently (i.e. to the ACP port on Cortex-A9 or A15). The arm_dma_ops
      are modified at boot when arch_is_coherent is true.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      dd37e940
  14. 01 10月, 2012 5 次提交
  15. 28 9月, 2012 1 次提交
    • D
      Make most arch asm/module.h files use asm-generic/module.h · 786d35d4
      David Howells 提交于
      Use the mapping of Elf_[SPE]hdr, Elf_Addr, Elf_Sym, Elf_Dyn, Elf_Rel/Rela,
      ELF_R_TYPE() and ELF_R_SYM() to either the 32-bit version or the 64-bit version
      into asm-generic/module.h for all arches bar MIPS.
      
      Also, use the generic definition mod_arch_specific where possible.
      
      To this end, I've defined three new config bools:
      
       (*) HAVE_MOD_ARCH_SPECIFIC
      
           Arches define this if they don't want to use the empty generic
           mod_arch_specific struct.
      
       (*) MODULES_USE_ELF_RELA
      
           Arches define this if their modules can contain RELA records.  This causes
           the Elf_Rela mapping to be emitted and allows apply_relocate_add() to be
           defined by the arch rather than have the core emit an error message.
      
       (*) MODULES_USE_ELF_REL
      
           Arches define this if their modules can contain REL records.  This causes
           the Elf_Rel mapping to be emitted and allows apply_relocate() to be
           defined by the arch rather than have the core emit an error message.
      
      Note that it is possible to allow both REL and RELA records: m68k and mips are
      two arches that do this.
      
      With this, some arch asm/module.h files can be deleted entirely and replaced
      with a generic-y marker in the arch Kbuild file.
      
      Additionally, I have removed the bits from m32r and score that handle the
      unsupported type of relocation record as that's now handled centrally.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      786d35d4
  16. 27 9月, 2012 1 次提交
  17. 25 9月, 2012 1 次提交
    • L
      ARM: mm: implement LoUIS API for cache maintenance ops · 031bd879
      Lorenzo Pieralisi 提交于
      ARM v7 architecture introduced the concept of cache levels and related
      control registers. New processors like A7 and A15 embed an L2 unified cache
      controller that becomes part of the cache level hierarchy. Some operations in
      the kernel like cpu_suspend and __cpu_disable do not require a flush of the
      entire cache hierarchy to DRAM but just the cache levels belonging to the
      Level of Unification Inner Shareable (LoUIS), which in most of ARM v7 systems
      correspond to L1.
      
      The current cache flushing API used in cpu_suspend and __cpu_disable,
      flush_cache_all(), ends up flushing the whole cache hierarchy since for
      v7 it cleans and invalidates all cache levels up to Level of Coherency
      (LoC) which cripples system performance when used in hot paths like hotplug
      and cpuidle.
      
      Therefore a new kernel cache maintenance API must be added to cope with
      latest ARM system requirements.
      
      This patch adds flush_cache_louis() to the ARM kernel cache maintenance API.
      
      This function cleans and invalidates all data cache levels up to the
      Level of Unification Inner Shareable (LoUIS) and invalidates the instruction
      cache for processors that support it (> v7).
      
      This patch also creates an alias of the cache LoUIS function to flush_kern_all
      for all processor versions prior to v7, so that the current cache flushing
      behaviour is unchanged for those processors.
      
      v7 cache maintenance code implements a cache LoUIS function that cleans and
      invalidates the D-cache up to LoUIS and invalidates the I-cache, according
      to the new API.
      Reviewed-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Reviewed-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      031bd879
  18. 22 9月, 2012 1 次提交
  19. 20 9月, 2012 4 次提交
  20. 19 9月, 2012 3 次提交