]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:35:21 +0000 (11:35 +1100)]
Merge remote-tracking branch 'kbuild/for-next'

8 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Thu, 11 Feb 2016 00:32:43 +0000 (11:32 +1100)]
Merge remote-tracking branch 'v4l-dvb/master'

8 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:31:18 +0000 (11:31 +1100)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

8 years agoMerge branch 'dmi/master'
Stephen Rothwell [Thu, 11 Feb 2016 00:31:14 +0000 (11:31 +1100)]
Merge branch 'dmi/master'

8 years agoMerge branch 'jdelvare-hwmon/master'
Stephen Rothwell [Thu, 11 Feb 2016 00:29:51 +0000 (11:29 +1100)]
Merge branch 'jdelvare-hwmon/master'

8 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:28:20 +0000 (11:28 +1100)]
Merge remote-tracking branch 'hid/for-next'

8 years agoMerge remote-tracking branch 'pci/next'
Stephen Rothwell [Thu, 11 Feb 2016 00:23:43 +0000 (11:23 +1100)]
Merge remote-tracking branch 'pci/next'

8 years agoMerge remote-tracking branch 'vfs/for-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:23:30 +0000 (11:23 +1100)]
Merge remote-tracking branch 'vfs/for-next'

8 years agoMerge remote-tracking branch 'xfs/for-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:14:08 +0000 (11:14 +1100)]
Merge remote-tracking branch 'xfs/for-next'

8 years agoMerge remote-tracking branch 'orangefs/for-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:12:33 +0000 (11:12 +1100)]
Merge remote-tracking branch 'orangefs/for-next'

8 years agoMerge remote-tracking branch 'nfsd/nfsd-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:11:05 +0000 (11:11 +1100)]
Merge remote-tracking branch 'nfsd/nfsd-next'

8 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:08:57 +0000 (11:08 +1100)]
Merge remote-tracking branch 'nfs/linux-next'

8 years agoMerge remote-tracking branch 'gfs2/for-next'
Stephen Rothwell [Thu, 11 Feb 2016 00:07:30 +0000 (11:07 +1100)]
Merge remote-tracking branch 'gfs2/for-next'

8 years agoMerge remote-tracking branch 'fscache/fscache'
Stephen Rothwell [Thu, 11 Feb 2016 00:07:15 +0000 (11:07 +1100)]
Merge remote-tracking branch 'fscache/fscache'

8 years agoMerge remote-tracking branch 'f2fs/dev'
Stephen Rothwell [Thu, 11 Feb 2016 00:05:51 +0000 (11:05 +1100)]
Merge remote-tracking branch 'f2fs/dev'

8 years agoMerge remote-tracking branch 'ext4/dev'
Stephen Rothwell [Thu, 11 Feb 2016 00:04:19 +0000 (11:04 +1100)]
Merge remote-tracking branch 'ext4/dev'

8 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Wed, 10 Feb 2016 23:54:16 +0000 (10:54 +1100)]
Merge remote-tracking branch 'ext3/for_next'

8 years agoMerge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Wed, 10 Feb 2016 23:52:47 +0000 (10:52 +1100)]
Merge remote-tracking branch 'ecryptfs/next'

8 years agoMerge remote-tracking branch 'ceph/master'
Stephen Rothwell [Wed, 10 Feb 2016 23:52:42 +0000 (10:52 +1100)]
Merge remote-tracking branch 'ceph/master'

8 years agoMerge remote-tracking branch 'btrfs-kdave/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:51:14 +0000 (10:51 +1100)]
Merge remote-tracking branch 'btrfs-kdave/for-next'

8 years agoMerge remote-tracking branch 'xtensa/for_next'
Stephen Rothwell [Wed, 10 Feb 2016 23:49:44 +0000 (10:49 +1100)]
Merge remote-tracking branch 'xtensa/for_next'

8 years agoMerge remote-tracking branch 'uml/linux-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:48:18 +0000 (10:48 +1100)]
Merge remote-tracking branch 'uml/linux-next'

8 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Wed, 10 Feb 2016 23:46:54 +0000 (10:46 +1100)]
Merge remote-tracking branch 'tile/master'

8 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Wed, 10 Feb 2016 23:45:28 +0000 (10:45 +1100)]
Merge remote-tracking branch 's390/features'

8 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:43:57 +0000 (10:43 +1100)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

8 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Wed, 10 Feb 2016 23:42:32 +0000 (10:42 +1100)]
Merge remote-tracking branch 'microblaze/next'

8 years agoMerge remote-tracking branch 'metag/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:41:07 +0000 (10:41 +1100)]
Merge remote-tracking branch 'metag/for-next'

8 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:39:43 +0000 (10:39 +1100)]
Merge remote-tracking branch 'm68knommu/for-next'

8 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:38:20 +0000 (10:38 +1100)]
Merge remote-tracking branch 'm68k/for-next'

8 years agoMerge remote-tracking branch 'h8300/h8300-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:36:52 +0000 (10:36 +1100)]
Merge remote-tracking branch 'h8300/h8300-next'

8 years agoMerge remote-tracking branch 'arm64/for-next/core'
Stephen Rothwell [Wed, 10 Feb 2016 23:27:20 +0000 (10:27 +1100)]
Merge remote-tracking branch 'arm64/for-next/core'

8 years agoMerge remote-tracking branch 'tegra/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:25:56 +0000 (10:25 +1100)]
Merge remote-tracking branch 'tegra/for-next'

8 years agoMerge remote-tracking branch 'sunxi/sunxi/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:24:32 +0000 (10:24 +1100)]
Merge remote-tracking branch 'sunxi/sunxi/for-next'

8 years agoMerge remote-tracking branch 'samsung-krzk/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:23:07 +0000 (10:23 +1100)]
Merge remote-tracking branch 'samsung-krzk/for-next'

