09 Sep, 2013

1 commit

  • Change the hash algorithm a bit so it produces only values in the
    range of 0..31.
    This allows to reduce the size of the external interrupt handler hash
    array even further while making sure that each of the known interrupt
    sources keeps its unique hash with the slightly modified algorithm:

    0x1004 --> 12
    0x1201 --> 10
    0x1202 --> 11
    0x1406 --> 16
    0x1407 --> 17
    0x2401 --> 19
    0x2603 --> 22
    0x4000 --> 0

    This also means that the entire array now fits into exactly one cache
    line; so add a proper align statement as well.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     

07 Sep, 2013

1 commit


04 Sep, 2013

2 commits


22 Aug, 2013

1 commit

  • With the introduction of PCI it became apparent that s390 should
    convert to generic hardirqs as too many drivers do not have the
    correct dependency for GENERIC_HARDIRQS. On the architecture
    level s390 does not have irq lines. It has external interrupts,
    I/O interrupts and adapter interrupts. This patch hard-codes all
    external interrupts as irq #1, all I/O interrupts as irq #2 and
    all adapter interrupts as irq #3. The additional information from
    the lowcore associated with the interrupt is stored in the
    pt_regs of the interrupt frame, where the interrupt handler can
    pick it up. For PCI/MSI interrupts the adapter interrupt handler
    scans the relevant bit fields and calls generic_handle_irq with
    the virtual irq number for the MSI interrupt.

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

    Martin Schwidefsky
     

27 Jun, 2013

1 commit

  • Copy the interrupt parameters from the lowcore to the pt_regs structure
    in entry[64].S and reduce the arguments of the low level interrupt handler
    to the pt_regs pointer only. In addition move the test-pending-interrupt
    loop from do_IRQ to entry[64].S to make sure that interrupt information
    is always delivered via pt_regs.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

19 Jun, 2013

1 commit

  • In uniprocessor configurations, synchronize_irq() is defined in
    as a macro, and this function definition fails to
    compile.

    Reported-by: kbuild test robot
    Signed-off-by: Ben Hutchings
    Cc: stable@vger.kernel.org # 3.9
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Ben Hutchings
     

10 Jun, 2013

1 commit

  • All architectures must implement IRQ functions. Since various
    dependencies on !S390 were removed, there are various drivers that can
    be selected but will fail to link. Provide a dummy implementation of
    these functions for the !PCI case.

    Signed-off-by: Ben Hutchings
    Cc: stable@vger.kernel.org # 3.9
    Acked-by: David S. Miller
    Signed-off-by: Martin Schwidefsky

    Ben Hutchings
     

02 May, 2013

1 commit

  • 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
     

10 Apr, 2013

1 commit


18 Mar, 2013

1 commit


25 Feb, 2013

1 commit

  • Pull KVM updates from Marcelo Tosatti:
    "KVM updates for the 3.9 merge window, including x86 real mode
    emulation fixes, stronger memory slot interface restrictions, mmu_lock
    spinlock hold time reduction, improved handling of large page faults
    on shadow, initial APICv HW acceleration support, s390 channel IO
    based virtio, amongst others"

    * tag 'kvm-3.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (143 commits)
    Revert "KVM: MMU: lazily drop large spte"
    x86: pvclock kvm: align allocation size to page size
    KVM: nVMX: Remove redundant get_vmcs12 from nested_vmx_exit_handled_msr
    x86 emulator: fix parity calculation for AAD instruction
    KVM: PPC: BookE: Handle alignment interrupts
    booke: Added DBCR4 SPR number
    KVM: PPC: booke: Allow multiple exception types
    KVM: PPC: booke: use vcpu reference from thread_struct
    KVM: Remove user_alloc from struct kvm_memory_slot
    KVM: VMX: disable apicv by default
    KVM: s390: Fix handling of iscs.
    KVM: MMU: cleanup __direct_map
    KVM: MMU: remove pt_access in mmu_set_spte
    KVM: MMU: cleanup mapping-level
    KVM: MMU: lazily drop large spte
    KVM: VMX: cleanup vmx_set_cr0().
    KVM: VMX: add missing exit names to VMX_EXIT_REASONS array
    KVM: VMX: disable SMEP feature when guest is in non-paging mode
    KVM: Remove duplicate text in api.txt
    Revert "KVM: MMU: split kvm_mmu_free_page"
    ...

    Linus Torvalds
     

