]> Git Repo - J-linux.git/commitdiff
Merge tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
authorLinus Torvalds <[email protected]>
Fri, 9 Jul 2021 17:19:13 +0000 (10:19 -0700)
committerLinus Torvalds <[email protected]>
Fri, 9 Jul 2021 17:19:13 +0000 (10:19 -0700)
Pull UML updates from Richard Weinberger:

 - Support for optimized routines based on the host CPU

 - Support for PCI via virtio

 - Various fixes

* tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: remove unneeded semicolon in um_arch.c
  um: Remove the repeated declaration
  um: fix error return code in winch_tramp()
  um: fix error return code in slip_open()
  um: Fix stack pointer alignment
  um: implement flush_cache_vmap/flush_cache_vunmap
  um: add a UML specific futex implementation
  um: enable the use of optimized xor routines in UML
  um: Add support for host CPU flags and alignment
  um: allow not setting extra rpaths in the linux binary
  um: virtio/pci: enable suspend/resume
  um: add PCI over virtio emulation driver
  um: irqs: allow invoking time-travel handler multiple times
  um: time-travel/signals: fix ndelay() in interrupt
  um: expose time-travel mode to userspace side
  um: export signals_enabled directly
  um: remove unused smp_sigio_handler() declaration
  lib: add iomem emulation (logic_iomem)
  um: allow disabling NO_IOMEM

1  2 
arch/um/kernel/um_arch.c
drivers/input/joystick/Kconfig
drivers/tty/Kconfig
lib/Makefile

diff --combined arch/um/kernel/um_arch.c
index 9512253947d55dc3121927a9ac15817443e8ea39,0a7eb104850aad46944d3ceae04feba65ce2cc76..a149a5e9a16a176634e59c1dd9e9da33616307a1
@@@ -6,8 -6,8 +6,9 @@@
  #include <linux/delay.h>
  #include <linux/init.h>
  #include <linux/mm.h>
+ #include <linux/ctype.h>
  #include <linux/module.h>
 +#include <linux/panic_notifier.h>
  #include <linux/seq_file.h>
  #include <linux/string.h>
  #include <linux/utsname.h>
@@@ -17,6 -17,7 +18,7 @@@
  #include <linux/suspend.h>
  
  #include <asm/processor.h>
+ #include <asm/cpufeature.h>
  #include <asm/sections.h>
  #include <asm/setup.h>
  #include <as-layout.h>
