25 Oct, 2010

9 commits


07 Oct, 2010

1 commit

  • Fix the IRQ flag handling naming. In linux/irqflags.h under one configuration,
    it maps:

    local_irq_enable() -> raw_local_irq_enable()
    local_irq_disable() -> raw_local_irq_disable()
    local_irq_save() -> raw_local_irq_save()
    ...

    and under the other configuration, it maps:

    raw_local_irq_enable() -> local_irq_enable()
    raw_local_irq_disable() -> local_irq_disable()
    raw_local_irq_save() -> local_irq_save()
    ...

    This is quite confusing. There should be one set of names expected of the
    arch, and this should be wrapped to give another set of names that are expected
    by users of this facility.

    Change this to have the arch provide:

    flags = arch_local_save_flags()
    flags = arch_local_irq_save()
    arch_local_irq_restore(flags)
    arch_local_irq_disable()
    arch_local_irq_enable()
    arch_irqs_disabled_flags(flags)
    arch_irqs_disabled()
    arch_safe_halt()

    Then linux/irqflags.h wraps these to provide:

    raw_local_save_flags(flags)
    raw_local_irq_save(flags)
    raw_local_irq_restore(flags)
    raw_local_irq_disable()
    raw_local_irq_enable()
    raw_irqs_disabled_flags(flags)
    raw_irqs_disabled()
    raw_safe_halt()

    with type checking on the flags 'arguments', and then wraps those to provide:

    local_save_flags(flags)
    local_irq_save(flags)
    local_irq_restore(flags)
    local_irq_disable()
    local_irq_enable()
    irqs_disabled_flags(flags)
    irqs_disabled()
    safe_halt()

    with tracing included if enabled.

    The arch functions can now all be inline functions rather than some of them
    having to be macros.

    Signed-off-by: David Howells [X86, FRV, MN10300]
    Signed-off-by: Chris Metcalf [Tile]
    Signed-off-by: Michal Simek [Microblaze]
    Tested-by: Catalin Marinas [ARM]
    Acked-by: Thomas Gleixner
    Acked-by: Haavard Skinnemoen [AVR]
    Acked-by: Tony Luck [IA-64]
    Acked-by: Hirokazu Takata [M32R]
    Acked-by: Greg Ungerer [M68K/M68KNOMMU]
    Acked-by: Ralf Baechle [MIPS]
    Acked-by: Kyle McMartin [PA-RISC]
    Acked-by: Paul Mackerras [PowerPC]
    Acked-by: Martin Schwidefsky [S390]
    Acked-by: Chen Liqin [Score]
    Acked-by: Matt Fleming [SH]
    Acked-by: David S. Miller [Sparc]
    Acked-by: Chris Zankel [Xtensa]
    Reviewed-by: Richard Henderson [Alpha]
    Reviewed-by: Yoshinori Sato [H8300]
    Cc: starvik@axis.com [CRIS]
    Cc: jesper.nilsson@axis.com [CRIS]
    Cc: linux-cris-kernel@axis.com

    David Howells
     

24 Aug, 2010

1 commit

  • The tlb flushing code uses the mm_users field of the mm_struct to
    decide if each page table entry needs to be flushed individually with
    IPTE or if a global flush for the mm_struct is sufficient after all page
    table updates have been done. The comment for mm_users says "How many
    users with user space?" but the /proc code increases mm_users after it
    found the process structure by pid without creating a new user process.
    Which makes mm_users useless for the decision between the two tlb
    flusing methods. The current code can be confused to not flush tlb
    entries by a concurrent access to /proc files if e.g. a fork is in
    progres. The solution for this problem is to make the tlb flushing
    logic independent from the mm_users field.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

11 Aug, 2010

1 commit

  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] dasd: tunable missing interrupt handler
    [S390] dasd: allocate fallback cqr for reserve/release
    [S390] topology: use default MC domain initializer
    [S390] initrd: change default load address
    [S390] cmm, smsgiucv_app: convert sender to uppercase
    [S390] cmm: add missing __init/__exit annotations
    [S390] cio: use all available paths for some internal I/O
    [S390] ccwreq: add ability to use all paths
    [S390] cio: ccw_device_online_store return -EINVAL in case of missing driver
    [S390] cio: Log the response from the unit check handler
    [S390] cio: CHSC SIOSL Support

    Linus Torvalds
     

10 Aug, 2010

3 commits

  • Provide an INIT_MM_CONTEXT intializer macro which can be used to
    statically initialize mm_struct:mm_context of init_mm. This way we can
    get rid of code which will do the initialization at run time (on s390).

    In addition the current code can be found at a place where it is not
    expected. So let's have a common initializer which architectures
    can use if needed.

    This is based on a patch from Suzuki Poulose.

    Signed-off-by: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Suzuki Poulose
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • The sender kernel parameter contains a z/VM user ID where
    alphabetic characters must be specified in uppercase.

    Allow users to specify lowercase characters and convert the
    sender string to uppercase at module initialization.

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

    Hendrik Brueckner
     
  • Add missing __init and __exit annoations for module init and exit
    functions. This will save us huge amounts of memory... sort of.

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

    Heiko Carstens
     

