profile/common/platform/kernel/linux-artik7.git
4 years agoARM64: artik710_raptor_defconfig: Enable NETFILTER_XT_MATCH_OWNER config option 15/211215/1
Seung-Woo Kim [Wed, 31 Jul 2019 07:12:15 +0000 (16:12 +0900)]
ARM64: artik710_raptor_defconfig: Enable NETFILTER_XT_MATCH_OWNER config option

Enable the NETFILTER_XT_MATCH_OWNER config option to use xt_owner
supplementary groups.

Change-Id: I5570988cf08cf65c05ee476a6656f8b4f0f0f664
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agonetfilter: xt_owner: A fix for backport of 'xt_owner: Add supplementary groups option' 14/211214/1
Lukasz Pawelczyk [Mon, 29 Jul 2019 11:43:12 +0000 (13:43 +0200)]
netfilter: xt_owner: A fix for backport of 'xt_owner: Add supplementary groups option'

This patch fixes the backport of 'netfilter: xt_owner: Add
supplementary groups option' (8413c52116d5).

Change-Id: I85fd812744fd95b4c7f4640670a685c033e024ad
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agonetfilter: xt_owner: bail out with EINVAL in case of unsupported flags 58/209358/1 accepted/tizen/unified/20190705.110618 submit/tizen/20190705.061120
Pablo Neira Ayuso [Fri, 7 Jun 2019 14:37:30 +0000 (16:37 +0200)]
netfilter: xt_owner: bail out with EINVAL in case of unsupported flags

Reject flags that are not supported with EINVAL.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
[sw0312.kim: backport from mainline to apply supplementary groups on netfilter]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I129a3a1fc8f54d5e4f0ae164e0036bad7cd67c64

4 years agonetfilter: xt_owner: Add supplementary groups option 57/209357/1
Lukasz Pawelczyk [Fri, 10 May 2019 11:46:22 +0000 (13:46 +0200)]
netfilter: xt_owner: Add supplementary groups option

The XT_OWNER_SUPPL_GROUPS flag causes GIDs specified with XT_OWNER_GID
to be also checked in the supplementary groups of a process.

f_cred->group_info cannot be modified during its lifetime and f_cred
holds a reference to it so it's safe to use.

Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
[sw0312.kim: backport from mainline to apply supplementary groups on netfilter]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I30739d09c47d0623d0638de685905d3ac2ca131a

5 years agoRevert "arm64: dtsi: artik710_raptor: change default camera image sensor to OV5640" 01/200001/2 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20190219.154237 accepted/tizen/unified/20190218.163151 submit/tizen/20190218.062336 submit/tizen_5.0/20190219.004732
Seung-Woo Kim [Mon, 18 Feb 2019 06:08:37 +0000 (15:08 +0900)]
Revert "arm64: dtsi: artik710_raptor: change default camera image sensor to OV5640"

This reverts commit d636f7529dfa0ca074716fd255c9655acbad5d23.

In tizen environment, previous camera image sensor, ARTIK-5M-
CAMERA-BOARD MM011-0.1 with S5K4ECGA image sensor is still used.
So revert OV5640 camera image sensor.

Change-Id: I5584de55165be731d1a863c3e3da2e1949fb0663
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoRevert "arm: dtsi: artik530_raptor: change default camera image sensor to OV5640" 00/200000/1
Seung-Woo Kim [Mon, 18 Feb 2019 05:44:00 +0000 (14:44 +0900)]
Revert "arm: dtsi: artik530_raptor: change default camera image sensor to OV5640"

This reverts commit 8fefb8f77d19f0670bc2026f43eb4c6af86d9e3b.

In tizen environment, previous camera image sensor, ARTIK-5M-
CAMERA-BOARD MM011-0.1 with S5K4ECGA image sensor is still used.
So revert OV5640 camera image sensor.

Change-Id: I25632c12589238d8fea9924acd7d5bc582c6ecb8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agousb: dwc2: hcd: call dwc2_is_controller_alive under spinlock 11/198911/1 accepted/tizen/5.0/unified/20190213.070121 accepted/tizen/unified/20190131.161530 submit/tizen/20190131.075243 submit/tizen_5.0/20190213.011623
Jaehoon Chung [Tue, 29 Jan 2019 01:42:24 +0000 (10:42 +0900)]
usb: dwc2: hcd: call dwc2_is_controller_alive under spinlock

This patch is referred to Robert's commit cf54772b913b.
(usb: dwc2: call dwc2_is_controller_alive() under spinlock)

Below is commit message:

    This patch fixes the following problem: data transmission in direction
    IN break unless the GSNPSID register access is done with spinlock held.
    This issue occurs at least in Exynos4412 SoC, probably in many SoC's
    from Exynos familly.

    The problem is described here:
    https://lkml.org/lkml/2014/12/22/185
    And there is linux mailing list discussion:
    https://lkml.org/lkml/2015/1/14/17

The one of SDB hang issues should be fixed with this patch.
(Issue -  Not triggered usb interrupt.)

Change-Id: If97516bc94d84df611663f902267a5e3b75815f7
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM64: configs: artik710: enable COFIG_VIDEO_OV5640 accepted/tizen/unified/20190130.053716 submit/tizen/20190129.052023
Jaehoon Chung [Fri, 25 Jan 2019 06:34:17 +0000 (15:34 +0900)]
ARM64: configs: artik710: enable COFIG_VIDEO_OV5640

Enable CONFIG_VIDEO_OV5640 configuration.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agopackaging: spec: update the kernel stable version from 4.4.113 to 4.4.172
Jaehoon Chung [Fri, 25 Jan 2019 05:49:12 +0000 (14:49 +0900)]
packaging: spec: update the kernel stable version from 4.4.113 to 4.4.172

Update the kernel stable version from v4.4.113 to 4.4.172.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM64: config: artik710: update the defconfig file to v4.4.172
Jaehoon Chung [Fri, 25 Jan 2019 05:48:35 +0000 (14:48 +0900)]
ARM64: config: artik710: update the defconfig file to v4.4.172

Update the defconfig file to v4.4.172.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM: configs: artik530: update the defconfig file to v4.4.172
Jaehoon Chung [Fri, 25 Jan 2019 03:47:07 +0000 (12:47 +0900)]
ARM: configs: artik530: update the defconfig file to v4.4.172

Synchronize the defconfig file to v4.4.172.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoswitch ->setxattr() to passing dentry and inode separately
Al Viro [Fri, 27 May 2016 15:06:05 +0000 (11:06 -0400)]
switch ->setxattr() to passing dentry and inode separately

commit 3767e255b390d72f9a33c08d9e86c5f21f25860f upstream.

smack ->d_instantiate() uses ->setxattr(), so to be able to call it before
we'd hashed the new dentry and attached it to inode, we need ->setxattr()
instances getting the inode as an explicit argument rather than obtaining
it from dentry.

Similar change for ->getxattr() had been done in commit ce23e64.  Unlike
->getxattr() (which is used by both selinux and smack instances of
->d_instantiate()) ->setxattr() is used only by smack one and unfortunately
it got missed back then.

Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Tested-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[sw0312.kim: backport from mainline to resolve setxattr crash on smack]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I4bf991924e16f61746453b7fd096e5d59438659b

