07 Jan, 2009

1 commit

  • Show node to memory section relationship with symlinks in sysfs

    Add /sys/devices/system/node/nodeX/memoryY symlinks for all
    the memory sections located on nodeX. For example:
    /sys/devices/system/node/node1/memory135 -> ../../memory/memory135
    indicates that memory section 135 resides on node1.

    Also revises documentation to cover this change as well as updating
    Documentation/ABI/testing/sysfs-devices-memory to include descriptions
    of memory hotremove files 'phys_device', 'phys_index', and 'state'
    that were previously not described there.

    In addition to it always being a good policy to provide users with
    the maximum possible amount of physical location information for
    resources that can be hot-added and/or hot-removed, the following
    are some (but likely not all) of the user benefits provided by
    this change.
    Immediate:
    - Provides information needed to determine the specific node
    on which a defective DIMM is located. This will reduce system
    downtime when the node or defective DIMM is swapped out.
    - Prevents unintended onlining of a memory section that was
    previously offlined due to a defective DIMM. This could happen
    during node hot-add when the user or node hot-add assist script
    onlines _all_ offlined sections due to user or script inability
    to identify the specific memory sections located on the hot-added
    node. The consequences of reintroducing the defective memory
    could be ugly.
    - Provides information needed to vary the amount and distribution
    of memory on specific nodes for testing or debugging purposes.
    Future:
    - Will provide information needed to identify the memory
    sections that need to be offlined prior to physical removal
    of a specific node.

    Symlink creation during boot was tested on 2-node x86_64, 2-node
    ppc64, and 2-node ia64 systems. Symlink creation during physical
    memory hot-add tested on a 2-node x86_64 system.

    Signed-off-by: Gary Hade
    Signed-off-by: Badari Pulavarty
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gary Hade
     

22 Dec, 2008

6 commits

  • Split pages returned by dma_alloc_coherent() and make sure
    we free them one by one.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • This migrates from the old bitrotted kgdb stub implementation and moves
    to the generic stub. In the process support for SH-2/SH-2A is also added,
    which the old stub never provided.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This ought to be unsigned long, rather than defaulting to int.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This converts the sh64 /proc/asids entry to debugfs and enables it for
    all SH parts that have debugfs enabled.

    On MMU systems this can be used to determine which processes are using
    which ASIDs which in turn can be used for finer grained cache tag
    analysis.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This patch adds a pass-through case when ioremapping P4 addresses.

    Addresses passed to ioremap() should be physical addresses, so the
    best option is usually to convert the virtual address to a physical
    address before calling ioremap. This will give you a virtual address
    in P2 which matches the physical address and this works well for
    most internal hardware blocks on the SuperH architecture.

    However, some hardware blocks must be accessed through P4. Converting
    the P4 address to a physical and then back to a P2 does not work. One
    example of this is the sh7722 TMU block, it must be accessed through P4.

    Without this patch P4 addresses will be mapped using PTEs which
    requires the page allocator to be up and running.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • Now that arch/sh/mm/mmap.c exists, move arch_get_unmapped_area() there.
    Follows the ARM change.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

13 Nov, 2008

1 commit


12 Nov, 2008

1 commit

  • With the PMB enabled, only P1SEG and up are covered by the PMB mappings,
    meaning that situations where out-of-bounds physical addresses are read
    from will lead to TLB reset after the PMB miss, allowing for use cases
    like dd if=/dev/mem to reset the TLB.

    Fix this up to make sure the reference is between __MEMORY_START (phys)
    and __pa(high_memory). This is coherent across all variants of sh/sh64
    with and without MMU, though the PMB bug itself is only applicable to
    SH-4A parts.

    Reported-by: Hideo Saito
    Signed-off-by: Paul Mundt

    Paul Mundt
     

10 Nov, 2008

