firefly-linux-kernel-4.4.55.git
9 years agoMerge branch 'linaro-android-3.10-lsk' of git://android.git.linaro.org/kernel/linaro...
Alex Shi [Fri, 17 Apr 2015 05:40:43 +0000 (13:40 +0800)]
Merge branch 'linaro-android-3.10-lsk' of git://android.git.linaro.org/kernel/linaro-android into linux-linaro-lsk-android

 Remove conflictsed drivers/staging/android/logger.c

9 years agork3368: iommu: expose iommu tlb invalidate operation to owner
Simon [Tue, 7 Apr 2015 09:50:00 +0000 (17:50 +0800)]
rk3368: iommu: expose iommu tlb invalidate operation to owner

Signed-off-by: Simon <xxm@rock-chips.com>
9 years agork3368: iommu: delete vop/hevc attach/detach log
Simon [Fri, 3 Apr 2015 07:31:08 +0000 (15:31 +0800)]
rk3368: iommu: delete vop/hevc attach/detach log

Signed-off-by: Simon <xxm@rock-chips.com>
9 years agork3368: iommu: workaround for switch between vpu and hevc
Simon [Thu, 2 Apr 2015 09:51:53 +0000 (17:51 +0800)]
rk3368: iommu: workaround for switch between vpu and hevc

vpu/hevc share the same ahb, when switch vpu and hevc,may cause
iommu error,to avoid this error,skip invalidate iommu tlb when iovmm_map

Signed-off-by: Simon <xxm@rock-chips.com>
9 years agodst: rk3368-box.dts amend pwm regulator
huang zhibao [Fri, 17 Apr 2015 02:12:52 +0000 (10:12 +0800)]
dst: rk3368-box.dts amend pwm regulator

9 years agodts: 1.add box rk3368 r88 dts; 2.amend 3368 box pwm regulator
huang zhibao [Fri, 17 Apr 2015 02:09:29 +0000 (10:09 +0800)]
dts: 1.add box rk3368 r88 dts; 2.amend 3368 box pwm regulator

9 years agotcp: Silence warning: ‘in6’ may be used uninitialized
Jon Medhurst [Thu, 16 Apr 2015 12:46:53 +0000 (18:16 +0530)]
tcp: Silence warning: ‘in6’ may be used uninitialized

Initialise in6 to avoid...

In file included from include/net/inetpeer.h:15:0,
                 from include/net/route.h:28,
                 from include/net/inet_hashtables.h:32,
                 from include/net/tcp.h:37,
                 from net/ipv4/tcp.c:275:
net/ipv4/tcp.c: In function ‘tcp_nuke_addr’:
include/net/ipv6.h:417:34: warning: ‘in6’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  return ((ul1[0] ^ ul2[0]) | (ul1[1] ^ ul2[1])) == 0UL;
                                  ^
net/ipv4/tcp.c:3513:19: note: ‘in6’ was declared here
  struct in6_addr *in6;

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
9 years agocgroup: Fix build warnings when CGROUP not defined
Jon Medhurst [Thu, 16 Apr 2015 12:43:10 +0000 (18:13 +0530)]
cgroup: Fix build warnings when CGROUP not defined

Commit 57114e95e8 ("cgroup: refactor allow_attach function into common
code") unnecessarily added a dummy definition for
subsys_cgroup_allow_attach when CONFIG_CGROUP is not set, so remove it
to prevent warnings like...

include/linux/cgroup.h:907:18: warning: 'struct cgroup_taskset' declared inside parameter list
           struct cgroup_taskset *tset)
                  ^
include/linux/cgroup.h:907:18: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/cgroup.h:907:18: warning: 'struct cgroup' declared inside parameter list
  CC      kernel/events/core.o
In file included from kernel/events/core.c:41:0:
include/linux/cgroup.h:907:18: warning: 'struct cgroup_taskset' declared inside parameter list
           struct cgroup_taskset *tset)

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
9 years agocpuidle: governor: menu: fix unused function warning
Amit Pundir [Thu, 16 Apr 2015 12:41:20 +0000 (18:11 +0530)]
cpuidle: governor: menu: fix unused function warning

Fixes warning caused by commit df99953c42c6 ("cpuidle: governor:
menu: don't use loadavg")

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
9 years agork3368 lcdc: revert lcdc reset when switch hdmi
hjc [Thu, 16 Apr 2015 12:16:30 +0000 (20:16 +0800)]
rk3368 lcdc: revert lcdc reset when switch hdmi

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agork3368 lcdc: add gather config for bandwidth
hjc [Thu, 16 Apr 2015 03:51:47 +0000 (11:51 +0800)]
rk3368 lcdc: add gather config for bandwidth

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agork fb: if lcdc is suspend ignore set par and display
hjc [Thu, 16 Apr 2015 01:56:32 +0000 (09:56 +0800)]
rk fb: if lcdc is suspend ignore set par and display

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agodrivers/base: cpu: fix CPU_AUTOPROBE
Ryan Harkin [Thu, 16 Apr 2015 09:09:16 +0000 (14:39 +0530)]
drivers/base: cpu: fix CPU_AUTOPROBE

Use CONFIG_HAVE_CPU_AUTOPROBE instead of CONFIG_ARCH_HAS_CPU_AUTOPROBE

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
9 years agoMerge branch 'android-3.10' of https://android.googlesource.com/kernel/common
Amit Pundir [Thu, 16 Apr 2015 08:04:01 +0000 (13:34 +0530)]
Merge branch 'android-3.10' of https://android.googlesource.com/kernel/common

* android-3.10: (23 commits)
  proc: uid_cputime: create uids from kuids
  wakeup: Add last wake up source logging for suspend abort reason.
  selinux: add SOCK_DIAG_BY_FAMILY to the list of netlink message types
  selinux/nlmsg: add XFRM_MSG_MAPPING
  selinux/nlmsg: add XFRM_MSG_MIGRATE
  selinux/nlmsg: add XFRM_MSG_REPORT
  selinux/nlmsg: add XFRM_MSG_[NEW|GET]SADINFO
  selinux/nlmsg: add XFRM_MSG_GETSPDINFO
  selinux/nlmsg: add XFRM_MSG_NEWSPDINFO
  SELinux: per-command whitelisting of ioctls
  security: lsm_audit: add ioctl specific auditing
  Power: Report suspend times from last_suspend_time
  arm: crypto: Add optimized SHA-256/224
  proc: uid: Adds accounting for the cputimes per uid.
  USB: gadget: android: Integrate f_midi USB MIDI gadget driver part deux
  android: base-cfg: disable ALARM_DEV
  staging: Remove logger and alarm-dev from android Makefile
  staging: Remove the Android alarm-dev driver
  staging: Remove the Android logger driver
  net: ping: fix constness inconsistency in ipv6_chk_addr
  ...

9 years agork3368-box.dts: modify fb display policy to DISPLAY_POLICY_BOX_TEMP.
Zheng Yang [Thu, 16 Apr 2015 01:35:50 +0000 (09:35 +0800)]
rk3368-box.dts: modify fb display policy to DISPLAY_POLICY_BOX_TEMP.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
9 years agoproc: uid_cputime: create uids from kuids
Amit Pundir [Tue, 14 Apr 2015 19:10:21 +0000 (00:40 +0530)]
proc: uid_cputime: create uids from kuids

Create uids from kuids using from_kuid_munged(),
otherwise we run into following build error and warnings:
--------------------
  CC      drivers/misc/uid_cputime.o
drivers/misc/uid_cputime.c: In function ‘uid_stat_show’:
drivers/misc/uid_cputime.c:90:36: error: incompatible type for argument 1 of ‘find_or_register_uid’
drivers/misc/uid_cputime.c:54:26: note: expected ‘uid_t’ but argument is of type ‘kuid_t’
drivers/misc/uid_cputime.c:94:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘kuid_t’ [-Wformat]
drivers/misc/uid_cputime.c: In function ‘process_notifier’:
drivers/misc/uid_cputime.c:194:6: error: incompatible types when assigning to type ‘uid_t’ from type ‘kuid_t’
make[2]: *** [drivers/misc/uid_cputime.o] Error 1
--------------------

Change-Id: Ifecb98001f7fe2fac74d1ef3e1abd03d43fc9059
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from commit b0f4decae627cf2d74e6f72c7ecb939c77d48625)