5 years agoswitch xattr_handler->set() to passing dentry and inode separately
Al Viro [Fri, 27 May 2016 14:19:30 +0000 (10:19 -0400)]
switch xattr_handler->set() to passing dentry and inode separately

commit 5930122683dff58f0846b0f0405b4bd598a3ba6a upstream.

preparation for similar switch in ->setxattr() (see the next commit for
rationale).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[sw0312.kim: backport from mainline to resolve setxattr issue during smack_d_instantiate()]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I3e2e2cd71ebe14aea7610a6457e68d1fb01ead89

5 years agosecurity_d_instantiate(): move to the point prior to attaching dentry to inode
Al Viro [Mon, 11 Apr 2016 04:53:26 +0000 (00:53 -0400)]
security_d_instantiate(): move to the point prior to attaching dentry to inode

commit b96809173e94ea2fa8c19c2e40e8545a1821bf57 upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[sw0312.kim: backport from mainline to resolve smack crash issue during getxattr]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If386ad04e7e1abdd9213df87daf17648eb9f42fd

5 years ago->getxattr(): pass dentry and inode as separate arguments
Al Viro [Mon, 11 Apr 2016 04:48:00 +0000 (00:48 -0400)]
->getxattr(): pass dentry and inode as separate arguments

commit ce23e640133484eebc20ca7b7668388213e11327 upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[sw0312.kim: backport from mainline to resolve smack getxattr during security_d_instantiate()]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I7fcd9edc3e3e543e35e173e8479906b6a7f81455

5 years agoxattr_handler: pass dentry and inode as separate arguments of ->get()
Al Viro [Mon, 11 Apr 2016 00:48:24 +0000 (20:48 -0400)]
xattr_handler: pass dentry and inode as separate arguments of ->get()

commit b296821a7c42fa58baa17513b2b7b30ae66f3336 upstream.

... and do not assume they are already attached to each other

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[sw0312.kim: backport from mainline to apply getxattr inode separation]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ic3f9c370f13ceacda25d20bb7d5b6d732966e648

5 years agoASoC: rt5659: fix duplicate‘const’ declaration warnings
Seung-Woo Kim [Tue, 22 Jan 2019 12:11:40 +0000 (21:11 +0900)]
ASoC: rt5659: fix duplicate‘const’ declaration warnings

Fix duplicate const’ declaration specifier warnings in gcc 7.

Note: macros, SOC_VALUE_ENUM_SINGLE_DECL(), SOC_ENUM_SINGLE_DECL()
already have const specifier.

Change-Id: Ifc4940cfc38a77802d1c53703f9608c48ce8dbdf
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agousb: f_fs: avoid race condition with ffs_epfile_io_complete
Du, Changbin [Tue, 29 Dec 2015 06:36:58 +0000 (14:36 +0800)]
usb: f_fs: avoid race condition with ffs_epfile_io_complete

ffs_epfile_io and ffs_epfile_io_complete runs in different context, but
there is no synchronization between them.

consider the following scenario:
1) ffs_epfile_io interrupted by sigal while
wait_for_completion_interruptible
2) then ffs_epfile_io set ret to -EINTR
3) just before or during usb_ep_dequeue, the request completed
4) ffs_epfile_io return with -EINTR

In this case, ffs_epfile_io tell caller no transfer success but actually
it may has been done. This break the caller's pipe.

Below script can help test it (adbd is the process which lies on f_fs).
while true
do
   pkill -19 adbd #SIGSTOP
   pkill -18 adbd #SIGCONT
   sleep 0.1
done

To avoid this, just dequeue the request first. After usb_ep_dequeue, the
request must be done or canceled.

With this change, we can ensure no race condition in f_fs driver. But
actually I found some of the udc driver has analogical issue in its
dequeue implementation. For example,
1) the dequeue function hold the controller's lock.
2) before driver request controller  to stop transfer, a request
   completed.
3) the controller trigger a interrupt, but its irq handler need wait
   dequeue function to release the lock.
4) dequeue function give back the request with negative status, and
   release lock.
5) irq handler get lock but the request has already been given back.

So, the dequeue implementation should take care of this case. IMO, it
can be done as below steps to dequeue a already started request,
1) request controller to stop transfer on the given ep. HW know the
   actual transfer status.
2) after hw stop transfer, driver scan if there are any completed one.
3) if found, process it with real status. if no, the request can
   canceled.

Signed-off-by: "Du, Changbin" <changbin.du@intel.com>
[mina86@mina86.com: rebased on top of refactoring commits]
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Change-Id: I12832c8cd8060302eff13565cf2f1372288d07ed

5 years agousb: f_fs: refactor ffs_epfile_io
Michal Nazarewicz [Mon, 4 Jan 2016 20:05:59 +0000 (21:05 +0100)]
usb: f_fs: refactor ffs_epfile_io

Eliminate one of the return paths by using a ‘goto error_mutex’ and
rearrange some if-bodies which results in reduction of the indention level
and thus hopefully makes the function easier to read and reason about.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
[backported from upstream commit ae76e13477d8de0065cddbb6]
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Change-Id: Ic8f141faa55ce5c0bad6f55506d30d84feb88c90

5 years agofix build error about get_user_pages()
Jaehoon Chung [Tue, 22 Jan 2019 04:26:04 +0000 (13:26 +0900)]
fix build error about get_user_pages()

Fix build error since changing the arguments of get_user_pages().

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoiio: adc: nexell_adc: Fix duplicate ‘const’ declaration specifier build warning
Hoegeun Kwon [Mon, 7 Jan 2019 02:18:02 +0000 (11:18 +0900)]
iio: adc: nexell_adc: Fix duplicate ‘const’ declaration specifier build warning

