02 Oct, 2020

1 commit

  • Change additional instances that could use sysfs_emit and sysfs_emit_at
    that the coccinelle script could not convert.

    o macros creating show functions with ## concatenation
    o unbound sprintf uses with buf+len for start of output to sysfs_emit_at
    o returns with ?: tests and sprintf to sysfs_emit
    o sysfs output with struct class * not struct device * arguments

    Miscellanea:

    o remove unnecessary initializations around these changes
    o consistently use int len for return length of show functions
    o use octal permissions and not S_
    o rename a few show function names so DEVICE_ATTR_ can be used
    o use DEVICE_ATTR_ADMIN_RO where appropriate
    o consistently use const char *output for strings
    o checkpatch/style neatening

    Signed-off-by: Joe Perches
    Link: https://lore.kernel.org/r/8bc24444fe2049a9b2de6127389b57edfdfe324d.1600285923.git.joe@perches.com
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     

10 Jul, 2020

1 commit


23 May, 2019

3 commits

  • Create CPU topology sysfs attributes: "core_cpus" and "core_cpus_list"

    These attributes represent all of the logical CPUs that share the
    same core.

    These attriutes is synonymous with the existing "thread_siblings" and
    "thread_siblings_list" attribute, which will be deprecated.

    Create CPU topology sysfs attributes: "die_cpus" and "die_cpus_list".
    These attributes represent all of the logical CPUs that share the
    same die.

    Suggested-by: Brice Goglin
    Signed-off-by: Len Brown
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Ingo Molnar
    Acked-by: Peter Zijlstra (Intel)
    Link: https://lkml.kernel.org/r/071c23a298cd27ede6ed0b6460cae190d193364f.1557769318.git.len.brown@intel.com

    Len Brown
     
  • The existing sysfs cpu/topology/core_siblings (and core_siblings_list)
    attributes are documented, implemented, and used by programs to represent
    set of logical CPUs sharing the same package.

    This makes sense if the next topology level above a core is always a
    package. But on systems where there is a die topology level between a core
    and a package, the name and its definition become inconsistent.

    So without changing its function, add a name for this map that describes
    what it actually is -- package CPUs -- the set of CPUs that share the same
    package.

    This new name will be immune to changes in topology, since it describes
    threads at the current level, not siblings at a contained level.

    Suggested-by: Brice Goglin
    Signed-off-by: Len Brown
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Ingo Molnar
    Acked-by: Peter Zijlstra (Intel)
    Link: https://lkml.kernel.org/r/d9d3228b82fb5665e6f93a0ccd033fe022558521.1557769318.git.len.brown@intel.com

    Len Brown
     
  • Export die_id in cpu topology, for the benefit of hardware that has
    multiple-die/package.

    Signed-off-by: Len Brown
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Ingo Molnar
    Acked-by: Peter Zijlstra (Intel)
    Cc: linux-doc@vger.kernel.org
    Link: https://lkml.kernel.org/r/e7d1caaf4fbd24ee40db6d557ab28d7d83298900.1557769318.git.len.brown@intel.com

    Len Brown
     

08 Dec, 2017

2 commits

  • Now that the SPDX tag is in all driver core files, that identifies the
    license in a specific and legally-defined manner. So the extra GPL text
    wording can be removed as it is no longer needed at all.

    This is done on a quest to remove the 700+ different ways that files in
    the kernel describe the GPL license text. And there's unneeded stuff
    like the address (sometimes incorrect) for the FSF which is never
    needed.

    No copyright headers or other non-license-description text was removed.

    Cc: Johannes Berg
    Cc: "Luis R. Rodriguez"
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • It's good to have SPDX identifiers in all files to make it easier to
    audit the kernel tree for correct licenses.

    Update the driver core files files with the correct SPDX license
    identifier based on the license text in the file itself. The SPDX
    identifier is a legally binding shorthand, which can be used instead of
    the full boiler plate text.

    This work is based on a script and data from Thomas Gleixner, Philippe
    Ombredanne, and Kate Stewart.

    Cc: Johannes Berg
    Cc: "Luis R. Rodriguez"
    Cc: William Breathitt Gray
    Cc: Thomas Gleixner
    Cc: Kate Stewart
    Cc: Philippe Ombredanne
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

