1. 08 1月, 2009 1 次提交
    • N
      powerpc: Rewrite sysfs processor cache info code · 93197a36
      Nathan Lynch 提交于
      The current code for providing processor cache information in sysfs
      has the following deficiencies:
      - several complex functions that are hard to understand
      - implicit recursion (cache_desc_release -> kobject_put -> cache_desc_release)
      - explicit recursion (create_cache_index_info)
      - use of two per-cpu arrays when one would suffice
      - duplication of work on systems where CPUs share cache
      
      Also, when I looked at implementing support for a shared_cpu_map
      attribute, it was pretty much impossible to handle hotplug without
      checking every single online CPU's cache_desc list and fixing things
      up... not that this is a hot path, but it would have introduced
      O(n^2)-ish behavior during boot.  Addressing this involved rethinking
      the core data structures used, which didn't lend itself to an
      incremental approach.
      
      This implementation maintains a "forest" (potentially more than one
      tree) of cache objects which reflects the system's cache topology.
      Cache objects are instantiated as needed as CPUs come online.  A
      per-cpu array is used mainly for sysfs-related bookkeeping; the
      objects in the array just point to the appropriate points in the
      forest.
      
      This maintains compatibility with the existing code and includes some
      enhancements:
      - Implement the shared_cpu_map attribute, which is essential for
        enabling userspace to discover the system's overall cache topology.
      - Use cache-block-size properties if cache-line-size is not available.
      
      I chose to place this implementation in a new file since it would have
      roughly doubled the size of sysfs.c, which is already kind of messy.
      Signed-off-by: NNathan Lynch <ntl@pobox.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      93197a36
  2. 21 12月, 2008 1 次提交
  3. 01 12月, 2008 1 次提交
    • M
      powerpc: Fix build for 32-bit SMP configs · a1e0eb10
      Milton Miller 提交于
      attr_smt_snooze_delay is only defined for CONFIG_PPC64, so protect the
      attribute removal with the same condition.  This fixes this build error
      on 32-bit SMP configurations:
      
      /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c: In function ‘unregister_cpu_online’:
      /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: ‘attr_smt_snooze_delay’ undeclared (first use in this function)
      /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: (Each undeclared identifier is reported only once
      /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: for each function it appears in.)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a1e0eb10
  4. 19 9月, 2008 1 次提交
  5. 20 8月, 2008 2 次提交
  6. 28 7月, 2008 2 次提交
    • N
      powerpc: Show processor cache information in sysfs · 124c27d3
      Nathan Lynch 提交于
      Collect cache information from the OF device tree and display it in
      the cpu hierarchy in sysfs.  This is intended to be compatible at the
      userspace level with x86's implementation[1], hence some of the funny
      attribute names.  The arrangement of cache info is not immediately
      intuitive, but (again) it's for compatibility's sake.
      
      The cache attributes exposed are:
      
      type (Data, Instruction, or Unified)
      level (1, 2, 3...)
      size
      coherency_line_size
      number_of_sets
      ways_of_associativity
      
      All of these can be derived on platforms that follow the OF PowerPC
      Processor binding.  The code "publishes" only those attributes for
      which it is able to determine values; attributes for values which
      cannot be determined are not created at all.
      
      [1] arch/x86/kernel/cpu/intel_cacheinfo.c
      
      BenH: Turned some printk's into pr_debug, added better NULL checking
      in a couple of places.
      Signed-off-by: NNathan Lynch <ntl@pobox.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      124c27d3
    • N
      powerpc: register_cpu_online should be __cpuinit · 9ba1984e
      Nathan Lynch 提交于
      It is called only in cpu online paths.
      
      (caught by CONFIG_DEBUG_SECTION_MISMATCH=y)
      Signed-off-by: NNathan Lynch <ntl@pobox.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9ba1984e
  7. 25 7月, 2008 1 次提交
  8. 22 7月, 2008 1 次提交
    • A
      sysdev: Pass the attribute to the low level sysdev show/store function · 4a0b2b4d
      Andi Kleen 提交于
      This allow to dynamically generate attributes and share show/store
      functions between attributes. Right now most attributes are generated
      by special macros and lots of duplicated code. With the attribute
      passed it's instead possible to attach some data to the attribute
      and then use that in shared low level functions to do different things.
      
      I need this for the dynamically generated bank attributes in the x86
      machine check code, but it'll allow some further cleanups.
      
      I converted all users in tree to the new show/store prototype. It's a single
      huge patch to avoid unbisectable sections.
      
      Runtime tested: x86-32, x86-64
      Compiled only: ia64, powerpc
      Not compile tested/only grep converted: sh, arm, avr32
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a0b2b4d
  9. 29 1月, 2008 1 次提交
  10. 13 9月, 2007 2 次提交
  11. 10 7月, 2007 1 次提交
  12. 10 5月, 2007 1 次提交
    • R
      Add suspend-related notifications for CPU hotplug · 8bb78442
      Rafael J. Wysocki 提交于
      Since nonboot CPUs are now disabled after tasks and devices have been
      frozen and the CPU hotplug infrastructure is used for this purpose, we need
      special CPU hotplug notifications that will help the CPU-hotplug-aware
      subsystems distinguish normal CPU hotplug events from CPU hotplug events
      related to a system-wide suspend or resume operation in progress.  This
      patch introduces such notifications and causes them to be used during
      suspend and resume transitions.  It also changes all of the
      CPU-hotplug-aware subsystems to take these notifications into consideration
      (for now they are handled in the same way as the corresponding "normal"
      ones).
      
      [oleg@tv-sign.ru: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8bb78442
  13. 07 5月, 2007 1 次提交
  14. 24 4月, 2007 2 次提交
  15. 13 4月, 2007 1 次提交
  16. 07 2月, 2007 1 次提交
  17. 09 12月, 2006 2 次提交
  18. 07 12月, 2006 1 次提交
  19. 04 12月, 2006 1 次提交
  20. 25 10月, 2006 1 次提交
  21. 26 9月, 2006 1 次提交
    • A
      [POWERPC] Always call cede in pseries dedicated idle loop · 0ddd3e7d
      Anton Blanchard 提交于
      The smt_snooze_delay logic changed a bit when the idle loops were
      consolidated. A value of 0 used to mean we always polled, now it means
      we always sleep. Instead of restoring the old behaviour, lets put a
      reasonable default in smt_snooze_delay. This means we spin for a bit
      (in case an external interrupt comes in) and then sleep.
      
      Also the pseries dedicated idle loop currently does not cede both
      threads in an SMT pair. The hypervisor wants us to call in so it can
      power manage, so lets do that.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0ddd3e7d
  22. 07 8月, 2006 1 次提交
  23. 01 8月, 2006 1 次提交
  24. 31 7月, 2006 1 次提交
  25. 01 7月, 2006 1 次提交
  26. 28 6月, 2006 4 次提交
  27. 02 5月, 2006 1 次提交
  28. 26 4月, 2006 2 次提交
  29. 29 3月, 2006 1 次提交
  30. 28 3月, 2006 1 次提交
  31. 11 11月, 2005 1 次提交
    • B
      [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel · a7f290da
      Benjamin Herrenschmidt 提交于
      This patch moves the vdso's to arch/powerpc, adds support for the 32
      bits vdso to the 32 bits kernel, rename systemcfg (finally !), and adds
      some new (still untested) routines to both vdso's: clock_gettime() with
      support for CLOCK_REALTIME and CLOCK_MONOTONIC, clock_getres() (same
      clocks) and get_tbfreq() for glibc to retreive the timebase frequency.
      
      Tom,Steve: The implementation of get_tbfreq() I've done for 32 bits
      returns a long long (r3, r4) not a long. This is such that if we ever
      add support for >4Ghz timebases on ppc32, the userland interface won't
      have to change.
      
      I have tested gettimeofday() using some glibc patches in both ppc32 and
      ppc64 kernels using 32 bits userland (I haven't had a chance to test a
      64 bits userland yet, but the implementation didn't change and was
      tested earlier). I haven't tested yet the new functions.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a7f290da