12 Dec, 2011

1 commit


04 Dec, 2011

1 commit


03 Aug, 2011

1 commit

  • Use BUG_ON(x) rather than if(x) BUG();

    The semantic patch that fixes this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@ identifier x; @@
    -if (x) BUG();
    +BUG_ON(x);

    @@ identifier x; @@
    -if (!x) BUG();
    +BUG_ON(!x);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Chris Metcalf

    Julia Lawall
     

26 May, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (26 commits)
    arch/tile: prefer "tilepro" as the name of the 32-bit architecture
    compat: include aio_abi.h for aio_context_t
    arch/tile: cleanups for tilegx compat mode
    arch/tile: allocate PCI IRQs later in boot
    arch/tile: support signal "exception-trace" hook
    arch/tile: use better definitions of xchg() and cmpxchg()
    include/linux/compat.h: coding-style fixes
    tile: add an RTC driver for the Tilera hypervisor
    arch/tile: finish enabling support for TILE-Gx 64-bit chip
    compat: fixes to allow working with tile arch
    arch/tile: update defconfig file to something more useful
    tile: do_hardwall_trap: do not play with task->sighand
    tile: replace mm->cpu_vm_mask with mm_cpumask()
    tile,mn10300: add device parameter to dma_cache_sync()
    audit: support the "standard"
    arch/tile: clarify flush_buffer()/finv_buffer() function names
    arch/tile: kernel-related cleanups from removing static page size
    arch/tile: various header improvements for building drivers
    arch/tile: disable GX prefetcher during cache flush
    arch/tile: tolerate disabling CONFIG_BLK_DEV_INITRD
    ...

    Linus Torvalds
     

25 May, 2011

1 commit

  • Fold all the mmu_gather rework patches into one for submission

    Signed-off-by: Peter Zijlstra
    Reported-by: Hugh Dickins
    Cc: Benjamin Herrenschmidt
    Cc: David Miller
    Cc: Martin Schwidefsky
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

20 May, 2011

1 commit

  • This change adds support for /proc/sys/debug/exception-trace to tile.
    Like x86 and sparc, by default it is set to "1", generating a one-line
    printk whenever a user process crashes. By setting it to "2", we get
    a much more complete userspace diagnostic at crash time, including
    a user-space backtrace, register dump, and memory dump around the
    address of the crash.

    Some vestiges of the Tilera-internal version of this support are
    removed with this patch (the show_crashinfo variable and the
    arch_coredump_signal function). We retain a "crashinfo" boot parameter
    which allows you to set the boot-time value of exception-trace.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

13 May, 2011

1 commit

  • This support was partially present in the existing code (look for
    "__tilegx__" ifdefs) but with this change you can build a working
    kernel using the TILE-Gx toolchain and ARCH=tilegx.

    Most of these files are new, generally adding a foo_64.c file
    where previously there was just a foo_32.c file.

    The ARCH=tilegx directive redirects to arch/tile, not arch/tilegx,
    using the existing SRCARCH mechanism in the top-level Makefile.

    Changes to existing files:

    - and changed to factor the
    include of in the common header.

    - and arch/tile/kernel/compat.c changed to remove
    the "const" markers I had put on compat_sys_execve() when trying
    to match some recent similar changes to the non-compat execve.
    It turns out the compat version wasn't "upgraded" to use const.

    - and were
    previously included accidentally, with the 32-bit contents. Now
    they have the proper 64-bit contents.

    Finally, I had to hack the existing hacky drivers/input/input-compat.h
    to add yet another "#ifdef" for INPUT_COMPAT_TEST (same as x86_64).

    Signed-off-by: Chris Metcalf
    Acked-by: Dmitry Torokhov [drivers/input]

    Chris Metcalf
     

03 May, 2011

1 commit

  • This support is required for CONFIG_KEYS, NFSv4 kernel DNS, etc.
    The change is slightly more complex than the minimal thing, since
    I took advantage of having to go into the assembly code to just
    move a bunch of stuff into C code: specifically, the schedule(),
    do_async_page_fault(), do_signal(), and single_step_once() support,
    in addition to the TIF_NOTIFY_RESUME support.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

31 Mar, 2011

1 commit


25 Mar, 2011

