1. 24 Dec, 2013 5 commits
  2. 01 Dec, 2013 3 commits
    • Pali Rohár's avatar
      power_supply: Add power_supply notifier · d36240d2
      Pali Rohár authored
      This patch adds a notifier chain to the power_supply, this helps drivers
      in other subsystem to listen to changes in power supply subsystem.
      
      This would help to take some actions in those drivers on changing the
      power supply properties. One such scenario is to increase/decrease system
      performance based on the battery capacity/voltage. Another scenario is to
      adjust the h/w peak current detection voltage/current thresholds based on
      battery voltage/capacity. The notifier helps drivers to listen to changes
      in power_suppy susbystem without polling the power_supply properties
      Signed-off-by: default avatarJenny TC <jenny.tc@intel.com>
      Signed-off-by: default avatarPali Rohár <pali.rohar@gmail.com>
      Acked-by: default avatarJenny TC <jenny.tc@intel.com>
      Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
      d36240d2
    • Austin Boyle's avatar
      max17042_battery: Fix build errors caused by missing REGMAP_I2C config · 93353e80
      Austin Boyle authored
      max17042 now uses regmap interface but does not enable config option. This
      patch fixes the following build errors:
      
      drivers/power/max17042_battery.c:661:15: error: variable ‘max17042_regmap_config’ has initializer but incomplete type
      drivers/power/max17042_battery.c:662:2: error: unknown field ‘reg_bits’ specified in initializer
      drivers/power/max17042_battery.c:662:2: warning: excess elements in struct initializer
      drivers/power/max17042_battery.c:662:2: warning: (near initialization for ‘max17042_regmap_config’)
      drivers/power/max17042_battery.c:663:2: error: unknown field ‘val_bits’ specified in initializer
      drivers/power/max17042_battery.c:663:2: warning: excess elements in struct initializer
      drivers/power/max17042_battery.c:663:2: warning: (near initialization for ‘max17042_regmap_config’)
      drivers/power/max17042_battery.c:664:2: error: unknown field ‘val_format_endian’ specified in initializer
      drivers/power/max17042_battery.c:664:23: error: ‘REGMAP_ENDIAN_NATIVE’ undeclared here (not in a function)
      drivers/power/max17042_battery.c:664:2: warning: excess elements in struct initializer
      drivers/power/max17042_battery.c:664:2: warning: (near initialization for ‘max17042_regmap_config’)
      drivers/power/max17042_battery.c: In function ‘max17042_probe’:
      drivers/power/max17042_battery.c:684:2: error: implicit declaration of function ‘devm_regmap_init_i2c’
      Signed-off-by: default avatarAustin Boyle <boyle.austin@gmail.com>
      Acked-by: default avatarJonghwa Lee <jonghwa3.lee@samsung.com>
      Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
      93353e80
    • Shuah Khan's avatar
      power_supply: Fix Oops from NULL pointer dereference from wakeup_source_activate · 80c6463e
      Shuah Khan authored
      power_supply_register() calls device_init_wakeup() to register a wakeup
      source before initializing dev_name. As a result, device_wakeup_enable()
      end up registering wakeup source with a null name when
      wakeup_source_register() gets called with dev_name(dev) which is null at
      the time.
      
      When kernel is booted with wakeup_source_activate enabled, it will panic
      when the trace point code tries to dereference ws->name.
      
      Fixed the problem by moving up the kobject_set_name() call prior to
      accesses to dev_name(). Replaced kobject_set_name() with dev_set_name()
      which is the right interface to be called from drivers. Fixed the call to
      device_del() prior to device_add() in for wakeup_init_failed error
      handling code.
      
      Trace after the change:
      
                  bash-2143  [003] d...   132.280697: wakeup_source_activate: BAT1 state=0x20001
           kworker/3:2-1169  [003] d...   132.281305: wakeup_source_deactivate: BAT1 state=0x30000
      
      Oops message:
      
      [  819.769934] device: 'BAT1': device_add
      [  819.770078] PM: Adding info for No Bus:BAT1
      [  819.770235] BUG: unable to handle kernel NULL pointer dereference at           (null)
      [  819.770435] IP: [<ffffffff813381c0>] skip_spaces+0x30/0x30
      [  819.770572] PGD 3efd90067 PUD 3eff61067 PMD 0
      [  819.770716] Oops: 0000 [#1] SMP
      [  819.770829] Modules linked in: arc4 iwldvm mac80211 x86_pkg_temp_thermal coretemp kvm_intel joydev i915 kvm uvcvideo ghash_clmulni_intel videobuf2_vmalloc aesni_intel videobuf2_memops videobuf2_core aes_x86_64 ablk_helper cryptd videodev iwlwifi lrw rfcomm gf128mul glue_helper bnep btusb media bluetooth parport_pc hid_generic ppdev snd_hda_codec_hdmi drm_kms_helper snd_hda_codec_realtek cfg80211 drm tpm_infineon samsung_laptop snd_hda_intel usbhid snd_hda_codec hid snd_hwdep snd_pcm microcode snd_page_alloc snd_timer psmouse i2c_algo_bit lpc_ich tpm_tis video wmi mac_hid serio_raw ext2 lp parport r8169 mii
      [  819.771802] CPU: 0 PID: 2167 Comm: bash Not tainted 3.12.0+ #25
      [  819.771876] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 900X3C/900X3D/900X4C/900X4D/SAMSUNG_NP1234567890, BIOS P03AAC 07/12/2012
      [  819.772022] task: ffff88002e6ddcc0 ti: ffff8804015ca000 task.ti: ffff8804015ca000
      [  819.772119] RIP: 0010:[<ffffffff813381c0>]  [<ffffffff813381c0>] skip_spaces+0x30/0x30
      [  819.772242] RSP: 0018:ffff8804015cbc70  EFLAGS: 00010046
      [  819.772310] RAX: 0000000000000003 RBX: ffff88040cfd6d40 RCX: 0000000000000018
      [  819.772397] RDX: 0000000000020001 RSI: 0000000000000000 RDI: 0000000000000000
      [  819.772484] RBP: ffff8804015cbcc0 R08: 0000000000000000 R09: ffff8803f0768d40
      [  819.772570] R10: ffffea001033b800 R11: 0000000000000000 R12: ffffffff81c519c0
      [  819.772656] R13: 0000000000020001 R14: 0000000000000000 R15: 0000000000020001
      [  819.772744] FS:  00007ff98309b740(0000) GS:ffff88041f200000(0000) knlGS:0000000000000000
      [  819.772845] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  819.772917] CR2: 0000000000000000 CR3: 00000003f59dc000 CR4: 00000000001407f0
      [  819.773001] Stack:
      [  819.773030]  ffffffff81114003 ffff8804015cbcb0 0000000000000000 0000000000000046
      [  819.773146]  ffff880409757a18 ffff8803f065a160 0000000000000000 0000000000020001
      [  819.773273]  0000000000000000 0000000000000000 ffff8804015cbce8 ffffffff8143e388
      [  819.773387] Call Trace:
      [  819.773434]  [<ffffffff81114003>] ? ftrace_raw_event_wakeup_source+0x43/0xe0
      [  819.773520]  [<ffffffff8143e388>] wakeup_source_report_event+0xb8/0xd0
      [  819.773595]  [<ffffffff8143e3cd>] __pm_stay_awake+0x2d/0x50
      [  819.773724]  [<ffffffff8153395c>] power_supply_changed+0x3c/0x90
      [  819.773795]  [<ffffffff8153407c>] power_supply_register+0x18c/0x250
      [  819.773869]  [<ffffffff813d8d18>] sysfs_add_battery+0x61/0x7b
      [  819.773935]  [<ffffffff813d8d69>] battery_notify+0x37/0x3f
      [  819.774001]  [<ffffffff816ccb7c>] notifier_call_chain+0x4c/0x70
      [  819.774071]  [<ffffffff81073ded>] __blocking_notifier_call_chain+0x4d/0x70
      [  819.774149]  [<ffffffff81073e26>] blocking_notifier_call_chain+0x16/0x20
      [  819.774227]  [<ffffffff8109397a>] pm_notifier_call_chain+0x1a/0x40
      [  819.774316]  [<ffffffff81095b66>] hibernate+0x66/0x1c0
      [  819.774407]  [<ffffffff81093931>] state_store+0x71/0xa0
      [  819.774507]  [<ffffffff81331d8f>] kobj_attr_store+0xf/0x20
      [  819.774613]  [<ffffffff811f8618>] sysfs_write_file+0x128/0x1c0
      [  819.774735]  [<ffffffff8118579d>] vfs_write+0xbd/0x1e0
      [  819.774841]  [<ffffffff811861d9>] SyS_write+0x49/0xa0
      [  819.774939]  [<ffffffff816d1052>] system_call_fastpath+0x16/0x1b
      [  819.775055] Code: 89 f8 48 89 e5 f6 82 c0 a6 84 81 20 74 15 0f 1f 44 00 00 48 83 c0 01 0f b6 10 f6 82 c0 a6 84 81 20 75 f0 5d c3 66 0f 1f 44 00 00 <80> 3f 00 55 48 89 e5 74 15 48 89 f8 0f 1f 40 00 48 83 c0 01 80
      [  819.775760] RIP  [<ffffffff813381c0>] skip_spaces+0x30/0x30
      [  819.775881]  RSP <ffff8804015cbc70>
      [  819.775949] CR2: 0000000000000000
      [  819.794175] ---[ end trace c4ef25127039952e ]---
      Signed-off-by: default avatarShuah Khan <shuah.kh@samsung.com>
      Acked-by: default avatarAnton Vorontsov <anton@enomsg.org>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
      80c6463e
  3. 29 Nov, 2013 13 commits
    • Linus Torvalds's avatar
      Linux 3.13-rc2 · dc1ccc48
      Linus Torvalds authored
      dc1ccc48
    • Linus Torvalds's avatar
      Merge tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · d5ff835f
      Linus Torvalds authored
      Pull ARM64 fixes from Catalin Marinas:
       - Remove preempt_count modifications in the arm64 IRQ handling code
         since that's already dealt with in generic irq_enter/irq_exit
       - PTE_PROT_NONE bit moved higher up to avoid overlapping with the
         hardware bits (for PROT_NONE mappings which are pte_present)
       - Big-endian fixes for ptrace support
       - Asynchronous aborts unmasking while in the kernel
       - pgprot_writecombine() change to create Normal NonCacheable memory
         rather than Device GRE
      
      * tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        arm64: Move PTE_PROT_NONE higher up
        arm64: Use Normal NonCacheable memory for writecombine
        arm64: debug: make aarch32 bkpt checking endian clean
        arm64: ptrace: fix compat registes get/set to be endian clean
        arm64: Unmask asynchronous aborts when in kernel mode
        arm64: dts: Reserve the memory used for secondary CPU release address
        arm64: let the core code deal with preempt_count
      d5ff835f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 033dbbde
      Linus Torvalds authored
      Pull s390 updates from Martin Schwidefsky:
       "One performance improvement and a few bug fixes.  Two of the fixes
        deal with the clock related problems we have seen on recent kernels"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/mm: handle asce-type exceptions as normal page fault
        s390,time: revert direct ktime path for s390 clockevent device
        s390/time,vdso: convert to the new update_vsyscall interface
        s390/uaccess: add missing page table walk range check
        s390/mm: optimize copy_page
        s390/dasd: validate request size before building CCW/TCW request
        s390/signal: always restore saved runtime instrumentation psw bit
      033dbbde
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · dc418f6e
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Some easy but needed fixes for i2c drivers since rc1"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: bcm2835: Linking platform nodes to adapter nodes
        i2c: omap: raw read and write endian fix
        i2c: i2c-bcm-kona: Fix module build
        i2c: i2c-diolan-u2c: different usb endpoints for DLN-2-U2C
        i2c: bcm-kona: remove duplicated include
        i2c: davinci: raw read and write endian fix
      dc418f6e
    • Linus Torvalds's avatar
      Merge branch 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 7224b31b
      Linus Torvalds authored
      Pull workqueue fixes from Tejun Heo:
       "This contains one important fix.  The NUMA support added a while back
        broke ordering guarantees on ordered workqueues.  It was enforced by
        having single frontend interface with @max_active == 1 but the NUMA
        support puts multiple interfaces on unbound workqueues on NUMA
        machines thus breaking the ordered guarantee.  This is fixed by
        disabling NUMA support on ordered workqueues.
      
        The above and a couple other patches were sitting in for-3.12-fixes
        but I forgot to push that out, so they ended up waiting a bit too
        long.  My aplogies.
      
        Other fixes are minor"
      
      * 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: fix pool ID allocation leakage and remove BUILD_BUG_ON() in init_workqueues
        workqueue: fix comment typo for __queue_work()
        workqueue: fix ordered workqueues in NUMA setups
        workqueue: swap set_cpus_allowed_ptr() and PF_NO_SETAFFINITY
      7224b31b
    • Linus Torvalds's avatar
      Merge branch 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · de92a058
      Linus Torvalds authored
      Pull libata fixes from Tejun Heo:
       "libata device removal path was removing parent device node before its
        child, which is mostly harmless but triggers warning after recent
        sysfs changes.  Rafael's patch fixes the order.
      
        Other than that, minor controller-specific fixes and device ID
        additions"
      
      * 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        ATA: Fix port removal ordering
        ahci: add Marvell 9230 to the AHCI PCI device list
        ata: fix acpi_bus_get_device() return value check
        pata_arasan_cf: add missing clk_disable_unprepare() on error path
        ahci: add support for IBM Akebono platform device
      de92a058
    • Linus Torvalds's avatar
      Merge branch 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 2855987d
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
       "Fixes for three issues.
      
         - cgroup destruction path could swamp system_wq possibly leading to
           deadlock.  This actually seems to happen in the wild with memcg
           because memcg destruction path adds nested dependency on system_wq.
      
           Resolved by isolating cgroup destruction work items on its
           dedicated workqueue.
      
         - Possible locking context deadlock through seqcount reported by
           lockdep
      
         - Memory leak under certain conditions"
      
      * 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: fix cgroup_subsys_state leak for seq_files
        cpuset: Fix memory allocator deadlock
        cgroup: use a dedicated workqueue for cgroup destruction
      2855987d
    • Linus Torvalds's avatar
      Merge tag 'sound-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b8495995
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Quite a few HD-Audio fixes, a WUSB audio fix and a fix for FireWire
        audio.  The HD-audio part contains a couple of fixes for the generic
        parser, and these are the only intrusive fixes.  The rest are mostly
        device-specific fixes"
      
      * tag 'sound-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Add LFE chmap to ASUS ET2700
        ALSA: hda - Initialize missing bass speaker pin for ASUS AIO ET2700
        ALSA: hda - limit mic boost on Asus UX31[A,E]
        ALSA: hda - Check leaf nodes to find aamix amps
        ALSA: hda - Fix hp-mic mode without VREF bits
        ALSA: hda - Create Headhpone Mic Jack Mode when really needed
        ALSA: usb: use multiple packets per urb for Wireless USB inbound audio
        ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Conexant codec
        ALSA: hda - Drop bus->avoid_link_reset flag
        ALSA: hda/realtek - Set pcbeep amp for ALC668
        ALSA: hda/realtek - Add support of ALC231 codec
        ALSA: firewire-lib: fix wrong value for FDF field as an empty packet
      b8495995
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · b01537bf
      Linus Torvalds authored
      Pull vfs dentry reference count fix from Al Viro.
      
      This fixes a possible inode_permission NULL pointer dereference (and
      other problems) that were due to the root dentry count being decremented
      too much.  In commit 48a066e7 ("RCU'd vfsmounts") the placement of
      clearing the LOOKUP_RCU bit changed, and we then returned failure of
      incrementing the lockref on the parent dentry with LOOKUP_RCU cleared.
      
      But that meant we needed to go through the same cleanup routines that
      the later failures did wrt LOOKUP_ROOT and nd->root.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix bogus path_put() of nd->root after some unlazy_walk() failures
      b01537bf
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 282c183b
      Linus Torvalds authored
      Pull drm qxl leak fix from Dave Airlie:
       "As usual 5 mins after I send a trivial pull fix I find a real bug!
      
        This fixes a memory leak and I'd like to get it into stable queue
        asap"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/qxl: fix memory leak in release list handling
      282c183b
    • Catalin Marinas's avatar
      arm64: Move PTE_PROT_NONE higher up · 3676f9ef
      Catalin Marinas authored
      PTE_PROT_NONE means that a pte is present but does not have any
      read/write attributes. However, setting the memory type like
      pgprot_writecombine() is allowed and such bits overlap with
      PTE_PROT_NONE. This causes mmap/munmap issues in drivers that change the
      vma->vm_pg_prot on PROT_NONE mappings.
      
      This patch reverts the PTE_FILE/PTE_PROT_NONE shift in commit
      59911ca4 (ARM64: mm: Move PTE_PROT_NONE bit) and moves PTE_PROT_NONE
      together with the other software bits.
      Signed-off-by: default avatarSteve Capper <steve.capper@linaro.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: default avatarSteve Capper <steve.capper@linaro.org>
      Cc: <stable@vger.kernel.org> # 3.11+
      3676f9ef
    • Catalin Marinas's avatar
      arm64: Use Normal NonCacheable memory for writecombine · 4f00130b
      Catalin Marinas authored
      This provides better performance compared to Device GRE and also allows
      unaligned accesses. Such memory is intended to be used with standard RAM
      (e.g. framebuffers) and not I/O.
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      4f00130b
    • Al Viro's avatar
      fix bogus path_put() of nd->root after some unlazy_walk() failures · d870b4a1
      Al Viro authored
      Failure to grab reference to parent dentry should go through the
      same cleanup as nd->seq mismatch.  As it is, we might end up with
      caller thinking it needs to path_put() nd->root, with obvious
      nasty results once we'd hit that bug enough times to drive the
      refcount of root dentry all the way to zero...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      d870b4a1
  4. 28 Nov, 2013 19 commits