9 years agoMerge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Alex Shi [Wed, 15 Apr 2015 12:08:38 +0000 (20:08 +0800)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android

9 years agoconfigs: Remove duplicate CONFIG_FUNCTION_TRACER
Jon Medhurst [Wed, 15 Apr 2015 10:24:40 +0000 (11:24 +0100)]
configs: Remove duplicate CONFIG_FUNCTION_TRACER

To avoid the following warning when running merge_config.sh with
this config fragment...

./.tmp.config.37TtCkZvtp:92:warning: override: reassigning to symbol FUNCTION_TRACER

Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years agokconfig: Fix warning "‘jump’ may be used uninitialized"
Peter Kümmel [Wed, 15 Apr 2015 10:24:39 +0000 (11:24 +0100)]
kconfig: Fix warning "‘jump’ may be used uninitialized"

Warning:
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     jump->offset = strlen(r->s);

Simplifies the test logic because (head && local) means (jump != 0)
and makes GCC happy when checking if the jump pointer was initialized.

Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
(cherry picked from commit 2d560306096739e2251329ab5c16059311a151b0)
Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years agokconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len
Martin Walch [Wed, 15 Apr 2015 10:24:38 +0000 (11:24 +0100)]
kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len

The struct gstr has a capacity that may differ from the actual string length.

However, a string manipulation in the function search_conf made the assumption
that it is the same, which led to messing up some search results, especially
when the content of the gstr in use had not yet reached at least 63 chars.

Signed-off-by: Martin Walch <walch.martin@web.de>
Acked-by: Wang YanQing <udknight@gmail.com>
Acked-by: Benjamin Poirier <bpoirier@suse.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
(cherry picked from commit 503c823048e81cc85c0e9d8c297cc70203e335e5)
Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years agoscripts/sortextable: suppress warning: `relocs_size' may be used uninitialized
Tim Gardner [Wed, 15 Apr 2015 10:24:37 +0000 (11:24 +0100)]
scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized

In file included from scripts/sortextable.c:194:0:
scripts/sortextable.c: In function `main':
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
   memset(relocs, 0, relocs_size);
   ^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
  int relocs_size;
      ^
In file included from scripts/sortextable.c:192:0:
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
   memset(relocs, 0, relocs_size);
   ^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
  int relocs_size;
      ^

gcc 4.9.1

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Jamie Iles <jamie.iles@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 7cbc0ea79da2cbe70d8da9319895f07f872a3190)
Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years agonetfilter: nfnetlink_queue: Fix "discards ‘const’ qualifier" warning
Jon Medhurst [Wed, 15 Apr 2015 10:24:36 +0000 (11:24 +0100)]
netfilter: nfnetlink_queue: Fix "discards ‘const’ qualifier" warning

nfqnl_zcopy can now modify the 'from' sk_buff, so drop the const
qualifier and fix build warnings like:

net/netfilter/nfnetlink_queue_core.c: In function ‘nfqnl_zcopy’:
net/netfilter/nfnetlink_queue_core.c:264:15: warning: passing argument 1 of ‘skb_orphan_frags’ discards ‘const’ qualifier from pointer target type
  if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) {

Fixes: c5f0c0e75254 ("core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors")
Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years agodrm/cma: Fix printk formats in drm_gem_cma_describe
Jon Medhurst [Wed, 15 Apr 2015 10:24:35 +0000 (11:24 +0100)]
drm/cma: Fix printk formats in drm_gem_cma_describe

This fixes the following warnings when building for arm64...

drivers/gpu/drm/drm_gem_cma_helper.c: In function ‘drm_gem_cma_descr    ibe’:
drivers/gpu/drm/drm_gem_cma_helper.c:273:4: warning: format ‘%Zx’ expects argument of type ‘size_t’, but argument 6 has type ‘dma_addr_t’ [-Wformat=]
    off, cma_obj->paddr, cma_obj->vaddr, obj->size);
    ^
drivers/gpu/drm/drm_gem_cma_helper.c:273:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘size_t’ [-Wformat=]

Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years agork fb: add fb disp policy for excessive stage
hjc [Wed, 15 Apr 2015 11:28:05 +0000 (19:28 +0800)]
rk fb: add fb disp policy for excessive stage

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agork fb: add mutex lock for switch screen to prevent
hjc [Wed, 15 Apr 2015 09:56:02 +0000 (17:56 +0800)]
rk fb: add mutex lock for switch screen to prevent
       hdmi and cvbs call this function at the same
       time.

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agodrivers/base: cpu: fix merge problem
Ryan Harkin [Tue, 14 Apr 2015 16:03:34 +0000 (17:03 +0100)]
drivers/base: cpu: fix merge problem

In LSK's linux-linaro-lsk-android branch, this merge

bb0dddf6157bc679de9143507375fce3f13fcd00

broke drivers/base/cpu.c

