platform/kernel/linux-rpi3.git
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>
4 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>
4 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>
5 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>
5 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>
5 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>
5 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

5 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>
5 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>
5 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>
5 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>
5 years agoARM: configs: tizen_bcm2709_defconfig: Enable BCM Uart protocol 74/209874/2
DoHyun Pyun [Fri, 12 Jul 2019 04:45:10 +0000 (13:45 +0900)]
ARM: configs: tizen_bcm2709_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: I3cf97b032e1ce92898f2329fae3691d4d5870726
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
[sw0312.kim: adjust defconfig with savedefconfig and update commit-msg]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoARM: dts: bcm27xx: Fix to of_graph from bridge node for touchscreen 87/209287/4 accepted/tizen/unified/20190708.114147 submit/tizen/20190708.061153
Hoegeun Kwon [Thu, 4 Jul 2019 08:42:52 +0000 (17:42 +0900)]
ARM: dts: bcm27xx: Fix to of_graph from bridge node for touchscreen

Beginning with kernel v4.15, the i2c management of the touchscreen
panel driver has been changed to use of_graph from brdge node. So
change to of_graph and remove the unnecessary nodes.

Change-Id: I6ef786ed472ef2b350eb8683568d0ecb407182c0
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 years agodrm/vc4: Fix change to find_panel in the dsi_attach func 86/209286/4
Hoegeun Kwon [Thu, 4 Jul 2019 08:40:58 +0000 (17:40 +0900)]
drm/vc4: Fix change to find_panel in the dsi_attach func

There is a problem that crtc does not bind while continuously
requesting EPROBE_DEFER, if dsi_bind does not successfully bind.
We need to change the part of find_panel in bind to dsi_attach
function.

Change-Id: Ifce518f047f496079eb8fbe112dabbd9bc7488bb
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 years agonetfilter: xt_owner: bail out with EINVAL in case of unsupported flags 07/209207/3 accepted/tizen/unified/20190705.110629 submit/tizen/20190705.061049
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: Id867ca48290a8e6627ad7d1b1f159669fc5c44a1

5 years agonetfilter: xt_owner: Add supplementary groups option 06/209206/3
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: I7a21fc112cde77ae708b84d4b48c8aee339a7642

5 years agoARM: configs: tizen_bcm2709_defconfig: Remove unused modules 62/209162/4
Hoegeun Kwon [Wed, 3 Jul 2019 05:16:46 +0000 (14:16 +0900)]
ARM: configs: tizen_bcm2709_defconfig:  Remove unused modules

Remove unused modules from the backlight.

Change-Id: I1fd5267690efd4a7bd5137b64dfadba5111dc2dd
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 years agoBluetooth: Fix the potential crash issue 55/209255/2
DoHyun Pyun [Thu, 4 Jul 2019 00:18:21 +0000 (09:18 +0900)]
Bluetooth: Fix the potential crash issue

There is a logic error in the event function. We should
check the callback function's parameter before calling.

Change-Id: I06a4a8c50317e5ec4ae8fe35e4b788105e090196
Fixes: bde01c80dd51 ("Bluetooth: Set le data length command and event")
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agotools: Add build script for ARM kernel of rpi3 61/209161/3
Hoegeun Kwon [Wed, 3 Jul 2019 05:18:50 +0000 (14:18 +0900)]
tools: Add build script for ARM kernel of rpi3

Add build script for ARM kernel of rpi3.

Change-Id: I35a7dd2148350f775d3d96a478dac66190079d68
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 years agoRevert "ARM: dts: bcm27xx: Fix to of_graph from bridge node for panel" 13/209213/1 accepted/tizen/unified/20190704.040506 submit/tizen/20190703.103920
Hoegeun Kwon [Wed, 3 Jul 2019 10:22:11 +0000 (19:22 +0900)]
Revert "ARM: dts: bcm27xx: Fix to of_graph from bridge node for panel"

This reverts commit b2f6ad21a0bab8e59926666f717a4f6c53066a2d.

There is a problem with the hdmi and revert the patch.

Change-Id: Ia69d10c067ff69d192162b0598f43028c4a05f9b
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 years agoARM: dts: bcm27xx: Fix to of_graph from bridge node for panel 61/209061/1 accepted/tizen/unified/20190702.114802 submit/tizen/20190702.072015
Hoegeun Kwon [Tue, 2 Jul 2019 02:08:59 +0000 (11:08 +0900)]
ARM: dts: bcm27xx: Fix to of_graph from bridge node for panel

Beginning with kernel v4.15, the i2c management of the touchscreen
panel driver has been changed to use of_graph from brdge node. So
change to of_graph and remove the unnecessary nodes.

Change-Id: Ibf131aebd964360874ebe2f3792f0912f6e8988d
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 years agoBluetooth: Set le data length command and event 38/208738/2 accepted/tizen/unified/20190701.111735 submit/tizen/20190701.041905
Sudha Bheemanna [Fri, 16 Sep 2016 10:07:22 +0000 (15:37 +0530)]
Bluetooth: Set le data length command and event

Sets the data length for the le data packet with in the
advised limits. MGMT command and event are added to handle
the setting of data length.

Change-Id: Ia5c2167743cc9a29190e5631973e9d52d41caa1d
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Read host suggested default le data length 94/208694/3
Sudha Bheemanna [Fri, 16 Sep 2016 07:24:31 +0000 (12:54 +0530)]
Bluetooth: Read host suggested default le data length

This patch adds MGMT command and code for supporting reading
default le data length value set at the controller.