@@@ -51,9 -52,13 +53,13 @@@ static void __init add_arg(char *arg
   */
  struct cpuinfo_um boot_cpu_data = {
        .loops_per_jiffy        = 0,
-       .ipi_pipe               = { -1, -1 }
+       .ipi_pipe               = { -1, -1 },
+       .cache_alignment        = L1_CACHE_BYTES,
+       .x86_capability         = { 0 }
  };
  
+ EXPORT_SYMBOL(boot_cpu_data);
  union thread_union cpu0_irqstack
        __section(".data..init_irqstack") =
                { .thread_info = INIT_THREAD_INFO(init_task) };
@@@ -63,17 -68,25 +69,25 @@@ static char host_info[(__NEW_UTS_LEN + 
  
  static int show_cpuinfo(struct seq_file *m, void *v)
  {
-       int index = 0;
+       int i = 0;
  
-       seq_printf(m, "processor\t: %d\n", index);
+       seq_printf(m, "processor\t: %d\n", i);
        seq_printf(m, "vendor_id\t: User Mode Linux\n");
        seq_printf(m, "model name\t: UML\n");
        seq_printf(m, "mode\t\t: skas\n");
        seq_printf(m, "host\t\t: %s\n", host_info);
-       seq_printf(m, "bogomips\t: %lu.%02lu\n\n",
+       seq_printf(m, "fpu\t\t: %s\n", cpu_has(&boot_cpu_data, X86_FEATURE_FPU) ? "yes" : "no");
+       seq_printf(m, "flags\t\t:");
+       for (i = 0; i < 32*NCAPINTS; i++)
+               if (cpu_has(&boot_cpu_data, i) && (x86_cap_flags[i] != NULL))
+                       seq_printf(m, " %s", x86_cap_flags[i]);
+       seq_printf(m, "\n");
+       seq_printf(m, "cache_alignment\t: %d\n", boot_cpu_data.cache_alignment);
+       seq_printf(m, "bogomips\t: %lu.%02lu\n",
                   loops_per_jiffy/(500000/HZ),
                   (loops_per_jiffy/(5000/HZ)) % 100);
  
        return 0;
  }
  
@@@ -262,6 -275,30 +276,30 @@@ EXPORT_SYMBOL(end_iomem)
  
  #define MIN_VMALLOC (32 * 1024 * 1024)
  
+ static void parse_host_cpu_flags(char *line)
+ {
+       int i;
+       for (i = 0; i < 32*NCAPINTS; i++) {
+               if ((x86_cap_flags[i] != NULL) && strstr(line, x86_cap_flags[i]))
+                       set_cpu_cap(&boot_cpu_data, i);
+       }
+ }
+ static void parse_cache_line(char *line)
+ {
+       long res;
+       char *to_parse = strstr(line, ":");
+       if (to_parse) {
+               to_parse++;
+               while (*to_parse != 0 && isspace(*to_parse)) {
+                       to_parse++;
+               }
+               if (kstrtoul(to_parse, 10, &res) == 0 && is_power_of_2(res))
+                       boot_cpu_data.cache_alignment = res;
+               else
+                       boot_cpu_data.cache_alignment = L1_CACHE_BYTES;
+       }
+ }
  int __init linux_main(int argc, char **argv)
  {
        unsigned long avail, diff;
        /* OS sanity checks that need to happen before the kernel runs */
        os_early_checks();
  
+       get_host_cpu_features(parse_host_cpu_flags, parse_cache_line);
        brk_start = (unsigned long) sbrk(0);
  
        /*
index 7dfe8ea90923ed9f3942d366af627b67049e0d56,b10948bf9551b09de201e572e6350fcc3e8f2cde..3b23078bc7b5b9a8eee41fe9a601e292355d4cfd
@@@ -4,6 -4,7 +4,7 @@@
  #
  menuconfig INPUT_JOYSTICK
        bool "Joysticks/Gamepads"
+       depends on !UML
        help
          If you have a joystick, 6dof controller, gamepad, steering wheel,
          weapon control system or something like that you can say Y here
@@@ -372,15 -373,6 +373,15 @@@ config JOYSTICK_PXR
          To compile this driver as a module, choose M here: the
          module will be called pxrc.
  
 +config JOYSTICK_QWIIC
 +      tristate "SparkFun Qwiic Joystick"
 +      depends on I2C
 +      help
 +        Say Y here if you want to use the SparkFun Qwiic Joystick.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called qwiic-joystick.
 +
  config JOYSTICK_FSIA6B
        tristate "FlySky FS-iA6B RC Receiver"
        select SERIO
diff --combined drivers/tty/Kconfig
index 476c112782355f85a89b7eead2fe40f2330f4c93,5b0736fae70b5a2c2d88a502aa58aab6e8d7c750..23cc988c68a47ec610eb599577cfcbfc28a15b37
@@@ -12,9 -12,8 +12,8 @@@ if TT
  
  config VT
        bool "Virtual terminal" if EXPERT
-       depends on !UML
        select INPUT
-       default y
+       default y if !UML
        help
          If you say Y here, you will get support for terminal devices with
          display and keyboard devices. These are called "virtual" because you
@@@ -78,7 -77,7 +77,7 @@@ config VT_CONSOLE_SLEE
  
  config HW_CONSOLE
        bool
-       depends on VT && !UML
+       depends on VT
        default y
  
  config VT_HW_CONSOLE_BINDING
@@@ -204,7 -203,7 +203,7 @@@ config MOXA_INTELLI
  
  config MOXA_SMARTIO
        tristate "Moxa SmartIO support v. 2.0"
 -      depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
 +      depends on SERIAL_NONSTANDARD && PCI
        help
          Say Y here if you have a Moxa SmartIO multiport serial card and/or
          want to help develop a new version of this driver.
diff --combined lib/Makefile
index 6d765d5fb8ac8bfc8b2ee7685b9bcaf985a580bc,fc38a55e6fe49511e4611681f77eb9c762a78331..5efd1b435a37c5d138d15c608cb9e7b685ef20f6
@@@ -83,7 -83,6 +83,7 @@@ obj-$(CONFIG_TEST_USER_COPY) += test_us
  obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_keys.o
  obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_key_base.o
  obj-$(CONFIG_TEST_PRINTF) += test_printf.o
 +obj-$(CONFIG_TEST_SCANF) += test_scanf.o
  obj-$(CONFIG_TEST_BITMAP) += test_bitmap.o
  obj-$(CONFIG_TEST_STRSCPY) += test_strscpy.o
  obj-$(CONFIG_TEST_UUID) += test_uuid.o
@@@ -148,6 -147,8 +148,8 @@@ obj-$(CONFIG_DEBUG_LOCKING_API_SELFTEST
  
  lib-y += logic_pio.o
  
+ lib-$(CONFIG_INDIRECT_IOMEM) += logic_iomem.o
  obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
  
  obj-$(CONFIG_BTREE) += btree.o
@@@ -355,6 -356,5 +357,6 @@@ obj-$(CONFIG_LIST_KUNIT_TEST) += list-t
  obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o
  obj-$(CONFIG_BITS_TEST) += test_bits.o
  obj-$(CONFIG_CMDLINE_KUNIT_TEST) += cmdline_kunit.o
 +obj-$(CONFIG_SLUB_KUNIT_TEST) += slub_kunit.o
  
  obj-$(CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED) += devmem_is_allowed.o
This page took 0.111963 seconds and 4 git commands to generate.