Because this patch appears twice:
197028d  2014-02-08  cpu: add generic support for CPU feature based
module autoloading  [Ard Biesheuvel]
126ef42  2014-02-08  cpu: add generic support for CPU feature based
module autoloading  [Ard Biesheuvel]

And the merge edited the file to the old contents.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years agoMerge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Alex Shi [Wed, 15 Apr 2015 08:52:39 +0000 (16:52 +0800)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android

9 years agoMerge branch 'for-lsk' of git://git.linaro.org/arm/big.LITTLE/mp into linux-linaro-lsk
Alex Shi [Wed, 15 Apr 2015 08:51:30 +0000 (16:51 +0800)]
Merge branch 'for-lsk' of git://git.linaro.org/arm/big.LITTLE/mp into linux-linaro-lsk

9 years agochange rga.h define to match rk_fb config
zsq [Wed, 15 Apr 2015 07:53:39 +0000 (15:53 +0800)]
change rga.h define to match rk_fb config

9 years agoRK3368 GPU version: Rogue L 0.13
zxl [Wed, 15 Apr 2015 01:53:37 +0000 (09:53 +0800)]
RK3368 GPU version: Rogue L 0.13
Remove 'Clear cleanup_sync'

Signed-off-by: zxl <zhuangxl@rock-chips.com>
9 years agork1000: Fix picture error when suspend and switch mode.
Zheng Yang [Tue, 14 Apr 2015 14:05:41 +0000 (22:05 +0800)]
rk1000: Fix picture error when suspend and switch mode.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
9 years agodisplay-sysfs:
Zheng Yang [Tue, 14 Apr 2015 13:16:19 +0000 (21:16 +0800)]
display-sysfs:
Do not disable HDMI in function rk_display_device_enable.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
9 years agork: ion: Add trace emit function for ion debug
CMY [Tue, 14 Apr 2015 11:57:37 +0000 (19:57 +0800)]
rk: ion: Add trace emit function for ion debug

Signed-off-by: CMY <cmy@rock-chips.com>
9 years agoHDMI: rk_fb_disp_scale is disabled.
Zheng Yang [Tue, 14 Apr 2015 11:35:22 +0000 (19:35 +0800)]
HDMI: rk_fb_disp_scale is disabled.
Overscan function is achieved by fb driver, so HDMI
driver do not call this function.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
9 years agosched: hmp: fix spinlock recursion in active migration
Kevin Hilman [Wed, 8 Apr 2015 21:32:07 +0000 (14:32 -0700)]
sched: hmp: fix spinlock recursion in active migration

Commit cd5c2cc93d3d (hmp: Remove potential for task_struct access
race) introduced a put_task_struct() to prevent races, but in doing so
introduced potential spinlock recursion.  (This change was further
consolidated in commit 0baa5811bacf -- sched: hmp: unify active
migration code.)

Unfortunately, the put_task_struct() is done while the runqueue
spinlock is held, but put_task_struct() can also cause a reschedule
causing the runqueue lock to be acquired recursively.

To fix, move the put_task_struct() outside the runqueue spinlock.

Reported-by: Victor Lixin <victor.lixin@hisilicon.com>
Cc: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Cc: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Reviewed-by: Jon Medhurst <tixy@linaro.org>
Reviewed-by: Alex Shi <alex.shi@linaro.org>
Reviewed-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years ago NAND DRIVER: rk3368 support nand.
Zhaoyifeng [Tue, 14 Apr 2015 09:29:24 +0000 (17:29 +0800)]
NAND DRIVER: rk3368 support nand.
    using __dma_map_area and virt_to_phys instead of rknand_dma_map_single
 and rknand_dma_unmap_single.
    dma_map_single need dev config dma ops struct and config dma_mask.
NAND flash driver has not this config and got the incorrect phy addr return by
dma_map_single.

9 years agork fb: add switch enable status when send uevent
hjc [Tue, 14 Apr 2015 07:42:26 +0000 (15:42 +0800)]
rk fb: add switch enable status when send uevent

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agowakeup: Add last wake up source logging for suspend abort reason.
Ruchi Kandoi [Wed, 8 Apr 2015 22:42:29 +0000 (15:42 -0700)]
wakeup: Add last wake up source logging for suspend abort reason.

There is a possibility that a wakeup source event is received after
the device prepares to suspend which might cause the suspend to abort.

This patch adds the functionality of reporting the last active wakeup
source which is currently not active but caused the suspend to abort reason
via the /sys/kernel/power/last_wakeup_reason file.

Change-Id: I1760d462f497b33e425f5565cb6cff5973932ec3
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
9 years agoselinux: add SOCK_DIAG_BY_FAMILY to the list of netlink message types
Paul Moore [Tue, 28 Jan 2014 19:45:41 +0000 (14:45 -0500)]
selinux: add SOCK_DIAG_BY_FAMILY to the list of netlink message types

commit 6a96e15096da6e7491107321cfa660c7c2aa119d upstream.

The SELinux AF_NETLINK/NETLINK_SOCK_DIAG socket class was missing the
SOCK_DIAG_BY_FAMILY definition which caused SELINUX_ERR messages when
the ss tool was run.

 # ss
 Netid  State  Recv-Q Send-Q  Local Address:Port   Peer Address:Port
 u_str  ESTAB  0      0                  * 14189             * 14190
 u_str  ESTAB  0      0                  * 14145             * 14144
 u_str  ESTAB  0      0                  * 14151             * 14150
 {...}
 # ausearch -m SELINUX_ERR
 ----
 time->Thu Jan 23 11:11:16 2014
 type=SYSCALL msg=audit(1390493476.445:374):
  arch=c000003e syscall=44 success=yes exit=40
  a0=3 a1=7fff03aa11f0 a2=28 a3=0 items=0 ppid=1852 pid=1895
  auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
  tty=pts0 ses=1 comm="ss" exe="/usr/sbin/ss"
  subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)
 type=SELINUX_ERR msg=audit(1390493476.445:374):
  SELinux:  unrecognized netlink message type=20 for sclass=32

Change-Id: I22218ec620bc3ee6396145f1c2ad8ed222648309
Signed-off-by: Paul Moore <pmoore@redhat.com>
9 years agoselinux/nlmsg: add XFRM_MSG_MAPPING
Nicolas Dichtel [Fri, 10 Apr 2015 14:24:28 +0000 (16:24 +0200)]
selinux/nlmsg: add XFRM_MSG_MAPPING

commit bd2cba07381a6dba60bc1c87ed8b37931d244da1 upstream (net-next).

This command is missing.

