11 Jul, 2013

1 commit

  • Since all architectures have been converted to use vm_unmapped_area(),
    there is no remaining use for the free_area_cache.

    Signed-off-by: Michel Lespinasse
    Acked-by: Rik van Riel
    Cc: "James E.J. Bottomley"
    Cc: "Luck, Tony"
    Cc: Benjamin Herrenschmidt
    Cc: David Howells
    Cc: Helge Deller
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Paul Mackerras
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michel Lespinasse
     

10 Jul, 2013

1 commit

  • A few remaining architectures directly kill the page faulting task in an
    out of memory situation. This is usually not a good idea since that
    task might not even use a significant amount of memory and so may not be
    the optimal victim to resolve the situation.

    Since 2.6.29's 1c0fe6e ("mm: invoke oom-killer from page fault") there
    is a hook that architecture page fault handlers are supposed to call to
    invoke the OOM killer and let it pick the right task to kill. Convert
    the remaining architectures over to this hook.

    To have the previous behavior of simply taking out the faulting task the
    vm.oom_kill_allocating_task sysctl can be set to 1.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Cc: KAMEZAWA Hiroyuki
    Acked-by: David Rientjes
    Acked-by: Vineet Gupta [arch/arc bits]
    Cc: James Hogan
    Cc: David Howells
    Cc: Jonas Bonn
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

05 Jul, 2013

2 commits

  • Merge Kconfig menu diet patches from Dave Hansen:
    "I think the "Kernel Hacking" menu has gotten a bit out of hand. It is
    over 120 lines long on my system with everything enabled and options
    are scattered around it haphazardly.

    http://sr71.net/~dave/linux/kconfig-horror.png

    Let's try to introduce some sanity. This set takes that 120 lines
    down to 55 and makes it vastly easier to find some things. It's a
    start.

    This set stands on its own, but there is plenty of room for follow-up
    patches. The arch-specific debug options still end up getting stuck
    in the top-level "kernel hacking" menu. OPTIMIZE_INLINING, for
    instance, could obviously go in to the "compiler options" menu, but
    the fact that it is defined in arch/ in a separate Kconfig file keeps
    it on its own for the moment.

    The Signed-off-by's in here look funky. I changed employers while
    working on this set, so I have signoffs from both email addresses"

    * emailed patches from Dave Hansen :
    hang and lockup detection menu
    kconfig: consolidate printk options
    group locking debugging options
    consolidate compilation option configs
    consolidate runtime testing configs
    order memory debugging Kconfig options
    consolidate per-arch stack overflow debugging options

    Linus Torvalds
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184202.F54094D9@kernel.stglabs.ibm.com

    Several architectures have similar stack debugging config options.
    They all pretty much do the same thing, some with slightly
    differing help text.

    This patch changes the architectures to instead enable a Kconfig
    boolean, and then use that boolean in the generic Kconfig.debug
    to present the actual menu option. This removes a bunch of
    duplication and adds consistency across arches.

    Signed-off-by: Dave Hansen
    Reviewed-by: H. Peter Anvin
    Reviewed-by: James Hogan
    Acked-by: Chris Metcalf [for tile]
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     

04 Jul, 2013

