Odroid XU3/4 Kernel 4.18

Moderators: mdrjr, odroid

Odroid XU3/4 Kernel 4.18

Unread postby memeka » Wed Jul 11, 2018 2:06 pm

Hi all,

I have a working 4.18 kernel branch for Odroid XU3/4 here: https://github.com/mihailescu2m/linux/tree/odroidxu4-4.18.y
I've ported as many things as I could and were important (to me :twisted: ) - mali, HMP, media fixes, hdmi resolutions, ASV, TMU, USB3 fixes, regulator fixes, mmc/sd fixes, pwm fan, netconsole...

Missing: touchscreen / INA / LIRC / TFT drivers
Untested: audio (it's using mainline drivers)

Let me know your experiences :)
User avatar
memeka
 
Posts: 4003
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/4 Kernel 4.18

Unread postby moon.linux » Wed Jul 11, 2018 3:03 pm

Do not port TMU changes in the future as their has been overhaul of this driver in linux-next so we have to wait for 4.19.x to get all the fix for tmu to be merged.
moon.linux
 
Posts: 1135
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/4 Kernel 4.18

Unread postby memeka » Wed Jul 11, 2018 3:23 pm

I've seen TMU has been already updated in 4.18, I have ported the changes as required (e.g. no more tmu_initialize, no more efuse values in dtsi, and the new exynos5420_tmu_set_trip_temp and exynos5420_tmu_set_trip_hyst functions).
User avatar
memeka
 
Posts: 4003
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/4 Kernel 4.18

Unread postby moon.linux » Thu Jul 12, 2018 5:54 pm

I see some tmu clean up patches are queue in too be landed in 4.19.x kernel.
Code: Select all
https://lkml.org/lkml/2018/4/26/450

Additional to the these changes I have identified some usefulness commits and should be dropped in the future series.
And new fix to existing problem need to found out.
Attachments
odroidxu4_4.18.x_badcommits.txt
some bad commits
(1.52 KiB) Downloaded 30 times
moon.linux
 
Posts: 1135
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/4 Kernel 4.18

Unread postby memeka » Thu Jul 12, 2018 7:39 pm

Code: Select all
55acedf3b59045d30549b971bdcd2bbc6e63af8d ARM: dts: exynos5420: set fsys_clk to 200Mhz (aclk200)
reason: mmc operated at min 50Mhz to 200Mhz set top max speed to 200Mhz


I think this was done to increase speed of mmc? but indeed i don't like it and will drop it.

Code: Select all
b8b5214e9819810f79d6b5ef51def82773ef668d net: r8152: set mac address from bootargs parameter r8152.macaddr
reason: mac addredd is read from efuse


I think the idea was for people to set their own MAC address. But this indeed should not be in kernel, whoever wants that they can modify their own kernel.

Code: Select all
fc528245ce7a13a9c132e8aec0a9a8d1680d8c43 regulator: s2mps11: call shutdown function to poweroff
reason: all ready fix eariler


ok

Code: Select all
ce9ffcc08a9b5b5d101b4fb2a1f6ae3d01539441 ARM: dts: exynos: enable per cpu thermal trips for Odroid XU3/4
reason: dts thermal nodes get override percpu it's not a good approch, keep it simple to maintain.


i like this approach, because nobody will have different settings for cores of the same type. so if you want to make a change, you need to change 4 times in mainline, and you can make errors. with this approach, you change in only 1 place.

Code: Select all
70844ce1bd7f21c4bae956f26bdea635ecb4cd19 thermal: odroid-xu4: ignore invalid temperatures from broken TMU


this one was a fix for someone that had the TMU fried. but i think i can remove it

Code: Select all
20094bea8ca8c8797610aa4efae8a0e063d4b0ba thermal: exynos: add support for Exynos5422 TMU
reason: tmu driver is fixed with all the changes for future with some patches pending.


i told you, changes are already in 4.18: https://github.com/torvalds/linux/commi ... ynos_tmu.c
but these changes do not add support for 5420. if you boot mainline, TMU will complain that there are more trip points defined. this is because 5420 has 4 trips, but the code is based on exynos4 which has a smaller number of trip points defined.

my patch is done according to the new tmu driver spec, and adds support for 542x to the new tmu driver.

Code: Select all
85ceebb8369df4ae5ede2e8fefde646ed0387661 Revert "softirq: Let ksoftirqd do its job"
reason: no need for some revery unless you find a bug in currect kernel


sure, why not :)

Code: Select all
a616b51d3d930a9f63269f1d45bada7c18ab7f9d ARM: exynos: add machine description for ODROID-XU3/4
reason: changes have been fixe and merged into mainline.


what changes are in mainline? this sets the information from /proc/cpu to "ODROID XU4" instead of "SAMSUNG EXYNOS (Flattened Device Tree)"

Code: Select all
10217a7c8c18a9482e614d96446604feda620e4f  hperf_hmp: code fixes for kernel 4.18
hmp core fix dont not support big scaling between the little and big core cpus.
i feel thse changes need to be dropped in the future as it affect many core
sheduling alogritum.


i have tried the big little switcher, and performance is not as good as HMP. you can test and let me know what works better, but for now HMP provides the best performance....
User avatar
memeka
 
Posts: 4003
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/4 Kernel 4.18

Unread postby elatllat » Fri Jul 13, 2018 9:36 am

Thanks memeka, I hope 4.18 will be a LTS (and then supported by odroid) because it's the first one with some 32 bit patchs for speculative exicution bugs.
elatllat
 
Posts: 1010
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1

