1. 30 10月, 2013 3 次提交
  2. 26 10月, 2013 8 次提交
  3. 20 10月, 2013 1 次提交
  4. 19 10月, 2013 4 次提交
  5. 18 10月, 2013 13 次提交
  6. 17 10月, 2013 11 次提交
    • R
      ACPI / PM: Drop two functions that are not used any more · 2421ad48
      Rafael J. Wysocki 提交于
      Two functions defined in device_pm.c, acpi_dev_pm_add_dependent()
      and acpi_dev_pm_remove_dependent(), have no callers and may be
      dropped, so drop them.
      
      Moreover, they are the only functions adding entries to and removing
      entries from the power_dependent list in struct acpi_device, so drop
      that list too.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2421ad48
    • A
      ATA / ACPI: remove power dependent device handling · b08fc109
      Aaron Lu 提交于
      Previously, we wanted SCSI devices corrsponding to ATA devices to
      be runtime resumed when the power resource for those ATA device was
      turned on by some other device, so we added the SCSI device to the
      dependent device list of the ATA device's ACPI node.  However, this
      code has no effect after commit 41863fce (ACPI / power: Drop automaitc
      resume of power resource dependent devices) and the mechanism it was
      supposed to implement is regarded as a bad idea now, so drop it.
      
      [rjw: Changelog]
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b08fc109
    • L
      cpufreq: exynos4210: Use the common clock framework to set APLL clock rate · 7ad65d59
      Lukasz Majewski 提交于
      In the exynos4210_set_apll() function, the APLL frequency is set with
      direct register manipulation.
      
      Such approach is not allowed in the common clock framework. The frequency
      is changed, but the corresponding clock value is not updated. This causes
      wrong frequency read from cpufreq's cpuinfo_cur_freq sysfs attribute.
      
      Also direct manipulation with PLL's S parameter has been removed. It is
      already done at PLL35xx code.
      
      Tested at:
      - Exynos4210 - Trats board (linux 3.12-rc4)
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      Reviewed-by: NYadwinder Singh Brar <yadi.brar@samsung.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7ad65d59
    • L
      cpufreq: exynos4x12: Use the common clock framework to set APLL clock rate · cf467155
      Lukasz Majewski 提交于
      In the exynos4x12_set_apll() function, the APLL frequency is set with
      direct register manipulation.
      
      Such approach is not allowed in the common clock framework. The frequency
      is changed, but the corresponding clock value is not updated. This causes
      wrong frequency read from cpufreq's cpuinfo_cur_freq sysfs attribute.
      
      Also direct manipulation with PLL's S parameter has been removed. It is
      already done at PLL35xx code.
      
      Tested at:
      - Exynos4412 - Trats2 board (linux 3.12-rc4)
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Reviewed-by: NTomasz Figa <t.figa@samsung.com>
      Reviewed-by: NYadwinder Singh Brar <yadi.brar@samsung.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cf467155
    • L
      Merge branch 'akpm' (fixes from Andrew Morton) · 056cdce0
      Linus Torvalds 提交于
      Merge misc fixes from Andrew Morton.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
        mm: revert mremap pud_free anti-fix
        mm: fix BUG in __split_huge_page_pmd
        swap: fix set_blocksize race during swapon/swapoff
        procfs: call default get_unmapped_area on MMU-present architectures
        procfs: fix unintended truncation of returned mapped address
        writeback: fix negative bdi max pause
        percpu_refcount: export symbols
        fs: buffer: move allocation failure loop into the allocator
        mm: memcg: handle non-error OOM situations more gracefully
        tools/testing/selftests: fix uninitialized variable
        block/partitions/efi.c: treat size mismatch as a warning, not an error
        mm: hugetlb: initialize PG_reserved for tail pages of gigantic compound pages
        mm/zswap: bugfix: memory leak when re-swapon
        mm: /proc/pid/pagemap: inspect _PAGE_SOFT_DIRTY only on present pages
        mm: migration: do not lose soft dirty bit if page is in migration state
        gcov: MAINTAINERS: Add an entry for gcov
        mm/hugetlb.c: correct missing private flag clearing
        mm/vmscan.c: don't forget to free shrinker->nr_deferred
        ipc/sem.c: synchronize semop and semctl with IPC_RMID
        ipc: update locking scheme comments
        ...
      056cdce0
    • H
      mm: revert mremap pud_free anti-fix · 57a8f0cd
      Hugh Dickins 提交于
      Revert commit 1ecfd533 ("mm/mremap.c: call pud_free() after fail
      calling pmd_alloc()").
      
      The original code was correct: pud_alloc(), pmd_alloc(), pte_alloc_map()
      ensure that the pud, pmd, pt is already allocated, and seldom do they
      need to allocate; on failure, upper levels are freed if appropriate by
      the subsequent do_munmap().  Whereas commit 1ecfd533 did an
      unconditional pud_free() of a most-likely still-in-use pud: saved only
      by the near-impossiblity of pmd_alloc() failing.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Chen Gang <gang.chen@asianux.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      57a8f0cd
    • H
      mm: fix BUG in __split_huge_page_pmd · 750e8165
      Hugh Dickins 提交于
      Occasionally we hit the BUG_ON(pmd_trans_huge(*pmd)) at the end of
      __split_huge_page_pmd(): seen when doing madvise(,,MADV_DONTNEED).
      
      It's invalid: we don't always have down_write of mmap_sem there: a racing
      do_huge_pmd_wp_page() might have copied-on-write to another huge page
      before our split_huge_page() got the anon_vma lock.
      
      Forget the BUG_ON, just go back and try again if this happens.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Acked-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      750e8165
    • K
      swap: fix set_blocksize race during swapon/swapoff · 5b808a23
      Krzysztof Kozlowski 提交于
      Fix race between swapoff and swapon.  Swapoff used old_block_size from
      swap_info outside of swapon_mutex so it could be overwritten by
      concurrent swapon.
      
      The race has visible effect only if more than one swap block device
      exists with different block sizes (e.g.  /dev/sda1 with block size 4096
      and /dev/sdb1 with 512).  In such case it leads to setting the blocksize
      of swapped off device with wrong blocksize.
      
      The bug can be triggered with multiple concurrent swapoff and swapon:
      0. Swap for some device is on.
      1. swapoff:
      First the swapoff is called on this device and "struct swap_info_struct
      *p" is assigned. This is done under swap_lock however this lock is
      released for the call try_to_unuse().
      
      2. swapon:
      After the assignment above (and before acquiring swapon_mutex &
      swap_lock by swapoff) the swapon is called on the same device.
      The p->old_block_size is assigned to the value of block_size the device.
      This block size should be the same as previous but sometimes it is not.
      The swapon ends successfully.
      
      3. swapoff:
      Swapoff resumes, grabs the locks and mutex and continues to disable this
      swap device. Now it sets the block size to value taken from swap_info
      which was overwritten by swapon in 2.
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Reported-by: NWeijie Yang <weijie.yang.kh@gmail.com>
      Cc: Bob Liu <bob.liu@oracle.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Shaohua Li <shli@fusionio.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Acked-by: NHugh Dickins <hughd@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5b808a23
    • H
      procfs: call default get_unmapped_area on MMU-present architectures · fad1a86e
      HATAYAMA Daisuke 提交于
      Commit c4fe2448 ("sparc: fix PCI device proc file mmap(2)") added
      proc_reg_get_unmapped_area in proc_reg_file_ops and
      proc_reg_file_ops_no_compat, by which now mmap always returns EIO if
      get_unmapped_area method is not defined for the target procfs file,
      which causes regression of mmap on /proc/vmcore.
      
      To address this issue, like get_unmapped_area(), call default
      current->mm->get_unmapped_area on MMU-present architectures if
      pde->proc_fops->get_unmapped_area, i.e.  the one in actual file
      operation in the procfs file, is not defined.
      Reported-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NHATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Tested-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fad1a86e
    • H
      procfs: fix unintended truncation of returned mapped address · 2cbe3b0a
      HATAYAMA Daisuke 提交于
      Currently, proc_reg_get_unmapped_area truncates upper 32-bit of the
      mapped virtual address returned from get_unmapped_area method in
      pde->proc_fops due to the variable rv of signed integer on x86_64.  This
      is too small to have vitual address of unsigned long on x86_64 since on
      x86_64, signed integer is of 4 bytes while unsigned long is of 8 bytes.
      To fix this issue, use unsigned long instead.
      
      Fixes a regression added in commit c4fe2448 ("sparc: fix PCI device
      proc file mmap(2)").
      Signed-off-by: NHATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Tested-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2cbe3b0a
    • F
      writeback: fix negative bdi max pause · e3b6c655
      Fengguang Wu 提交于
      Toralf runs trinity on UML/i386.  After some time it hangs and the last
      message line is
      
      	BUG: soft lockup - CPU#0 stuck for 22s! [trinity-child0:1521]
      
      It's found that pages_dirtied becomes very large.  More than 1000000000
      pages in this case:
      
      	period = HZ * pages_dirtied / task_ratelimit;
      	BUG_ON(pages_dirtied > 2000000000);
      	BUG_ON(pages_dirtied > 1000000000);      <---------
      
      UML debug printf shows that we got negative pause here:
      
      	ick: pause : -984
      	ick: pages_dirtied : 0
      	ick: task_ratelimit: 0
      
      	 pause:
      	+       if (pause < 0)  {
      	+               extern int printf(char *, ...);
      	+               printf("ick : pause : %li\n", pause);
      	+               printf("ick: pages_dirtied : %lu\n", pages_dirtied);
      	+               printf("ick: task_ratelimit: %lu\n", task_ratelimit);
      	+               BUG_ON(1);
      	+       }
      	        trace_balance_dirty_pages(bdi,
      
      Since pause is bounded by [min_pause, max_pause] where min_pause is also
      bounded by max_pause.  It's suspected and demonstrated that the
      max_pause calculation goes wrong:
      
      	ick: pause : -717
      	ick: min_pause : -177
      	ick: max_pause : -717
      	ick: pages_dirtied : 14
      	ick: task_ratelimit: 0
      
      The problem lies in the two "long = unsigned long" assignments in
      bdi_max_pause() which might go negative if the highest bit is 1, and the
      min_t(long, ...) check failed to protect it falling under 0.  Fix all of
      them by using "unsigned long" throughout the function.
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Reported-by: NToralf Förster <toralf.foerster@gmx.de>
      Tested-by: NToralf Förster <toralf.foerster@gmx.de>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e3b6c655