4 commits

  • Prepare for removing num_physpages and simplify mem_init().

    Signed-off-by: Jiang Liu
    Acked-by: Chris Metcalf
    Cc: Bjorn Helgaas
    Cc: "David S. Miller"
    Cc: Wen Congyang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Normalize global variables exported by vmlinux.lds to conform usage
    guidelines from include/asm-generic/sections.h.

    1) Use _text to mark the start of the kernel image including the head
    text, and _stext to mark the start of the .text section.
    2) Export mandatory global variables __init_begin and __init_end.

    Signed-off-by: Jiang Liu
    Acked-by: Chris Metcalf
    Cc: Rusty Russell
    Cc: Bjorn Helgaas
    Cc: "David S. Miller"
    Cc: Wen Congyang
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Concentrate code to modify totalram_pages into the mm core, so the arch
    memory initialized code doesn't need to take care of it. With these
    changes applied, only following functions from mm core modify global
    variable totalram_pages: free_bootmem_late(), free_all_bootmem(),
    free_all_bootmem_node(), adjust_managed_page_count().

    With this patch applied, it will be much more easier for us to keep
    totalram_pages and zone->managed_pages in consistence.

    Signed-off-by: Jiang Liu
    Acked-by: David Howells
    Cc: "H. Peter Anvin"
    Cc: "Michael S. Tsirkin"
    Cc:
    Cc: Arnd Bergmann
    Cc: Catalin Marinas
    Cc: Chris Metcalf
    Cc: Geert Uytterhoeven
    Cc: Ingo Molnar
    Cc: Jeremy Fitzhardinge
    Cc: Jianguo Wu
    Cc: Joonsoo Kim
    Cc: Kamezawa Hiroyuki
    Cc: Konrad Rzeszutek Wilk
    Cc: Marek Szyprowski
    Cc: Mel Gorman
    Cc: Michel Lespinasse
    Cc: Minchan Kim
    Cc: Rik van Riel
    Cc: Rusty Russell
    Cc: Tang Chen
    Cc: Tejun Heo
    Cc: Thomas Gleixner
    Cc: Wen Congyang
    Cc: Will Deacon
    Cc: Yasuaki Ishimatsu
    Cc: Yinghai Lu
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Use common help functions to free reserved pages.

    Signed-off-by: Jiang Liu
    Cc: Chris Metcalf
    Cc: Wen Congyang
    Cc: "H. Peter Anvin"
    Cc: "Michael S. Tsirkin"
    Cc:
    Cc: Arnd Bergmann
    Cc: Catalin Marinas
    Cc: David Howells
    Cc: Geert Uytterhoeven
    Cc: Ingo Molnar
    Cc: Jeremy Fitzhardinge
    Cc: Jianguo Wu
    Cc: Joonsoo Kim
    Cc: Kamezawa Hiroyuki
    Cc: Konrad Rzeszutek Wilk
    Cc: Marek Szyprowski
    Cc: Mel Gorman
    Cc: Michel Lespinasse
    Cc: Minchan Kim
    Cc: Rik van Riel
    Cc: Rusty Russell
    Cc: Tang Chen
    Cc: Tejun Heo
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: Yasuaki Ishimatsu
    Cc: Yinghai Lu
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     

03 Jul, 2013