This patch fixes following build warning caused  duplicate declaration:

  drivers/iio/adc/nexell_adc.c:358:37: warning: duplicate ‘const’ declaration specifier [-Wduplicate-decl-specifier]
   static const struct nexell_adc_data const nexell_adc_s5p6818_data = {
                                       ^~~~~

Change-Id: I5870765ed0700169aac0b5a93beaf79a9110ed58
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 years agoARM: dts: s5p4418: add the otg clock value as 12MHz
Jaehoon Chung [Wed, 2 Jan 2019 02:19:20 +0000 (11:19 +0900)]
ARM: dts: s5p4418: add the otg clock value as 12MHz

Add the otg clock value as 12MHz.
It needs to set same value with usbhost clock value.

Change-Id: If293e1082b913e75c70f8358300ca519c3bbd6f7
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM: dts: s5p4418: fix the register address typo
Jaehoon Chung [Mon, 31 Dec 2018 06:36:24 +0000 (15:36 +0900)]
ARM: dts: s5p4418: fix the register address typo

Fix the register address type.
According to ARTIK530 TRM, there is no 0x6c00b000 address.

Change-Id: I1bfa558fbe0149e61c3bc571035b06839ba40de0
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agommc: dw_mmc: fix the wrong pointer type
Jaehoon Chung [Mon, 17 Dec 2018 08:50:22 +0000 (17:50 +0900)]
mmc: dw_mmc: fix the wrong pointer type

Fix the wrong types from unsigned int to unsigned long.

Change-Id: I24d17685033d7fdbbb8c4e3351dfd8fae1236ef8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agosoc: nexell: remove the redefined ATTR_MODE
Jaehoon Chung [Mon, 10 Dec 2018 05:38:20 +0000 (14:38 +0900)]
soc: nexell: remove the redefined ATTR_MODE

ATTR_MODE is already defined in include/linux/fs.h.
Instead, use S_IRUSR | S_IRGRP | S_IROTH (0x444) in stat.h

Change-Id: Ia22a74ac628ad0899b8aac36c45384aa17f7709c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agopackaging: spec: update the kernel stable version
Jaehoon Chung [Mon, 10 Dec 2018 06:11:23 +0000 (15:11 +0900)]
packaging: spec: update the kernel stable version

Update the kernel stable version from 4.4.71 from 4.4.113.

Change-Id: I204d73cdc669b4c68e64118ca274710f127aeac6
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agousb: dwc2: Move definition of ext_vbus_io
Dongwoo [Wed, 24 Oct 2018 05:40:26 +0000 (14:40 +0900)]
usb: dwc2: Move definition of ext_vbus_io

There are build errors on ext_vbus_io when the operational mode is
set to gadget only mode because it doesn't included by conditional
macro. In order to make including ext_vbus_io member for all
operational mode, this patch moves ext_vbus_io out of macro section.

Change-Id: Ib9a70c2a27cd6afd9969de422f3cbcbe80a2751d
Signed-off-by: Dongwoo <dwoo08.lee@samsung.com>
5 years agoLOCAL / usb: gadget: f_fs: Limit data buffer size to a single page
Dongwoo [Fri, 26 Oct 2018 01:41:41 +0000 (10:41 +0900)]
LOCAL / usb: gadget: f_fs: Limit data buffer size to a single page

 Large size request from sdbd usually causes memory allocation failure
in case of memory shortage. The failure is not handled by sdbd
properly and thus it makes sdbd a hung state. To prevent this
situation, this patch limits data buffer size to a single page so as
to guarantee memory allocation success.

* This is WORKAROUND solution for just use case of sdbd, it should be
  reverted when the advanced dma solution is applied to f_fs *

Change-Id: Ib917c3aef2b00a3e00a3d87ca6d6940307038aa1
Signed-off-by: Dongwoo <dwoo08.lee@samsung.com>
5 years agousb: dwc2: gadget: set the quirk_ep_out_alinged_size as true
Jaehoon Chung [Mon, 22 Oct 2018 04:44:11 +0000 (13:44 +0900)]
usb: dwc2: gadget: set the quirk_ep_out_alinged_size as true

Set the quirk_ep_out_aligned_size as ture.
This patch is fixed about occurring kernel panic after failed memory allocation.

Change-Id: Iafb6ccaa6f7d7dac4eb0593291166ab13cd8256d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM64: config: artik710_raptor: enable RT2X00 USB driver
Jaehoon Chung [Thu, 20 Sep 2018 02:32:48 +0000 (11:32 +0900)]
ARM64: config: artik710_raptor: enable RT2X00 USB driver

Enable RT2X00 usb driver.

Change-Id: I8e071a988e2778088e80c5470cb5ff1e612025f4
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM: config: artik530_raptor: enable RT2X00 USB driver
Jaehoon Chung [Thu, 20 Sep 2018 02:31:24 +0000 (11:31 +0900)]
ARM: config: artik530_raptor: enable RT2X00 USB driver

Enable RT2X00 usb driver.

Change-Id: I0592f6a6408d2dece89e7e08f03d647449b99f2a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM64: config: artik710_raptor: enable realtek USB driver
Jaehoon Chung [Wed, 19 Sep 2018 05:10:24 +0000 (14:10 +0900)]
ARM64: config: artik710_raptor: enable realtek USB driver

Enable Realtek USB driver to test Wifi Mesh.

Change-Id: I8a910a11666f7e6a8d8eab5a8ac791ea41648681
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM: config: artik530_raptor: enable realtek USB driver
Jaehoon Chung [Wed, 19 Sep 2018 04:57:05 +0000 (13:57 +0900)]
ARM: config: artik530_raptor: enable realtek USB driver

Enable Realtek USB driver to test WiFi Mesh.

Change-Id: I112640eaa46971a2ca958b7d5aea68e9745beff8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM: artik710_raptor_defconfig: sync defconfig for usb options
Seung-Woo Kim [Fri, 14 Sep 2018 00:09:57 +0000 (09:09 +0900)]
ARM: artik710_raptor_defconfig: sync defconfig for usb options

After the commit 3922eabecf08 ("usb: gadget: Allow to build both
USB functions and legacy gadgets"), usb options are changed and it
is not clear legacy composite gadget is set or not. To clarify,
sync defconfig for usb options.

Change-Id: Ia2f2f7e121094adfb5745cffbcf3edab243f6810
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoARM: artik530_raptor_defconfig: Replace legacy composite gadget with ConfigFS gadget
Dongwoo Lee [Tue, 19 Jun 2018 07:52:44 +0000 (16:52 +0900)]
ARM: artik530_raptor_defconfig: Replace legacy composite gadget with ConfigFS gadget

To replace legacy composite USB gadget for SDB, MTP, RNDIS with
ConfigFS gadget, this enables ConfigFS/FunctionFS support for USB
gadget.

Change-Id: I155a788ff6390d496ab047f9cd495aa141bc7d26
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agoARM: dts: artik533-compy: add the user gpio-key nodes
WooChang Kim [Wed, 27 Jun 2018 02:50:43 +0000 (11:50 +0900)]
ARM: dts: artik533-compy: add the user gpio-key nodes

Eagleye board is provided the two user buttons.
(Defined them as "backkey" and "wakeup")

Change-Id: I524ca8b1b09b65b1c79d136adef02fd6872c6069
Signed-off-by: WooChang Kim <wchang.kim@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM: dts: artik533-compy: enable the i2c_1 node
Jaehoon Chung [Tue, 26 Jun 2018 04:37:41 +0000 (13:37 +0900)]
ARM: dts: artik533-compy: enable the i2c_1 node

Enable the i2c_1 node.

Change-Id: I4aaafbe5cf5cecf2cd06eec80d59c2f004d6036b
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM: dts: arti533-compy: add the nodes relevant to spi/i2c/serial
Jaehoon Chung [Fri, 22 Jun 2018 02:27:02 +0000 (11:27 +0900)]
ARM: dts: arti533-compy: add the nodes relevant to spi/i2c/serial

Add the nodes relevant to spi/i2c/serial.

Change-Id: Ia578cf93f46c271c3836d8fbb94bcdbda15a77c7
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoinput: touchscreen: add touch enabled node
Jaechul Lee [Wed, 20 Jun 2018 05:01:21 +0000 (14:01 +0900)]
input: touchscreen: add touch enabled node

touchscreen 'enabled' node needs to be supproted on Tizen because
deviced wants to handle touchscreen on/off for some reasons. Touch event
will be skipped if 'enabled' is 0.

Change-Id: I53eac0a5f38c09f326da24a5ee1d5e985d61332c
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
5 years agoRevert "ARM: artik710_raptor_defconfig: Enable DUMMY_HCD module"
Dongwoo Lee [Tue, 19 Jun 2018 06:46:44 +0000 (15:46 +0900)]
Revert "ARM: artik710_raptor_defconfig: Enable DUMMY_HCD module"

Because the change for size of module in the corresponding commit
seems to make failure on building boot image for artik710 board,
this reverts commit aece406a175adfb8de56c10e1d011ae2c6852cc5.

Change-Id: Ia18eaf165f180c39aded417be4a1130ba6edb113
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agoARM: artik710_raptor_defconfig: Enable DUMMY_HCD module
Dongwoo Lee [Fri, 15 Jun 2018 04:53:17 +0000 (13:53 +0900)]
ARM: artik710_raptor_defconfig: Enable DUMMY_HCD module

These options enable DUMMY_HCD as a module to support USB test case
without real usb hardware.

Change-Id: I8ccb30d1cec4baad5dccdd0670039ab203bfbc2c
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agoARM: artik530_raptor_defconfig: Enable DUMMY_HCD module
Dongwoo Lee [Fri, 15 Jun 2018 02:20:19 +0000 (11:20 +0900)]
ARM: artik530_raptor_defconfig: Enable DUMMY_HCD module

These options enable DUMMY_HCD as a module to support USB test case
without real usb hardware.

Change-Id: I4b20065a0644a68398ac6b8f2d4c5c96e1af1dd5
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agousb: gadget: Allow to build both USB functions and legacy gadgets
Krzysztof Opasiak [Mon, 6 Jun 2016 19:40:33 +0000 (21:40 +0200)]
usb: gadget: Allow to build both USB functions and legacy gadgets

Currently it is possible to build in some subset of usb functions
*OR* some gadget module. This is limited only by Kconfig not
any functionality.

This patch removes this limitation. With this patch it is possible
to set up all build combinations:
1) Multiple gadgets build in
2) Part of functions build in, part of functions as a modules
3) Some gadgets build in and some part of functions build in/modules
etc.

