13 Oct, 2007

2 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (75 commits)
    PM: merge device power-management source files
    sysfs: add copyrights
    kobject: update the copyrights
    kset: add some kerneldoc to help describe what these strange things are
    Driver core: rename ktype_edd and ktype_efivar
    Driver core: rename ktype_driver
    Driver core: rename ktype_device
    Driver core: rename ktype_class
    driver core: remove subsystem_init()
    sysfs: move sysfs file poll implementation to sysfs_open_dirent
    sysfs: implement sysfs_open_dirent
    sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir
    sysfs: make sysfs_root a regular directory dirent
    sysfs: open code sysfs_attach_dentry()
    sysfs: make s_elem an anonymous union
    sysfs: make bin attr open get active reference of parent too
    sysfs: kill unnecessary NULL pointer check in sysfs_release()
    sysfs: kill unnecessary sysfs_get() in open paths
    sysfs: reposition sysfs_dirent->s_mode.
    sysfs: kill sysfs_update_file()
    ...

    Linus Torvalds
     
  • A number of different drivers incorrect access the kobject name field
    directly. This is not correct as the name might not be in the array.
    Use the proper accessor function instead.

    Greg Kroah-Hartman
     

10 Oct, 2007

1 commit

  • I don't see any reason to take an expensive lock in cpufreq_quick_get()
    Reading policy->cur is a single atomic operation and after
    the lock is dropped again the state could change any time anyways.

    So don't take the lock in the first place.

    This also makes this function interrupt safe which is useful
    for some code of mine.

    Signed-off-by: Andi Kleen
    Cc: "Pallipadi, Venkatesh"
    Signed-off-by: Dave Jones

    Andi Kleen
     

05 Oct, 2007

5 commits

  • * Stop referencing the callback directly from the __init and __exit
    functions of this driver, and instead explicitly call
    cpufreq_update_policy() et al. This enables the callback function
    to be marked as __cpuinit (and the notifier_block __cpuinitdata),
    thereby saving space when HOTPLUG_CPU=n. This also enables us to
    use other tricks to replace __cpuinit{data} in future.

    * cpufreq_stats_free_table() is only called from __cpuinit or __exit
    marked functions, making it an ideal candidate for __cpuexit.

    * Fix missing space in the module description

    Signed-off-by: Satyam Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Satyam Sharma
     
  • The notifier_block is already __cpuinitdata, thereby allowing us to safely
    mark the callback function as __cpuinit also, thereby saving space when
    HOTPLUG_CPU=n.

    Signed-off-by: Satyam Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Satyam Sharma
     
  • Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Thomas Renninger
     
  • Depending on the transition latency of the HW for cpufreq switches, the
    ondemand or conservative governor cannot be used with certain cpufreq
    drivers. Still the ondemand should be the default governor on a wide range
    of systems. This patch allows this and lets the governor fallback to the
    performance governor at cpufreq driver load time, if the driver does not
    support fast enough frequency switching.

    Main benefit is that on e.g. installation or other systems without
    userspace support a working dynamic cpufreq support can be achieved on most
    systems by simply loading the cpufreq driver. This is especially essential
    for recent x86(_64) laptop hardware which may rely on working dynamic
    cpufreq OS support.

    Signed-off-by: Thomas Renninger
    Signed-off-by: Venkatesh Pallipadi
    Cc: Russell King
    Cc: Bryan Wu
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Thomas Renninger
     
  • Signed-off-by: Thomas Renninger
    Signed-off-by: Venkatesh Pallipadi
    Cc: Russell King
    Cc: Bryan Wu
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Thomas Renninger
     

13 Jul, 2007

3 commits

  • Negative side effect: needs NR_CPUs pointer array of memory in
    CONFIG_HOTPLUG_CPU case.

    Still needs userspace track keeping and rewriting of governors if governors
    change while a CPU is not active (always the governor at CPU remove time is
    restored).

    Move of policy->user_policy.governor assignment is just a minor cleanup.
    http://bugzilla.kernel.org/show_bug.cgi?id=8671

    Signed-off-by: Thomas Renninger
    Signed-off-by: Mattia Dongili
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Thomas Renninger
     
  • There is a frequency scaling issue that I encountered with the performance
    governor in combination with CPU hotplug.

    In cpufreq.c CPU frequency is reduced to its minimum before the CPU gets
    unregistered and set offline. Does that have a particular reason?

    Since the (k8-)governor does not monitor CPU frequency that setting also
    applies then to the remaining CPU as well and lets the system run on the
    lowest frequency although performance is chose as the policy.

    Signed-off-by: Peter Oruba
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Peter Oruba
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
    [CPUFREQ] Fix sysfs_create_file return value handling
    [CPUFREQ] ondemand: fix tickless accounting and software coordination bug
    [CPUFREQ] ondemand: add a check to avoid negative load calculation
    [CPUFREQ] Keep userspace governor quiet when it is not being used
    [CPUFREQ] Longhaul - Proper register access
    [CPUFREQ] Kconfig powernow-k8 driver should depend on ACPI P-States driver
    [CPUFREQ] Longhaul - Replace ACPI functions with direct I/O
    [CPUFREQ] Longhaul - Remove duplicate multipliers
    [CPUFREQ] Longhaul - Embedded "conservative"
    [CPUFREQ] acpi-cpufreq: Proper ReadModifyWrite of PERF_CTL MSR
    [CPUFREQ] check return value of sysfs_create_file
    [CPUFREQ] Longhaul - Check ACPI "BM DMA in progress" bit
    [CPUFREQ] Longhaul - Move old_ratio to correct place
    [CPUFREQ] Longhaul - VT8237 support
    [CPUFREQ] Longhaul - Use all kinds of support
    [CPUFREQ] powernow-k8: clarify number of cores.

    Linus Torvalds
     

