07 Aug, 2010

1 commit

  • …x/kernel/git/tip/linux-2.6-tip

    * 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    um: Fix read_persistent_clock fallout
    kgdb: Do not access xtime directly
    powerpc: Clean up obsolete code relating to decrementer and timebase
    powerpc: Rework VDSO gettimeofday to prevent time going backwards
    clocksource: Add __clocksource_updatefreq_hz/khz methods
    x86: Convert common clocksources to use clocksource_register_hz/khz
    timekeeping: Make xtime and wall_to_monotonic static
    hrtimer: Cleanup direct access to wall_to_monotonic
    um: Convert to use read_persistent_clock
    timkeeping: Fix update_vsyscall to provide wall_to_monotonic offset
    powerpc: Cleanup xtime usage
    powerpc: Simplify update_vsyscall
    time: Kill off CONFIG_GENERIC_TIME
    time: Implement timespec_add
    x86: Fix vtime/file timestamp inconsistencies

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Much less trivial conflicts in arch/powerpc/kernel/time.c resolved as
    per Thomas' earlier merge commit 47916be4e28c ("Merge branch
    'powerpc.cherry-picks' into timers/clocksource")

    Linus Torvalds
     

28 Jul, 2010

2 commits

  • The etr events switch-to-local and sync-check disable the synchronous clock
    and schedule a work queue that tries to get the clock back into sync.
    If another switch-to-local or sync-check event occurs while the work queue
    function etr_work_fn still runs the eacr.es bit and the clock_sync_word can
    become inconsistent because check_sync_clock only uses the clock_sync_word
    to determine if the clock is in sync or not. The second pass of the
    etr_work_fn will reset the eacr.es bit but will leave the clock_sync_word
    intact. Fix this race by moving the reset of the eacr.es bit into the
    switch-to-local and sync-check functions and by checking the eacr.es bit
    as well to decide if the clock needs to be synced.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • In case user space is single stepped (PER) the program check handler
    claims too early that IRQs are enabled on the return path.
    Subsequent checks will notice that the IRQ mask in the PSW and
    what lockdep thinks the IRQ mask should be do not correlate and
    therefore will print a warning to the console and disable lockdep.

    Fix this by doing all the work within the correct context.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

27 Jul, 2010

1 commit

  • update_vsyscall() did not provide the wall_to_monotoinc offset,
    so arch specific implementations tend to reference wall_to_monotonic
    directly. This limits future cleanups in the timekeeping core, so
    this patch fixes the update_vsyscall interface to provide
    wall_to_monotonic, allowing wall_to_monotonic to be made static
    as planned in Documentation/feature-removal-schedule.txt

    Signed-off-by: John Stultz
    Cc: Martin Schwidefsky
    Cc: Anton Blanchard
    Cc: Paul Mackerras
    Cc: Tony Luck
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    John Stultz
     

09 Jun, 2010

1 commit


01 Jun, 2010

1 commit

  • * 'for-35' of git://repo.or.cz/linux-kbuild: (81 commits)
    kbuild: Revert part of e8d400a to resolve a conflict
    kbuild: Fix checking of scm-identifier variable
    gconfig: add support to show hidden options that have prompts
    menuconfig: add support to show hidden options which have prompts
    gconfig: remove show_debug option
    gconfig: remove dbg_print_ptype() and dbg_print_stype()
    kconfig: fix zconfdump()
    kconfig: some small fixes
    add random binaries to .gitignore
    kbuild: Include gen_initramfs_list.sh and the file list in the .d file
    kconfig: recalc symbol value before showing search results
    .gitignore: ignore *.lzo files
    headerdep: perlcritic warning
    scripts/Makefile.lib: Align the output of LZO
    kbuild: Generate modules.builtin in make modules_install
    Revert "kbuild: specify absolute paths for cscope"
    kbuild: Do not unnecessarily regenerate modules.builtin
    headers_install: use local file handles
    headers_check: fix perl warnings
    export_report: fix perl warnings
    ...

    Linus Torvalds
     

28 May, 2010