08 Jan, 2013

3 commits

  • Count CPU Restart events and make them visible via /proc/interrupts.
    Every CPU hotplug (online) event will increase the per cpu counter.

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

    Heiko Carstens
     
  • 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
     
  • For more than two years, since f2c66cd8eeddedb440f33bc0f5cec1ed7ae376cb
    "/proc/stat: scalability of irq num per cpu" the output of /proc/stat is
    broken.
    The first field in the "intr" line should contain the sum of all interrupts,
    however since the above mentioned change it is always zero.

    The reason for that is that a per cpu irq sum variable had been introduced
    which got incremented when calling kstat_incr_irqs_this_cpu(). However
    on s390 we directly incremented only the per cpu per irq counter by accessing
    the array element via kstat_cpu(smp_processor_id()).irqs[...].
    So fix this and use the kstat_incr_irqs_this_cpu() wrapper which increments
    both: the per cpu per irq counter and the per cpu irq sum counter.

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

    Heiko Carstens
     

18 Dec, 2012

1 commit


01 Dec, 2012

1 commit

  • Support PCI adapter interrupts using the Single-IRQ-mode. Single-IRQ-mode
    disables an adapter IRQ automatically after delivering it until the SIC
    instruction enables it again. This is used to reduce the number of IRQs
    for streaming workloads.

    Up to 64 MSI handlers can be registered per PCI function.
    A hash table is used to map interrupt numbers to MSI descriptors.
    The interrupt vector is scanned using the flogr instruction.
    Only MSI/MSI-X interrupts are supported, no legacy INTs.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

26 Sep, 2012

3 commits

  • Use designated initializers for the irq class array in irq.c so
    it's always guaranteed that the order of elements is equal to
    their corresponding parts in irq.h.

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

    Heiko Carstens
     
  • Allow user-space threads to use runtime instrumentation (RI). To enable RI
    for a thread there is a new s390 specific system call, sys_s390_runtime_instr,
    that takes as parameter a realtime signal number. If the RI facility is
    available the system call sets up a control block for the calling thread with
    the appropriate permissions for the thread to modify the control block.

    The user-space thread can then use the store and modify RI instructions to
    alter the control block and start/stop the instrumentation via RION/RIOFF.

    If the user specified program buffer runs full RI triggers an external
    interrupt. The external interrupt is translated to a real-time signal that
    is delivered to the thread that enabled RI on that CPU. The number of
    the real-time signal is the number specified in the RI system call. So,
    user-space can select any available real-time signal number in case the
    application itself uses real-time signals for other purposes.

    The kernel saves the RI control blocks on task switch only if the running
    thread was enabled for RI. Therefore, the performance impact on task switch
    should be negligible if RI is not used.

    RI is only enabled for user-space mode and is disabled for the supervisor
    state.

    Reviewed-by: Heiko Carstens
    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • Add support for EADM interrupt statistics in /proc/interrupts.

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

    Sebastian Ott
     

20 Jul, 2012

1 commit

  • Remove the file name from the comment at top of many files. In most
    cases the file name was wrong anyway, so it's rather pointless.

    Also unify the IBM copyright statement. We did have a lot of sightly
    different statements and wanted to change them one after another
    whenever a file gets touched. However that never happened. Instead
    people start to take the old/"wrong" statements to use as a template
    for new files.
    So unify all of them in one go.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     

23 May, 2012

1 commit


11 Apr, 2012

1 commit

  • Use braces for if/else/list_for_each_entry bodies if the body consists
    of more than a single line. Otherwise I get confused and check if there
    is something broken whenever I see these code snippets.

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

    Heiko Carstens
     

23 Mar, 2012