28 Aug, 2017

1 commit


10 Nov, 2016

1 commit


13 Jun, 2016

1 commit

  • The s390 cpu topology gained another hierarchy level. The top level is
    now called drawer and contains several books. A book used to be the
    top level.

    In order to expose the cpu topology to user space allow to create new
    sysfs attributes dependent on CONFIG_SCHED_DRAWER which an
    architecture may define and select.

    These additional attributes will be available:

    /sys/devices/system/cpu/cpuX/topology/drawer_id
    /sys/devices/system/cpu/cpuX/topology/drawer_siblings
    /sys/devices/system/cpu/cpuX/topology/drawer_siblings_list

    Signed-off-by: Heiko Carstens
    Acked-by: Peter Zijlstra (Intel)
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

27 May, 2015

1 commit

  • Rename topology_thread_cpumask() to topology_sibling_cpumask()
    for more consistency with scheduler code.

    Signed-off-by: Bartosz Golaszewski
    Reviewed-by: Thomas Gleixner
    Acked-by: Russell King
    Acked-by: Catalin Marinas
    Cc: Benoit Cousson
    Cc: Fenghua Yu
    Cc: Guenter Roeck
    Cc: Jean Delvare
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Oleg Drokin
    Cc: Peter Zijlstra
    Cc: Rafael J. Wysocki
    Cc: Russell King
    Cc: Viresh Kumar
    Link: http://lkml.kernel.org/r/1432645896-12588-2-git-send-email-bgolaszewski@baylibre.com
    Signed-off-by: Ingo Molnar

    Bartosz Golaszewski
     

08 Nov, 2014

2 commits

  • Currently couple of custom macros are defined to declare the
    device attributes. However there are already standard macros
    defined in device.h that suffice the need and these custom
    macros can be removed.

    This patch replaces custom attribute macros with standard
    DEVICE_ATTR_RO attribute

    Signed-off-by: Sudeep Holla
    Cc: Greg Kroah-Hartman
    Signed-off-by: Greg Kroah-Hartman

    Sudeep Holla
     
  • Many sysfs *_show function use cpu{list,mask}_scnprintf to copy cpumap
    to the buffer aligned to PAGE_SIZE, append '\n' and '\0' to return null
    terminated buffer with newline.

    This patch creates a new helper function cpumap_print_to_pagebuf in
    cpumask.h using newly added bitmap_print_to_pagebuf and consolidates
    most of those sysfs functions using the new helper function.

    Signed-off-by: Sudeep Holla
    Suggested-by: Stephen Boyd
    Tested-by: Stephen Boyd
    Acked-by: "Rafael J. Wysocki"
    Acked-by: Bjorn Helgaas
    Acked-by: Peter Zijlstra (Intel)
    Cc: Greg Kroah-Hartman
    Cc: x86@kernel.org
    Cc: linux-acpi@vger.kernel.org
    Cc: linux-pci@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Sudeep Holla
     

17 Apr, 2014

