Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'xtensa-20210902' of git://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa updates from Max Filippov:

- fix kconfig unmet dependency warning for HAVE_FUTEX_CMPXCHG

- add fairness to handling IRQs of the same priority

- fix pointer usage before NULL check in ISS console driver

- build system cleanups

* tag 'xtensa-20210902' of git://github.com/jcmvbkbc/linux-xtensa:
xtensa: move core-y in arch/xtensa/Makefile to arch/xtensa/Kbuild
xtensa: build platform directories unconditionally
xtensa: do not build variants directory
xtensa: remove unneeded exports
xtensa: ISS: don't use string pointer before NULL check
xtensa: add fairness to IRQ handling
xtensa: fix kconfig unmet dependency warning for HAVE_FUTEX_CMPXCHG

+16 -16
+1
arch/xtensa/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 + obj-y += kernel/ mm/ platforms/ boot/dts/
+1 -1
arch/xtensa/Kconfig
··· 31 31 select HAVE_DMA_CONTIGUOUS 32 32 select HAVE_EXIT_THREAD 33 33 select HAVE_FUNCTION_TRACER 34 - select HAVE_FUTEX_CMPXCHG if !MMU 34 + select HAVE_FUTEX_CMPXCHG if !MMU && FUTEX 35 35 select HAVE_HW_BREAKPOINT if PERF_EVENTS 36 36 select HAVE_IRQ_TIME_ACCOUNTING 37 37 select HAVE_PCI
-12
arch/xtensa/Makefile
··· 17 17 variant-y := $(patsubst "%",%,$(CONFIG_XTENSA_VARIANT_NAME)) 18 18 19 19 VARIANT = $(variant-y) 20 - export VARIANT 21 20 22 21 ifneq ($(VARIANT),) 23 22 ifdef cross_compiling ··· 31 32 platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 32 33 platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss 33 34 platform-$(CONFIG_XTENSA_PLATFORM_XTFPGA) := xtfpga 34 - 35 - PLATFORM = $(platform-y) 36 - export PLATFORM 37 35 38 36 # temporarily until string.h is fixed 39 37 KBUILD_CFLAGS += -ffreestanding -D__linux__ ··· 53 57 54 58 KBUILD_DEFCONFIG := iss_defconfig 55 59 56 - # Only build variant and/or platform if it includes a Makefile 57 - 58 - buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/) 59 - buildplf := $(shell test -e $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/) 60 - 61 60 # Find libgcc.a 62 61 63 62 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 64 63 65 64 head-y := arch/xtensa/kernel/head.o 66 - core-y += arch/xtensa/kernel/ arch/xtensa/mm/ 67 - core-y += $(buildvar) $(buildplf) 68 - core-y += arch/xtensa/boot/dts/ 69 65 70 66 libs-y += arch/xtensa/lib/ $(LIBGCC) 71 67
+7
arch/xtensa/kernel/traps.c
··· 268 268 XCHAL_INTLEVEL7_MASK, 269 269 }; 270 270 struct pt_regs *old_regs; 271 + unsigned unhandled = ~0u; 271 272 272 273 trace_hardirqs_off(); 273 274 ··· 284 283 for (level = LOCKLEVEL; level > 0; --level) { 285 284 if (int_at_level & int_level_mask[level]) { 286 285 int_at_level &= int_level_mask[level]; 286 + if (int_at_level & unhandled) 287 + int_at_level &= unhandled; 288 + else 289 + unhandled |= int_level_mask[level]; 287 290 break; 288 291 } 289 292 } ··· 295 290 if (level == 0) 296 291 break; 297 292 293 + /* clear lowest pending irq in the unhandled mask */ 294 + unhandled ^= (int_at_level & -int_at_level); 298 295 do_IRQ(__ffs(int_at_level), regs); 299 296 } 300 297
+4
arch/xtensa/platforms/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + obj-$(CONFIG_XTENSA_PLATFORM_XT2000) += xt2000/ 3 + obj-$(CONFIG_XTENSA_PLATFORM_ISS) += iss/ 4 + obj-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += xtfpga/
+3 -3
arch/xtensa/platforms/iss/console.c
··· 199 199 200 200 static void iss_console_write(struct console *co, const char *s, unsigned count) 201 201 { 202 - int len = strlen(s); 203 - 204 - if (s != 0 && *s != 0) 202 + if (s && *s != 0) { 203 + int len = strlen(s); 205 204 simc_write(1, s, count < len ? count : len); 205 + } 206 206 } 207 207 208 208 static struct tty_driver* iss_console_device(struct console *c, int *index)