8 years agoMerge remote-tracking branch 'rockchip/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:21:40 +0000 (10:21 +1100)]
Merge remote-tracking branch 'rockchip/for-next'

8 years agoMerge remote-tracking branch 'renesas/next'
Stephen Rothwell [Wed, 10 Feb 2016 23:20:09 +0000 (10:20 +1100)]
Merge remote-tracking branch 'renesas/next'

8 years agoMerge remote-tracking branch 'qcom/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:18:42 +0000 (10:18 +1100)]
Merge remote-tracking branch 'qcom/for-next'

8 years agoMerge remote-tracking branch 'omap-pending/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:18:37 +0000 (10:18 +1100)]
Merge remote-tracking branch 'omap-pending/for-next'

8 years agoMerge remote-tracking branch 'omap/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:16:55 +0000 (10:16 +1100)]
Merge remote-tracking branch 'omap/for-next'

8 years agoMerge remote-tracking branch 'mvebu/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:15:23 +0000 (10:15 +1100)]
Merge remote-tracking branch 'mvebu/for-next'

8 years agoMerge remote-tracking branch 'keystone/next'
Stephen Rothwell [Wed, 10 Feb 2016 23:14:00 +0000 (10:14 +1100)]
Merge remote-tracking branch 'keystone/next'

8 years agoMerge remote-tracking branch 'imx-mxs/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:12:36 +0000 (10:12 +1100)]
Merge remote-tracking branch 'imx-mxs/for-next'

8 years agoMerge remote-tracking branch 'berlin/berlin/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:12:25 +0000 (10:12 +1100)]
Merge remote-tracking branch 'berlin/berlin/for-next'

8 years agoMerge remote-tracking branch 'bcm2835-dt/bcm2835-dt-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:11:02 +0000 (10:11 +1100)]
Merge remote-tracking branch 'bcm2835-dt/bcm2835-dt-next'

8 years agoMerge remote-tracking branch 'at91/at91-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:10:59 +0000 (10:10 +1100)]
Merge remote-tracking branch 'at91/at91-next'

8 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:09:36 +0000 (10:09 +1100)]
Merge remote-tracking branch 'arm-soc/for-next'

8 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:07:09 +0000 (10:07 +1100)]
Merge remote-tracking branch 'arm/for-next'

8 years agoMerge remote-tracking branch 'arc/for-next'
Stephen Rothwell [Wed, 10 Feb 2016 23:05:45 +0000 (10:05 +1100)]
Merge remote-tracking branch 'arc/for-next'

8 years agoMerge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:37 +0000 (09:55 +1100)]
Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'

8 years agoMerge remote-tracking branch 'char-misc.current/char-misc-linus'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:30 +0000 (09:55 +1100)]
Merge remote-tracking branch 'char-misc.current/char-misc-linus'

8 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:28 +0000 (09:55 +1100)]
Merge remote-tracking branch 'tty.current/tty-linus'

8 years agoMerge remote-tracking branch 'driver-core.current/driver-core-linus'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:27 +0000 (09:55 +1100)]
Merge remote-tracking branch 'driver-core.current/driver-core-linus'

8 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:26 +0000 (09:55 +1100)]
Merge remote-tracking branch 'pci-current/for-linus'

8 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:25 +0000 (09:55 +1100)]
Merge remote-tracking branch 'sound-current/for-linus'

8 years agoMerge remote-tracking branch 'mac80211/master'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:24 +0000 (09:55 +1100)]
Merge remote-tracking branch 'mac80211/master'

8 years agoMerge remote-tracking branch 'wireless-drivers/master'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:23 +0000 (09:55 +1100)]
Merge remote-tracking branch 'wireless-drivers/master'

8 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:20 +0000 (09:55 +1100)]
Merge remote-tracking branch 'net/master'

8 years agoMerge remote-tracking branch 'sparc/master'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:19 +0000 (09:55 +1100)]
Merge remote-tracking branch 'sparc/master'

8 years agoMerge remote-tracking branch 'powerpc-fixes/fixes'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:17 +0000 (09:55 +1100)]
Merge remote-tracking branch 'powerpc-fixes/fixes'

8 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:12 +0000 (09:55 +1100)]
Merge remote-tracking branch 'm68k-current/for-linus'

8 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Wed, 10 Feb 2016 22:55:11 +0000 (09:55 +1100)]
Merge remote-tracking branch 'arm-current/fixes'

8 years agobpf: fix branch offset adjustment on backjumps after patching ctx expansion
Daniel Borkmann [Wed, 10 Feb 2016 15:47:11 +0000 (16:47 +0100)]
bpf: fix branch offset adjustment on backjumps after patching ctx expansion

When ctx access is used, the kernel often needs to expand/rewrite
instructions, so after that patching, branch offsets have to be
adjusted for both forward and backward jumps in the new eBPF program,
but for backward jumps it fails to account the delta. Meaning, for
example, if the expansion happens exactly on the insn that sits at
the jump target, it doesn't fix up the back jump offset.

Analysis on what the check in adjust_branches() is currently doing:

  /* adjust offset of jmps if necessary */
  if (i < pos && i + insn->off + 1 > pos)
    insn->off += delta;
  else if (i > pos && i + insn->off + 1 < pos)
    insn->off -= delta;

First condition (forward jumps):

  Before:                         After:

  insns[0]                        insns[0]
  insns[1] <--- i/insn            insns[1] <--- i/insn
  insns[2] <--- pos               insns[P] <--- pos
  insns[3]                        insns[P]  `------| delta
  insns[4] <--- target_X          insns[P]   `-----|
  insns[5]                        insns[3]
                                  insns[4] <--- target_X
                                  insns[5]