Change-Id: Ida52130382e42355e5f3b39134aa61a1ea98026d
Fixes: 3a2dfbe8acb1 ("xfrm: Notify changes in UDP encapsulation via netlink")
CC: Martin Willi <martin@strongswan.org>
Reported-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoselinux/nlmsg: add XFRM_MSG_MIGRATE
Nicolas Dichtel [Fri, 10 Apr 2015 14:24:27 +0000 (16:24 +0200)]
selinux/nlmsg: add XFRM_MSG_MIGRATE

commit 8d465bb777179c4bea731b828ec484088cc9fbc1 upstream (net-next).

This command is missing.

Change-Id: Id2c9344ca1ab2c96e0b758ad1efb38e16cf23b86
Fixes: 5c79de6e79cd ("[XFRM]: User interface for handling XFRM_MSG_MIGRATE")
Reported-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoselinux/nlmsg: add XFRM_MSG_REPORT
Nicolas Dichtel [Fri, 10 Apr 2015 14:24:26 +0000 (16:24 +0200)]
selinux/nlmsg: add XFRM_MSG_REPORT

commit b0b59b0056acd6f157a04cc895f7e24692fb08aa upstream (net-next).

This command is missing.

Change-Id: I8fa3b1b9815296d3b001244d2212f79f5654bd01
Fixes: 97a64b4577ae ("[XFRM]: Introduce XFRM_MSG_REPORT.")
Reported-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoselinux/nlmsg: add XFRM_MSG_[NEW|GET]SADINFO
Nicolas Dichtel [Wed, 8 Apr 2015 16:36:42 +0000 (18:36 +0200)]
selinux/nlmsg: add XFRM_MSG_[NEW|GET]SADINFO

commit 5b5800fad072133e4a9c2efbf735baaac83dec86 upstream (net-next).

These commands are missing.

Change-Id: I3fd1d3d700592c653e1a5c5199125805d55aaa95
Fixes: 28d8909bc790 ("[XFRM]: Export SAD info.")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoselinux/nlmsg: add XFRM_MSG_GETSPDINFO
Nicolas Dichtel [Wed, 8 Apr 2015 16:36:41 +0000 (18:36 +0200)]
selinux/nlmsg: add XFRM_MSG_GETSPDINFO

commit 5e6deebafb45fb271ae6939d48832e920b8fb74e upstream (net-next).

This command is missing.

Change-Id: Id0a0d9bf7a4af98a8f761fec902d1296138a911f
Fixes: ecfd6b183780 ("[XFRM]: Export SPD info")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoselinux/nlmsg: add XFRM_MSG_NEWSPDINFO
Nicolas Dichtel [Wed, 8 Apr 2015 16:36:40 +0000 (18:36 +0200)]
selinux/nlmsg: add XFRM_MSG_NEWSPDINFO

commit 2b7834d3e1b828429faa5dc41a480919e52d3f31 upstream (net-next).

This new command is missing.

Change-Id: If511000c19aa9af7220ff775d88ace9834b35dcb
Fixes: 880a6fab8f6b ("xfrm: configure policy hash table thresholds by netlink")
Reported-by: Christophe Gouault <christophe.gouault@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoSELinux: per-command whitelisting of ioctls
Jeff Vander Stoep [Wed, 8 Apr 2015 18:27:46 +0000 (11:27 -0700)]
SELinux: per-command whitelisting of ioctls

Extend the generic ioctl permission check with support for per-command
filtering. Source/target/class sets including the ioctl permission may
additionally include a set of commands. Example:

allow <source> <target>:<class> { 0x8910-0x8926 0x892A-0x8935 }
auditallow <source> <target>:<class> 0x892A

When ioctl commands are omitted only the permissions are checked. This
feature is intended to provide finer granularity for the ioctl
permission which may be too imprecise in some circumstances. For
example, the same driver may use ioctls to provide important and
benign functionality such as driver version or socket type as well as
dangerous capabilities such as debugging features, read/write/execute
to physical memory or access to sensitive data. Per-command filtering
provides a mechanism to reduce the attack surface of the kernel, and
limit applications to the subset of commands required.

The format of the policy binary has been modified to include ioctl
commands, and the policy version number has been incremented to
POLICYDB_VERSION_IOCTL_OPERATIONS=30 to account for the format change.

Bug: 18087110
Change-Id: Ibf0e36728f6f3f0d5af56ccdeddee40800af689d
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
9 years agosecurity: lsm_audit: add ioctl specific auditing
Jeff Vander Stoep [Sat, 4 Apr 2015 23:15:54 +0000 (16:15 -0700)]
security: lsm_audit: add ioctl specific auditing

Add information about ioctl calls to the LSM audit data. Log the
file path and command number.

Bug: 18087110
Change-Id: Idbbd106db6226683cb30022d9e8f6f3b8fab7f84
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
9 years agoLinux 3.10.74
Greg Kroah-Hartman [Mon, 13 Apr 2015 12:02:33 +0000 (14:02 +0200)]
Linux 3.10.74

9 years agonet: ethernet: pcnet32: Setup the SRAM and NOUFLO on Am79C97{3, 5}
Markos Chandras [Thu, 19 Mar 2015 10:28:14 +0000 (10:28 +0000)]
net: ethernet: pcnet32: Setup the SRAM and NOUFLO on Am79C97{3, 5}

commit 87f966d97b89774162df04d2106c6350c8fe4cb3 upstream.

On a MIPS Malta board, tons of fifo underflow errors have been observed
when using u-boot as bootloader instead of YAMON. The reason for that
is that YAMON used to set the pcnet device to SRAM mode but u-boot does
not. As a result, the default Tx threshold (64 bytes) is now too small to
keep the fifo relatively used and it can result to Tx fifo underflow errors.
As a result of which, it's best to setup the SRAM on supported controllers
so we can always use the NOUFLO bit.

Cc: <netdev@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Cc: Don Fry <pcnet32@frontier.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agopowerpc/mpc85xx: Add ranges to etsec2 nodes
Scott Wood [Thu, 18 Dec 2014 01:06:31 +0000 (19:06 -0600)]
powerpc/mpc85xx: Add ranges to etsec2 nodes

commit bb344ca5b90df62b1a3b7a35c6a9d00b306a170d upstream.

Commit 746c9e9f92dd "of/base: Fix PowerPC address parsing hack" limited
the applicability of the workaround whereby a missing ranges is treated
as an empty ranges.  This workaround was hiding a bug in the etsec2
device tree nodes, which have children with reg, but did not have
ranges.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agohfsplus: fix B-tree corruption after insertion at position 0
Sergei Antonov [Wed, 25 Mar 2015 22:55:34 +0000 (15:55 -0700)]
hfsplus: fix B-tree corruption after insertion at position 0

commit 98cf21c61a7f5419d82f847c4d77bf6e96a76f5f upstream.

