History

Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core fixes from Thomas Gleixner: "A small set of core updates: - Make the watchdog respect the selected CPU mask again. That was broken by the rework of the watchdog thread management and caused inconsistent state and NMI watchdog being unstoppable. - Ensure that the objtool build can find the libelf location. - Remove dead kcore stub code" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: watchdog: Respect watchdog cpumask on CPU hotplug objtool: Query pkg-config for libelf location proc/kcore: Remove unused kclist_add_remap()

Linus Torvalds committed 7 years ago

Commit f78b5be2 parents 6536c5f 7dd47614 files · +12 −16Browse files

Unified · Split

4 files
  1. Makefile +3 −1
  2. include/linux/kcore.h +0 −11
  3. kernel/watchdog.c +4 −2
  4. tools/objtool/Makefile +5 −2
Makefile+3−1
@@ -953,9 +953,11 @@ mod_sign_cmd = true · 952 unmodified lines
953endif953endif
954export mod_sign_cmd954export mod_sign_cmd
955 955
956HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
957
956ifdef CONFIG_STACK_VALIDATION958ifdef 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 FORCE962 objtool_target := tools/objtool FORCE
961 else963 else
include/linux/kcore.h+0−11
@@ -38,12 +38,6 @@ struct vmcoredd_node { · 37 unmodified lines
38 38
39#ifdef CONFIG_PROC_KCORE39#ifdef CONFIG_PROC_KCORE
40void __init kclist_add(struct kcore_list *, void *, size_t, int type);40void __init kclist_add(struct kcore_list *, void *, size_t, int type);
41static inline
42void 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
48extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn));42extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn));
49#else43#else
@@ -51,11 +45,6 @@ static inline · 1 unmodified line
51void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)45void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
52{46{
53}47}
54
55static inline
56void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz)
57{
58}
59#endif48#endif
60 49
61#endif /* _LINUX_KCORE_H */50#endif /* _LINUX_KCORE_H */
kernel/watchdog.c+4−2
@@ -554,13 +554,15 @@ static void softlockup_start_all(void) · 553 unmodified lines
554 554
555int lockup_detector_online_cpu(unsigned int cpu)555int 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
561int lockup_detector_offline_cpu(unsigned int cpu)562int 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
tools/objtool/Makefile+5−2
@@ -25,14 +25,17 @@ LIBSUBCMD = $(LIBSUBCMD_OUTPUT)libsubcmd.a · 24 unmodified lines
25OBJTOOL := $(OUTPUT)objtool25OBJTOOL := $(OUTPUT)objtool
26OBJTOOL_IN := $(OBJTOOL)-in.o26OBJTOOL_IN := $(OBJTOOL)-in.o
27 27
28LIBELF_FLAGS := $(shell pkg-config libelf --cflags 2>/dev/null)
29LIBELF_LIBS := $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
30
28all: $(OBJTOOL)31all: $(OBJTOOL)
29 32
30INCLUDES := -I$(srctree)/tools/include \33INCLUDES := -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)/include35 -I$(srctree)/tools/objtool/arch/$(ARCH)/include
33WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed36WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
34CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES)37CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
35LDFLAGS += -lelf $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)38LDFLAGS += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
36 39
37# Allow old libelf to be used:40# Allow old libelf to be used:
38elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)41elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t