2 commits

  • Prepare the measurement facility which is currently only used by oprofile
    for multiple users. To achieve that the measurement alert interrupt control
    bit needs to be protected. The measurement alert definitions are moved
    to a header file and an interrupt mask is added so that users can discard
    interrupts if they are for a different measurement subsystem.

    Reviewed-by: Hendrik Brueckner
    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • Pull s390 patches from Martin Schwidefsky:
    "The biggest patch is the rework of the smp code, something I wanted to
    do for some time. There are some patches for our various dump methods
    and one new thing: z/VM LGR detection. LGR stands for linux-guest-
    relocation and is the guest migration feature of z/VM. For debugging
    purposes we keep a log of the systems where a specific guest has lived."

    Fix up trivial conflict in arch/s390/kernel/smp.c due to the scheduler
    cleanup having removed some code next to removed s390 code.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    [S390] kernel: Pass correct stack for smp_call_ipl_cpu()
    [S390] Ensure that vmcore_info pointer is never accessed directly
    [S390] dasd: prevent validate server for offline devices
    [S390] Remove monolithic build option for zcrypt driver.
    [S390] stack dump: fix indentation in output
    [S390] kernel: Add OS info memory interface
    [S390] Use block_sigmask()
    [S390] kernel: Add z/VM LGR detection
    [S390] irq: external interrupt code passing
    [S390] irq: set __ARCH_IRQ_EXIT_IRQS_DISABLED
    [S390] zfcpdump: Implement async sdias event processing
    [S390] Use copy_to_absolute_zero() instead of "stura/sturg"
    [S390] rework idle code
    [S390] rework smp code
    [S390] rename lowcore field
    [S390] Fix gcc 4.6.0 compile warning

    Linus Torvalds
     

11 Mar, 2012

2 commits

  • 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
     
  • Whenever the cpu loads an enabled wait PSW it will appear as idle to the
    underlying host system. The code in default_idle calls vtime_stop_cpu
    which does the necessary voodoo to get the cpu time accounting right.
    The udelay code just loads an enabled wait PSW. To correct this rework
    the vtime_stop_cpu/vtime_start_cpu logic and move the difficult parts
    to entry[64].S, vtime_stop_cpu can now be called from anywhere and
    vtime_start_cpu is gone. The correction of the cpu time during wakeup
    from an enabled wait PSW is done with a critical section in entry[64].S.
    As vtime_start_cpu is gone, s390_idle_check can be removed as well.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

22 Feb, 2012

1 commit


30 Oct, 2011

3 commits

  • We use both the external call and emergency call IPIs to signal remote
    cpus. Therefore it makes sense to account them differently withing
    /proc/irqstats so we actually know what happened.

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

    Heiko Carstens
     
  • Add support for CHSC I/O interrupt statistics in /proc/interrupts.

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

    Sebastian Ott
     
  • Current IRQ statistics support does not show detail counts for I/O
    interrupts which are processed internally only. The result is a
    summation count which is way off such as this one:

    CPU0 CPU1 CPU2
    I/O: 1331 710 442
    [...]
    QAI: 15 16 16 [I/O] QDIO Adapter Interrupt
    QDI: 1 0 0 [I/O] QDIO Interrupt
    DAS: 706 645 381 [I/O] DASD
    C15: 26 10 0 [I/O] 3215
    C70: 0 0 0 [I/O] 3270
    TAP: 0 0 0 [I/O] Tape
    VMR: 0 0 0 [I/O] Unit Record Devices
    LCS: 0 0 0 [I/O] LCS
    CLW: 0 0 0 [I/O] CLAW
    CTC: 0 0 0 [I/O] CTC
    APB: 0 0 0 [I/O] AP Bus

    Fix this by moving I/O interrupt accounting into the common I/O layer.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     

24 Jul, 2011

1 commit

  • The (un-)register_external_interrupt functions are not race safe if
    more than one interrupt handler is added or deleted for an external
    interrupt concurrently.

    Make the registration / unregistration of external interrupts race safe
    by using RCU and a spinlock. RCU is used to avoid a performance penalty
    in the external interrupt handler, the register and unregister functions
    are protected by the spinlock and are not performance critical.
    call_rcu must be used since the SCLP driver uses the interface with
    IRQs disabled. Also use the generic list implementation rather than
    homebrewn list code.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     

26 May, 2011

1 commit


23 May, 2011

1 commit


05 Jan, 2011

6 commits