12 Jul, 2007

1 commit

  • sysfs is now completely out of driver/module lifetime game. After
    deletion, a sysfs node doesn't access anything outside sysfs proper,
    so there's no reason to hold onto the attribute owners. Note that
    often the wrong modules were accounted for as owners leading to
    accessing removed modules.

    This patch kills now unnecessary attribute->owner. Note that with
    this change, userland holding a sysfs node does not prevent the
    backing module from being unloaded.

    For more info regarding lifetime rule cleanup, please read the
    following message.

    http://article.gmane.org/gmane.linux.kernel/510293

    (tweaked by Greg to not delete the field just yet, to make it easier to
    merge things properly.)

    Signed-off-by: Tejun Heo
    Cc: Cornelia Huck
    Cc: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     

22 Jun, 2007

4 commits

  • Commit 0a4b2ccc555fa2ca6873d60219047104e4805d45 in cpufreq.git
    eliminates the build warnings but does not pass on the error code of
    sysfs_create_file to the function calling cpufreq_add_dev. Instead some
    previous value of ret would be returned.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Dave Jones

    Tobias Klauser
     
  • With tickless kernel and software coordination os P-states, ondemand
    can look at wrong idle statistics. This can happen when ondemand sampling
    is happening on CPU 0 and due to software coordination sampling also looks at
    utilization of CPU 1. If CPU 1 is in tickless state at that moment, its idle
    statistics will not be uptodate and CPU 0 thinks CPU 1 is idle for less
    amount of time than it actually is.

    This can be resolved by looking at all the busy times of CPUs, which is
    accurate, even with tickless, and use that to determine idle time in a
    round about way (total time - busy time).

    Thanks to Arjan for originally reporting the ondemand bug on
    Lenovo T61.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Dave Jones

    Venki Pallipadi
     
  • Due to rounding and inexact jiffy accounting, idle_ticks can sometimes
    be higher than total_ticks. Make sure those cases are handled as
    zero load case.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Dave Jones

    Venki Pallipadi
     
  • Userspace governor registers a frequency change notifier at init time, even
    when no CPU is set to userspace governor. Make it register only when
    atleast one CPU is using userspace.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Dave Jones

    Venki Pallipadi
     

30 May, 2007

1 commit


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
     

09 May, 2007

1 commit

  • Add a new deferrable delayed work init. This can be used to schedule work
    that are 'unimportant' when CPU is idle and can be called later, when CPU
    eventually comes out of idle.

    Use this init in cpufreq ondemand governor.

    Signed-off-by: Venkatesh Pallipadi
    Cc: Dave Jones
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venki Pallipadi
     

27 Apr, 2007

3 commits

  • Adds proper lines to help output of kconfig so people can find the module names.
    Also fixed some broken leading spaces versus tabs.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Dave Jones

    Mike Frysinger
     
  • Remove deprecated /proc/acpi/processor/performance write support

    Writing to /proc/acpi/processor/xy/performance interferes with sysfs
    cpufreq interface. Also removes buggy cpufreq_set_policy exported symbol.

    Signed-off-by: Thomas Renninger
    Signed-off-by: Dave Jones

    Thomas Renninger
     
  • References:
    https://bugzilla.novell.com/show_bug.cgi?id=231107
    https://bugzilla.novell.com/show_bug.cgi?id=264077

    Fix limited cpufreq when booted on battery

    If booted on battery:
    cpufreq_set_policy (evil) is invoked which calls verify_within_limits.
    max_freq gets lowered and therefore users_policy.max, which
    is used to restore higher freqs via update_policy later is set to the
    already limited frequency -> you can never go up again, even BIOS
    allows higher freqs later.

    Signed-off-by: Thomas Renninger
    Signed-off-by: Dave Jones

    Thomas Renninger
     