09 Jun, 2010

1 commit


27 May, 2010

3 commits


17 May, 2010

1 commit

  • 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
     

09 Apr, 2010

1 commit

  • commit 6a985c6194017de2c062916ad1cd00dee0302c40
    ([S390] s390: use change recording override for kernel mapping)
    deactivated the change bit recording for the kernel mapping to
    improve the performance. This works most of the time, but there
    are cases (e.g. kernel runs in home space, futex atomic compare xcmg)
    where we modify user memory with the kernel mapping instead of the
    user mapping.
    Instead of fixing these cases, this patch just deactivates change bit
    override to avoid future problems with other kernel code that might
    use the kernel mapping for user memory.

    CC: stable@kernel.org
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     

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

1 commit

  • 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
     

08 Mar, 2010

1 commit


27 Feb, 2010

4 commits


14 Jan, 2010

1 commit

  • Make sure compiler won't do weird things with limits. E.g. fetching
    them twice may return 2 different values after writable limits are
    implemented.

    I.e. either use rlimit helpers added in
    3e10e716abf3c71bdb5d86b8f507f9e72236c9cd
    or ACCESS_ONCE if not applicable.

    Cc: Heiko Carstens
    Cc: linux390@de.ibm.com
    Cc: linux-s390@vger.kernel.org
    Signed-off-by: Jiri Slaby
    Signed-off-by: Martin Schwidefsky

    Jiri Slaby
     

10 Dec, 2009

1 commit

  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (72 commits)
    [S390] 3215/3270 console: remove wrong comment
    [S390] dasd: remove BKL from extended error reporting code
    [S390] vmlogrdr: remove BKL
    [S390] vmur: remove BKL
    [S390] zcrypt: remove BKL
    [S390] 3270: remove BKL
    [S390] vmwatchdog: remove lock_kernel() from open() function
    [S390] monwriter: remove lock_kernel() from open() function
    [S390] monreader: remove lock_kernel() from open() function
    [S390] s390: remove unused nfsd #includes
    [S390] ftrace: build ftrace.o when CONFIG_FTRACE_SYSCALLS is set for s390
    [S390] etr/stp: put correct per cpu variable
    [S390] tty3270: move keyboard compat ioctls
    [S390] sclp: improve servicability setting
    [S390] s390: use change recording override for kernel mapping
    [S390] MAINTAINERS: Add s390 drivers block
    [S390] use generic sockios.h header file
    [S390] use generic termbits.h header file
    [S390] smp: remove unused typedef and defines
    [S390] cmm: free pages on hibernate.
    ...

    Linus Torvalds
     

07 Dec, 2009

8 commits

  • We dont need the dirty bit if a write access is done via the kernel
    mapping. In that case SetPageDirty and friends are used anyway, no
    need to do that a second time. We can use the change-recording
    overide function for the kernel mapping, if available.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • The pages allocated by the cmm memory balloon should be freed before
    the hibernation image is created. Otherwise the memory reserved by the
    balloon gets written to the swap device but there is no content in
    these pages that need to be preserved.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The pagetable walk usercopy functions have used a modified copy of the
    do_exception() function for fault handling. This lead to inconsistencies
    with recent changes to do_exception(), e.g. performance counters. This
    patch changes the pagetable walk usercopy code to call do_exception()
    directly, eliminating the redundancy. A new parameter is added to
    do_exception() to specify the fault address.

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

    Gerald Schaefer
     
  • Simplify the check of the vma->flags in do_exception for the
    different fault types.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Slim down the do_exception function to handle only the fast path of a
    fault and move the exceptional cases into a new function. That slightly
    increases the performance of the fault handling.

    Build fix for !CONFIG_COMPAT by
    Kamalesh Babulal

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • notify_page_fault does a preempt_disable/preempt_enable for each
    fault generated by a kernel access to user space. If kprobes
    is not active that is unnecessary since the interrupts are not
    reenabled yet. To play safe repeat the kprobe_running check after
    preempt_disable().

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Introduce user_mode to replace the two variables switch_amode and
    s390_noexec. There are three valid combinations of the old values:
    1) switch_amode == 0 && s390_noexec == 0
    2) switch_amode == 1 && s390_noexec == 0
    3) switch_amode == 1 && s390_noexec == 1
    They get replaced by
    1) user_mode == HOME_SPACE_MODE
    2) user_mode == PRIMARY_SPACE_MODE
    3) user_mode == SECONDARY_SPACE_MODE
    The new kernel parameter user_mode=[primary,secondary,home] lets
    you choose the address space mode the user space processes should
    use. In addition the CONFIG_S390_SWITCH_AMODE config option
    is removed.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • A data access in access-register mode always is a user mode access,
    the code to inspect the access-registers can be removed. The second
    change is to use a different test to check for no-execute fault.
    The third change is to pass the translation exception identification
    as parameter, in theory the trans_exc_code in the lowcore could have
    been overwritten by the time the call to check_space from do_no_context
    is done.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

19 Nov, 2009

1 commit


12 Nov, 2009

1 commit