As this patch makes Kconfig quite complicated let me clarify how it works:

USB_F_<func name> - used in makefile for compilation
USB_CONFIGFS_F_<func name> - Chosen by user in function menu
USB_G_<gadget name>_REQ_F_<func name> - set up by gadget to mark
      that this particular gadget requires this func to work
USB_F_<func name>_SELECTOR - helper config which is used to determine
    if function should be build in or compiled as a module

The rules are quite simple:
1) If any of USB_CONFIGFS_F_<func name>, USB_G_*_REQ_F_<func name> equals
y, then USB_F_<func name> is set to y and function is build in
2) If none of USB_CONFIGFS_F_<func name>, USB_G_*_REQ_F_<func name> equals
y, but any of them equals m then USB_F_<func name> is set to m and function
is compiled as a module

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
[Backported from commit under review @linux-usb mailing list]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Change-Id: I86e796d7c057afce163695dc280861477a9f4b56

5 years agoARM: configs: artik530_raptor: enable OV5640 camera sensor
Jaehoon Chung [Fri, 15 Jun 2018 11:57:34 +0000 (20:57 +0900)]
ARM: configs: artik530_raptor: enable OV5640 camera sensor

This patch enables CONFIG_VIDEO_OV5640.

Change-Id: I658411faa738295cf88faaa608da795b89fe9fc1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM: dts: artik533-compy: Enable extcon notification for usb connection
Jaehoon Chung [Fri, 15 Jun 2018 11:05:23 +0000 (20:05 +0900)]
ARM: dts: artik533-compy: Enable extcon notification for usb connection

Eagleye ARTIK530s board is using its own device-tree.

This patch is referred to Dongwoo's patches.
"arm: dts: artik530_raptor: nable extcon notification for usb connection"

Change-Id: I22cfbe37813a9ae3d39706f2a9a205f091e948db
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoARM64: artik710_raptor_defconfig: enable NETFILTER_XT_TARGET_LOG
Seung-Woo Kim [Tue, 17 Apr 2018 07:21:24 +0000 (16:21 +0900)]
ARM64: artik710_raptor_defconfig: enable NETFILTER_XT_TARGET_LOG

Enable NETFILTER_XT_TARGET_LOG for analysis of iptables log.
It is a iptables feature for security report on Tizen 5.0,
required from stc-manager.

Change-Id: Ice8cbce90b07eb9da9b09812f9306b7c424533c9
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoARM64: artik710_raptor_defconfig: enable CONFIG_CONNECTOR and CONFIG_PROC_EVENTS
Seung-Woo Kim [Tue, 17 Apr 2018 07:25:22 +0000 (16:25 +0900)]
ARM64: artik710_raptor_defconfig: enable CONFIG_CONNECTOR and CONFIG_PROC_EVENTS

These options enable Netlink Connector feature of kernel to monitor
process lifecycle like Fork and Exit status of all processes
asynchronously.

In Tzen, it will be used by stc-manager(smart traffic control) to
monitor process lifecycle.

Change-Id: I265504609e6b2ce963875e66884d064affc48d9d
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoARM: artik530_raptor_defconfig: enable NETFILTER_XT_TARGET_LOG
Seung-Woo Kim [Tue, 17 Apr 2018 07:18:25 +0000 (16:18 +0900)]
ARM: artik530_raptor_defconfig: enable NETFILTER_XT_TARGET_LOG

Enable NETFILTER_XT_TARGET_LOG for analysis of iptables log.
It is a iptables feature for security report on Tizen 5.0,
required from stc-manager.

Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ia31c1e9463f28b74a67bad7272e0fea08c88c28c

5 years agoARM: artik530_raptor_defconfig: enable CONFIG_CONNECTOR and CONFIG_PROC_EVENTS
Seung-Woo Kim [Tue, 17 Apr 2018 07:27:01 +0000 (16:27 +0900)]
ARM: artik530_raptor_defconfig: enable CONFIG_CONNECTOR and CONFIG_PROC_EVENTS

These options enable Netlink Connector feature of kernel to monitor
process lifecycle like Fork and Exit status of all processes
asynchronously.

In Tzen, it will be used by stc-manager(smart traffic control) to
monitor process lifecycle.

Change-Id: I62a5ba2830672b9532ed26a3f90011584522a2bc
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agousb: gadget: slp: fix to use serial-number if arm64 has no dmi serial
Seung-Woo Kim [Mon, 9 Apr 2018 06:57:15 +0000 (15:57 +0900)]
usb: gadget: slp: fix to use serial-number if arm64 has no dmi serial

The arm64 artik710 board has no dmi serial. Fix to use serial-number
of devicetree which is attached from artik u-boot.

If there is the devicetree node, it is found from sysfs path,
/sys/firmware/devicetree/base/serial-number.

Change-Id: I78263c2fee2c15ce11cc3d72e1588eb941042e99
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agousb: gadget: slp: fix to use arm system_serial if no dmi serial
Seung-Woo Kim [Tue, 18 Apr 2017 01:15:12 +0000 (10:15 +0900)]
usb: gadget: slp: fix to use arm system_serial if no dmi serial

From ARM system, system_serial is identical serial number. So, this
patch fixes to use arm system_serial as serial of lagacy slp usb
gadget instead of fixed serial if there is no dmi serial value.

Change-Id: Ie28c6c3d2afc54fc1ea54d3eb67100d3ed27165d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agousb: gadget: slp: fix to use serial number of dmi
Seung-Woo Kim [Wed, 19 Apr 2017 01:00:36 +0000 (10:00 +0900)]
usb: gadget: slp: fix to use serial number of dmi

For identical serial string of slp gadget, this patch fixes to use
product serial of dmi if the dmi value is set.