1 commit

  • There was a race in the kmap_coherent() implementation. While we
    guarded against preemption, there was nothing preventing eviction of
    the pre-faulted fixmap entry from the UTLB. Under certain workloads
    this would result in the fixmap entries used for cache colouring being
    evicted from the UTLB in the midst of a copy_page().

    In addition to pre-faulting, we also make sure to preserve the PTEs
    in the kernel page table and introduce a cached PTE for kmap_coherent()
    usage. This follows a similar change on MIPS ("[MIPS] Fix aliasing bug
    in copy_to_user_page / copy_from_user_page").

    Reported-by: Hideo Saito
    Reported-by: CHIKAMA Masaki
    Tested-by: Yoshihiro Shimoda
    Signed-off-by: Paul Mundt

    Paul Mundt
     

31 Oct, 2008

1 commit


21 Oct, 2008

1 commit


20 Oct, 2008

2 commits


21 Sep, 2008

3 commits

  • This implements a few trace points across events that are deemed
    interesting. This implements a number of trace points:

    - The page fault handler / TLB miss
    - IPC calls
    - Kernel thread creation

    The original LTTng patch had the slow-path instrumented, which
    fails to account for the vast majority of events. In general
    placing this in the fast-path is not a huge performance hit, as
    we don't take page faults for kernel addresses.

    The other bits of interest are some of the other trap handlers, as
    well as the syscall entry/exit (which is better off being handled
    through the tracehook API). Most of the other trap handlers are corner
    cases where alternate means of notification exist, so there is little
    value in placing extra trace points in these locations.

    Based on top of the points provided both by the LTTng instrumentation
    patch as well as the patch shipping in the ST-Linux tree, albeit in a
    stripped down form.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • We already have hooks in place in the __do_page_fault() fast-path,
    so kill them off in the slow path.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Signed-off-by: Paul Mundt

    Paul Mundt
     

20 Sep, 2008

1 commit

  • This follows the powerpc commit f6a616800e68b61807d0f7bb0d5dc70665ef8046
    '[POWERPC] Fix kernel stack allocation alignment'.

    SH has traditionally forced the thread order to be relative to the page
    size, so there were never any situations where the same bug was
    triggered by slub. Regardless, the usage of > 8kB stacks for the larger
    page sizes is overkill, so we switch to using slab allocations there,
    as per the powerpc change.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

17 Sep, 2008

1 commit


08 Sep, 2008

7 commits


28 Aug, 2008

1 commit


11 Aug, 2008

2 commits

  • Allow user to pass parameters on kernel command line to override
    default size for physically contiguous memory buffers. The default
    VPU buffer size is too small for VGA harware encoding, but instead
    of just bumping up the number we allow the user to override the
    default size using the command line. Supports SuperH Mobile hardware
    blocks such as VEU, VPU and CEU.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • Presently we oops in mm/hugetlb.c:1325, which is the order == 0 test in
    hugetlb_add_hstate() called at initialization time. So, disable 64kB
    huge pages when we're using a 64kB PAGE_SIZE. On most parts this will
    force the default to be 1MB huge pages.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

04 Aug, 2008

2 commits


02 Aug, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (28 commits)
    mm/hugetlb.c must #include
    video: Fix up hp6xx driver build regressions.
    sh: defconfig updates.
    sh: Kill off stray mach-rsk7203 reference.
    serial: sh-sci: Fix up SH7760/SH7780/SH7785 early printk regression.
    sh: Move out individual boards without mach groups.
    sh: Make sure AT_SYSINFO_EHDR is exposed to userspace in asm/auxvec.h.
    sh: Allow SH-3 and SH-5 to use common headers.
    sh: Provide common CPU headers, prune the SH-2 and SH-2A directories.
    sh/maple: clean maple bus code
    sh: More header path fixups for mach dir refactoring.
    sh: Move out the solution engine headers to arch/sh/include/mach-se/
    sh: I2C fix for AP325RXA and Migo-R
    sh: Shuffle the board directories in to mach groups.
    sh: dma-sh: Fix up dreamcast dma.h mach path.
    sh: Switch KBUILD_DEFCONFIG to shx3_defconfig.
    sh: Add ARCH_DEFCONFIG entries for sh and sh64.
    sh: Fix compile error of Solution Engine
    sh: Proper __put_user_asm() size mismatch fix.
    sh: Stub in a dummy ENTRY_OFFSET for uImage offset calculation.
    ...

    Linus Torvalds
     

29 Jul, 2008

2 commits


28 Jul, 2008

6 commits

  • fix the problem that cannot boot using uImage when PAGE_SIZE is
    8kbyte or 64kbyte.

    Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Paul Mundt

    Yoshihiro Shimoda
     
  • Commit 1ea0704e0da65b2b46f9142ff1391163aac24060
    (mm: add a ptep_modify_prot transaction abstraction)
    triggered on sh build errors like the following:

    ...
    CC arch/sh/mm/pg-sh4.o
    cc1: warnings being treated as errors
    include2/asm/pgtable.h:139: error: 'ptep_get_and_clear' declared inline after being called
    include2/asm/pgtable.h:139: error: previous declaration of 'ptep_get_and_clear' was here
    make[2]: *** [arch/sh/mm/pg-sh4.o] Error 1

    Since there's no good reason for marking these global functions as
    "inline" this patch therefore removes the inline's.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Paul Mundt

    Adrian Bunk
     
  • This patch adds physically contiguous memory chunks to the UIO devices.
    The same strategy can be used in the future for the CEU as well.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • Remove inline from ptep_get_and_clean() to match with header file prototype.
    Makes linux-next build.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • The current kernel behaviour is to reenable interrupts unconditionally
    when taking a page fault. This patch changes this to only enable them
    if interrupts were previously enabled.

    It also fixes a problem seen with this fix in place: the kernel previously
    flushed the vsyscall page when handling a signal, which is not only
    unncessary, but caused a possible sleep with interrupts disabled.

    Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Stuart Menefy
     
  • Add implementation of flush_icache_range() suitable for signal handler
    and kprobes. Remove flush_cache_sigtramp() and change signal.c to use
    flush_icache_range().

    Signed-off-by: Chris Smith
    Signed-off-by: Paul Mundt

    Chris Smith