Change-Id: I2b81982dc26ed5af4a8f8a3d3913db5d64625260
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Write host suggested default le data length 93/208693/3
Sudha Bheemanna [Fri, 16 Sep 2016 06:39:57 +0000 (12:09 +0530)]
Bluetooth: Write host suggested default le data length

This patch adds MGMT command and code for supporting write
default le data length command to the controller.

Change-Id: I3d2c8b622b7913a3ed542342e3ba8076c30dc279
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Read LE Max data length command 92/208692/3
Sudha Bheemanna [Fri, 16 Sep 2016 05:08:30 +0000 (10:38 +0530)]
Bluetooth: Read LE Max data length command

This patch adds the MGMT command and code to support reading
the maximum data length supported command for LE.

Change-Id: I4dc0041f2070de2ccb6a4164c8823612863c941e
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Fix IPSP connection callback event issue. 89/208689/3
h.sandeep [Fri, 16 Sep 2016 09:15:24 +0000 (14:45 +0530)]
Bluetooth: Fix IPSP connection callback event issue.

This patch fixes the IPSP connection callback event issue
between kernel and bluez layer.

Change-Id: Ia4d625aa8a6dbc9da89a7d9f12308af9c90d0594
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: IPSP Connect/Disconnect apis 88/208688/3
Sudha Bheemanna [Thu, 15 Sep 2016 07:23:03 +0000 (12:53 +0530)]
Bluetooth: IPSP Connect/Disconnect apis

This patch adds MGMT code to support IPSP connect and
disconnect apis and handle connection state changed event.

Change-Id: I1c41ec4f38cf9a108e443def3bc23c1b964e2985
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Add support to enable/disable IPSP 87/208687/3
Sudha Bheemanna [Thu, 15 Sep 2016 04:42:09 +0000 (10:12 +0530)]
Bluetooth: Add support to enable/disable IPSP

This patch supports MGMT commands and code to enable or disable
IPSP 6LowPan features.

Change-Id: Ia866ecfa517c7d7e4320f17d94d80dfeb9261e59
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Fix issue in the Set LE privacy function. 86/208686/3
Sudha Bheemanna [Thu, 8 Sep 2016 10:51:01 +0000 (16:21 +0530)]
Bluetooth: Fix issue in the Set LE privacy function.

This patch fixes not to check the hdev power before setting
LE Privacy.

Change-Id: I344ea13b1d90527e3e7554ec616cdc640b85159c
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Store the key if auth type is P192 85/208685/3
Sudha Bheemanna [Mon, 12 Sep 2016 07:16:44 +0000 (12:46 +0530)]
Bluetooth: Store the key if auth type is P192

This patch allows to store the key after authentication
if auth type is "HCI_LK_AUTH_COMBINATION_P192"

Change-Id: Ie44dbe7dfec361edab61aceaf9b2ca4057b88fa5
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Cancel the Sniff timer 84/208684/3
Sudha Bheemanna [Thu, 8 Sep 2016 11:31:39 +0000 (17:01 +0530)]
Bluetooth: Cancel the Sniff timer

This patch adds code to cancel the sniff timer.

Change-Id: I756d3b08acf6462044d1fb204064fe12ce1238c1
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Enable sniff mode for incoming connection 83/208683/3
Sudha Bheemanna [Thu, 8 Sep 2016 11:10:50 +0000 (16:40 +0530)]
Bluetooth: Enable sniff mode for incoming connection

Add provision to set the link poilicy to enable sniff mode
for incoming connection.

Change-Id: Ifff9e9f0838f26a6c96d81f4cbaae43429aa231f
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Modify fast connectable type. 82/208682/3
Sudha Bheemanna [Thu, 8 Sep 2016 10:31:23 +0000 (16:01 +0530)]
Bluetooth: Modify fast connectable type.

This patch modifies the fast connectable function
to just set the type.

Change-Id: I0cce96f85d823f9798ae7f147c4e33ce7b18e0e3
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Send Authentication Request command on pairing failure 81/208681/3
Sudha Bheemanna [Thu, 8 Sep 2016 09:41:28 +0000 (15:11 +0530)]
Bluetooth: Send Authentication Request command on pairing failure

This patch allows to send HCI_OP_AUTH_REQUESTED command
to the remote device if pairing failure happens because
of pin or key missing error.

Change-Id: I9c28394dc06b22fd5fe9e58ac0b7d728c086bde4
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Enable inquiry and page scan 80/208680/3
Sudha Bheemanna [Thu, 8 Sep 2016 09:24:54 +0000 (14:54 +0530)]
Bluetooth: Enable inquiry and page scan

This patch enables the inquiry and page scan after ACL
disconnection with one device and if there are no other
devices connected.

Change-Id: Ifb28be7d23f237d35112b2e0739ed55169baacf7
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Change authentication requirement. 79/208679/3
Sudha Bheemanna [Thu, 8 Sep 2016 07:34:11 +0000 (13:04 +0530)]
Bluetooth: Change authentication requirement.

This patch updates the authentication requirement to general
MITM if local and remote device IO capabilities are not
NO_INPUT_NO_OUTPUT.

Change-Id: Ie3955c3f8287418e74af20d40bdf30d0f1963e31
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
5 years agoBluetooth: Set link Supervision timeout for a connection 78/208678/3
Sudha Bheemanna [Thu, 8 Sep 2016 06:54:43 +0000 (12:24 +0530)]
Bluetooth: Set link Supervision timeout for a connection

This patch allows to set the supervision timeout for a connection
if the device role is master.

Change-Id: I7897167ec07803f3059f2ab4d3314b0b7a951533
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>