1. 25 1月, 2008 4 次提交
    • H
      [AVR32] NMI debugging · e7ba176b
      Haavard Skinnemoen 提交于
      Change the NMI handler to use the die notifier chain to signal anyone
      who cares. Add a simple "nmi debugger" which hooks into this chain and
      that may dump registers, task state, etc. when it happens.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      e7ba176b
    • H
      [AVR32] Add support for AT32AP7001 and AT32AP7002 · 438ff3f3
      Haavard Skinnemoen 提交于
      These are derivatives of the AT32AP7000 chip, which means that most of
      the code stays the same. Rename a few files, functions, definitions
      and config symbols to reflect that they apply to all AP700x chips, and
      exclude some platform devices from chips where they aren't present.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      438ff3f3
    • H
      [AVR32] Provide more CPU information in /proc/cpuinfo and dmesg · 281ef58c
      Haavard Skinnemoen 提交于
      Add the following fields to /proc/cpuinfo:
        * chip type and revision (from the JTAG chip id)
        * cpu MHz (from clk_get_rate())
        * features (from the CONFIG0 register)
      
      Also rename "cpu family" to "cpu arch" and "cpu type" to "cpu core" to
      remove some ambiguity.
      
      Show chip type and revision at bootup, and clarify that the other
      kinds of IDs that we're already printing are for the cpu core and
      architecture. Rename "AP7000" to "AP7" since that's the name of the
      core.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      281ef58c
    • H
      [AVR32] Enable debugging only when needed · 13b54a50
      Haavard Skinnemoen 提交于
      Keep track of processes being debugged (including the kernel itself)
      and turn the OCD system on and off as appropriate. Since enabling
      debugging turns off some optimizations in the CPU core, this fixes the
      issue that enabling KProbes support or simply running a program under
      gdbserver will reduce system performance significantly until the next
      reboot.
      
      The CPU performance will still be reduced for all processes while a
      process is being debugged, but this is a lot better than reducing the
      performance forever.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      13b54a50
  2. 07 12月, 2007 6 次提交
    • H
      [AVR32] Fix copy_to_user_page() breakage · 68ca3e53
      Haavard Skinnemoen 提交于
      The current implementation of copy_to_user_page() gives "vaddr" to the
      cache instruction when trying to sync the icache with the dcache. If
      vaddr does not exist in the TLB, the CPU will silently abort the
      operation, which may result in the caches staying out of sync.
      
      To fix this, pass the "dst" parameter to flush_icache_range() instead
      -- we know this is valid because we just wrote to it.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      68ca3e53
    • H
      [AVR32] Follow the rules when dealing with the OCD system · 2507bc13
      Haavard Skinnemoen 提交于
      The current debug trap handling code does a number of things that are
      illegal according to the AVR32 Architecture manual. Most importantly,
      it may try to schedule from Debug Mode, thus clearing the D bit, which
      can lead to "undefined behaviour".
      
      It seems like this works in most cases, but several people have
      observed somewhat unstable behaviour when debugging programs,
      including soft lockups. So there's definitely something which is not
      right with the existing code.
      
      The new code will never schedule from Debug mode, it will always exit
      Debug mode with a "retd" instruction, and if something not running in
      Debug mode needs to do something debug-related (like doing a single
      step), it will enter debug mode through a "breakpoint" instruction.
      The monitor code will then return directly to user space, bypassing
      its own saved registers if necessary (since we don't actually care
      about the trapped context, only the one that came before.)
      
      This adds three instructions to the common exception handling code,
      including one branch. It does not touch super-hot paths like the TLB
      miss handler.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      2507bc13
    • H
      [AVR32] Clean up OCD register usage · 8dfe8f29
      Haavard Skinnemoen 提交于
      Generate a new set of OCD register definitions in asm/ocd.h and rename
      __mfdr() and __mtdr() to ocd_read() and ocd_write() respectively.
      
      The bitfield definitions are a lot more complete now, and they are
      entirely based on bit numbers, not masks. This is because OCD
      registers are frequently accessed from assembly code, where bit
      numbers are a lot more useful (can be fed directly to sbr, bfins,
      etc.)
      
      Bitfields that consist of more than one bit have two definitions:
      _START, which indicates the number of the first bit, and _SIZE, which
      indicates the number of bits. These directly correspond to the
      parameters taken by the bfextu, bfexts and bfins instructions.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      8dfe8f29
    • H
    • H
      [AVR32] Fix invalid status register bit definitions in asm/ptrace.h · df679771
      Haavard Skinnemoen 提交于
      The 'H' bit is bit 29, while the 'R' bit doesn't exist. Luckily, we
      don't actually use any of the bits in question.
      
      Also update show_regs() to show the Debug Mask and Debug state bits.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      df679771
    • H
      [AVR32] Add TIF_RESTORE_SIGMASK to the work masks · 702f22b3
      Haavard Skinnemoen 提交于
      We really need to check TIF_RESTORE_SIGMASK before returning to
      userspace. The existing code does not necessarily do this.
      
      Define the work masks as a bitwise OR of the respective flags instead
      of a hardcoded hex value to make it easier to spot errors like this in
      the future.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      702f22b3
  3. 15 11月, 2007 1 次提交
  4. 24 10月, 2007 1 次提交
    • H
      AVR32: Fix sg_page breakage · 18ccc419
      Haavard Skinnemoen 提交于
      The latest sg changes introduce the following build errors on AVR32:
      
      include/asm/dma-mapping.h: In function ‘dma_map_sg’:
      include/asm/dma-mapping.h:220: error: implicit declaration of function ‘sg_page’
      include/asm/dma-mapping.h:220: error: invalid operands to binary -
      include/asm/dma-mapping.h:221: error: implicit declaration of function ‘sg_virt’
      include/asm/dma-mapping.h:221: warning: assignment makes pointer from integer without a cast
      include/asm/dma-mapping.h: In function ‘dma_sync_sg_for_device’:
      include/asm/dma-mapping.h:330: warning: passing argument 2 of ‘dma_cache_sync’ makes pointer from integer without a cast
      
      Fix it by including the correct header file, i.e. linux/scatterlist.h
      instead of asm/scatterlist.h.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      18ccc419
  5. 23 10月, 2007 6 次提交
  6. 20 10月, 2007 2 次提交
  7. 19 10月, 2007 1 次提交
    • N
      bitops: introduce lock ops · 26333576
      Nick Piggin 提交于
      Introduce test_and_set_bit_lock / clear_bit_unlock bitops with lock semantics.
      Convert all architectures to use the generic implementation.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Acked-By: NDavid Howells <dhowells@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Bryan Wu <bryan.wu@analog.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Matthew Wilcox <willy@debian.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26333576
  8. 17 10月, 2007 5 次提交
  9. 11 10月, 2007 6 次提交
  10. 15 8月, 2007 4 次提交
  11. 02 8月, 2007 1 次提交
  12. 01 8月, 2007 1 次提交
  13. 20 7月, 2007 1 次提交
  14. 19 7月, 2007 1 次提交
    • H
      [AVR32] Fix atomic_add_unless() and atomic_sub_unless() · 3da86ee4
      Haavard Skinnemoen 提交于
      These functions depend on "result" being initalized to 0, but "result"
      is not included as an input constraint to the inline assembly block
      following its initialization, only as an output constraint. Thus gcc
      thinks it doesn't need to initialize it, so result ends up undefined
      if the "unless" condition is true.
      
      This fixes an oops in sunrpc where the faulty atomics caused
      rpciod_up() to not start the workqueue as it should.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      3da86ee4