2 commits

  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] fill out file list in s390 MAINTAINERS entry
    [S390] Add support for LZO-compressed kernels.
    [S390] cmm: get rid of CMM_PROC config option
    [S390] cmm: remove superfluous EXPORT_SYMBOLs plus cleanups
    [S390] dasd: unit check handling during internal cio I/O
    [S390] cio: unit check handling during internal I/O
    [S390] ccwgroup: add locking around drvdata access
    [S390] cio: remove stsch
    [S390] spp: remove KVM_AWARE_CMF config option
    [S390] kprobes: forbid probing of stnsm/stosm/epsw
    [S390] spp: fix compilation for CONFIG_32BIT
    [S390] atomic: implement atomic64_dec_if_positive
    [S390] cmm: fix crash on module unload

    Linus Torvalds
     
  • By the previous modification, the cpu notifier can return encapsulate
    errno value. This converts the cpu notifiers for s390.

    Signed-off-by: Akinobu Mita
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

27 May, 2010

3 commits


22 May, 2010

1 commit


20 May, 2010

1 commit

  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (24 commits)
    [S390] drivers/s390/char: Use kmemdup
    [S390] drivers/s390/char: Use kstrdup
    [S390] debug: enable exception-trace debug facility
    [S390] s390_hypfs: Add new attributes
    [S390] qdio: remove API wrappers
    [S390] qdio: set correct bit in dsci
    [S390] qdio: dont convert timestamps to microseconds
    [S390] qdio: remove memset hack
    [S390] qdio: prevent starvation on PCI devices
    [S390] qdio: count number of qdio interrupts
    [S390] user space fault: report fault before calling do_exit
    [S390] topology: expose core identifier
    [S390] dasd: remove uid from devmap
    [S390] dasd: add dynamic pav toleration
    [S390] vdso: add missing vdso_install target
    [S390] vdso: remove redundant check for CONFIG_64BIT
    [S390] avoid default_llseek in s390 drivers
    [S390] vmcp: disallow modular build
    [S390] add breaking event address for user space
    [S390] virtualization aware cpu measurement
    ...

    Linus Torvalds
     

18 May, 2010

1 commit

  • …/git/tip/linux-2.6-tip

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (49 commits)
    stop_machine: Move local variable closer to the usage site in cpu_stop_cpu_callback()
    sched, wait: Use wrapper functions
    sched: Remove a stale comment
    ondemand: Make the iowait-is-busy time a sysfs tunable
    ondemand: Solve a big performance issue by counting IOWAIT time as busy
    sched: Intoduce get_cpu_iowait_time_us()
    sched: Eliminate the ts->idle_lastupdate field
    sched: Fold updating of the last_update_time_info into update_ts_time_stats()
    sched: Update the idle statistics in get_cpu_idle_time_us()
    sched: Introduce a function to update the idle statistics
    sched: Add a comment to get_cpu_idle_time_us()
    cpu_stop: add dummy implementation for UP
    sched: Remove rq argument to the tracepoints
    rcu: need barrier() in UP synchronize_sched_expedited()
    sched: correctly place paranioa memory barriers in synchronize_sched_expedited()
    sched: kill paranoia check in synchronize_sched_expedited()
    sched: replace migration_thread with cpu_stop
    stop_machine: reimplement using cpu_stop
    cpu_stop: implement stop_cpu[s]()
    sched: Fix select_idle_sibling() logic in select_task_rq_fair()
    ...

    Linus Torvalds
     

17 May, 2010