3 commits

  • Pull voluntary preemption fixes from Ingo Molnar:
    "This tree contains a speedup which is achieved through better
    might_sleep()/might_fault() preemption point annotations for uaccess
    functions, by Michael S Tsirkin:

    1. The only reason uaccess routines might sleep is if they fault.
    Make this explicit for all architectures.

    2. A voluntary preemption point in uaccess functions means compiler
    can't inline them efficiently, this breaks assumptions that they
    are very fast and small that e.g. net code seems to make. Remove
    this preemption point so behaviour matches with what callers
    assume.

    3. Accesses (e.g through socket ops) to kernel memory with KERNEL_DS
    like net/sunrpc does will never sleep. Remove an unconditinal
    might_sleep() in the might_fault() inline in kernel.h (used when
    PROVE_LOCKING is not set).

    4. Accesses with pagefault_disable() return EFAULT but won't cause
    caller to sleep. Check for that and thus avoid might_sleep() when
    PROVE_LOCKING is set.

    These changes offer a nice speedup for CONFIG_PREEMPT_VOLUNTARY=y
    kernels, here's a network bandwidth measurement between a virtual
    machine and the host:

    before:
    incoming: 7122.77 Mb/s
    outgoing: 8480.37 Mb/s

    after:
    incoming: 8619.24 Mb/s [ +21.0% ]
    outgoing: 9455.42 Mb/s [ +11.5% ]

    I kept these changes in a separate tree, separate from scheduler
    changes, because it's a mixed MM and scheduler topic"

    * 'sched-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    mm, sched: Allow uaccess in atomic with pagefault_disable()
    mm, sched: Drop voluntary schedule from might_fault()
    x86: uaccess s/might_sleep/might_fault/
    tile: uaccess s/might_sleep/might_fault/
    powerpc: uaccess s/might_sleep/might_fault/
    mn10300: uaccess s/might_sleep/might_fault/
    microblaze: uaccess s/might_sleep/might_fault/
    m32r: uaccess s/might_sleep/might_fault/
    frv: uaccess s/might_sleep/might_fault/
    arm64: uaccess s/might_sleep/might_fault/
    asm-generic: uaccess s/might_sleep/might_fault/

    Linus Torvalds
     
  • Pull scheduler updates from Ingo Molnar:
    "The main changes:

    - load-calculation cleanups and improvements, by Alex Shi
    - various nohz related tidying up of statisics, by Frederic
    Weisbecker
    - factor out /proc functions to kernel/sched/proc.c, by Paul
    Gortmaker
    - simplify the RT policy scheduler, by Kirill Tkhai
    - various fixes and cleanups"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits)
    sched/debug: Remove CONFIG_FAIR_GROUP_SCHED mask
    sched/debug: Fix formatting of /proc//sched
    sched: Fix typo in struct sched_avg member description
    sched/fair: Fix typo describing flags in enqueue_entity
    sched/debug: Add load-tracking statistics to task
    sched: Change get_rq_runnable_load() to static and inline
    sched/tg: Remove tg.load_weight
    sched/cfs_rq: Change atomic64_t removed_load to atomic_long_t
    sched/tg: Use 'unsigned long' for load variable in task group
    sched: Change cfs_rq load avg to unsigned long
    sched: Consider runnable load average in move_tasks()
    sched: Compute runnable load avg in cpu_load and cpu_avg_load_per_task
    sched: Update cpu load after task_tick
    sched: Fix sleep time double accounting in enqueue entity
    sched: Set an initial value of runnable avg for new forked task
    sched: Move a few runnable tg variables into CONFIG_SMP
    Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking"
    sched: Don't mix use of typedef ctl_table and struct ctl_table
    sched: Remove WARN_ON(!sd) from init_sched_groups_power()
    sched: Fix memory leakage in build_sched_groups()
    ...

    Linus Torvalds
     
  • Pull VFS patches (part 1) from Al Viro:
    "The major change in this pile is ->readdir() replacement with
    ->iterate(), dealing with ->f_pos races in ->readdir() instances for
    good.

    There's a lot more, but I'd prefer to split the pull request into
    several stages and this is the first obvious cutoff point."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (67 commits)
    [readdir] constify ->actor
    [readdir] ->readdir() is gone
    [readdir] convert ecryptfs
    [readdir] convert coda
    [readdir] convert ocfs2
    [readdir] convert fatfs
    [readdir] convert xfs
    [readdir] convert btrfs
    [readdir] convert hostfs
    [readdir] convert afs
    [readdir] convert ncpfs
    [readdir] convert hfsplus
    [readdir] convert hfs
    [readdir] convert befs
    [readdir] convert cifs
    [readdir] convert freevxfs
    [readdir] convert fuse
    [readdir] convert hpfs
    reiserfs: switch reiserfs_readdir_dentry to inode
    reiserfs: is_privroot_deh() needs only directory inode, actually
    ...

    Linus Torvalds
     

01 Jul, 2013

1 commit

  • Merge in a recent upstream commit:

    c2853c8df57f include/linux/math64.h: add div64_ul()

    because:

    72a4cf20cb71 sched: Change cfs_rq load avg to unsigned long

    relies on it.

    [ We don't rebase sched/core for this, because the handful of
    followup commits after the broken commit are not behavioral
    changes so are unlikely to be needed during bisection. ]

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

29 Jun, 2013

1 commit


19 Jun, 2013

