android_kernel_xiaomi_sm8350/kernel
Masahiro Yamada 48ffcbf0b9 FROMGIT: kbuild: update config_data.gz only when the content of .config is changed
If the timestamp of the .config file is updated, config_data.gz is
regenerated, then vmlinux is re-linked. This occurs even if the content
of the .config has not changed at all.

This issue was mitigated by commit 67424f61f8 ("kconfig: do not write
.config if the content is the same"); Kconfig does not update the
.config when it ends up with the identical configuration.

The issue is remaining when the .config is created by *_defconfig with
some config fragment(s) applied on top.

This is typical for powerpc and mips, where several *_defconfig targets
are constructed by using merge_config.sh.

One workaround is to have the copy of the .config. The filechk rule
updates the copy, kernel/config_data, by checking the content instead
of the timestamp.

With this commit, the second run with the same configuration avoids
the needless rebuilds.

  $ make ARCH=mips defconfig all
   [ snip ]
  $ make ARCH=mips defconfig all
  *** Default configuration is based on target '32r2el_defconfig'
  Using ./arch/mips/configs/generic_defconfig as base
  Merging arch/mips/configs/generic/32r2.config
  Merging arch/mips/configs/generic/el.config
  Merging ./arch/mips/configs/generic/board-boston.config
  Merging ./arch/mips/configs/generic/board-ni169445.config
  Merging ./arch/mips/configs/generic/board-ocelot.config
  Merging ./arch/mips/configs/generic/board-ranchu.config
  Merging ./arch/mips/configs/generic/board-sead-3.config
  Merging ./arch/mips/configs/generic/board-xilfpga.config
  #
  # configuration written to .config
  #
    SYNC    include/config/auto.conf
    CALL    scripts/checksyscalls.sh
    CALL    scripts/atomic/check-atomics.sh
    CHK     include/generated/compile.h
    CHK     include/generated/autoksyms.h

Reported-by: Elliot Berman <eberman@codeaurora.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Bug: 179648610
(cherry picked from commit b33976d90d1ea7652fff662dcc2234f352346a33
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
 kbuild)
[eberman: Fixed minor conflicts in kernel/.gitignore]
Change-Id: I8c93147c8d5a48d0f5e9abf855870b10c1a24efc
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2021-04-28 12:57:52 -07:00
..
bpf Merge tag 'android11-5.4.86_r00' from 'android11-5.4-lts' into 'android11-5.4' 2021-02-17 16:57:46 +01:00
cgroup ANDROID: cgroup: Add vendor hook to the cgroup 2021-03-09 21:56:56 +00:00
configs
debug kgdb: Make "kgdbcon" work properly with "kgdb_earlycon" 2020-11-05 11:43:16 +01:00
dma This is the 5.4.78 stable release 2020-11-19 08:52:52 +01:00
events This is the 5.4.78 stable release 2020-11-19 08:52:52 +01:00
gcov gcov: add support for GCC 10.1 2020-09-17 13:47:56 +02:00
irq This is the 5.4.86 stable release 2020-12-30 12:31:14 +01:00
livepatch ANDROID: kallsyms: increase KSYM_NAME_LEN 2020-08-04 19:33:41 +00:00
locking Merge tag 'android11-5.4.86_r00' from 'android11-5.4-lts' into 'android11-5.4' 2021-02-17 16:57:46 +01:00
power This is the 5.4.73 stable release 2020-10-29 11:38:08 +01:00
printk This is the 5.4.69 stable release 2020-10-01 18:00:35 +02:00
rcu This is the 5.4.80 stable release 2020-11-25 12:46:13 +01:00
sched ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-01 13:45:14 +00:00
time This is the 5.4.78 stable release 2020-11-19 08:52:52 +01:00
trace Merge tag 'android11-5.4.86_r00' from 'android11-5.4-lts' into 'android11-5.4' 2021-02-17 16:57:46 +01:00
.gitignore FROMGIT: kbuild: update config_data.gz only when the content of .config is changed 2021-04-28 12:57:52 -07:00
acct.c
async.c
audit_fsnotify.c
audit_tree.c
audit_watch.c audit: CONFIG_CHANGE don't log internal bookkeeping as an event 2020-10-01 13:17:32 +02:00
audit.c
audit.h
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
cfi.c ANDROID: cfi: ensure RCU is watching in __cfi_slowpath 2020-11-02 18:55:52 +00:00
compat.c
configs.c
context_tracking.c
cpu_pm.c
cpu.c This is the 5.4.86 stable release 2020-12-30 12:31:14 +01:00
crash_core.c
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c don't dump the threads that had been already exiting when zapped. 2020-11-18 19:20:31 +01:00
extable.c
fail_function.c fail_function: Remove a redundant mutex unlock 2020-11-24 13:29:18 +01:00
fork.c This is the 5.4.76 stable release 2020-11-10 15:10:23 +01:00
freezer.c
futex.c UPSTREAM: futex: Handle faults correctly for PI futexes 2021-01-29 13:16:10 +01:00
gen_kheaders.sh kbuild: add variables for compression tools 2020-09-03 11:27:10 +02:00
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c ANDROID: kallsyms: ignore ThinLTO+CFI hash suffix in kallsyms_lookup_name() 2020-09-22 20:17:26 +00:00
kcmp.c Revert "kernel/kcmp.c: Use new infrastructure to fix deadlocks in execve" 2020-10-01 20:29:16 +02:00
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kexec_core.c
kexec_elf.c
kexec_file.c
kexec_internal.h
kexec.c
kheaders.c
kmod.c
kprobes.c kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE 2020-10-01 13:18:25 +02:00
ksysfs.c
kthread.c Merge branch 'android11-5.4' into 'android11-5.4-lts' 2020-12-11 13:32:37 +01:00
latencytop.c
Makefile FROMGIT: kbuild: update config_data.gz only when the content of .config is changed 2021-04-28 12:57:52 -07:00
module_signature.c
module_signing.c
module-internal.h
module.c Merge branch 'android11-5.4' into 'android11-5.4-lts' 2020-11-14 11:32:19 +01:00
notifier.c kernel/notifier.c: intercept duplicate registrations to avoid infinite loops 2020-10-01 13:17:23 +02:00
nsproxy.c
padata.c
panic.c
params.c
pid_namespace.c
pid.c ANDROID: GKI: pid: Export for find_task_by_vpid 2020-09-28 18:10:49 +00:00
profile.c
ptrace.c ptrace: Set PF_SUPERPRIV when checking capability 2020-11-24 13:29:24 +01:00
range.c
reboot.c This is the 5.4.78 stable release 2020-11-19 08:52:52 +01:00
relay.c kernel/relay.c: fix memleak on destroy relay channel 2020-08-26 10:40:51 +02:00
resource.c
rseq.c
scs.c
seccomp.c seccomp: Set PF_SUPERPRIV when checking capability 2020-11-24 13:29:24 +01:00
signal.c This is the 5.4.76 stable release 2020-11-10 15:10:23 +01:00
smp.c
smpboot.c
smpboot.h
softirq.c
stackleak.c
stacktrace.c
stop_machine.c
sys_ni.c
sys.c ANDROID: Add vendor hooks when syscall prctl finished 2021-03-09 21:57:07 +00:00
sysctl_binary.c
sysctl-test.c kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec() 2020-10-01 13:17:10 +02:00
sysctl.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c usermodehelper: reset umask to default before executing user process 2020-10-14 10:32:58 +02:00
up.c
user_namespace.c
user-return-notifier.c
user.c
utsname_sysctl.c
utsname.c
watchdog_hld.c
watchdog.c
workqueue_internal.h
workqueue.c Merge branch 'android11-5.4' into 'android11-5.4-lts 2020-10-14 09:58:52 +02:00