11 commits

  • The exception-trace facility on x86 and other architectures prints
    traces to dmesg whenever a user space application crashes.
    s390 has such a feature since ages however it is called
    userprocess_debug and is enabled differently.
    This patch makes sure that whenever one of the two procfs files

    /proc/sys/kernel/userprocess_debug
    /proc/sys/debug/exception-trace

    is modified the contents of the second one changes as well.
    That way we keep backwards compatibilty but also support the same
    interface like other architectures do.
    Besides that the output of the traces is improved since it will now
    also contain the corresponding filename of the vma (when available)
    where the process caused a fault or trap.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Report user space faults before calling do_exit, since do_exit does
    not return and therefore we will never see the fault message on the
    console.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Provide a topology_core_id define which makes sure that the contents of
    /sys/devices/system/cpu/cpuX/topology/core_id
    indeed do contain the core id and not always 0.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • This is a check for CONFIG_64BIT inside a block that is only active when
    CONFIG_64BIT is set. So the check is actually useless and potentially
    irritating.

    Signed-off-by: Christoph Egger
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Christoph Egger
     
  • Use nonseekable_open for a couple of s390 device drivers. This avoids
    the use of default_llseek function which has a dependency on the BKL.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Copy the last breaking event address from the lowcore to a new
    field in the thread_struct on each system entry. Add a new
    ptrace request PTRACE_GET_LAST_BREAK and a new utrace regset
    REGSET_LAST_BREAK to query the last breaking event.

    This is useful for debugging wild branches in user space code.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Use the SPP instruction to set a tag on entry to / exit of the virtual
    machine context. This allows the cpu measurement facility to distinguish
    the samples from the host and the different guests.

    Signed-off-by: Carsten Otte

    Carsten Otte
     
  • A machine check can interrupt the i/o and external interrupt handler
    anytime. If the machine check occurs while the interrupt handler is
    waking up from idle vtime_start_cpu can get executed a second time
    and the int_clock / async_enter_timer values in the lowcore get
    clobbered. This can confuse the cpu time accounting.
    To fix this problem two changes are needed. First the machine check
    handler has to use its own copies of int_clock and async_enter_timer,
    named mcck_clock and mcck_enter_timer. Second the nested execution
    of vtime_start_cpu has to be prevented. This is done in s390_idle_check
    by checking the wait bit in the program status word.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The system call path in entry[64].S is run with interrupts enabled.
    Remove the irq tracing check from the system call exit code. If a
    program check interrupted a context enabled for interrupts do a
    call to trace_irq_off_caller in the program check handler before
    branching to the system call exit code.
    Restructure the system call and io interrupt return code to avoid
    avoid the lpsw[e] to disable machine checks.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Cleanup the #ifdef mess at io_work in entry[64].S and streamline the
    TIF work code of the system call and io exit path.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Remove cpu_id from lowcore and replace addr_t with __u64.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

12 May, 2010

2 commits

  • As of git commit 1844c9bc0b2fed3023551c1affe033ab38e90b9a head64.S/head31.S
    are not included in head.S anymore but build as an extra object. This breaks
    shared kernel support because the .org statement in head64.S/head31.S for
    CONFIG_SHARED_KERNEL=y will have a different effect. The end address of the
    head.text section in head.o will be added to the .org value, to compensate
    for this subtract 0x11000 to get the required value of 0x100000 again.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • strace may change the system call number, so regs->gprs[2] must not
    be read before tracehook_report_syscall_entry(). This fixes a bug
    where "strace -f" will hang after a vfork().

    Cc:
    Signed-off-by: Gerald Schaefer
    Signed-off-by: Martin Schwidefsky

    Gerald Schaefer
     

09 May, 2010

1 commit


07 May, 2010

1 commit

  • Reimplement stop_machine using cpu_stop. As cpu stoppers are
    guaranteed to be available for all online cpus,
    stop_machine_create/destroy() are no longer necessary and removed.

    With resource management and synchronization handled by cpu_stop, the
    new implementation is much simpler. Asking the cpu_stop to execute
    the stop_cpu() state machine on all online cpus with cpu hotplug
    disabled is enough.

    stop_machine itself doesn't need to manage any global resources
    anymore, so all per-instance information is rolled into struct
    stop_machine_data and the mutex and all static data variables are
    removed.

    The previous implementation created and destroyed RT workqueues as
    necessary which made stop_machine() calls highly expensive on very
    large machines. According to Dimitri Sivanich, preventing the dynamic
    creation/destruction makes booting faster more than twice on very
    large machines. cpu_stop resources are preallocated for all online
    cpus and should have the same effect.

    Signed-off-by: Tejun Heo
    Acked-by: Rusty Russell
    Acked-by: Peter Zijlstra
    Cc: Oleg Nesterov
    Cc: Dimitri Sivanich

    Tejun Heo
     