1 commit

  • Most of the stuff from kernel/sched.c was moved to kernel/sched/core.c long time
    back and the comments/Documentation never got updated.

    I figured it out when I was going through sched-domains.txt and so thought of
    fixing it globally.

    I haven't crossed check if the stuff that is referenced in sched/core.c by all
    these files is still present and hasn't changed as that wasn't the motive behind
    this patch.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/cdff76a265326ab8d71922a1db5be599f20aad45.1370329560.git.viresh.kumar@linaro.org
    Signed-off-by: Ingo Molnar

    Viresh Kumar
     

16 Jun, 2013

1 commit

  • gcc 4.7.x is emitting calls to __ffsdi2 where previously
    it used to inline the appropriate ctz instructions.
    While this needs to be fixed in gcc, it's also easy to avoid
    having it cause build failures when building with those
    compilers by exporting __ffsdi2 to modules.

    Signed-off-by: Chris Metcalf
    Cc: stable@kernel.org

    Chris Metcalf
     

28 May, 2013

1 commit

  • The only reason uaccess routines might sleep
    is if they fault. Make this explicit.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Chris Metcalf
    Signed-off-by: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1369577426-26721-8-git-send-email-mst@redhat.com
    Signed-off-by: Ingo Molnar

    Michael S. Tsirkin
     

10 May, 2013

2 commits

  • Pull tile update from Chris Metcalf:
    "The interesting bug fix is support for the upcoming "4.2" release of
    the Tilera hypervisor, which by default launches Linux at privilege
    level 2 instead of 1. The fix lets new and old hypervisors and
    Linuxes interoperate more smoothly, so I've tagged it for
    stable@kernel.org so that older Linuxes will be able to boot under the
    newer hypervisor."

    * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    usb: tilegx: fix memleak when create hcd fail
    arch/tile: remove inline marking of EXPORT_SYMBOL functions
    rtc: rtc-tile: add missing platform_device_unregister() when module exit
    tile: support new Tilera hypervisor

    Linus Torvalds
     
  • EXPORT_SYMBOL and inline directives are contradictory to each other.
    The patch fixes this inconsistency.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Denis Efremov
    Signed-off-by: Chris Metcalf

    Denis Efremov
     

03 May, 2013

1 commit

  • The Tilera hypervisor shipped in releases up through MDE 4.1 launches
    the client operating system (i.e. Linux) at privilege level 1 (PL1).
    Starting with MDE 4.2, as part of the work to enable KVM, the
    Tilera hypervisor launches Linux at PL2 instead.

    This commit makes the KERNEL_PL option default to 2 for tilegx, while
    still saying at 1 for tilepro, which doesn't have an updated hypervisor.
    It also explains how and when you might want to choose another value.
    In addition, we change a small buglet in the on-chip Ethernet driver,
    where we were failing to use the KERNEL_PL constant in an API call.

    To make the transition cleaner, this change also provides the updated
    hv_init() API for the new hypervisor that supports announcing Linux's
    compiled-in PL, so the hypervisor can generate a suitable error in the
    case of a mismatched hypervisor and Linux binary.

    Signed-off-by: Chris Metcalf
    Cc: stable@vger.linux.org

    Chris Metcalf
     

02 May, 2013

