diff --git a/drivers/gpu/arm/mali/Kbuild b/drivers/gpu/arm/mali/Kbuild index ea4228adf15117..d5e91fcea8ab4c 100755 --- a/drivers/gpu/arm/mali/Kbuild +++ b/drivers/gpu/arm/mali/Kbuild @@ -25,7 +25,7 @@ MALI_ENABLE_CPU_CYCLES ?= 0 # For customer releases the Linux Device Drivers will be provided as ARM proprietary and GPL releases: # The ARM proprietary product will only include the license/proprietary directory # The GPL product will only include the license/gpl directory -ifeq ($(wildcard $(src)/linux/license/gpl/*),) +ifeq ($(wildcard $(srctree)/$(src)/linux/license/gpl/*),) ccflags-y += -I$(src)/linux/license/proprietary ifeq ($(CONFIG_MALI400_PROFILING),y) $(error Profiling is incompatible with non-GPL license) @@ -57,7 +57,7 @@ ifeq ($(MALI_PLATFORM_FILES),) ifeq ($(CONFIG_ARCH_EXYNOS4),y) EXTRA_DEFINES += -DMALI_FAKE_PLATFORM_DEVICE=1 export MALI_PLATFORM=exynos4 -export MALI_PLATFORM_FILES_BUILDIN = $(notdir $(wildcard $(src)/platform/$(MALI_PLATFORM)/*.c)) +export MALI_PLATFORM_FILES_BUILDIN = $(notdir $(wildcard $(srctree)/$(src)/platform/$(MALI_PLATFORM)/*.c)) export MALI_PLATFORM_FILES_ADD_PREFIX = $(addprefix platform/$(MALI_PLATFORM)/,$(MALI_PLATFORM_FILES_BUILDIN)) endif endif diff --git a/drivers/gpu/arm/ump/Kbuild b/drivers/gpu/arm/ump/Kbuild index 11b9ab56c99bb2..4437fe65a0ce42 100755 --- a/drivers/gpu/arm/ump/Kbuild +++ b/drivers/gpu/arm/ump/Kbuild @@ -13,7 +13,7 @@ CONFIG ?= default # Validate selected config -ifneq ($(shell [ -d $(src)/arch-$(CONFIG) ] && [ -f $(src)/arch-$(CONFIG)/config.h ] && echo "OK"), OK) +ifneq ($(shell [ -d $(srctree)/$(src)/arch-$(CONFIG) ] && [ -f $(srctree)/$(src)/arch-$(CONFIG)/config.h ] && echo "OK"), OK) $(warning Current directory is $(src)) $(error No configuration found for config $(CONFIG). Check that arch-$(CONFIG)/config.h exists) else diff --git a/include/linux/log2.h b/include/linux/log2.h index fd7ff3d91e6a92..f38fae23bdac52 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h @@ -15,12 +15,6 @@ #include #include -/* - * deal with unrepresentable constant logarithms - */ -extern __attribute__((const, noreturn)) -int ____ilog2_NaN(void); - /* * non-constant log of base 2 calculators * - the arch may override these in asm/bitops.h if they can be implemented @@ -85,7 +79,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) #define ilog2(n) \ ( \ __builtin_constant_p(n) ? ( \ - (n) < 1 ? ____ilog2_NaN() : \ + (n) < 2 ? 0 : \ (n) & (1ULL << 63) ? 63 : \ (n) & (1ULL << 62) ? 62 : \ (n) & (1ULL << 61) ? 61 : \ @@ -148,10 +142,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) (n) & (1ULL << 4) ? 4 : \ (n) & (1ULL << 3) ? 3 : \ (n) & (1ULL << 2) ? 2 : \ - (n) & (1ULL << 1) ? 1 : \ - (n) & (1ULL << 0) ? 0 : \ - ____ilog2_NaN() \ - ) : \ + 1 ) : \ (sizeof(n) <= 4) ? \ __ilog2_u32(n) : \ __ilog2_u64(n) \