diff options
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | include/linux/kcore.h | 11 | ||||
| -rw-r--r-- | kernel/watchdog.c | 6 | ||||
| -rw-r--r-- | tools/objtool/Makefile | 7 |
4 files changed, 12 insertions, 16 deletions
| @@ -953,9 +953,11 @@ mod_sign_cmd = true | |||
| 953 | endif | 953 | endif |
| 954 | export mod_sign_cmd | 954 | export mod_sign_cmd |
| 955 | 955 | ||
| 956 | HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf) | ||
| 957 | |||
| 956 | ifdef CONFIG_STACK_VALIDATION | 958 | ifdef CONFIG_STACK_VALIDATION |
| 957 | has_libelf := $(call try-run,\ | 959 | has_libelf := $(call try-run,\ |
| 958 | echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0) | 960 | echo "int main() {}" | $(HOSTCC) -xc -o /dev/null $(HOST_LIBELF_LIBS) -,1,0) |
| 959 | ifeq ($(has_libelf),1) | 961 | ifeq ($(has_libelf),1) |
| 960 | objtool_target := tools/objtool FORCE | 962 | objtool_target := tools/objtool FORCE |
| 961 | else | 963 | else |
diff --git a/include/linux/kcore.h b/include/linux/kcore.h index c843f4a9c512..da676cdbd727 100644 --- a/include/linux/kcore.h +++ b/include/linux/kcore.h | |||
| @@ -38,12 +38,6 @@ struct vmcoredd_node { | |||
| 38 | 38 | ||
| 39 | #ifdef CONFIG_PROC_KCORE | 39 | #ifdef CONFIG_PROC_KCORE |
| 40 | void __init kclist_add(struct kcore_list *, void *, size_t, int type); | 40 | void __init kclist_add(struct kcore_list *, void *, size_t, int type); |
| 41 | static inline | ||
| 42 | void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz) | ||
| 43 | { | ||
| 44 | m->vaddr = (unsigned long)vaddr; | ||
| 45 | kclist_add(m, addr, sz, KCORE_REMAP); | ||
| 46 | } | ||
| 47 | 41 | ||
| 48 | extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn)); | 42 | extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn)); |
| 49 | #else | 43 | #else |
| @@ -51,11 +45,6 @@ static inline | |||
| 51 | void kclist_add(struct kcore_list *new, void *addr, size_t size, int type) | 45 | void kclist_add(struct kcore_list *new, void *addr, size_t size, int type) |
| 52 | { | 46 | { |
| 53 | } | 47 | } |
| 54 | |||
| 55 | static inline | ||
| 56 | void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz) | ||
| 57 | { | ||
| 58 | } | ||
| 59 | #endif | 48 | #endif |
| 60 | 49 | ||
| 61 | #endif /* _LINUX_KCORE_H */ | 50 | #endif /* _LINUX_KCORE_H */ |
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 403c9bd90413..6a5787233113 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
| @@ -554,13 +554,15 @@ static void softlockup_start_all(void) | |||
| 554 | 554 | ||
| 555 | int lockup_detector_online_cpu(unsigned int cpu) | 555 | int lockup_detector_online_cpu(unsigned int cpu) |
| 556 | { | 556 | { |
| 557 | watchdog_enable(cpu); | 557 | if (cpumask_test_cpu(cpu, &watchdog_allowed_mask)) |
| 558 | watchdog_enable(cpu); | ||
| 558 | return 0; | 559 | return 0; |
| 559 | } | 560 | } |
| 560 | 561 | ||
| 561 | int lockup_detector_offline_cpu(unsigned int cpu) | 562 | int lockup_detector_offline_cpu(unsigned int cpu) |
| 562 | { | 563 | { |
| 563 | watchdog_disable(cpu); | 564 | if (cpumask_test_cpu(cpu, &watchdog_allowed_mask)) |
| 565 | watchdog_disable(cpu); | ||
| 564 | return 0; | 566 | return 0; |
| 565 | } | 567 | } |
| 566 | 568 | ||
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index c9d038f91af6..53f8be0f4a1f 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile | |||
| @@ -25,14 +25,17 @@ LIBSUBCMD = $(LIBSUBCMD_OUTPUT)libsubcmd.a | |||
| 25 | OBJTOOL := $(OUTPUT)objtool | 25 | OBJTOOL := $(OUTPUT)objtool |
| 26 | OBJTOOL_IN := $(OBJTOOL)-in.o | 26 | OBJTOOL_IN := $(OBJTOOL)-in.o |
| 27 | 27 | ||
| 28 | LIBELF_FLAGS := $(shell pkg-config libelf --cflags 2>/dev/null) | ||
| 29 | LIBELF_LIBS := $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf) | ||
| 30 | |||
| 28 | all: $(OBJTOOL) | 31 | all: $(OBJTOOL) |
| 29 | 32 | ||
| 30 | INCLUDES := -I$(srctree)/tools/include \ | 33 | INCLUDES := -I$(srctree)/tools/include \ |
| 31 | -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \ | 34 | -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \ |
| 32 | -I$(srctree)/tools/objtool/arch/$(ARCH)/include | 35 | -I$(srctree)/tools/objtool/arch/$(ARCH)/include |
| 33 | WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed | 36 | WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed |
| 34 | CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) | 37 | CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS) |
| 35 | LDFLAGS += -lelf $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS) | 38 | LDFLAGS += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS) |
| 36 | 39 | ||
| 37 | # Allow old libelf to be used: | 40 | # Allow old libelf to be used: |
| 38 | elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr) | 41 | elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr) |
