platform/kernel/linux-rpi3.git
2 years agokdbus: don't unlink synchronous replies 79/264879/2
Adrian Szyndela [Thu, 30 Sep 2021 06:44:57 +0000 (15:44 +0900)]
kdbus: don't unlink synchronous replies

When a signal breaks a synchronous call, and a reply is received
before restart is executed, then the reply is unlinked and the restarted
call can't pick it up anymore.

But keeping only interrupted synchronous calls linked is not enough.
If a reply comes just after the signal, before marking the reply structure
as interrupted, then the reply is - again - unlinked and the restarted call
can't pick it up anymore.

This commit leaves all synchronous replies linked.

This way:
- asynchronous calls work as before the changes - replies are unlinked
  by the replier in kdbus_conn_reply();
- replies for synchronous calls are unlinked by the caller in
  kdbus_conn_wait_reply().

Change-Id: I0e3d8f53cf24a0aa8c59244e0768eebeb3fee110
Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
2 years agotizen_bcmrpi3_defconfig: Enable dm-bow 28/261228/2 accepted/tizen/6.5/unified/20211028.115935 accepted/tizen/unified/20210716.131207 submit/tizen/20210716.010712 submit/tizen_6.5/20211028.163201 tizen_6.5.m2_release
Ernest Borowski [Tue, 13 Jul 2021 10:33:33 +0000 (10:33 +0000)]
tizen_bcmrpi3_defconfig: Enable dm-bow

This enables device mapper driver to allow checkpoint & restore on ext4
partitions.

Change-Id: Id682e9f9bdb6d856da35dd65480d40dc85ff4d3b
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
2 years agotizen_bcm2709_defconfig: Enable dm-bow 27/261227/2
Ernest Borowski [Tue, 13 Jul 2021 10:32:52 +0000 (10:32 +0000)]
tizen_bcm2709_defconfig: Enable dm-bow

This enables device mapper driver to allow checkpoint & restore on ext4
partitions.

Change-Id: I247516b3483b94c3d857216daac8b272fdc5d782
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
2 years agodevice-mapper: Add dm-bow 67/260967/3
Mateusz Moscicki [Fri, 27 Nov 2020 13:58:07 +0000 (14:58 +0100)]
device-mapper: Add dm-bow

dm-bow is a device mapper driver that allows to create a checkpoint on
the volume so that it is possible to restore the state if necessary.
This is needed to protect the ext4 partition during a system upgrade in
case of a power failure.

