Commit Graph

560777 Commits

Author SHA1 Message Date
Vitaly Kuznetsov 7625b3a000 kernel/panic.c: turn off locks debug before releasing console lock
Commit 08d78658f3 ("panic: release stale console lock to always get the
logbuf printed out") introduced an unwanted bad unlock balance report when
panic() is called directly and not from OOPS (e.g.  from out_of_memory()).
The difference is that in case of OOPS we disable locks debug in
oops_enter() and on direct panic call nobody does that.

Fixes: 08d78658f3 ("panic: release stale console lock to always get the logbuf printed out")
Reported-by: kernel test robot <ying.huang@linux.intel.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Baoquan He <bhe@redhat.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Xie XiuQi <xiexiuqi@huawei.com>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Petr Mladek <pmladek@suse.cz>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Richard Weinberger 9d8a765211 kernel/signal.c: unexport sigsuspend()
sigsuspend() is nowhere used except in signal.c itself, so we can mark it
static do not pollute the global namespace.

But this patch is more than a boring cleanup patch, it fixes a real issue
on UserModeLinux.  UML has a special console driver to display ttys using
xterm, or other terminal emulators, on the host side.  Vegard reported
that sometimes UML is unable to spawn a xterm and he's facing the
following warning:

  WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()

It turned out that this warning makes absolutely no sense as the UML
xterm code calls sigsuspend() on the host side, at least it tries.  But
as the kernel itself offers a sigsuspend() symbol the linker choose this
one instead of the glibc wrapper.  Interestingly this code used to work
since ever but always blocked signals on the wrong side.  Some recent
kernel change made the WARN_ON() trigger and uncovered the bug.

It is a wonderful example of how much works by chance on computers. :-)

Fixes: 68f3f16d9a ("new helper: sigsuspend()")
Signed-off-by: Richard Weinberger <richard@nod.at>
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: <stable@vger.kernel.org>	[3.5+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Andrey Ryabinin 459372545c kasan: fix kmemleak false-positive in kasan_module_alloc()
Kmemleak reports the following leak:

	unreferenced object 0xfffffbfff41ea000 (size 20480):
	comm "modprobe", pid 65199, jiffies 4298875551 (age 542.568s)
	hex dump (first 32 bytes):
	  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
	  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
	backtrace:
	  [<ffffffff82354f5e>] kmemleak_alloc+0x4e/0xc0
	  [<ffffffff8152e718>] __vmalloc_node_range+0x4b8/0x740
	  [<ffffffff81574072>] kasan_module_alloc+0x72/0xc0
	  [<ffffffff810efe68>] module_alloc+0x78/0xb0
	  [<ffffffff812f6a24>] module_alloc_update_bounds+0x14/0x70
	  [<ffffffff812f8184>] layout_and_allocate+0x16f4/0x3c90
	  [<ffffffff812faa1f>] load_module+0x2ff/0x6690
	  [<ffffffff813010b6>] SyS_finit_module+0x136/0x170
	  [<ffffffff8239bbc9>] system_call_fastpath+0x16/0x1b
	  [<ffffffffffffffff>] 0xffffffffffffffff

kasan_module_alloc() allocates shadow memory for module and frees it on
module unloading.  It doesn't store the pointer to allocated shadow memory
because it could be calculated from the shadowed address, i.e.
kasan_mem_to_shadow(addr).

Since kmemleak cannot find pointer to allocated shadow, it thinks that
memory leaked.

Use kmemleak_ignore() to tell kmemleak that this is not a leak and shadow
memory doesn't contain any pointers.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
OGAWA Hirofumi 928a477102 fat: fix fake_offset handling on error path
For the root directory, .  and ..  are faked (using dir_emit_dots()) and
ctx->pos is reset from 2 to 0.

A corrupted root directory could cause fat_get_entry() to fail, but
->iterate() (fat_readdir()) reports progress to the VFS (with ctx->pos
rewound to 0), so any following calls to ->iterate() continue to return
the same entries again and again.

The result is that userspace will never see the end of the directory,
causing e.g.  'ls' to hang in a getdents() loop.

[hirofumi@mail.parknet.co.jp: cleanup and make sure to correct fake_offset]
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Richard Weinberger <richard.weinberger@gmail.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Mike Kravetz 1817889e3b mm/hugetlbfs: fix bugs in fallocate hole punch of areas with holes
Hugh Dickins pointed out problems with the new hugetlbfs fallocate hole
punch code.  These problems are in the routine remove_inode_hugepages and
mostly occur in the case where there are holes in the range of pages to be
removed.  These holes could be the result of a previous hole punch or
simply sparse allocation.  The current code could access pages outside the
specified range.

remove_inode_hugepages handles both hole punch and truncate operations.
Page index handling was fixed/cleaned up so that the loop index always
matches the page being processed.  The code now only makes a single pass
through the range of pages as it was determined page faults could not race
with truncate.  A cond_resched() was added after removing up to
PAGEVEC_SIZE pages.

Some totally unnecessary code in hugetlbfs_fallocate() that remained from
early development was also removed.

Tested with fallocate tests submitted here:
http://librelist.com/browser//libhugetlbfs/2015/6/25/patch-tests-add-tests-for-fallocate-system-call/
And, some ftruncate tests under development

Fixes: b5cec28d36 ("hugetlbfs: truncate_hugepages() takes a range of pages")
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: "Hillf Danton" <hillf.zj@alibaba-inc.com>
Cc: <stable@vger.kernel.org>	[4.3]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Yang Shi 50e55bf626 mm/page-writeback.c: initialize m_dirty to avoid compile warning
When building kernel with gcc 5.2, the below warning is raised:

  mm/page-writeback.c: In function 'balance_dirty_pages.isra.10':
  mm/page-writeback.c:1545:17: warning: 'm_dirty' may be used uninitialized in this function [-Wmaybe-uninitialized]
     unsigned long m_dirty, m_thresh, m_bg_thresh;

The m_dirty{thresh, bg_thresh} are initialized in the block of "if
(mdtc)", so if mdts is null, they won't be initialized before being used.
Initialize m_dirty to zero, also initialize m_thresh and m_bg_thresh to
keep consistency.

They are used later by if condition: !mdtc || m_dirty <=
dirty_freerun_ceiling(m_thresh, m_bg_thresh)

If mdtc is null, dirty_freerun_ceiling will not be called at all, so the
initialization will not change any behavior other than just ceasing the
compile warning.

(akpm: the patch actually reduces .text size by ~20 bytes on gcc-4.x.y)

[akpm@linux-foundation.org: add comment]
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Christoph Hellwig 1a47de6e4a various: fix pci_set_dma_mask return value checking
pci_set_dma_mask returns a negative errno value, not a bool like
pci_dma_supported.  This of course was just a giant test for attention :)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Jongman Heo <jongman.heo@samsung.com>
Tested-by: Jongman Heo <jongman.heo@samsung.com>	[pcnet32]
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Jason J. Herne 1a76361568 mm: loosen MADV_NOHUGEPAGE to enable Qemu postcopy on s390
MADV_NOHUGEPAGE processing is too restrictive.  kvm already disables
hugepage but hugepage_madvise() takes the error path when we ask to turn
on the MADV_NOHUGEPAGE bit and the bit is already on.  This causes Qemu's
new postcopy migration feature to fail on s390 because its first action is
to madvise the guest address space as NOHUGEPAGE.  This patch modifies the
code so that the operation succeeds without error now.