Fix B-tree corruption when a new record is inserted at position 0 in the
node in hfs_brec_insert().  In this case a hfs_brec_update_parent() is
called to update the parent index node (if exists) and it is passed
hfs_find_data with a search_key containing a newly inserted key instead
of the key to be updated.  This results in an inconsistent index node.
The bug reproduces on my machine after an extents overflow record for
the catalog file (CNID=4) is inserted into the extents overflow B-tree.
Because of a low (reserved) value of CNID=4, it has to become the first
record in the first leaf node.

The resulting first leaf node is correct:

  ----------------------------------------------------
  | key0.CNID=4 | key1.CNID=123 | key2.CNID=456, ... |
  ----------------------------------------------------

But the parent index key0 still contains the previous key CNID=123:

  -----------------------
  | key0.CNID=123 | ... |
  -----------------------

A change in hfs_brec_insert() makes hfs_brec_update_parent() work
correctly by preventing it from getting fd->record=-1 value from
__hfs_brec_find().

Along the way, I removed duplicate code with unification of the if
condition.  The resulting code is equivalent to the original code
because node is never 0.

Also hfs_brec_update_parent() will now return an error after getting a
negative fd->record value.  However, the return value of
hfs_brec_update_parent() is not checked anywhere in the file and I'm
leaving it unchanged by this patch.  brec.c lacks error checking after
some other calls too, but this issue is of less importance than the one
being fixed by this patch.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Cc: Joe Perches <joe@perches.com>
Reviewed-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodm: hold suspend_lock while suspending device during device deletion
Mikulas Patocka [Fri, 27 Feb 2015 19:04:27 +0000 (14:04 -0500)]
dm: hold suspend_lock while suspending device during device deletion

commit ab7c7bb6f4ab95dbca96fcfc4463cd69843e3e24 upstream.

__dm_destroy() must take the suspend_lock so that its presuspend and
postsuspend calls do not race with an internal suspend.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agovt6655: RFbSetPower fix missing rate RATE_12M
Malcolm Priestley [Sat, 7 Mar 2015 17:04:54 +0000 (17:04 +0000)]
vt6655: RFbSetPower fix missing rate RATE_12M

commit 40c8790bcb7ac74f3038153cd09310e220c6a1df upstream.

When the driver sets this rate a power of zero value is set causing
data flow stoppage until another rate is tried.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoperf: Fix irq_work 'tail' recursion
Peter Zijlstra [Thu, 19 Feb 2015 17:03:11 +0000 (18:03 +0100)]
perf: Fix irq_work 'tail' recursion

commit d525211f9d1be8b523ec7633f080f2116f5ea536 upstream.

Vince reported a watchdog lockup like:

[<ffffffff8115e114>] perf_tp_event+0xc4/0x210
[<ffffffff810b4f8a>] perf_trace_lock+0x12a/0x160
[<ffffffff810b7f10>] lock_release+0x130/0x260
[<ffffffff816c7474>] _raw_spin_unlock_irqrestore+0x24/0x40
[<ffffffff8107bb4d>] do_send_sig_info+0x5d/0x80
[<ffffffff811f69df>] send_sigio_to_task+0x12f/0x1a0
[<ffffffff811f71ce>] send_sigio+0xae/0x100
[<ffffffff811f72b7>] kill_fasync+0x97/0xf0
[<ffffffff8115d0b4>] perf_event_wakeup+0xd4/0xf0
[<ffffffff8115d103>] perf_pending_event+0x33/0x60
[<ffffffff8114e3fc>] irq_work_run_list+0x4c/0x80
[<ffffffff8114e448>] irq_work_run+0x18/0x40
[<ffffffff810196af>] smp_trace_irq_work_interrupt+0x3f/0xc0
[<ffffffff816c99bd>] trace_irq_work_interrupt+0x6d/0x80

Which is caused by an irq_work generating new irq_work and therefore
not allowing forward progress.

This happens because processing the perf irq_work triggers another
perf event (tracepoint stuff) which in turn generates an irq_work ad
infinitum.

Avoid this by raising the recursion counter in the irq_work -- which
effectively disables all software events (including tracepoints) from
actually triggering again.

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20150219170311.GH21418@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoRevert "iwlwifi: mvm: fix failure path when power_update fails in add_interface"
Greg Kroah-Hartman [Mon, 6 Apr 2015 10:18:59 +0000 (12:18 +0200)]
Revert "iwlwifi: mvm: fix failure path when power_update fails in add_interface"

This reverts commit fce2d025479af5e1fa6717480c7853cdfb8b71aa

It was incorrectly applied, as it merged with fuzz.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
9 years agomac80211: drop unencrypted frames in mesh fwding
Bob Copeland [Mon, 2 Mar 2015 19:28:52 +0000 (14:28 -0500)]
mac80211: drop unencrypted frames in mesh fwding

commit d0c22119f574b851e63360c6b8660fe9593bbc3c upstream.

The mesh forwarding path was not checking that data
frames were protected when running an encrypted network;
add the necessary check.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomac80211: disable u-APSD queues by default
Michal Kazior [Tue, 10 Feb 2015 11:48:44 +0000 (12:48 +0100)]
mac80211: disable u-APSD queues by default

commit aa75ebc275b2a91b193654a177daf900ad6703f0 upstream.

Some APs experience problems when working with
U-APSD. Decreasing the probability of that
happening by using legacy mode for all ACs but VO
isn't enough.

Cisco 4410N originally forced us to enable VO by
default only because it treated non-VO ACs as
legacy.

However some APs (notably Netgear R7000) silently
reclassify packets to different ACs. Since u-APSD
ACs require trigger frames for frame retrieval
clients would never see some frames (e.g. ARP
responses) or would fetch them accidentally after
a long time.

It makes little sense to enable u-APSD queues by
default because it needs userspace applications to
be aware of it to actually take advantage of the
possible additional powersavings. Implicitly
depending on driver autotrigger frame support
doesn't make much sense.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agonl80211: ignore HT/VHT capabilities without QoS/WMM
Johannes Berg [Thu, 12 Mar 2015 06:53:27 +0000 (08:53 +0200)]
nl80211: ignore HT/VHT capabilities without QoS/WMM

commit 496fcc294daab18799e190c0264863d653588d1f upstream.

As HT/VHT depend heavily on QoS/WMM, it's not a good idea to
let userspace add clients that have HT/VHT but not QoS/WMM.
Since it does so in certain cases we've observed (client is
using HT IEs but not QoS/WMM) just ignore the HT/VHT info at
this point and don't pass it down to the drivers which might
unconditionally use it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agotcm_qla2xxx: Fix incorrect use of __transport_register_session
Bart Van Assche [Fri, 20 Mar 2015 05:25:16 +0000 (22:25 -0700)]
tcm_qla2xxx: Fix incorrect use of __transport_register_session

