Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ftrace: Fix assuming build time sort works for s390
To speed up the boot process, as mcount_loc needs to be sorted for ftrace to work properly, sorting it at build time is more efficient than boot up and can save milliseconds of time. Unfortunately, this change broke s390 as it will modify the mcount_loc location after the sorting takes place and will put back the unsorted locations. Since the sorting is skipped at boot up if it is believed that it was sorted at run time, ftrace can crash as its algorithms are dependent on the list being sorted. Add a new config BUILDTIME_MCOUNT_SORT that is set when BUILDTIME_TABLE_SORT but not if S390 is set. Use this config to determine if sorting should take place at boot up. Link: https://lore.kernel.org/all/[email protected]/ Fixes: 72b3942 ("scripts: ftrace - move the sort-processing in ftrace_init") Reported-by: Sven Schnelle <[email protected]> Tested-by: Heiko Carstens <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
- Loading branch information