Change-Id: Ic75f6c7730cba5860afdf3bd60babc754b3ecd67
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agousb: gadget: add mtp driver for legacy slp composite
Seung-Woo Kim [Mon, 9 Apr 2018 04:07:01 +0000 (13:07 +0900)]
usb: gadget: add mtp driver for legacy slp composite

Add mtp driver for legacy slp composite.

Note: Ported from tizen branch of https://review.tizen.org/git/?p=platform/kernel/linux-exynos.git

Change-Id: I1a3253bbba2cb3f6a0c73d6cd2cb54a9d7dc7919
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoARM: artik{530,710}_raptor_defconfig: enable AUDITSYSCALL
Inki Dae [Wed, 4 Apr 2018 08:41:53 +0000 (17:41 +0900)]
ARM: artik{530,710}_raptor_defconfig: enable AUDITSYSCALL

Enabled AUDITSYSCALL for the use of audit subsystem.
A new security feature for Tizen 5.0 requires the subsystem
in default

Change-Id: Icd1f6a6e4f0ff09c2dec9902927a24fd1c1bc7a5
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agoARM64: artik710_raptor_defconfig: synchronize defconfig file
Inki Dae [Thu, 5 Apr 2018 05:01:06 +0000 (14:01 +0900)]
ARM64: artik710_raptor_defconfig: synchronize defconfig file

Just synchronized defconfig files for artik710.

Change-Id: I50066780465e78caa7d90ed9bbba7bf5e586fbc7
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agoARM: artik530_raptor_defconfig: synchronize defconfig file
Inki Dae [Thu, 5 Apr 2018 05:00:28 +0000 (14:00 +0900)]
ARM: artik530_raptor_defconfig: synchronize defconfig file

Just synchronized defconfig files for artik530.

Change-Id: I0064b4bb739449dedc83b304b95d623e00426403
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agomedia: nexell: fix to fill bytesperline & sizeimage for mplane format
Seung-Woo Kim [Thu, 29 Mar 2018 04:39:38 +0000 (13:39 +0900)]
media: nexell: fix to fill bytesperline & sizeimage for mplane format

For multi planar format, on vidioc_s_fmt_vid_cap_mplane() callback
of nexell video driver, stride and sizeimage are not filled and
this causes failure of gst v4l2src plugin. Fix to fill bytesperline
and sizeimage for multi planar format from callback function,
vidioc_s_fmt_vid_cap_mplane().

Change-Id: Ib5871f183e37916c7725539bfd777d883fa96996
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agov4l2: Supress warnings from nexell vendor formats
Seung-Woo Kim [Wed, 28 Mar 2018 09:38:40 +0000 (18:38 +0900)]
v4l2: Supress warnings from nexell vendor formats

There are too many unnecessary warning during v4l2 format check
because of nexell vendor formats. Supress warnings from nexell
vendor formats as workaround.

Once it is handled from ARTIK tree, it should be skipped during
rebase.

Change-Id: Idb0c1e29332d846886f91a4a7281726792d6ef31
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoproc, coredump: add CoreDumping flag to /proc/pid/status
Roman Gushchin [Fri, 17 Nov 2017 23:26:45 +0000 (15:26 -0800)]
proc, coredump: add CoreDumping flag to /proc/pid/status

Right now there is no convenient way to check if a process is being
coredumped at the moment.

It might be necessary to recognize such state to prevent killing the
process and getting a broken coredump.  Writing a large core might take
significant time, and the process is unresponsive during it, so it might
be killed by timeout, if another process is monitoring and
killing/restarting hanging tasks.

We're getting a significant number of corrupted coredump files on
machines in our fleet, just because processes are being killed by
timeout in the middle of the core writing process.

We do have a process health check, and some agent is responsible for
restarting processes which are not responding for health check requests.
Writing a large coredump to the disk can easily exceed the reasonable
timeout (especially on an overloaded machine).

This flag will allow the agent to distinguish processes which are being
coredumped, extend the timeout for them, and let them produce a full
coredump file.

To provide an ability to detect if a process is in the state of being
coredumped, we can expose a boolean CoreDumping flag in
/proc/pid/status.

Example:
$ cat core.sh
  #!/bin/sh

  echo "|/usr/bin/sleep 10" > /proc/sys/kernel/core_pattern
  sleep 1000 &
  PID=$!

  cat /proc/$PID/status | grep CoreDumping
  kill -ABRT $PID
  sleep 1
  cat /proc/$PID/status | grep CoreDumping

$ ./core.sh
  CoreDumping: 0
  CoreDumping: 1

[guro@fb.com: document CoreDumping flag in /proc/<pid>/status]
Link: http://lkml.kernel.org/r/20170928135357.GA8470@castle.DHCP.thefacebook.com
Link: http://lkml.kernel.org/r/20170920230634.31572-1-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[inki.dae: backported from mainline - commit : c643401218be
  On Tizen, there is one issue that a process doing coredump can be killed.
  This patch allows a process to detect if given process is being dumped.
  With this, Tizen can exclude such process from 'kill list' so that
  coredump process can finish coredump work.]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I4f21bdcbbf1451f04e2083621925953823bd1164

5 years agoarm64: dts: artik710_raptor: change HW overlay's priority
Hoegeun Kwon [Tue, 19 Dec 2017 07:24:46 +0000 (16:24 +0900)]
arm64: dts: artik710_raptor: change HW overlay's priority

Changed HW overlay's priority.

Video layer should have a lower priority than graphics layers to show
video and UI  images together on Display.
By doing so, Platform can pass video image on video layer, and UI
image on graphics layers that alpha channel on the region of video
layer to be shown is enabled.

Change-Id: I42e33f7188ca7935b6e622881a6fc1c3ff003ea4
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agoARM: dts: artik530_raptor: change HW overlay's priority
Hoegeun Kwon [Mon, 18 Dec 2017 08:28:34 +0000 (17:28 +0900)]
ARM: dts: artik530_raptor: change HW overlay's priority

Changed HW overlay's priority.

Video layer should have a lower priority than graphics layers to show video
and UI  images together on Display.
By doing so, Platform can pass video image on video layer,
and UI image on graphics layers that alpha channel on the region of video layer
to be shown is enabled.

Change-Id: I4a5fd33caefb27dcfacf73f7424a8a21365cad7e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Updated descriptions
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agodrm/nexell: Fix the irq_enabled flag
Hoegeun Kwon [Thu, 14 Dec 2017 09:30:38 +0000 (18:30 +0900)]
drm/nexell: Fix the irq_enabled flag

There was a problem that the flag was not enabled even though irq was
registered. Therefore, the irq_enabled flag must be enabled.

Change-Id: I1c1cf9f6fea26d35f6b4068fc04e7de98f8a4353
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 years agogpu: arm: mali400: move r6p2 config into r6p2-01rel0 directory
Seung-Woo Kim [Fri, 8 Dec 2017 07:02:54 +0000 (16:02 +0900)]
gpu: arm: mali400: move r6p2 config into r6p2-01rel0 directory

The CONFIG_MALI_DMA_BUF_FENCE is for r6p2-01rel0 config option, but
it was not moved into the directory from the commit 0d7c6052efd0
("gpu: arm: mali400: move mali driver to a r6p2-01rel0 folder").
Move the r6p2 config into the directory.

This removes following Kconfig warning:
   drivers/gpu/arm/mali400/Kconfig:66:warning: defaults for choice values not supported