commit 75c3d0bf9caebb502e96683b2bc37f9692437e68 upstream.

This patch fixes the incorrect use of __transport_register_session()
in tcm_qla2xxx_check_initiator_node_acl() code, that does not perform
explicit se_tpg->session_lock when accessing se_tpg->tpg_sess_list
to add new se_sess nodes.

Given that tcm_qla2xxx_check_initiator_node_acl() is not called with
qla_hw->hardware_lock held for all accesses of ->tpg_sess_list, the
code should be using transport_register_session() instead.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
Cc: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agotcm_fc: missing curly braces in ft_invl_hw_context()
Dan Carpenter [Wed, 25 Feb 2015 13:21:03 +0000 (16:21 +0300)]
tcm_fc: missing curly braces in ft_invl_hw_context()

commit d556546e7ecd9fca199df4698943024d40044f8e upstream.

This patch adds a missing set of conditional check braces in
ft_invl_hw_context() originally introduced by commit dcd998ccd
when handling DDP failures in ft_recv_write_data() code.

 commit dcd998ccdbf74a7d8fe0f0a44e85da1ed5975946
 Author: Kiran Patil <kiran.patil@intel.com>
 Date:   Wed Aug 3 09:20:01 2011 +0000

    tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: wm8955: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:13 +0000 (12:39 +0100)]
ASoC: wm8955: Fix wrong value references for boolean kctl

commit 07892b10356f17717abdc578acbef72db86c880e upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: adav80x: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:03 +0000 (12:39 +0100)]
ASoC: adav80x: Fix wrong value references for boolean kctl

commit 2bf4c1d483d911cda5dd385527194d23e5cea73d upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: ak4641: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:04 +0000 (12:39 +0100)]
ASoC: ak4641: Fix wrong value references for boolean kctl

commit 08641d9b7bf915144a57a736b42642e13eb1167f upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: wm8904: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:12 +0000 (12:39 +0100)]
ASoC: wm8904: Fix wrong value references for boolean kctl

commit eaddf6fd959074f6a6e71deffe079c71eef35da6 upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: wm8903: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:11 +0000 (12:39 +0100)]
ASoC: wm8903: Fix wrong value references for boolean kctl

commit 24cc883c1fd16df34211ae41624aa6d3cd906693 upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: wm2000: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:09 +0000 (12:39 +0100)]
ASoC: wm2000: Fix wrong value references for boolean kctl

commit 00a14c2968e3d55817e0fa35c78106ca840537bf upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: wm8731: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:10 +0000 (12:39 +0100)]
ASoC: wm8731: Fix wrong value references for boolean kctl

commit bd14016fbf31aa199026f1e2358eab695f374eb1 upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: tas5086: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:08 +0000 (12:39 +0100)]
ASoC: tas5086: Fix wrong value references for boolean kctl

commit 4c523ef61160b7d478371ddc9f48c8ce0a00d675 upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: wm8960: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:14 +0000 (12:39 +0100)]
ASoC: wm8960: Fix wrong value references for boolean kctl

commit b4a18c8b1af15ebfa9054a3d2aef7b0a7e6f2a05 upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: cs4271: Fix wrong value references for boolean kctl
Takashi Iwai [Tue, 10 Mar 2015 11:39:05 +0000 (12:39 +0100)]
ASoC: cs4271: Fix wrong value references for boolean kctl

commit e8371aa0fecb73fb8a4b2e0296b025b11e7d6229 upstream.

The correct values referred by a boolean control are
value.integer.value[], not value.enumerated.item[].
The former is long while the latter is int, so it's even incompatible
on 64bit architectures.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoASoC: sgtl5000: remove useless register write clearing CHRGPUMP_POWERUP
Eric Nelson [Fri, 27 Feb 2015 15:06:45 +0000 (08:06 -0700)]
ASoC: sgtl5000: remove useless register write clearing CHRGPUMP_POWERUP

commit c7d910b87d3c8e9fcf4077089ca4327c12eee099 upstream.

The SGTL5000_CHIP_ANA_POWER register is cached. Update the cached
value instead of writing it directly.

Patch inspired by Russell King's more colorful remarks in this
patch:
https://github.com/SolidRun/linux-imx6-3.14/commit/dd4bf6a

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoarm64: kuser32-bit helpers: do not include unistd32.h explicitly
Amit Pundir [Thu, 19 Feb 2015 07:51:00 +0000 (13:21 +0530)]
arm64: kuser32-bit helpers: do not include unistd32.h explicitly

We get following warnings while building for arm64 arch:
----->8-----
In file included from arch/arm64/kernel/kuser32.S:32:0:
/linaro/android/kernel/pundir/arch/arm64/include/asm/unistd32.h:24:0: warning: "__NR_restart_syscall" redefined
 #define __NR_restart_syscall 0
 ^
In file included from include/asm-generic/unistd.h:1:0,
                 from /linaro/android/kernel/pundir/arch/arm64/include/uapi/asm/unistd.h:16,
                 from /linaro/android/kernel/pundir/arch/arm64/include/asm/unistd.h:50,
                 from arch/arm64/kernel/kuser32.S:31:
include/uapi/asm-generic/unistd.h:390:0: note: this is the location of the previous definition
 #define __NR_restart_syscall 128
 ^
In file included from arch/arm64/kernel/kuser32.S:32:0:
/linaro/android/kernel/pundir/arch/arm64/include/asm/unistd32.h:26:0: warning: "__NR_exit" redefined
 #define __NR_exit 1
 ^
In file included from include/asm-generic/unistd.h:1:0,
                 from /linaro/android/kernel/pundir/arch/arm64/include/uapi/asm/unistd.h:16,
                 from /linaro/android/kernel/pundir/arch/arm64/include/asm/unistd.h:50,
                 from arch/arm64/kernel/kuser32.S:31:
include/uapi/asm-generic/unistd.h:292:0: note: this is the location of the previous definition
 #define __NR_exit 93
 ^
-----8<-----

This patch removes unitstd32.h include to avoid duplication of
"__NR_" syscall definitions.

