1. 11 Mar, 2012 9 commits
    • Michael Holzheu's avatar
      [S390] kernel: Add z/VM LGR detection · 3ab121ab
      Michael Holzheu authored
      Currently the following mechanisms are available to move active
      Linux on System z instances between machines:
      * z/VM 6.2 SSI (Single System Image)
      * Suspend/resume
      For moving Linux instances in this patch the term LGR (Linux Guest
      Relocation) is used. Because such an operation is critical, it
      should be detectable from Linux. With this patch for both, a live
      system and a kernel dump, the information about LGRs is accessible.
      To identify a guest, stsi and stfle data is used. A new function
      lgr_info_log() compares the current data (lgr_info_cur) with the
      last recorded one (lgr_info_last). In case the two data sets differ,
      lgr_info_cur is logged to the "lgr" s390dbf.
      
      The following trigger points call lgr_info_log():
      * panic
      * die
      * kdump
      * LGR timer
      * PSW restart
      * QDIO recovery
      * resume
      
      This patch also changes the s390dbf hex_ascii view. Now only printable ASCII
      characters are shown.
      Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      3ab121ab
    • Heiko Carstens's avatar
      [S390] irq: external interrupt code passing · fde15c3a
      Heiko Carstens authored
      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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      fde15c3a
    • Heiko Carstens's avatar
      [S390] irq: set __ARCH_IRQ_EXIT_IRQS_DISABLED · 2215011d
      Heiko Carstens authored
      Set __ARCH_IRQ_EXIT_IRQS_DISABLED in order to optimize irq_exit() a
      bit, since we call __do_softirq() instead of do_softirq().
      This saves several needless checks, pointless interrupt disabling
      and an extra branch.
      If do_softirq() gets called from process context we still switch to
      the async stack.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      2215011d
    • Michael Holzheu's avatar
      [S390] zfcpdump: Implement async sdias event processing · e3c652b5
      Michael Holzheu authored
      There are two different ways to do the "store data in absolute
      storage" SCLP event processing, synchronous and asynchrounous.
      This patch adds the asynchronous variant.
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      e3c652b5
    • Michael Holzheu's avatar
      [S390] Use copy_to_absolute_zero() instead of "stura/sturg" · b43445ff
      Michael Holzheu authored
      Use the new copy_to_absolute_zero() function instead of manual "stura"
      and "sturg" to make the code shorter and more readable.
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      b43445ff
    • Martin Schwidefsky's avatar
      [S390] rework idle code · 4c1051e3
      Martin Schwidefsky authored
      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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      4c1051e3
    • Martin Schwidefsky's avatar
      [S390] rework smp code · 8b646bd7
      Martin Schwidefsky authored
      Define struct pcpu and merge some of the NR_CPUS arrays into it, including
      __cpu_logical_map, current_set and smp_cpu_state. Split smp related
      functions to those operating on physical cpus and the functions operating
      on a logical cpu number. Make the functions for physical cpus use a
      pointer to a struct pcpu. This hides the knowledge about cpu addresses in
      smp.c, entry[64].S and swsusp_asm64.S, thus remove the sigp.h header.
      
      The PSW restart mechanism is used to start secondary cpus, calling a
      function on an online cpu, calling a function on the ipl cpu, and for
      the nmi signal. Replace the different assembler functions with a
      single function restart_int_handler. The new entry point calls a function
      whose pointer is stored in the lowcore of the target cpu and it can wait
      for the source cpu to stop. This covers all existing use cases.
      
      Overall the code is now simpler and there are ~380 lines less code.
      Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      8b646bd7
    • Martin Schwidefsky's avatar
      [S390] rename lowcore field · 7e180bd8
      Martin Schwidefsky authored
      The 16 bit value at the lowcore location with offset 0x84 is the
      cpu address that is associated with an external interrupt. Rename
      the field from cpu_addr to ext_cpu_addr to make that clear.
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      7e180bd8
    • Michael Holzheu's avatar
      [S390] Fix gcc 4.6.0 compile warning · 4fdf7f43
      Michael Holzheu authored
      With gcc 4.6.0 we get a false compile warning:
      
       arch/s390/kernel/setup.c: In function 'setup_arch':
       arch/s390/kernel/setup.c:767:3: warning: 'msg' may be used
                  uninitialized in this function [-Wuninitialized]
       arch/s390/kernel/setup.c:753:8: note: 'msg' was declared here
      
      This patch makes gcc quiet.
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      4fdf7f43
  2. 10 Mar, 2012 4 commits
    • Linus Torvalds's avatar
      Linux 3.3-rc7 · fde7d904
      Linus Torvalds authored
      fde7d904
    • Al Viro's avatar
      aio: fix the "too late munmap()" race · c7b28555
      Al Viro authored
      Current code has put_ioctx() called asynchronously from aio_fput_routine();
      that's done *after* we have killed the request that used to pin ioctx,
      so there's nothing to stop io_destroy() waiting in wait_for_all_aios()
      from progressing.  As the result, we can end up with async call of
      put_ioctx() being the last one and possibly happening during exit_mmap()
      or elf_core_dump(), neither of which expects stray munmap() being done
      to them...
      
      We do need to prevent _freeing_ ioctx until aio_fput_routine() is done
      with that, but that's all we care about - neither io_destroy() nor
      exit_aio() will progress past wait_for_all_aios() until aio_fput_routine()
      does really_put_req(), so the ioctx teardown won't be done until then
      and we don't care about the contents of ioctx past that point.
      
      Since actual freeing of these suckers is RCU-delayed, we don't need to
      bump ioctx refcount when request goes into list for async removal.
      All we need is rcu_read_lock held just over the ->ctx_lock-protected
      area in aio_fput_routine().
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Acked-by: default avatarBenjamin LaHaise <bcrl@kvack.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c7b28555
    • Al Viro's avatar
      aio: fix io_setup/io_destroy race · 86b62a2c
      Al Viro authored
      Have ioctx_alloc() return an extra reference, so that caller would drop it
      on success and not bother with re-grabbing it on failure exit.  The current
      code is obviously broken - io_destroy() from another thread that managed
      to guess the address io_setup() would've returned would free ioctx right
      under us; gets especially interesting if aio_context_t * we pass to
      io_setup() points to PROT_READ mapping, so put_user() fails and we end
      up doing io_destroy() on kioctx another thread has just got freed...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: default avatarBenjamin LaHaise <bcrl@kvack.org>
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      86b62a2c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 86e06008
      Linus Torvalds authored
      Pull btrfs updates from Chris Mason:
       "I have two additional and btrfs fixes in my for-linus branch.  One is
        a casting error that leads to memory corruption on i386 during scrub,
        and the other fixes a corner case in the backref walking code (also
        triggered by scrub)."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix casting error in scrub reada code
        btrfs: fix locking issues in find_parent_nodes()
      86e06008
  3. 09 Mar, 2012 14 commits
  4. 08 Mar, 2012 13 commits