1. 01 Jun, 2012 2 commits
  2. 30 May, 2012 3 commits
    • Heiko Carstens's avatar
      s390/cpu: remove cpu "capabilities" sysfs attribute · b9e3f776
      Heiko Carstens authored
      
      
      It has been a big mistage to add the capabilities attribute to the
      cpus in sysfs:
      First the attribute only contains the cpu capability of primary cpus,
      which however is not necessarily (or better: unlikely) the type of
      cpu the kernel runs on, which is typically an IFL.
      In addition all information that is necessary is available in
      /proc/sysinfo already. So this attribute partially duplicated
      informations.
      So programs should look into the sysinfo file to retrieve all
      informations they are interested in.
      
      Since with this kernel release also the powersavings cpu attributes
      are removed this seems to be a good opportunity to remove another
      broken interface.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      b9e3f776
    • Michael Holzheu's avatar
      s390/kernel: Fix smp_call_ipl_cpu() for offline CPUs · 061da3df
      Michael Holzheu authored
      
      
      If the IPL CPU is offline, currently the pcpu_delegate() function
      used by smp_call_ipl_cpu() does not work because pcpu_delegate()
      modifies the lowcore of the target CPU. In case of an offline
      IPL CPU currently the prefix register is zero but pcpu->lowcore
      still points to the old prefix page. Therefore the lowcore changes
      done by pcpu_delegate() have no effect.
      
      With this fix pcpu_delegate() now uses memcpy_absolute() and therefore
      also prepares the absolute zero lowcore if the target CPU has prefix
      register zero.
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      061da3df
    • Michael Holzheu's avatar
      s390/kernel: Introduce memcpy_absolute() function · 73bf463e
      Michael Holzheu authored
      
      
      This patch introduces the new function memcpy_absolute() that allows to
      copy memory using absolute addressing. This means that the prefix swap
      does not apply when this function is used.
      
      With this patch also all s390 kernel code that accesses absolute zero
      now uses the new memcpy_absolute() function. The old and less generic
      copy_to_absolute_zero() function is removed.
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      73bf463e
  3. 24 May, 2012 1 commit
  4. 23 May, 2012 5 commits
  5. 22 May, 2012 1 commit
  6. 16 May, 2012 11 commits
  7. 15 May, 2012 1 commit
  8. 05 May, 2012 1 commit
  9. 03 May, 2012 1 commit
  10. 26 Apr, 2012 2 commits
  11. 18 Apr, 2012 1 commit
  12. 11 Apr, 2012 3 commits
    • Michael Holzheu's avatar
      [S390] Fix stfle() lowcore protection problem · 37e37c20
      Michael Holzheu authored
      
      
      The stfle() function writes into lowcore memory when stfl_fac_list
      is initialized with "S390_lowcore.stfl_fac_list = 0". For older
      compilers this triggers a lowcore exception. With newer compilers
      and "-OXX" compile option the bug does not show up because
      the "S390_lowcore.stfl_fac_list" initialization is removed by the
      compiler. The reason for thatis the incorrect "=m"
      (S390_lowcore.stfl_fac_list) constraint in the stfl inline assembly.
      
      The following shows the disassembly of the stfle() optimized code
      that is inlined in the lgr_info_get() function:
      
      000000000011325c <lgr_info_get>:
        11325c:       eb 9f f0 60 00 24       stmg    %r9,%r15,96(%r15)
        113262:       c0 d0 00 29 0e 47       larl    %r13,634ef0 <servi..>
        113268:       a7 f1 3f c0             tml     %r15,16320
        11326c:       b9 04 00 ef             lgr     %r14,%r15
        113270:       a7 84 00 01             je      113272 <lgr_info_g..>
        113274:       a7 fb ff c0             aghi    %r15,-64
        113278:       b9 04 00 c2             lgr     %r12,%r2
        11327c:       a7 29 00 01             lghi    %r2,1
        113280:       e3 e0 f0 98 00 24       stg     %r14,152(%r15)
        113286:       d7 97 c0 00 c0 00       xc      0(152,%r12),0(%r12)
        11328c:       c0 e5 00 28 db 4c       brasl   %r14,62e924 <add_e..>
        113292:       b2 b1 00 00             stfl    0
      
      To fix the problem we now clear the S390_lowcore.stfl_fac_list at
      startup in "head.S" for all machine types before lowcore protection
      is enabled.
      
      In addition to that the "=m" constraint is replaced by "+m".
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      37e37c20
    • Heiko Carstens's avatar
      [S390] cpum_cf: get rid of compile warnings · af0ee94e
      Heiko Carstens authored
      
      
      Fix these:
      
      arch/s390/kernel/perf_cpum_cf.c:180:3: warning: format '%lx'
         expects argument of type 'long unsigned int',
         but argument 2 has type 'int' [-Wformat]
      arch/s390/kernel/perf_cpum_cf.c: In function 'cpumf_pmu_disable':
      arch/s390/kernel/perf_cpum_cf.c:205:3: warning: format '%lx'
         expects argument of type 'long unsigned int',
         but argument 2 has type 'int' [-Wformat]
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      af0ee94e
    • Heiko Carstens's avatar
      [S390] irq: simple coding style change · 7968ca81
      Heiko Carstens authored
      
      
      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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      7968ca81
  13. 30 Mar, 2012 1 commit
  14. 28 Mar, 2012 1 commit
  15. 23 Mar, 2012 3 commits
    • Jason Baron's avatar
      coredump: remove VM_ALWAYSDUMP flag · 909af768
      Jason Baron authored
      The motivation for this patchset was that I was looking at a way for a
      qemu-kvm process, to exclude the guest memory from its core dump, which
      can be quite large.  There are already a number of filter flags in
      /proc/<pid>/coredump_filter, however, these allow one to specify 'types'
      of kernel memory, not specific address ranges (which is needed in this
      case).
      
      Since there are no more vma flags available, the first patch eliminates
      the need for the 'VM_ALWAYSDUMP' flag.  The flag is used internally by
      the kernel to mark vdso and vsyscall pages.  However, it is simple
      enough to check if a vma covers a vdso or vsyscall page without the need
      for this flag.
      
      The second patch then replaces the 'VM_ALWAYSDUMP' flag with a new
      'VM_NODUMP' flag, which can be set by userspace using new madvise flags:
      'MADV_DONTDUMP', and unset via 'MADV_DODUMP'.  The core dump filters
      continue to work the same as before unless 'MADV_DONTDUMP' is set on the
      region.
      
      The qemu code which implements this features is at:
      
        http://people.redhat.com/~jbaron/qemu-dump/qemu-dump.patch
      
      
      
      In my testing the qemu core dump shrunk from 383MB -> 13MB with this
      patch.
      
      I also believe that the 'MADV_DONTDUMP' flag might be useful for
      security sensitive apps, which might want to select which areas are
      dumped.
      
      This patch:
      
      The VM_ALWAYSDUMP flag is currently used by the coredump code to
      indicate that a vma is part of a vsyscall or vdso section.  However, we
      can determine if a vma is in one these sections by checking it against
      the gate_vma and checking for a non-NULL return value from
      arch_vma_name().  Thus, freeing a valuable vma bit.
      Signed-off-by: default avatarJason Baron <jbaron@redhat.com>
      Acked-by: default avatarRoland McGrath <roland@hack.frob.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Avi Kivity <avi@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      909af768
    • Hendrik Brueckner's avatar
      [S390] perf: add support for s390x CPU counters · 212188a5
      Hendrik Brueckner authored
      
      
      Add a perf PMU to access the CPU-measurement counter facility CPUM CF.
      CPUM CF provides multiple counter sets for measuring generic,
      problem-state, and crypto activaties.  Also an extended counter set for
      the IBM System z10 and IBM z196 mainframes is available.
      
      Counters from the basic and problem-state counter set are mapped to
      generic perf hardware events.  Other counters are accessible through
      raw events.
      
      For a list of available counter sets and counters, see:
      
        - The Load-Program-Parameter and the CPU-Measurement Facilities (SA23-2260)
        - The CPU-Measurement Facility Extended Counters Definition for
          z10 and z196 (SA23-2261)
      Reviewed-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      212188a5
    • Jan Glauber's avatar
      [S390] oprofile: Allow multiple users of the measurement alert interrupt · b03d541a
      Jan Glauber authored
      
      
      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: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Signed-off-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      b03d541a
  16. 13 Mar, 2012 1 commit
  17. 12 Mar, 2012 1 commit
    • Peter Zijlstra's avatar
      sched: Cleanup cpu_active madness · 5fbd036b
      Peter Zijlstra authored
      
      
      Stepan found:
      
      CPU0		CPUn
      
      _cpu_up()
        __cpu_up()
      
      		boostrap()
      		  notify_cpu_starting()
      		  set_cpu_online()
      		  while (!cpu_active())
      		    cpu_relax()
      
      <PREEMPT-out>
      
      smp_call_function(.wait=1)
        /* we find cpu_online() is true */
        arch_send_call_function_ipi_mask()
      
        /* wait-forever-more */
      
      <PREEMPT-in>
      		  local_irq_enable()
      
        cpu_notify(CPU_ONLINE)
          sched_cpu_active()
            set_cpu_active()
      
      Now the purpose of cpu_active is mostly with bringing down a cpu, where
      we mark it !active to avoid the load-balancer from moving tasks to it
      while we tear down the cpu. This is required because we only update the
      sched_domain tree after we brought the cpu-down. And this is needed so
      that some tasks can still run while we bring it down, we just don't want
      new tasks to appear.
      
      On cpu-up however the sched_domain tree doesn't yet include the new cpu,
      so its invisible to the load-balancer, regardless of the active state.
      So instead of setting the active state after we boot the new cpu (and
      consequently having to wait for it before enabling interrupts) set the
      cpu active before we set it online and avoid the whole mess.
      Reported-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1323965362.18942.71.camel@twins
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      5fbd036b
  18. 11 Mar, 2012 1 commit