22 Apr, 2010

2 commits

  • Commit "timekeeping: Fix clock_gettime vsyscall time warp" (0696b711e)
    introduced the new parameter "mult" to update_vsyscall(). This parameter
    contains the internal NTP adjusted clock multiplier.

    The s390x vdso did not use this adjusted multiplier. Instead, it used
    the constant clock multiplier for gettimeofday() and clock_gettime()
    variants. This may result in observable time warps as explained in
    commit 0696b711e.

    Make the NTP adjusted clock multiplier available to the s390x vdso
    implementation and use it for time calculations.

    Cc:
    Signed-off-by: Hendrik Brueckner
    Signed-off-by: Martin Schwidefsky

    Hendrik Brueckner
     
  • Reenable multiple subchannel sets after hibernation,
    prior to the device callbacks.

    Cc:
    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     

09 Apr, 2010

3 commits

  • The savesys_ipl_nss asm function is put into the .init.text section
    however it is missing a ".previous" section which would restore the
    previous section.
    Luckily all functions in early.c are init functions so it doesn't
    matter currently.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • If a machine check interrupts the io interrupt handler on one of the
    instructions between io_return and io_leave the critical section
    cleanup code will move the return psw to io_work_loop. By doing that
    the switch from the asynchronous interrupt stack to the process stack
    is skipped. If e.g. TIF_NEED_RESCHED is set things break because
    the scheduler is called with the asynchronous interrupts stack.
    Moving the psw back to io_return instead fixes the problem.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • In the default case the lock is not unlocked. The return is
    converted to a goto, to share the unlock at the end of the function.

    A simplified version of the semantic patch that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @r exists@
    expression E1;
    identifier f;
    @@

    f (...) { }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Julia Lawall
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

24 Mar, 2010

3 commits

  • Fix two bugs with the kernel image compression:
    1) reset the bss section of the compressed vmlinux
    2) clear the high half of the registers for 64 bit early enough
    for the decompression step

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The intermediate lowcore for CONFIG_SMP is allocated using a call to
    __alloc_bootmem() with a goal of 0. That however doesn't guarantee that
    the allocated piece of memory is below 2GB.
    Instead we should call __alloc_bootmem_low().

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • To save the registers for all CPUs a sigp "store status" is done that
    stores the registers to address absolute zero. To access storage at
    absolute zero, normally the address of the prefix register of the
    accessing CPU has to be used. This does not work when large pages are
    active (currently only under LPAR). In order to fix that problem,
    instead of memcpy memcpy_real is used, which switches to real mode
    where prefixing works.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     

13 Mar, 2010

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
    doc: fix typo in comment explaining rb_tree usage
    Remove fs/ntfs/ChangeLog
    doc: fix console doc typo
    doc: cpuset: Update the cpuset flag file
    Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
    Remove drivers/parport/ChangeLog
    Remove drivers/char/ChangeLog
    doc: typo - Table 1-2 should refer to "status", not "statm"
    tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
    No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
    devres/irq: Fix devm_irq_match comment
    Remove reference to kthread_create_on_cpu
    tree-wide: Assorted spelling fixes
    tree-wide: fix 'lenght' typo in comments and code
    drm/kms: fix spelling in error message
    doc: capitalization and other minor fixes in pnp doc
    devres: typo fix s/dev/devm/
    Remove redundant trailing semicolons from macros
    fix typo "definetly" -> "definitely" in comment
    tree-wide: s/widht/width/g typo in comments
    ...

    Fix trivial conflict in Documentation/laptops/00-INDEX

    Linus Torvalds
     
  • On an architecture that supports 32-bit compat we need to override the
    reported machine in uname with the 32-bit value. Instead of doing this
    separately in every architecture introduce a COMPAT_UTS_MACHINE define in
    and apply it directly in sys_newuname().

    Signed-off-by: Christoph Hellwig
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Hirokazu Takata
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Al Viro
    Cc: Arnd Bergmann
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: "Luck, Tony"
    Cc: James Morris
    Cc: Andreas Schwab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig