diff options
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/Kconfig | 1 | ||||
-rw-r--r-- | arch/um/include/asm/pci.h | 2 | ||||
-rw-r--r-- | arch/um/kernel/kmsg_dump.c | 24 | ||||
-rw-r--r-- | arch/um/kernel/process.c | 2 |
4 files changed, 17 insertions, 12 deletions
diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig index 5903e2b598aa..a4f0a19fbe14 100644 --- a/arch/um/drivers/Kconfig +++ b/arch/um/drivers/Kconfig @@ -381,7 +381,6 @@ config UML_PCI_OVER_VIRTIO select UML_IOMEM_EMULATION select UML_DMA_EMULATION select PCI_MSI - select PCI_MSI_IRQ_DOMAIN select PCI_LOCKLESS_CONFIG config UML_PCI_OVER_VIRTIO_DEVICE_ID diff --git a/arch/um/include/asm/pci.h b/arch/um/include/asm/pci.h index 34fe4921b5fa..238d2e7faff8 100644 --- a/arch/um/include/asm/pci.h +++ b/arch/um/include/asm/pci.h @@ -7,7 +7,7 @@ /* Generic PCI */ #include <asm-generic/pci.h> -#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN +#ifdef CONFIG_PCI_MSI /* * This is a bit of an annoying hack, and it assumes we only have * the virt-pci (if anything). Which is true, but still. diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c index 0224fcb36e22..427dd5a61a38 100644 --- a/arch/um/kernel/kmsg_dump.c +++ b/arch/um/kernel/kmsg_dump.c @@ -16,20 +16,26 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper, struct console *con; unsigned long flags; size_t len = 0; + int cookie; - /* only dump kmsg when no console is available */ - if (!console_trylock()) - return; + /* + * If no consoles are available to output crash information, dump + * the kmsg buffer to stdout. + */ - for_each_console(con) { - if(strcmp(con->name, "tty") == 0 && - (con->flags & (CON_ENABLED | CON_CONSDEV)) != 0) { + cookie = console_srcu_read_lock(); + for_each_console_srcu(con) { + /* + * The ttynull console and disabled consoles are ignored + * since they cannot output. All other consoles are + * expected to output the crash information. + */ + if (strcmp(con->name, "ttynull") != 0 && + (console_srcu_read_flags(con) & CON_ENABLED)) { break; } } - - console_unlock(); - + console_srcu_read_unlock(cookie); if (con) return; diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index dc1c1aeade90..47830ade35ed 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -357,7 +357,7 @@ int singlestepping(void * t) unsigned long arch_align_stack(unsigned long sp) { if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) - sp -= prandom_u32_max(8192); + sp -= get_random_u32_below(8192); return sp & ~0xf; } #endif |