28 Jun, 2016

1 commit


22 Sep, 2015

1 commit

  • The iucv code uses arrays as arguments. Even though this does not
    really cause a problem, it could be misleading, since the compiler
    turns array arguments into just a pointer argument. To be more
    precise this patch changes the array arguments into pointers.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

11 Sep, 2014

1 commit


09 Apr, 2014

1 commit

  • Pull second set of s390 patches from Martin Schwidefsky:
    "The second part of Heikos uaccess rework, the page table walker for
    uaccess is now a thing of the past (yay!)

    The code change to fix the theoretical TLB flush problem allows us to
    add a TLB flush optimization for zEC12, this machine has new
    instructions that allow to do CPU local TLB flushes for single pages
    and for all pages of a specific address space.

    Plus the usual bug fixing and some more cleanup"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/uaccess: rework uaccess code - fix locking issues
    s390/mm,tlb: optimize TLB flushing for zEC12
    s390/mm,tlb: safeguard against speculative TLB creation
    s390/irq: Use defines for external interruption codes
    s390/irq: Add defines for external interruption codes
    s390/sclp: add timeout for queued requests
    kvm/s390: also set guest pages back to stable on kexec/kdump
    lcs: Add missing destroy_timer_on_stack()
    s390/tape: Add missing destroy_timer_on_stack()
    s390/tape: Use del_timer_sync()
    s390/3270: fix crash with multiple reset device requests
    s390/bitops,atomic: add missing memory barriers
    s390/zcrypt: add length check for aligned data to avoid overflow in msg-type 6

    Linus Torvalds
     

03 Apr, 2014

1 commit

  • Use the new defines for external interruption codes to get rid
    of "magic" numbers in the s390 source code. And while we're at it,
    also rename the (un-)register_external_interrupt function to
    something shorter so that this patch does not exceed the 80
    columns all over the place.

    Signed-off-by: Thomas Huth
    Signed-off-by: Martin Schwidefsky

    Thomas Huth
     

20 Mar, 2014

1 commit

  • Subsystems that want to register CPU hotplug callbacks, as well as perform
    initialization for the CPUs that are already online, often do it as shown
    below:

    get_online_cpus();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    register_cpu_notifier(&foobar_cpu_notifier);

    put_online_cpus();

    This is wrong, since it is prone to ABBA deadlocks involving the
    cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
    with CPU hotplug operations).

    Instead, the correct and race-free way of performing the callback
    registration is:

    cpu_notifier_register_begin();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    /* Note the use of the double underscored version of the API */
    __register_cpu_notifier(&foobar_cpu_notifier);

    cpu_notifier_register_done();

    Fix the code in net/iucv/iucv.c by using this latter form of callback
    registration. Also, provide helper functions to perform the common memory
    allocations and frees, to condense repetitive code.

    Cc: Ursula Braun
    Cc: Ingo Molnar
    Acked-by: David S. Miller
    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     

15 Jul, 2013