Change-Id: Ic46b629a3d2867715651f41b79b89a87428ad795
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agomisc: Kconfig: enable the TIZEN_REBOOT when ARCH_S5P6818 is enabled
Jaehoon Chung [Mon, 4 Dec 2017 08:20:30 +0000 (17:20 +0900)]
misc: Kconfig: enable the TIZEN_REBOOT when ARCH_S5P6818 is enabled

Enable the TIZEN_REBOOT when ARCH_S5P6818 is enabled.
(ARCH_S5P6818 is ARTIK710 board.)

Change-Id: I4a3a5e2c5c0cae5ef0e3cc7cef6d784d2ab8c275
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agousb: dwc2: gadget: Prevent wrong extcon notification
Dongwoo Lee [Mon, 6 Nov 2017 07:11:08 +0000 (16:11 +0900)]
usb: dwc2: gadget: Prevent wrong extcon notification

In sometimes, USB disconnection triggers enumeration-done interrupt
even though it is false state. Actually, this interrupt is ignored by
dwc2 irq handler, but extcon notfication can be mis-delivered to
user-space. Thus, this patch make worker determined the current state
by itself, and it also prevent some cases which have chance for wrong
notification such as repeatedly connect/disconnecting usb cable.

Change-Id: Iff88cf2c030b627f3d2da23930b10e9f3a84c8e1
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agogpu: drm: nexell: Add extcon notification for hdmi connection
Dongwoo Lee [Fri, 10 Nov 2017 02:55:12 +0000 (11:55 +0900)]
gpu: drm: nexell: Add extcon notification for hdmi connection

Currently, HDMI cable connection generates only uevent by drm core. In
addition, it has no inforation about connection state. But, in tizen,
to handle TV-out mode uevent should be generated by extcon subsystem
with connection state. To this end, this patch will add extcon
notification for hdmi connection.

Change-Id: I101bf3b582498fbe46733839e3cbd75c292cf88f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agortc: ds1307: prevent to set the specific time value
Jaehoon Chung [Fri, 3 Nov 2017 05:29:07 +0000 (14:29 +0900)]
rtc: ds1307: prevent to set the specific time value

When using the time over "date 2038-01-19 03:14", Systemd is displaying
the below log as spamming.

"systemd[1]: Time has been changed"

This patch is workaround for preventing to set the value over
"2038-01-19".

Refer to https://patchwork.kernel.org/patch/7133531/

Change-Id: Iab3823b63d738c0c63d4cee439ab53da335f4ef0
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agomisc: tizen-artik-reboot: support the reboot notifier
Jaehoon Chung [Tue, 24 Oct 2017 09:11:11 +0000 (18:11 +0900)]
misc: tizen-artik-reboot: support the reboot notifier

Tizen platform needs to provide the reboot parameter.
This file is for supporting reboot notifier on Tizen platform.

Note: ALIVESCRATCH7 register should maintain the value upon rebooting.
      (ALIVESCRATCH 0~5 are already used.)

Change-Id: I512e6b2ca26c355a847435f20910be85cbf28fb2
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
5 years agoARM64: dts: artik710_raptor: Enable extcon notifcation for usb connection
Dongwoo Lee [Mon, 30 Oct 2017 06:05:16 +0000 (15:05 +0900)]
ARM64: dts: artik710_raptor: Enable extcon notifcation for usb connection

ARTIK710 has no specific peripheral for detecting USB connection,
but Tizen requires uevent on USB cable connection for executing SDB
daemon. To generate uevent for USB connection in dwc2 gadget driver
directly, this patch allows extcon notification feature.

Change-Id: I8a2f6749d763cdeb2272e5a0e6ac17d5b9dc9407
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agoARM64: configs: artik710_raptor: Enable OPTEE Driver
egukim [Wed, 11 Oct 2017 08:59:25 +0000 (17:59 +0900)]
ARM64: configs: artik710_raptor: Enable OPTEE Driver

Enable OPTEE Driver option.

Change-Id: Ibff6f828920ef24b9a6155ff8aea07c61da74b19
Signed-off-by: egukim <egukim@dignsys.com>
5 years agoARM64: dts: s5p6816: Add optee node
egukim [Tue, 24 Oct 2017 02:18:38 +0000 (11:18 +0900)]
ARM64: dts: s5p6816: Add optee node

Add device node for optee kernel driver.

Change-Id: I8e1dd750d49864ffa005c8ec3c59049ac46afa2b
Signed-off-by: egukim <egukim@dignsys.com>
5 years agotee: add ARM_SMCCC dependency
Arnd Bergmann [Wed, 10 May 2017 19:05:16 +0000 (21:05 +0200)]
tee: add ARM_SMCCC dependency

For the moment, the tee subsystem only makes sense in combination with
the op-tee driver that depends on ARM_SMCCC, so let's hide the subsystem
from users that can't select that.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[egukim: Backported from mainline kernel v4.12]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: I043b28e0e44ee8b9bb1310af4ff811af39fd5f84

5 years agoDocumentation: tee subsystem and op-tee driver
Jens Wiklander [Mon, 1 Jun 2015 14:15:25 +0000 (16:15 +0200)]
Documentation: tee subsystem and op-tee driver

Acked-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
[egukim: Backported from mainline kernel v4.12]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: Iacbff6e88dff06afbde79a31bf46815555f26893

5 years agotee: add OP-TEE driver
Jens Wiklander [Tue, 14 Apr 2015 12:33:20 +0000 (14:33 +0200)]
tee: add OP-TEE driver

Adds a OP-TEE driver which also can be compiled as a loadable module.

* Targets ARM and ARM64
* Supports using reserved memory from OP-TEE as shared memory
* Probes OP-TEE version using SMCs
* Accepts requests on privileged and unprivileged device
* Uses OPTEE message protocol version 2 to communicate with secure world

Acked-by: Andreas Dannenberg <dannenberg@ti.com>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (RCAR H3)
Tested-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Javier González <javier@javigon.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
[egukim: Backported from mainline kernel v4.12]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: I87123dc487f373028c56b2c6d2dc6dccf0248cfb

5 years agotee: generic TEE subsystem
Jens Wiklander [Wed, 11 Mar 2015 13:39:39 +0000 (14:39 +0100)]
tee: generic TEE subsystem

Initial patch for generic TEE subsystem.
This subsystem provides:
* Registration/un-registration of TEE drivers.
* Shared memory between normal world and secure world.
* Ioctl interface for interaction with user space.
* Sysfs implementation_id of TEE driver

A TEE (Trusted Execution Environment) driver is a driver that interfaces
with a trusted OS running in some secure environment, for example,
TrustZone on ARM cpus, or a separate secure co-processor etc.

The TEE subsystem can serve a TEE driver for a Global Platform compliant
TEE, but it's not limited to only Global Platform TEEs.

This patch builds on other similar implementations trying to solve
the same problem:
* "optee_linuxdriver" by among others
  Jean-michel DELORME<jean-michel.delorme@st.com> and
  Emmanuel MICHEL <emmanuel.michel@st.com>
* "Generic TrustZone Driver" by Javier González <javier@javigon.com>

Acked-by: Andreas Dannenberg <dannenberg@ti.com>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (RCAR H3)
Tested-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Javier González <javier@javigon.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
[egukim: Backported from mainline kernel v4.12]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: Ie2c81bc713362b45389c3e7f9ce88513fd4dad5f