27 Mar, 2007

1 commit

  • Ingo reported it on lkml in the thread
    "2.6.21-rc5: maxcpus=1 crash in cpufreq: kernel BUG at drivers/cpufreq/cpufreq.c:82!"

    This check added to remove_dev is symmetric to one in add_dev and handles
    callbacks for offline cpus cleanly.

    Signed-off-by: Venkatesh Pallipadi
    Acked-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Venki Pallipadi
     

27 Feb, 2007

2 commits


23 Feb, 2007

1 commit


21 Feb, 2007

1 commit


17 Feb, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
    [CPUFREQ] Longhaul - Redo Longhaul ver. 2
    [CPUFREQ] EPS - Correct 2nd brand test
    [CPUFREQ] Longhaul - Separate frequency and voltage transition
    [CPUFREQ] Longhaul - Models of Nehemiah
    [CPUFREQ] Whitespace fixup
    [CPUFREQ] Longhaul - Simplier minmult
    [CPUFREQ] CPU_FREQ_TABLE shouldn't be a def_tristate
    [CPUFREQ] ondemand governor use new cpufreq rwsem locking in work callback
    [CPUFREQ] ondemand governor restructure the work callback
    [CPUFREQ] Rewrite lock in cpufreq to eliminate cpufreq/hotplug related issues
    [CPUFREQ] Remove hotplug cpu crap
    [CPUFREQ] Enhanced PowerSaver driver
    [CPUFREQ] Longhaul - Add VT8235 support
    [CPUFREQ] Longhaul - Fix guess_fsb function
    [CPUFREQ] Longhaul - Remove duplicate tables
    [CPUFREQ] Longhaul - Introduce Nehemiah C
    [CPUFREQ] fix cpuinfo_cur_freq for CPU_HW_PSTATE
    [CPUFREQ] Longhaul - Remove "ignore_latency" option

    Linus Torvalds
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

11 Feb, 2007

6 commits

  • Signed-off-by: Dave Jones

    Dave Jones
     
  • CPU_FREQ_TABLE enables helper code and gets select'ed when it's required.

    Building it as a module when it's not required doesn't seem to make much sense.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Adrian Bunk
     
  • Eliminate flush_workqueue in cpufreq_governor(STOP) callpath. Using flush
    there has a deadlock potential as in

    http://uwsg.iu.edu/hypermail/linux/kernel/0611.3/1223.html

    Also, cleanup the locking issues with do_dbs_timer delayed_work callback. As
    it changes the CPU frequency using __cpufreq_target, it needs to have
    policy_rwsem in write mode, which also protects it from hot plug.

    Signed-off-by: Venkatesh Pallipadi
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Venkatesh Pallipadi
     
  • Restructure the delayed_work callback in ondemand.

    This eliminates the need for smp_processor_id in the callback function and
    also helps in proper locking and avoiding flush_workqueue when stopping the
    governor (done in subsequent patch).

    Signed-off-by: Venkatesh Pallipadi
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Venkatesh Pallipadi
     
  • Yet another attempt to resolve cpufreq and hotplug locking issues.

    Patchset has 3 patches:
    * Rewrite the lock infrastructure of cpufreq using a per cpu rwsem.
    * Minor restructuring of work callback in ondemand driver.
    * Use the new cpufreq rwsem infrastructure in ondemand work.

    This patch:

    Convert policy->lock to rwsem and move it to per_cpu area.
    This rwsem will protect against both changing/accessing policy
    related parameters and CPU hot plug/unplug.

    [malattia@linux.it: fix oops in kref_put()]
    Cc: Gautham R Shenoy
    Signed-off-by: Venkatesh Pallipadi
    Cc: Gautham R Shenoy
    Signed-off-by: Mattia Dongili
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Venkatesh Pallipadi
     
  • The hotplug CPU locking in cpufreq is horrendous. No-one seems to care
    enough to fix it, so just remove it so that the 99.9% of the real world
    users of this code can use cpufreq without being bothered by warnings.

    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Dave Jones
     

29 Jan, 2007

1 commit


23 Dec, 2006

1 commit

  • Fixes the oops in cpufreq_stats with acpi_cpufreq driver. The issue was
    that the frequency was reported as 0 in acpi-cpufreq.c. The bug is due to
    different indicies for freq_table and ACPI perf table.

    Also adds a check in cpufreq_stats to check for error return from
    freq_table_get_index() and avoid using the error return value.

    Patch fixes the issue reported at
    http://www.ussg.iu.edu/hypermail/linux/kernel/0611.2/0629.html
    and also other similar issue here
    http://bugme.osdl.org/show_bug.cgi?id=7383 comment 53

    Signed-off-by: Dhaval Giani
    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Venkatesh Pallipadi
     

13 Dec, 2006

2 commits


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