25 Jan, 2008

4 commits

  • 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: Haavard Skinnemoen

    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: Haavard Skinnemoen

    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: Haavard Skinnemoen

    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: Haavard Skinnemoen

    Haavard Skinnemoen
     

07 Dec, 2007

6 commits

  • 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: Haavard Skinnemoen

    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: Haavard Skinnemoen

    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: Haavard Skinnemoen

    Haavard Skinnemoen
     
  • Signed-off-by: Haavard Skinnemoen

    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: Haavard Skinnemoen

    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: Haavard Skinnemoen

    Haavard Skinnemoen
     

15 Nov, 2007

1 commit


24 Oct, 2007

1 commit

  • 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: Haavard Skinnemoen

    Haavard Skinnemoen
     

23 Oct, 2007

7 commits

  • * 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
    [AVR32] ARRAY_SIZE() cleanup
    [AVR32] Implement at32_add_device_cf()
    [AVR32] Implement more at32_add_device_foo() functions
    [AVR32] Fix a couple of sparse warnings
    [AVR32] Wire up AT73C213 sound driver on ATSTK1000 board
    [AVR32] Platform code for pata_at32

    Linus Torvalds
     
  • Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Implement at32_add_device_cf() which will add a platform_device for
    the at32_cf driver (not merged yet). Separate out most of the
    at32_add_device_ide() code and use it to implement
    at32_add_device_cf() as well.

    This changes the API in the following ways:
    * The board code must initialize data->cs to the chipselect ID to
    use before calling any of these functions.
    * The board code must use GPIO_PIN_NONE to indicate unused CF pins.

    Signed-off-by: Haavard Skinnemoen

    Haavard Skinnemoen
     
  • Implement functions for adding platform devices for TWI, MCI, AC97C
    and ABDAC. They may need to be modified to cope with platform data,
    etc. when the corresponding drivers are ready to be merged, but such
    changes are much less likely to conflict than adding support for a
    whole new type of device.

    Signed-off-by: Haavard Skinnemoen

    Haavard Skinnemoen
     
  • This patch adds platform code for PATA devices on the AP7000.

    [hskinnemoen@atmel.com: board code left out for now since stk1000
    doesn't support IDE out of the box]
    Signed-off-by: Kristoffer Nyborg Gregertsen
    Signed-off-by: Haavard Skinnemoen

    Kristoffer Nyborg Gregertsen
     
  • Add a Kconfig entry which will toggle some sanity checks on the sg
    entry and tables.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Change the page member of the scatterlist structure to be an unsigned
    long, and encode more stuff in the lower bits:

    - Bits 0 and 1 zero: this is a normal sg entry. Next sg entry is located
    at sg + 1.
    - Bit 0 set: this is a chain entry, the next real entry is at ->page_link
    with the two low bits masked off.
    - Bit 1 set: this is the final entry in the sg entry. sg_next() will return
    NULL when passed such an entry.

    It's thus important that sg table users use the proper accessors to get
    and set the page member.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

20 Oct, 2007

2 commits

  • forbid asm/bitops.h direct inclusion

    Because of compile errors that may occur after bit changes if asm/bitops.h is
    included directly without e.g. linux/kernel.h which includes linux/bitops.h,
    forbid direct inclusion of asm/bitops.h. Thanks to Adrian Bunk.

    Signed-off-by: Jiri Slaby
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Nobody uses flush_tlb_pgtables anymore, this patch removes all remaining
    traces of it from all archs.

    Signed-off-by: Benjamin Herrenschmidt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

19 Oct, 2007

1 commit

  • Introduce test_and_set_bit_lock / clear_bit_unlock bitops with lock semantics.
    Convert all architectures to use the generic implementation.

    Signed-off-by: Nick Piggin
    Acked-By: David Howells
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Haavard Skinnemoen
    Cc: Bryan Wu
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Greg Ungerer
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Andi Kleen
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

17 Oct, 2007

5 commits

  • dma_cache_(wback|inv|wback_inv) were the earliest attempt on a generalized
    cache managment API for I/O purposes. Originally it was basically the raw
    MIPS low level cache API exported to the entire world. The API has
    suffered from a lack of documentation, was not very widely used unlike it's
    more modern brothers and can easily be replaced by dma_cache_sync. So
    remove it rsp. turn the surviving bits back into an arch private API, as
    discussed on linux-arch.

    Signed-off-by: Ralf Baechle
    Acked-by: Paul Mundt
    Acked-by: Paul Mackerras
    Acked-by: David S. Miller
    Acked-by: Kyle McMartin
    Acked-by: Haavard Skinnemoen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on
    32bit targets.

    GCC can be made to warn about usage of long long types with ISO C90
    (-ansi), but only with -pedantic. You can write this in a way that even
    then it doesn't cause warnings, namely by:

    #ifdef __GNUC__
    __extension__ typedef __signed__ long long __s64;
    __extension__ typedef unsigned long long __u64;
    #endif

    The __extension__ keyword in front of this switches off any pedantic
    warnings for this expression.

    Signed-off-by: Olaf Hering
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     
  • DECLARE_MUTEX_LOCKED was used for semaphores used as completions and we've
    got rid of them. Well, except for one in libusual that the maintainer
    explicitly wants to keep as semaphore. So convert that useage to an
    explicit sema_init and kill of DECLARE_MUTEX_LOCKED so that new code is
    reminded to use a completion.

    Signed-off-by: Christoph Hellwig
    Acked-by: "Satyam Sharma"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Introduce architecture dependent kretprobe blacklists to prohibit users
    from inserting return probes on the function in which kprobes can be
    inserted but kretprobes can not.

    This patch also removes "__kprobes" mark from "__switch_to" on x86_64 and
    registers "__switch_to" to the blacklist on x86-64, because that mark is to
    prohibit user from inserting only kretprobe.

    Signed-off-by: Masami Hiramatsu
    Cc: Prasanna S Panchamukhi
    Acked-by: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masami Hiramatsu
     
  • x86(-64) are the last architectures still using the page fault notifier
    cruft for the kprobes page fault hook. This patch converts them to the
    proper direct calls, and removes the now unused pagefault notifier bits
    aswell as the cruft in kprobes.c that was related to this mess.

    I know Andi didn't really like this, but all other architecture maintainers
    agreed the direct calls are much better and besides the obvious cruft
    removal a common way of dealing with kprobes across architectures is
    important aswell.

    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix sparc64]
    Signed-off-by: Christoph Hellwig
    Cc: Andi Kleen
    Cc:
    Cc: Prasanna S Panchamukhi
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

11 Oct, 2007

6 commits


15 Aug, 2007

4 commits


02 Aug, 2007

1 commit

  • Fixes WARN_ON() on bitfiels ops for all architectures that have
    been left out in 8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f.

    Cc: Alexey Dobriyan
    Cc: Herbert Xu
    Cc: Haavard Skinnemoen
    Cc: Matthew Wilcox
    Cc: Kyle McMartin
    Cc: Martin Schwidefsky
    Acked-by: Paul Mundt
    Signed-off-by: Heiko Carstens
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     

01 Aug, 2007

1 commit

  • Remove unused TIF_NOTIFY_RESUME flag for all processor architectures. The
    flag was not used excecpt on IA-64 where the patch replaces it with
    TIF_PERFMON_WORK.

    Signed-off-by: stephane eranian
    Cc:
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephane Eranian
     

20 Jul, 2007

1 commit

  • New arch macro STACK_TOP_MAX it gives the larges valid stack address for the
    architecture in question.

    It differs from STACK_TOP in that it will not distinguish between
    personalities but will always return the largest possible address.

    This is used to create the initial stack on execve, which we will move down to
    the proper location once the binfmt code has figured out where that is.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ollie Wild
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra