1. 27 Jan, 2013 1 commit
    • Frederic Weisbecker's avatar
      cputime: Librarize per nsecs resolution cputime definitions · 39613766
      Frederic Weisbecker authored
      The full dynticks cputime accounting that we'll soon introduce
      will rely on sched_clock(). And its clock can have a per
      nanosecond granularity.
      To prepare for this, we need to have a cputime_t implementation
      that has this precision.
      ia64 virtual cputime accounting already uses that granularity
      so all we need is to librarize its implementation in the asm
      generic headers.
      Also librarize the default per jiffy granularity cputime_t
      as well so that we can easily pick either implementation
      depending on the cputime accounting config we choose.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
  2. 03 Jan, 2013 2 commits
  3. 19 Dec, 2012 2 commits
    • Al Viro's avatar
      new helper: current_user_stack_pointer() · 1ca97bb5
      Al Viro authored
      	Cross-architecture equivalent of rdusp(); default is
      user_stack_pointer(current_pt_regs()) - that works for almost all
      platforms that have usp saved in pt_regs.  The only exception from
      that is ia64 - we want memory stack, not the backing store for
      register one.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    • Al Viro's avatar
      Bury the conditionals from kernel_thread/kernel_execve series · ae903caa
      Al Viro authored
      All architectures have
      None of them have __ARCH_WANT_KERNEL_EXECVE and there are only two callers
      of kernel_execve() (which is a trivial wrapper for do_execve() now) left.
      Kill the conditionals and make both callers use do_execve().
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  4. 28 Nov, 2012 2 commits
  5. 19 Nov, 2012 1 commit
    • Frederic Weisbecker's avatar
      vtime: Consolidate a bit the ctx switch code · e3942ba0
      Frederic Weisbecker authored
      On ia64 and powerpc, vtime context switch only consists
      in flushing system and user pending time, plus a few
      arch housekeeping.
      Consolidate that into a generic implementation. s390 is
      a special case because pending user and system time accounting
      there is hard to dissociate. So it's keeping its own implementation.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Reviewed-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
  6. 14 Nov, 2012 1 commit
    • Mika Westerberg's avatar
      driver core / ACPI: Move ACPI support to core device and driver types · 06f64c8f
      Mika Westerberg authored
      With ACPI 5 we are starting to see devices that don't natively support
      discovery but can be enumerated with the help of the ACPI namespace.
      Typically, these devices can be represented in the Linux device driver
      model as platform devices or some serial bus devices, like SPI or I2C
      Since we want to re-use existing drivers for those devices, we need a
      way for drivers to specify the ACPI IDs of supported devices, so that
      they can be matched against device nodes in the ACPI namespace.  To
      this end, it is sufficient to add a pointer to an array of supported
      ACPI device IDs, that can be provided by the driver, to struct device.
      Moreover, things like ACPI power management need to have access to
      the ACPI handle of each supported device, because that handle is used
      to invoke AML methods associated with the corresponding ACPI device
      node.  The ACPI handles of devices are now stored in the archdata
      member structure of struct device whose definition depends on the
      architecture and includes the ACPI handle only on x86 and ia64. Since
      the pointer to an array of supported ACPI IDs is added to struct
      device_driver in an architecture-independent way, it is logical to
      move the ACPI handle from archdata to struct device itself at the same
      time.  This also makes code more straightforward in some places and
      follows the example of Device Trees that have a poiter to struct
      device_node in there too.
      This changeset is based on Mika Westerberg's work.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Acked-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  7. 13 Nov, 2012 1 commit
  8. 24 Oct, 2012 1 commit
  9. 19 Oct, 2012 2 commits
  10. 18 Oct, 2012 1 commit
    • David Howells's avatar
      UAPI: Make arch/ia64/include/asm/kvm_para.h generic · 7e3cdf24
      David Howells authored
      Make arch/ia64/include/asm/kvm_para.h generic since it's the same as the
      asm-generic version.  This deals with the problem when ia64 is compiled with
      allmodconfig you get:
      In file included from include/uapi/linux/kvm_para.h:26:0,
                       from include/linux/kvm_para.h:4,
                       from kernel/watchdog.c:28:
      arch/ia64/include/asm/kvm_para.h:24:28: error: redefinition of 'kvm_arch_para_features'
      include/asm-generic/kvm_para.h:16:28: note: previous definition of 'kvm_arch_para_features' was here
      arch/ia64/include/asm/kvm_para.h:29:20: error: redefinition of 'kvm_check_and_clear_guest_paused'
      include/asm-generic/kvm_para.h:11:20: note: previous definition of 'kvm_check_and_clear_guest_paused' was here
      This does not happen for ia64 defconfig.
      Reported-by: default avatarYuanhan Liu <yuanhan.liu@intel.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Yuanhan Liu <yuanhan.liu@intel.com>
      cc: fengguang.wu@intel.com
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
  11. 09 Oct, 2012 2 commits
  12. 03 Oct, 2012 1 commit
  13. 01 Oct, 2012 1 commit
    • Al Viro's avatar
      sanitize tsk_is_polling() · 16a80163
      Al Viro authored
      Make default just return 0.  The current default (checking
      TIF_POLLING_NRFLAG) is taken to architectures that need it;
      ones that don't do polling in their idle threads don't need
      to defined TIF_POLLING_NRFLAG at all.
      ia64 defined both TS_POLLING (used by its tsk_is_polling())
      and TIF_POLLING_NRFLAG (not used at all).  Killed the latter...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  14. 27 Sep, 2012 1 commit
    • David Howells's avatar
      Make most arch asm/module.h files use asm-generic/module.h · 786d35d4
      David Howells authored
      Use the mapping of Elf_[SPE]hdr, Elf_Addr, Elf_Sym, Elf_Dyn, Elf_Rel/Rela,
      ELF_R_TYPE() and ELF_R_SYM() to either the 32-bit version or the 64-bit version
      into asm-generic/module.h for all arches bar MIPS.
      Also, use the generic definition mod_arch_specific where possible.
      To this end, I've defined three new config bools:
           Arches define this if they don't want to use the empty generic
           mod_arch_specific struct.
           Arches define this if their modules can contain RELA records.  This causes
           the Elf_Rela mapping to be emitted and allows apply_relocate_add() to be
           defined by the arch rather than have the core emit an error message.
           Arches define this if their modules can contain REL records.  This causes
           the Elf_Rel mapping to be emitted and allows apply_relocate() to be
           defined by the arch rather than have the core emit an error mes...
  15. 20 Sep, 2012 1 commit
  16. 10 Sep, 2012 1 commit
    • Jianguo Wu's avatar
      [IA64] Fix a node distance bug · 7cd10a60
      Jianguo Wu authored
      In arch ia64, has following definition:
      extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
      #define node_distance(from,to) (numa_slit[(from) * num_online_nodes() + (to)])
      num_online_nodes() is a variable value, it can be changed after hot-remove/add
      a node.
      In my practice, I found node distance is wrong after offline
      a node in IA64 platform. For example system has 4 nodes:
      node distances:
      node   0   1   2   3
        0:  10  21  21  32
        1:  21  10  32  21
        2:  21  32  10  21
        3:  32  21  21  10
      linux-drf:/sys/devices/system/node/node0 # cat distance
      10  21  21  32
      linux-drf:/sys/devices/system/node/node1 # cat distance
      21  10  32  21
      After offline node2:
      linux-drf:/sys/devices/system/node/node0 # cat distance
      10 21 32
      linux-drf:/sys/devices/system/node/node1 # cat distance
      32 21 32	--------->expected value is: 21  10  21
      Signed-off-by: default avatarJianguo Wu <wujianguo@huawei.com>
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
  17. 23 Aug, 2012 1 commit
  18. 21 Aug, 2012 1 commit
  19. 20 Aug, 2012 1 commit
    • Frederic Weisbecker's avatar
      cputime: Consolidate vtime handling on context switch · baa36046
      Frederic Weisbecker authored
      The archs that implement virtual cputime accounting all
      flush the cputime of a task when it gets descheduled
      and sometimes set up some ground initialization for the
      next task to account its cputime.
      These archs all put their own hooks in their context
      switch callbacks and handle the off-case themselves.
      Consolidate this by creating a new account_switch_vtime()
      callback called in generic code right after a context switch
      and that these archs must implement to flush the prev task
      cputime and initialize the next task cputime related state.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
  20. 14 Sep, 2012 1 commit
  21. 26 Jul, 2012 1 commit
    • Tony Luck's avatar
      [IA64] Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts · a1193655
      Tony Luck authored
      The following build error occured during a ia64 build with
      swap-over-NFS patches applied.
      net/core/sock.c:274:36: error: initializer element is not constant
      net/core/sock.c:274:36: error: (near initialization for 'memalloc_socks')
      net/core/sock.c:274:36: error: initializer element is not constant
      This is identical to a parisc build error. Fengguang Wu, Mel Gorman
      and James Bottomley did all the legwork to track the root cause of
      the problem. This fix and entire commit log is shamelessly copied
      from them with one extra detail to change a dubious runtime use of
      ATOMIC_INIT() to atomic_set() in drivers/char/mspec.c
      Dave Anglin says:
      > Here is the line in sock.i:
      > struct static_key memalloc_socks = ((struct static_key) { .enabled =
      > ((atomic_t) { (0) }) });
      The above line contains two compound literals.  It also uses a designated
      initializer to initialize the field enabled.  A compound literal is not a
      constant expression.
      The location of the above statement isn't fully clear, but if a compound
      literal occurs outside the body of a function, the initializer list must
      consist of constant expressions.
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
  22. 25 Jul, 2012 1 commit
  23. 25 Jun, 2012 1 commit
  24. 18 Jun, 2012 1 commit
  25. 01 Jun, 2012 2 commits
  26. 30 May, 2012 1 commit
  27. 16 May, 2012 3 commits
  28. 11 May, 2012 1 commit
  29. 09 May, 2012 1 commit
    • Peter Zijlstra's avatar
      sched/numa: Rewrite the CONFIG_NUMA sched domain support · cb83b629
      Peter Zijlstra authored
      The current code groups up to 16 nodes in a level and then puts an
      ALLNODES domain spanning the entire tree on top of that. This doesn't
      reflect the numa topology and esp for the smaller not-fully-connected
      machines out there today this might make a difference.
      Therefore, build a proper numa topology based on node_distance().
      Since there's no fixed numa layers anymore, the static SD_NODE_INIT
      and SD_ALLNODES_INIT aren't usable anymore, the new code tries to
      construct something similar and scales some values either on the
      number of cpus in the domain and/or the node_distance() ratio.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-sh@vger.kernel.org
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: sparclinux@vger.kernel.org
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: x86@kernel.org
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Greg Pearson <greg.pearson@hp.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: bob.picco@oracle.com
      Cc: chris.mason@oracle.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/n/tip-r74n3n8hhuc2ynbrnp3vt954@git.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
  30. 08 May, 2012 2 commits
  31. 07 May, 2012 1 commit