1. 09 Sep, 2010 1 commit
  2. 30 Oct, 2009 1 commit
    • Alex Chiang's avatar
      Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files · 663fb2fc
      Alex Chiang authored
      Add brief descriptions for the following sysfs files:
      The descriptions in Documentation/cputopology.txt weren't very
      informative, so I attempted a better description based on code
      reading and hopeful guessing.
      Updated Documentation/cputopology.txt with the better descriptions and
      fixed some style issues.
      Cc: Mike Travis <travis@sgi.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAlex Chiang <achiang@hp.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
  3. 11 Jan, 2009 1 commit
  4. 19 Dec, 2008 1 commit
  5. 13 Jun, 2008 1 commit
    • Ben Hutchings's avatar
      cpu topology: always define CPU topology information · c50cbb05
      Ben Hutchings authored
      This can result in an empty topology directory in sysfs, and requires
      in-kernel users to protect all uses with #ifdef - see
      The documentation of CPU topology specifies what the defaults should be if
      only partial information is available from the hardware.  So we can
      provide these defaults as a fallback.
      This patch:
      - Adds default definitions of the 4 topology macros to <linux/topology.h>
      - Changes drivers/base/topology.c to use the topology macros unconditionally
        and to cope with definitions that aren't lvalues
      - Updates documentation accordingly
      [ From: Andrew Morton <akpm@linux-foundation.org>
        - fold now-duplicated code
        - fix layout
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Cc: Vegard Nossum <vegard.nossum@gmail.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Chandra Seetharaman <sekharan@us.ibm.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: John Hawkes <hawkes@sgi.com>
      Cc: Zhang, Yanmin <yanmin.zhang@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  6. 03 Oct, 2006 1 commit
  7. 28 Mar, 2006 1 commit
  8. 03 Feb, 2006 1 commit
    • Zhang, Yanmin's avatar
      [PATCH] Export cpu topology in sysfs · 69dcc991
      Zhang, Yanmin authored
      The patch implements cpu topology exportation by sysfs.
      Items (attributes) are similar to /proc/cpuinfo.
      1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
      	represent the physical package id of  cpu X;
      2) /sys/devices/system/cpu/cpuX/topology/core_id:
      	represent the cpu core id to cpu X;
      3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
      	represent the thread siblings to cpu X in the same core;
      4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
      	represent the thread siblings to cpu X in the same physical package;
      To implement it in an architecture-neutral way, a new source file,
      driver/base/topology.c, is to export the 5 attributes.
      If one architecture wants to support this feature, it just needs to
      implement 4 defines, typically in file include/asm-XXX/topology.h.
      The 4 defines are:
      #define topology_physical_package_id(cpu)
      #define topology_core_id(cpu)
      #define topology_thread_siblings(cpu)
      #define topology_core_siblings(cpu)
      The type of **_id is int.
      The type of siblings is cpumask_t.
      To be consistent on all architectures, the 4 attributes should have
      deafult values if their values are unavailable. Below is the rule.
      1) physical_package_id: If cpu has no physical package id, -1 is the
      default value.
      2) core_id: If cpu doesn't support multi-core, its core id is 0.
      3) thread_siblings: Just include itself, if the cpu doesn't support
      4) core_siblings: Just include itself, if the cpu doesn't support
      multi-core and HT/Multi-thread.
      So be careful when declaring the 4 defines in include/asm-XXX/topology.h.
      If an attribute isn't defined on an architecture, it won't be exported.
      Thank Nathan, Greg, Andi, Paul and Venki.
      The patch provides defines for i386/x86_64/ia64.
      Signed-off-by: default avatarZhang, Yanmin <yanmin.zhang@intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>