Dongkyun, Son [Tue, 31 Jan 2017 08:50:08 +0000 (17:50 +0900)]
perf: disabled '-Werror' to fix build error
error: 'readdir_r' is deprecated [-Werror=deprecated-declarations]
error: 'S_croak_memory_wrap' defined but not used [-Werror=unused-function]
Change-Id: If70d75dd3e3a7d637f91b687a6011aad8f4a80a7
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
Maciej Wereski [Fri, 20 Jan 2017 15:00:35 +0000 (16:00 +0100)]
Merge remote-tracking branch 'origin/tizen_common' into tizen
Paolo Bonzini [Thu, 31 Mar 2016 07:38:51 +0000 (09:38 +0200)]
compiler-gcc: disable -ftracer for __noclone functions
commit
95272c29378ee7dc15f43fa2758cb28a5913a06d upstream.
-ftracer can duplicate asm blocks causing compilation to fail in
noclone functions. For example, KVM declares a global variable
in an asm like
asm("2: ... \n
.pushsection data \n
.global vmx_return \n
vmx_return: .long 2b");
and -ftracer causes a double declaration.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: stable@vger.kernel.org
Cc: kvm@vger.kernel.org
Reported-by: Linda Walsh <lkml@tlinx.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I3aa7d5a11d3a0e027ad930b664930f67c84661c9
Joe Perches [Thu, 25 Jun 2015 22:01:02 +0000 (15:01 -0700)]
compiler-gcc: integrate the various compiler-gcc[345].h files
commit
f320793e52aee78f0fbb8bcaf10e6614d2e67bfc upstream.
[ Upstream commit
cb984d101b30eb7478d32df56a0023e4603cba7f ]
As gcc major version numbers are going to advance rather rapidly in the
future, there's no real value in separate files for each compiler
version.
Deduplicate some of the macros #defined in each file too.
Neaten comments using normal kernel commenting style.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Sasha Levin <levinsasha928@gmail.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Alan Modra <amodra@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ie57d2a3f395aa9bdefbe743057b3ab3edc7a5140
Behan Webster [Wed, 4 Sep 2013 02:27:26 +0000 (22:27 -0400)]
ARM: LLVMLinux: Change "extern inline" to "static inline" in glue-cache.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). "static inline" is the correct choice
instead.
Author: Behan Webster <behanw@converseincode.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Change-Id: Ia8eed79f7bcb910db7bfbc673a5820accf979915
Behan Webster [Wed, 24 Sep 2014 00:06:46 +0000 (01:06 +0100)]
ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). In this case using static inline
and removing the NULL version of return_address in return_address.c does
the right thing.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Change-Id: Ia248e544cb8585fa7bfab5df3b4f3fca3089ab0c
MyungJoo Ham [Mon, 14 Nov 2016 07:56:02 +0000 (16:56 +0900)]
Do Not Use profile macro
It is to be obsolete in 4.0.
It is allowed to use "profile" macro ONLY for backward compatibility while
keeping the compatibility with unified build environment.
- Both are false in this usage.
Change-Id: I13a3a94a49cb75dc18cedaa95e2e82f34bcedb3e
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Philippe Coval [Tue, 5 May 2015 14:58:01 +0000 (16:58 +0200)]
defconfig: add wifi atheros modules
Change-Id: Ib003862d100e3a4f397bfef4319ee70fc8e3c3e4
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Philippe Coval [Fri, 22 May 2015 16:05:22 +0000 (18:05 +0200)]
usbtouchscreen: adds support for inverting X or Y axis (or both)
Invert Y is needed (together with swap XY) for some touchscreens :
- LeadingTouch screens (at least for some of them)
- cartft 8in4 (USB ID=0eef:0001)
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Change-Id: I3b551be8734d5d5f272c8ee8579d2233d6c11ca4
Stephane Desneux [Wed, 4 Feb 2015 11:25:00 +0000 (12:25 +0100)]
config: adjusted for 3.14.28-ltsi
Change-Id: I0fa7eba65b6ca62eefbd95ddff160f901def4a11
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Mon, 26 Jan 2015 10:15:37 +0000 (11:15 +0100)]
Enable I2C/SMBus on intel platforms
Change-Id: I32e1c51a0d64b822377a56a264ac94742cbbb662
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Mon, 19 Jan 2015 16:32:19 +0000 (17:32 +0100)]
Enable support of DisplayLink framebuffer driver
Change-Id: I609519939f89ba6d9f10d00846a4d7d30af3dd88
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Tue, 25 Nov 2014 16:33:14 +0000 (17:33 +0100)]
adjusted configurations for 3.14.25
Change-Id: I891ad0800ee0dda13f0fca593d38d94f43b2062f
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Mon, 20 Oct 2014 14:30:51 +0000 (16:30 +0200)]
import configuration from old branch tizen_3.14.19
Change-Id: I2dcc39dd803829ba8ab0f26528e47386a2aa9222
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Philippe Coval [Tue, 5 May 2015 14:22:53 +0000 (16:22 +0200)]
packaging: fix gummiboot missing args
Change-Id: I88b2d65fc2570e1585a9886d4e28d4f6443d5711
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Maciej Wereski [Thu, 26 Feb 2015 12:44:05 +0000 (13:44 +0100)]
defconfig: enable CONFIG_DEVPTS_MULTIPLE_INSTANCES
This is required by systemd.
Related: https://git.tizen.org/cgit/platform/upstream/systemd.git/commit/?h=upstream&id=
b52a4a3b05a2a0d69868d57fd54f6e4b8fa0e7ca
Change-Id: Ib395e71a387a64bd14944b0087cb7a6e85b637ed
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
Stephane Desneux [Wed, 4 Feb 2015 10:57:41 +0000 (11:57 +0100)]
packaging, defconfig: bump to 3.14.28-ltsi
Change-Id: I789149825987f75058b2f806cc4ac905b421433e
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Łukasz Stelmach [Fri, 12 Dec 2014 11:08:03 +0000 (12:08 +0100)]
ARM: vexpress_defconfig: enable ACL and security labels for ext4
This patch enables security features of ext4 file-system required
by many conteporary user-space setups.
Forwarded: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-December/310299.html
Change-Id: Ia9396b810f7d84c926b762cc33a58a2ec9dfd781
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Stephane Desneux [Tue, 25 Nov 2014 16:48:07 +0000 (17:48 +0100)]
packaging: adjusted upgrade procedure (documentation)
Change-Id: I938f164f4c046426f5cacc6bb12abaa7ef262109
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Tue, 25 Nov 2014 11:51:43 +0000 (12:51 +0100)]
i386, x86_64 configurations: add CONFIG_EFI_STUB
It was reported that gummiboot can't boot the kernel without this option.
Change-Id: I8d963ff78b9ed1ef7b94a5d25cf0425a2fa7b1d4
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Łukasz Stelmach [Tue, 25 Nov 2014 10:41:49 +0000 (11:41 +0100)]
defconfig: set options according to systemd requirements
Change-Id: I74038b718861eefbb634d578cb092c4c1ce56fea
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Stephane Desneux [Tue, 25 Nov 2014 09:08:55 +0000 (10:08 +0100)]
packaging: bump to 3.14.25
Change-Id: I7984a962fc224e441b9248c538f84aec2942a04c
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Sat, 15 Nov 2014 10:19:23 +0000 (11:19 +0100)]
packaging: bump to 3.14.24
Change-Id: Ia317c8f81dfceb145dbb450601e44f09c27be2d5
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Thu, 6 Nov 2014 10:04:58 +0000 (11:04 +0100)]
packaging: bump to 3.14.23
Change-Id: I869f59de7a1f0d15251ae26ec87a0d9e1cb5bbae
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Wed, 22 Oct 2014 17:28:38 +0000 (19:28 +0200)]
packaging: bump to 3.14.22
Change-Id: I06136f052e75d4e8357ea099ae2d48e60c16c749
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Mon, 20 Oct 2014 13:11:09 +0000 (15:11 +0200)]
Initialize default configurations for x86,x86_64,arm
Change-Id: I3877e860311f8313d2ad09aff707484268409c1f
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stephane Desneux [Tue, 7 Oct 2014 15:47:13 +0000 (17:47 +0200)]
packaging: add spec file, gbs.conf
Change-Id: I7a8abba8bc6fb7459ac4d78547b41320b63e7eba
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
José Bollo [Mon, 15 Sep 2014 09:42:04 +0000 (11:42 +0200)]
SMACK: Fix wrong copy size
The function strncpy was copying an extra character 9
when i == len (what is possible via revoke interface).
Change-Id: Ic7452da05773e620a1d7bbc55e859c25a86c65f6
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
Chanho Park [Fri, 12 Sep 2014 02:03:01 +0000 (11:03 +0900)]
perf tools: define _DEFAULT_SOURCE for glibc_2.20
_BSD_SOURCE was deprecated in favour of _DEFAULT_SOURCE since glibc
2.20[1]. To avoid build warning on glibc2.20, _DEFAULT_SOURCE should
also be defined.
[1]: https://sourceware.org/glibc/wiki/Release/2.20
Change-Id: I01a2849bb8642cbf5c875caf227ab05e6fa0fa41
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Marcin Niesluchowski [Tue, 19 Aug 2014 12:26:32 +0000 (14:26 +0200)]
Smack: Fix setting label on successful file open
While opening with CAP_MAC_OVERRIDE file label is not set.
Other calls may access it after CAP_MAC_OVERRIDE is dropped from process.
Change-Id: I937d070e1c0cb251f4a0dd3291efbc94be3ca548
Signed-off-by: Marcin Niesluchowski <m.niesluchow@samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Origin: git://git.gitorious.org/smack-next/kernel.git# smack-for-3.18
Konstantin Khlebnikov [Thu, 7 Aug 2014 16:52:49 +0000 (20:52 +0400)]
Smack: remove unneeded NULL-termination from securtity label
Values of extended attributes are stored as binary blobs. NULL-termination
of them isn't required. It just wastes disk space and confuses command-line
tools like getfattr because they have to print that zero byte at the end.
This patch removes terminating zero byte from initial security label in
smack_inode_init_security and cuts it out in function smack_inode_getsecurity
which is used by syscall getxattr. This change seems completely safe, because
function smk_parse_smack ignores everything after first zero byte.
Change-Id: I131879e36fc9e71b65857b46714ccd0e512fc83c
Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Konstantin Khlebnikov [Thu, 7 Aug 2014 16:52:43 +0000 (20:52 +0400)]
Smack: handle zero-length security labels without panic
Zero-length security labels are invalid but kernel should handle them.
This patch fixes kernel panic after setting zero-length security labels:
And after writing zero-length string into smackfs files syslog and onlycp:
The problem is caused by brain-damaged logic in function smk_parse_smack()
which takes pointer to buffer and its length but if length below or equal zero
it thinks that the buffer is zero-terminated. Unfortunately callers of this
function are widely used and proper fix requires serious refactoring.
Change-Id: I931735ccfaea4d8d2f0a98eacf8467f0a8359bc6
Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Konstantin Khlebnikov [Thu, 7 Aug 2014 16:52:33 +0000 (20:52 +0400)]
Smack: fix behavior of smack_inode_listsecurity
Security operation ->inode_listsecurity is used for generating list of
available extended attributes for syscall listxattr. Currently it's used
only in nfs4 or if filesystem doesn't provide i_op->listxattr.
The list is the set of NULL-terminated names, one after the other.
This method must include zero byte at the and into result.
Also this function must return length even if string does not fit into
output buffer or it is NULL, see similar method in selinux and man listxattr.
Change-Id: I3ba4524fead6ef6ab0c93238fa8d422e6b155efb
Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Toralf Förster [Sun, 27 Apr 2014 17:33:34 +0000 (19:33 +0200)]
Warning in scanf string typing
This fixes a warning about the mismatch of types between
the declared unsigned and integer.
Change-Id: Ie7170fa22c1f641b2990721b44059d399c92ffe6
Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Casey Schaufler [Mon, 21 Apr 2014 18:10:26 +0000 (11:10 -0700)]
Smack: Verify read access on file open - v3
Smack believes that many of the operatons that can
be performed on an open file descriptor are read operations.
The fstat and lseek system calls are examples.
An implication of this is that files shouldn't be open
if the task doesn't have read access even if it has
write access and the file is being opened write only.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: Iefff38549f9f2e242fd21fce42db067c4c4d8a12
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Casey Schaufler [Thu, 10 Apr 2014 23:37:08 +0000 (16:37 -0700)]
Smack: bidirectional UDS connect check
Smack IPC policy requires that the sender have write access
to the receiver. UDS streams don't do per-packet checks. The
only check is done at connect time. The existing code checks
if the connecting process can write to the other, but not the
other way around. This change adds a check that the other end
can write to the connecting process.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I0dd9124261cb66a364322ed88e9dcb3213157cb6
Signed-off-by: Casey Schuafler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Casey Schaufler [Thu, 10 Apr 2014 23:35:36 +0000 (16:35 -0700)]
Smack: Correctly remove SMACK64TRANSMUTE attribute
Sam Henderson points out that removing the SMACK64TRANSMUTE
attribute from a directory does not result in the directory
transmuting. This is because the inode flag indicating that
the directory is transmuting isn't cleared. The fix is a tad
less than trivial because smk_task and smk_mmap should have
been broken out, too.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: Iae25080bfd0ec247391c997a59f3e2327423e33d
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Pankaj Kumar [Fri, 13 Dec 2013 09:42:22 +0000 (15:12 +0530)]
bugfix patch for SMACK
1. In order to remove any SMACK extended attribute from a file, a user
should have CAP_MAC_ADMIN capability. But user without having this
capability is able to remove SMACK64MMAP security attribute.
2. While validating size and value of smack extended attribute in
smack_inode_setsecurity hook, wrong error code is returned.
Change-Id: Ib4b290150f4a003733f76cbb7ccc25d228310ecb
Signed-off-by: Pankaj Kumar <pamkaj.k2@samsung.com>
Signed-off-by: Himanshu Shukla <himanshu.sh@samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Lukasz Pawelczyk [Tue, 11 Mar 2014 16:07:06 +0000 (17:07 +0100)]
Smack: adds smackfs/ptrace interface
This allows to limit ptrace beyond the regular smack access rules.
It adds a smackfs/ptrace interface that allows smack to be configured
to require equal smack labels for PTRACE_MODE_ATTACH access.
See the changes in Documentation/security/Smack.txt below for details.
Change-Id: If5d887a86b8d05ac46c82e1e7e123b86a5d62ddb
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@partner.samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Lukasz Pawelczyk [Tue, 11 Mar 2014 16:07:05 +0000 (17:07 +0100)]
Smack: unify all ptrace accesses in the smack
The decision whether we can trace a process is made in the following
functions:
smack_ptrace_traceme()
smack_ptrace_access_check()
smack_bprm_set_creds() (in case the proces is traced)
This patch unifies all those decisions by introducing one function that
checks whether ptrace is allowed: smk_ptrace_rule_check().
This makes possible to actually trace with TRACEME where first the
TRACEME itself must be allowed and then exec() on a traced process.
Additional bugs fixed:
- The decision is made according to the mode parameter that is now correctly
translated from PTRACE_MODE_* to MAY_* instead of being treated 1:1.
PTRACE_MODE_READ requires MAY_READ.
PTRACE_MODE_ATTACH requires MAY_READWRITE.
- Add a smack audit log in case of exec() refused by bprm_set_creds().
- Honor the PTRACE_MODE_NOAUDIT flag and don't put smack audit info
in case this flag is set.
Change-Id: I14d6de0c11ce190e53788a0b4fc096471506c736
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@partner.samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Lukasz Pawelczyk [Tue, 11 Mar 2014 16:07:04 +0000 (17:07 +0100)]
Smack: fix the subject/object order in smack_ptrace_traceme()
The order of subject/object is currently reversed in
smack_ptrace_traceme(). It is currently checked if the tracee has a
capability to trace tracer and according to this rule a decision is made
whether the tracer will be allowed to trace tracee.
Change-Id: I70afd604b29e5d6515d042ab648b0513c1f77d7a
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@partner.samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
José Bollo [Wed, 8 Jan 2014 14:53:05 +0000 (15:53 +0100)]
Minor improvement of 'smack_sb_kern_mount'
Fix a possible memory access fault when transmute is true and isp is NULL.
Change-Id: I29708ce54b96b34b440cf349e2b1891ea8d9d34f
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Dmitry Kasatkin [Fri, 14 Mar 2014 17:44:49 +0000 (17:44 +0000)]
smack: fix key permission verification
For any keyring access type SMACK always used MAY_READWRITE access check.
It prevents reading the key with label "_", which should be allowed for anyone.
This patch changes default access check to MAY_READ and use MAY_READWRITE in only
appropriate cases.
Change-Id: Ie357956730df93058198e2df13ef307ce4e8f675
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
David Howells [Fri, 14 Mar 2014 17:44:49 +0000 (17:44 +0000)]
KEYS: Move the flags representing required permission to linux/key.h
Move the flags representing required permission to linux/key.h as the perm
parameter of security_key_permission() is in terms of them - and not the
permissions mask flags used in key->perm.
Whilst we're at it:
(1) Rename them to be KEY_NEED_xxx rather than KEY_xxx to avoid collisions
with symbols in uapi/linux/input.h.
(2) Don't use key_perm_t for a mask of required permissions, but rather limit
it to the permissions mask attached to the key and arguments related
directly to that.
Change-Id: Id9de84f93e5dd668a3b8ba00fc2440c6d6c6f988
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Origin: upstream
Philippe Coval [Fri, 22 Aug 2014 08:09:19 +0000 (10:09 +0200)]
Revert "x86/efi: Correct EFI boot stub use of code32_start"
This reverts commit
45ada9fae6d836aa8e3be5302d7aeb50c44e0629.
With this change in , nexcom's vtc1010 does not boot anynore
even rebased on latest version v3.14.17
and with latest firmware :
ftp://ftp.nexcom.com/pub/BIOS/VTC1010/x86_32bit/MV11A109.rom
( md5=
f5ccb5284ca5bd8668fa1031067dad27 )
The bug is now tracked upstream.
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=82891
Change-Id: I82bb1227dcbcbfe1371d685d241e985a6e58ddf3
Bug-Tizen: TC-1513/part
José Bollo [Thu, 3 Apr 2014 07:51:07 +0000 (09:51 +0200)]
SMACK: Fix handling value==NULL in post setxattr
The function `smack_inode_post_setxattr` is called each
time that a setxattr is done, for any value of name.
The kernel allow to put value==NULL when size==0
to set an empty attribute value. The systematic
call to smk_import_entry was causing the dereference
of a NULL pointer hence a KERNEL PANIC!
The problem can be produced easily by issuing the
command `setfattr -n user.data file` under bash prompt
when SMACK is active.
Moving the call to smk_import_entry as proposed by this
patch is correcting the behaviour because the function
smack_inode_post_setxattr is called for the SMACK's
attributes only if the function smack_inode_setxattr validated
the value and its size (what will not be the case when size==0).
It also has a benefical effect to not fill the smack hash
with garbage values coming from any extended attribute
write.
Change-Id: Iaf0039c2be9bccb6cee11c24a3b44d209101fe47
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Casey Schaufler [Thu, 21 Nov 2013 08:55:10 +0000 (10:55 +0200)]
Smack: Cgroup filesystem access
The cgroup filesystems are not mounted using conventional
mechanisms. This prevents the use of mount options to
set Smack attributes. This patch makes the behavior
of cgroup filesystems compatable with the way systemd
uses them.
Change-Id: I1e0429f133db9e14117dc754d682dec08221354c
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Jean Delvare [Wed, 5 Nov 2014 01:39:21 +0000 (09:39 +0800)]
watchdog: iTCO_wdt: Fix the parent device
The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich
(the PCI device.) Setting the parent right makes it much easier for
the user to figure out which driver/module is handling the watchdog
device node.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit
c90789baa8cec363093c5ec292c989b6f22d8f32)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Jingoo Han [Wed, 5 Nov 2014 01:39:20 +0000 (09:39 +0800)]
watchdog: fix checkpatch warnings and error
Fix the following checkpatch warnings and error:
WARNING: quoted string split across lines
WARNING: braces {} are not necessary for single statement blocks
WARNING: __initdata should be placed after ibmasr_id_table[]
WARNING: please, no space before tabs
ERROR: do not initialise statics to 0 or NULL
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit
5f5e19093b2fa592720810154f15ffe51aa9277f)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Peter Tyser [Wed, 5 Nov 2014 01:39:19 +0000 (09:39 +0800)]
watchdog: iTCO_wdt: Add support for v3 silicon
Some new Atom's, eg Avoton and Bay Trail, have slightly different iTCO
functionality:
- The watchdog timer ticks at 1 second instead of .6 seconds
- Some 8 and 16-bit registers were combined into 32-bit registers
- Some registers were removed (DAT_IN, DAT_OUT, MESSAGE)
- The BOOT_STS field in TCO_STS was removed
- The NO_REBOOT bit is in the PMC area instead of GCS
Update the driver to support the above changes and bump the version to
1.11.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
24b3a1670b47e75be633ae0b5c07945c446f9d29)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
James Ralston [Wed, 5 Nov 2014 01:39:18 +0000 (09:39 +0800)]
mfd: lpc_ich: Add Device IDs for Intel 9 Series PCH
This patch adds the LPC Device IDs for the Intel 9 Series PCH.
Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
fea31042ff613145c7784e2ce454bf3c151b97ba)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Alan Cox [Wed, 5 Nov 2014 01:39:17 +0000 (09:39 +0800)]
mfd: lpc_ich: Add PCI ID for Intel Braswell
This is the same as used in Baytrail so add the new PCI ID to the driver's
list of supported IDs.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
ff0c9da013d2c9f1ec232926a54e536ab48c6678)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Guenter Roeck [Wed, 5 Nov 2014 01:39:16 +0000 (09:39 +0800)]
mfd: lpc_ich: Enable GPIO for Panther Point
Panther Point PCH GPIO configuration is similar to V5 PCHs.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
62cf2cdb99c7e870ab857bdd617e728790f8c43c)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Peter Tyser [Wed, 5 Nov 2014 01:39:15 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for Intel Bay Trail SoC
This patch adds the LPC Controller Device IDs for Watchdog and GPIO for
the Intel Bay Trail Atom SoC.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
6111ec70357022ccd037399c13f69900431850b4)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Peter Tyser [Wed, 5 Nov 2014 01:39:14 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for NM10 GPIO
The NM10's GPIO is compatible with ICH v7 GPIO.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Dan Weinlader <danw@vs-networks.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
117bbfe25cfc2e968be1f7976ac460a5cd3d734e)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Peter Tyser [Wed, 5 Nov 2014 01:39:13 +0000 (09:39 +0800)]
mfd: lpc_ich: Change Avoton to iTCO v3
The register layout of the Avoton is compatible with the iTCO v3
register layout.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
c48cf59878685cc06b71bb2a3ca17b61103c8de7)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Peter Tyser [Wed, 5 Nov 2014 01:39:12 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for iTCO v3
Some newer Atom CPUs, eg Avoton and Bay Trail, use slightly different
register layouts for the iTCO than the current v1 and v2 iTCO.
Differences from previous iTCO versions include:
- The ACPI space is enabled in the "ACPI base address" register instead
of the "ACPI control register"
- The "no reboot" functionality is set in the "Power Management
Configuration" register instead of the "General Control and Status"
(GCS) register or PCI configuration space.
- The "ACPI Control Register" is not present on v3. The "Power
Management Configuration Base Address" register resides at the same
address is Avoton/Bay Trail.
To differentiate these newer chipsets create a new v3 iTCO version and
update the MFD driver to support them.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
eb71d4dec4a5e010e34b9d7afdb5af41884c388e)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Peter Tyser [Wed, 5 Nov 2014 01:39:11 +0000 (09:39 +0800)]
mfd: lpc_ich: Remove lpc_ich_cfg struct use
Future chipsets will use different register layouts that don't map
cleanly to the lpc_ich_cfg fields. Remove the lpc_ich_cfg struct and
add explicit fields to the higher level lpc_ich_priv structure.
This change should have no functional impact.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
429b941abd503c8936e116c819362323aafdbd50)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Peter Tyser [Wed, 5 Nov 2014 01:39:10 +0000 (09:39 +0800)]
mfd: lpc_ich: Only configure watchdog or GPIO when present
Some chipsets don't currently have GPIO support enabled. For these
chipsets don't go through the process of initializing the GPIO region.
Make the same change for the watchdog initialization for chipsets which
may not enable the WDT in the future.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
f0776b8ce03ceb638c51b62f324844c71c446600)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Peter Tyser [Wed, 5 Nov 2014 01:39:09 +0000 (09:39 +0800)]
mfd: lpc_ich: Fix ACPI enable bitmask
The original bitmask of 0x10 was incorrect and would result in a write
to a reserved read-only bit instead of enabling the ACPI I/O
region. Update it to the proper value of 0x80.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
f5dccb15877b82a40950c6f752d5345c86189fc9)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Vincent Donnefort [Wed, 5 Nov 2014 01:39:08 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for Intel Avoton GPIOs
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
facd9939403cb5769190054a600474399e776e3a)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Vincent Donnefort [Wed, 5 Nov 2014 01:39:07 +0000 (09:39 +0800)]
mfd: lpc_ich: Convert ICH GPIOs IDs to enum
All those IDs are arbitrary and so can be encapsulated into an enumeration.
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
6cec365e3eba3dd8c864056d8d3fd9e73ab8dd7a)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Paul Gortmaker [Wed, 5 Nov 2014 01:39:06 +0000 (09:39 +0800)]
mfd: Delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit
3c699105d0376c14940ce7cf561754a94cdff8dd)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Alan Cox [Tue, 4 Nov 2014 08:55:25 +0000 (16:55 +0800)]
i2c: i801: Add PCI ID for Intel Braswell
The SMBus host controller is the same as used in Baytrail so add the new
PCI ID to the driver's list of supported IDs.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit
39e8e30ee544a62c148033d64a979028b958ca05)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Jean Delvare [Tue, 4 Nov 2014 08:55:24 +0000 (16:55 +0800)]
i2c: i801: Add device ID for Intel Wildcat Point PCH
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit
b299de839157852c563b9f133c8b7e630545a9c3)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Jean Delvare [Tue, 4 Nov 2014 08:55:23 +0000 (16:55 +0800)]
i2c: i801: Fix the alignment of the device table
A long name broke the alignment, shift the columns a bit to fix it and
make the table look nice again. While we're here, switch to the
standard comment style to make checkpatch happy, and use tabs instead
of spaces for column alignment.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit
ce3161106ab57afbfbe1c33d95bf4a569405983a)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Jingoo Han [Tue, 4 Nov 2014 08:55:22 +0000 (16:55 +0800)]
i2c: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit
392debf11656dedd79da44416747d5b2b1747f5e)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Julia Lawall [Wed, 29 Oct 2014 00:52:58 +0000 (08:52 +0800)]
pwm: lpss: use c99 initializers in structures
Use c99 initializers for structures.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@
struct i1 {
fs
T fld;
...};
@bad@
identifier decl.i1,i2;
expression e;
initializer list[decl.n] is;
@@
struct i1 i2 = { is,
+ .fld = e
- e
,...};
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[thierry.reding: rebased and applied same fix for Braswell]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit
b2b7adeb21745266326d453b95e5d0b1b9cb1d4e)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Thierry Reding [Wed, 29 Oct 2014 00:52:57 +0000 (08:52 +0800)]
pwm: lpss: Fix build failure on PowerPC
An x86 build seems to pull in the linux/io.h include indirectly. On
PowerPC that doesn't happen and the build breaks due to the readl() and
writel() functions not being declared. Fix this by explicitly including
linux/io.h.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit
e0c86a3b63e948e51a47d17382c7cd8711d19750)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Andy Shevchenko [Wed, 29 Oct 2014 00:52:56 +0000 (08:52 +0800)]
pwm: lpss: Properly split driver to parts
The driver consists of core, PCI, and platform parts. It would be better
to split them into separate files.
The platform driver is now called pwm-lpss-platform. Thus, previously
set CONFIG_PWM_LPSS=m is not enough to build it. But we are on the safe
side since it seems no one from outside Intel is using it for now.
While here, move to use macros module_pci_driver() and
module_platform_driver().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
[thierry.reding: change select to depends on PWM_LPSS, cleanup]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit
c558e39e14c2372394f49e07fbe94e9708b615cb)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Alan Cox [Wed, 29 Oct 2014 00:52:55 +0000 (08:52 +0800)]
pwm: lpss: Add ACPI and PCI IDs for Intel Braswell
This is pretty much the same as Baytrail PWM. Only difference is that the
input clock runs on different frequency.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit
373c57829a3f9da1405b1fbd3d17e50f8e1f476e)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Heikki Krogerus [Wed, 29 Oct 2014 00:52:54 +0000 (08:52 +0800)]
pwm: lpss: remove dependency on clk framework
Unlike other Intel LPSS devices, the PWM does not have the
clock dividers or the gate. All we get from the clock is the
rate. Since PCI case uses the driver data to get the rate,
we can drop the clk and use the same data also in case of
ACPI. The frequency is the same.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit
65accd87381ed96bf8893124b149bae08edd2740)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Thierry Reding [Wed, 29 Oct 2014 00:52:53 +0000 (08:52 +0800)]
pwm: lpss: Fix const qualifier and sparse warnings
Fixes the following warnings reported by the 0-DAY kernel build testing
backend:
drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci':
>> drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default]
lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
^
drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *'
static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
^
>> drivers/pwm/pwm-lpss.c:143:28: sparse: incorrect type in return expression (different address spaces)
drivers/pwm/pwm-lpss.c:143:28: expected struct pwm_lpss_chip *
drivers/pwm/pwm-lpss.c:143:28: got void [noderef] <asn:2>*regs
>> drivers/pwm/pwm-lpss.c:192:63: sparse: incorrect type in argument 3 (different modifiers)
drivers/pwm/pwm-lpss.c:192:63: expected struct pwm_lpss_boardinfo *info
drivers/pwm/pwm-lpss.c:192:63: got struct pwm_lpss_boardinfo const *[assigned] info
drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci':
drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default]
lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
^
drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *'
static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
^
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit
89c0339e0aa097384b3efed894b23820814c21d3)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Alan Cox [Wed, 29 Oct 2014 00:52:52 +0000 (08:52 +0800)]
pwm: lpss: Add support for PCI devices
Not all systems enumerate the PWM devices via ACPI. They can also be
exposed via the PCI interface.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit
093e00bb3f82f3c67e2d1682e316fc012bcd0d92)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Mika Westerberg [Wed, 29 Oct 2014 00:52:51 +0000 (08:52 +0800)]
pwm: add support for Intel Low Power Subsystem PWM
Add support for Intel Low Power I/O subsystem PWM controllers found on
Intel BayTrail SoC.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Chew, Kean Ho <kean.ho.chew@intel.com>
Signed-off-by: Chang, Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit
d16a5aa9e821633a3095d7a88cd1d2cd108bf966)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Sergei Shtylyov [Thu, 11 Dec 2014 02:29:12 +0000 (11:29 +0900)]
micrel: fix masking off LED bits
Commit
20d8435a1cff (phy: micrel: add of configuration for LED mode) made the
obvious mistake when masking off the LED mode bits: forgot to do a logical NOT
to the mask with which it ANDs the register value, so that unrelated bits are
cleared instead.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
28bdc499d647124fa5844453d35e6f5d1b3810dc)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Ben Dooks [Thu, 11 Dec 2014 02:29:11 +0000 (11:29 +0900)]
phy: micrel: add of configuration for LED mode
Add support for the led-mode property for the following PHYs
which have a single LED mode configuration value.
KSZ8001 and KSZ8041 which both use register 0x1e bits 15,14 and
KSZ8021, KSZ8031 and KSZ8051 which use register 0x1f bits 5,4
to control the LED configuration.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
20d8435a1cffa04992f1db6b199a5f0ccec2ff06)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Rob Herring [Wed, 2 Apr 2014 04:49:03 +0000 (23:49 -0500)]
of/fdt: update of_get_flat_dt_prop in prep for libfdt
Make of_get_flat_dt_prop arguments compatible with libfdt fdt_getprop
call in preparation to convert FDT code to use libfdt. Make the return
value const and the property length ptr type an int.
Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Stephen Chivers <schivers@csc.com>
(cherry picked from commit
9d0c4dfedd96ee54fc075b16d02f82499c8cc3a6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
arch/arm/plat-samsung/s5p-dev-mfc.c
arch/powerpc/platforms/powernv/opal.c
drivers/of/fdt.c
drivers/of/of_reserved_mem.c
Ben Dooks [Thu, 13 Feb 2014 18:02:49 +0000 (18:02 +0000)]
clk: add clock-indices support
Add a property called clock-indices to allow clock-output-names
to be used where the index used to lookup a clock is not a 1:1
mapping to the array position in the clock-output-names
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
(cherry picked from commit
7a0fc1a3df82d29e00b4c9f88a6b37450d6711f1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Sergei Shtylyov [Fri, 5 Sep 2014 23:34:32 +0000 (03:34 +0400)]
i2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be
0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all
1's in bits 8-31, thus going against the manuals, so fix them.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit
938916fbb8e8cb67eacb784f4eda17e2950c16c5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:28 +0000 (20:14 +0900)]
usb: renesas_usbhs: fix the usb_pkt_pop()
This patch fixes the usb_pkt_pop(). If a gadget driver calls
usb_ep_dequeue(), this driver will call the usb_pkt_pop().
So, the usb_pkt_pop() should cancel the transaction.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit
2743e7f90dc08282d027dbc2f6486f5cb85aa493)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:10 +0000 (20:14 +0900)]
usb: renesas_usbhs: fix the condition of is_done in usbhsf_dma_push_done
This patch fixes the condition of is_done in usbhsf_dma_push_done().
This function will be called after a transmission finished by DMAC.
So, the function should check if the transmission packet is short packet
or not. Also the function should call try_run to send the zero packet
by the pio handler if the "*is_done" is not set. Otherwize, the
transaction will not finish if a gadget driver sets the "zero" flag
in a transmission.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit
c0ed8b23b257a84d103764cdbd490ee5e2749da3)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:00 +0000 (20:14 +0900)]
usb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock
This patch protects the mod->irq_bempsts and mod->irq_brdysts by
spin lock in the usbhs_status_get_each_irq() because other functions
will write them during spin lock. Otherwise, the driver will clears
the BRDYSTS and/or BEMPSTS wrongly, and then, the transaction will not
finish.
Also since the driver should use the INTSTS0 and BRDYSTS and BEMPSTS
as the same timing, the patch protects them.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit
c4d8199ba1a7aa390b06db23f4532e2c1875aefb)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:13:50 +0000 (20:13 +0900)]
usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle
Some gadget drivers will call usb_ep_queue() more than once before
the first queue doesn't finish. However, this driver didn't handle
it correctly. So, this patch fixes the behavior of some
usbhs_pkt_handle using the "running" flag. Otherwise, the oops below
happens if we use g_ncm driver and when the "iperf -u -c host -b 200M"
is running.
Unable to handle kernel NULL pointer dereference at virtual address
00000000
pgd =
c0004000
[
00000000] *pgd=
00000000
Internal error: Oops:
80000007 [#1] SMP ARM
Modules linked in: usb_f_ncm g_ncm libcomposite u_ether
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.17.0-rc1-00008-g8b2be8a-dirty #20
task:
c051c7e0 ti:
c0512000 task.ti:
c0512000
PC is at 0x0
LR is at usbhsf_pkt_handler+0xa8/0x114
pc : [<
00000000>] lr : [<
c0278fb4>] psr:
60000193
sp :
c0513ce8 ip :
c0513c58 fp :
c0513d24
r10:
00000001 r9 :
00000193 r8 :
eebec4a0
r7 :
eebec410 r6 :
eebe0c6c r5 :
00000000 r4 :
ee4a2774
r3 :
00000000 r2 :
ee251e00 r1 :
c0513cf4 r0 :
ee4a2774
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit
8355b2b3082d302091506703d2e4e239f7deed7f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Bartlomiej Zolnierkiewicz [Mon, 1 Sep 2014 14:25:35 +0000 (16:25 +0200)]
net: sh_eth: fix driver dependencies
Renesas SuperH Ethernet support should be available only on
Renesas ARM SoCs and SuperH architecture.
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit
f6ec9c335b502d8011971d07508589d212cb3c93)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Lars-Peter Clausen [Sun, 17 Aug 2014 14:18:19 +0000 (16:18 +0200)]
ASoC: rcar: Use && instead of & for boolean expressions
Sparse spits out the following warning:
sound/soc/sh/rcar/gen.c:250:21: warning: dubious: x & !y
It does this because sometimes mixing boolean and bit-wise logic has not the
intended result. In this case we are fine, but replacing the bit-wise '&' with
the boolean '&&' silences the sparse warning. The generated code for both cases
is the same.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
c8e6e960733f4a5835265c15429fced4d2f1595e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Sergei Shtylyov [Sat, 23 Aug 2014 20:44:09 +0000 (00:44 +0400)]
Revert "i2c: rcar: remove spinlock"
This reverts commit
150b8be3cda54412ad7b54f5392b513b25c0aaa7.
The I2C core's per-adapter locks can't protect from IRQs, so the driver still
needs a spinlock to protect the register accesses.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit
91bfe2989af02e709ca01ccf518c4fbda3efc70f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Sergei Shtylyov [Mon, 1 Sep 2014 21:15:26 +0000 (01:15 +0400)]
i2c: rcar: fix MNR interrupt handling
Sometimes the MNR and MST interrupts happen simultaneously (stop automatically
follows NACK, according to the manuals) and in such case the ID_NACK flag isn't
set since the MST interrupt handling precedes MNR and all interrupts are cleared
and disabled then, so that MNR interrupt is never noticed -- this causes NACK'ed
transfers to be falsely reported as successful. Exchanging MNR and MST handlers
fixes this issue, however the MNR bit somehow gets set again even after being
explicitly cleared, so I decided to completely suppress handling of all disabled
interrupts (which is a good thing anyway)...
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit
dd318b0df27c582ac0d72a346fd6e693700be23c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kiran Padwal [Mon, 28 Jul 2014 06:11:04 +0000 (11:41 +0530)]
ASoC: ak4642: Make of_device_id array const
Make of_device_id array const, because all OF functions handle it as const
Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit
27204ca8b981160c3b65cdc226c9070f76cbbd36)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Yoshihiro Shimoda [Wed, 9 Jul 2014 01:08:52 +0000 (10:08 +0900)]
usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers
The R-Car H2 and M2 SoCs come with an xHCI controller that requires
some specific initializations related to the firmware downloading and
some specific registers. This patch adds the support for this special
configuration as an xHCI quirk executed during probe and start.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: "mathias.nyman@intel.com" <mathias.nyman@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit
4ac8918f3a737c21d81e250e4194c12ea2b7eb04)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Himangi Saraogi [Fri, 20 Jun 2014 17:41:23 +0000 (23:11 +0530)]
usb: host: xhci-plat: use devm_functions
This patch introduces the use of managed interface devm_ioremap_resource
for ioremap_nocache and request_mem_region and removes the corresponding
free functions in the probe and remove functions.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit
fd666348c51f6ab66410c98a149e0418b9a258f0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Pratyush Anand [Fri, 4 Jul 2014 14:01:25 +0000 (17:01 +0300)]
xhci: Platform: Set xhci lpm support quirk based on platform data
If an xhci platform supports USB3 LPM capability then enable
XHCI_LPM_SUPPORT quirk flag.
Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit
20f6fdd01c2c0de9cc1109083222edded24c5350)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Pratyush Anand [Fri, 4 Jul 2014 14:01:24 +0000 (17:01 +0300)]
xhci: Platform: Add (en/dis)able_usb3_lpm_timeout
To use auto U0-U1/U2 transition by xhci platform device add
(en/dis)able_usb3_lpm_timeout function to the xhci_plat_xhci_driver struct.
Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Tested-by: Aymen Bouattay <aymen.bouattay@st.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit
94ef3d50426240a5402688e8d43a079df5ae21be)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Geert Uytterhoeven [Thu, 14 Aug 2014 22:19:10 +0000 (07:19 +0900)]
ARM: shmobile: koelsch: Remove non-existent i2c6 pinmux
On r8a7791, i2c6 (aka iic3) doesn't need pinmux, but the koelsch dts
refers to non-existent pinmux configuration data:
pinmux core: sh-pfc does not support function i2c6
sh-pfc
e6060000.pfc: invalid function i2c6 in map table
Remove it to fix this.
Fixes: commit
1d41f36a68c0f4e9b01d563ce33bab5201858b54 ("ARM: shmobile:
koelsch dts: Add VDD MPU regulator for DVFS")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Olof Johansson <olof@lixom.net>
(cherry picked from commit
12266db732ff3845eaa9ba9354c4938249787aaf)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Wed, 6 Aug 2014 01:24:51 +0000 (18:24 -0700)]
ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
4bfb358b1d6cdeff8c6a13677f01ed78e9696b98
(ARM: shmobile: Add r8a7791 legacy SDHI clocks)
added r8a7791 SDHI clock support.
But, it is missing
"0x0100: x 1/8" division ratio.
This patch fixes hidden bug.
It is based on R-Car H2 v0.7, R-Car M2 v0.9.
Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit
58b80ad6472c0fa12926dfa1f9103d3a326bdf18)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Wed, 6 Aug 2014 01:24:30 +0000 (18:24 -0700)]
ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
9f13ee6f83c52065112d3e396e42e3780911ef53
(ARM: shmobile: r8a7790: add div4 clocks)
added r8a7790 DIV4 clock support.
But, it is missing
"0x0100: x 1/8" division ratio.
This patch fixes hidden bug.
It is based on R-Car H2 v0.7, R-Car M2 v0.9.
Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit
4fb12fe9c34928c1d2bed817e144aec3f44540e9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Laurent Pinchart [Wed, 16 Jul 2014 12:02:56 +0000 (14:02 +0200)]
ARM: shmobile: defconfig: Remove MACH_GENMAI
The CONFIG_MACH_GENMAI is scheduled for removal so remove it from
shmobile_defconfig.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au: revised changelog for updated commit order]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit
92db2b7af591d3c3212183a34856b4cb190b6999)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Simon Horman [Wed, 16 Jul 2014 00:11:21 +0000 (09:11 +0900)]
ARM: shmobile: sh73a0: Remove spurious 0x from SCIFB clock name
A stray '0x' crept into
a0f7e7496d56ac2d ("ARM: shmobile: sh73a0: add CMT1
clock support for DT"). This patch removes it.
This change should not have any run-time affect at this time as
the clock in question is used by a SCIF device that is not enabled by
default.
Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit
2c3758b01aa6f11382d2b018614b5d48ecf30350)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Simon Horman [Tue, 15 Jul 2014 07:29:24 +0000 (16:29 +0900)]
ARM: shmobile: genmai: remove defconfig
The genmai board code is scheduled for removal and once
that occurs the defconfig will be of no use. Remove it.
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit
3ed27bd90d6d0c8b4d686a2468b6d50cc1ef74e4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Simon Horman [Mon, 7 Jul 2014 07:54:53 +0000 (09:54 +0200)]
ARM: shmobile: sh73a0: add CMT1 clock support for DT
This will be used when initialising CMT1 device using DT
until common clock framework support is added.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit
a0f7e7496d56ac2da7c684e2035815318c17973a)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>