5 years agodt/bindings: add bindings for optee
Jens Wiklander [Thu, 21 May 2015 05:47:09 +0000 (07:47 +0200)]
dt/bindings: add bindings for optee

Introduces linaro prefix and adds bindings for ARM TrustZone based OP-TEE
implementation.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
[egukim: Backported from mainline kernel v4.12]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: I56cdb480ee0fbcbbea1385c9da4583e8d5f2bebe

5 years agokernel.h: add u64_to_user_ptr()
Gustavo Padovan [Tue, 26 Apr 2016 15:32:27 +0000 (12:32 -0300)]
kernel.h: add u64_to_user_ptr()

This function had copies in 3 different files. Unify them in kernel.h.

Cc: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@intel.com> [drm/i915/]
Acked-by: Rob Clark <robdclark@gmail.com> [drm/msm/]
Acked-by: Lucas Stach <l.stach@pengutronix.de> [drm/etinav/]
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[egukim: Backported from mainline kernel v4.12
 - However, this patch does not include drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
 - because it currently does not have an etnaviv driver on the base]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: Id2983d11540c58081f62d816b1048aec662a3ee3

5 years agoARM: 8480/2: arm64: add implementation for arm-smccc
Jens Wiklander [Mon, 4 Jan 2016 14:44:32 +0000 (15:44 +0100)]
ARM: 8480/2: arm64: add implementation for arm-smccc

Adds implementation for arm-smccc and enables CONFIG_HAVE_SMCCC.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[egukim: Backported from mainline kernel v4.12]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: Idcb36da8256e308d48a8982b1d682e8ab7416175

5 years agoARM: 8479/2: add implementation for arm-smccc
Jens Wiklander [Mon, 4 Jan 2016 14:42:55 +0000 (15:42 +0100)]
ARM: 8479/2: add implementation for arm-smccc

Adds implementation for arm-smccc and enables CONFIG_HAVE_SMCCC for
architectures that may support arm-smccc. It's the responsibility of the
caller to know if the SMC instruction is supported by the platform.

Reviewed-by: Lars Persson <lars.persson@axis.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[egukim: Backported from mainline kernel v4.12]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: I029e75b9f2f623bf1e4c2e243537e930d96dc6cf

5 years agoARM: 8478/2: arm/arm64: add arm-smccc
Jens Wiklander [Mon, 4 Jan 2016 14:37:32 +0000 (15:37 +0100)]
ARM: 8478/2: arm/arm64: add arm-smccc

Adds helpers to do SMC and HVC based on ARM SMC Calling Convention.
CONFIG_HAVE_ARM_SMCCC is enabled for architectures that may support the
SMC or HVC instruction. It's the responsibility of the caller to know if
the SMC instruction is supported by the platform.

This patch doesn't provide an implementation of the declared functions.
Later patches will bring in implementations and set
CONFIG_HAVE_ARM_SMCCC for ARM and ARM64 respectively.

Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[egukim: Backported from mainline kernel v4.12]
Signed-off-by:eunggu kim <egukim@dignsys.com>

Change-Id: I020f669ceb3925b2f71c5e3a0bb6694fffee30f5

5 years agopackaging: add debuginfo package
Seung-Woo Kim [Wed, 25 Oct 2017 08:20:09 +0000 (17:20 +0900)]
packaging: add debuginfo package

Add debuginfo package with debug symbol including vmlinux,
System.map and build config.

Change-Id: I40c4fd0b95d45261da6e41e335f22dc380808f4c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoARM: hw_breakpoint: blacklist nexell CPUs
Seung-Woo Kim [Fri, 20 Oct 2017 06:05:27 +0000 (15:05 +0900)]
ARM: hw_breakpoint: blacklist nexell CPUs

On s5p4418 nexell soc, the kernel crashes in arch_hw_breakpoint_init
when CONFIG_PERF_EVENTS option is enabled, taking an undefined
instruction trap. Blacklist nexell CPUs as like Scorpion CPUs.

Reference: ddc37832a134 ("ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs")

Change-Id: I2aa6f43467d2369e1d08ae02dd1b64fc4410a701
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agonet: wireless: sd8977: Makefile: disable the CONFIG_DEBUG
Jaehoon Chung [Mon, 23 Oct 2017 10:50:36 +0000 (19:50 +0900)]
net: wireless: sd8977: Makefile: disable the CONFIG_DEBUG

Current debug level is used LEVEL1.
But it is displayed the log message like spamming.

Disable the CONFIG_DEBUG for wifi debug.

Change-Id: I9b112ae75375a17f373b8abccd7ae428e292edb4
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoarm: configs: artik530_raptor: Enable kprobes & uprobes
Karol Lewandowski [Wed, 18 Oct 2017 09:53:06 +0000 (11:53 +0200)]
arm: configs: artik530_raptor: Enable kprobes & uprobes

Enable features needed for D-Bus Observability Tools.

Change-Id: Ia9cb475a5befeedc948ea0e2969103ef34dcaf73
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
5 years agoarm: dts: artik530_raptor: Enable extcon notification for usb connection
Dongwoo Lee [Mon, 16 Oct 2017 07:03:02 +0000 (16:03 +0900)]
arm: dts: artik530_raptor: Enable extcon notification for usb connection

ARTIK530 has no extra peripheral for detecting USB cable connection,
but Tizen requires uevent on USB cable connection for enabling SDB
and MTP. To generate uevent for USB connection in dwc2 gadget driver
directly, this patch allows extcon notification of it.

Change-Id: I3d5b43c961b2f7c7f6d24294c2e34ba730495f3c
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agousb: dwc2: gadget: Add support for extcon notification
Dongwoo Lee [Tue, 10 Oct 2017 06:06:57 +0000 (15:06 +0900)]
usb: dwc2: gadget: Add support for extcon notification

To provide extcon notification for the device which has no separated
peripherals for recognizing and notifying cable connection, this patch
adds support for extcon notification into dwc2 gadget interrupt
handler. If we set 'g-extcon-notify' property to dts, gadget driver
will directly generate extcon event for cable connection.

Change-Id: I6fd12c026e3e867a31d25a157921abb34bbd98dd
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agoarm: config: arti530_raptor: disable the SWAP configuration
Jaehoon Chung [Fri, 13 Oct 2017 10:03:56 +0000 (19:03 +0900)]
arm: config: arti530_raptor: disable the SWAP configuration

Disable the SWAP configuration.

Change-Id: Ic634b99ae19f80e5d7f9ebb82f5cbc831c3d6220
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoarm: configs: artik530_raptor: Enable extcon framework
Dongwoo Lee [Wed, 11 Oct 2017 01:18:21 +0000 (10:18 +0900)]
arm: configs: artik530_raptor: Enable extcon framework

Tizen activates its gadget such as MTP and SDB as following uevent
states. Thus, in order to generate uevent when USB cable is
connected, extcon framework will be used.

Change-Id: I040d444dd1b3f0d00807d64708df7fa5c330ad6b
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
5 years agoconfigs: artik530/artik710_raptor: add i2c-stub to module
kibak.yoon [Fri, 13 Oct 2017 04:26:59 +0000 (13:26 +0900)]
configs: artik530/artik710_raptor: add i2c-stub to module

We need a test method for the i2c driver and framework on Artik.
And using a fake device is more convenient than a physical hardware device.
Therefore it would be good to enable i2c-stub for testing i2c feature on Artik.
This will be used for testing purposes only.