Re: Odroid XU3/4 Kernel 4.18

Unread postby memeka » Fri Jul 13, 2018 10:32 am

elatllat wrote:Thanks memeka, I hope 4.18 will be a LTS (and then supported by odroid) because it's the first one with some 32 bit patchs for speculative exicution bugs.


actually that's not correct.
@mdrjr backported the patches for spectre on 4.14 kernel.
also, support for A15 spectre on 4.18 kernel is not complete anyway, according to boot log:
Code: Select all
CPU4: Spectre v2: incorrect context switching function, system vulnerable
CPU5: Spectre v2: incorrect context switching function, system vulnerable
CPU6: Spectre v2: incorrect context switching function, system vulnerable
CPU7: Spectre v2: incorrect context switching function, system vulnerable


according to https://patchwork.kernel.org/patch/10435941/:
Warn at error level if the context switching function is not what we
are expecting. This can happen with big.Little systems, which we
currently do not support.
User avatar
memeka
 
Posts: 4003
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/4 Kernel 4.18

Unread postby elatllat » Fri Jul 13, 2018 10:37 am

memeka wrote:@mdrjr backported the patches for spectre on 4.14 kernel.

Last I looked only the 64 bit patches were applied, maybe 32bit patches were only applied to his img and not the odroid one.
elatllat
 
Posts: 1010
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1

Re: Odroid XU3/4 Kernel 4.18

Unread postby memeka » Mon Jul 16, 2018 1:52 pm

@moon.linux: you said to remove:
fc528245ce7a13a9c132e8aec0a9a8d1680d8c43 regulator: s2mps11: call shutdown function to poweroff

but this patch adds the pmic shutdown function, which does not exist in mainline.

There are several subsequent patches that add their own reset procedures in the pmic shutdown function from this patch:
* regulator: s2mps11: mmc power control for UHS mode https://github.com/mihailescu2m/linux/c ... 45dcd62764
* regulator: s2mps11: add ethernet power reset in shutdown function: https://github.com/mihailescu2m/linux/c ... 0fd54af913
* regulator: s2mps11: add sdmmc DDR50/SDR50 modes and modify sd reset in UHS mode: https://github.com/mihailescu2m/linux/c ... 2cc319a6df

You are saying that all these patches are not needed anymore?

In addition, there is a (newer) regulator patch on HK 4.14 kernel:
regulator: s2mps11: add delay in BUCK9 reset https://github.com/mihailescu2m/linux/c ... e68978c98e

Any ideas why this patch was added?
User avatar
memeka
 
Posts: 4003
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/4 Kernel 4.18

Unread postby moon.linux » Mon Jul 16, 2018 2:44 pm

No shutdown feature was solved long time ago with following commit.
Code: Select all
commit d785334a0d5deff30a487c74324b842d2179553d
Author: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Date:   Mon Sep 14 21:12:45 2015 +0900

    mfd: s2mps11: Add manual shutdown method for Odroid XU3

    On Odroid XU3 board (with S2MPS11 PMIC) the PWRHOLD bit in CTRL1
    register must be manually set to 0 before initiating power off sequence.

    One of usual power down methods for Exynos based devices looks like:
    1. PWRHOLD pin of PMIC is connected to PSHOLD of Exynos SoC.
    2. Exynos holds up this pin during system operation.
    3. ACOKB pin of PMIC is pulled up to VBATT and optionally to pin in
       other device.
    4. When PWRHOLD/PSHOLD goes low, the PMIC will turn off the power if
       ACOKB goes high.

We have done some hack with above commit to solve reboot/reset of usb ports ,mmc and ethernet issue.
we have got some time to provide proper fix to all these issue,I feel most of them are relate to u-boot changes.

Latest u-boot have regulator feature enable so we can perform some of these before we reboot cold boot.
Lots of feature need retesting on new kernel as new feature were getting added.
moon.linux
 
Posts: 1135
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/4 Kernel 4.18

Unread postby moon.linux » Sat Jul 21, 2018 1:56 am

Looks like specter feature is broker for big.Little architecture. See below mailing list.

Code: Select all
https://lkml.org/lkml/2018/7/19/234
moon.linux
 
Posts: 1135
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/4 Kernel 4.18

Unread postby memeka » Sat Jul 21, 2018 7:18 am

yes, i have stated that already 2 posts above: viewtopic.php?f=95&t=31500&p=229404#p228542
User avatar
memeka
 
Posts: 4003
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/4 Kernel 4.18

Unread postby moon.linux » Tue Jul 24, 2018 11:46 am

Some new interesting thing development Energy Aware Scheduling to measure dynamic-power-coefficient
Code: Select all
https://www.spinics.net/lists/arm-kernel/msg667315.html
moon.linux
 
Posts: 1135
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/4 Kernel 4.18

Unread postby DarkBahamut » Fri Jul 27, 2018 4:28 am

It's an interesting post, but the funny thing is Samsung already have a CPU power coefficients coded into the kernel for all to see. So I fear someone just spent a lot of time calculating something that's already available :oops:

https://github.com/hardkernel/linux/blo ... .c#L43-L44
DarkBahamut
 
Posts: 310
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4, N1

Re: Odroid XU3/4 Kernel 4.18

Unread postby daviessm » Mon Aug 13, 2018 10:30 pm

This works well for me (I needed some btrfs fixes) - any chance you could pull up to the final release?
daviessm
 
Posts: 109
Joined: Thu Jul 25, 2013 2:14 am
Location: Belfast, UK
languages_spoken: English, German
ODROIDs: X2, XU4


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 4 guests