$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
endif
- # Support for using generic headers in asm-generic
- PHONY += asm-generic uapi-asm-generic
- asm-generic: uapi-asm-generic
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
- src=asm obj=arch/$(SRCARCH)/include/generated/asm
- uapi-asm-generic:
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
- src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm
-
- # To make sure we do not include .config for any of the *config targets
- # catch them early, and hand them over to scripts/kconfig/Makefile
- # It is allowed to specify more targets when calling make, including
- # mixing *config targets and build targets.
- # For example 'make oldconfig all'.
- # Detect when mixed targets is specified, and make a second invocation
- # of make so .config is not included in this case either (for *config).
-
- version_h := include/generated/uapi/linux/version.h
- old_version_h := include/linux/version.h
-
- no-dot-config-targets := clean mrproper distclean \
- cscope gtags TAGS tags help% %docs check% coccicheck \
- $(version_h) headers_% archheaders archscripts \
- kernelversion %src-pkg
-
- config-targets := 0
- mixed-targets := 0
- dot-config := 1
-
- ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
- ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
- dot-config := 0
- endif
+ ifeq ($(cc-name),clang)
+ ifneq ($(CROSS_COMPILE),)
-CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%))
++CLANG_TRIPLE ?= $(CROSS_COMPILE)
++CLANG_TARGET := --target=$(notdir $(CLANG_TRIPLE:%-=%))
+ GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..)
endif
-
- ifeq ($(KBUILD_EXTMOD),)
- ifneq ($(filter config %config,$(MAKECMDGOALS)),)
- config-targets := 1
- ifneq ($(words $(MAKECMDGOALS)),1)
- mixed-targets := 1
- endif
- endif
+ ifneq ($(GCC_TOOLCHAIN),)
+ CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN)
endif
- # install and modules_install need also be processed one by one
- ifneq ($(filter install,$(MAKECMDGOALS)),)
- ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
- mixed-targets := 1
- endif
+ KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
+ KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
endif
- ifeq ($(mixed-targets),1)
- # ===========================================================================
- # We're called with mixed targets (*config and build targets).
- # Handle them one by one.
-
- PHONY += $(MAKECMDGOALS) __build_one_by_one
-
- $(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one
- @:
-
- __build_one_by_one:
- $(Q)set -e; \
- for i in $(MAKECMDGOALS); do \
- $(MAKE) -f $(srctree)/Makefile $$i; \
- done
+ RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
+ RETPOLINE_CFLAGS_CLANG := -mretpoline-external-thunk
+ RETPOLINE_CFLAGS := $(call cc-option,$(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG)))
+ export RETPOLINE_CFLAGS
- else
ifeq ($(config-targets),1)
# ===========================================================================
# *config targets only - make sure prerequisites are updated, and descend
setup_timer(&info->timer->timer, idletimer_tg_expired,
(unsigned long) info->timer);
info->timer->refcnt = 1;
+ info->timer->send_nl_msg = (info->send_nl_msg == 0) ? false : true;
+ info->timer->active = true;
+ info->timer->timeout = info->timeout;
+
+ info->timer->delayed_timer_trigger.tv_sec = 0;
+ info->timer->delayed_timer_trigger.tv_nsec = 0;
+ info->timer->work_pending = false;
+ info->timer->uid = 0;
+ get_monotonic_boottime(&info->timer->last_modified_timer);
+
+ info->timer->pm_nb.notifier_call = idletimer_resume;
+ ret = register_pm_notifier(&info->timer->pm_nb);
+ if (ret)
+ printk(KERN_WARNING "[%s] Failed to register pm notifier %d\n",
+ __func__, ret);
+ INIT_WORK(&info->timer->work, idletimer_tg_work);
+
mod_timer(&info->timer->timer,
msecs_to_jiffies(info->timeout * 1000) + jiffies);