platform/kernel/linux-rpi.git
9 months agoarm64: tizen_bcm2711_defconfig: Enable defconfig for touchscreen
Hoegeun Kwon [Tue, 8 Feb 2022 05:52:19 +0000 (14:52 +0900)]
arm64: tizen_bcm2711_defconfig: Enable defconfig for touchscreen

Required defconfig for 7inch touchscreen operation.

Change-Id: I19a35976e0e7782a79275f56c14ebdba82099ec3
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agopackaging: Change the kernel version of the spec file
Hoegeun Kwon [Tue, 8 Feb 2022 05:51:59 +0000 (14:51 +0900)]
packaging: Change the kernel version of the spec file

Change the kernel version to 5.10.95

Change-Id: Ia92dc3b1750e4cc693608bdc06f8bb32efcc8722
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable vc4_hdmi_cec
Hoegeun Kwon [Tue, 8 Feb 2022 05:51:56 +0000 (14:51 +0900)]
ARM: tizen_bcm2711_defconfig: Enable vc4_hdmi_cec

CEC driver is required for hdmi operation.

Change-Id: I4f6333945affe0230c78d38e456f5daee91883f2
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoarm64: tizen_bcm2711_defconfig: Enable vc4_hdmi_cec
Hoegeun Kwon [Tue, 8 Feb 2022 05:51:53 +0000 (14:51 +0900)]
arm64: tizen_bcm2711_defconfig: Enable vc4_hdmi_cec

CEC driver is required for hdmi operation.

Change-Id: I2b63797641163a4da088b492c05c3d957fbaa208
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agomisc/trinity: Fix invalid spdx identifiers for uapi haeder
Seung-Woo Kim [Wed, 5 Jan 2022 07:10:38 +0000 (16:10 +0900)]
misc/trinity: Fix invalid spdx identifiers for uapi haeder

The user api header requires "WITH Linux-syscall-note" for
SPDX-License-Identifier when installing. Without it, the command
"make headers_install" fails. To fix it, add proper spdx license
identifier for uapi header.

Change-Id: I95272a29b6808d32eea0e5e95c399a43705f1c96
Fixes: commit 12fc392663db ("misc/trinity: Add trinity npu driver")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agomisc/trinity: Fix invalid spdk identifiers
Dongju Chae [Wed, 5 Jan 2022 05:58:28 +0000 (14:58 +0900)]
misc/trinity: Fix invalid spdk identifiers

This patch fixes invalid spdk identifiers.
'//' does not work in non-source files.

Change-Id: I1e1a404eb1769440c2fbfb29a461a27c088b19ef
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
9 months agomisc/trinity: Add trinity npu driver
Dongju Chae [Wed, 29 Dec 2021 04:58:43 +0000 (13:58 +0900)]
misc/trinity: Add trinity npu driver

This patch uploads trinity npu driver source codes
(for now, triv2 only) including the srnpu iommu codes.

Note that the driver may not available in the rpi4 board,
but let's just sync codes as the reference tizen kernel.

Change-Id: I61353768adb948e6189aeb2c7c79082c3ddbc2ba
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
[Fix conflicts for kernel v5.15.y]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoscripts: mkbootimg_rpi4.sh: Stop build on any kind of errors
Dongwoo Lee [Wed, 1 Dec 2021 05:28:26 +0000 (14:28 +0900)]
scripts: mkbootimg_rpi4.sh: Stop build on any kind of errors

Currently, even if an error occurs during image creation, the script
does not abort, which may result in incorrect image creation. In order
to avoid confusion due to this, if any kind of error occurs during the
build process, the build will be stopped.

Change-Id: I8094f4b97128a8c754e5a9ff22f1b3395a3756b1
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agorpi4: boot: Update the firmwares for kernel v5.10.95
Marek Szyprowski [Fri, 24 Apr 2020 10:21:34 +0000 (12:21 +0200)]
rpi4: boot: Update the firmwares for kernel v5.10.95

Update RPi4 firmware files to the latest version available in firmware
stable branch. With the previous firmware, the display subsystem failed
to be initialized properly by the updated VC4 DRM drivers available in
v5.10.95 vendor tree:

root:~> dmesg | grep drm
[    0.655835] vc4-drm gpu: [drm] Couldn't stop firmware display driver: -22
[    0.656074] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops)
[    1.701692] vc4-drm gpu: [drm] Couldn't stop firmware display driver: -22
[    1.703160] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops)
[    1.704826] vc4-drm gpu: failed to bind fef00700.hdmi (ops vc4_hdmi_ops): -22
[    1.713616] vc4-drm gpu: master bind failed: -22
[    1.713645] vc4-drm: probe of gpu failed with error -22

The updated firmware files fix the above issue.