2 commits

  • Pull VFS updates from Al Viro,

    Misc cleanups all over the place, mainly wrt /proc interfaces (switch
    create_proc_entry to proc_create(), get rid of the deprecated
    create_proc_read_entry() in favor of using proc_create_data() and
    seq_file etc).

    7kloc removed.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
    don't bother with deferred freeing of fdtables
    proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
    proc: Make the PROC_I() and PDE() macros internal to procfs
    proc: Supply a function to remove a proc entry by PDE
    take cgroup_open() and cpuset_open() to fs/proc/base.c
    ppc: Clean up scanlog
    ppc: Clean up rtas_flash driver somewhat
    hostap: proc: Use remove_proc_subtree()
    drm: proc: Use remove_proc_subtree()
    drm: proc: Use minor->index to label things, not PDE->name
    drm: Constify drm_proc_list[]
    zoran: Don't print proc_dir_entry data in debug
    reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
    proc: Supply an accessor for getting the data from a PDE's parent
    airo: Use remove_proc_subtree()
    rtl8192u: Don't need to save device proc dir PDE
    rtl8187se: Use a dir under /proc/net/r8180/
    proc: Add proc_mkdir_data()
    proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
    proc: Move PDE_NET() to fs/proc/proc_net.c
    ...

    Linus Torvalds
     
  • Pull tile arch changes from Chris Metcalf:
    "These are some minor new feature work and other changes that didn't
    merit getting pushed up after the 3.9 merge window closed.

    There should be a lot more activity in the 3.11 merge window"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: Fix syscall return value passed to tracepoint
    tile: comment assumption about __insn_mtspr for
    tile: ns2cycles should use __raw_get_cpu_var
    arch: remove KCORE_ELF again [tile]
    tile: remove two outdated Kconfig entries
    tile: support atomic64_dec_if_positive()
    tile: support TIF_SYSCALL_TRACEPOINT; select HAVE_SYSCALL_TRACEPOINTS
    tile: Add definition of NR_syscalls
    tile: move declaration of sys_call_table to
    arch/tile: Enable HAVE_ARCH_TRACEHOOK
    arch/tile: Call tracehook_report_syscall_{entry,exit} in syscall trace

    Linus Torvalds
     

01 May, 2013