This patch is based on AOSP commit: cfc7e99e9e3900056028a7d90072e9ea0d886f8d,
"arm64: Add __NR_* definitions for compat syscalls", which adds
__NR_* definitions to asm/unistd32.h, moves the __NR_compat_*
definitions to asm/unistd.h and removes all the explicit unistd32.h
includes apart from the one building the compat syscall table.
The aim is to have the compat __NR_* definitions available but
without colliding with the native syscall definitions (required
by lib/compat_audit.c to avoid duplicating the audit header files
between native and compat).

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
9 years agork fb: update message info when page fault
hjc [Mon, 13 Apr 2015 07:54:02 +0000 (15:54 +0800)]
rk fb: update message info when page fault

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agork fb: send uevent when change video mode
hjc [Mon, 13 Apr 2015 03:54:36 +0000 (11:54 +0800)]
rk fb: send uevent when change video mode

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agommc: core: fix race condition in mmc_wait_data_done
Jialing Fu [Mon, 13 Apr 2015 06:35:27 +0000 (14:35 +0800)]
mmc: core: fix race condition in mmc_wait_data_done

The following panic is captured in ker3.14, but the issue still exists
in latest kernel.
---------------------------------------------------------------------
[   20.738217] c0 3136 (Compiler) Unable to handle kernel NULL pointer dereference
at virtual address 00000578
......
[   20.738499] c0 3136 (Compiler) PC is at _raw_spin_lock_irqsave+0x24/0x60
[   20.738527] c0 3136 (Compiler) LR is at _raw_spin_lock_irqsave+0x20/0x60
[   20.740134] c0 3136 (Compiler) Call trace:
[   20.740165] c0 3136 (Compiler) [<ffffffc0008ee900>] _raw_spin_lock_irqsave+0x24/0x60
[   20.740200] c0 3136 (Compiler) [<ffffffc0000dd024>] __wake_up+0x1c/0x54
[   20.740230] c0 3136 (Compiler) [<ffffffc000639414>] mmc_wait_data_done+0x28/0x34
[   20.740262] c0 3136 (Compiler) [<ffffffc0006391a0>] mmc_request_done+0xa4/0x220
[   20.740314] c0 3136 (Compiler) [<ffffffc000656894>] sdhci_tasklet_finish+0xac/0x264
[   20.740352] c0 3136 (Compiler) [<ffffffc0000a2b58>] tasklet_action+0xa0/0x158
[   20.740382] c0 3136 (Compiler) [<ffffffc0000a2078>] __do_softirq+0x10c/0x2e4
[   20.740411] c0 3136 (Compiler) [<ffffffc0000a24bc>] irq_exit+0x8c/0xc0
[   20.740439] c0 3136 (Compiler) [<ffffffc00008489c>] handle_IRQ+0x48/0xac
[   20.740469] c0 3136 (Compiler) [<ffffffc000081428>] gic_handle_irq+0x38/0x7c
----------------------------------------------------------------------

Because in SMP, "mrq" has race condition between below two paths:
path1: CPU0: <tasklet context>
  static void mmc_wait_data_done(struct mmc_request *mrq)
  {
    mrq->host->context_info.is_done_rcv = true;
    //
    // If CPU0 has just finished "is_done_rcv = true" in path1, and at
    // this moment, IRQ or ICache line missing happens in CPU0.
    // What happens in CPU1 (path2)?
    //
    // If the mmcqd thread in CPU1(path2) hasn't entered to sleep mode:
    // path2 would have chance to break from wait_event_interruptible
    // in mmc_wait_for_data_req_done and continue to run for next
    // mmc_request (mmc_blk_rw_rq_prep).
    //
    // Within mmc_blk_rq_prep, mrq is cleared to 0.
    // If below line still gets host from "mrq" as the result of
    // compiler, the panic happens as we traced.
    wake_up_interruptible(&mrq->host->context_info.wait);
  }