Change-Id: I893da44f54219dbd4c00fce0c8a2f0f97e93e967
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
5 years agoconfigs: artik530_raptor/artik710_raptor: remove default hostname
Seung-Woo Kim [Tue, 26 Sep 2017 05:56:42 +0000 (14:56 +0900)]
configs: artik530_raptor/artik710_raptor: remove default hostname

Currently, tizen gets hostname from /proc/sys/kernel/hostname and
default hostname in config causes not matched result from
System.Net.Dns.GetHostName().
Remove the default hostname from each artik defconfigs.

Change-Id: Id95fab651726c3a0e833c337d5f80b90c4ef590d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agogpu: arm: mali400: r5p2_rel0: remove unused function build warnings
Seung-Woo Kim [Mon, 25 Sep 2017 11:03:07 +0000 (20:03 +0900)]
gpu: arm: mali400: r5p2_rel0: remove unused function build warnings

There are unused function build warnings. Remove the warnings with
__maybe_unused build macro.

Change-Id: If78df13c03a42a0c5f3e32956c39662aa4bac214
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agonet: bcmdhd: fix non proper indent for if clause
Seung-Woo Kim [Sat, 21 Jan 2017 03:28:57 +0000 (12:28 +0900)]
net: bcmdhd: fix non proper indent for if clause

non proper indent for if clause causes build error with gcc 6.
Fix the non proper indent to fix following build warning:
   drivers/net/wireless/bcmdhd/dhd_sdio.c: In function 'dhd_bus_devreset':
   drivers/net/wireless/bcmdhd/dhd_sdio.c:8919:6: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
       } else
         ^~~~
   drivers/net/wireless/bcmdhd/dhd_sdio.c:8922:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
        dhd_os_sdunlock(dhdp);
        ^~~~~~~~~~~~~~~

Change-Id: I032eee3c74768988c5fb3bc75651ce802ba8954d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agonet: bcmdhd: fix not to check same value in macro
Seung-Woo Kim [Tue, 17 Jan 2017 04:22:22 +0000 (13:22 +0900)]
net: bcmdhd: fix not to check same value in macro

When BCMBUSTYPE is not defined, then BUSTYPE(bustype) is just
bustype. So comparing bustype and BUSTYPE(bustype) is not necessary.
Fix not to check the same values.

This patch removes following build warning with gcc 6.
   drivers/net/wireless/bcmdhd/siutils.c: In function 'si_doattach':
   drivers/net/wireless/bcmdhd/siutils.c:564:14: warning: self-comparison always evaluates to false [-Wtautological-compare]
     if (bustype != BUSTYPE(bustype)) {
                 ^~

Change-Id: I1cac3dd31bcb86983469830013a1093ed9ceaa89
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agodrm/nexell: add render node support
Inki Dae [Mon, 25 Sep 2017 09:47:47 +0000 (18:47 +0900)]
drm/nexell: add render node support

Add render node support to rendering relevant ioctls.

Clients require access authorization from DRM master to access
some rendering relevant interfaces - especially flink things,
and it incurs performance drop due to hand-shaking between
Client and Server, DRM master.

So this patch makes access to these interfaces not to be required
anymore.

Change-Id: I73e6d448ce3bc2ac1770826d485e8eb54323e9ae
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agodrm: prime: Honour O_RDWR during prime-handle-to-fd
Daniel Thompson [Tue, 22 Dec 2015 21:36:44 +0000 (19:36 -0200)]
drm: prime: Honour O_RDWR during prime-handle-to-fd

Currently DRM_IOCTL_PRIME_HANDLE_TO_FD rejects all flags except
(DRM|O)_CLOEXEC making it difficult (maybe impossible) for userspace
to mmap() the resulting dma-buf even when this is supported by the
DRM driver.

It is trivial to relax the restriction and permit read/write access.
This is safe because the flags are seldom touched by drm; mostly they
are passed verbatim to dma_buf calls.

v3 (Tiago): removed unused flags variable from drm_prime_handle_to_fd_ioctl.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1450820214-12509-2-git-send-email-tiago.vignatti@intel.com
[sw0312.kim: cherry-pick from mainline to support write mmap on dmabuf fd]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I906c4736840000c4c158cb641d3954bca2e27fca

5 years agoSmack: ignore private inode for file functions
Seung-Woo Kim [Mon, 12 Dec 2016 08:35:26 +0000 (17:35 +0900)]
Smack: ignore private inode for file functions

The access to fd from anon_inode is always failed because there is
no set xattr operations. So this patch fixes to ignore private
inode including anon_inode for file functions.

It was only ignored for smack_file_receive() to share dma-buf fd,
but dma-buf has other functions like ioctl and mmap.

Reference: https://lkml.org/lkml/2015/4/17/16

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[sw0312.kim: cherry-pick from mainline to fix SMACK issue during mmap on dmabuf fd]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I29c68baf9246779d468833182b06e0721f3eb51a

5 years agoSmack: fix d_instantiate logic for sockfs and pipefs
Rafal Krypa [Fri, 9 Dec 2016 13:03:04 +0000 (14:03 +0100)]
Smack: fix d_instantiate logic for sockfs and pipefs

Since 4b936885a (v2.6.32) all inodes on sockfs and pipefs are disconnected.
It caused filesystem specific code in smack_d_instantiate to be skipped,
because all inodes on those pseudo filesystems were treated as root inodes.
As a result all sockfs inodes had the Smack label set to floor.

In most cases access checks for sockets use socket_smack data so the inode
label is not important. But there are special cases that were broken.
One example would be calling fcntl with F_SETOWN command on a socket fd.

Now smack_d_instantiate expects all pipefs and sockfs inodes to be
disconnected and has the logic in appropriate place.

Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[sw0312.kim: cherry-pick from main to fix SMACK issue realted with socket]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I1b55a8829b26259f4e0502f12aa27e423dd1cafe

5 years agoARM64: configs: artik710_raptor: disable SMACK permissive mode
Seung-Woo Kim [Tue, 29 Aug 2017 07:51:59 +0000 (16:51 +0900)]
ARM64: configs: artik710_raptor: disable SMACK permissive mode

Tizen should support security smack without permissive mode.

Change-Id: I03f61148ed3852d466ca798a6f43fddece400aab
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoarm: configs: artik530_raptor: disable SMACK permissive mode
Seung-Woo Kim [Tue, 29 Aug 2017 07:50:40 +0000 (16:50 +0900)]
arm: configs: artik530_raptor: disable SMACK permissive mode

Tizen should support security smack without permissive mode.

Change-Id: I0084422d799c2f0469701feb39c6d5e5a7b1fe22
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoARM64: configs: artik710_raptor: enable AUDIT and SMACK_NETFILTER
Seung-Woo Kim [Tue, 29 Aug 2017 05:56:16 +0000 (14:56 +0900)]
ARM64: configs: artik710_raptor: enable AUDIT and SMACK_NETFILTER

On Tizen, nether service is failed because security smack netfilter
related configs are not enabled. So, enable related configs
including CONFIG_AUDIT, CONFIG_NETWORK_SECMARK, and
CONFIG_SECURITY_SMACK_NETFILTER and others.

Change-Id: If81a80cac377dea09424610f258ac3135c8a08d5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>