For consistency reasons do the same for MADV_HUGEPAGE.

Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Jerome Marchand 7511c3ede7 mm: vmalloc: don't remove inexistent guard hole in remove_vm_area()
Commit 71394fe501 ("mm: vmalloc: add flag preventing guard hole
allocation") missed a spot.  Currently remove_vm_area() decreases vm->size
to "remove" the guard hole page, even when it isn't present.  All but one
users just free the vm_struct rigth away and never access vm->size anyway.

Don't touch the size in remove_vm_area() and have __vunmap() use the
proper get_vm_area_size() helper.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Naoya Horiguchi 429d48622c tools/vm/page-types.c: support KPF_IDLE
PageIdle is exported in include/uapi/linux/kernel-page-flags.h, so let's
make page-types.c tool handle it.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Dan Carpenter 1491e30ed1 ncpfs: don't allow negative timeouts
This code causes a static checker warning because it's a user controlled
variable where we cap the upper bound but not the lower bound.  Let's
return an -EINVAL for negative timeouts.

[akpm@linux-foundation.org: remove unneeded `else']
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jan Kara <jack@suse.com>
Cc: Petr Vandrovec <petr@vandrovec.name>
Cc: David Howells <dhowells@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Daniel Baluta 5cf6a51e60 configfs: allow dynamic group creation
This patchset introduces IIO software triggers, offers a way of configuring
them via configfs and adds the IIO hrtimer based interrupt source to be used
with software triggers.

The architecture is now split in 3 parts, to remove all IIO trigger specific
parts from IIO configfs core:

(1) IIO configfs - creates the root of the IIO configfs subsys.
(2) IIO software triggers - software trigger implementation, dynamically
    creating /config/iio/triggers group.
(3) IIO hrtimer trigger - is the first interrupt source for software triggers
    (with syfs to follow). Each trigger type can implement its own set of
    attributes.

Lockdep seems to be happy with the locking in configfs patch.

This patch (of 5):

We don't want to hardcode default groups at subsystem
creation time. We export:
	* configfs_register_group
	* configfs_unregister_group
to allow drivers to programatically create/destroy groups
later, after module init time.

This is needed for IIO configfs support.

(akpm: the other 4 patches to be merged via the IIO tree)

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Octavian Purdila <octavian.purdila@intel.com>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Adriana Reus <adriana.reus@intel.com>
Cc: Cristina Opriceana <cristina.opriceana@gmail.com>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Moritz Fischer dd7d664a2b MAINTAINERS: add Moritz as reviewer for FPGA Manager Framework
Nominate myself as Reviewer.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Acked-by: Alan Tull <atull@opensource.altera.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Rasmus Villemoes 94a58c360a slab.h: sprinkle __assume_aligned attributes
The various allocators return aligned memory.  Telling the compiler that
allows it to generate better code in many cases, for example when the
return value is immediately passed to memset().

Some code does become larger, but at least we win twice as much as we lose:

$ scripts/bloat-o-meter /tmp/vmlinux vmlinux
add/remove: 0/0 grow/shrink: 13/52 up/down: 995/-2140 (-1145)

An example of the different (and smaller) code can be seen in mm_alloc(). Before:

:       48 8d 78 08             lea    0x8(%rax),%rdi
:       48 89 c1                mov    %rax,%rcx
:       48 89 c2                mov    %rax,%rdx
:       48 c7 00 00 00 00 00    movq   $0x0,(%rax)
:       48 c7 80 48 03 00 00    movq   $0x0,0x348(%rax)
:       00 00 00 00
:       31 c0                   xor    %eax,%eax
:       48 83 e7 f8             and    $0xfffffffffffffff8,%rdi
:       48 29 f9                sub    %rdi,%rcx
:       81 c1 50 03 00 00       add    $0x350,%ecx
:       c1 e9 03                shr    $0x3,%ecx
:       f3 48 ab                rep stos %rax,%es:(%rdi)

After:

:       48 89 c2                mov    %rax,%rdx
:       b9 6a 00 00 00          mov    $0x6a,%ecx
:       31 c0                   xor    %eax,%eax
:       48 89 d7                mov    %rdx,%rdi
:       f3 48 ab                rep stos %rax,%es:(%rdi)

So gcc's strategy is to do two possibly (but not really, of course)
unaligned stores to the first and last word, then do an aligned rep stos
covering the middle part with a little overlap.  Maybe arches which do not
allow unaligned stores gain even more.

I don't know if gcc can actually make use of alignments greater than 8 for
anything, so one could probably drop the __assume_xyz_alignment macros and
just use __assume_aligned(8).

The increases in code size are mostly caused by gcc deciding to
opencode strlen() using the check-four-bytes-at-a-time trick when it
knows the buffer is sufficiently aligned (one function grew by 200
bytes). Now it turns out that many of these strlen() calls showing up
were in fact redundant, and they're gone from -next. Applying the two
patches to next-20151001 bloat-o-meter instead says

add/remove: 0/0 grow/shrink: 6/52 up/down: 244/-2140 (-1896)

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Linus Torvalds 400f3f255d More power management and ACPI updates for v4.4-rc2
- Revert three recent intel_pstate driver commits one of which
    introduced a regression and the remaining two depend on the
    problematic one (Rafael Wysocki).
 
  - Fix breakage related to the recently introduced ACPI _CCA object
    support in the PCI DMA setup code (Suravee Suthikulpanit).
 
  - Fix up the recently introduced ACPI CPPC support to only
    use the hardware-reduced version of the PCCT structure as
    the only architecture to support it (ARM64) will only use
    hardware-reduced ACPI anyway (Ashwin Chaugule).
 
  - Fix a cpufreq mediatek driver build problem (Arnd Bergmann).
 
  - Fix the SMBus transaction handling implementation in the ACPI
    core to avoid re-entrant calls to wait_event_timeout() which
    makes intermittent boot stalls related to the Smart Battery
    Subsystem initialization go away and revert a workaround of
    another problem with the same underlying root cause (Chris
    Bainbridge).
 
  - Fix the generic wakeup interrupts framework to avoid using
    invalid IRQ numbers (Dmitry Torokhov).
 
  - Remove a redundant check from the ACPI EC driver (Markus Elfring).
 
  - Modify the intel_pstate driver so it can support more Atom flavors
    than just one (Baytrail) and add support for Atom Airmont cores
    (which require new freqnency tables) to it (Philippe Longepe).
 
  - Clean up MSR-related symbols in turbostat (Len Brown).
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJWTzTjAAoJEILEb/54YlRx1W8P/1agbwcTMKlhChORgsyBH7+t
 zkAIeqgkKqCD95lzFCUpmRBD34wTnwO9L13Ybc3peUTnQNFMJ3n748ne3jzfgU0i
 dpssqJqLEHyZr6WDOqM39vJEZA77U8QZHlAybgota1gA6b9XZhmrTvFHrW7i2iRN
 JeTep/wGILBCYfVD7Q5oI0T0Tmoi3FVxPTMCo5AUkUwjgur4OJVl4EHu3tBOuFlX
 NxqlCgKcq3MynqXmZR0GuJtkMyHvWiPSMC+MTKRPdi0gLjn2Iv+N+uz4KWaA2XHg
 veoSyR1j74CsDYGxHnL/xUp/obfze5vcqsMMXV706uLkiCq/SLEU8fYnR4m19yoR
 6K/dy/c1G+1ywztQ4+byPn/fLFLkksCye1BBsLbekmz6CI27fKQ16S7aCICDeBjN
 nL3b5jPPxBISB9UcX9Yt8NMJAlCKSQL/CRENDX/GPnB22EznOcUMXOAjth/d49RJ
 +dTRhfW9L0S7actSV2Aia/ptsFSM0gRWLhOFG9BDEw3bjH09OIJr2vHRK1LTAerq
 LuZxvUnY6Z6G13twgpQ2Eln/LPNviqfezxGYTkAIw2x1fqevZs/qZjFE6ugcZORe
 9ZqYe64JxgpPapilPDHWdR/FJy7loQBslDp5m0sng/dTcRVuGu5w6WWT7canIxHu
 dSUnuz1FiBW5MyBH4TkR
 =GFs4
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management and ACPI updates from Rafael Wysocki:
 "These are mostly fixes and cleanups (ACPI core, PM core, cpufreq, ACPI
  EC driver, device properties) including three reverts of recent
  intel_pstate driver commits due to a regression introduced by one of
  them plus support for Atom Airmont cores in intel_pstate (which really
  boils down to adding new frequency tables for Airmont) and additional
  turbostat updates.

  Specifics:

   - Revert three recent intel_pstate driver commits one of which
     introduced a regression and the remaining two depend on the
     problematic one (Rafael Wysocki).

   - Fix breakage related to the recently introduced ACPI _CCA object
     support in the PCI DMA setup code (Suravee Suthikulpanit).

   - Fix up the recently introduced ACPI CPPC support to only use the
     hardware-reduced version of the PCCT structure as the only
     architecture to support it (ARM64) will only use hardware-reduced
     ACPI anyway (Ashwin Chaugule).

   - Fix a cpufreq mediatek driver build problem (Arnd Bergmann).

   - Fix the SMBus transaction handling implementation in the ACPI core
     to avoid re-entrant calls to wait_event_timeout() which makes
     intermittent boot stalls related to the Smart Battery Subsystem
     initialization go away and revert a workaround of another problem
     with the same underlying root cause (Chris Bainbridge).

   - Fix the generic wakeup interrupts framework to avoid using invalid
     IRQ numbers (Dmitry Torokhov).

   - Remove a redundant check from the ACPI EC driver (Markus Elfring).

   - Modify the intel_pstate driver so it can support more Atom flavors
     than just one (Baytrail) and add support for Atom Airmont cores
     (which require new freqnency tables) to it (Philippe Longepe).

   - Clean up MSR-related symbols in turbostat (Len Brown)"

* tag 'pm+acpi-4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PCI: Fix OF logic in pci_dma_configure()
  Revert "Documentation: kernel_parameters for Intel P state driver"
  cpufreq: mediatek: fix build error
  cpufreq: intel_pstate: Add separate support for Airmont cores
  cpufreq: intel_pstate: Replace BYT with ATOM
  Revert "cpufreq: intel_pstate: Use ACPI perf configuration"
  Revert "cpufreq: intel_pstate: Avoid calculation for max/min"
  ACPI-EC: Drop unnecessary check made before calling acpi_ec_delete_query()
  Revert "ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook"
  ACPI / SMBus: Fix boot stalls / high CPU caused by reentrant code
  PM / wakeirq: check that wake IRQ is valid before accepting it
  ACPI / CPPC: Use h/w reduced version of the PCCT structure
  x86: remove unused definition of MSR_NHM_PLATFORM_INFO
  tools/power turbostat: use new name for MSR_PLATFORM_INFO
2015-11-20 09:01:07 -08:00
Linus Torvalds 2f255351c1 powerpc fixes for 4.4
- Wire up sys_mlock2()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWTwmRAAoJEFHr6jzI4aWAOfQP/j+wk/JmC6dqM8AqNswyH1VY
 G+KXxw3c8nxzVnWhIRrfBzpraDAglLgUDT4nEEwKUE228X/IpY1cVzzxSzUGd6tI
 b8kEkLAAZCPBX+RUqEAuP1ehHszLtW+rzB1Y8tEi0Jk3sa40fozcnaZnEoviAqVL
 5WcioI8JhGXhW3b6QhVbtrRzjwxV7CBKHAgS8W9djQqcXPfafcP/KsjCmSOkBBKi
 gsgw3K+/DcgwqIjt/j7KHLozSft8JezB8fS9hJpMhdoJnZN05uArjTrDfXJfkf3f
 UwZGVVFuhl6ibxrWRS8sgw7JRzTI5gOJMaqeH4ovgYQkFPvMGDW1+8uRESheeEq0
 0nkaP2LALy34C6plj895vGEJTFkm23tMtv9ZP+JuwAKJQjp153ADgWwuF7MH0HAF
 Ez8rprM8DGfuplHPFhh2TPfTRS2wS8Q9mAuReLRhDWZnrdmXLwChhlvDtQq0kJ8A
 xN1lKZCXahVRzGK6XbEsExxAmEAjZQkTq95fOFa8Um3Q35eAQp/BgchBXQalM95H
 mGDf85jSAUFkUqXqB6uNGbHBagAiYarkr3AOQNFRDCtvKbbzZhZ7ve9KV9JhoG5v
 FutIsG+EzznuyAnuKAbJxyM4cAVVHbgwGyM5NgJV570NGwkpJjOvpB5u5GHjb6+9
 uoQJpmTmsZaoI70Gshyy
 =azdn
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixlet from Michael Ellerman:
 "Wire up sys_mlock2()"

* tag 'powerpc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc: Wire up sys_mlock2()
2015-11-20 08:20:04 -08:00
Linus Torvalds 86eaf54d07 dmaengine fixes for 4.4-rc2
This has odd fixes spreadout drivers, not major here
    - usbdmac fixes for pm
    - edma build and logic fixes
    - build warn fixes for few drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWTp6mAAoJEHwUBw8lI4NH2xUP/1XJVXqX0zk09sdylZFGz2d4
 XIGLy6tUXkN9Ks6do65PMcsbEUYFKU3xh2esCUMOBHjwTJYGWYp5bv5HCZoEjbKs
 kspuzKBoSsW32r/UhxnKhn8Ryz5IYnb72cIEFXw9MZTcPa1msUrqOBdNEQATlyvf
 rHQfzUg8Nw9+rLZ31PhNMtPvqpohVxV8mx4eOe7hVgVefdawmpHNu3BGo0xy7b39
 jsSrGjEOdWEtZqg/mxYaZ36eXzCAiFg4S/eJrFWlUx2q/FolHgII+mMuXk0OygPp
 7KQoB1tSYlCVrlzoKjMisJW4RCmkdxRNIqi8nu+sSDPN8cLnx7DZxHy7QaopdoYP
 Jts9rxLXbwJ9+WzBgOKANvYIfwbyNVK1eweaTAt67lJiR0d1G701ySnTr2a/pJq+
 tK9qeI2k4I8uuX/Nt3mTzHxQMxVUn/N2CnApXNuuMKLk/wiGhjAvqlhOEmDDHO7F
 9vyhh02/a8BZK9GDp3VUHQT7cHTPKLAB7UlAICOh8tF5TImD1haSw+jtZDSH5Ku3
 ur7t0dfUpoOnuZWjHFBI7+AQ3WO+Ju9S8DZdIYpRPTDoBtJ9IaUikFmgOkKopR2G
 aK4wcicOuR/CxyzdgFPV6N5tCHP++ueA/OBEdOx7KkvG0ANWeAkENv+08DSAwDX+
 z61lusATzOMBWB97I9pu
 =Dtnx
 -----END PGP SIGNATURE-----

Merge tag 'dmaengine-fix-4.4-rc2' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
 "This has odd fixes spreadout drivers, not major here

   - usbdmac fixes for pm
   - edma build and logic fixes
   - build warn fixes for few drivers"

* tag 'dmaengine-fix-4.4-rc2' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: at_hdmac: use %pad format string for dma_addr_t
  dmaengine: at_xdmac: use %pad format string for dma_addr_t
  dmaengine: imx-sdma: remove __init annotation on sdma_event_remap
  dmaengine: edma: predecence bug in GET_NUM_QDMACH()
  dmaengine: edma: fix build without CONFIG_OF
  dmaengine: of_dma: Correct return code for of_dma_request_slave_channel in case !CONFIG_OF
  dmaengine: sh: usb-dmac: Fix pm_runtime_{enable,disable}() imbalance
  dmaengine: sh: usb-dmac: Fix crash on runtime suspend
2015-11-19 20:51:31 -08:00
Linus Torvalds c69bde78f0 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "A varied bunch of fixes, the radeon pull is probably a bit larger than
  I'd like, but it contains 2 weeks of stuff, and the Fiji fixes are a
  bit large, but they are Fiji specific.

  Otherwise:

   - mgag200: One cursor regression oops fix.
   - vc4: A few small fixes and cleanups.
   - core: Atomic fixes and Atomic helper fixes
   - i915: Revert for the backlight regression along with a bunch of
     fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (58 commits)
  drm/atomic-helper: Check encoder/crtc constraints
  Revert "drm/i915: skip modeset if compatible for everyone."
  drm/mgag200: fix kernel hang in cursor code.
  drm/amdgpu: reserve/unreserve objects out of map/unmap operations
  drm/amdgpu: move bo_reserve out of amdgpu_vm_clear_bo
  drm/amdgpu: add lock for interval tree in vm
  drm/amdgpu: keep the owner for VMIDs
  drm/amdgpu: move VM manager clean into the VM code again
  drm/amdgpu: cleanup VM coding style
  drm/amdgpu: remove unused VM manager field
  drm/amdgpu: cleanup scheduler command submission
  drm/amdgpu: fix typo in firmware name
  drm/i915: Consider SPLL as another shared pll, v2.
  drm/i915: Fix gpu frequency change tracing
  drm/vc4: Make sure that planes aren't scaled.
  drm/vc4: Fix some failure to track __iomem decorations on pointers.
  drm/vc4: checking for NULL instead of IS_ERR
  drm/vc4: fix itnull.cocci warnings
  drm/vc4: fix platform_no_drv_owner.cocci warnings
  drm/vc4: vc4_plane_duplicate_state() can be static
  ...
2015-11-19 20:39:38 -08:00
Linus Torvalds cd6caf550a ome fixes for small IPMI problems.
The most significant is that the driver wasn't starting the timer
 for some messages, which would result in problems if that message
 failed for some reason.
 
 The others are small optimizations or making things a little neater.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlZJzFwACgkQIXnXXONXERdixwCgkRS9tI+wx6+zEc4aAS32mf5P
 WP0AnAiNis95hl1WJmhept0ACWte4ijX
 =oOmj
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-4.4' of git://git.code.sf.net/p/openipmi/linux-ipmi

Pull IPMI updates from Corey Minyard:
 "Some fixes for small IPMI problems.

  The most significant is that the driver wasn't starting the timer for
  some messages, which would result in problems if that message failed
  for some reason.

  The others are small optimizations or making things a little neater"

* tag 'for-linus-4.4' of git://git.code.sf.net/p/openipmi/linux-ipmi:
  ipmi watchdog : add panic_wdt_timeout parameter
  char: ipmi: Move MODULE_DEVICE_TABLE() to follow struct
  ipmi: Stop the timer immediately if idle
  ipmi: Start the timer and thread on internal msgs
2015-11-19 18:14:47 -08:00
Linus Torvalds 8bdddfae65 SH Drivers Updates for v4.4
* Remove now unnecessary reference to CONFIG_ARCH_SHMOBILE_MULTI
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWTmroAAoJENfPZGlqN0++sFcP/1s4uHzAZiTQcLjyKQd5d77q
 O+cjw+J8WlzyU9RrIc2AI143UgprfHiSUREDx9awY8c1XTxU1O9nB1wzNm3arWTs
 EHH0EVVHD7o8ZviCaKFW64uj8e8t5rnojtODukKuTUAOF19jyV5C7YTMuRHsGzZk
 B0jNEPH/ZlMQEVHeF/4mUWUDSuh3F9ptYbffExUVgANDSANOLUqiyp9CavIdFDAZ
 cP6KU4lMgK+MmCxVW42vhoXcWSphlLWnJWi8NiFAqaYg12YoDYgbmYraG3JugIiz
 WR+k5xCQS/ptsp4oOFJ64dmUx4VcVaJA9V0Ad2921ytI4Ryi9mIK3ooEwiday+Sj
 Y4m5AsDBApeSJU8cu7fcfEmvutq9+m2TtJuKGnmubCu2eHhYePdmrfObZyeFy4Lm
 ZPrN8UO7U3zTF1gXQgQ7OU4ZdhZ3x879EfsCubro491mEv5Zii6hQzI71dKJF9rw
 7SySKOR5V8rXG26AXYV5GwxUX+DKHkqtmQ3MMxGvly8K7nhPyoAP88q1uElIhfqE
 /ht9m+svcdmF5BtklHVqePu3fv7sJnMTAN8AG3ZY4BXePW5EMDFxOBAO5QE1gdT0
 pPUCRaKifiOfb2SwwIxM3ns6OJhcQN3YI7i/ymAvTOhAqUrAEfTOMsYiT/vOFkF0
 alPYP0IEsK5o0nSqlpji
 =pRoE
 -----END PGP SIGNATURE-----

Merge tag 'renesas-sh-drivers-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas

Pull SH driver fixlet from Simon Horman:
 "I am sending this change after v4.4-rc1 has been released as it
  depends on SoC changes which are present in that rc:

   = Remove now unnecessary reference to CONFIG_ARCH_SHMOBILE_MULTI"

* tag 'renesas-sh-drivers-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  drivers: sh: Get rid of CONFIG_ARCH_SHMOBILE_MULTI
2015-11-19 17:58:44 -08:00
Rafael J. Wysocki a3767e3c9d Merge branches 'acpi-smbus', 'acpi-ec' and 'acpi-pci'
* acpi-smbus:
  Revert "ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook"
  ACPI / SMBus: Fix boot stalls / high CPU caused by reentrant code

* acpi-ec:
  ACPI-EC: Drop unnecessary check made before calling acpi_ec_delete_query()

* acpi-pci:
  PCI: Fix OF logic in pci_dma_configure()
2015-11-20 01:22:52 +01:00
Rafael J. Wysocki 0aba0ab891 Merge branch 'pm-sleep'
* pm-sleep:
  PM / wakeirq: check that wake IRQ is valid before accepting it
2015-11-20 01:22:33 +01:00
Rafael J. Wysocki 9832bf3a35 Merge branches 'pm-cpufreq' and 'acpi-cppc'
* pm-cpufreq:
  Revert "Documentation: kernel_parameters for Intel P state driver"
  cpufreq: mediatek: fix build error
  cpufreq: intel_pstate: Add separate support for Airmont cores
  cpufreq: intel_pstate: Replace BYT with ATOM
  Revert "cpufreq: intel_pstate: Use ACPI perf configuration"
  Revert "cpufreq: intel_pstate: Avoid calculation for max/min"

* acpi-cppc:
  ACPI / CPPC: Use h/w reduced version of the PCCT structure
2015-11-20 01:22:10 +01:00
Suravee Suthikulpanit 768acd64d6 PCI: Fix OF logic in pci_dma_configure()
This patch fixes a bug introduced by previous commit,
which incorrectly checkes the of_node of the end-point device.
Instead, it should check the of_node of the host bridge.

Fixes: 50230713b6 ("PCI: OF: Move of_pci_dma_configure() to pci_dma_configure()")
Reported-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-20 01:20:36 +01:00
Dave Airlie 2d591ab18a Merge tag 'drm-intel-fixes-2015-11-19' of git://anongit.freedesktop.org/drm-intel into drm-fixes
i915 fixes for 4.4, including the revert for the backlight regression
Olof reported. Otherwise fixes all around.

* tag 'drm-intel-fixes-2015-11-19' of git://anongit.freedesktop.org/drm-intel:
  Revert "drm/i915: skip modeset if compatible for everyone."
  drm/i915: Consider SPLL as another shared pll, v2.
  drm/i915: Fix gpu frequency change tracing
  drm/i915: Don't clobber the addfb2 ioctl params
  drm/i915: Clear intel_crtc->atomic before updating it.
  drm/i915: get runtime PM reference around GEM set_caching IOCTL
  drm/i915: Fix GT frequency rounding
  drm/i915: quirk backlight present on Macbook 4, 1
  drm/i915: Fix crtc_y assignment in intel_find_initial_plane_obj()
2015-11-20 09:45:31 +10:00
Dave Airlie db3956372f Merge tag 'topic/drm-fixes-2015-11-19' of git://anongit.freedesktop.org/drm-intel into drm-fixes
Here are some drm core fixes for v4.4 that I've picked up. Atomic fixes
from Maarten, and atomic helper fixes from Ville and Daniel.

Admittedly the topmost commit didn't sit in our tree for very long, but
does come with reviews and testing from trustworthy people.

* tag 'topic/drm-fixes-2015-11-19' of git://anongit.freedesktop.org/drm-intel:
  drm/atomic-helper: Check encoder/crtc constraints
  drm: Fix primary plane size for stereo doubled modes for legacy setcrtc
  drm/core: Fix old_fb handling in pan_display_atomic.
  drm/core: Fix old_fb handling in restore_fbdev_mode_atomic.
  drm/atomic: add a drm_atomic_clean_old_fb helper.
  drm/core: Fix old_fb handling in drm_mode_atomic_ioctl.
  drm/core: Set legacy_cursor_update in drm_atomic_helper_disable_plane.
2015-11-20 09:44:50 +10:00
Linus Torvalds b4ba1f0f65 arm64 fixes:
- Fix size alignment in __iommu_{alloc,free}_attrs
 - Kernel memory mapping fix with CONFIG_DEBUG_RODATA for page sizes
   other than 4KB and a fix of the mark_rodata_ro permissions
 - dma_get_ops() simplification and behaviour alignment between DT and
   ACPI
 - function_graph trace fix for cpu_suspend() (CPUs returning from deep
   sleep via a different path and confusing the tracer)
 - Use of non-global mappings for UEFI run-time services to avoid a
   (potentially theoretical) TLB conflict
 - Crypto priority reduction of core AES cipher (the accelerated
   asynchronous implementation is preferred when available)
 - Reverting an old commit that removed BogoMIPS from /proc/cpuinfo on
   arm64. Apparently, we had it for a relatively short time and libvirt
   started checking for its presence
 - Compiler warnings fixed (ptrace.h inclusion from compat.h,
   smp_load_acquire with const argument)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWThvSAAoJEGvWsS0AyF7xkVYP/RyUyPqpHKGvW0Xci+hZWEoa
 BCUwvzFrWLGetU1KLHTMn9ZhRCP5ZkQht+Px+LbruxYylVYCvBnip8XJIWPdeMhe
 gDN9PrKlrPoRhNYFMZMnHCks+8zdV5Pt5bByvMaI+/LNBnvBw/qSwneWMnroiugM
 X0AC4McYlnzBxK/bF5A6tH82Iy0O+kfHi973vP+VN0/am5dK8AjzSHf/fwsMqIUx
 TWMDJ5xcNxTKCWYimm1Ro2AI3RIxsb26BsGPn2VzM3bYOVbalwL5MXbG0TSjeXqU
 qI9yQObQQMZRyyb1WCBHejGiKQB+9vHz/sKpeMN/cE+S6YCNhqa/ZU6rhT8BhmGN
 KtbizNiYOrLjg+iY61giF+RmoXhXAL/4SHy57Abq73JAxrZzta7uKiJUpnOSL9kw
 LpMxcT7lJWaExOTur7DqP/rVDBK4ESQ5Kbi2/U1aJLJh4zdie0WcJsysn8yGw/x4
 w3FUYrAgX+2JTfm1fLZfuApXzCtbz1jeImWje5vTQhcyiuiLq5exJig8pYzBNjj4
 omrs16jr6WybWiIww/E0SGrTUBl7ZdndYyZJCr0dI+lRamyg3uhck0Fs5HJomaY0
 mzUJk7x+IPs2MNJmqFaSSg02COCEWItQalpWVo5g+QDUsbIhBtnn7oQJ7VOXBw+V
 d+feoRHJZIs1zbL9/5h7
 =qnPq
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Fix size alignment in __iommu_{alloc,free}_attrs

 - Kernel memory mapping fix with CONFIG_DEBUG_RODATA for page sizes
   other than 4KB and a fix of the mark_rodata_ro permissions

 - dma_get_ops() simplification and behaviour alignment between DT and
   ACPI

 - function_graph trace fix for cpu_suspend() (CPUs returning from deep
   sleep via a different path and confusing the tracer)

 - Use of non-global mappings for UEFI run-time services to avoid a
   (potentially theoretical) TLB conflict

 - Crypto priority reduction of core AES cipher (the accelerated
   asynchronous implementation is preferred when available)

 - Reverting an old commit that removed BogoMIPS from /proc/cpuinfo on
   arm64.  Apparently, we had it for a relatively short time and libvirt
   started checking for its presence

 - Compiler warnings fixed (ptrace.h inclusion from compat.h,
   smp_load_acquire with const argument)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: restore bogomips information in /proc/cpuinfo
  arm64: barriers: fix smp_load_acquire to work with const arguments
  arm64: Fix R/O permissions in mark_rodata_ro
  arm64: crypto: reduce priority of core AES cipher
  arm64: use non-global mappings for UEFI runtime regions
  arm64: kernel: pause/unpause function graph tracer in cpu_suspend()
  arm64: do not include ptrace.h from compat.h
  arm64: simplify dma_get_ops
  arm64: mm: use correct mapping granularity under DEBUG_RODATA
  arm64/dma-mapping: Fix sizes in __iommu_{alloc,free}_attrs
2015-11-19 12:21:23 -08:00
Linus Torvalds a3d66b5a17 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching
Pull livepatching fix from Jiri Kosina:
 "A fix for module handling in case kASLR has been enabled, from Zhou
  Chengming"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
  livepatch: x86: fix relocation computation with kASLR
2015-11-19 12:16:12 -08:00
Linus Torvalds 319645cac2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
 "Two functional fixes for wacom HID driver from Ping Cheng and Jiri
  Kosina"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: wacom: fixup quirks setup for WACOM_DEVICETYPE_PAD
  HID: wacom: Add outbounding area for DTU1141
2015-11-19 12:10:51 -08:00
Linus Torvalds 1282ac407c MMC core:
- Improve reliability when selecting HS200 mode
  - Improve reliability when selecting HS400 mode
  - mmc: remove bondage between REQ_META and reliable write
 
 MMC host:
  - pxamci: Fix read-only gpio detection polarity
  - mtk-sd: Preinitialize delay_phase to fix the case when delay is zero
  - android-goldfish: Fix build dependency by adding HAS_DMA
  - dw_mmc: Remove Seungwon Jeon from MAINTAINERS
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWTZxbAAoJEP4mhCVzWIwpN0MP/3Op47ik1L9CqZphjT5D2PJV
 FHb5lZVWGwLpLugpILnesIWl1YeZ47touOi4Krs1I8V8Qh7IWMWWdPuiCrYsx329
 J39OSisTHC8NVNXG/+JhSKUwaKe/yYvqJOjK8bVMG/9U0uzHyFo/OU8MZnZz8rDU
 bKB3KWolSdREACt9Mz5R4r4HXB384/FQ4YdNzZtDtu16zki5E8r5R7nj0d2FURXq
 vZyGG5cMnTpMtRjoXOVG+fCw2tYCZcFG+focWrg1E+GtU952hpe114F1QG6mvkqc
 9aJvBqDDLEroM8BLhnOgxdE8dE3wjOsDIMDUi3gtatNzpJ5b/5cN2rY8dvThGO1k
 kjx+u/MtGSTy6imB80GFpqN8XMm/m1+15N2T3p+UjiZiR9kUhS/cjYtA3AeelWLq
 x0oAUtJDAtAs8RccGJqh9rBw/PeYYWU4/cQ8Zs+7BrrPrk+OTu6NyD8lKMDY4kKl
 ikWj60UrzmIr9D52Sy1YgxV+Y0RwWIPUBtZDBZzC5g+61e60Ay6sS91EVuiXcpdS
 FowP+Dw+lxbD0j4urq55Q4CLVTcZGY2kfrzoBYy8NCqu3DWAf6hWmlY8+0WrfYXh
 Gm0bk5JWI+H2YlXZqADUQDhWbWfRYLv9q9AxNl1fKBvEVxPaz0/279L6ThtTzwYz
 gooQT2VmrJndyyty/FE1
 =X/qJ
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v4.4-rc1' of git://git.linaro.org/people/ulf.hansson/mmc

Pull MMC fixes from Ulf Hansson:
 "Here are some mmc fixes intended for v4.4 rc2.  It's based on a commit
  prior rc1 as I wanted to get them a bit more tested in next before
  sending you the pull request.

  MMC core:
   - Improve reliability when selecting HS200 mode
   - Improve reliability when selecting HS400 mode
   - mmc: remove bondage between REQ_META and reliable write

  MMC host:
   - pxamci: Fix read-only gpio detection polarity
   - mtk-sd: Preinitialize delay_phase to fix the case when delay is zero
   - android-goldfish: Fix build dependency by adding HAS_DMA
   - dw_mmc: Remove Seungwon Jeon from MAINTAINERS"

* tag 'mmc-v4.4-rc1' of git://git.linaro.org/people/ulf.hansson/mmc:
  mmc: remove bondage between REQ_META and reliable write
  mmc: MMC_GOLDFISH should depend on HAS_DMA
  mmc: mediatek: Preinitialize delay_phase in get_best_delay()
  MAINTAINERS: mmc: Remove Seungwon Jeon from dw_mmc
  mmc: mmc: Improve reliability of mmc_select_hs400()
  mmc: mmc: Move mmc_switch_status()
  mmc: mmc: Fix HS setting in mmc_select_hs400()
  mmc: mmc: Improve reliability of mmc_select_hs200()
  mmc: pxamci: fix read-only gpio detection polarity
2015-11-19 11:33:58 -08:00
Yang Shi 92e788b749 arm64: restore bogomips information in /proc/cpuinfo
As previously reported, some userspace applications depend on bogomips
showed by /proc/cpuinfo. Although there is much less legacy impact on
aarch64 than arm, it does break libvirt.

This patch reverts commit 326b16db9f ("arm64: delay: don't bother
reporting bogomips in /proc/cpuinfo"), but with some tweak due to
context change and without the pr_info().

Fixes: 326b16db9f ("arm64: delay: don't bother reporting bogomips in /proc/cpuinfo")
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org> # 3.12+
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-19 17:57:18 +00:00
Daniel Vetter 5481c8fb1d drm/atomic-helper: Check encoder/crtc constraints
This was totally lost when I originally created the atomic helpers.

We probably should also check possible_clones in the helpers, but
since the legacy ones didn't do that this is for a separate patch.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Stone <daniels@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1447868808-10266-1-git-send-email-daniel.vetter@ffwll.ch
2015-11-19 17:11:13 +02:00
Jani Nikula 7383123647 Revert "drm/i915: skip modeset if compatible for everyone."
This reverts

commit 6764e9f872
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Thu Aug 27 15:44:06 2015 +0200

    drm/i915: skip modeset if compatible for everyone.

Bring back the i915.fastboot module parameter, disabled by default, due
to backlight regression on Chromebook Pixel 2015.

Apparently the firmware of the Chromebook in question enables the panel
but disables backlight to avoid a brief garbage scanout upon loading the
kernel/module. With fastboot, we leave the backlight untouched, in this
case disabled. The user would have to do a modeset (i.e. not just crank
up the brightness) to enable the backlight.

There is no clean fix readily available, so get back to the drawing
board by reverting.

[N.B. The reference below is for when the thread was included on public
lists, and some of the context had already been dropped by then.]

Reported-and-tested-by: Olof Johansson <olof@lixom.net>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
References: http://marc.info/?i=CAKMK7uES7xk05ki92oeX6gmvZWAh9f2vL7yz=6T+fGK9J3X7cQ@mail.gmail.com
Fixes: 6764e9f872 ("drm/i915: skip modeset if compatible for everyone.")
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1447921590-3785-1-git-send-email-jani.nikula@intel.com
2015-11-19 10:38:09 +02:00
Wang, Rui Y f6619ef750 drm/mgag200: fix kernel hang in cursor code.
The machine hang completely with the following message on the console:

[  487.777538] BUG: unable to handle kernel NULL pointer dereference at 0000000000000060
[  487.777554] IP: [<ffffffff8158aaee>] _raw_spin_lock+0xe/0x30
[  487.777557] PGD 42e9f7067 PUD 42f2fa067 PMD 0
[  487.777560] Oops: 0002 [#1] SMP
...
[  487.777618] CPU: 21 PID: 3190 Comm: Xorg Tainted: G            E   4.4.0-rc1-3-default+ #6
[  487.777620] Hardware name: Intel Corporation BRICKLAND/BRICKLAND, BIOS BRHSXSD1.86B.0059.R00.1501081238 01/08/2015
[  487.777621] task: ffff880853ae4680 ti: ffff8808696d4000 task.ti: ffff8808696d4000
[  487.777625] RIP: 0010:[<ffffffff8158aaee>]  [<ffffffff8158aaee>] _raw_spin_lock+0xe/0x30
[  487.777627] RSP: 0018:ffff8808696d79c0  EFLAGS: 00010246
[  487.777628] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  487.777629] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000060
[  487.777630] RBP: ffff8808696d79e0 R08: 0000000000000000 R09: ffff88086924a780
[  487.777631] R10: 000000000001bb40 R11: 0000000000003246 R12: 0000000000000000
[  487.777632] R13: ffff880463a27360 R14: ffff88046ca50218 R15: 0000000000000080
[  487.777634] FS:  00007f3f81c5a8c0(0000) GS:ffff88086f060000(0000) knlGS:0000000000000000
[  487.777635] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  487.777636] CR2: 0000000000000060 CR3: 000000042e678000 CR4: 00000000001406e0
[  487.777638] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  487.777639] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  487.777639] Stack:
[  487.777642]  ffffffffa00eb5fa ffff8808696d7b60 ffff88086b87d800 0000000000000000
[  487.777644]  ffff8808696d7ac8 ffffffffa01694b6 ffff8808696d7ae8 ffffffff8109c8d5
[  487.777647]  ffff880469158740 ffff880463a27000 ffff88086b87d800 ffff88086b87d800
[  487.777647] Call Trace:
[  487.777674]  [<ffffffffa00eb5fa>] ? drm_gem_object_lookup+0x1a/0xa0 [drm]
[  487.777681]  [<ffffffffa01694b6>] mga_crtc_cursor_set+0xc6/0xb60 [mgag200]
[  487.777691]  [<ffffffff8109c8d5>] ? find_busiest_group+0x35/0x4a0
[  487.777696]  [<ffffffff81086294>] ? __might_sleep+0x44/0x80
[  487.777699]  [<ffffffff815888c2>] ? __ww_mutex_lock+0x22/0x9c
[  487.777722]  [<ffffffffa0104f64>] ? drm_modeset_lock+0x34/0xf0 [drm]
[  487.777733]  [<ffffffffa0148d9e>] restore_fbdev_mode+0xee/0x2a0 [drm_kms_helper]
[  487.777742]  [<ffffffffa014afce>] drm_fb_helper_restore_fbdev_mode_unlocked+0x2e/0x70 [drm_kms_helper]
[  487.777748]  [<ffffffffa014b037>] drm_fb_helper_set_par+0x27/0x50 [drm_kms_helper]
[  487.777752]  [<ffffffff8134560c>] fb_set_var+0x18c/0x3f0
[  487.777777]  [<ffffffffa02a9b0a>] ? __ext4_handle_dirty_metadata+0x8a/0x210 [ext4]
[  487.777783]  [<ffffffff8133cb97>] fbcon_blank+0x1b7/0x2b0
[  487.777790]  [<ffffffff813be2a3>] do_unblank_screen+0xb3/0x1c0
[  487.777795]  [<ffffffff813b5aba>] vt_ioctl+0x118a/0x1210
[  487.777801]  [<ffffffff813a8fe0>] tty_ioctl+0x3f0/0xc90
[  487.777808]  [<ffffffff81172018>] ? kzfree+0x28/0x30
[  487.777813]  [<ffffffff811e053f>] ? mntput+0x1f/0x30
[  487.777817]  [<ffffffff811d3f5d>] do_vfs_ioctl+0x30d/0x570
[  487.777822]  [<ffffffff8107ed3a>] ? task_work_run+0x8a/0xa0
[  487.777825]  [<ffffffff811d4234>] SyS_ioctl+0x74/0x80
[  487.777829]  [<ffffffff8158aeae>] entry_SYSCALL_64_fastpath+0x12/0x71
[  487.777851] Code: 65 ff 0d ce 02 a8 7e 5d c3 ba 01 00 00 00 f0 0f b1 17 85 c0 75 e8 b0 01 5d c3 0f 1f 00 65 ff 05 b1 02 a8 7e 31 c0 ba 01 00 00 00 <f0> 0f b1 17 85 c0 75 01 c3 55 89 c6 48 89 e5 e8 4e f5 b1 ff 5d
[  487.777854] RIP  [<ffffffff8158aaee>] _raw_spin_lock+0xe/0x30
[  487.777855]  RSP <ffff8808696d79c0>
[  487.777856] CR2: 0000000000000060
[  487.777860] ---[ end trace 672a2cd555e0ebd3 ]---

The cursor code may be entered with file_priv == NULL && handle == NULL.
The problem was introduced by:

"bf89209 drm/mga200g: Hold a proper reference for cursor_set"

which calls drm_gem_object_lookup(dev, file_priv...). Previously this wasn't
a problem because we checked the handle. Move the check early in the function
can fix the problem.

Signed-off-by: Rui Wang <rui.y.wang@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-11-19 13:20:01 +10:00
Dave Airlie e6c84acb3a Merge branch 'drm-vc4-fixes' of git://github.com/anholt/linux into drm-fixes
Here are a few little VC4 fixes for 4.4 that I didn't get in to you
before the -next pull request.  I dropped the feature-ish one I'd
mentioned, and also droppped the one I saw you included in the last
-fixes pull request.

* 'drm-vc4-fixes' of git://github.com/anholt/linux:
  drm/vc4: Make sure that planes aren't scaled.
  drm/vc4: Fix some failure to track __iomem decorations on pointers.
  drm/vc4: checking for NULL instead of IS_ERR
  drm/vc4: fix itnull.cocci warnings
  drm/vc4: fix platform_no_drv_owner.cocci warnings
  drm/vc4: vc4_plane_duplicate_state() can be static
2015-11-19 13:17:08 +10:00
Dave Airlie 8ed59fd6d4 Merge branch 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Radeon and amdgpu fixes for 4.4.  A bit more the usual since I missed
last week.  Misc fixes all over the place.  The big changes are the
tiling configuration fixes for Fiji.

* 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux: (35 commits)
  drm/amdgpu: reserve/unreserve objects out of map/unmap operations
  drm/amdgpu: move bo_reserve out of amdgpu_vm_clear_bo
  drm/amdgpu: add lock for interval tree in vm
  drm/amdgpu: keep the owner for VMIDs
  drm/amdgpu: move VM manager clean into the VM code again
  drm/amdgpu: cleanup VM coding style
  drm/amdgpu: remove unused VM manager field
  drm/amdgpu: cleanup scheduler command submission
  drm/amdgpu: fix typo in firmware name
  drm/amdgpu: remove the unnecessary parameter adev for amdgpu_sa_bo_new()
  drm/amdgpu: wait interruptible when semaphores are disabled v2
  drm/amdgpu: update pd while updating vm as well
  drm/amdgpu: fix handling order in scheduler CS
  drm/amdgpu: fix incorrect mutex usage v3
  drm/amdgpu: cleanup scheduler fence get/put dance
  drm/amdgpu: add command submission workflow tracepoint
  drm/amdgpu: update Fiji's tiling mode table
  drm/amdgpu: fix bug that can't enter thermal interrupt for bonaire.
  drm/amdgpu: fix seq_printf format string
  drm/radeon: fix quirk for MSI R7 370 Armor 2X
  ...
2015-11-19 13:15:17 +10:00
Rafael J. Wysocki 3bf7f56e70 Revert "Documentation: kernel_parameters for Intel P state driver"
Revert commit 053f56def5 (Documentation: kernel_parameters for Intel P
state driver) as the code documented by it has been reverted already.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-19 00:42:23 +01:00
Arnd Bergmann 2d4ee30367 cpufreq: mediatek: fix build error
The recently added mt8173 cpufreq driver relies on the cpu topology
that is always present on ARM64 but optional on ARM32:

drivers/cpufreq/mt8173-cpufreq.c: In function 'mtk_cpufreq_init':
drivers/cpufreq/mt8173-cpufreq.c:441:30: error: 'cpu_topology' undeclared (first use in this function)
  cpumask_copy(policy->cpus, &cpu_topology[policy->cpu].core_sibling);

This refines the Kconfig dependencies so that we can still build on
ARM32, but only if COMPILE_TEST is selected and the CPU topology
code is present.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-19 00:21:47 +01:00
Philippe Longepe 1421df63c3 cpufreq: intel_pstate: Add separate support for Airmont cores
There are two flavors of Atom cores to be supported by intel_pstate,
Silvermont and Airmont, so make the driver distinguish between them by
adding separate frequency tables.

Separate the CPU defaults params for each of them and match the CPU IDs
against them as appropriate.

Signed-off-by: Philippe Longepe <philippe.longepe@linux.intel.com>
Signed-off-by: Stephane Gasparini <stephane.gasparini@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw: Subject and changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-19 00:21:46 +01:00
Philippe Longepe 938d21a2a6 cpufreq: intel_pstate: Replace BYT with ATOM
Rename symbol and function names starting with "BYT" or "byt" to
start with "ATOM" or "atom", respectively, so as to make it clear
that they may apply to Atom in general and not just to Baytrail
(the goal is to support several Atoms architectures eventually).

This should not lead to any functional changes.

Signed-off-by: Philippe Longepe <philippe.longepe@linux.intel.com>
Signed-off-by: Stephane Gasparini <stephane.gasparini@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw : Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-19 00:21:46 +01:00
Rafael J. Wysocki 6ee11e413c Revert "cpufreq: intel_pstate: Use ACPI perf configuration"
Revert commit 37afb00032 (cpufreq: intel_pstate: Use ACPI perf
configuration) that is reported to cause a regression to happen
on a system where invalid data are returned by the ACPI _PSS object.

Since that commit makes assumptions regarding the _PSS output
correctness that may turn out to be overly optimistic in general,
there is a concern that it may introduce regression on more
systems, so it's better to revert it now and we'll revisit the
underlying issue in the next cycle with a more robust solution.

Conflicts:
        drivers/cpufreq/intel_pstate.c

Fixes: 37afb00032 (cpufreq: intel_pstate: Use ACPI perf configuration)
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-19 00:20:42 +01:00
Rafael J. Wysocki 799281a3c4 Revert "cpufreq: intel_pstate: Avoid calculation for max/min"
Revert commit 4ef4514870 (cpufreq: intel_pstate: Avoid calculation for
max/min) as it depends on commit 37afb00032 (cpufreq: intel_pstate: Use
ACPI perf configuration) that causes problems to happen and needs to be
reverted.

Conflicts:
	drivers/cpufreq/intel_pstate.c

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-11-18 23:29:56 +01:00
Will Deacon c139aa60c1 arm64: barriers: fix smp_load_acquire to work with const arguments
A newly introduced function in include/net/sock.h passes a const
argument to smp_load_acquire:

  static inline int sk_state_load(const struct sock *sk)
  {
	return smp_load_acquire(&sk->sk_state);
  }

This cause an allmodconfig build failure, since our underlying
load-acquire implementation does not handle const types correctly:

  include/net/sock.h: In function 'sk_state_load':
  ./arch/arm64/include/asm/barrier.h:71:3: error: read-only variable '___p1' used as 'asm' output
     asm volatile ("ldarb %w0, %1"    \

This patch fixes the problem by reusing the trick in READ_ONCE that
loads via a non-const member of an anonymous union. This has the
advantage of allowing us to use smp_load_acquire on packed structures
(e.g. arch_spinlock_t) as well as primitive types.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Daney <david.daney@cavium.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: David Daney <david.daney@cavium.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-11-18 18:06:43 +00:00
Linus Torvalds 34258a32d9 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky:
 "Assorted bug fixes, the mlock2 system call gets added, and one
  improvement.  The boot from dasd devices is now possible from a wider
  range of devices"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390: remove SALIPL loader
  s390: wire up mlock2 system call
  s390: remove g5 elf platform support
  s390: avoid cache aliasing under z/VM and KVM
  s390/sclp: _sclp_wait_int(): retain full PSW mask
  s390/zcrypt: Fix initialisation when zcrypt is built-in
  s390/zcrypt: Fix kernel crash on systems without AP bus support
  s390: add support for ipl devices in subchannel sets > 0
  s390/ipl: fix out of bounds access in scpdata_write
  s390/pci_dma: improve debugging of errors during dma map
  s390/pci_dma: handle dma table failures
  s390/pci_dma: unify label of invalid translation table entries
  s390/syscalls: remove system call number calculation
  s390/cio: simplify css_generate_pgid
  s390/diag: add a s390 prefix to the diagnose trace point
  s390/head: fix error message on unsupported hardware
2015-11-18 08:59:29 -08:00
Linus Torvalds 0d77a123ff hwmon fixes for v4.4-rc2
Fix build issues in scpi and ina2xx drivers, update scpi driver to
 support recent firmware, and fix an uninitialized variable warning
 in applesmc driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWTKdFAAoJEMsfJm/On5mBOVQP/RUuwr/ugCSxX4FalU6CdUoW
 bKmtTKNQhSFtY/4w+hOzqcJu0WcpLA8CbHkwG8bB3wZqEcHMASzd9ajNZb1vVh5v
 Aj61PCJTelv36w7Nt6NZ2dkymYSjkW72YPAt+dzMIn7HIJ2cxjJtvUdH87BE9rDq
 oGeIQ246z5ytXNJvl/MHRHGrf3RXMPrsTcTvvPMXWZovUD4x+HQ1CvYY5VGPYA8N
 dhOZGwy3S6/WOnSnKqUxLJCNj/Bi/GyXWHAzLKLl9dGeUp3wbrWJnve1uLNMwSS3
 w7ImPKkYGsUN2Z2uJHiyW967gXjpfVav1545eaP/Co52tzIeAbvyXU0EacjM0fU0
 UQ4MMyFglNrBJd1yDiVeZQsjeHfqOMVDJFwF6UIXFuKWx5R4RlEe0R5YKf4oBNtK
 4ad+n2kHnEGQFdWwirbeiwCBEB6M7Vrv58OZypJRmYxkfgR8x77Tq8tceCPYf6g4
 fimcWRr4uuTKooQyhHDrej+/2RFH0acvw2xwypjWj2FkBwV045ZvDogY8syPIB+0
 1BJs40ZlV6WXaffHHco//ZLXtOgZ62UKHkLng9knMBjAcKmkPbn4+amym/Y18yVr
 fTVBt8iiCIVhtXIAHG34fvUDec3EyjYgc2FvtpuHqb2vUF6T75xOzxvpDW5fgYQo
 tttvfy8fKOUyF+4aanMf
 =JYMV
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Fix build issues in scpi and ina2xx drivers, update scpi driver to
  support recent firmware, and fix an uninitialized variable warning in
  applesmc driver"

* tag 'hwmon-for-linus-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (scpi) skip unsupported sensors properly
  hwmon: (scpi) add thermal-of dependency
  hwmon : (applesmc) Fix uninitialized variables warnings
  hwmon: (ina2xx) Fix build issue by selecting REGMAP_I2C
2015-11-18 08:43:29 -08:00
Chunming Zhou 49b02b180a drm/amdgpu: reserve/unreserve objects out of map/unmap operations
Change-Id: Id6514f2fb6e002437fdbe99353d5d35f4ac736c7
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2015-11-18 11:41:20 -05:00
Chunming Zhou ef9f0a83d6 drm/amdgpu: move bo_reserve out of amdgpu_vm_clear_bo
Change-Id: Ifbb0c06680494bfa04d0be5e5941d31ae2e5ef28
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2015-11-18 11:41:02 -05:00
Chunming Zhou c25867dfab drm/amdgpu: add lock for interval tree in vm
Change-Id: I62b892a22af37b32e6b4aefca80a25cf45426ed2
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2015-11-18 11:40:55 -05:00
Christian König 1c16c0a7b2 drm/amdgpu: keep the owner for VMIDs
We don't need the last VM use any more, keep the owner directly.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <davdi1.zhou@amd.com>
2015-11-18 11:40:37 -05:00
Christian König ea89f8c9e8 drm/amdgpu: move VM manager clean into the VM code again
It's not a good idea to duplicate that code.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <davdi1.zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-18 11:40:27 -05:00