1 commit

  • The __cpuinit type of throwaway sections might have made sense
    some time ago when RAM was more constrained, but now the savings
    do not offset the cost and complications. For example, the fix in
    commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
    is a good example of the nasty type of bugs that can be created
    with improper use of the various __init prefixes.

    After a discussion on LKML[1] it was decided that cpuinit should go
    the way of devinit and be phased out. Once all the users are gone,
    we can then finally remove the macros themselves from linux/init.h.

    This removes all the net/* uses of the __cpuinit macros
    from all C files.

    [1] https://lkml.org/lkml/2013/5/20/589

    Cc: "David S. Miller"
    Cc: netdev@vger.kernel.org
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

14 Feb, 2013

1 commit

  • The iucv base layer is initialized during the registration of the
    first iucv handler. If no handler is registered and the
    iucv_reboot_event() notifier is called, a missing check can cause
    a kernel panic in iucv_block_cpu(). To solve this issue, check the
    IRQ masks invoke iucv_block_cpu() for enabled CPUs only.

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

    Hendrik Brueckner
     

08 Jan, 2013

1 commit

  • Now that irq sum accounting for /proc/stat's "intr" line works again we
    have the oddity that the sum field (first field) contains only the sum
    of the second (external irqs) and third field (I/O interrupts).
    The reason for that is that these two fields are already sums of all other
    fields. So if we would sum up everything we would count every interrupt
    twice.
    This is broken since the split interrupt accounting was merged two years
    ago: 052ff461c8427629aee887ccc27478fc7373237c "[S390] irq: have detailed
    statistics for interrupt types".
    To fix this remove the split interrupt fields from /proc/stat's "intr"
    line again and only have them in /proc/interrupts.

    This restores the old behaviour, seems to be the only sane fix and mimics
    a behaviour from other architectures where /proc/interrupts also contains
    more than /proc/stat's "intr" line does.

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

    Heiko Carstens
     

11 Mar, 2012

1 commit

  • The external interrupt handlers have a parameter called ext_int_code.
    Besides the name this paramter does not only contain the ext_int_code
    but in addition also the "cpu address" (POP) which caused the external
    interrupt.
    To make the code a bit more obvious pass a struct instead so the called
    function can easily distinguish between external interrupt code and
    cpu address. The cpu address field however is named "subcode" since
    some external interrupt sources do not pass a cpu address but a
    different parameter (or none at all).

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

    Heiko Carstens
     

13 Aug, 2011

1 commit


27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

24 Jul, 2011

1 commit


26 May, 2011

1 commit


14 May, 2011

2 commits


31 Mar, 2011

1 commit


05 Jan, 2011

1 commit

  • Up to now /proc/interrupts only has statistics for external and i/o
    interrupts but doesn't split up them any further.
    This patch adds a line for every single interrupt source so that it
    is possible to easier tell what the machine is/was doing.
    Part of the output now looks like this;

    CPU0 CPU2 CPU4
    EXT: 3898 4232 2305
    I/O: 782 315 245
    CLK: 1029 1964 727 [EXT] Clock Comparator
    IPI: 2868 2267 1577 [EXT] Signal Processor
    TMR: 0 0 0 [EXT] CPU Timer
    TAL: 0 0 0 [EXT] Timing Alert
    PFL: 0 0 0 [EXT] Pseudo Page Fault
    [...]
    NMI: 0 1 1 [NMI] Machine Checks

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

    Heiko Carstens
     

25 Oct, 2010

1 commit


03 Jun, 2010

1 commit


28 May, 2010

1 commit


16 Dec, 2009

1 commit


14 Nov, 2009

1 commit

  • If iucv_work_queue is not empty during kernel freeze, a kernel panic
    occurs. This suspend-patch adds flushing of the work queue for
    pending connection requests and severing of remaining pending
    connections.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

17 Sep, 2009

3 commits

  • The iucv_query_maxconn() function uses the wrong output register and
    stores the size of the interrupt buffer instead of the maximum number
    of connections.

    According to the QUERY IUCV function, general register 1 contains the
    maximum number of connections.

    If the maximum number of connections is not set properly, the following
    warning is displayed:

    Badness at /usr/src/kernel-source/2.6.30-39.x.20090806/net/iucv/iucv.c:1808
    Modules linked in: netiucv fsm af_iucv sunrpc qeth_l3 dm_multipath dm_mod vmur qeth ccwgroup
    CPU: 0 Tainted: G W 2.6.30 #4
    Process seq (pid: 16925, task: 0000000030e24a40, ksp: 000000003033bd98)
    Krnl PSW : 0404200180000000 000000000053b270 (iucv_external_interrupt+0x64/0x224)
    R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
    Krnl GPRS: 00000000011279c2 00000000014bdb70 0029000000000000 0000000000000029
    000000000053b236 000000000001dba4 0000000000000000 0000000000859210
    0000000000a67f68 00000000008a6100 000000003f83fb90 0000000000004000
    000000003f8c7bc8 00000000005a2250 000000000053b236 000000003fc2fe08
    Krnl Code: 000000000053b262: e33010000021 clg %r3,0(%r1)
    000000000053b268: a7440010 brc 4,53b288
    000000000053b26c: a7f40001 brc 15,53b26e
    >000000000053b270: c03000184134 larl %r3,8434d8
    000000000053b276: eb220030000c srlg %r2,%r2,48
    000000000053b27c: eb6ff0a00004 lmg %r6,%r15,160(%r15)
    000000000053b282: c0f4fffff6a7 brcl 15,539fd0
    000000000053b288: 4310a003 ic %r1,3(%r10)
    Call Trace:
    ([] iucv_external_interrupt+0x2a/0x224)
    [] do_extint+0x132/0x190
    [] ext_no_vtime+0x1e/0x22
    [] _spin_unlock_irqrestore+0x96/0xa4
    ([] _spin_unlock_irqrestore+0x8c/0xa4)
    [] pipe_write+0x3da/0x5bc
    [] do_sync_write+0xe4/0x13c
    [] vfs_write+0xae/0x15c
    [] SyS_write+0x54/0xac
    [] sysc_noemu+0x10/0x16
    [] 0x42ff8defcc

    Signed-off-by: Hendrik Brueckner
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Hendrik Brueckner
     
  • Prior to calling IUCV functions, the DECLARE BUFFER function must have been
    called for at least one CPU to receive IUCV interrupts.

    With commit "iucv: establish reboot notifier" (6c005961), a check has been
    introduced to avoid calling IUCV functions if the current CPU does not have
    an interrupt buffer declared.
    Because one interrupt buffer is sufficient, change the condition to ensure
    that one interrupt buffer is available.

    In addition, checking the buffer on the current CPU creates a race with
    CPU up/down notifications: before checking the buffer, the IUCV function
    might be interrupted by an smp_call_function() that retrieves the interrupt
    buffer for the current CPU.
    When the IUCV function continues, the check fails and -EIO is returned. If a
    buffer is available on any other CPU, the IUCV function call must be invoked
    (instead of failing with -EIO).

    Signed-off-by: Hendrik Brueckner
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Hendrik Brueckner
     
  • During suspend IUCV exploiters have to close their IUCV connections.
    When restoring an image, it can be checked if all IUCV pathes had
    been closed before the Linux instance was suspended. If not, an
    error message is issued to indicate a problem in one of the
    used programs exploiting IUCV communication.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

16 Jun, 2009

2 commits

  • Patch calls the PM callback functions of iucv-bus devices, which are
    responsible for removal of their established iucv pathes.

    The PM freeze callback for the first iucv-bus device disables all iucv
    interrupts except the connection severed interrupt.
    The PM freeze callback for the last iucv-bus device shuts down iucv.

    The PM thaw callback for the first iucv-bus device re-enables iucv
    if it has been shut down during freeze. If freezing has been interrupted,
    it re-enables iucv interrupts according to the needs of iucv-exploiters.

    The PM restore callback for the first iucv-bus device re-enables iucv.

    Signed-off-by: Ursula Braun
    Signed-off-by: Martin Schwidefsky

    Ursula Braun
     
  • To guarantee a proper cleanup, patch adds a reboot notifier to
    the iucv base code, which disables iucv interrupts, shuts down
    established iucv pathes, and removes iucv declarations for z/VM.

    Checks have to be added to the iucv-API functions, whether
    iucv-buffers removed at reboot time are still declared.

    Signed-off-by: Ursula Braun
    Signed-off-by: Martin Schwidefsky

    Ursula Braun
     

23 Apr, 2009

2 commits

  • The patch allows to send and receive data in the parameter list of an
    iucv message.
    The parameter list is an arry of 8 bytes that are used by af_iucv as
    follows:
    0..6 7 bytes for socket data and
    7 1 byte to store the data length.

    Instead of storing the data length directly, the difference
    between 0xFF and the data length is used.
    This convention does not interfere with the existing use of PRM
    messages for shutting down the send direction of an AF_IUCV socket
    (shutdown() operation). Data lenghts greater than 7 (or PRM message
    byte 8 is less than 0xF8) denotes to special messages.
    Currently, the special SEND_SHUTDOWN message is supported only.

    To use IPRM messages, both communicators must set the IUCV_IPRMDATA
    flag during path negotiation, i.e. in iucv_connect() and
    path_pending().

    To be compatible to older af_iucv implementations, sending PRM
    messages is controlled by the socket option SO_IPRMDATA_MSG.
    Receiving PRM messages does not depend on the socket option (but
    requires the IUCV_IPRMDATA path flag to be set).

    Sending/Receiving data in the parameter list improves performance for
    small amounts of data by reducing message_completion() interrupts and
    memory copy operations.

    Signed-off-by: Hendrik Brueckner
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Hendrik Brueckner
     
  • Some of the IUCV commands can be invoked in interrupt context.
    Those commands need a different per-cpu IUCV command parameter block,
    otherwise they might overwrite an IUCV command parameter of a not yet
    finished IUCV command invocation in process context.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

07 Jan, 2009

1 commit


06 Jan, 2009

1 commit

  • If the iucv module is compiled in/loaded but no user is registered cpu
    hot remove doesn't work. Reason for that is that the iucv cpu hotplug
    notifier on CPU_DOWN_PREPARE checks if the iucv_buffer_cpumask would
    be empty after the corresponding bit would be cleared. However the bit
    was never set since iucv wasn't enable. That causes all cpu hot unplug
    operations to fail in this scenario.
    To fix this use iucv_path_table as an indicator wether iucv is enabled
    or not.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Heiko Carstens
     

25 Dec, 2008

2 commits


30 Sep, 2008

1 commit

  • fb65a7c091529bfffb1262515252c0d0f6241c5c ("iucv: Fix bad merging.") fixed
    a merge error, but in a wrong way. We now end up with the bug below.
    This patch corrects the mismerge like it was intended.

    BUG: scheduling while atomic: swapper/1/0x00000000
    Modules linked in:
    CPU: 1 Not tainted 2.6.27-rc7-00094-gc0f4d6d #9
    Process swapper (pid: 1, task: 000000003fe7d988, ksp: 000000003fe838c0)
    0000000000000000 000000003fe839b8 0000000000000002 0000000000000000
    000000003fe83a58 000000003fe839d0 000000003fe839d0 0000000000390de6
    000000000058acd8 00000000000000d0 000000003fe7dcd8 0000000000000000
    000000000000000c 000000000000000d 0000000000000000 000000003fe83a28
    000000000039c5b8 0000000000015e5e 000000003fe839b8 000000003fe83a00
    Call Trace:
    ([] show_trace+0xe6/0x134)
    [] __schedule_bug+0xa2/0xa8
    [] schedule+0x49c/0x910
    [] schedule_timeout+0xc4/0x114
    [] wait_for_common+0xe8/0x1b4
    [] call_usermodehelper_exec+0xa6/0xec
    [] kobject_uevent_env+0x418/0x438
    [] bus_add_driver+0x1e4/0x298
    [] driver_register+0x90/0x18c
    [] netiucv_init+0x168/0x2c8
    [] do_one_initcall+0x3e/0x17c
    [] kernel_init+0x1ce/0x248
    [] kernel_thread_starter+0x6/0xc
    [] kernel_thread_starter+0x0/0xc
    iucv: NETIUCV driver initialized
    initcall netiucv_init+0x0/0x2c8 returned with preemption imbalance

    Signed-off-by: Heiko Carstens
    Signed-off-by: David S. Miller

    Heiko Carstens
     

21 Jul, 2008

2 commits


18 Jul, 2008

1 commit


16 Jul, 2008

2 commits

  • Conflicts:

    arch/x86/xen/smp.c
    kernel/sched_rt.c
    net/iucv/iucv.c

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Conflicts:

    arch/powerpc/Kconfig
    arch/s390/kernel/time.c
    arch/x86/kernel/apic_32.c
    arch/x86/kernel/cpu/perfctr-watchdog.c
    arch/x86/kernel/i8259_64.c
    arch/x86/kernel/ldt.c
    arch/x86/kernel/nmi_64.c
    arch/x86/kernel/smpboot.c
    arch/x86/xen/smp.c
    include/asm-x86/hw_irq_32.h
    include/asm-x86/hw_irq_64.h
    include/asm-x86/mach-default/irq_vectors.h
    include/asm-x86/mach-voyager/irq_vectors.h
    include/asm-x86/smp.h
    kernel/Makefile

    Signed-off-by: Ingo Molnar

    Ingo Molnar