02 May, 2012

1 commit

  • CPU core ID is used to index the core_data[] array. The core ID is, however, not
    sequential; 10-core CPUS can have a core ID as high as 25. Increase the limit to
    32 to be able to deal with current CPUs.

    Signed-off-by: Guenter Roeck
    Cc: stable@vger.kernel.org # 3.0+
    Acked-by: Jean Delvare
    Acked-by: Durgadoss R

    Guenter Roeck
     

01 May, 2012

1 commit

  • coretemp tries to access core_data array beyond bounds on cpu unplug if
    core id of the cpu if more than NUM_REAL_CORES-1.

    BUG: unable to handle kernel NULL pointer dereference at 000000000000013c
    IP: [] coretemp_cpu_callback+0x93/0x1ba [coretemp]
    PGD 673e5a067 PUD 66e9b3067 PMD 0
    Oops: 0000 [#1] SMP
    CPU 79
    Modules linked in: sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf bnep bluetooth rfkill ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter nf_conntrack_ipv4 nf_defrag_ipv4 ip6_tables xt_state nf_conntrack coretemp crc32c_intel asix tpm_tis pcspkr usbnet iTCO_wdt i2c_i801 microcode mii joydev tpm i2c_core iTCO_vendor_support tpm_bios i7core_edac igb ioatdma edac_core dca megaraid_sas [last unloaded: oprofile]

    Pid: 3315, comm: set-cpus Tainted: G W 3.4.0-rc5+ #2 QCI QSSC-S4R/QSSC-S4R
    RIP: 0010:[] [] coretemp_cpu_callback+0x93/0x1ba [coretemp]
    RSP: 0018:ffff880472fb3d48 EFLAGS: 00010246
    RAX: 0000000000000124 RBX: 0000000000000034 RCX: 00000000ffffffff
    RDX: 0000000000000000 RSI: 0000000000000046 RDI: 0000000000000246
    RBP: ffff880472fb3d88 R08: ffff88077fcd36c0 R09: 0000000000000001
    R10: ffffffff8184bc48 R11: 0000000000000000 R12: ffff880273095800
    R13: 0000000000000013 R14: ffff8802730a1810 R15: 0000000000000000
    FS: 00007f694a20f720(0000) GS:ffff88077fcc0000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 000000000000013c CR3: 000000067209b000 CR4: 00000000000007e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process set-cpus (pid: 3315, threadinfo ffff880472fb2000, task ffff880471fa0000)
    Stack:
    ffff880277b4c308 0000000000000003 ffff880472fb3d88 0000000000000005
    0000000000000034 00000000ffffffd1 ffffffff81cadc70 ffff880472fb3e14
    ffff880472fb3dc8 ffffffff8161f48d ffff880471fa0000 0000000000000034
    Call Trace:
    [] notifier_call_chain+0x4d/0x70
    [] __raw_notifier_call_chain+0xe/0x10
    [] __cpu_notify+0x20/0x40
    [] _cpu_down+0x81/0x270
    [] cpu_down+0x37/0x50
    [] store_online+0x63/0xc0
    [] dev_attr_store+0x18/0x30
    [] sysfs_write_file+0xef/0x170
    [] vfs_write+0xb3/0x180
    [] sys_write+0x4a/0x90
    [] system_call_fastpath+0x16/0x1b
    Code: 48 c7 c7 94 60 01 a0 44 0f b7 ac 10 ac 00 00 00 31 c0 e8 41 b7 5f e1 41 83 c5 02 49 63 c5 49 8b 44 c4 10 48 85 c0 74 56 45 31 ff 58 18 75 4e eb 1f 49 63 d7 4c 89 f7 48 89 45 c8 48 6b d2 28
    RIP [] coretemp_cpu_callback+0x93/0x1ba [coretemp]
    RSP
    CR2: 000000000000013c

    Signed-off-by: Kirill A. Shutemov
    Cc: stable@vger.kernel.org # 3.0+
    Signed-off-by: Guenter Roeck

    Kirill A. Shutemov
     

26 Apr, 2012

1 commit

  • pci_match_id() takes an *array* of IDs which must be properly zero-
    terminated.

    Reported-by: Ben Hutchings
    Cc: stable@vger.kernel.org # 3.0+: 00250ec hwmon: fam15h_power: fix bogus values
    Cc: stable@vger.kernel.org # 3.0+
    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare

    Guenter Roeck
     

23 Apr, 2012

1 commit

  • The following build warning is seen in some configurations.

    drivers/hwmon/ad7314.c: In function 'ad7314_show_temperature':
    drivers/hwmon/ad7314.c:70: warning: 'data' may be used uninitialized in this function

    Fix by overloading the return value from ad7314_spi_read with both data and
    error code (the returned data is really u16 and needs to be converted into a
    signed value anyway).

    Signed-off-by: Guenter Roeck
    Cc: Jonathan Cameron
    Acked-by: Jean Delvare

    Guenter Roeck
     

19 Apr, 2012

2 commits

  • The following build warning is seen in some configurations.

    drivers/hwmon/ads1015.c: In function 'show_in':
    drivers/hwmon/ads1015.c:129: warning: 'in' may be used uninitialized in this function

    Fix by separating the register read function from the code converting the result
    into mV.

    Signed-off-by: Guenter Roeck
    Cc: Dirk Eibach
    Reviewed-by: Robert Coulson

    Guenter Roeck
     
  • Newer BKDG[1] versions recommend a different initialization value for
    the running average range register in the northbridge. This improves
    the power reading by avoiding counter saturations resulting in bogus
    values for anything below about 80% of TDP power consumption.
    Updated BIOSes will have this new value set up from the beginning,
    but meanwhile we correct this value ourselves.
    This needs to be done on all northbridges, even on those where the
    driver itself does not register at.

    This fixes the driver on all current machines to provide proper
    values for idle load.

    [1]
    http://support.amd.com/us/Processor_TechDocs/42301_15h_Mod_00h-0Fh_BKDG.pdf
    Chapter 3.8: D18F5xE0 Processor TDP Running Average (p. 452)

    Signed-off-by: Andre Przywara
    Acked-by: Jean Delvare
    [guenter.roeck@ericsson.com: Removed unnecessary return statement]
    Signed-off-by: Guenter Roeck
    Cc: stable@vger.kernel.org # 3.0+

    Andre Przywara
     

10 Apr, 2012

4 commits

  • Some configurations produce the following compiler warning:

    drivers/hwmon/pmbus/pmbus_core.c: In function 'pmbus_show_boolean':
    drivers/hwmon/pmbus/pmbus_core.c:752: warning: 'val' may be used uninitialized in this function

    While this is a false positive, it can easily be fixed by overloading the return
    value from pmbus_get_boolean with both val and error return code (val is a
    boolean and thus never negative).

    Signed-off-by: Guenter Roeck
    Reviewed-by: Robert Coulson

    Guenter Roeck
     
  • Some configurations produce the following compiler warning:

    drivers/hwmon/smsc47m1.c: In function 'sm_smsc47m1_init':
    drivers/hwmon/smsc47m1.c:938: warning: 'address' may be used uninitialized in this function

    While this is a false positive, it can easily be fixed by overloading the return
    value from smsc47m1_find with both address and error return code (the address
    is an unsigned short and thus never negative). This also reduces module size by
    a few bytes (46 bytes for x86_64).

    Signed-off-by: Guenter Roeck
    Reviewed-by: Robert Coulson

    Guenter Roeck
     
  • In some configurations, BUG() does not result in an endless loop but returns
    to the caller. This results in the following compiler warning:

    drivers/hwmon/acpi_power_meter.c: In function 'show_str':
    drivers/hwmon/acpi_power_meter.c:380: warning: 'val' may be used uninitialized in this function

    Fix the warning by setting val to an empty string after BUG().

    Signed-off-by: Guenter Roeck
    Reviewed-by: Robert Coulson

    Guenter Roeck
     
  • Some configurations produce the following compiler warning:

    drivers/hwmon/smsc47b397.c: In function 'smsc47b397_init':
    drivers/hwmon/smsc47b397.c:385: warning: 'address' may be used uninitialized in this function

    While this is a false positive, it can easily be fixed by overloading the return
    value from smsc47b397_find with both address and error return code (the address
    is an unsigned short and thus never negative). This also reduces module size by
    a few bytes (64 bytes for x86_64).

    Cc: Mark M. Hoffman
    Signed-off-by: Guenter Roeck
    Reviewed-by: Robert Coulson
    Acked-by: Jean Delvare

    Guenter Roeck
     

04 Apr, 2012

1 commit

  • This driver was recently moved from IIO (where it worked) to hwmon (where
    it doesn't.) This breakage occured because the hwmon version neglected to
    correctly initialize a reference to spi_dev in its drvdata. The result is a
    segfault every time the temperature is queried.

    Signed-off-by: Graeme Smecher
    Cc: stable@vger.kernel.org # 3.2+
    Signed-off-by: Guenter Roeck

    Graeme Smecher
     

02 Apr, 2012

8 commits

  • The on-chip northbridge's temperature sensor of the upcoming
    AMD Trinity CPUs works the same as for the previous CPUs.
    Since it has a different PCI-ID, we just add the new one to the list
    supported by k10temp.
    This allows to use the k10temp driver on those CPUs.

    Signed-off-by: Andre Przywara
    Cc: stable@vger.kernel.org # 3.0+
    Signed-off-by: Guenter Roeck

    Andre Przywara
     
  • As long as there is no other non-const variable marked __initdata in the
    same compilation unit it doesn't hurt. If there were one however
    compilation would fail with

    error: $variablename causes a section type conflict

    because a section containing const variables is marked read only and so
    cannot contain non-const variables.

    Signed-off-by: Uwe Kleine-König
    Cc: Jean Delvare
    Cc: Guenter Roeck
    Cc: lm-sensors@lm-sensors.org
    Signed-off-by: Guenter Roeck

    Uwe Kleine-König
     
  • Similar to a30dcb4f which fixed asus_atk0110.ko, I recently received a
    bug report from someone hitting the same issue in acpi_power_meter.

    [ 13.963168] power_meter ACPI000D:00: Found ACPI power meter.
    [ 13.963900] BUG: key ffff8802161f3920 not in .data!
    [ 13.963904] ------------[ cut here ]------------
    [ 13.963915] WARNING: at kernel/lockdep.c:2986
    lockdep_init_map+0x52f/0x560()

    So let's fix that up for them by statically declaring the
    lockdep_class_key.

    Signed-off-by: Kyle McMartin
    Cc: stable@vger.kernel.org # 3.0+
    Signed-off-by: Guenter Roeck

    Kyle McMartin
     
  • Some configurations produce the following compile warning:

    drivers/hwmon/adm1031.c: In function 'set_fan_auto_channel':
    drivers/hwmon/adm1031.c:292: warning: 'reg' may be used uninitialized in this function

    While this is a false positive, it can easily be fixed by overloading the return
    value from get_fan_auto_nearest with both register value and error return code
    (the register value is never negative). Coincidentially, that also reduces
    module size by a few bytes.

    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare

    Guenter Roeck
     
  • In some configurations, BUG() does not result in an endless loop but returns to
    the caller. This results in the following compiler warning:

    drivers/hwmon/f75375s.c: In function 'duty_mode_enabled':
    drivers/hwmon/f75375s.c:280: warning: control reaches end of non-void function
    drivers/hwmon/f75375s.c: In function 'auto_mode_enabled':
    drivers/hwmon/f75375s.c:295: warning: control reaches end of non-void function

    Fix the warning by returning something sensible after BUG().

    Cc: Nikolaus Schulz
    Cc: Riku Voipio
    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • The I2C specific PM operations have been deprecated and printing a
    warning on boot for over a year now.

    Signed-off-by: Mark Brown
    [guenter.roeck@ericsson.com: Added missing #ifdef around pm functions]
    Cc: stable@vger.kernel.org # 3.0+
    Signed-off-by: Guenter Roeck

    Mark Brown
     
  • sht15 depends on GPIOLIB, not on GENERIC_GPIO.

    This fixes the following build error, seen if GPIOLIB is not defined:

    src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_direction_input': => 293:2
    src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_direction_output': => 216:2
    src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_free': => 1000:2
    src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_get_value': => 296:2
    src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_request': => 946:2
    src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_set_value': => 218:2
    src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_to_irq': => 514:2

    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare

    Guenter Roeck
     
  • gpio-fan depends on GPIOLIB, not on GENERIC_GPIO.

    This fixes the following build error, seen if GPIOLIB is not defined:

    src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_direction_output': => 372:3
    src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_free': => 130:2
    src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_get_value': => 79:2
    src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_request': => 98:2
    src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_set_value': => 156:3
    src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_to_irq': => 114:2

    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare
    Acked-by: Simon Guinot

    Guenter Roeck
     

29 Mar, 2012

1 commit

  • Pull MFD changes from Samuel Ortiz:
    - 4 new drivers: Freescale i.MX on-chip Anatop, Ricoh's RC5T583 and
    TI's TPS65090 and TPS65217.
    - New variants support (8420, 8520 ab9540), cleanups and bug fixes for
    the abx500 and db8500 ST-E chipsets.
    - Some minor fixes and update for the wm8994 from Mark.
    - The beginning of a long term TWL cleanup effort coming from the TI
    folks.
    - Various fixes and cleanups for the s5m, TPS659xx, pm860x, and MAX8997
    drivers.

    Fix up trivial conflicts due to duplicate patches and header file
    cleanups ( removal etc).

    * tag 'mfd_3.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (97 commits)
    gpio/twl: Add DT support to gpio-twl4030 driver
    gpio/twl: Allocate irq_desc dynamically for SPARSE_IRQ support
    mfd: Detach twl6040 from the pmic mfd driver
    mfd: Replace twl-* pr_ macros by the dev_ equivalent and do various cleanups
    mfd: Micro-optimization on twl4030 IRQ handler
    mfd: Make twl4030 SIH SPARSE_IRQ capable
    mfd: Move twl-core IRQ allocation into twl[4030|6030]-irq files
    mfd: Remove references already defineid in header file from twl-core
    mfd: Remove unneeded header from twl-core
    mfd: Make twl-core not depend on pdata->irq_base/end
    ARM: OMAP2+: board-omap4-*: Do not use anymore TWL6030_IRQ_BASE in board files
    mfd: Return twl6030_mmc_card_detect IRQ for board setup
    Revert "mfd: Add platform data for MAX8997 haptic driver"
    mfd: Add support for TPS65090
    mfd: Add some da9052-i2c section annotations
    mfd: Build rtc5t583 only if I2C config is selected to y.
    mfd: Add anatop mfd driver
    mfd: Fix compilation error in tps65910.h
    mfd: Add 8420 variant to db8500-prcmu
    mfd: Add 8520 PRCMU variant to db8500-prcmu
    ...

    Linus Torvalds
     

28 Mar, 2012

1 commit


23 Mar, 2012

13 commits


22 Mar, 2012

1 commit

  • Pull hwmon changes for v3.4 from Guenter Roeck:
    "Mostly cleanup. No new drivers this time around, but support for
    several chips added to existing drivers: TPS40400, TPS40422, MTD040,
    MAX34446, ZL9101M, ZL9117M, and LM96080. Also, added watchdog support
    for SCH56xx, and additional attributes for a couple of drivers."

    * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (137 commits)
    hwmon: (sch56xx) Add support for the integrated watchdog (v2)
    hwmon: (w83627ehf) Add support for temperature offset registers
    hwmon: (jc42) Remove unnecessary device IDs
    hwmon: (zl6100) Add support for ZL9101M and ZL9117M
    hwmon: (adm1275) Add support for ADM1075
    hwmon: (max34440) Add support for MAX34446
    hwmon: (pmbus) Add more virtual registers
    hwmon: (pmbus) Add support for Lineage Power MDT040
    hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
    hwmon: (max34440) Add support for 'lowest' output voltage attribute
    hwmon: (jc42) Convert to use devm_kzalloc
    hwmon: (max16065) Convert to use devm_kzalloc
    hwmon: (smm665) Convert to use devm_kzalloc
    hwmon: (ltc4261) Convert to use devm_kzalloc
    hwmon: (pmbus) Simplify remove functions
    hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
    hwmon: (lineage-pem) Convert to use devm_kzalloc
    hwmon: (hwmon-vid) Fix checkpatch issues
    hwmon: (hwmon-vid) Add new entries to VRM model table
    hwmon: (lm80) Add detection of NatSemi/TI LM96080
    ...

    Linus Torvalds
     

21 Mar, 2012

2 commits

  • Pull trivial tree from Jiri Kosina:
    "It's indeed trivial -- mostly documentation updates and a bunch of
    typo fixes from Masanari.

    There are also several linux/version.h include removals from Jesper."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
    kcore: fix spelling in read_kcore() comment
    constify struct pci_dev * in obvious cases
    Revert "char: Fix typo in viotape.c"
    init: fix wording error in mm_init comment
    usb: gadget: Kconfig: fix typo for 'different'
    Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
    writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
    writeback: fix typo in the writeback_control comment
    Documentation: Fix multiple typo in Documentation
    tpm_tis: fix tis_lock with respect to RCU
    Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
    Doc: Update numastat.txt
    qla4xxx: Add missing spaces to error messages
    compiler.h: Fix typo
    security: struct security_operations kerneldoc fix
    Documentation: broken URL in libata.tmpl
    Documentation: broken URL in filesystems.tmpl
    mtd: simplify return logic in do_map_probe()
    mm: fix comment typo of truncate_inode_pages_range
    power: bq27x00: Fix typos in comment
    ...

    Linus Torvalds
     
  • Pull driver core patches for 3.4-rc1 from Greg KH:
    "Here's the big driver core merge for 3.4-rc1.

    Lots of various things here, sysfs fixes/tweaks (with the nlink
    breakage reverted), dynamic debugging updates, w1 drivers, hyperv
    driver updates, and a variety of other bits and pieces, full
    information in the shortlog."

    * tag 'driver-core-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (78 commits)
    Tools: hv: Support enumeration from all the pools
    Tools: hv: Fully support the new KVP verbs in the user level daemon
    Drivers: hv: Support the newly introduced KVP messages in the driver
    Drivers: hv: Add new message types to enhance KVP
    regulator: Support driver probe deferral
    Revert "sysfs: Kill nlink counting."
    uevent: send events in correct order according to seqnum (v3)
    driver core: minor comment formatting cleanups
    driver core: move the deferred probe pointer into the private area
    drivercore: Add driver probe deferral mechanism
    DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers
    w1_bq27000: Only one thread can access the bq27000 at a time.
    w1_bq27000 - remove w1_bq27000_write
    w1_bq27000: remove unnecessary NULL test.
    sysfs: Fix memory leak in sysfs_sd_setsecdata().
    intel_idle: Revert change of auto_demotion_disable_flags for Nehalem
    w1: Fix w1_bq27000
    driver-core: documentation: fix up Greg's email address
    powernow-k6: Really enable auto-loading
    powernow-k7: Fix CPU family number
    ...

    Linus Torvalds
     

20 Mar, 2012

1 commit

  • Add support for the watchdog integrated into the SMSC SCH5627 and
    SCH5636 superio-s. Since the watchdog is part of the hwmon logical device
    and thus shares ioports with it, the watchdog driver is integrated into the
    existing hwmon drivers for these.

    Note that this version of the watchdog support for sch56xx superio-s
    implements the watchdog chardev interface itself, rather then relying on
    the recently added watchdog core / watchdog_dev. This is done because
    currently some needed functionality is missing from watchdog_dev, as soon
    as this functionality is added (which is being discussed on the
    linux-watchdog mailinglist), I'll convert this driver over to using
    watchdog_dev.

    Signed-off-by: Hans de Goede
    [guenter.roeck@ericsson.com: Added missing linux/slab.h include]
    Signed-off-by: Guenter Roeck

    Hans de Goede
     

19 Mar, 2012

2 commits