1. 15 Nov, 2012 28 commits
  2. 17 Oct, 2012 12 commits
    • Deepthi Dharwar's avatar
      cpuidle/powerpc: Fix snooze state problem in the cpuidle design on pseries. · 83dac594
      Deepthi Dharwar authored
      Earlier without cpuidle framework on pseries, the native arch
      idle routine comprised of both snooze and nap
      states.  smt_snooze_delay variable was used to delay
      the idle process entry to deeper idle state like  nap.
      With the coming of cpuidle, this arch specific idle was replaced
      by two different idle routines, one for supporting snooze and other
      for nap. This enabled addition of more
      low level idle states on pseries in the future.
      
      On adopting the generic cpuidle framework for POWER systems,
      the decision of which idle state to choose from,  given a predicted
      idle time is taken by the menu governor based on
      target_residency and  exit_latency of the idle states.
      target_residency is the minimum time to be resident in that idle state.
      Exit_latency is time taken to exit out of idle state.
      Deeper the idle state, both the target residency and exit latency
      would be higher.
      
      In the current design, smt_snooze_delay is used as target_residency
      for the  snooze state which is incorrect, as it is not the
      minimum but the maximum duration to be in snooze state.
      This would  result in the governor in taking bad decision,
      as presently target_residency of nap < target_residency of snooze
      inspite of nap being deeper idle state.
      
      This patch aims to fix this problem by replacing the smt_snooze_delay loop
      in snooze state, with the need_resched()  as the governor is aware of
      entry and exit of various idle transitions based on which
      next idle time prediction.
      
      The governor is intelligent enough to determine the idle state the needs to
      be transitioned to and maintains a whole of heuristics including
      io load, previous idle states predictions etc for the same, based on
      which idle state entry decision is taken.
      
      With this fix, of setting target_residency of snooze to 0
      					     nap to smt_snooze_delay
      if the predicted idle time is less
      than smt_snooze_delay (target_residency of nap)
      value governor would pick snooze state, else nap. This adhers to the
      previous native idle design.
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      83dac594
    • Deepthi Dharwar's avatar
      cpuidle/powerpc: Fix smt_snooze_delay functionality. · 8ea959a1
      Deepthi Dharwar authored
      smt_snooze_delay was designed to  delay idle loop's nap entry
      in the native idle code before it got  ported over to use as part of
      the cpuidle framework.
      
      A -ve value  assigned to smt_snooze_delay should result in
      busy looping, in other words disabling the entry to nap state.
      
      	- https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-May/082450.html
      
      This particular functionality can be achieved currently by
      echo 1 > /sys/devices/system/cpu/cpu*/state1/disable
      but it is broken when one assigns -ve value to  the smt_snooze_delay
      variable either via sysfs entry or ppc64_cpu util.
      
      This patch aims to fix this, by disabling nap state when smt_snooze_delay
      variable is set to -ve value.
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8ea959a1
    • Deepthi Dharwar's avatar
      cpuidle/powerpc: Fix target residency initialisation in pseries cpuidle · 817deb05
      Deepthi Dharwar authored
      Remove the redundant target residency initialisation in pseries_cpuidle_driver_init().
      This is currently over-writing the residency time updated as part of the static
      table, resulting in  all the idle states having the same target
      residency of 100us which is incorrect. This may result in the menu governor making
      wrong state decisions.
      Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      817deb05
    • Aneesh Kumar K.V's avatar
      powerpc: Build fix for powerpc KVM · ce236ab5
      Aneesh Kumar K.V authored
      Fix build failure for powerpc KVM by adding missing VPN_SHIFT definition
      and the ';'
      
      arch/powerpc/kvm/book3s_32_mmu_host.c: In function 'kvmppc_mmu_map_page':
      arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: 'VPN_SHIFT' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: (Each undeclared identifier is reported only once
      arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: for each function it appears in.)
      arch/powerpc/kvm/book3s_32_mmu_host.c:178: error: expected ';' before 'next_pteg'
      arch/powerpc/kvm/book3s_32_mmu_host.c:190: error: label 'next_pteg' used but not defined
      make[1]: *** [arch/powerpc/kvm/book3s_32_mmu_host.o] Error 1
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ce236ab5
    • Benjamin Herrenschmidt's avatar
      Revert "powerpc/perf: Use pmc_overflow() to detect rolled back events" · 72523d80
      Benjamin Herrenschmidt authored
      This reverts commit 81331211.
      
      This revert was requested by the author of the patch as it seems
      to cause system hangs with some low frequency events
      72523d80
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 18673533
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix regression in /proc/net/if_inet6, sometimes devices do not get
          listed.  From Eric Dumazet.
      
       2) Add IPSEC networking sub-section to MAINTAINERS.
      
       3) S390 networking fixes from Hendrik Brueckner and Stefan Raspl.
      
       4) Fix enslavement of devices that can't do VLAN properly, from Jiri
          Pirko.
      
       5) SCTP sack handling fix from Zijie Pan.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        ipv6: addrconf: fix /proc/net/if_inet6
        bnx2x: fix handling mf storage modes
        qeth: fix deadlock between recovery and bonding driver
        smsgiucv: reestablish IUCV path after resume
        sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()
        vlan: fix bond/team enslave of vlan challenged slave/port
        MAINTAINERS: Add explicit section for IPSEC networking.
      18673533
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · ccbfddb7
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
       "Two sparc64 perf bug fixes and add a sysrq facility so I can diagnose
        these kinds of problems more quickly in the future."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix bit twiddling in sparc_pmu_enable_event().
        sparc64: Add global PMU register dumping via sysrq.
        sparc64: Like x86 we should check current->mm during perf backtrace generation.
      ccbfddb7
    • Linus Torvalds's avatar
      Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh · 8d2b6b3a
      Linus Torvalds authored
      Pull SuperH updates from Paul Mundt.
      
      The bulk of this is the UAPI disintegration for SH.
      
      * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
        sh: Fix up more fallout from pointless ARM __iomem churn.
        sh: Wire up kcmp syscall.
        UAPI: (Scripted) Disintegrate arch/sh/include/asm
      8d2b6b3a
    • Linus Torvalds's avatar
      Merge branch 'frv' (FRV patches from David Howells) · 90a24a4a
      Linus Torvalds authored
      Merge emailed FRV fixes from David Howells.
      
      * frv:
        FRV: Fix linux/elf-fdpic.h
        FRV: Fix const sections change
        FRV: Fix incorrect symbol in copy_thread()
        FRV: Fix VLIW packing constraint violation in entry.S
      90a24a4a
    • David Howells's avatar
      FRV: Fix linux/elf-fdpic.h · 0c552e5f
      David Howells authored
      It seems I accidentally switched the guard on linux/elf-fdpic.h from #ifdef
      __KERNEL__ to #ifndef __KERNEL__ when attempting to expand the guarded region
      to cover the elf_fdpic_params struct when doing the UAPI split - with the
      result that the struct became unavailable to kernel code.
      
      Move incorrectly guarded bits back to the kernelspace header.
      
      Whilst we're at it, the __KERNEL__ guards can be deleted as they're no longer
      necessary.
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Reported-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Fengguang Wu <fengguang.wu@intel.com>
      cc: Lars-Peter Clausen <lars@metafoo.de>
      cc: uclinux-dev@uclinux.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0c552e5f
    • Andi Kleen's avatar
      FRV: Fix const sections change · b4b50871
      Andi Kleen authored
      Add __pminitconst to fix the build, otherwise the following error can occur:
      
        arch/frv/kernel/setup.c:187:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
        arch/frv/kernel/setup.c:386:2: error: 'clock_cmodes' undeclared (first use in this function)
        arch/frv/kernel/setup.c:571:6: error: 'clock_cmodes' undeclared (first use in this function)
        make[2]: *** [arch/frv/kernel/setup.o] Error 1
      
      http://kisskb.ellerman.id.au/kisskb/buildresult/7344691/Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b4b50871
    • David Howells's avatar
      FRV: Fix incorrect symbol in copy_thread() · ce7bfc7c
      David Howells authored
      Fix an incorrect symbol in copy_thread():
      
        arch/frv/kernel/process.c: In function 'copy_thread':
        arch/frv/kernel/process.c:197: error: 'chilregs' undeclared (first use in this function)
        arch/frv/kernel/process.c:197: error: (Each undeclared identifier is reported only once
        arch/frv/kernel/process.c:197: error: for each function it appears in.)
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ce7bfc7c