First case is if we cross pos-boundary and the jump instruction was
before pos. This is handeled correctly. I.e. if i == pos, then this
would mean our jump that we currently check was the patchlet itself
that we just injected. Since such patchlets are self-contained and
have no awareness of any insns before or after the patched one, the
delta is correctly not adjusted. Also, for the second condition in
case of i + insn->off + 1 == pos, means we jump to that newly patched
instruction, so no offset adjustment are needed. That part is correct.

Second condition (backward jumps):

  Before:                         After:

  insns[0]                        insns[0]
  insns[1] <--- target_X          insns[1] <--- target_X
  insns[2] <--- pos <-- target_Y  insns[P] <--- pos <-- target_Y
  insns[3]                        insns[P]  `------| delta
  insns[4] <--- i/insn            insns[P]   `-----|
  insns[5]                        insns[3]
                                  insns[4] <--- i/insn
                                  insns[5]

Second interesting case is where we cross pos-boundary and the jump
instruction was after pos. Backward jump with i == pos would be
impossible and pose a bug somewhere in the patchlet, so the first
condition checking i > pos is okay only by itself. However, i +
insn->off + 1 < pos does not always work as intended to trigger the
adjustment. It works when jump targets would be far off where the
delta wouldn't matter. But, for example, where the fixed insn->off
before pointed to pos (target_Y), it now points to pos + delta, so
that additional room needs to be taken into account for the check.
This means that i) both tests here need to be adjusted into pos + delta,
and ii) for the second condition, the test needs to be <= as pos
itself can be a target in the backjump, too.

Fixes: 9bac3d6d548e ("bpf: allow extended BPF programs access skb fields")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Wed, 10 Feb 2016 20:21:57 +0000 (12:21 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:
 "Just small driver fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: colibri-vf50-ts - add missing #include <linux/of.h>
  Input: adp5589 - fix row 5 handling for adp5589
  Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree
  Input: vmmouse - fix absolute device registration
  Input: serio - drop warnings in case of EPROBE_DEFER from serio_find_driver()
  Input: cap11xx - add missing of_node_put
  Input: sirfsoc-onkey - allow modular build
  Input: xpad - remove unused function

8 years agoMerge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Wed, 10 Feb 2016 20:04:59 +0000 (12:04 -0800)]
Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata

Pull libata fixes from Tejun Heo:

 - PORTS_IMPL workaround for very early ahci controllers is misbehaving
   on new systems.  Disabled on recent ahci versions.

 - Old-style PIO state machine had a horrible locking problem.  Don't
   know how we've been getting away this far.  Fixed.

 - Other device specific updates.

* 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ahci: Intel DNV device IDs SATA
  libata: fix sff host state machine locking while polling
  libata-sff: use WARN instead of BUG on illegal host state machine state
  libata: disable forced PORTS_IMPL for >= AHCI 1.3
  libata: blacklist a Viking flash model for MWDMA corruption
  drivers: ata: wake port before DMA stop for ALPM

8 years agoMerge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Wed, 10 Feb 2016 19:36:19 +0000 (11:36 -0800)]
Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup

Pull cgroup fixes from Tejun Heo:

 - The destruction path of cgroup objects are asynchronous and
   multi-staged and some of them ended up destroying parents before
   children leading to failures in cpu and memory controllers.  Ensure
   that parents are always destroyed after children.

 - cpuset mm node migration was performed synchronously while holding
   threadgroup and cgroup mutexes and the recent threadgroup locking
   update resulted in a possible deadlock.  The migration is best effort
   and shouldn't have been performed under those locks to begin with.
   Made asynchronous.

 - Minor documentation fix.

* 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  Documentation: cgroup: Fix 'cgroup-legacy' -> 'cgroup-v1'
  cgroup: make sure a parent css isn't freed before its children
  cgroup: make sure a parent css isn't offlined before its children
  cpuset: make mm migration asynchronous

8 years agoMerge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Wed, 10 Feb 2016 19:04:05 +0000 (11:04 -0800)]
Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue fixes from Tejun Heo:
 "Workqueue fixes for v4.5-rc3.

   - Remove a spurious triggering of flush dependency warning.

   - Officially break local execution guarantee of unbound work items
     and add a debug feature to flush out usages which depend on it.

   - Work around CPU -> NODE mapping becoming invalid on CPU offline.

  The branch is young but pushing out early as stable kernels are being
  affected"

* 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup
  workqueue: implement "workqueue.debug_force_rr_cpu" debug feature
  workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs
  Revert "workqueue: make sure delayed work run in local cpu"
  workqueue: skip flush dependency checks for legacy workqueues

8 years agoworkqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup
Tejun Heo [Wed, 3 Feb 2016 18:54:25 +0000 (13:54 -0500)]
workqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup

When looking up the pool_workqueue to use for an unbound workqueue,
workqueue assumes that the target CPU is always bound to a valid NUMA
node.  However, currently, when a CPU goes offline, the mapping is
destroyed and cpu_to_node() returns NUMA_NO_NODE.

This has always been broken but hasn't triggered often enough before
874bbfe600a6 ("workqueue: make sure delayed work run in local cpu").
After the commit, workqueue forcifully assigns the local CPU for
delayed work items without explicit target CPU to fix a different
issue.  This widens the window where CPU can go offline while a
delayed work item is pending causing delayed work items dispatched
with target CPU set to an already offlined CPU.  The resulting
NUMA_NO_NODE mapping makes workqueue try to queue the work item on a
NULL pool_workqueue and thus crash.