3 commits

  • Pull compat cleanup from Al Viro:
    "Mostly about syscall wrappers this time; there will be another pile
    with patches in the same general area from various people, but I'd
    rather push those after both that and vfs.git pile are in."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
    syscalls.h: slightly reduce the jungles of macros
    get rid of union semop in sys_semctl(2) arguments
    make do_mremap() static
    sparc: no need to sign-extend in sync_file_range() wrapper
    ppc compat wrappers for add_key(2) and request_key(2) are pointless
    x86: trim sys_ia32.h
    x86: sys32_kill and sys32_mprotect are pointless
    get rid of compat_sys_semctl() and friends in case of ARCH_WANT_OLD_COMPAT_IPC
    merge compat sys_ipc instances
    consolidate compat lookup_dcookie()
    convert vmsplice to COMPAT_SYSCALL_DEFINE
    switch getrusage() to COMPAT_SYSCALL_DEFINE
    switch epoll_pwait to COMPAT_SYSCALL_DEFINE
    convert sendfile{,64} to COMPAT_SYSCALL_DEFINE
    switch signalfd{,4}() to COMPAT_SYSCALL_DEFINE
    make SYSCALL_DEFINE-generated wrappers do asmlinkage_protect
    make HAVE_SYSCALL_WRAPPERS unconditional
    consolidate cond_syscall and SYSCALL_ALIAS declarations
    teach SYSCALL_DEFINE how to deal with long long/unsigned long long
    get rid of duplicate logics in __SC_....[1-6] definitions

    Linus Torvalds
     
  • The help text for this config is duplicated across the x86, parisc, and
    s390 Kconfig.debug files. Arnd Bergman noted that the help text was
    slightly misleading and should be fixed to state that enabling this
    option isn't a problem when using pre 4.4 gcc.

    To simplify the rewording, consolidate the text into lib/Kconfig.debug
    and modify it there to be more explicit about when you should say N to
    this config.

    Also, make the text a bit more generic by stating that this option
    enables compile time checks so we can cover architectures which emit
    warnings vs. ones which emit errors. The details of how an
    architecture decided to implement the checks isn't as important as the
    concept of compile time checking of copy_from_user() calls.

    While we're doing this, remove all the copy_from_user_overflow() code
    that's duplicated many times and place it into lib/ so that any
    architecture supporting this option can get the function for free.

    Signed-off-by: Stephen Boyd
    Acked-by: Arnd Bergmann
    Acked-by: Ingo Molnar
    Acked-by: H. Peter Anvin
    Cc: Arjan van de Ven
    Acked-by: Helge Deller
    Cc: Heiko Carstens
    Cc: Stephen Rothwell
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • show_regs() is inherently arch-dependent but it does make sense to print
    generic debug information and some archs already do albeit in slightly
    different forms. This patch introduces a generic function to print debug
    information from show_regs() so that different archs print out the same
    information and it's much easier to modify what's printed.

    show_regs_print_info() prints out the same debug info as dump_stack()
    does plus task and thread_info pointers.

    * Archs which didn't print debug info now do.

    alpha, arc, blackfin, c6x, cris, frv, h8300, hexagon, ia64, m32r,
    metag, microblaze, mn10300, openrisc, parisc, score, sh64, sparc,
    um, xtensa

    * Already prints debug info. Replaced with show_regs_print_info().
    The printed information is superset of what used to be there.

    arm, arm64, avr32, mips, powerpc, sh32, tile, unicore32, x86

    * s390 is special in that it used to print arch-specific information
    along with generic debug info. Heiko and Martin think that the
    arch-specific extra isn't worth keeping s390 specfic implementation.
    Converted to use the generic version.

    Note that now all archs print the debug info before actual register
    dumps.

    An example BUG() dump follows.

    kernel BUG at /work/os/work/kernel/workqueue.c:4841!
    invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #7
    Hardware name: empty empty/S3992, BIOS 080011 10/26/2007
    task: ffff88007c85e040 ti: ffff88007c860000 task.ti: ffff88007c860000
    RIP: 0010:[] [] init_workqueues+0x4/0x6
    RSP: 0000:ffff88007c861ec8 EFLAGS: 00010246
    RAX: ffff88007c861fd8 RBX: ffffffff824466a8 RCX: 0000000000000001
    RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffffffff8234a07a
    RBP: ffff88007c861ec8 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8234a07a
    R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    FS: 0000000000000000(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffff88015f7ff000 CR3: 00000000021f1000 CR4: 00000000000007f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Stack:
    ffff88007c861ef8 ffffffff81000312 ffffffff824466a8 ffff88007c85e650
    0000000000000003 0000000000000000 ffff88007c861f38 ffffffff82335e5d
    ffff88007c862080 ffffffff8223d8c0 ffff88007c862080 ffffffff81c47760
    Call Trace:
    [] do_one_initcall+0x122/0x170
    [] kernel_init_freeable+0x9b/0x1c8
    [] ? rest_init+0x140/0x140
    [] kernel_init+0xe/0xf0
    [] ret_from_fork+0x7c/0xb0
    [] ? rest_init+0x140/0x140
    ...

    v2: Typo fix in x86-32.

    v3: CPU number dropped from show_regs_print_info() as
    dump_stack_print_info() has been updated to print it. s390
    specific implementation dropped as requested by s390 maintainers.

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Acked-by: Jesper Nilsson
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Bjorn Helgaas
    Cc: Fengguang Wu
    Cc: Mike Frysinger
    Cc: Vineet Gupta
    Cc: Sam Ravnborg
    Acked-by: Chris Metcalf [tile bits]
    Acked-by: Richard Kuo [hexagon bits]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

30 Apr, 2013

4 commits

  • Pull SMP/hotplug changes from Ingo Molnar:
    "This is a pretty large, multi-arch series unifying and generalizing
    the various disjunct pieces of idle routines that architectures have
    historically copied from each other and have grown in random, wildly
    inconsistent and sometimes buggy directions:

    101 files changed, 455 insertions(+), 1328 deletions(-)

    this went through a number of review and test iterations before it was
    committed, it was tested on various architectures, was exposed to
    linux-next for quite some time - nevertheless it might cause problems
    on architectures that don't read the mailing lists and don't regularly
    test linux-next.

    This cat herding excercise was motivated by the -rt kernel, and was
    brought to you by Thomas "the Whip" Gleixner."

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
    idle: Remove GENERIC_IDLE_LOOP config switch
    um: Use generic idle loop
    ia64: Make sure interrupts enabled when we "safe_halt()"
    sparc: Use generic idle loop
    idle: Remove unused ARCH_HAS_DEFAULT_IDLE
    bfin: Fix typo in arch_cpu_idle()
    xtensa: Use generic idle loop
    x86: Use generic idle loop
    unicore: Use generic idle loop
    tile: Use generic idle loop
    tile: Enter idle with preemption disabled
    sh: Use generic idle loop
    score: Use generic idle loop
    s390: Use generic idle loop
    powerpc: Use generic idle loop
    parisc: Use generic idle loop
    openrisc: Use generic idle loop
    mn10300: Use generic idle loop
    mips: Use generic idle loop
    microblaze: Use generic idle loop
    ...

    Linus Torvalds
     
  • The early console implementations are the same all over the place. Move
    the print function to kernel/printk and get rid of the copies.

    [akpm@linux-foundation.org: arch/mips/kernel/early_printk.c needs kernel.h for va_list]
    [paul.gortmaker@windriver.com: sh4: make the bios early console support depend on EARLY_PRINTK]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Paul Gortmaker
    Cc: Russell King
    Acked-by: Mike Frysinger
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Richard Weinberger
    Reviewed-by: Ingo Molnar
    Tested-by: Paul Gortmaker
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • This patchset removes vm_struct list management after initializing
    vmalloc. Adding and removing an entry to vmlist is linear time
    complexity, so it is inefficient. If we maintain this list, overall
    time complexity of adding and removing area to vmalloc space is O(N),
    although we use rbtree for finding vacant place and it's time complexity
    is just O(logN).

    And vmlist and vmlist_lock is used many places of outside of vmalloc.c.
    It is preferable that we hide this raw data structure and provide
    well-defined function for supporting them, because it makes that they
    cannot mistake when manipulating theses structure and it makes us easily
    maintain vmalloc layer.

    For kexec and makedumpfile, I export vmap_area_list, instead of vmlist.
    This comes from Atsushi's recommendation. For more information, please
    refer below link. https://lkml.org/lkml/2012/12/6/184

    This patch:

    The purpose of iterating a vmlist is finding vm area with specific virtual
    address. find_vm_area() is provided for this purpose and more efficient,
    because it uses a rbtree. So change it.

    Signed-off-by: Joonsoo Kim
    Signed-off-by: Joonsoo Kim
    Acked-by: Guan Xuetao
    Acked-by: Ingo Molnar
    Acked-by: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Atsushi Kumagai
    Cc: Dave Anderson
    Cc: Eric Biederman
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joonsoo Kim
     
  • Commit abf09bed3cce ("s390/mm: implement software dirty bits")
    introduced another difference in the pte layout vs. the pmd layout on
    s390, thoroughly breaking the s390 support for hugetlbfs. This requires
    replacing some more pte_xxx functions in mm/hugetlbfs.c with a
    huge_pte_xxx version.

    This patch introduces those huge_pte_xxx functions and their generic
    implementation in asm-generic/hugetlb.h, which will now be included on
    all architectures supporting hugetlbfs apart from s390. This change
    will be a no-op for those architectures.

    [akpm@linux-foundation.org: fix warning]
    Signed-off-by: Gerald Schaefer
    Cc: Mel Gorman
    Cc: Hugh Dickins
    Cc: Hillf Danton
    Acked-by: Michal Hocko [for !s390 parts]
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerald Schaefer
     

25 Apr, 2013

1 commit


17 Apr, 2013

1 commit


10 Apr, 2013

3 commits

  • The only part of proc_dir_entry the code outside of fs/proc
    really cares about is PDE(inode)->data. Provide a helper
    for that; static inline for now, eventually will be moved
    to fs/proc, along with the knowledge of struct proc_dir_entry
    layout.

    Signed-off-by: Al Viro

    Al Viro
     
  • The arch_local_irq_save(), etc., routines are required to function
    as compiler barriers. They do, but it's subtle and requires knowing
    that the gcc builtin __insn_mtspr() is marked as a memory clobber.
    Provide a comment explaining the assumption.

    Signed-off-by: Chris Metcalf
    [ This came about from me wondering about the synchronization rules of
    __insn_mtspr() - Linus ]
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     
  • The arch_local_irq_save(), etc., routines are required to function
    as compiler barriers. They do, but it's subtle and requires knowing
    that the gcc builtin __insn_mtspr() is marked as a memory clobber.
    Provide a comment explaining the assumption.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

08 Apr, 2013

3 commits

  • Signed-off-by: Thomas Gleixner
    Cc: Linus Torvalds
    Cc: Rusty Russell
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Reviewed-by: Cc: Srivatsa S. Bhat
    Cc: Magnus Damm
    Acked-by: Chris Metcalf
    Link: http://lkml.kernel.org/r/20130321215235.348460344@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • cpu_idle() needs to be called with preemption disabled.

    Signed-off-by: Thomas Gleixner
    Cc: Linus Torvalds
    Cc: Rusty Russell
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Reviewed-by: Cc: Srivatsa S. Bhat
    Cc: Magnus Damm
    Acked-by: Chris Metcalf
    Link: http://lkml.kernel.org/r/20130321215235.280451779@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Move it to a common place. Preparatory patch for implementing
    set/clear for the idle need_resched poll implementation.

    Signed-off-by: Thomas Gleixner
    Cc: Linus Torvalds
    Cc: Rusty Russell
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Reviewed-by: Cc: Srivatsa S. Bhat
    Cc: Magnus Damm
    Link: http://lkml.kernel.org/r/20130321215233.446034505@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

01 Apr, 2013

1 commit


30 Mar, 2013

1 commit

  • The current Tilera boot infrastructure now provides the initramfs
    to Linux as a Tilera-hypervisor file named "initramfs", rather than
    "initramfs.cpio.gz", as before. (This makes it reasonable to use
    other compression techniques than gzip on the file without having to
    worry about the name causing confusion.) Adapt to use the new name,
    but also fall back to checking for the old name.

    Cc'ing to stable so that older kernels will remain compatible with
    newer Tilera boot infrastructure.

    Signed-off-by: Chris Metcalf
    Cc: stable@vger.kernel.org

    Chris Metcalf
     

27 Mar, 2013

1 commit

  • ns2cycles use per_cpu variables, and will, eventually, find its way into
    smp_processor_id(). This is not safe in a preemptible kernel;
    preemption should ideally be disabled.

    BUG: using smp_processor_id() in preemptible [00000000] code:
    systemd-modules/367
    caller is ns2cycles+0x40/0xb8

    Starting stack dump of tid 367, pid 367 (systemd-modules) on cpu 2 at
    cycle 20969956421
    frame 0: 0xfffffff70004b860 dump_stack+0x0/0x20 (sp 0xfffffe407993fa90)
    frame 1: 0xfffffff7006abc28 debug_smp_processor_id+0x1a8/0x1e0 (sp
    0xfffffe407993fa90)
    frame 2: 0xfffffff7004d7b40 ns2cycles+0x40/0xb8 (sp 0xfffffe407993fab8)
    frame 3: 0xfffffff7004dc578 __ndelay+0x38/0x80 (sp 0xfffffe407993fae0)

    However, in this case:

    - the frequency is the same accross all cores
    - we use the data read-only
    - we do not scale the frequency

    Which means that we can use the __raw_get_cpu_var instead.

    Signed-off-by: Henrik Austad
    Signed-off-by: Chris Metcalf

    Henrik Austad
     

24 Mar, 2013

1 commit

  • Pull md fixes from NeilBrown:
    "A few bugfixes for md

    - recent regressions in raid5
    - recent regressions in dmraid
    - a few instances of CONFIG_MULTICORE_RAID456 linger

    Several tagged for -stable"

    * tag 'md-3.9-fixes' of git://neil.brown.name/md:
    md: remove CONFIG_MULTICORE_RAID456 entirely
    md/raid5: ensure sync and DISCARD don't happen at the same time.
    MD: Prevent sysfs operations on uninitialized kobjects
    MD RAID5: Avoid accessing gendisk or queue structs when not available
    md/raid5: schedule_construction should abort if nothing to do.

    Linus Torvalds