Change-Id: Ic62e83dc5b04cfa250d1b7eaa3721546782e88eb
Originally-by: Paul Lawrence <paullawrence@google.com>
Origin: https://android.googlesource.com/kernel/common/+/refs/heads/android-mainline/drivers/md/dm-bow.c
Signed-off-by: Mateusz Moscicki <m.moscicki2@samsung.com>
3 years agoARM64: tizen_bcmrpi3_defconfig: Sync with savedefconfig 81/260981/1
Dongwoo Lee [Thu, 8 Jul 2021 02:20:07 +0000 (11:20 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Sync with savedefconfig

This fixes to synchronize current defconfig with savedefconfig

Change-Id: Ia899b3b87dc4232e4eb09e84e8e6d29352d115e6
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
3 years agoARM: tizen_bcm2709_defconfig: Sync with savedefconfig 80/260980/1
Dongwoo Lee [Thu, 8 Jul 2021 02:18:59 +0000 (11:18 +0900)]
ARM: tizen_bcm2709_defconfig: Sync with savedefconfig

This fixes to synchronize current defconfig with savedefconfig

Change-Id: Ia3746fef04296097ca0173794c374d5b578ced72
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
3 years agoARM/ARM64: tizen_bcm2709_defconfig: disable ANDROID_LOGGER config 26/260626/2 accepted/tizen/unified/20210630.144045 submit/tizen/20210630.013220
INSUN PYO [Wed, 30 Jun 2021 02:38:39 +0000 (11:38 +0900)]
ARM/ARM64: tizen_bcm2709_defconfig: disable ANDROID_LOGGER config

Disable android logger.
The android logger has been moved to the kernel module of the linux-tizen-modules package.

Change-Id: Ie85ea5eb84ab489cd4ef76b97eb84aeab2d89c18
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
3 years agokdbus: Remove unreachable code from kdbus_msg_examine 90/258490/1 accepted/tizen/unified/20210602.122630 submit/tizen/20210531.013858
Sylwester Nawrocki [Tue, 18 May 2021 12:56:13 +0000 (14:56 +0200)]
kdbus: Remove unreachable code from kdbus_msg_examine

This fixes an issue pointed out with SVACE warning:

* UNREACHABLE_CODE: This statement in the source code might be unreachable
  during program execution.
    [unreachable] unreachable at linux-rpi3/ipc/kdbus/message.c:346
    [vec_size > vec_size + size (0 > ANY) is always false] vec_size >
   vec_size + size (0 > ANY) is always false at linux-rpi3/ipc/kdbus/message.c:345

Change-Id: Ic154b2dbb0740f9e49b68ef273f19cd89e90c200
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agologger: Suppress SVACE sign extension warnings 89/258489/1
Sylwester Nawrocki [Tue, 18 May 2021 12:26:51 +0000 (14:26 +0200)]
logger: Suppress SVACE sign extension warnings

This patch suppresses SVACE warnings shown below and makes the code more
robust. The actual sign extension issue cannot happen in current code as
value of the len variable in function logger_set_tag() is limited to
LOGGER_ENTRY_MAX_PAYLOAD and create_log() is being called only with fixed
size argument values.

* SIGNED_TO_BIGGER_UNSIGNED: Assignment of a signed value which has type 'int' to a variable of a bigger integer type 'size_t'
    Sign extension at linux-rpi3/drivers/staging/android/logger.c:898

* SIGNED_TO_BIGGER_UNSIGNED: Assignment of a signed value which has type 'int' to a variable of a bigger integer type 'size_t'
    Sign extension at linux-rpi3/drivers/staging/android/logger.c:1045

Change-Id: I8646555e1a09fb0feb4c12961965aea36c80cd38
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
3 years agoARM64: tizen_bcmrpi3_defconfig: Enable security labels for f2fs 46/257746/1 accepted/tizen/unified/20210502.124133 submit/tizen/20210430.074455
Dongwoo Lee [Fri, 30 Apr 2021 07:38:14 +0000 (16:38 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable security labels for f2fs

To support smack on f2fs, this enables security label for f2fs
filesystem.

Change-Id: Ie9fee58880b35057b0732bc434e03a55baa188e6
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
3 years agoARM: tizen_bcm2711_defconfig: Enable security labels for f2fs 45/257745/1
Dongwoo Lee [Fri, 30 Apr 2021 07:35:49 +0000 (16:35 +0900)]
ARM: tizen_bcm2711_defconfig: Enable security labels for f2fs

To support smack on f2fs, this enables security label for f2fs
filesystem.

Change-Id: I37ba6a2e1b872116fa7ef1283d8901d497434a2e
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
3 years agologger-test: more intensive tests 82/256882/2 accepted/tizen/unified/20210420.090116 submit/tizen/20210420.014641
Łukasz Stelmach [Thu, 8 Apr 2021 13:36:04 +0000 (15:36 +0200)]
logger-test: more intensive tests

Send enough data to logger to fill the whole ring buffer.

Test assembly of large messages without newline characters.

Check return value from write(2).

Remove some dead code.

Change-Id: I165458f5c7831bd925164aa087f28fd319c9872f
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: introduce struct logger_set_tag 73/257073/1
Łukasz Stelmach [Wed, 14 Apr 2021 15:50:51 +0000 (17:50 +0200)]
logger: introduce struct logger_set_tag

Introduce dedicated structure for LOGGER_SET_TAG ioctl,
instead of packing and unpacking arguments by hand.

Change-Id: Ic3399ab37f55ba2b8a9a976f8c9495fc487fe7f3
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: move logger.h to uapi 81/256881/2
Łukasz Stelmach [Fri, 19 Mar 2021 14:20:06 +0000 (15:20 +0100)]
logger: move logger.h to uapi

Move logger.h to uapi so it can be exported for userland
software to use.

Change-Id: I64dca69f3442edc246562485b0b29b43615ae881
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: return amount of data written to stdio 80/256880/2
Łukasz Stelmach [Tue, 13 Apr 2021 10:24:38 +0000 (12:24 +0200)]
logger: return amount of data written to stdio

Return amount of data written by a process to a logger via STDIO
interface.

Change-Id: I9c77a312d09f3d796a7ec64d5909af193bcc8bc2
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: fix temporary buffer handling 79/256879/2
Łukasz Stelmach [Fri, 9 Apr 2021 15:20:07 +0000 (17:20 +0200)]
logger: fix temporary buffer handling

Prevent writing beyond temporary buffer and improve accumulation of data
before receiving a newline character or filling the buffer.

Change-Id: I8e0591c90914dbd4c2addde4247157831fa4843a
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: adapt access mode checks 78/256878/2
Łukasz Stelmach [Fri, 9 Apr 2021 14:59:56 +0000 (16:59 +0200)]
logger: adapt access mode checks

Allow setting the tag and the priority only for files opened O_WRONLY.

Change-Id: Icc9d7a8eb96f8f1b1aa00717aae1f32f7a2e52e4
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: Fix incorrect buffer access when writing data 54/256654/3 accepted/tizen/unified/20210412.012038 submit/tizen/20210409.113436
Łukasz Stelmach [Thu, 8 Apr 2021 12:09:24 +0000 (14:09 +0200)]
logger: Fix incorrect buffer access when writing data

Fix crash caused by accessing memory beyond log->buffer

Change-Id: I528b62e34e9fb5f92f62f6b218718e15cd5f7d31
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: testing tool for STDIO logger 19/256519/2 accepted/tizen/unified/20210407.100438 submit/tizen/20210407.055935
Łukasz Stelmach [Mon, 15 Feb 2021 14:41:27 +0000 (15:41 +0100)]
logger: testing tool for STDIO logger

Change-Id: I029a7def836b317a4e059c7a56301e169910a830
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: accept untagged log entries 18/256518/2
Łukasz Stelmach [Fri, 12 Feb 2021 17:41:09 +0000 (18:41 +0100)]
logger: accept untagged log entries

Add support for writing untagged log messages to /dev/log_* nodes. The
logger shall accept untagget messages after setting the tag and
the priority with appropriate ioctl() commands for particular file
descriptors.

Change-Id: I02bd7bfd843eaf316692413a48747009c42756f6
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agokdbus: build and package kdbus-tests 35/256235/1 accepted/tizen/unified/20210401.110012 submit/tizen/20210401.011549
Łukasz Stelmach [Mon, 29 Mar 2021 08:35:37 +0000 (10:35 +0200)]
kdbus: build and package kdbus-tests

Change-Id: Icfcecc2780e6c5cdddaad0440b731ebb9dc49446
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agokdbus: test suite changed to common format 34/256234/1
Konrad Lipinski [Wed, 11 Sep 2019 13:42:10 +0000 (15:42 +0200)]
kdbus: test suite changed to common format

This commit adapts the kdbus test suite to use with
dbus-integration-tests.

Change-Id: Ifee21253f4e3c732b27517a0c566d4b9a569d5af
Origin: commit:2c0f308e6d963987fcb4e5754f504028d4511629
Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agoARM/ARM64: Enable KDBUS in tizen defconfigs 33/256233/1
Łukasz Stelmach [Fri, 26 Mar 2021 21:47:17 +0000 (22:47 +0100)]
ARM/ARM64: Enable KDBUS in tizen defconfigs

Change-Id: Ib1680e530acf3cb9161cdb53b5db5ef87f51df8c
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agokdbus: porting to to 4.19 32/256232/1
Łukasz Stelmach [Fri, 26 Mar 2021 21:41:29 +0000 (22:41 +0100)]
kdbus: porting to to 4.19

The following changes were made to adapt kdbus driver to 4.19 kernel

- use memfd_fcntl() instead of shmem_get_seals()

Change-Id: Iff24cd3c429310c3af748657a24a5e35db738635
Fixes: 5aadc431a593 ("shmem: rename functions that are memfd-related")
Fixes: 5d752600a8c3 ("mm: restructure memfd code")
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agokdbus: Revert "fs: unexport poll_schedule_timeout" 31/256231/1
Łukasz Stelmach [Mon, 21 Dec 2020 11:40:27 +0000 (12:40 +0100)]
kdbus: Revert "fs: unexport poll_schedule_timeout"

This reverts commit 8f546ae1fc5ce8396827d4868c7eee1f1cc6947a.

Change-Id: I5429471eeb092c55a50e37c0b642d50d69daebc7
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agokdbus: porting to 4.14 30/256230/1
Adrian Szyndela [Wed, 11 Sep 2019 13:34:33 +0000 (15:34 +0200)]
kdbus: porting to 4.14

This commit makes kdbus driver working with kernel 4.14.
It also enabled compilation of the driver if enabled in config.

The list of changes needed to make it compile with kernel 4.14:
- Add missing includes for <linux/cred.h>
- put inode_lock()/inode_unlock() in place of explicit mutex locking
- replace CURRENT_TIME with proper call to current_time()
- replace PAGE_CACHE_* with PAGE_*
- replace GFP_TEMPORARY with GFP_KERNEL
- use kvecs for kernel memory, iovec for user memory instead of only iovec
  for both
- fix usage of task_cgroup_path()
- replace GROUP_AT usage with 'gid' field dereference
- add 0 as an argument to init_name_hash
- add 0 as flags as an argument to vfs_iter_write
- replace __vfs_read with kernel_read to allow compilation into module

Change-Id: Ifed3a6d3a37082a900a64316af1c8a21ab30e84e
Origin: commit:846051292431cc81adb852c2b0cbbfddac4a3d48
Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agokdbus: the driver, original and non-working 29/256229/1
Adrian Szyndela [Fri, 9 Sep 2016 11:35:49 +0000 (13:35 +0200)]
kdbus: the driver, original and non-working

[based on commit 216823ac83c0ab89348e2ed6f66179f53626586e]

Introduce the kdbus driver again. This driver worked previously
on kernel 4.1. This is the source code taken from the working driver.
It is non-working and disabled. It is a base for porting.

The documentation is moved from Documentation to ipc/kdbus/Documentation.

The references to kdbus source code are commented out or removed in Makefiles.

Original authors of the files are those from commit 216823ac83c0ab8934.

Cherry-picked from 5.4 commit e2d621efdb4f1c1a6e782121d95b62ea249828f2

Change-Id: If8baeb585b5ecedd4286553405c3a8d24fed9c3a
Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agospec: set CONFIG_LOCALVERSION 28/256228/1
Łukasz Stelmach [Mon, 4 Jan 2021 19:23:41 +0000 (20:23 +0100)]
spec: set CONFIG_LOCALVERSION

Set CONFIG_LOCALVERSION insetad of EXTRAVERSION in Makefile to carry
information about the platform variant.

Change-Id: I72986cb618b998983f1e9f6eccba7d6e4603248f
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agospec: support gbs(1) incremental builds 27/256227/1
Łukasz Stelmach [Fri, 26 Mar 2021 14:50:37 +0000 (15:50 +0100)]
spec: support gbs(1) incremental builds

gbs(1) enable incremental builds that are significantly faster, hoewever,
spec files need some adjustments.

+ You can't use -n <name> with %setup
+ use rsync(1) instead of cp(1)+find(1) to copy devel files

Other changes are:
+ add _smp_mflags to make(1) things faster

Change-Id: I18c47b59b1bfef17501ab57f39f93d7185592f13
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agoscript: adjust ccache support 26/256226/1
Łukasz Stelmach [Fri, 26 Mar 2021 14:19:20 +0000 (15:19 +0100)]
script: adjust ccache support

Change-Id: Ia37a450bccf93ddf3daaca442be4d221df0d4036
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agoscript: Reformat to align with build-rpi4.sh 25/256225/1
Łukasz Stelmach [Fri, 26 Mar 2021 14:15:20 +0000 (15:15 +0100)]
script: Reformat to align with build-rpi4.sh

Reformat the script to bring it into alignment with build-rpi4.sh for
easier maintenance.

Change-Id: Ie97a1acc28486e62630062587a30689a9f19e085
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agoscript: Detect number of CPUs 24/256224/1
Łukasz Stelmach [Fri, 26 Mar 2021 14:02:18 +0000 (15:02 +0100)]
script: Detect number of CPUs

Automatically determine the number of parallel make(1) processes to run.

Change-Id: I0ce778e5c15ceb8cf80bbfc2f4bb58c937630ba3
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agopackaging: not delete the vmlinux file to debug 79/254979/1 accepted/tizen/unified/20210311.151443 submit/tizen/20210311.062002
Jaehoon Chung [Thu, 11 Mar 2021 04:57:34 +0000 (13:57 +0900)]
packaging: not delete the vmlinux file to debug

To debug with T32, it needs to use vmlinux file.
Incldue its file in devel package.

Change-Id: Ib01d80a99e08e99ecbdaa3a6e0787ac5dbe0e372
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoARM/ARM64: defconfig: disable SECURITY_SMACK_NETFILTER config 08/253708/1 accepted/tizen/unified/20210217.120508 submit/tizen/20210217.042922
Jaehoon Chung [Wed, 17 Feb 2021 00:51:59 +0000 (09:51 +0900)]
ARM/ARM64: defconfig: disable SECURITY_SMACK_NETFILTER config

Disable SECURITY_SMACK_NETFILTER configuration.

Change-Id: Idcc1175672ea2c86c232d834589c1a7c364636aa
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoARM: tizen_bcm2709_defconfig: Enable OVERLAY_FS 80/252180/1 accepted/tizen/unified/20210126.141632 submit/tizen/20210125.080748
Seung-Woo Kim [Mon, 25 Jan 2021 07:35:08 +0000 (16:35 +0900)]
ARM: tizen_bcm2709_defconfig: Enable OVERLAY_FS

Enable CONFIG_OVERLAY_FS for tizen application space.

Change-Id: I79add9d8b79281074ae1dd1d12a9c65fa422410b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoARM64: tizen_bcmrpi3_defconfig: Enable OVERLAY_FS 79/252179/1
Seung-Woo Kim [Mon, 25 Jan 2021 07:34:33 +0000 (16:34 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable OVERLAY_FS

Enable CONFIG_OVERLAY_FS for tizen application space.

Change-Id: I8c61e997c504467c0204d6e29b1c1f3ebac1c379
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable BCM_VCIO 36/246336/1 accepted/tizen/unified/20201029.124758 submit/tizen/20201029.033227
Seung-Woo Kim [Wed, 28 Oct 2020 09:19:20 +0000 (18:19 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable BCM_VCIO

Enable userland broadcom mailbox support, CONFIG_BCM_VCIO, as like
32bit config.

Change-Id: Ic0e33aaa2ed4040db57e8e48e2dabb2197cf9e4e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoRevert "WORKAROUND: security: smack: Allow ptracing even processes in onlycap set" 17/241917/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.104525 accepted/tizen/6.0/unified/hotfix/20201103.000028 accepted/tizen/unified/20200824.030014 submit/tizen/20200820.145124 submit/tizen_6.0/20201029.205501 submit/tizen_6.0_hotfix/20201102.192901 submit/tizen_6.0_hotfix/20201103.115101 tizen_6.0.m2_release
Seung-Woo Kim [Fri, 21 Aug 2020 01:10:27 +0000 (10:10 +0900)]
Revert "WORKAROUND: security: smack: Allow ptracing even processes in onlycap set"

This reverts commit 718567d336d0b0943385905bb12707552d8bef66.

Now crash-worker has System::Privileged privilege, so not anymore
ptrace related workaround is necessary. So revert the workaround.

Change-Id: I42b535e4152eb742df011a5a08324764b49f989a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoWORKAROUND: security: smack: Allow ptracing even processes in onlycap set 09/240609/1 accepted/tizen/unified/20200810.123103 submit/tizen/20200810.050403
Karol Lewandowski [Fri, 7 Aug 2020 11:49:30 +0000 (13:49 +0200)]
WORKAROUND: security: smack: Allow ptracing even processes in onlycap set

Change-Id: I708d19703da0f1b83950454fda1362bec7369b5c
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoRevert "brcmfmac: move configuration of probe request IEs" 82/240082/1 accepted/tizen/unified/20200803.122234 submit/tizen/20200803.071449
Jaehoon Chung [Mon, 3 Aug 2020 06:41:28 +0000 (15:41 +0900)]
Revert "brcmfmac: move configuration of probe request IEs"

This reverts commit bd99a3013bdc00f8fc7534c657b39616792b4467.

It doesn't find any p2p-device with wpa_supplicant on Tien.
- After reverted this, it's working fine.

Change-Id: I1cd77e65ad17078370116473dd46adc7338d6695
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable FUSE_FS 54/238754/1 accepted/tizen/unified/20200720.125614 submit/tizen/20200717.080515
Seung-Woo Kim [Fri, 17 Jul 2020 05:03:38 +0000 (14:03 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable FUSE_FS

Tizen requires CONFIG_FUSE_FS for user space filesystem. Enable
the option.

Change-Id: Ia4eefdcd95b5be4944a9717e69a4ce2deb31a081
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoARM: configs: tizen_bcm2709_defconfig: Enable FUSE_FS 53/238753/1
Seung-Woo Kim [Fri, 17 Jul 2020 05:02:44 +0000 (14:02 +0900)]
ARM: configs: tizen_bcm2709_defconfig: Enable FUSE_FS

Tizen requires CONFIG_FUSE_FS for user space filesystem. Enable
the option.

Change-Id: Icf66feb085fee5ab30e3b680d1914a51f276d9bd
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: configs: tizen_bcm2709: revert BLK_DEV_RAM_COUNT to 16 22/237122/1 accepted/tizen/unified/20200626.133447 submit/tizen/20200625.095326
Jaehoon Chung [Thu, 25 Jun 2020 07:02:27 +0000 (16:02 +0900)]
ARM: configs: tizen_bcm2709: revert BLK_DEV_RAM_COUNT to 16

Revert BLK_DEV_RAM_COUNT to 16 - default value.
Becaues there is timing issue about booting fail, use default value.

Change-Id: Ida3985e9a48863abbc2bd14476edb146c3f5744f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM64: configs: tizen_bcmrpi3: revert BLK_DEV_RAM_COUNT to 16 21/237121/1
Jaehoon Chung [Thu, 25 Jun 2020 07:01:33 +0000 (16:01 +0900)]
ARM64: configs: tizen_bcmrpi3: revert BLK_DEV_RAM_COUNT to 16

Revert BLK_DEV_RAM_COUNT to 16 - default value.
Becaues there is timing issue about booting fail, use default value.

Change-Id: I1bec8f42fc719522510971ad5ec25512e57ee8aa
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM: configs: tizen_bcm2709: change BLK_DEV_RAM_SIZE to 32MB 97/236797/1 accepted/tizen/unified/20200623.080553 submit/tizen/20200622.213607
Jaehoon Chung [Mon, 22 Jun 2020 07:14:37 +0000 (16:14 +0900)]
ARM: configs: tizen_bcm2709: change BLK_DEV_RAM_SIZE to 32MB

Change BLK_DEV_RAM_SIZE from 12MB to 32MB.
And also change BLK_DEV_RAM_COUNT from 16 to 2.
It doesn't need to keep /dev/ram0-16.

Change-Id: If6acb3813061827a260e5b6414a34e06cfc0965b
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoARM64: configs: tizen_bcmrpi3: change BLK_DEV_RAM_SIZE to 32MB 96/236796/1
Jaehoon Chung [Mon, 22 Jun 2020 07:13:46 +0000 (16:13 +0900)]
ARM64: configs: tizen_bcmrpi3: change BLK_DEV_RAM_SIZE to 32MB

Change BLK_DEV_RAM_SIZE from 12MB to 32MB.
And also change BLK_DEV_RAM_COUNT from 16 to 2.
It doesn't need to keep /dev/ram0-16.

Change-Id: I598dba4abc102a7ba51f5419ad6871875b73165c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agopackaging: Add build perf with unwind call-graph support 78/217478/5 accepted/tizen/unified/20200422.032151 submit/tizen/20200421.025351
Seung-Woo Kim [Fri, 17 Apr 2020 03:26:21 +0000 (12:26 +0900)]
packaging: Add build perf with unwind call-graph support

To support perf unwind call-graph, add BuildRequires for unwind,
dw, elfutils and other related devel packages. Also add definition
to remove not necessary perl dependency

Change-Id: I8e94ec4642026841255bbec08ae3dea2a8f5b531
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoperf version: Fix segfault due to missing OPT_END() 36/231236/2
Ravi Bangoria [Tue, 11 Jun 2019 03:01:09 +0000 (08:31 +0530)]
perf version: Fix segfault due to missing OPT_END()

'perf version' on powerpc segfaults when used with non-supported
option:
  # perf version -a
  Segmentation fault (core dumped)

Fix this.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Tested-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20190611030109.20228-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[sw0312.kim: cherry-pick mainline commit 916c31fff946 to fix possible seg.fault in Tizen armv7l]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If19720350e2992d1f5e58711f1f708a4d4ec5683

4 years agobrcmfmac: support firmware reporting 160 MHz channels 99/228999/1
Rafał Miłecki [Mon, 11 Feb 2019 22:04:54 +0000 (23:04 +0100)]
brcmfmac: support firmware reporting 160 MHz channels

So far 160 MHz channels were treated as 20 MHz ones which was breaking
support for 40/80 MHz due to the brcmf_construct_chaninfo() logic and
its assumptions.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
[sw0312.kim: backport mainline commit 30519cbe339a to show more 5G channels properly]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I62ca12dfd97d0cd3233840d5b569e768dc4a1672

4 years agorpi3: config_64bit: boot from u-boot instead of spl 02/227802/1 accepted/tizen/unified/20200320.074825 submit/tizen/20200317.014342 submit/tizen/20200319.052222 submit/tizen/20200320.002931
Seung-Woo Kim [Mon, 16 Mar 2020 10:09:40 +0000 (19:09 +0900)]
rpi3: config_64bit: boot from u-boot instead of spl

Now, Tizen does not support OPTEE by default, so u-boot-spl is not
required. Boot from u-boot instead of u-boot-spl.

Change-Id: Iadaee5290ede214b4f85487eea8e9151f9ea98f9
Ref: https://bugs.tizen.org/browse/TRE-2318
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Disable OPTEE 01/227801/1
Seung-Woo Kim [Mon, 16 Mar 2020 10:08:19 +0000 (19:08 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Disable OPTEE

Now, Tizen does not support OPTEE by default. Disable OPTEE config
options.

Change-Id: I424d38f42ad0e3199bd84517fb477dc212785be8
Ref: https://bugs.tizen.org/browse/TRE-2318
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: dts: bcm2710-rpi-3: Change build macro for optee 00/227800/1
Seung-Woo Kim [Mon, 16 Mar 2020 10:06:53 +0000 (19:06 +0900)]
ARM: dts: bcm2710-rpi-3: Change build macro for optee

Now, Tizen does not support optee by default. Change build macro
for optee related nodes in default case.

Change-Id: Ib925414ba6fd96099ca984cc8b665263812b9538
Ref: https://bugs.tizen.org/browse/TRE-2318
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Disable RAID6_PQ_BENCHMARK 01/222801/2 accepted/tizen/unified/20200121.121402 submit/tizen/20200121.011335
Junghoon Kim [Mon, 20 Jan 2020 06:28:38 +0000 (15:28 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Disable RAID6_PQ_BENCHMARK

Skip the algorithm benchmarking process of RAID6 for the fast kernel
startup. The option is not crucial for the rpi boards.

Change-Id: I9c959bcf2bbb178e72bc4315a0734d8059ebd46b
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoARM: tizen_bcm2709_defconfig: Disable RAID6_PQ_BENCHMARK 00/222800/2
Junghoon Kim [Mon, 20 Jan 2020 06:24:43 +0000 (15:24 +0900)]
ARM: tizen_bcm2709_defconfig: Disable RAID6_PQ_BENCHMARK

Skip the algorithm benchmarking process of RAID6 for the fast kernel
startup. The option is not crucial for the rpi boards.

Change-Id: If0a4748febb2fad3349b4327624943bdf42454d4
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agolib/raid6: add option to skip algo benchmarking 99/222799/2
Daniel Verkamp [Mon, 12 Nov 2018 23:26:52 +0000 (15:26 -0800)]
lib/raid6: add option to skip algo benchmarking

This is helpful for systems where fast startup time is important.
It is especially nice to avoid benchmarking RAID functions that are
never used (for example, BTRFS selects RAID6_PQ even if the parity RAID
mode is not in use).

This saves 250+ milliseconds of boot time on modern x86 and ARM systems
with a dozen or more available implementations.

The new option is defaulted to 'y' to match the previous behavior of
always benchmarking on init.

Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Signed-off-by: Shaohua Li <shli@fb.com>
[jhoon20.kim: backport from mainline for the fast kernel startup]

Change-Id: I38c270c413d60de65f27cf9c95d44bb2e2d07ac2
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoARM: configs: tizen_bcm2709_defconfig: Enable missing NETFILTER options for nether 12/221612/1 accepted/tizen/unified/20200108.131400 submit/tizen/20200108.013416
Seung-Woo Kim [Mon, 6 Jan 2020 07:57:23 +0000 (16:57 +0900)]
ARM: configs: tizen_bcm2709_defconfig: Enable missing NETFILTER options for nether

To properly support nether rules, netfilter options are required
including udplite, raw, mangle and others. Enable the missing
NETFILTER options for nether.

Ref: nether rule in https://git.tizen.org/cgit/platform/core/security/nether/tree/conf/nether.rules?h=tizen

Change-Id: I7cb0b1f669e412540085a05fcbb95d5fc7afaffc
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable missing NETFILTER options for nether 11/221611/1
Seung-Woo Kim [Mon, 6 Jan 2020 07:54:58 +0000 (16:54 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable missing NETFILTER options for nether

To properly support nether rules, netfilter options are required
including udplite, raw, mangle and others. Enable the missing
NETFILTER options for nether.

Ref: nether rule in https://git.tizen.org/cgit/platform/core/security/nether/tree/conf/nether.rules?h=tizen

Change-Id: I9017da2dc9bc74a83488f8b74e843d2ff23395a2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: configs: tizen_bcm2709_defconfig: Enable USB SERIAL drivers for modem 76/221576/2
Seung-Woo Kim [Mon, 6 Jan 2020 01:30:22 +0000 (10:30 +0900)]
ARM: configs: tizen_bcm2709_defconfig: Enable USB SERIAL drivers for modem

To support usb modem dongle and related devices, enable USB SERIAL
drivers and ppp network interface to support the modem.

Change-Id: I0f496f38e20f6816653dad354efde1519a54670c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable USB SERIAL drivers for modem 75/221575/2
Seung-Woo Kim [Mon, 6 Jan 2020 01:29:08 +0000 (10:29 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable USB SERIAL drivers for modem

To support usb modem dongle and related devices, enable USB SERIAL
drivers and ppp network interface to support the modem.

Change-Id: I3caf00b94edc0ad98ae95687bfc8d0b845413cfb
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoarm64: Don't unconditionally add -Wno-psabi to KBUILD_CFLAGS 95/221395/1 accepted/tizen/unified/20200102.220851 submit/tizen/20200102.014302
Nathan Chancellor [Tue, 11 Jun 2019 17:19:32 +0000 (10:19 -0700)]
arm64: Don't unconditionally add -Wno-psabi to KBUILD_CFLAGS

commit fa63da2ab046b885a7f70291aafc4e8ce015429b upstream.

This is a GCC only option, which warns about ABI changes within GCC, so
unconditionally adding it breaks Clang with tons of:

warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option]

and link time failures:

ld.lld: error: undefined symbol: __efistub___stack_chk_guard
>>> referenced by arm-stub.c:73
(/home/nathan/cbl/linux/drivers/firmware/efi/libstub/arm-stub.c:73)
>>>               arm-stub.stub.o:(__efistub_install_memreserve_table)
in archive ./drivers/firmware/efi/libstub/lib.a

These failures come from the lack of -fno-stack-protector, which is
added via cc-option in drivers/firmware/efi/libstub/Makefile. When an
unknown flag is added to KBUILD_CFLAGS, clang will noisily warn that it
is ignoring the option like above, unlike gcc, who will just error.

$ echo "int main() { return 0; }" > tmp.c

$ clang -Wno-psabi tmp.c; echo $?
warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option]
1 warning generated.
0

$ gcc -Wsometimes-uninitialized tmp.c; echo $?
gcc: error: unrecognized command line option
‘-Wsometimes-uninitialized’; did you mean ‘-Wmaybe-uninitialized’?
1

For cc-option to work properly with clang and behave like gcc, -Werror
is needed, which was done in commit c3f0d0bc5b01 ("kbuild, LLVMLinux:
Add -Werror to cc-option to support clang").

$ clang -Werror -Wno-psabi tmp.c; echo $?
error: unknown warning option '-Wno-psabi'
[-Werror,-Wunknown-warning-option]
1

As a consequence of this, when an unknown flag is unconditionally added
to KBUILD_CFLAGS, it will cause cc-option to always fail and those flags
will never get added:

$ clang -Werror -Wno-psabi -fno-stack-protector tmp.c; echo $?
error: unknown warning option '-Wno-psabi'
[-Werror,-Wunknown-warning-option]
1

This can be seen when compiling the whole kernel as some warnings that
are normally disabled (see below) show up. The full list of flags
missing from drivers/firmware/efi/libstub are the following (gathered
from diffing .arm64-stub.o.cmd):

-fno-delete-null-pointer-checks
-Wno-address-of-packed-member
-Wframe-larger-than=2048
-Wno-unused-const-variable
-fno-strict-overflow
-fno-merge-all-constants
-fno-stack-check
-Werror=date-time
-Werror=incompatible-pointer-types
-ffreestanding
-fno-stack-protector

Use cc-disable-warning so that it gets disabled for GCC and does nothing
for Clang.

Fixes: ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI drift")
Link: https://github.com/ClangBuiltLinux/linux/issues/511
Reported-by: Qian Cai <cai@lca.pw>
Acked-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick from stable linux-4.19.y commit 85a3b1ef969b for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I264a7663478de10d196d8550349098552fe02544

4 years agoarm64: Silence gcc warnings about arch ABI drift 94/221394/1
Dave Martin [Thu, 6 Jun 2019 10:33:43 +0000 (11:33 +0100)]
arm64: Silence gcc warnings about arch ABI drift

[ Upstream commit ebcc5928c5d925b1c8d968d9c89cdb0d0186db17 ]

Since GCC 9, the compiler warns about evolution of the
platform-specific ABI, in particular relating for the marshaling of
certain structures involving bitfields.

The kernel is a standalone binary, and of course nobody would be
so stupid as to expose structs containing bitfields as function
arguments in ABI.  (Passing a pointer to such a struct, however
inadvisable, should be unaffected by this change.  perf and various
drivers rely on that.)

So these warnings do more harm than good: turn them off.

We may miss warnings about future ABI drift, but that's too bad.
Future ABI breaks of this class will have to be debugged and fixed
the traditional way unless the compiler evolves finer-grained
diagnostics.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[sw0312.kim: cherry-pick from stable linux-4.19.y commit 71d019a6dae9 for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I6a6ca56261860468207555d869f5a90882565c4b

4 years agotracing: Silence GCC 9 array bounds warning 93/221393/1
Miguel Ojeda [Thu, 23 May 2019 12:45:35 +0000 (14:45 +0200)]
tracing: Silence GCC 9 array bounds warning

commit 0c97bf863efce63d6ab7971dad811601e6171d2f upstream.

Starting with GCC 9, -Warray-bounds detects cases when memset is called
starting on a member of a struct but the size to be cleared ends up
writing over further members.

Such a call happens in the trace code to clear, at once, all members
after and including `seq` on struct trace_iterator:

    In function 'memset',
        inlined from 'ftrace_dump' at kernel/trace/trace.c:8914:3:
    ./include/linux/string.h:344:9: warning: '__builtin_memset' offset
    [8505, 8560] from the object at 'iter' is out of the bounds of
    referenced subobject 'seq' with type 'struct trace_seq' at offset
    4368 [-Warray-bounds]
      344 |  return __builtin_memset(p, c, size);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

In order to avoid GCC complaining about it, we compute the address
ourselves by adding the offsetof distance instead of referring
directly to the member.

Since there are two places doing this clear (trace.c and trace_kdb.c),
take the chance to move the workaround into a single place in
the internal header.

Link: http://lkml.kernel.org/r/20190523124535.GA12931@gmail.com
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
[ Removed unnecessary parenthesis around "iter" ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick stable linux-4.19.y commit c493ead38adb for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I660c183206836972e5e39ff54ccfdd23517b5295

4 years agogcc-9: don't warn about uninitialized variable 92/221392/1
Linus Torvalds [Wed, 1 May 2019 18:07:40 +0000 (11:07 -0700)]
gcc-9: don't warn about uninitialized variable

commit cf676908846a06443fa5e6724ca3f5dd7460eca1 upstream.

I'm not sure what made gcc warn about this code now.  The 'ret' variable
does end up initialized in all cases, but it's definitely not obvious,
so the compiler is quite reasonable to warn about this.

So just add initialization to make it all much more obvious both to
compilers and to humans.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick from stable linux-4.19.y commit a152a7b411a5 for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I9ffd18114904d32ebb631680c7ac40d9771771c2

4 years agogcc-9: silence 'address-of-packed-member' warning 91/221391/1
Linus Torvalds [Wed, 1 May 2019 18:05:41 +0000 (11:05 -0700)]
gcc-9: silence 'address-of-packed-member' warning

commit 6f303d60534c46aa1a239f29c321f95c83dda748 upstream.

We already did this for clang, but now gcc has that warning too.  Yes,
yes, the address may be unaligned.  And that's kind of the point.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick from stable linux-4.19.y commit 76343a1363f8 for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ia29a74ee9de68e0518c46e7cc0affad1f07d5f10

4 years agotools include uapi: Update linux/mmap.h copy 90/221390/1
Arnaldo Carvalho de Melo [Tue, 30 Oct 2018 19:50:08 +0000 (16:50 -0300)]
tools include uapi: Update linux/mmap.h copy

To pick up the changes from:

  20916d4636a9 ("mm/hugetlb: add mmap() encodings for 32MB and 512MB page sizes")

That do not entail changes in in tools, this just shows that we have to
consider bits [26:31] of flags to beautify that in tools like 'perf
trace'

This silences this perf build warning:

  Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h'
  diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h

Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-3rvc39lon93kgt5pl31d8g4x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[sw0312.kim: cherry-pick mainline commit 685626dc26bd for perf build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ifcded1bb028928b2d32c3c315c7bfa8cfd0a9d58

4 years agotools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy' 89/221389/1
Arnaldo Carvalho de Melo [Mon, 13 May 2019 17:23:42 +0000 (13:23 -0400)]
tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'

To bring in the change made in this cset:

  b69656fa7ea2 ("x86/uaccess: Fix up the fixup")

Silencing this perf build warning:

  Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
  diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S

No changes in the tooling using this, that was just to ease some objtool
return checking.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/n/tip-j0mxgqkuibhw5qid9saaspdu@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[sw0312.kim: cherry-pick mainline commit a021b5400111 for perf build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Icc22d689c8a1beacb4caa574c0a71bbd1b20f951

4 years agotools arch uapi: Sync the x86 kvm.h copy 88/221388/1
Arnaldo Carvalho de Melo [Mon, 13 May 2019 17:27:12 +0000 (13:27 -0400)]
tools arch uapi: Sync the x86 kvm.h copy

To get the changes in:

  59073aaf6de0 ("kvm: x86: Add exception payload fields to kvm_vcpu_events")

This silences the following perf build warning:

  Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
  diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h

The changes in this file are in something not used at this time in any
tools/perf/ tool.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jim Mattson <jmattson@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lkml.kernel.org/n/tip-6uh8tpraons0h22dmxgfyony@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[sw0312.kim: cherry-pick mainline commit f98f10f35257 for perf build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If00ae735efa27c7bad8a1f2cd5893b919cfc809d

4 years agotools arch x86: Sync asm/cpufeatures.h with the with the kernel 87/221387/1
Arnaldo Carvalho de Melo [Tue, 21 May 2019 19:39:42 +0000 (16:39 -0300)]
tools arch x86: Sync asm/cpufeatures.h with the with the kernel

To pick up the changes in:

  ed5194c2732c ("x86/speculation/mds: Add basic bug infrastructure for MDS")
  e261f209c366 ("x86/speculation/mds: Add BUG_MSBDS_ONLY")

That don't affect anything in tools/.

This silences this perf build warning:

  Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
  diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/n/tip-jp1afecx3ql1jkuirpgkqfad@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[sw0312.kim: cherry-pick mainline commit b979540a7522 for perf build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I879810548387101141f808c1c972f691c906c3e1

4 years agotools arch x86: Sync asm/cpufeatures.h with the kernel sources 86/221386/1
Arnaldo Carvalho de Melo [Mon, 25 Mar 2019 17:25:33 +0000 (14:25 -0300)]
tools arch x86: Sync asm/cpufeatures.h with the kernel sources

To get the changes from:

  52f64909409c ("x86: Add TSX Force Abort CPUID/MSR")

That don't cause any changes in the generated perf binaries.

And silence this perf build warning:

  Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
  diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/n/tip-zv8kw8vnb1zppflncpwfsv2w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[sw0312.kim: cherry-pick mainline commit 949af89af02c for perf build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I2c20b8306175133ee6445c69fb68575f2c4eba9e

4 years agoperf help: Remove needless use of strncpy() 59/220759/1
Arnaldo Carvalho de Melo [Thu, 6 Dec 2018 14:20:21 +0000 (11:20 -0300)]
perf help: Remove needless use of strncpy()

commit b6313899f4ed2e76b8375cf8069556f5b94fbff0 upstream.

Since we make sure the destination buffer has at least strlen(orig) + 1,
no need to do a strncpy(dest, orig, strlen(orig)), just use strcpy(dest,
orig).

This silences this gcc 8.2 warning on Alpine Linux:

  In function 'add_man_viewer',
      inlined from 'perf_help_config' at builtin-help.c:284:3:
  builtin-help.c:192:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    strncpy((*p)->name, name, len);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  builtin-help.c: In function 'perf_help_config':
  builtin-help.c:187:15: note: length computed here
    size_t len = strlen(name);
                 ^~~~~~~~~~~~

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: 078006012401 ("perf_counter tools: add in basic glue from Git")
Link: https://lkml.kernel.org/n/tip-2f69l7drca427ob4km8i7kvo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick stable linux-4.19.y commit 0bf5d53b53c8 for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id98e9ca8049d25d658b4f012fdede1b8745d875f

4 years agoperf header: Fix unchecked usage of strncpy() 58/220758/1
Arnaldo Carvalho de Melo [Thu, 6 Dec 2018 14:09:46 +0000 (11:09 -0300)]
perf header: Fix unchecked usage of strncpy()

commit 5192bde7d98c99f2cd80225649e3c2e7493722f7 upstream.

The strncpy() function may leave the destination string buffer
unterminated, better use strlcpy() that we have a __weak fallback
implementation for systems without it.

This fixes this warning on an Alpine Linux Edge system with gcc 8.2:

  util/header.c: In function 'perf_event__synthesize_event_update_name':
  util/header.c:3625:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
    strncpy(ev->data, evsel->name, len);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  util/header.c:3618:15: note: length computed here
    size_t len = strlen(evsel->name);
                 ^~~~~~~~~~~~~~~~~~~

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: a6e5281780d1 ("perf tools: Add event_update event unit type")
Link: https://lkml.kernel.org/n/tip-wycz66iy8dl2z3yifgqf894p@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick stable linux-4.19.y commit 6461a4543b34 for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I2d116858af62b094276699c790b7ba090fe28513

4 years agoARM: configs: tizen_bcm2709_defconfig: Enable tethering config options 47/220647/2 accepted/tizen/unified/20191223.060218 submit/tizen/20191223.042319
Seung-Woo Kim [Fri, 20 Dec 2019 06:30:13 +0000 (15:30 +0900)]
ARM: configs: tizen_bcm2709_defconfig: Enable tethering config options

In Tizen 6.0, network framework supports tethering from ethernet
to wifi. Enable required config options for tethering.

Ref: section 6-3 of https://git.tizen.org/cgit/platform/kernel/tizen-kernel-configs/tree/tizen/tizen_defconfig?h=tizen

Change-Id: I162d6eb89ce8d25d85659c7a2e632dbfe0909dc6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Enable tethering config options 46/220646/2
Seung-Woo Kim [Fri, 20 Dec 2019 06:35:37 +0000 (15:35 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable tethering config options

In Tizen 6.0, network framework supports tethering from ethernet
to wifi. Enable required config options for tethering.

Ref: section 6-3 of https://git.tizen.org/cgit/platform/kernel/tizen-kernel-configs/tree/tizen/tizen_defconfig?h=tizen

Change-Id: I5df076b13a3c02257f34e368dd99aaca2b3370b0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoscripts: mkbootimg_rpi3.sh: Create boot tarball for the lthor flashing 89/220389/2 accepted/tizen/unified/20191218.120926 submit/tizen/20191218.054411
Junghoon Kim [Wed, 18 Dec 2019 01:53:42 +0000 (10:53 +0900)]
scripts: mkbootimg_rpi3.sh: Create boot tarball for the lthor flashing

This patch is to create boot tarball for the lthor flashing. With this,
we can easily test the rpi3 kernel in the local environment.

Change-Id: Ib7bca6f7fa2c5a51be097042eda80c2d9297d4ac
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoARM64: tizen_bcmrpi3_defconfig: Enable btrfs filesystem 88/220388/1
Junghoon Kim [Wed, 18 Dec 2019 01:43:55 +0000 (10:43 +0900)]
ARM64: tizen_bcmrpi3_defconfig: Enable btrfs filesystem

Enable btrfs filesystem to use it as the rootfs mount for the
RPI4 64-bit architecture.

Change-Id: Ieb13f6970dbfd8c947c501cfad1c7eb9ee4d2799
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agoARM: tizen_bcm2709_defconfig: Enable btrfs filesystem 87/220387/1
Junghoon Kim [Wed, 18 Dec 2019 01:26:43 +0000 (10:26 +0900)]
ARM: tizen_bcm2709_defconfig: Enable btrfs filesystem

Enable btrfs filesystem to use it as the rootfs mount for the
RPI3 32-bit architecture.

Change-Id: I697e2fc9cbf4c8f69a94afed0e2244c3b8accad7
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
4 years agodrm/vc4: fix wrong filp usage in gem_info debugfs node 02/219502/1 accepted/tizen/unified/20191206.053944 submit/tizen/20191206.014708
Seung-Woo Kim [Thu, 5 Dec 2019 07:52:29 +0000 (16:52 +0900)]
drm/vc4: fix wrong filp usage in gem_info debugfs node

After the mainline commit 65101d8c9108 ("drm/vc4: Expose
performance counters to userspace") applied in v4.17, vc4 drm
has its own filp. So gem_info filp usage is not proper. Fix the
wrong filp usage in gem_info debugfs node.

Change-Id: I526a888f345378d66f96e9d6cd3d19527e56ddaa
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: configs: tizen_bcm2709_defconfig: Enable HID_MULTITOUCH 98/218198/1 accepted/tizen/unified/20191122.053238 submit/tizen/20191122.013016
Seung-Woo Kim [Wed, 20 Nov 2019 08:12:09 +0000 (17:12 +0900)]
ARM: configs: tizen_bcm2709_defconfig: Enable HID_MULTITOUCH

To support usb multi-touch device, enable CONFIG_HID_MULTITOUCH.

Change-Id: I2423291698367912d379787e94dc75659f414a31
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable HID_MULTITOUCH 97/218197/1
Seung-Woo Kim [Wed, 20 Nov 2019 08:10:48 +0000 (17:10 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable HID_MULTITOUCH

To support usb multi-touch device, enable CONFIG_HID_MULTITOUCH.

Change-Id: I36f625f08b980e7a5ed8cea9e061ba0d4d56d39b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agopackaging: replace -fPIC to -fPIE for perf executable 57/216757/1 accepted/tizen/unified/20191104.010844 submit/tizen/20191101.065513
Seung-Woo Kim [Fri, 1 Nov 2019 01:17:15 +0000 (10:17 +0900)]
packaging: replace -fPIC to -fPIE for perf executable

Build issue for perf is from linking perf executable, so pie flag
is suitabler than pic flag. Replace -fPIC to -fPIE for perf
executable and add the flag to missed perf install part.

Change-Id: I0911dc2b3ffc54724927846f5e081da9d7335c39
Suggested-by: Dongkyun Son <dongkyun.s@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agopackaging: Add -fPIC flag to perf build cflags 27/216727/1 submit/tizen/20191031.023155
Seung-Woo Kim [Thu, 31 Oct 2019 03:42:36 +0000 (12:42 +0900)]
packaging: Add -fPIC flag to perf build cflags

Current Tizen build environment requires -fPIC with relocation
and without the flag, there is build error for perf like below:

  armv7l
    armv7l-tizen-linux-gnueabi/bin/ld: perf-in.o: relocation R_ARM_MOVW_ABS_NC against `__stack_chk_guard' can not be used when making a shared object; recompile with -fPIC

  aarch64
    aarch64-tizen-linux-gnu/bin/ld: perf-in.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `__stack_chk_guard@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC
    aarch64-tizen-linux-gnu/bin/ld: perf-in.o(.text+0x4): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard@@GLIBC_2.17'

Add -fPIC flag to perf build.

Change-Id: Icca04801698c88180dfde493a3ef92e5c01612b5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: configs: tizen_bcm2709_defconfig: Enable EXTCON for hdmi 76/215576/2 submit/tizen/20191031.012258
Seung-Woo Kim [Fri, 11 Oct 2019 04:47:47 +0000 (13:47 +0900)]
ARM: configs: tizen_bcm2709_defconfig: Enable EXTCON for hdmi

Enable CONFIG_EXTCON for hdmi connection uevent.

Change-Id: I62cc93151019209661600af2a63f087d25112490
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable EXTCON for hdmi 75/215575/2
Seung-Woo Kim [Fri, 11 Oct 2019 04:46:34 +0000 (13:46 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable EXTCON for hdmi

Enable CONFIG_EXTCON for hdmi connection uevent.

Change-Id: I912b8dddf6e2fbc13075ad6f83fbd06ea55f6d90
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agodrm/vc4: add extcon hdmi connection uevent 74/215574/2
Seung-Woo Kim [Fri, 11 Oct 2019 04:43:33 +0000 (13:43 +0900)]
drm/vc4: add extcon hdmi connection uevent

Add extcon hdmi connection and disconnection ueven when extcon
module is enabled.

The vc4 hdmi detection is done by polling way, so extcon uevent
for connection is a bit slow after changing real hdmi cable state.

Change-Id: I962f7a39b7a3344f9793e436ef28c36b123571a8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoscripts: mkbootimg_rpi3.sh: Fix to install modules on non sudo status 94/214494/1
Seung-Woo Kim [Mon, 23 Sep 2019 09:00:11 +0000 (18:00 +0900)]
scripts: mkbootimg_rpi3.sh: Fix to install modules on non sudo status

On sudo status, env variable is possible not to be preserved and
it causes failure on modules_install. So fix to install modules on
non sudo status and then move the directories and files to image
area.

Change-Id: Ie1e0ff695caf79b1ce3d25be8a70151a30fbfee0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agobuild: script: combine rpi3 32bit and 64bit scripts 68/213968/1
Jaehoon Chung [Tue, 17 Sep 2019 05:10:17 +0000 (14:10 +0900)]
build: script: combine rpi3 32bit and 64bit scripts

Combine rpi3 32bit and 64bit scripts.
e.g) build-rpi3.sh arm / arm64

Change-Id: I224b7944362245685e4557f2fe41837c3a685ad8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agopackaging: add perf package for perf tool and traceevent plugins 87/213387/1
Seung-Woo Kim [Thu, 5 Sep 2019 00:14:46 +0000 (09:14 +0900)]
packaging: add perf package for perf tool and traceevent plugins

Add perf package for perf tool and its traceevent plugins.

Note: they are built from below directories.
- perf: tools/perf
- traceevent plugins: tools/lib/traceevent

Change-Id: I418c52ec7dffb6b98e72e402af5bf67c3d837ba7
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: configs: tizen_bcm2709_defconfig: Enable NETFILTER_XT_MATCH_LIMIT 34/212934/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv accepted/tizen/5.5/unified/20191031.004342 accepted/tizen/5.5/unified/mobile/hotfix/20201027.062007 accepted/tizen/unified/20190902.055156 submit/tizen/20190829.050836 submit/tizen/20190902.001331 submit/tizen_5.5/20191031.000010 submit/tizen_5.5_mobile_hotfix/20201026.185106 tizen_5.5.m2_release
Seung-Woo Kim [Wed, 28 Aug 2019 08:13:22 +0000 (17:13 +0900)]
ARM: configs: tizen_bcm2709_defconfig: Enable NETFILTER_XT_MATCH_LIMIT

From Tizen network security, NETFILTER_XT_MATCH_LIMIT is used for
ipv6. So enable NETFILTER_XT_MATCH_LIMIT config option.

Change-Id: Ife75ee0a766c64fb38a0e261f41a45678ab49bd4
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable NETFILTER_XT_MATCH_LIMIT 33/212933/1
Seung-Woo Kim [Wed, 28 Aug 2019 08:11:56 +0000 (17:11 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable NETFILTER_XT_MATCH_LIMIT

From Tizen network security, NETFILTER_XT_MATCH_LIMIT is used for
ipv6. So enable NETFILTER_XT_MATCH_LIMIT config option.

Change-Id: Ieeba2c67481e299fb3d91ee4378f8b2a2baffc7b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: configs: tizen_bcm2709_defconfig: Enable NETFILTER_XT_MATCH_OWNER config 36/211236/1 accepted/tizen/unified/20190802.111347 submit/tizen/20190801.074211
Seung-Woo Kim [Wed, 31 Jul 2019 08:01:06 +0000 (17:01 +0900)]
ARM: configs: tizen_bcm2709_defconfig: Enable NETFILTER_XT_MATCH_OWNER config

Enable the NETFILTER_XT_MATCH_OWNER config option to use xt_owner
supplementary groups.

Change-Id: I10a8277e2c42cae8cd02eb892e2dac5124681a71
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable NETFILTER_XT_MATCH_OWNER config 35/211235/1
Seung-Woo Kim [Wed, 31 Jul 2019 08:00:32 +0000 (17:00 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable NETFILTER_XT_MATCH_OWNER config

Enable the NETFILTER_XT_MATCH_OWNER config option to use xt_owner
supplementary groups.

Change-Id: I1baf6d78dc7c28d7235bb1cce9b6132b2fba7148
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoARM: dts: bcm2710-rpi-3-b-plus: remove duplicated uart0_ctsrts_gpio30 node 40/210840/1
Seung-Woo Kim [Thu, 25 Jul 2019 07:34:59 +0000 (16:34 +0900)]
ARM: dts: bcm2710-rpi-3-b-plus: remove duplicated uart0_ctsrts_gpio30 node

The commit ad3b011329c8 ("ARM: dts: bcm2710-rpi-3-b-plus: Add cts
pin setting for bluetooth uart") introduced duplicated dt node,
uart0_ctsrts_gpio30, because it is already defined in bcm283x.dtsi.
Remove the duplicated dt node.

Change-Id: Ic9a39b88662198f30b585f48f2f0e896b62ab8f3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoRevert "Bluetooth : Set the optimized operation speed for BCM Uart" 05/210805/1
DoHyun Pyun [Thu, 25 Jul 2019 03:45:21 +0000 (12:45 +0900)]
Revert "Bluetooth : Set the optimized operation speed for BCM Uart"

This reverts commit 5cc55680fc9fe5bfd7590905c56e55dfa4aefbd5.

The proper operation speed of the RPI3 Uart is different for
each HW revision. So we will set the value in the user space's
firmware downloading tool after checking the HW version.

Change-Id: I95d80f3598015a27fbdc1375b3d6c089be67b8d0
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoARM: dts: bcm2710-rpi-3-b-plus: Add cts pin setting for bluetooth uart 44/210644/1 accepted/tizen/unified/20190725.042923 submit/tizen/20190724.095831
Seung-Woo Kim [Tue, 23 Jul 2019 09:31:05 +0000 (18:31 +0900)]
ARM: dts: bcm2710-rpi-3-b-plus: Add cts pin setting for bluetooth uart

There is missing cts pin for uart0 used by bluetooth. Add the cts
pin setting as like bcm2837-rpi-3-b-plus.

Change-Id: Iefdf80ec0d523b85f7a6e579e1544a67b9139212
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agotty: amba-pl011: Make TX optimisation conditional 98/210598/1
Phil Elwell [Thu, 11 Jul 2019 12:13:39 +0000 (13:13 +0100)]
tty: amba-pl011: Make TX optimisation conditional

pl011_tx_chars takes a "from_irq" parameter to reduce the number of
register accesses. When from_irq is true the function assumes that the
FIFO is half empty and writes up to half a FIFO's worth of bytes
without polling the FIFO status register, the reasoning being that
the function is being called as a result of the TX interrupt being
raised. This logic would work were it not for the fact that
pl011_rx_chars, called from pl011_int before pl011_tx_chars, releases
the spinlock before calling tty_flip_buffer_push.

A user thread writing to the UART claims the spinlock and ultimately
calls pl011_tx_chars with from_irq set to false. This reverts to the
older logic that polls the FIFO status register before sending every
byte. If this happen on an SMP system during the section of the IRQ
handler where the spinlock has been released, then by the time the TX
interrupt handler is called, the FIFO may already be full, and any
further writes are likely to be lost.

The fix involves adding a per-port flag that is true iff running from
within the interrupt handler and the spinlock has not yet been released.
This flag is then used as the value for the from_irq parameter of
pl011_tx_chars, causing polling to be used in the unsafe case.

Fixes: 1e84d22322ce ("serial/amba-pl011: Refactor and simplify TX FIFO handling")

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
[sw0312.kim: cherry-pick from rpi-4.19.y to reduce bt reassembly issue]
Reference: https://github.com/raspberrypi/firmware/issues/1150
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ia56b9fffb8805ca02d04ed9c9b810988e1b56642

4 years agopackaging: Add _wrong_version_format_terminate_build macro 93/210593/1
Seung-Woo Kim [Tue, 23 Jul 2019 01:28:13 +0000 (10:28 +0900)]
packaging: Add _wrong_version_format_terminate_build macro

Newer version of rpmbuild rejects double dash, "-", in version.
To support the style, add _worng_version_format_terminate_build
as 0.

Change-Id: Ieed243fb4ad7059b83d5328f0c38b15e4c74dc0e
Reference: https://github.com/rpm-software-management/rpm/commit/5e94633660d0e2b97
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agopackaging: remove macro in package Name 27/210527/1 accepted/tizen/unified/20190723.053546 submit/tizen/20190722.101515
Seung-Woo Kim [Mon, 22 Jul 2019 06:00:12 +0000 (15:00 +0900)]
packaging: remove macro in package Name

Some build system cannot recognize macro in package Name. Remove
the macro by replacing with same string.

Change-Id: I34c853be82476db3b32d49aadc77809a2f493436
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoBluetooth : Set the optimized operation speed for BCM Uart 48/210248/2 accepted/tizen/unified/20190717.220500 submit/tizen/20190717.094806
DoHyun Pyun [Wed, 17 Jul 2019 07:08:46 +0000 (16:08 +0900)]
Bluetooth : Set the optimized operation speed for BCM Uart

When ACL data packet transfers via Uart on the RPI3 board,
the packet loss or overflow issue is occured. After adjusting
the operation speed value, we can reduce these problems.

Change-Id: Id072102e173e0338c4ae3cb7a1a541fbf7f8066e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
4 years agoBluetooth: fix wrong indent in __hci_req_update_{scan/adv}_rsp_data() 07/210207/1
Seung-Woo Kim [Wed, 17 Jul 2019 01:56:16 +0000 (10:56 +0900)]
Bluetooth: fix wrong indent in __hci_req_update_{scan/adv}_rsp_data()

The commit ac160e08af69 ("Bluetooth: Add Advertising Packet
Configuration") introduces wrong indent which causes build warning for
gcc-7. Fix the wrong indent.

Change-Id: Ia0bde8a8f9660ccf8fa312e3c3ec6c8cb76863f1
Fixes: ac160e08af69 ("Bluetooth: Add Advertising Packet Configuration")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoARM64: configs: tizen_bcmrpi3_defconfig: Enable BCM Uart protocol 75/209875/1 accepted/tizen/unified/20190714.220712 submit/tizen/20190712.062853
Seung-Woo Kim [Fri, 12 Jul 2019 05:13:37 +0000 (14:13 +0900)]
ARM64: configs: tizen_bcmrpi3_defconfig: Enable BCM Uart protocol

RPI3 target uses the BCM BT chip of the Uart type. To avoid the
reassembly failed problem, we should enable BCM Uart protocol
and need to use it. It is enabled with CONFIG_SERIAL_DEV_BUS.

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