The updated files comes from https://github.com/raspberrypi/firmware.git
stable branch, commit 48cd70fe84 ("kernel: Update to latest kernel
5.15.61+ from master branch").

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I97de6317f3e5498a372eface39f3a62987b0c45f

9 months agorpi4: boot: config: Add ignore_lcd flag for 7inch touchscreen
Hoegeun Kwon [Tue, 8 Feb 2022 05:52:16 +0000 (14:52 +0900)]
rpi4: boot: config: Add ignore_lcd flag for 7inch touchscreen

Add flag for 7inch touchscreen operation.

Change-Id: Ie750ae0e00daf8448515ba0c4c4596168114882a
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agorpi4: boot: Update the firmwares for kernel v5.10.46
Hoegeun Kwon [Tue, 8 Feb 2022 05:52:03 +0000 (14:52 +0900)]
rpi4: boot: Update the firmwares for kernel v5.10.46

Update the firmwares with the latest version from the vendor git repo.

The commit base is "d06e0ef85c22 kernel: Bump to 5.10.46"

Since firmwares v5.10.47, there is an issue where HDMI-0 UHD does not
work. So we apply firmwaresv5.10.46.

Change-Id: Iffd23e0e866284ea68a42136ce735f5412e59f25
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agotizen: rpi4: disable obsolete options in config.txt
Marek Szyprowski [Mon, 22 Nov 2021 11:24:04 +0000 (12:24 +0100)]
tizen: rpi4: disable obsolete options in config.txt

Overlays are not supported on Tizen and 'vc4-fkms-v3d' overlay has been
obsoleted long time ago when VC4 DRM gained full support of the RPi4
hardware, so remove it from the default config.txt. Same for
'dtparam=audio=on'.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iaa4ad049951e1538d818caa144928a08560911bd

9 months agoARM64: tizen_bcm2711_defconfig: Sync with savedefconfig
Dongwoo Lee [Wed, 7 Jul 2021 03:33:21 +0000 (12:33 +0900)]
ARM64: tizen_bcm2711_defconfig: Sync with savedefconfig

This fixes to synchronize current defconfig with savedefconfig

Change-Id: I195f05429a15e424834a590df72b73547126d529
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Sync with savedefconfig
Dongwoo Lee [Wed, 7 Jul 2021 03:31:01 +0000 (12:31 +0900)]
ARM: tizen_bcm2711_defconfig: Sync with savedefconfig

This fixes to synchronize current defconfig with savedefconfig

Change-Id: Ia99f98f2d675ae424e796ddbbd087175d9ad3cae
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoARM/ARM64: tizen_bcm2711_defconfig: disable ANDROID_LOGGER config
INSUN PYO [Wed, 30 Jun 2021 02:35:05 +0000 (11:35 +0900)]
ARM/ARM64: tizen_bcm2711_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: I64c5207ce00a818795e307b79d4bf540a88fe120
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
9 months agomm: LKSM: bug fix for kernel memory leak
Sung-hun Kim [Tue, 27 Oct 2020 11:48:36 +0000 (20:48 +0900)]
mm: LKSM: bug fix for kernel memory leak

For efficiency, LKSM cleans exited processes in a batched manner when it
finishes a scanning iteration. When it finds exited process while it is in
the scanning iteration, it just pends the mm_slot of the exited process to
the internal list.

On the other hend, when KSM daemon cleans mm_slots of exited processes, it
should care regions of exited processes to remove unreferenced lksm_region
objects.

Previously, most regions are maintained properly but only regions in "head"
of the exited process list does not be cleaned due to the buggy implementation.
At last, uncleaned objects are remained as unreferenced garbages.

Follow message is detected by kmemleak (reported by sw0312.kim@samsung.com):
=========================================================================
unreferenced object 0xffffff80c7083600 (size 128):
  comm "ksm_crawld", pid 41, jiffies 4294918362 (age 95.632s)
  hex dump (first 32 bytes):
    00 37 08 c7 80 ff ff ff 60 82 19 bd 80 ff ff ff  .7......`.......
    00 35 08 c7 80 ff ff ff 00 00 00 00 00 00 00 00  .5..............
  backtrace:
    [<0000000048313958>] kmem_cache_alloc_trace+0x1e0/0x348
    [<00000000fd246822>] lksm_region_ref_append+0x48/0xf8
    [<00000000c5a818a0>] ksm_join+0x3a0/0x498
    [<00000000b2c3f36a>] lksm_prepare_full_scan+0xe8/0x390
    [<00000000013943b5>] lksm_crawl_thread+0x214/0xbf8
    [<00000000b4ce0593>] kthread+0x1b0/0x1b8
    [<000000002a3f7216>] ret_from_fork+0x10/0x18
unreferenced object 0xffffff80c7083700 (size 128):
  comm "ksm_crawld", pid 41, jiffies 4294918362 (age 95.632s)
  hex dump (first 32 bytes):
    00 39 08 c7 80 ff ff ff 00 36 08 c7 80 ff ff ff  .9.......6......
    00 35 08 c7 80 ff ff ff 00 00 00 00 00 00 00 00  .5..............
  backtrace:
    [<0000000048313958>] kmem_cache_alloc_trace+0x1e0/0x348
    [<00000000fd246822>] lksm_region_ref_append+0x48/0xf8
    [<00000000c5a818a0>] ksm_join+0x3a0/0x498
    [<00000000b2c3f36a>] lksm_prepare_full_scan+0xe8/0x390
    [<00000000013943b5>] lksm_crawl_thread+0x214/0xbf8
    [<00000000b4ce0593>] kthread+0x1b0/0x1b8
    [<000000002a3f7216>] ret_from_fork+0x10/0x18
...
=========================================================================

This patch takes care of such possible kernel memory leak problem.

Change-Id: I3e4b299e02018ece1c19ba53e4f10a68520a807b
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agoARM64: tizen_bcm2711_defconfig: Enable WireGuard
Dongwoo Lee [Wed, 2 Jun 2021 02:48:28 +0000 (11:48 +0900)]
ARM64: tizen_bcm2711_defconfig: Enable WireGuard

This enables WireGuard VPN feature.

Change-Id: I2e63427ed5f667858bd3abddb73e5018dc16ac7e
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable WireGuard
Dongwoo Lee [Wed, 2 Jun 2021 02:36:45 +0000 (11:36 +0900)]
ARM: tizen_bcm2711_defconfig: Enable WireGuard

This enables WireGuard VPN feature.

Change-Id: Ia88f99d110c65120f1e55a1bca2e59b9fe35324f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoRevert "sched: Remove sched_setscheduler*() EXPORTs"
Seung-Woo Kim [Fri, 14 May 2021 01:56:44 +0000 (10:56 +0900)]
Revert "sched: Remove sched_setscheduler*() EXPORTs"

This reverts commit 616d91b68cd56bcb1954b6a5af7d542401fde772.

Some out-of-tree module still uses sched_setscheduler(), so for
build, revert removing export symbol for it.

Change-Id: Ic2dbfc04e03e91c5d8daf52039f06149ae0d5fb1
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agomisc: tizen-inform-reboot: fix a potential NULL pointer dereference
Jaehoon Chung [Fri, 16 Apr 2021 02:18:41 +0000 (11:18 +0900)]
misc: tizen-inform-reboot: fix a potential NULL pointer dereference

Fix a potential NULL pointer dereference.
If there is no file or directory, it has to check whether it's error or
not.

Change-Id: Ia6e7280c1901ae772a5f890c312b7a741fbac0a1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agof2fs: Change default mount options
Dongwoo Lee [Wed, 14 Apr 2021 02:52:25 +0000 (11:52 +0900)]
f2fs: Change default mount options

As adjusting mount options for increasing performance and reducing data
move due to bggc, this changes default mount options about fsync mode
and bggc algorithm as below:
fsync_mode: from 'posix' to 'nobarrier'
bggc_algorithm: from 'default' to 'atgc'

Change-Id: I124ced2ef824832df280de74120612dc72167b36
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable security labels for f2fs
Dongwoo Lee [Mon, 12 Apr 2021 03:56:59 +0000 (12:56 +0900)]
ARM: tizen_bcm2711_defconfig: Enable security labels for f2fs

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

Change-Id: I834d81cec7d861ab2fbfcaf58ad51688216f4b2d
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoARM64: tizen_bcm2711_defconfig: Enable security labels for f2fs
Dongwoo Lee [Mon, 12 Apr 2021 03:47:07 +0000 (12:47 +0900)]
ARM64: tizen_bcm2711_defconfig: Enable security labels for f2fs

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

Change-Id: Idb151191387c762fb238d5ad0f78d2710cbc7674
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable ARM_MODULE_PLTS config
Hoegeun Kwon [Thu, 1 Apr 2021 05:25:00 +0000 (14:25 +0900)]
ARM: tizen_bcm2711_defconfig: Enable ARM_MODULE_PLTS config

Fixes the problem of not loading kernel modules

Change-Id: I3eeed53c510610b69e2ab8b6ddc09a5680fb54c9
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agopackaging: Change the kernel version of the spec file
Hoegeun Kwon [Tue, 30 Mar 2021 02:04:39 +0000 (11:04 +0900)]
packaging: Change the kernel version of the spec file

Change the kernel version to 5.10.25

Change-Id: Ibe698990fefa9e336212788089d7e2503726da88
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoARM64: tizen_bcm2711_defconfig: Enable USB_PRINTER config
Chanwoo Choi [Wed, 24 Mar 2021 03:45:52 +0000 (12:45 +0900)]
ARM64: tizen_bcm2711_defconfig: Enable USB_PRINTER config

Enable USB_PRINTER config to suppot USB printer device.

Change-Id: I2068a283928c8f3c85d5f31b25a13300cdc52783
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable USB_PRINTER config
Chanwoo Choi [Wed, 24 Mar 2021 03:44:24 +0000 (12:44 +0900)]
ARM: tizen_bcm2711_defconfig: Enable USB_PRINTER config

Enable USB_PRINTER config to suppot USB printer device.

Change-Id: Ic63797d93520e4bc50175c53c7e7328b55a0f724
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 months agoARM64: tizen_bcm2711_defconfig: Enable CONFIG_CFG80211_CRDA_SUPPORT
Jaehoon Chung [Mon, 22 Mar 2021 08:06:33 +0000 (17:06 +0900)]
ARM64: tizen_bcm2711_defconfig: Enable CONFIG_CFG80211_CRDA_SUPPORT

Enable CONFIG_CFG80211_CRDA_SUPPORT.

Change-Id: If60cab97a05ca8bc01633255ede56279fcc599a8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoRevert "ARM: configs: tizen_bcm2711_defconfig: Disable CONFIG_CFG80211_CRDA_SUPPORT"
Jaehoon Chung [Mon, 22 Mar 2021 07:56:08 +0000 (16:56 +0900)]
Revert "ARM: configs: tizen_bcm2711_defconfig: Disable CONFIG_CFG80211_CRDA_SUPPORT"

This reverts commit 6485924bd76b70c8ed6ba334ef9b5045f4a3686d.
- Enable CONFIG_CFG80211_CRDA_SUPPORT to use country code.

Change-Id: I951b32c86611b6240991e9bb8b362c98bb56b72c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agomedia: uvcvideo: Add a probe quirk to Jieli Technology USB PHY 2.0 (1224:2a25)
Seung-Woo Kim [Thu, 25 Feb 2021 08:17:12 +0000 (17:17 +0900)]
media: uvcvideo: Add a probe quirk to Jieli Technology USB PHY 2.0 (1224:2a25)

Repeated video request on Jieli Technology USB PHY 2.0 (1224:2a25)
device causes data stall with below error until reconnection:
  uvcvideo: Failed to set UVC probe control : -32 (exp. 26).

To resolve the wrong state, add PROBE quirk bits.

Change-Id: I5efba6ac26d5eea70e2227f9ff9801dd5d8d4790
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM/ARM64: defconfig: disable SECURITY_SMACK_NETFILTER config
Jaehoon Chung [Wed, 17 Feb 2021 01:02:48 +0000 (10:02 +0900)]
ARM/ARM64: defconfig: disable SECURITY_SMACK_NETFILTER config

Disable SECURITY_SMACK_NETFILTER configuration.

Change-Id: Id95847392ac2bf53b92dae5ee2c0d4b5c1e41ece
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable OVERLAY_FS
Seung-Woo Kim [Mon, 25 Jan 2021 07:24:54 +0000 (16:24 +0900)]
ARM: tizen_bcm2711_defconfig: Enable OVERLAY_FS

Enable CONFIG_OVERLAY_FS for tizen application space.

Change-Id: I46b011effa26e1f7ef9acf5f18d52bc7b54452c5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM64: tizen_bcm2711_defconfig: Enable OVERLAY_FS
Seung-Woo Kim [Mon, 25 Jan 2021 07:24:03 +0000 (16:24 +0900)]
ARM64: tizen_bcm2711_defconfig: Enable OVERLAY_FS

Enable CONFIG_OVERLAY_FS for tizen application space.

Change-Id: I1b2aafaeea24b6ef6b07d3c57d542dce13c53b8f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agopid: mark struct pid* argument as const
Łukasz Stelmach [Tue, 2 Feb 2021 18:52:58 +0000 (19:52 +0100)]
pid: mark struct pid* argument as const

Change-Id: I17a358ccbae656561e9e1df4ff3fe0055e4eaf20
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
9 months agoblock: make function 'kill_bdev' export
Hoegeun Kwon [Mon, 17 Oct 2022 08:27:32 +0000 (17:27 +0900)]
block: make function 'kill_bdev' export

Revert "block: make function 'kill_bdev' static" with Kernel v5.15.
  :This reverts commit 3373a3461aa15b7f9a871fa4cb2c9ef21ac20b47.

To free ramdisk memory, BLKFLSBUF support is required.

Change-Id: I55831bc50d8a7344a873172f2f7498d2a0e37786
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agomisc: tizen-inform-reboot: Fix build error
Hoegeun Kwon [Mon, 17 Oct 2022 08:08:01 +0000 (17:08 +0900)]
misc: tizen-inform-reboot: Fix build error

Used in another way instead of set_fs, since v5.10, set_fs cannot be
used.

Change-Id: I581e17a536f3cd8e57e9bd4bc37904ef288f1f5b
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Sync with .config with v5.10.y
Hoegeun Kwon [Thu, 21 Jan 2021 10:10:27 +0000 (19:10 +0900)]
ARM: tizen_bcm2711_defconfig: Sync with .config with v5.10.y

Sync with .config with v5.10.y

Change-Id: I4259a2c39383c96db46a6e0e3b743227678a6d8f
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoarm64: tizen_bcm2711_defconfig: Sync with .config with v5.10.y
Hoegeun Kwon [Thu, 21 Jan 2021 07:33:01 +0000 (16:33 +0900)]
arm64: tizen_bcm2711_defconfig: Sync with .config with v5.10.y

Sync with .config with v5.10.y

Change-Id: I1291e11f4fb9dd1d855d70f18d5046a0a6492b52
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agomm: LKSM: Fix to use mmap_lock instead of mmap_sem.
Hoegeun Kwon [Wed, 20 Jan 2021 06:15:09 +0000 (15:15 +0900)]
mm: LKSM: Fix to use mmap_lock instead of mmap_sem.

Fix changed interface and incorrectly used structure member names.

Change-Id: I40c50fd7f20799e30dddb752aba464ac9aace28c
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agomisc: tizen-inform-reboot: Fix to use filp_open.
Hoegeun Kwon [Tue, 19 Jan 2021 07:28:41 +0000 (16:28 +0900)]
misc: tizen-inform-reboot: Fix to use filp_open.

Modify to use filp_open instead of ksys_open.

Change-Id: I49c8e883d8fd0d76b9ca6c7449303f2859f756b5
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agospec: set CONFIG_LOCALVERSION
Ł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: If1650692162832ea86988e4adb610ce0148edde3
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
9 months agospec: support gbs(1) incremental builds
Łukasz Stelmach [Mon, 4 Jan 2021 13:41:58 +0000 (14:41 +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
+ There is no point in making mrproper
+ use rsync(1) instead of cp(1)+find(1) to copy devel files

Other changes are:
+ use make headers_install to install headers in the buildroot
+ add _smp_mflags to make(1) things faster

Change-Id: Ia14fbe7acab8b83683f9e07757b4f62a7657b2a5
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
9 months agoscript: adjust ccache support
Łukasz Stelmach [Mon, 21 Dec 2020 12:46:37 +0000 (13:46 +0100)]
script: adjust ccache support

Change-Id: I735295fc21cf7caa29b84548a8f21449ed97800e
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
9 months agoscript: increase the number of concurrent compilers
Łukasz Stelmach [Wed, 13 Jan 2021 10:24:40 +0000 (11:24 +0100)]
script: increase the number of concurrent compilers

It is safe to run as many compilation processes as twice the number of
CPUs. This is the default settings of RPM building process in Tizen.

Change-Id: Id68d9d31bc54da11c8732689645408241a517887
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
9 months agoscript: use $NCPUS for arm64 builds too
Łukasz Stelmach [Wed, 13 Jan 2021 10:12:04 +0000 (11:12 +0100)]
script: use $NCPUS for arm64 builds too

Fixes: b371be68152e ("script: Fix to use NCPUS dynamically")
Change-Id: I32b5c08f4b00ca24032a2f9355d308f3df825fbd
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
9 months agoARM: mm: Free memblock from free_initrd_mem()
Seung-Woo Kim [Thu, 7 Jan 2021 09:09:20 +0000 (18:09 +0900)]
ARM: mm: Free memblock from free_initrd_mem()

Even after free_initrd_mem(), memblock for initrd remains. Free
memblock for initrd from free_initrd_mem().

Reported-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
[sw0312.kim: port mainline posted patch to 5.4.y]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I42a7461558868cdfdc559959112c81bc4c8b10c5

9 months agoARM: dts: bcm2711-rpi-4-b: Adjust CMA size due to the OOM issue
Sung-hun Kim [Thu, 7 Jan 2021 04:01:01 +0000 (13:01 +0900)]
ARM: dts: bcm2711-rpi-4-b: Adjust CMA size due to the OOM issue

Since 32-bit kernel has a limitation in the lowmem size, big CMA size
severely affect on available memory for kernel. Because of that, some test
cases make OOM kills due to the exhaustion in kernel available memory that
was reported by Jaehoon Chung (jh80.chung@samsung.com).

To handle this, I adjusted CMA size to 400MB while it meets the requirement
for UHD resolution.

Change-Id: I189699d4ce5f2866c01edf68c8138e9278679188
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agoARM: dts: bcm2711-rpi-4-b: Fix CMA size to 512M
Hoegeun Kwon [Mon, 21 Dec 2020 04:54:55 +0000 (13:54 +0900)]
ARM: dts: bcm2711-rpi-4-b: Fix CMA size to 512M

Increase cma size to 512 for use 4k GL on tizen platform.

When using RPI4 1GB model + 4k UHD, reclaim occurs a lot and it is slow.

Change-Id: Iac60a9fa0d5f76085e60cbf3db9a90585597de57
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoscript: Fix to use NCPUS dynamically
Hoegeun Kwon [Mon, 14 Dec 2020 14:24:34 +0000 (23:24 +0900)]
script: Fix to use NCPUS dynamically

It uses NCPUS dynamically.

Change-Id: Ib7b1229f387b9c91f4eb2b29cc8f3bfe207fcaaa
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@gmail.com>
9 months agoARM: tizen_bcm2711_defconfig: Fix console loglevel for logo display
Hoegeun Kwon [Mon, 9 Nov 2020 07:44:46 +0000 (16:44 +0900)]
ARM: tizen_bcm2711_defconfig: Fix console loglevel for logo display

Modifiy CONSOLE_LOGLEVEL_QUIET defconfig to 3 for logo display.

Change-Id: Idae234c40304fbe8fd5f02941e53505a6bd189fa
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoarm64: tizen_bcm2711_defconfig: Fix console loglevel for logo display
Hoegeun Kwon [Mon, 9 Nov 2020 07:03:59 +0000 (16:03 +0900)]
arm64: tizen_bcm2711_defconfig: Fix console loglevel for logo display

Modifiy CONSOLE_LOGLEVEL_QUIET defconfig to 3 for logo display.

Change-Id: I5112d85dedd1e116a75af0d07c09d77182ff4f5a
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agorpi4: boot: config: Enable hdmi_force_hotplug
Hoegeun Kwon [Tue, 3 Nov 2020 08:09:20 +0000 (17:09 +0900)]
rpi4: boot: config: Enable hdmi_force_hotplug

There is a problem that the booting stops when booting without connecting
HDMI. To fix it we need to enable hdmi_force_hotplug.

Change-Id: I44e960a04f75c999ab69a75ad72d67311f8b70c1
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agomm: LKSM: bug fix for KASAN out-of-bound access error on accessing a filter
Sung-hun Kim [Wed, 28 Oct 2020 10:26:31 +0000 (19:26 +0900)]
mm: LKSM: bug fix for KASAN out-of-bound access error on accessing a filter

KASAN reports out-of-bound accesses (reported by Jaehoon Chung)
on slab which is performed for obtaining a next filtered
address to find a sharable page.

LKSM exploits bitmap-based filters to find sharable pages in
an efficient way. A buggy code is a kind of miscalculation for
boundary of the allocated bitmap. This patch takes care of it.

Change-Id: If45c5ce175db067523b60f11e69e12d2bc798659
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agobrcmfmac: change from brcmf_dbg to brcmf_info
Jaehoon Chung [Mon, 5 Oct 2020 11:39:01 +0000 (20:39 +0900)]
brcmfmac: change from brcmf_dbg to brcmf_info

Change from brcmf_dbg to brcmf_info.
This patch is workaround to check debug message on Testhub.

Change-Id: I7fef8f64fc38e43b6544fab3e9474e7f1829cc60
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoscripts: mkbootimg_rpi4.sh: use compress image
Seung-Woo Kim [Tue, 15 Sep 2020 09:48:22 +0000 (18:48 +0900)]
scripts: mkbootimg_rpi4.sh: use compress image

Use compressed image for less size.

Change-Id: I9ec8b7e5e35bfa8ae6ac2832d52d4748e9a79668
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM64: tizen_bcm2711_defconfig: Enable VIDEO_CODEC_BCM2835
Seung-Woo Kim [Thu, 10 Sep 2020 04:28:11 +0000 (13:28 +0900)]
ARM64: tizen_bcm2711_defconfig: Enable VIDEO_CODEC_BCM2835

To support v4l2 codec device, enable VIDEO_CODEC_BCM2835 and
to meet dependency, enable MEDIA_CONTROLLER.

Change-Id: Id473825163c409ceaab5d4b618cf8bddd6af0f68
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM: configs: tizen_bcm2711_defconfig: Enable VIDEO_CODEC_BCM2835
Seung-Woo Kim [Thu, 10 Sep 2020 04:25:20 +0000 (13:25 +0900)]
ARM: configs: tizen_bcm2711_defconfig: Enable VIDEO_CODEC_BCM2835

To support v4l2 codec device, enable VIDEO_CODEC_BCM2835.

Change-Id: I7f7147901b77b3ff01afc1a7c3c7f0ab9cc20701
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM64: tizen_bcm2711_defconfig: Enable RTL8192CU config as module
Jaehoon Chung [Mon, 24 Aug 2020 02:34:08 +0000 (11:34 +0900)]
ARM64: tizen_bcm2711_defconfig: Enable RTL8192CU config as module

Enable RTL8192CU configuration as module.

Change-Id: I4597976b08b9e1e98d61f42da674c28c5e476f10
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable RTL8192CU config as module
Jaehoon Chung [Mon, 24 Aug 2020 02:33:04 +0000 (11:33 +0900)]
ARM: tizen_bcm2711_defconfig: Enable RTL8192CU config as module

Enable RTL8192CU configuration as module.

Change-Id: Ibe38cc889d5e2973028b28615a2210f87056763f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoscripts: mkbootimg_rpi4.sh: Fix module image size to 32MB
Hoegeun Kwon [Thu, 20 Aug 2020 05:24:51 +0000 (14:24 +0900)]
scripts: mkbootimg_rpi4.sh: Fix module image size to 32MB

The partition module size has been modified to 32MB.

Change-Id: I467fd7618d345a25d87af62985a1c2f8f47ad0eb
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoARM: dts: bcm2711-rpi-4-b: Enable uart2 node
Seung-Woo Kim [Fri, 14 Aug 2020 07:47:15 +0000 (16:47 +0900)]
ARM: dts: bcm2711-rpi-4-b: Enable uart2 node

Enable uart2 to support '/dev/ttyAMA1'. The node setting is from
arch/arm/boot/dts/overlays/uart2-overlay.dts, without cts, rts.
Tx pin is gpio 0, pin 27, and Rx pin is gpio 1, pin 28.

Ref: https://www.raspberrypi.org/forums/viewtopic.php?t=244827

Change-Id: Ib6c460f6c8e46f3ef7d2d40ab23b3524e438c6c9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agorpi4: boot: config: disable eeprom i2c hat auto detect
Seung-Woo Kim [Fri, 14 Aug 2020 07:24:24 +0000 (16:24 +0900)]
rpi4: boot: config: disable eeprom i2c hat auto detect

From raspberry pi gpio pins, ID_SC and ID_SD are reserved by
firmware to detect HAT with i2c, but in Tizen, auto-detection
and dynamical setting dt with overlay is not supported.
To use the pins for uart2, explictly disable eeprom i2c hat
auto detect.

Ref: https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md

Change-Id: Id5cf016b09e7661317529e1174842915165955bc
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM64: configs: tizen_bcm2711_defconfig: enable I2C_STUB as module
Seung-Woo Kim [Thu, 13 Aug 2020 09:57:09 +0000 (18:57 +0900)]
ARM64: configs: tizen_bcm2711_defconfig: enable I2C_STUB as module

Tizen peripheral-io tct requires i2c_stub module to test i2c
functionality. Enable I2C_STUB as module.

Change-Id: I93ea159349dd5bcfea7ceabd04af239c7f2a1b96
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agomm: LKSM: remove unnecessary debug messages
Sung-hun Kim [Thu, 13 Aug 2020 06:46:36 +0000 (15:46 +0900)]
mm: LKSM: remove unnecessary debug messages

In order to get scanning candidates, LKSM hooks fork and exit calls even though
LKSM does not run. Previous patches include debugging messages when LKSM hooks
exit calls, and it can flush old kernel logs. To handle this, this patch removes
unnecessary debugging messages.

Change-Id: If475a880ee931668b6bebf53322622ba2a042c89
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agomm: Change fault_around_bytes default value from 65536 to 4096
Chanwoo Choi [Wed, 29 Jul 2020 07:52:52 +0000 (16:52 +0900)]
mm: Change fault_around_bytes default value from 65536 to 4096

To apply the 4K value for falut_around_bytes at the early booting step,
change fault_around_bytes default value from 65536 to 4096.

Change-Id: Id97650a035b524d7132bca6164581c8e15096354
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 months agoARM64: configs: tizen_bcm2711_defconfig: enable CONFIG_LKSM_FILTER
Sung-hun Kim [Thu, 16 Jul 2020 07:00:07 +0000 (16:00 +0900)]
ARM64: configs: tizen_bcm2711_defconfig: enable CONFIG_LKSM_FILTER

Change-Id: I54bbb1ee0a5e3923ebdb4b62038c3ba999e38dab
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agomm: LKSM: new feature: use filter-based scanning to reduce scanning cost
Sung-hun Kim [Thu, 16 Jul 2020 06:58:28 +0000 (15:58 +0900)]
mm: LKSM: new feature: use filter-based scanning to reduce scanning cost

LKSM_FILTER is a new feature which is intended to reduce the computation cost.
LKSM_FILTER exploits bitmap-based filters to skip scanning of unnecessary
pages. To this end, LKSM collects addresses of shared pages to make filters.

The rationale of LKSM_FILTER is that user-level programs share common runtime
framework and libraries. Because of that processes can have similar address
space layout. It means that if a page is merged with another page, the same
virtual address in different process can be merged with this merged page.
In this regard, KSM can use a single global filter to cover all sharable areas
in the system.

The challenge is caused by a secure construct of Linux kernel, namely ASLR.
ASLR enforces to have randomized address space for each process, and it
severely disrupts making a global filter.

To overcome this challenge, LKSM exploits two information: regions and offsets.
A region means the physically mapped area. Each process has its own VMAs but
they may mapped same files. A region means the original one.
An address space of a process is randomized in the unit of VMA. It means that
if pages are merged even in the different virtual addresses, there can be at
same offsets from individual VMAs.

LKSM leverages both regions and offsets to construct per-region filters.
By using per-region filters, LKSM could effectively reduce its scanning space
and also computation cost by up to 46% against previous version of LKSM at the
expense of somewhat sharing chances.

Change-Id: I6f010d991b514268a897ce8f7b88fb1442ef39b4
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agoARM64: configs: tizen_bcm2711_defconfig: enable CONFIG_LKSM
Sung-hun Kim [Thu, 16 Jul 2020 00:07:37 +0000 (09:07 +0900)]
ARM64: configs: tizen_bcm2711_defconfig: enable CONFIG_LKSM

Change-Id: Ifa373a977364866a3c472665b21b44cf2b29cffc
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agomm: LKSM: lightweight memory deduplication for embedded devices
Sung-hun Kim [Thu, 16 Jul 2020 00:05:12 +0000 (09:05 +0900)]
mm: LKSM: lightweight memory deduplication for embedded devices

Lightweight KSM (in short, LKSM) is a variant of KSM that is implemented in
a fully event-triggered manner. LKSM provides a memory deduplication facility
like vanilla KSM while it extremely reduces overhead.

Normally, LKSM is blocked and waits for incoming deduplication requests from
user-level process (e.g., resourced). When a user-level process submits
deduplication request via sysfs, LKSM performs requested-level of deduplication,
such as partial and full deduplications.
After that, LKSM is going to sleep again and waits for next request coming.

By doing so, LKSM mitigates side effects that impact on system performance,
for instance, occupying system resources such as CPU and incurring cache
pollutions.

Change-Id: I551feb45d8c59ccddea60ced96225780d50e1c43
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agomm: LKSM: prepare to add LKSM code
Sung-hun Kim [Tue, 14 Jul 2020 06:04:38 +0000 (15:04 +0900)]
mm: LKSM: prepare to add LKSM code

A new feature, namely lightweight KSM (LKSM), is based on KSM in Linux and
much of codes are copied from KSM to LKSM.

To distinguish original KSM codes and developed codes in LKSM, original KSM
file (mm/ksm.c) is copied to mm/lksm.c.

Change-Id: I4e2a149f0978d0b74e9ecc7eedbd7901eb54ad44
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
9 months agoRevert "brcmfmac: move configuration of probe request IEs"
Jaehoon Chung [Mon, 3 Aug 2020 05:45:35 +0000 (14:45 +0900)]
Revert "brcmfmac: move configuration of probe request IEs"

This reverts commit bd99a3013bdc00f8fc7534c657b39616792b4467.

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

Change-Id: I5fa0924e888b91fef17ac3d174ee2a2e49d5e5a6
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoARM64: configs: tizen_bcm2711_defconfig: Disable unused dwcotg
Seung-Woo Kim [Tue, 28 Jul 2020 09:40:06 +0000 (18:40 +0900)]
ARM64: configs: tizen_bcm2711_defconfig: Disable unused dwcotg

In rpi4, usb dwc2 is used for usb peripheral port. Disable unused
dwcotg driver.

Change-Id: I3488508db5925f28d95dc2687814f061f2430622
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM: configs: tizen_bcm2711_defconfig: Disable unused dwcotg
Seung-Woo Kim [Tue, 28 Jul 2020 09:38:42 +0000 (18:38 +0900)]
ARM: configs: tizen_bcm2711_defconfig: Disable unused dwcotg

In rpi4, usb dwc2 is used for usb peripheral port. Disable unused
dwcotg driver.

Change-Id: I89196a59929c1e5dedcf31dd81acaef3c07f2043
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM: dts: bcm2711-rpi-4-b: add non-removable property about sd-card
Jaehoon Chung [Thu, 23 Jul 2020 10:09:13 +0000 (19:09 +0900)]
ARM: dts: bcm2711-rpi-4-b: add non-removable property about sd-card

Add non-removable property about sd-card.
Tizen doesn't consider about booting to other device.
It can be assumed that SD-card is non-removable storage.
When broken-cd is enabled, it's always polling to check SD-card.
- Remove broken-cd property.

Change-Id: I269e39f708362e03f219632eba592701907b71aa
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoARM: configs: tizen_bcm2711_defconfig: Enable Crypto extension configs
Jaehoon Chung [Wed, 22 Jul 2020 08:16:16 +0000 (17:16 +0900)]
ARM: configs: tizen_bcm2711_defconfig: Enable Crypto extension configs

Enable Crypto exntension configs.
- CONFIG_CRYPTO_SHA1_ARM_NEON
- CONFIG_CRYPTO_SHA2_ARM_CE

After enabled these configs, verity is used from "sha256-generic" to
"sha256-neon".

Change-Id: I0d8f6335e6ee678130ea1219f539148e99fc4ac6
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoARM: configs: tizen_bcm2711_defconfig: Enable FUSE_FS
Seung-Woo Kim [Wed, 22 Jul 2020 08:15:09 +0000 (17:15 +0900)]
ARM: configs: tizen_bcm2711_defconfig: Enable FUSE_FS

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

Change-Id: I75e19bf429e0c551053f37a7c05d9907c9f957b6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM: dts: bcm2711-rpi-4-b: Add cts, rts pin setting for bt uart
Seung-Woo Kim [Fri, 10 Jul 2020 09:02:01 +0000 (18:02 +0900)]
ARM: dts: bcm2711-rpi-4-b: Add cts, rts pin setting for bt uart

For high speed uart on bluetooth, it needs to add cts & rts pins.
Add cts, rts pin setting for bluetooth uart.

Change-Id: Ib12ceab8edd682107c19c07d891fab5d1440e9be
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoRevert "ARM: dts: bcm2711-rpi-4-b: Add cts pin setting for bluetooth uart"
Seung-Woo Kim [Fri, 10 Jul 2020 07:56:20 +0000 (16:56 +0900)]
Revert "ARM: dts: bcm2711-rpi-4-b: Add cts pin setting for bluetooth uart"

This reverts commit 9e33125d91fdaf56aef72183f2481441ebbc0a78.

Now, bcm2711-rpi-4-b.dts has two uart0 nodes, and pinctrl-0
is override from the second uart0 node. So this change is
meanlingless, and it needs to be set from the second node.
So, revert this and new change will be applied.

Change-Id: Ibaa537851cf66fdd1843cf635e309d795cdbd441
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agopackaging: Change the kernel version of the spec file
Hoegeun Kwon [Fri, 3 Jul 2020 05:27:18 +0000 (14:27 +0900)]
packaging: Change the kernel version of the spec file

Change the kernel version to 5.4.50

Change-Id: Id9272d7ce6366ee9e97fa9bc92109d510d0c089f
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agorpi4: boot: Update the firmwares for kernel v5.4.50
Hoegeun Kwon [Fri, 3 Jul 2020 05:18:53 +0000 (14:18 +0900)]
rpi4: boot: Update the firmwares for kernel v5.4.50

Update the firmwares with the latest version from the vendor git repo.

The commit base is "66fc5eaac3d kernel: Bump to 5.4.50"

Change-Id: I7f4f70fefe1cc22a31539f19566c9bfed285bb52
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agorpi4: boot: Update the firmwares for kernel v5.4.40
Hoegeun Kwon [Wed, 6 May 2020 01:54:06 +0000 (10:54 +0900)]
rpi4: boot: Update the firmwares for kernel v5.4.40

Update the firmwares with the latest version from the vendor git repo.

The commit base is "5cb5ddd076a kernel: Bump to 5.4.40"

Change-Id: Id8f4f1795f9bf0506dae2595ad42d2ca711ede55
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agomm: memcontrol: Add force_reclaim to reclaim tasks' memory in memcg
Dongwoo Lee [Mon, 3 Aug 2020 05:44:43 +0000 (14:44 +0900)]
mm: memcontrol: Add force_reclaim to reclaim tasks' memory in memcg

These days, platforms tend to manage memory on low memory state
like andloid's lowmemory killer. These platforms might want to
reclaim memory from background tasks as well as kill victims
to guarantee free memory at use space level. This patch provides
an interface to reclaim a given memcg. After platform's low memory
handler moves tasks that the platform wants to reclaim to
a memcg and decides how many pages should be reclaimed, it can
reclaim the pages from the tasks by writing the number of pages
at memory.force_reclaim.

Signed-off-by: Hyunhee Kim <hyunhee.kim@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
[dwoo08.lee: ported from mailing list https://www.spinics.net/lists/cgroups/msg07874.html]

Change-Id: I40b1322dfe2628ca306690a15958881b3026606f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoconfigs: tizen_bcm2711: Enable memory cgroup swap controller
Dongwoo Lee [Fri, 10 Jul 2020 03:53:26 +0000 (12:53 +0900)]
configs: tizen_bcm2711: Enable memory cgroup swap controller

To support resourced memory and swap module properly, this enables
CONFIG_MEMCG_SWAP.

Change-Id: I2a8836517b2aac66f03ebf9fba18e1de859c2371
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoconfigs: tizen_bcm2711: Sync up missing defconfig
Dongwoo Lee [Fri, 10 Jul 2020 02:23:19 +0000 (11:23 +0900)]
configs: tizen_bcm2711: Sync up missing defconfig

This applies missing defconfig of rpi4 vendor kernel, which is
derived from commit dcf49c0dd76d ("configs: Switch to upstream thermal
sensor for RPi 4 - BCM2711_THERMAL").

Change-Id: I750ec00b69c9a318eb754437896daa6ea246a5a1
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoARM64: tizen_bcm2711_defconfig: Enable lz4 and zstd cryptos
Dongwoo Lee [Mon, 29 Jun 2020 09:21:05 +0000 (18:21 +0900)]
ARM64: tizen_bcm2711_defconfig: Enable lz4 and zstd cryptos

This enables lz4 and zstd crypto to enable compressor for zram

Change-Id: Id2ac2daa8e7e3e0b7526dedc53f175b83c4fb1eb
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable lz4 and zstd cryptos
Dongwoo Lee [Wed, 3 Jun 2020 02:07:09 +0000 (11:07 +0900)]
ARM: tizen_bcm2711_defconfig: Enable lz4 and zstd cryptos

This enables lz4 and zstd crypto to enable compressor for zram

Change-Id: I0a2f3af9e30693b6c0deebba5053b768bc1229fb
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agolib: zstd: Improve decode performance
Dongwoo Lee [Thu, 4 Jun 2020 04:54:44 +0000 (13:54 +0900)]
lib: zstd: Improve decode performance

To speed up decode performance, optimizations are brought from zstd
github repository and ported as kernel-style.

Since the low-level algorithm is preferred in linux due to
compression/decompression performance (default level 3), the
optimization for low-level is chosed as follows:

  [1] lib: zstd: Speed up single segment zstd_fast by 5%
      (https://github.com/facebook/zstd/pull/1562/commits/95624b77e477752b3c380c22be7bcf67f06c9934)
  [2] perf improvements for zstd decode
      (https://github.com/facebook/zstd/pull/1668/commits/29d1e81bbdfc21085529623e7bc5abcb3e1627ae)
  [3] updated double_fast complementary insertion
      (https://github.com/facebook/zstd/pull/1681/commits/d1327738c277643f09c972a407083ad73c8ecf7b)
  [4] Improvements in zstd decode performance
      (https://github.com/facebook/zstd/pull/1756/commits/b83059958246dfcb5b91af9c187fad8c706869a0)
  [5] Optimize decompression and fix wildcopy overread
      (https://github.com/facebook/zstd/pull/1804/commits/efd37a64eaff5a0a26ae2566fdb45dc4a0c91673)
  [6] Improve ZSTD_highbit32's codegen
      (https://github.com/facebook/zstd/commit/a07da7b0db682c170a330a8c21585be3d68275fa)
  [7] Optimize decompression speed for gcc and clang (#1892)
      (https://github.com/facebook/zstd/commit/718f00ff6fe42db7e6ba09a7f7992b3e85283f77)
  [8] Fix performance regression on aarch64 with clang
      (https://github.com/facebook/zstd/pull/1973/commits/cb2abc3dbe010113d9e00ca3b612bf61983145a2)

Change-Id: Ia2cf120879a415988dbbc2fce59a994915c8c77c
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
9 months agodrm/vc4: add extcon hdmi connection uevent
Seung-Woo Kim [Tue, 30 Jun 2020 05:32:02 +0000 (14:32 +0900)]
drm/vc4: add extcon hdmi connection uevent

Add extcon hdmi connection and disconnection uevent 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>
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
 Conflicts:
drivers/gpu/drm/vc4/vc4_hdmi.h
drivers/gpu/drm/vc4/vc4_hdmi.c

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoARM64: configs: tizen_bcm2711: change BLK_DEV_RAM_SIZE to 32MB
Jaehoon Chung [Mon, 22 Jun 2020 07:03:28 +0000 (16:03 +0900)]
ARM64: configs: tizen_bcm2711: change BLK_DEV_RAM_SIZE to 32MB

Change BLK_DEV_RAM_SIZE from 12MB to 32MB.

Change-Id: Ifbdd9d5ac0ba36cb6ef65b96ac981b496573be6b
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoARM: configs: tizen_bcm2711: change BLK_DEV_RAM_SIZE to 32MB
Jaehoon Chung [Mon, 22 Jun 2020 06:58:23 +0000 (15:58 +0900)]
ARM: configs: tizen_bcm2711: change BLK_DEV_RAM_SIZE to 32MB

Change BLK_DEV_RAM_SIZE from 12MB to 32MB.

Change-Id: I6004bc1f12cdcb3f8c4c3b86cc13c974b3880dba
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoscripts: mkbootimg_rpi4.sh: Fix how to check 64bit
Hoegeun Kwon [Mon, 15 Jun 2020 07:20:33 +0000 (16:20 +0900)]
scripts: mkbootimg_rpi4.sh: Fix how to check 64bit

The CONFIG_64BIT_TIME configuration is used by 32bit kernel, so it is
having problem identifying 64bit. So modify to "CONFIG_64BIT=y".

Change-Id: I0e8b3e34b3faf5f307ce9bc0fef266397ae697a7
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agotools: Add support build for arm64
Hoegeun Kwon [Wed, 10 Jun 2020 10:50:21 +0000 (19:50 +0900)]
tools: Add support build for arm64

Support kernel build for arm64

Change-Id: Id02cf2e57e4c8db134821a50aaaeed278d2407ae
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoscripts: mkbootimg_rpi4.sh: Add support make boot image for arm64
Hoegeun Kwon [Wed, 10 Jun 2020 11:04:00 +0000 (20:04 +0900)]
scripts: mkbootimg_rpi4.sh: Add support make boot image for arm64

Support make boot image for arm64.

Change-Id: I2cb18a0a383fff21c2f158473a51339b1867338a
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agousb: dwc2: gadget: do not reset during core phy init
Seung-Woo Kim [Tue, 9 Jun 2020 10:34:27 +0000 (19:34 +0900)]
usb: dwc2: gadget: do not reset during core phy init

After the commit 1e868545f2bb ("usb: dwc2: gadget: Move gadget phy
init into core phy init"), dwc2 gadget mode with f_fs enumeration
is blocked from recent host kernel. It is because, the commit adds
more usb reset for gadget case, so do not reset during core phy
init for gadget.

Change-Id: I389d56346430d5c27b775270a4cb05b608668c30
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agopackaging: add 64-bit kernel build
Seung-Woo Kim [Fri, 5 Jun 2020 10:37:35 +0000 (19:37 +0900)]
packaging: add 64-bit kernel build

Add 64-bit kernel build for rpi4.

Change-Id: Idd659915d838f6eb7bfebc5007a15d6fa142ad7a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agorpi4: boot: Add 64-bit config.txt
Seung-Woo Kim [Fri, 5 Jun 2020 10:37:00 +0000 (19:37 +0900)]
rpi4: boot: Add 64-bit config.txt

Add 64-bit config.txt with booting u-boot.bin.

Change-Id: I14e8e76a4244106f71c6bb8e08bfeb5858cac2db
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM64: configs: tizen_bcm2711_defconfig: Enable tizen configs
Seung-Woo Kim [Fri, 5 Jun 2020 10:08:27 +0000 (19:08 +0900)]
ARM64: configs: tizen_bcm2711_defconfig: Enable tizen configs

Enable tizen configs comparing between bcm2711_defconfig and
tizen_bcm2711_defconfig from arch/arm/congifs/.

Change-Id: I8fc700809903c21e35573f9a93d171047ab17f83
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM64: configs: tizen_bcm2711_defconfig: create tizen config from rpi os config
Seung-Woo Kim [Mon, 8 Jun 2020 02:02:43 +0000 (11:02 +0900)]
ARM64: configs: tizen_bcm2711_defconfig: create tizen config from rpi os config

RPI4 has 64-bit build defconfig. Create base for tizen 64-bit rpi4
defconfig by copying from raspberry os kernel confg.

Note: copied defconfig based on commit 4bd3198f16b9 ("configs: Use the upstream cpufreq driver") of rpi-5.4.y

Change-Id: I2f774528b1ebd7edd8e126f38f4d3d4c1ad9e491
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Disable RAID6_PQ_BENCHMARK
Junghoon Kim [Mon, 20 Jan 2020 06:06:40 +0000 (15:06 +0900)]
ARM: tizen_bcm2711_defconfig: Disable RAID6_PQ_BENCHMARK

Skip the algorithm benchmarking process of RAID6. This is helpful for
systems where fast kernel startup is important. Also, The option is not
crucial for the rpi boards.

Change-Id: I68a9cc82b1320cb47442456f3f408cf7e8609c64
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoARM: tizen_bcm2711_defconfig: Enable btrfs filesystem
Jaehoon Chung [Tue, 9 Jun 2020 11:15:33 +0000 (20:15 +0900)]
ARM: tizen_bcm2711_defconfig: Enable btrfs filesystem

Enable btrfs filesystem to use it as the rootfs mount for the RPI4 board.
- This patch is taken from tizen branch (commit 863df9285d98)

Change-Id: I0f81313e3318a4159b8646693845625313f50e30
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>