1 commit

  • The topology_##name() macro does not use its argument when CONFIG_SMP is not
    set, as it ultimately calls the cpu_data() macro.

    So we avoid maintaining a possibly unused `cpu' variable, to avoid the
    following compilation warning:

    drivers/base/topology.c: In function ‘show_physical_package_id’:
    drivers/base/topology.c:103:118: warning: unused variable ‘cpu’ [-Wunused-variable]
    define_id_show_func(physical_package_id);

    drivers/base/topology.c: In function ‘show_core_id’:
    drivers/base/topology.c:106:106: warning: unused variable ‘cpu’ [-Wunused-variable]
    define_id_show_func(core_id);

    This can be seen with e.g. x86 defconfig and CONFIG_SMP not set.

    Signed-off-by: Vincent Stehlé
    Cc: Greg Kroah-Hartman
    Cc: # 3.10.x
    Cc: # 3.13.x
    Cc: # 3.14.x
    Signed-off-by: Greg Kroah-Hartman

    Vincent Stehlé
     

08 Apr, 2014

1 commit

  • Pull CPU hotplug notifiers registration fixes from Rafael Wysocki:
    "The purpose of this single series of commits from Srivatsa S Bhat
    (with a small piece from Gautham R Shenoy) touching multiple
    subsystems that use CPU hotplug notifiers is to provide a way to
    register them that will not lead to deadlocks with CPU online/offline
    operations as described in the changelog of commit 93ae4f978ca7f ("CPU
    hotplug: Provide lockless versions of callback registration
    functions").

    The first three commits in the series introduce the API and document
    it and the rest simply goes through the users of CPU hotplug notifiers
    and converts them to using the new method"

    * tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits)
    net/iucv/iucv.c: Fix CPU hotplug callback registration
    net/core/flow.c: Fix CPU hotplug callback registration
    mm, zswap: Fix CPU hotplug callback registration
    mm, vmstat: Fix CPU hotplug callback registration
    profile: Fix CPU hotplug callback registration
    trace, ring-buffer: Fix CPU hotplug callback registration
    xen, balloon: Fix CPU hotplug callback registration
    hwmon, via-cputemp: Fix CPU hotplug callback registration
    hwmon, coretemp: Fix CPU hotplug callback registration
    thermal, x86-pkg-temp: Fix CPU hotplug callback registration
    octeon, watchdog: Fix CPU hotplug callback registration
    oprofile, nmi-timer: Fix CPU hotplug callback registration
    intel-idle: Fix CPU hotplug callback registration
    clocksource, dummy-timer: Fix CPU hotplug callback registration
    drivers/base/topology.c: Fix CPU hotplug callback registration
    acpi-cpufreq: Fix CPU hotplug callback registration
    zsmalloc: Fix CPU hotplug callback registration
    scsi, fcoe: Fix CPU hotplug callback registration
    scsi, bnx2fc: Fix CPU hotplug callback registration
    scsi, bnx2i: Fix CPU hotplug callback registration
    ...

    Linus Torvalds
     

20 Mar, 2014

1 commit

  • Subsystems that want to register CPU hotplug callbacks, as well as perform
    initialization for the CPUs that are already online, often do it as shown
    below:

    get_online_cpus();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    register_cpu_notifier(&foobar_cpu_notifier);

    put_online_cpus();

    This is wrong, since it is prone to ABBA deadlocks involving the
    cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
    with CPU hotplug operations).

    Instead, the correct and race-free way of performing the callback
    registration is:

    cpu_notifier_register_begin();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    /* Note the use of the double underscored version of the API */
    __register_cpu_notifier(&foobar_cpu_notifier);

    cpu_notifier_register_done();

    Fix the topology code by using this latter form of callback registration.

    Cc: Ingo Molnar
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     

15 Feb, 2014

1 commit

  • None of these files are actually using any __init type directives
    and hence don't need to include . Most are just a
    left over from __devinit and __cpuinit removal, or simply due to
    code getting copied from one driver to the next.

    Cc: Len Brown
    Signed-off-by: Paul Gortmaker
    Acked-by: Pavel Machek
    Acked-by: Rafael J. Wysocki
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Paul Gortmaker
     

30 Jul, 2013

1 commit

  • arch_provides_topology_pointers was introduced in commit 23ca4bba3 (x86:
    cleanup early per cpu variables/accesses v4) to indicate pointers to the
    topology cpumask_t maps are valid to avoid copying data on to/off of the
    stack.

    But later in commit fbd59a8d (cpumask: Use topology_core_cpumask()/
    topology_thread_cpumask()), the pointers to the topology struct cpumask maps
    are always valid.

    After that commit, the only difference is that there is a redundant
    "unsigned int cpu = dev->id;" if arch_provides_topology_pointers defined, but
    dev->id is type 'u32' which devolves to 'unsigned int' on all supported arches.
    So this arch_provides_topology_pointers define is pointless and only cause
    obfuscation now, remove it.

    Tested on x86 machine, topology information in sys/devices/system/cpu/
    cpuX/topology/ is the same after appling this patch set.

    Signed-off-by: Hanjun Guo
    Signed-off-by: Greg Kroah-Hartman

    Hanjun Guo
     

15 Jul, 2013

1 commit

  • The __cpuinit type of throwaway sections might have made sense
    some time ago when RAM was more constrained, but now the savings
    do not offset the cost and complications. For example, the fix in
    commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
    is a good example of the nasty type of bugs that can be created
    with improper use of the various __init prefixes.

    After a discussion on LKML[1] it was decided that cpuinit should go
    the way of devinit and be phased out. Once all the users are gone,
    we can then finally remove the macros themselves from linux/init.h.

    This removes all the remaining one-off uses of the __cpuinit macros
    from all C files in the drivers/* directory.

    [1] https://lkml.org/lkml/2013/5/20/589

    Cc: Greg Kroah-Hartman
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

22 Dec, 2011

1 commit

  • This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Userspace relies on events and generic sysfs subsystem infrastructure
    from sysdev devices, which are made available with this conversion.

    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: Tigran Aivazian
    Cc: Len Brown
    Cc: Zhang Rui
    Cc: Dave Jones
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Andrew Morton
    Cc: Arjan van de Ven
    Cc: "Rafael J. Wysocki"
    Cc: "Srivatsa S. Bhat"
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

10 Sep, 2010

1 commit

  • Create attributes:

    /sys/devices/system/cpu/cpuX/topology/book_id
    /sys/devices/system/cpu/cpuX/topology/book_siblings

    which show the book id and the book siblings of a cpu.

    Unlike the attributes for SMT and MC these attributes are only present if
    CONFIG_SCHED_BOOK is set. There is no reason to pollute sysfs for every
    architecture with unused attributes.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Heiko Carstens
     

28 May, 2010

1 commit


12 Jan, 2009

1 commit


08 Jan, 2009

1 commit

  • Due to changeset ba84be2338d3a2b6020d39279335bb06fcd332e1 ("remove
    linux/hardirq.h from asm-generic/local.h") the sparc64 build started
    failing on drivers/base/topology.c:

    drivers/base/topology.c: In function ‘show_physical_package_id’:
    drivers/base/topology.c:103: error: implicit declaration of function ‘cpu_data’
    drivers/base/topology.c:103: error: request for member ‘proc_id’ in something not a structure or union
    drivers/base/topology.c: In function ‘show_core_id’:
    drivers/base/topology.c:106: error: request for member ‘core_id’ in something not a structure or union

    Adding the obvious fix of including asm/cpudata.h into asm/topology.h on
    sparc64 doesn't fix it, in fact it makes things worse because of the
    header file dependency chain:

    linux/gfp.h --> linux/mmzone.h --> linux/topology.h -->
    asm/topology.h --> asm/cpudata.h --> linux/percpu.h -->
    linux/slab.h

    which results in:

    include/linux/slub_def.h: In function ‘kmalloc_large’:
    include/linux/slub_def.h:209: error: implicit declaration of function ‘__get_free_pages’
    include/linux/slub_def.h:209: error: ‘__GFP_COMP’ undeclared (first use in this function)
    include/linux/slub_def.h:209: error: (Each undeclared identifier is reported only once
    include/linux/slub_def.h:209: error: for each function it appears in.)
    include/linux/slub_def.h:209: warning: cast to pointer from integer of different size

    The simplest thing to do is to add yet another one-off hack like parts
    of the guilty changeset did, by putting an explicit linux/hardirq.h
    include into drivers/base/topology.c

    Signed-off-by: David S. Miller
    Signed-off-by: Linus Torvalds

    David Miller
     

13 Dec, 2008

1 commit

  • …t_scnprintf to take pointers.

    Impact: change calling convention of existing cpumask APIs

    Most cpumask functions started with cpus_: these have been replaced by
    cpumask_ ones which take struct cpumask pointers as expected.

    These four functions don't have good replacement names; fortunately
    they're rarely used, so we just change them over.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Mike Travis <travis@sgi.com>
    Acked-by: Ingo Molnar <mingo@elte.hu>
    Cc: paulus@samba.org
    Cc: mingo@redhat.com
    Cc: tony.luck@intel.com
    Cc: ralf@linux-mips.org
    Cc: Greg Kroah-Hartman <gregkh@suse.de>
    Cc: cl@linux-foundation.org
    Cc: srostedt@redhat.com

    Rusty Russell
     

22 Jul, 2008

1 commit

  • 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: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     

16 Jul, 2008

1 commit


08 Jul, 2008

1 commit

  • * Introduce a new PER_CPU macro called "EARLY_PER_CPU". This is
    used by some per_cpu variables that are initialized and accessed
    before there are per_cpu areas allocated.

    ["Early" in respect to per_cpu variables is "earlier than the per_cpu
    areas have been setup".]

    This patchset adds these new macros:

    DEFINE_EARLY_PER_CPU(_type, _name, _initvalue)
    EXPORT_EARLY_PER_CPU_SYMBOL(_name)
    DECLARE_EARLY_PER_CPU(_type, _name)

    early_per_cpu_ptr(_name)
    early_per_cpu_map(_name, _idx)
    early_per_cpu(_name, _cpu)

    The DEFINE macro defines the per_cpu variable as well as the early
    map and pointer. It also initializes the per_cpu variable and map
    elements to "_initvalue". The early_* macros provide access to
    the initial map (usually setup during system init) and the early
    pointer. This pointer is initialized to point to the early map
    but is then NULL'ed when the actual per_cpu areas are setup. After
    that the per_cpu variable is the correct access to the variable.

    The early_per_cpu() macro is not very efficient but does show how to
    access the variable if you have a function that can be called both
    "early" and "late". It tests the early ptr to be NULL, and if not
    then it's still valid. Otherwise, the per_cpu variable is used
    instead:

    #define early_per_cpu(_name, _cpu) \
    (early_per_cpu_ptr(_name) ? \
    early_per_cpu_ptr(_name)[_cpu] : \
    per_cpu(_name, _cpu))

    A better method is to actually check the pointer manually. In the
    case below, numa_set_node can be called both "early" and "late":

    void __cpuinit numa_set_node(int cpu, int node)
    {
    int *cpu_to_node_map = early_per_cpu_ptr(x86_cpu_to_node_map);

    if (cpu_to_node_map)
    cpu_to_node_map[cpu] = node;
    else
    per_cpu(x86_cpu_to_node_map, cpu) = node;
    }

    * Add a flag "arch_provides_topology_pointers" that indicates pointers
    to topology cpumask_t maps are available. Otherwise, use the function
    returning the cpumask_t value. This is useful if cpumask_t set size
    is very large to avoid copying data on to/off of the stack.

    * The coverage of CONFIG_DEBUG_PER_CPU_MAPS has been increased while
    the non-debug case has been optimized a bit.

    * Remove an unreferenced compiler warning in drivers/base/topology.c

    * Clean up #ifdef in setup.c

    For inclusion into sched-devel/latest tree.

    Based on:
    git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    + sched-devel/latest .../mingo/linux-2.6-sched-devel.git

    Signed-off-by: Mike Travis
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Mike Travis
     

13 Jun, 2008

2 commits

  • simplify drivers/base/topology.c a bit.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Ingo Molnar

    Ben Hutchings
     
  • 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
    - 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
    - fold now-duplicated code
    - fix layout
    ]

    Signed-off-by: Ben Hutchings
    Cc: Vegard Nossum
    Cc: Nick Piggin
    Cc: Chandra Seetharaman
    Cc: Suresh Siddha
    Cc: Mike Travis
    Cc: Christoph Lameter
    Cc: John Hawkes
    Cc: Zhang, Yanmin
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Ben Hutchings
     

20 Apr, 2008

1 commit

  • * Cleaned up references to cpumask_scnprintf() and added new
    cpulist_scnprintf() interfaces where appropriate.

    * Fix some small bugs (or code efficiency improvments) for various uses
    of cpumask_scnprintf.

    * Clean up some checkpatch errors.

    Signed-off-by: Mike Travis
    Signed-off-by: Ingo Molnar

    Mike Travis
     

19 Oct, 2007

1 commit

  • By previous cpu hotplug notifier change, we don't need to track topology_dev
    existence for each cpu by topology_dev_map.

    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Akinobu Mita
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

10 May, 2007

1 commit

  • 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: Rafael J. Wysocki
    Cc: Gautham R Shenoy
    Cc: Pavel Machek
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

08 Dec, 2006

1 commit

  • There was lots of #ifdef noise in the kernel due to hotcpu_notifier(fn,
    prio) not correctly marking 'fn' as used in the !HOTPLUG_CPU case, and thus
    generating compiler warnings of unused symbols, hence forcing people to add
    #ifdefs.

    the compiler can skip truly unused functions just fine:

    text data bss dec hex filename
    1624412 728710 3674856 6027978 5bfaca vmlinux.before
    1624412 728710 3674856 6027978 5bfaca vmlinux.after

    [akpm@osdl.org: topology.c fix]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

02 Dec, 2006

1 commit

  • Take return value of sysfs_create_group() into account. That function got
    called in case of CPU_ONLINE notification. Since callbacks are not allowed
    to fail on CPU_ONLINE notification do the sysfs group creation on
    CPU_UP_PREPARE notification.

    Also remember if creation succeeded in a bitmask. So it's possible to know
    whether it's legal to call sysfs_remove_group or not.

    In addition some other minor stuff:

    - since CPU_UP_PREPARE might fail add CPU_UP_CANCELED handling as well.
    - use hotcpu_notifier instead of register_hotcpu_notifier.
    - #ifdef code that isn't needed in the !CONFIG_HOTPLUG_CPU case.

    Signed-off-by: Heiko Carstens
    Acked-by: Cornelia Huck
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Heiko Carstens
     

19 Oct, 2006

1 commit


01 Aug, 2006

1 commit


28 Jun, 2006

2 commits

  • Make notifier_blocks associated with cpu_notifier as __cpuinitdata.

    __cpuinitdata makes sure that the data is init time only unless
    CONFIG_HOTPLUG_CPU is defined.

    Signed-off-by: Chandra Seetharaman
    Cc: Ashok Raj
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     
  • In 2.6.17, there was a problem with cpu_notifiers and XFS. I provided a
    band-aid solution to solve that problem. In the process, i undid all the
    changes you both were making to ensure that these notifiers were available
    only at init time (unless CONFIG_HOTPLUG_CPU is defined).

    We deferred the real fix to 2.6.18. Here is a set of patches that fixes the
    XFS problem cleanly and makes the cpu notifiers available only at init time
    (unless CONFIG_HOTPLUG_CPU is defined).

    If CONFIG_HOTPLUG_CPU is defined then cpu notifiers are available at run
    time.

    This patch reverts the notifier_call changes made in 2.6.17

    Signed-off-by: Chandra Seetharaman
    Cc: Ashok Raj
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     

26 Apr, 2006

1 commit