Skip to content

Commit f78b5be

Browse files
committed
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()
2 parents 6536c5f + 7dd4761 commit f78b5be

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,9 +953,11 @@ mod_sign_cmd = true
953953
endif
954954
export mod_sign_cmd
955955

956+
HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
957+
956958
ifdef CONFIG_STACK_VALIDATION
957959
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)
959961
ifeq ($(has_libelf),1)
960962
objtool_target := tools/objtool FORCE
961963
else

include/linux/kcore.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,13 @@ struct vmcoredd_node {
3838

3939
#ifdef CONFIG_PROC_KCORE
4040
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-
}
4741

4842
extern int __init register_mem_pfn_is_ram(int (*fn)(unsigned long pfn));
4943
#else
5044
static inline
5145
void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
5246
{
5347
}
54-
55-
static inline
56-
void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz)
57-
{
58-
}
5948
#endif
6049

6150
#endif /* _LINUX_KCORE_H */

kernel/watchdog.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,13 +554,15 @@ static void softlockup_start_all(void)
554554

555555
int lockup_detector_online_cpu(unsigned int cpu)
556556
{
557-
watchdog_enable(cpu);
557+
if (cpumask_test_cpu(cpu, &watchdog_allowed_mask))
558+
watchdog_enable(cpu);
558559
return 0;
559560
}
560561

561562
int lockup_detector_offline_cpu(unsigned int cpu)
562563
{
563-
watchdog_disable(cpu);
564+
if (cpumask_test_cpu(cpu, &watchdog_allowed_mask))
565+
watchdog_disable(cpu);
564566
return 0;
565567
}
566568

tools/objtool/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@ LIBSUBCMD = $(LIBSUBCMD_OUTPUT)libsubcmd.a
2525
OBJTOOL := $(OUTPUT)objtool
2626
OBJTOOL_IN := $(OBJTOOL)-in.o
2727

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+
2831
all: $(OBJTOOL)
2932

3033
INCLUDES := -I$(srctree)/tools/include \
3134
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
3235
-I$(srctree)/tools/objtool/arch/$(ARCH)/include
3336
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
34-
CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES)
35-
LDFLAGS += -lelf $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
37+
CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
38+
LDFLAGS += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
3639

3740
# Allow old libelf to be used:
3841
elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)

0 commit comments

Comments
 (0)