While 874bbfe600a6 has been reverted for a different reason making the
bug less visible again, it can still happen.  Fix it by mapping
NUMA_NO_NODE to the default pool_workqueue from unbound_pwq_by_node().
This is a temporary workaround.  The long term solution is keeping CPU
-> NODE mapping stable across CPU off/online cycles which is being
worked on.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Len Brown <len.brown@intel.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/g/1454424264.11183.46.camel@gmail.com
Link: http://lkml.kernel.org/g/1453702100-2597-1-git-send-email-tangchen@cn.fujitsu.com
8 years agoahci: Intel DNV device IDs SATA
Alexandra Yates [Fri, 5 Feb 2016 23:27:49 +0000 (15:27 -0800)]
ahci: Intel DNV device IDs SATA

Adding Intel codename DNV platform device IDs for SATA.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
8 years agodrm/i915: fix error path in intel_setup_gmbus()
Rasmus Villemoes [Tue, 9 Feb 2016 20:11:13 +0000 (21:11 +0100)]
drm/i915: fix error path in intel_setup_gmbus()

This fails to undo the setup for pin==0; moreover, something
interesting happens if the setup failed already at pin==0.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Fixes: f899fc64cda8 ("drm/i915: use GMBUS to manage i2c links")
Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1455048677-19882-3-git-send-email-linux@rasmusvillemoes.dk
(cherry picked from commit 2417c8c03f508841b85bf61acc91836b7b0e2560)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
8 years agodrm/i915/skl: Fix typo in DPLL_CFGCR1 definition
Lyude [Thu, 4 Feb 2016 15:43:21 +0000 (10:43 -0500)]
drm/i915/skl: Fix typo in DPLL_CFGCR1 definition

We accidentally point both cfgcr registers for the second shared DPLL to
the same location in i915_reg.h. This results in a lot of hw pipe state
mismatches whenever we try to do a modeset that requires allocating the
DPLL to a CRTC:

[drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.cfgcr1 (expected 0x80000168, found 0x000004a5)
[drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in base.adjusted_mode.crtc_clock (expected 108000, found 49500)
[drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in port_clock (expected 108000, found 49500)

This usually ends up causing blank monitors, since the DPLL never can
get set to the right clock.

Fixes: 086f8e84a085 ("drm/i915: Prefix raw register defines with underscore")
Signed-off-by: Lyude <cpaul@redhat.com>
Cc: drm-intel-fixes@lists.freedesktop.org
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1454600601-21900-1-git-send-email-cpaul@redhat.com
(cherry picked from commit da3b891b0fb88605bb2d16adaf1ef2a1f16403ba)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
8 years agodrm/i915/skl: Don't skip mst encoders in skl_ddi_pll_select()
Lyude [Tue, 2 Feb 2016 15:49:43 +0000 (10:49 -0500)]
drm/i915/skl: Don't skip mst encoders in skl_ddi_pll_select()

We don't actually check for INTEL_OUTPUT_DP_MST at all in here, as a
result we skip assigning a DPLL to any DP MST ports, which makes link
training fail:

[ 1442.933896] [drm:intel_power_well_enable] enabling DDI D power well
[ 1442.933905] [drm:skl_set_power_well] Enabling DDI D power well
[ 1442.933957] [drm:intel_mst_pre_enable_dp] 0
[ 1442.935474] [drm:intel_dp_set_signal_levels] Using signal levels 00000000
[ 1442.935477] [drm:intel_dp_set_signal_levels] Using vswing level 0
[ 1442.935480] [drm:intel_dp_set_signal_levels] Using pre-emphasis level 0
[ 1442.936190] [drm:intel_dp_set_signal_levels] Using signal levels 05000000
[ 1442.936193] [drm:intel_dp_set_signal_levels] Using vswing level 1
[ 1442.936195] [drm:intel_dp_set_signal_levels] Using pre-emphasis level 1
[ 1442.936858] [drm:intel_dp_set_signal_levels] Using signal levels 08000000
[ 1442.936862] [drm:intel_dp_set_signal_levels] Using vswing level 2
…
[ 1442.998253] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many full retries, give up
[ 1442.998512] [drm:intel_dp_start_link_train [i915]] *ERROR* failed to train DP, aborting

After which the pipe state goes completely out of sync:

[   70.075596] [drm:check_crtc_state] [CRTC:25]
[   70.075696] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in ddi_pll_sel (expected 0x00000000, found 0x00000001)
[   70.075747] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in shared_dpll (expected -1, found 0)
[   70.075798] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.ctrl1 (expected 0x00000000, found 0x00000021)
[   70.075840] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.cfgcr1 (expected 0x00000000, found 0x80400173)
[   70.075884] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.cfgcr2 (expected 0x00000000, found 0x000003a5)
[   70.075954] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in base.adjusted_mode.crtc_clock (expected 262750, found 72256)
[   70.075999] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in port_clock (expected 540000, found 148500)

And if you're especially lucky, it keeps going downhill:

[   83.309256] Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler
[   83.309265]
[   83.309265] =================================
[   83.309266] [ INFO: inconsistent lock state ]
[   83.309267] 4.5.0-rc1Lyude-Test #265 Not tainted
[   83.309267] ---------------------------------
[   83.309268] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
[   83.309270] Xorg/1194 [HC0[1]:SC0[0]:HE1:SE1] takes:
[   83.309293]  (&(&dev_priv->uncore.lock)->rlock){?.-...}, at: [<ffffffffa02a6073>] gen9_write32+0x63/0x400 [i915]
[   83.309293] {IN-HARDIRQ-W} state was registered at:
[   83.309297]   [<ffffffff810e84f4>] __lock_acquire+0x9c4/0x1d00
[   83.309299]   [<ffffffff810ea1be>] lock_acquire+0xce/0x1c0
[   83.309302]   [<ffffffff8177d936>] _raw_spin_lock_irqsave+0x56/0x90
[   83.309321]   [<ffffffffa02a5492>] gen9_read32+0x52/0x3d0 [i915]
[   83.309332]   [<ffffffffa024beea>] gen8_irq_handler+0x27a/0x6a0 [i915]
[   83.309337]   [<ffffffff810fdbc1>] handle_irq_event_percpu+0x41/0x300
[   83.309339]   [<ffffffff810fdeb9>] handle_irq_event+0x39/0x60
[   83.309341]   [<ffffffff811010b4>] handle_edge_irq+0x74/0x130
[   83.309344]   [<ffffffff81009073>] handle_irq+0x73/0x120
[   83.309346]   [<ffffffff817805f1>] do_IRQ+0x61/0x120
[   83.309348]   [<ffffffff8177e6d6>] ret_from_intr+0x0/0x20
[   83.309351]   [<ffffffff815f5105>] cpuidle_enter_state+0x105/0x330
[   83.309353]   [<ffffffff815f5367>] cpuidle_enter+0x17/0x20
[   83.309356]   [<ffffffff810dbe1a>] call_cpuidle+0x2a/0x50
[   83.309358]   [<ffffffff810dc1dd>] cpu_startup_entry+0x26d/0x3a0
[   83.309360]   [<ffffffff817701da>] rest_init+0x13a/0x140
[   83.309363]   [<ffffffff81f2af8e>] start_kernel+0x475/0x482
[   83.309365]   [<ffffffff81f2a315>] x86_64_start_reservations+0x2a/0x2c
[   83.309367]   [<ffffffff81f2a452>] x86_64_start_kernel+0x13b/0x14a

Fixes: 82d354370189 ("drm/i915/skl: Implementation of SKL DPLL programming")
Signed-off-by: Lyude <cpaul@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1454428183-994-1-git-send-email-cpaul@redhat.com
(cherry picked from commit 78385cb398748debb7ea2e36d6d2001830c172bc)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
8 years agoarm64: Fix build with CONFIG_DEBUG_PAGEALLOC=n
Catalin Marinas [Wed, 10 Feb 2016 11:17:34 +0000 (11:17 +0000)]
arm64: Fix build with CONFIG_DEBUG_PAGEALLOC=n

Commit 5b09ee56b9f0 ("arm64: Add support for
ARCH_SUPPORTS_DEBUG_PAGEALLOC") introduces a call to
debug_pagealloc_enabled() which is not defined in when
CONFIG_DEBUG_PAGEALLOC=n. Add the necessary #ifdef to the arm64 code.

Note that this change will be reverted once the patch for defining
debug_pagealloc_enabled() is upstreamed.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
8 years agoarm64: Make block_mappings_allowed() static
Catalin Marinas [Wed, 10 Feb 2016 11:10:18 +0000 (11:10 +0000)]
arm64: Make block_mappings_allowed() static

This function, introduced by commit 5b09ee56b9f0 ("arm64: Add support
for ARCH_SUPPORTS_DEBUG_PAGEALLOC"), is only used in the
arch/arm64/mm/mmu.c.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
8 years agoMerge branch 'ovs-tunnel-mtu'
David S. Miller [Wed, 10 Feb 2016 10:50:16 +0000 (05:50 -0500)]
Merge branch 'ovs-tunnel-mtu'

David Wragg says:

====================
Set a large MTU on ovs-created tunnel devices

Prior to 4.3, openvswitch tunnel vports (vxlan, gre and geneve) could
transmit vxlan packets of any size, constrained only by the ability to
send out the resulting packets.  4.3 introduced netdevs corresponding
to tunnel vports.  These netdevs have an MTU, which limits the size of
a packet that can be successfully encapsulated.  The default MTU
values are low (1500 or less), which is awkwardly small in the context
of physical networks supporting jumbo frames, and leads to a
conspicuous change in behaviour for userspace.

This patch series sets the MTU on openvswitch-created netdevs to be
the relevant maximum (i.e. the maximum IP packet size minus any
relevant overhead), effectively restoring the behaviour prior to 4.3.

Where relevant, the limits on MTU values that can be directly set on
the netdevs are also relaxed.

Changes in v2:
* Extend to all openvswitch tunnel types, i.e. gre and geneve as well
* Use IP_MAX_MTU

Changes in v3:
* Fix block comment style
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agovxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices
David Wragg [Wed, 10 Feb 2016 00:05:58 +0000 (00:05 +0000)]
vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices

Prior to 4.3, openvswitch tunnel vports (vxlan, gre and geneve) could
transmit vxlan packets of any size, constrained only by the ability to
send out the resulting packets.  4.3 introduced netdevs corresponding
to tunnel vports.  These netdevs have an MTU, which limits the size of
a packet that can be successfully encapsulated.  The default MTU
values are low (1500 or less), which is awkwardly small in the context
of physical networks supporting jumbo frames, and leads to a
conspicuous change in behaviour for userspace.

Instead, set the MTU on openvswitch-created netdevs to be the relevant
maximum (i.e. the maximum IP packet size minus any relevant overhead),
effectively restoring the behaviour prior to 4.3.

Signed-off-by: David Wragg <david@weave.works>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agogeneve: Relax MTU constraints
David Wragg [Wed, 10 Feb 2016 00:05:57 +0000 (00:05 +0000)]
geneve: Relax MTU constraints

Allow the MTU of geneve devices to be set to large values, in order to
exploit underlying networks with larger frame sizes.

GENEVE does not have a fixed encapsulation overhead (an openvswitch
rule can add variable length options), so there is no relevant maximum
MTU to enforce.  A maximum of IP_MAX_MTU is used instead.
Encapsulated packets that are too big for the underlying network will
get dropped on the floor.

Signed-off-by: David Wragg <david@weave.works>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agovxlan: Relax MTU constraints
David Wragg [Wed, 10 Feb 2016 00:05:55 +0000 (00:05 +0000)]
vxlan: Relax MTU constraints

Allow the MTU of vxlan devices without an underlying device to be set
to larger values (up to a maximum based on IP packet limits and vxlan
overhead).

Previously, their MTUs could not be set to higher than the
conventional ethernet value of 1500.  This is a very arbitrary value
in the context of vxlan, and prevented vxlan devices from being able
to take advantage of jumbo frames etc.

The default MTU remains 1500, for compatibility.

Signed-off-by: David Wragg <david@weave.works>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoarm64: prefetch: add missing #include for spin_lock_prefetch
Will Deacon [Wed, 10 Feb 2016 10:07:30 +0000 (10:07 +0000)]
arm64: prefetch: add missing #include for spin_lock_prefetch

As of 52e662326e1e ("arm64: prefetch: don't provide spin_lock_prefetch
with LSE"), spin_lock_prefetch is patched at runtime when the LSE atomics
are in use. This relies on the ARM64_LSE_ATOMIC_INSN macro to drive
the alternatives framework, but that macro is only available via
asm/lse.h, which isn't explicitly included in processor.h. Consequently,
drivers can run into build failures such as:

   In file included from include/linux/prefetch.h:14:0,
                    from drivers/net/ethernet/intel/i40e/i40e_txrx.c:27:
   arch/arm64/include/asm/processor.h: In function 'spin_lock_prefetch':
   arch/arm64/include/asm/processor.h:183:15: error: expected string literal before 'ARM64_LSE_ATOMIC_INSN'
     asm volatile(ARM64_LSE_ATOMIC_INSN(

This patch add the missing include and gets things building again.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
8 years agoMerge branches 'for-4.6/sony' and 'for-4.6/upstream' into for-next
Jiri Kosina [Wed, 10 Feb 2016 10:32:34 +0000 (11:32 +0100)]
Merge branches 'for-4.6/sony' and 'for-4.6/upstream' into for-next

8 years agoHID: sony: underscores are unnecessary for u8, u16, s32
Pavel Machek [Tue, 9 Feb 2016 12:55:08 +0000 (13:55 +0100)]
HID: sony: underscores are unnecessary for u8, u16, s32

Double-underscore prefixed types are unnecessary in pure kernel code,
replace them with the non prefixed equivalents.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Antonio Ospite <ao2@ao2.it>
Acked-by: Frank Praznik <frank.praznik@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: fix some warnings from scripts/checkpatch.pl
Antonio Ospite [Tue, 9 Feb 2016 12:55:07 +0000 (13:55 +0100)]
HID: sony: fix some warnings from scripts/checkpatch.pl

  WARNING: Block comments use a trailing */ on a separate line
  #822: FILE: drivers/hid/hid-sony.c:822:
  +    * number but it's not needed for correct operation */

  WARNING: Block comments use a trailing */ on a separate line
  #828: FILE: drivers/hid/hid-sony.c:828:
  +    * buttons multiple keypresses are allowed */

  WARNING: Block comments use a trailing */ on a separate line
  #854: FILE: drivers/hid/hid-sony.c:854:
  +    * 0xff and 11th is for press indication */

  WARNING: Missing a blank line after declarations
  #1930: FILE: drivers/hid/hid-sony.c:1930:
  + struct sony_sc *sc = container_of(work, struct sony_sc, state_worker);
  + sc->send_output_report(sc);

  WARNING: Block comments use a trailing */ on a separate line
  #2510: FILE: drivers/hid/hid-sony.c:2510:
  +  * Logitech joystick from the device descriptor. */

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Acked-by: Frank Praznik <frank.praznik@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: sony: fix errors from scripts/checkpatch.pl
Antonio Ospite [Tue, 9 Feb 2016 12:55:06 +0000 (13:55 +0100)]
HID: sony: fix errors from scripts/checkpatch.pl

  ./scripts/checkpatch.pl \
    --types "SPACING,TRAILING_WHITESPACE,POINTER_LOCATION,CODE_INDENT" \
    -f drivers/hid/hid-sony.c

  ERROR: trailing whitespace
  #933: FILE: drivers/hid/hid-sony.c:933:
  +^I * $

  ERROR: space prohibited after that open square bracket '['
  #947: FILE: drivers/hid/hid-sony.c:947:
  + [ 1] = BTN_TRIGGER_HAPPY1,

  ERROR: space prohibited after that open square bracket '['
  #948: FILE: drivers/hid/hid-sony.c:948:
  + [ 2] = BTN_TRIGGER_HAPPY2,

  ERROR: space prohibited after that open square bracket '['
  #949: FILE: drivers/hid/hid-sony.c:949:
  + [ 3] = BTN_TRIGGER_HAPPY3,

  ERROR: space prohibited after that open square bracket '['
  #950: FILE: drivers/hid/hid-sony.c:950:
  + [ 4] = BTN_TRIGGER_HAPPY4,

  ERROR: space prohibited after that open square bracket '['
  #951: FILE: drivers/hid/hid-sony.c:951:
  + [ 5] = BTN_TRIGGER_HAPPY5,

  ERROR: space prohibited after that open square bracket '['
  #952: FILE: drivers/hid/hid-sony.c:952:
  + [ 6] = BTN_TRIGGER_HAPPY6,

  ERROR: space prohibited after that open square bracket '['
  #953: FILE: drivers/hid/hid-sony.c:953:
  + [ 7] = BTN_TRIGGER_HAPPY7,

  ERROR: space prohibited after that open square bracket '['
  #954: FILE: drivers/hid/hid-sony.c:954:
  + [ 8] = BTN_TRIGGER_HAPPY8,

  ERROR: space prohibited after that open square bracket '['
  #955: FILE: drivers/hid/hid-sony.c:955:
  + [ 9] = BTN_TRIGGER_HAPPY9,

  ERROR: "(foo*)" should be "(foo *)"
  #1032: FILE: drivers/hid/hid-sony.c:1032:
  + void(*send_output_report)(struct sony_sc*);

  WARNING: missing space after return type
  #1032: FILE: drivers/hid/hid-sony.c:1032:
  + void(*send_output_report)(struct sony_sc*);

  ERROR: "(foo*)" should be "(foo *)"
  #2261: FILE: drivers/hid/hid-sony.c:2261:
  + void(*send_output_report)(struct sony_sc*))

  WARNING: missing space after return type
  #2261: FILE: drivers/hid/hid-sony.c:2261:
  + void(*send_output_report)(struct sony_sc*))

  ERROR: code indent should use tabs where possible
  #2449: FILE: drivers/hid/hid-sony.c:2449:
  +         */$

  total: 13 errors, 2 warnings, 2570 lines checked

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Acked-by: Frank Praznik <frank.praznik@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: lg: fix a typo in descriptors comments s/Joystik/Joystick/
Antonio Ospite [Tue, 9 Feb 2016 12:55:04 +0000 (13:55 +0100)]
HID: lg: fix a typo in descriptors comments s/Joystik/Joystick/

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agos390/oprofile: fix address range for asynchronous stack
Heiko Carstens [Tue, 9 Feb 2016 11:03:31 +0000 (12:03 +0100)]
s390/oprofile: fix address range for asynchronous stack

git commit dc7ee00d4771 ("s390: lowcore stack pointer offsets")
introduced a regression in regard to s390_backtrace(). The stack
pointer for the asynchronous stack in the lowcore now has an
additional offset applied. This offset needs to be taken into account
in the calculation for the low and high address for the stack.

This bug was already partially fixed with commit 9cc5c206d9b4
("s390/dumpstack: fix address ranges for asynchronous and panic
stack"). This patch fixes it also for the oprofile code.

Fixes: dc7ee00d4771 ("s390: lowcore stack pointer offsets")
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/perf_event: fix address range for asynchronous stack
Heiko Carstens [Tue, 9 Feb 2016 11:00:16 +0000 (12:00 +0100)]
s390/perf_event: fix address range for asynchronous stack

git commit dc7ee00d4771 ("s390: lowcore stack pointer offsets")
introduced a regression in regard to perf_callchain_kernel(). The
stack pointer for the asynchronous stack in the lowcore now has an
additional offset applied. This offset needs to be taken into account
in the calculation for the low and high address for the stack.

This bug was already partially fixed with 9cc5c206d9b4
("s390/dumpstack: fix address ranges for asynchronous and panic
stack"). This patch fixes it also for the perf_event code.

Fixes: dc7ee00d4771 ("s390: lowcore stack pointer offsets")
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/stacktrace: add save_stack_trace_regs()
Pratyush Anand [Fri, 29 Jan 2016 05:20:28 +0000 (10:50 +0530)]
s390/stacktrace: add save_stack_trace_regs()

Implement save_stack_trace_regs, so that a stack trace of a kprobe
event can be obtained.

Without this we see following warning:
"save_stack_trace_regs() not implemented yet."
when we execute:
echo stacktrace > /sys/kernel/debug/tracing/trace_options
echo "p kfree" >> /sys/kernel/debug/tracing/kprobe_events
echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable

Reported-by: Chunyu Hu <chuhu@redhat.com>
Signed-off-by: Pratyush Anand <panand@redhat.com>
[heiko.carstens@de.ibm.com]: changed patch to use __save_stack_trace()
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/stacktrace: save full stack traces
Heiko Carstens [Mon, 1 Feb 2016 13:14:04 +0000 (14:14 +0100)]
s390/stacktrace: save full stack traces

save_stack_trace() only saves the stack trace of the current context
(interrupt or process context). This is different to what other
architectures like x86 do, which save the full stack trace across
different contexts.

Also extract a __save_stack_trace() helper function which will be used
by a follow on patch.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/stacktrace: add missing end marker
Heiko Carstens [Mon, 1 Feb 2016 13:06:57 +0000 (14:06 +0100)]
s390/stacktrace: add missing end marker

save_stack_trace() did not write the ULONG_MAX end marker if there is
enough space left. So simply follow x86 and arm64.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/stacktrace: fix address ranges for asynchronous and panic stack
Heiko Carstens [Mon, 1 Feb 2016 09:13:05 +0000 (10:13 +0100)]
s390/stacktrace: fix address ranges for asynchronous and panic stack

git commit dc7ee00d4771 ("s390: lowcore stack pointer offsets")
introduced a regression in regard to save_stack_trace(). The stack
pointer for the asynchronous and the panic stack in the lowcore now
have an additional offset applied to them. This offset needs to be
taken into account in the calculation for the low and high address for
the stacks.

This bug was already partially fixed with 9cc5c206d9b4
("s390/dumpstack: fix address ranges for asynchronous and panic
stack"). This patch fixes it also for the stacktrace code.

Fixes: dc7ee00d4771 ("s390: lowcore stack pointer offsets")
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agos390/stacktrace: fix save_stack_trace_tsk() for current task
Heiko Carstens [Sun, 31 Jan 2016 13:23:30 +0000 (14:23 +0100)]
s390/stacktrace: fix save_stack_trace_tsk() for current task

The function save_stack_trace_tsk() did not consider that it can be
used for tsk == current, for which the current stack pointer obviously
cannot be found in the thread structure.

Fix this and get the stack pointer with an inline assembly.

This fixes e.g. the output of "cat /proc/self/stack".

Before:
[<0000000000000000>]           (null)
[<ffffffffffffffff>] 0xffffffffffffffff

After:
[<000000000011b3ee>] save_stack_trace_tsk+0x56/0x98
[<0000000000366cde>] proc_pid_stack+0xae/0x108
[<00000000003636f0>] proc_single_show+0x70/0xc0
[<0000000000311fbc>] seq_read+0xcc/0x448
[<00000000002e7716>] __vfs_read+0x36/0x100
[<00000000002e872e>] vfs_read+0x76/0x130
[<00000000002e975e>] SyS_read+0x66/0xd8
[<000000000089490e>] system_call+0xd6/0x264
[<ffffffffffffffff>] 0xffffffffffffffff

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
8 years agoMerge branch 'xfs-buf-macro-cleanup-4.6' into for-next
Dave Chinner [Wed, 10 Feb 2016 04:03:42 +0000 (15:03 +1100)]
Merge branch 'xfs-buf-macro-cleanup-4.6' into for-next

8 years agoxfs: remove XFS_BUF_ZEROFLAGS macro
Dave Chinner [Wed, 10 Feb 2016 04:01:30 +0000 (15:01 +1100)]
xfs: remove XFS_BUF_ZEROFLAGS macro

The places where we use this macro already clear unnecessary IO
flags (e.g. through xfs_bwrite()) or never have unexpected IO flags
set on them in the first place (e.g. iclog buffers). Remove the
macro from these locations, and where necessary clear only the
specific flags that are conditional in the current buffer context.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
8 years agoxfs: remove XBF_STALE flag wrapper macros
Dave Chinner [Wed, 10 Feb 2016 04:01:11 +0000 (15:01 +1100)]
xfs: remove XBF_STALE flag wrapper macros

They only set/clear/check a flag, no need for obfuscating this
with a macro.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
8 years agoxfs: remove XBF_WRITE flag wrapper macros
Dave Chinner [Wed, 10 Feb 2016 04:01:11 +0000 (15:01 +1100)]
xfs: remove XBF_WRITE flag wrapper macros

They only set/clear/check a flag, no need for obfuscating this
with a macro.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
8 years agoxfs: remove XBF_READ flag wrapper macros
Dave Chinner [Wed, 10 Feb 2016 04:01:11 +0000 (15:01 +1100)]
xfs: remove XBF_READ flag wrapper macros

They only set/clear/check a flag, no need for obfuscating this
with a macro.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
8 years agoxfs: remove XBF_ASYNC flag wrapper macros
Dave Chinner [Wed, 10 Feb 2016 04:01:11 +0000 (15:01 +1100)]
xfs: remove XBF_ASYNC flag wrapper macros

They only set/clear/check a flag, no need for obfuscating this
with a macro.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
8 years agoxfs: remove XBF_DONE flag wrapper macros
Dave Chinner [Wed, 10 Feb 2016 04:01:11 +0000 (15:01 +1100)]
xfs: remove XBF_DONE flag wrapper macros

They only set/clear/check a flag, no need for obfuscating this
with a macro.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
8 years agoARCv2: intc: Allow interruption by lowest priority interrupt
Vineet Gupta [Sun, 7 Feb 2016 07:24:35 +0000 (12:54 +0530)]
ARCv2: intc: Allow interruption by lowest priority interrupt

ARC HS Cores support configurable multiple interrupt priorities of upto
16 levels.

There is processor "interrupt preemption threshhold" in STATUS32.E[4:1]
And several places need to set this up:
1. seed value as kernel is booting
2. seed value for user space programs
3. Arg to SLEEP instruction in idle task (what interrupt prio can wake)
4. Per-IRQ line prioirty (i.e. what is the priority of interrupt
   raised by a peripheral or timer or perf counter...

Currently above sites use the highest priority 0. This can be potential
problem when multiple priorities are supported. e.g. user space could
only be interrupted by P0 interrupt, not others...
So turn this over and instead make default interruption level to be
the lowest priority possible 15. This should be fine even if there are
fewer priority levels configured (say two: P0 HIGH, P1 LOW)

This feature also effectively disables FIRQ feature if present in
hardware config. With old code, a P0 interrupt would be FIRQ, needing
special handling (ISR or Register Banks) which is NOT supported yet.
Now it not be P0 (P15 or whatever is lowest prio) so FIRQ is not
triggered.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
8 years agopowerpc/powernv: Fix stale PE primary bus
Gavin Shan [Tue, 9 Feb 2016 04:50:22 +0000 (15:50 +1100)]
powerpc/powernv: Fix stale PE primary bus

When PCI bus is unplugged during full hotplug for EEH recovery,
the platform PE instance (struct pnv_ioda_pe) isn't released and
it dereferences the stale PCI bus that has been released. It leads
to kernel crash when referring to the stale PCI bus.

This fixes the issue by correcting the PE's primary bus when it's
oneline at plugging time, in pnv_pci_dma_bus_setup() which is to
be called by pcibios_fixup_bus().

Cc: stable@vger.kernel.org # v4.1+
Reported-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reported-by: Pradipta Ghosh <pradghos@in.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Tested-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
8 years agopowerpc/eeh: Fix stale cached primary bus
Gavin Shan [Tue, 9 Feb 2016 04:50:21 +0000 (15:50 +1100)]
powerpc/eeh: Fix stale cached primary bus

When PE is created, its primary bus is cached to pe->bus. At later
point, the cached primary bus is returned from eeh_pe_bus_get().
However, we could get stale cached primary bus and run into kernel
crash in one case: full hotplug as part of fenced PHB error recovery
releases all PCI busses under the PHB at unplugging time and recreate
them at plugging time. pe->bus is still dereferencing the PCI bus
that was released.

This adds another PE flag (EEH_PE_PRI_BUS) to represent the validity
of pe->bus. pe->bus is updated when its first child EEH device is
online and the flag is set. Before unplugging in full hotplug for
error recovery, the flag is cleared.

Fixes: 8cdb2833 ("powerpc/eeh: Trace PCI bus from PE")
Cc: stable@vger.kernel.org #v3.11+
Reported-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reported-by: Pradipta Ghosh <pradghos@in.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Tested-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>