path2: CPU1: <The mmcqd thread runs mmc_queue_thread>
 static int mmc_wait_for_data_req_done(...
 {
    ...
    while (1) {
          wait_event_interruptible(context_info->wait,
                  (context_info->is_done_rcv ||
                   context_info->is_new_req));

  static void mmc_blk_rw_rq_prep(...
  {
    ...
    memset(brq, 0, sizeof(struct mmc_blk_request));

This issue happens very coincidentally; however adding mdelay(1) in
mmc_wait_data_done as below could duplicate it easily.
  static void mmc_wait_data_done(struct mmc_request *mrq)
  {
    mrq->host->context_info.is_done_rcv = true;
    mdelay(1);
    wake_up_interruptible(&mrq->host->context_info.wait);
  }
At runtime, IRQ or ICache line missing may just happen at the same place
of the mdelay(1).

This patch gets the mmc_context_info at the beginning of function, it can
avoid this race condition.

Signed-off-by: Jialing Fu <jlfu@marvell.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: lintao <lintao@rock-chips.com>
9 years agork3368: clk: powerdomain: enable powerdomain func.
zhangqing [Mon, 13 Apr 2015 11:27:48 +0000 (04:27 -0700)]
rk3368: clk: powerdomain: enable powerdomain func.

test:Passed the special test.Test machine 15 for P9 and test 12H.
Have the test report form Quality department.

Signed-off-by: zhangqing <zhangqing@rock-chips.com>
9 years agork fb: do something when user set invalid config
hjc [Mon, 13 Apr 2015 03:13:32 +0000 (11:13 +0800)]
rk fb: do something when user set invalid config

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agork: iommu: enable iommu by default on rk33xx platform
CMY [Mon, 13 Apr 2015 01:26:48 +0000 (09:26 +0800)]
rk: iommu: enable iommu by default on rk33xx platform

Signed-off-by: CMY <cmy@rock-chips.com>
9 years agodts: rk3368: add mcu jtag pcl sd1 inactive state
lintao [Mon, 13 Apr 2015 01:19:29 +0000 (09:19 +0800)]
dts: rk3368: add mcu jtag pcl sd1 inactive state

Signed-off-by: lintao <lintao@rock-chips.com>
9 years agork fb: set retire fence fd to -1 when ignore this frame
hjc [Mon, 13 Apr 2015 01:39:50 +0000 (09:39 +0800)]
rk fb: set retire fence fd to -1 when ignore this frame

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agoHDMI: calling rk_fb_switch_screen() to close vop related to HDMI
Zheng Yang [Sat, 11 Apr 2015 09:14:07 +0000 (17:14 +0800)]
HDMI: calling rk_fb_switch_screen() to close vop related to HDMI
      before calling switch_set_state() when HDMI is removed.
      For android hwcompser need to make sure vop is disabled when
      received hdmi removing event.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
9 years agousb: ftp: fix the bug of ftp ioctrl args problem with 32bit userspace on 64bit platforms
Aiyoujun [Sat, 11 Apr 2015 08:04:31 +0000 (16:04 +0800)]
usb: ftp: fix the bug of ftp ioctrl args problem with 32bit userspace on 64bit platforms

Signed-off-by: Aiyoujun <ayj@rock-chips.com>
9 years agork3368-p9: dts: enabled change ddr-freq
guoyi [Sat, 11 Apr 2015 08:40:46 +0000 (16:40 +0800)]
rk3368-p9: dts: enabled  change ddr-freq

9 years agousb: dwc_otg: fix bugs
lyz [Fri, 10 Apr 2015 07:58:49 +0000 (15:58 +0800)]
usb: dwc_otg: fix bugs

1.Cancel usb vbus detect work in driver shutdown rountine
2.Check empty list
3.Disable usb interrupt before usb mode change

TEST:

1.reboot test
2.while true; do
    echo 1 > force_usb_mode;busybox sleep 5;
    echo 2 > force_usb_mode;busybox sleep 5;
  done

Signed-off-by: lyz <lyz@rock-chips.com>
9 years agoIEP: Support processing part of input image
Alpha Lin [Fri, 10 Apr 2015 05:53:02 +0000 (13:53 +0800)]
IEP: Support processing part of input image

Enable virtual size and actual size and start offset, to support
processing part of input image.

Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
9 years agoPower: Report suspend times from last_suspend_time
jinqian [Wed, 25 Mar 2015 23:18:44 +0000 (16:18 -0700)]
Power: Report suspend times from last_suspend_time

This node epxorts two values separated by space.
From left to right:
1. time spent in suspend/resume process
2. time spent sleep in suspend state

Change-Id: I2cb9a9408a5fd12166aaec11b935a0fd6a408c63

9 years agoarm: crypto: Add optimized SHA-256/224
Sami Tolvanen [Mon, 23 Mar 2015 14:42:55 +0000 (14:42 +0000)]
arm: crypto: Add optimized SHA-256/224

Add Andy Polyakov's optimized assembly and NEON implementations for
SHA-256/224.

The sha256-armv4.pl script for generating the assembly code is from
OpenSSL commit 51f8d095562f36cdaa6893597b5c609e943b0565.

Compared to sha256-generic these implementations have the following
tcrypt speed improvements on Motorola Nexus 6 (Snapdragon 805):

  bs    b/u      sha256-neon  sha256-asm
  16    16       x1.32        x1.19
  64    16       x1.27        x1.15
  64    64       x1.36        x1.20
  256   16       x1.22        x1.11
  256   64       x1.36        x1.19
  256   256      x1.59        x1.23
  1024  16       x1.21        x1.10
  1024  256      x1.65        x1.23
  1024  1024     x1.76        x1.25
  2048  16       x1.21        x1.10
  2048  256      x1.66        x1.23
  2048  1024     x1.78        x1.25
  2048  2048     x1.79        x1.25
  4096  16       x1.20        x1.09
  4096  256      x1.66        x1.23
  4096  1024     x1.79        x1.26
  4096  4096     x1.82        x1.26
  8192  16       x1.20        x1.09
  8192  256      x1.67        x1.23
  8192  1024     x1.80        x1.26
  8192  4096     x1.85        x1.28
  8192  8192     x1.85        x1.27

Where bs refers to block size and b/u to bytes per update.

Change-Id: I83938010007660f7f3f77f2946c8d22557e3a327
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
9 years agoHDMI: call function hdmi->ops->disable() if it is disabled.
Zheng Yang [Thu, 9 Apr 2015 10:01:51 +0000 (18:01 +0800)]
HDMI: call function hdmi->ops->disable() if it is disabled.
      For system can not be wakeup under following case:
      step1. Disable HDMI.
      step2. set system to deep sleep mode.
      step3. remove HDMI connection.
      step4. wake up system.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
9 years agork fb: when unplug hdmi,post fb to display
hjc [Thu, 9 Apr 2015 10:06:02 +0000 (18:06 +0800)]
rk fb: when unplug hdmi,post fb to display

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agork fb: hdmi 24hz frame time need 41ms
hjc [Thu, 9 Apr 2015 09:37:15 +0000 (17:37 +0800)]
rk fb: hdmi 24hz frame time need 41ms

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agork fb: recovery need two framebuffer
hjc [Thu, 9 Apr 2015 08:26:57 +0000 (16:26 +0800)]
rk fb: recovery need two framebuffer

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agoRK3368 DDR: add support 3368 ddr change freq function
Tang Yun ping [Thu, 9 Apr 2015 03:36:59 +0000 (11:36 +0800)]
RK3368 DDR: add support 3368 ddr change freq function

note:need using new trustimage and uboot for support ddr change freq

Signed-off-by: Tang Yun ping <typ@rock-chips.com>
9 years agoi2s:fix the hdmi no sound sometimes
smj [Thu, 9 Apr 2015 03:22:23 +0000 (11:22 +0800)]
i2s:fix the hdmi no sound sometimes
    support for hdmi passthrough output

Signed-off-by: smj <smj@rock-chips.com>
9 years agork3368 lcdc: flush update regs worker when switch screen
hjc [Thu, 9 Apr 2015 03:54:56 +0000 (11:54 +0800)]
rk3368 lcdc: flush update regs worker when switch screen

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agoarm64: rockchip: rockchip_defconfig enabled rk818 & gt9xx & es8316
guoyi [Thu, 9 Apr 2015 02:58:42 +0000 (10:58 +0800)]
arm64: rockchip: rockchip_defconfig enabled rk818 & gt9xx & es8316

9 years agork fb: ignore frame when in hdmi switch or set error config
hjc [Thu, 9 Apr 2015 03:31:27 +0000 (11:31 +0800)]
rk fb: ignore frame when in hdmi switch or set error config

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agork3368 lcdc: reset lcdc when switch screen video mode
hjc [Thu, 9 Apr 2015 03:27:15 +0000 (11:27 +0800)]
rk3368 lcdc: reset lcdc when switch screen video mode

Signed-off-by: hjc <hjc@rock-chips.com>
9 years agoARM64: dt: rk3368: add driver support for rk818
Jianqun Xu [Thu, 9 Apr 2015 02:13:14 +0000 (10:13 +0800)]
ARM64: dt: rk3368: add driver support for rk818

Support rk818 pmic, patch is from zhangqing@rock-chips.com.

Signed-off-by: Zhangqing <zhangqing@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
9 years agork3368-box.dts: enable uboot logo.
Zheng Yang [Wed, 8 Apr 2015 10:46:46 +0000 (18:46 +0800)]
rk3368-box.dts: enable uboot logo.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
9 years agodts:rk3368-box.dts default iommu
huang zhibao [Wed, 8 Apr 2015 08:22:27 +0000 (16:22 +0800)]
dts:rk3368-box.dts default iommu