1 commit

  • Commit ddd588b5dd55 ("oom: suppress nodes that are not allowed from
    meminfo on oom kill") moved lib/show_mem.o out of lib/lib.a, which
    resulted in build warnings on all architectures that implement their own
    versions of show_mem():

    lib/lib.a(show_mem.o): In function `show_mem':
    show_mem.c:(.text+0x1f4): multiple definition of `show_mem'
    arch/sparc/mm/built-in.o:(.text+0xd70): first defined here

    The fix is to remove __show_mem() and add its argument to show_mem() in
    all implementations to prevent this breakage.

    Architectures that implement their own show_mem() actually don't do
    anything with the argument yet, but they could be made to filter nodes
    that aren't allowed in the current context in the future just like the
    generic implementation.

    Reported-by: Stephen Rothwell
    Reported-by: James Bottomley
    Suggested-by: Andrew Morton
    Signed-off-by: David Rientjes
    Signed-off-by: Linus Torvalds

    David Rientjes
     

11 Mar, 2011

2 commits

  • The Tilera architecture traditionally supports 64KB page sizes
    to improve TLB utilization and improve performance when the
    hardware is being used primarily to run a single application.

    For more generic server scenarios, it can be beneficial to run
    with 4KB page sizes, so this commit allows that to be specified
    (by modifying the arch/tile/include/hv/pagesize.h header).

    As part of this change, we also re-worked the PTE management
    slightly so that PTE writes all go through a __set_pte() function
    where we can do some additional validation. The set_pte_order()
    function was eliminated since the "order" argument wasn't being used.

    One bug uncovered was in the PCI DMA code, which wasn't properly
    flushing the specified range. This was benign with 64KB pages,
    but with 4KB pages we were getting some larger flushes wrong.

    The per-cpu memory reservation code also needed updating to
    conform with the newer percpu stuff; before it always chose 64KB,
    and that was always correct, but with 4KB granularity we now have
    to pay closer attention and reserve the amount of memory that will
    be requested when the percpu code starts allocating.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This is a grab bag of changes with no actual change to generated code.
    This includes whitespace and comment typos, plus a couple of stale
    comments being removed.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

02 Mar, 2011

5 commits


24 Feb, 2011

1 commit


18 Nov, 2010

1 commit


02 Nov, 2010

2 commits


28 Oct, 2010

1 commit

  • Christoph reported a nice splat which illustrated a race in the new stack
    based kmap_atomic implementation.

    The problem is that we pop our stack slot before we're completely done
    resetting its state -- in particular clearing the PTE (sometimes that's
    CONFIG_DEBUG_HIGHMEM). If an interrupt happens before we actually clear
    the PTE used for the last slot, that interrupt can reuse the slot in a
    dirty state, which triggers a BUG in kmap_atomic().

    Fix this by introducing kmap_atomic_idx() which reports the current slot
    index without actually releasing it and use that to find the PTE and delay
    the _pop() until after we're completely done.

    Signed-off-by: Peter Zijlstra
    Reported-by: Christoph Hellwig
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

27 Oct, 2010

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: convert a BUG_ON to BUILD_BUG_ON
    arch/tile: make ptrace() work properly for TILE-Gx COMPAT mode
    arch/tile: support new info op generated by compiler
    arch/tile: minor whitespace/naming changes for string support files
    arch/tile: enable single-step support for TILE-Gx
    arch/tile: parameterize system PLs to support KVM port
    arch/tile: add Tilera's header as an open-source header
    arch/tile: Bomb C99 comments to C89 comments in tile's
    arch/tile: prevent corrupt top frame from causing backtracer runaway
    arch/tile: various top-level Makefile cleanups
    arch/tile: change lower bound on syscall error return to -4095
    arch/tile: properly export __mb_incoherent for modules
    arch/tile: provide a definition of MAP_STACK
    kmemleak: add TILE to the list of supported architectures.
    char: hvc: check for error case
    arch/tile: Add a warning if we try to allocate too much vmalloc memory.
    arch/tile: update some comments to clarify register usage.
    arch/tile: use better "punctuation" for VMSPLIT_3_5G and friends
    arch/tile: Use
    tile: replace some BUG_ON checks with BUILD_BUG_ON checks

    Linus Torvalds
     
  • Keep the current interface but ignore the KM_type and use a stack based
    approach.

    The advantage is that we get rid of crappy code like:

    #define __KM_PTE \
    (in_nmi() ? KM_NMI_PTE : \
    in_irq() ? KM_IRQ_PTE : \
    KM_PTE0)

    and in general can stop worrying about what context we're in and what kmap
    slots might be appropriate for that.

    The downside is that FRV kmap_atomic() gets more expensive.

    For now we use a CPP trick suggested by Andrew:

    #define kmap_atomic(page, args...) __kmap_atomic(page)

    to avoid having to touch all kmap_atomic() users in a single patch.

    [ not compiled on:
    - mn10300: the arch doesn't actually build with highmem to begin with ]

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: fix up drivers/gpu/drm/i915/intel_overlay.c]
    Acked-by: Rik van Riel
    Signed-off-by: Peter Zijlstra
    Acked-by: Chris Metcalf
    Cc: David Howells
    Cc: Hugh Dickins
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Steven Rostedt
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: David Miller
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Dave Airlie
    Cc: Li Zefan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

16 Oct, 2010

2 commits

  • While not a port to KVM (yet), this change modifies the kernel
    to be able to build either at PL1 or at PL2 with a suitable
    config switch. Pushing up this change avoids handling branch
    merge issues going forward with the KVM work.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This change adds one of the Tilera standard headers to the set
    of headers shipped with Linux. The header provides
    methods for programmatically interacting with the Tilera simulator.

    The current provides inline assembly for the _sim_syscall
    function, so the declaration and definition previously provided
    manually in Linux are no longer needed. We now use the standard
    sim_validate_lines_evicted() method from rather than
    rolling our own direct call to sim_syscall().

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

15 Oct, 2010

1 commit

  • With this change we now include into the "tile"
    version of the header. To take full advantage of the prototypes there,
    we also change our naming convention for "struct pt_regs *" syscalls so
    that, e.g., _sys_execve() is the "true" syscall entry, which sets the
    appropriate register to point to the pt_regs before calling sys_execve().

    While doing this I realized I no longer needed the fork and vfork
    entry point stubs, since those functions aren't in the generic
    syscall ABI, so I removed them as well.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

13 Aug, 2010

2 commits

  • This change rolls up random cleanups not representing any actual bugs.

    - Remove a stale CONFIG_ value from the default tile_defconfig
    - Remove unused tns_atomic_xxx() family of methods from
    - Optimize get_order() using Tile's "clz" instruction
    - Fix a bad hypervisor upcall name (not currently used in Linux anyway)
    - Use __copy_in_user_inatomic() name for consistency, and export it
    - Export some additional hypervisor driver I/O upcalls and some homecache calls
    - Remove the obfuscating MEMCPY_TEST_WH64 support code
    - Other stray comment cleanups, #if 0 removal, etc.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Signed-off-by: Andrea Gelmini
    Signed-off-by: Chris Metcalf

    Andrea Gelmini
     

11 Aug, 2010

1 commit


07 Jul, 2010

1 commit

  • This commit is primarily changes caused by reviewing "sparse"
    and "checkpatch" output on our sources, so is somewhat noisy, since
    things like "printk() -> pr_err()" (or whatever) throughout the
    codebase tend to get tedious to read. Rather than trying to tease
    apart precisely which things changed due to which type of code
    review, this commit includes various cleanups in the code:

    - sparse: Add declarations in headers for globals.
    - sparse: Fix __user annotations.
    - sparse: Using gfp_t consistently instead of int.
    - sparse: removing functions not actually used.
    - checkpatch: Clean up printk() warnings by using pr_info(), etc.;
    also avoid partial-line printks except in bootup code.
    - checkpatch: Use exposed structs rather than typedefs.
    - checkpatch: Change some C99 comments to C89 comments.

    In addition, a couple of minor other changes are rolled in
    to this commit:

    - Add support for a "raise" instruction to cause SIGFPE, etc., to be raised.
    - Remove some compat code that is unnecessary when we fully eliminate
    some of the deprecated syscalls from the generic syscall ABI.
    - Update the tile_defconfig to reflect current config contents.

    Signed-off-by: Chris Metcalf
    Acked-by: Arnd Bergmann

    Chris Metcalf
     

05 Jun, 2010

1 commit

  • This change is the core kernel support for TILEPro and TILE64 chips.
    No driver support (except the console driver) is included yet.

    This includes the relevant Linux headers in asm/; the low-level
    low-level "Tile architecture" headers in arch/, which are
    shared with the hypervisor, etc., and are build-system agnostic;
    and the relevant hypervisor headers in hv/.

    Signed-off-by: Chris Metcalf
    Acked-by: Arnd Bergmann
    Acked-by: FUJITA Tomonori
    Reviewed-by: Paul Mundt

    Chris Metcalf