]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge tag 'riscv-for-linus-5.12-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Feb 2021 18:28:35 +0000 (10:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Feb 2021 18:28:35 +0000 (10:28 -0800)
Pull RISC-V updates from Palmer Dabbelt:
 "A handful of new RISC-V related patches for this merge window:

   - A check to ensure drivers are properly using uaccess. This isn't
     manifesting with any of the drivers I'm currently using, but may
     catch errors in new drivers.

   - Some preliminary support for the FU740, along with the HiFive
     Unleashed it will appear on.

   - NUMA support for RISC-V, which involves making the arm64 code
     generic.

   - Support for kasan on the vmalloc region.

   - A handful of new drivers for the Kendryte K210, along with the DT
     plumbing required to boot on a handful of K210-based boards.

   - Support for allocating ASIDs.

   - Preliminary support for kernels larger than 128MiB.

   - Various other improvements to our KASAN support, including the
     utilization of huge pages when allocating the KASAN regions.

  We may have already found a bug with the KASAN_VMALLOC code, but it's
  passing my tests. There's a fix in the works, but that will probably
  miss the merge window.

* tag 'riscv-for-linus-5.12-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (75 commits)
  riscv: Improve kasan population by using hugepages when possible
  riscv: Improve kasan population function
  riscv: Use KASAN_SHADOW_INIT define for kasan memory initialization
  riscv: Improve kasan definitions
  riscv: Get rid of MAX_EARLY_MAPPING_SIZE
  soc: canaan: Sort the Makefile alphabetically
  riscv: Disable KSAN_SANITIZE for vDSO
  riscv: Remove unnecessary declaration
  riscv: Add Canaan Kendryte K210 SD card defconfig
  riscv: Update Canaan Kendryte K210 defconfig
  riscv: Add Kendryte KD233 board device tree
  riscv: Add SiPeed MAIXDUINO board device tree
  riscv: Add SiPeed MAIX GO board device tree
  riscv: Add SiPeed MAIX DOCK board device tree
  riscv: Add SiPeed MAIX BiT board device tree
  riscv: Update Canaan Kendryte K210 device tree
  dt-bindings: add resets property to dw-apb-timer
  dt-bindings: fix sifive gpio properties
  dt-bindings: update sifive uart compatible string
  dt-bindings: update sifive clint compatible string
  ...

22 files changed:
1  2 
Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
MAINTAINERS
arch/arm64/Kconfig
arch/arm64/mm/Makefile
arch/arm64/mm/init.c
arch/riscv/Kconfig
arch/riscv/include/asm/page.h
arch/riscv/include/asm/pgtable.h
arch/riscv/include/asm/set_memory.h
arch/riscv/kernel/setup.c
arch/riscv/kernel/stacktrace.c
arch/riscv/mm/init.c
arch/riscv/mm/kasan_init.c
drivers/base/Kconfig
drivers/clk/Kconfig
drivers/clk/Makefile
drivers/pinctrl/Kconfig
drivers/pinctrl/Makefile
drivers/reset/Kconfig
drivers/soc/Kconfig
drivers/soc/Makefile
init/initramfs.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index 77222d92667a7222d3fd715d048f2adfeffd7440,cd60e4fed78f542d642ba865bb2ac5cc183e721b..f188c9092696308c9ae75ad0505af66ee0712bf8
@@@ -6,8 -6,6 +6,7 @@@ obj-y                            := dma-mapping.o extable.o fau
  obj-$(CONFIG_HUGETLB_PAGE)    += hugetlbpage.o
  obj-$(CONFIG_PTDUMP_CORE)     += ptdump.o
  obj-$(CONFIG_PTDUMP_DEBUGFS)  += ptdump_debugfs.o
- obj-$(CONFIG_NUMA)            += numa.o
 +obj-$(CONFIG_TRANS_TABLE)     += trans_pgd.o
  obj-$(CONFIG_DEBUG_VIRTUAL)   += physaddr.o
  obj-$(CONFIG_ARM64_MTE)               += mteswap.o
  KASAN_SANITIZE_physaddr.o     += n
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index f9f9568d689ef53e215c44de8b4468ae3033cfa9,3e044f11cef6a179feede6862be2298f29a0a089..9dfb8b2dffd6ebf255c7a9b03d32e8026313d94f
@@@ -182,31 -133,20 +134,31 @@@ void __init setup_bootmem(void
        /* Reserve from the start of the kernel to the end of the kernel */
        memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
  
 -      max_pfn = PFN_DOWN(memblock_end_of_DRAM());
 +      dram_end = memblock_end_of_DRAM();
 +
 +      /*
 +       * memblock allocator is not aware of the fact that last 4K bytes of
 +       * the addressable memory can not be mapped because of IS_ERR_VALUE
 +       * macro. Make sure that last 4k bytes are not usable by memblock
 +       * if end of dram is equal to maximum addressable memory.
 +       */
 +      if (max_mapped_addr == (dram_end - 1))
 +              memblock_set_current_limit(max_mapped_addr - 4096);
 +
 +      max_pfn = PFN_DOWN(dram_end);
        max_low_pfn = max_pfn;
        dma32_phys_limit = min(4UL * SZ_1G, (unsigned long)PFN_PHYS(max_low_pfn));
 -      set_max_mapnr(max_low_pfn);
 +      set_max_mapnr(max_low_pfn - ARCH_PFN_OFFSET);
  
- #ifdef CONFIG_BLK_DEV_INITRD
-       setup_initrd();
- #endif /* CONFIG_BLK_DEV_INITRD */
+       reserve_initrd_mem();
        /*
-        * Avoid using early_init_fdt_reserve_self() since __pa() does
+        * If DTB is built in, no need to reserve its memblock.
+        * Otherwise, do reserve it but avoid using
+        * early_init_fdt_reserve_self() since __pa() does
         * not work for DTB pointers that are fixmap addresses
         */
-       memblock_reserve(dtb_early_pa, fdt_totalsize(dtb_early_va));
+       if (!IS_ENABLED(CONFIG_BUILTIN_DTB))
+               memblock_reserve(dtb_early_pa, fdt_totalsize(dtb_early_va));
  
        early_init_fdt_scan_reserved_mem();
        dma_contiguous_reserve(dma32_phys_limit);
index a8a2ffd9114aaa22c60661c7cd2d80023747cb2e,c676a4674342de9e823890027181a1a1d2cad6b2..3fc18f469efbc6f1e3b05f8fbba71bc9345315fa
@@@ -90,11 -196,19 +196,19 @@@ void __init kasan_init(void
  
        kasan_populate_early_shadow((void *)KASAN_SHADOW_START,
                                    (void *)kasan_mem_to_shadow((void *)
-                                                               VMALLOC_END));
+                                                               VMEMMAP_END));
+       if (IS_ENABLED(CONFIG_KASAN_VMALLOC))
+               kasan_shallow_populate(
+                       (void *)kasan_mem_to_shadow((void *)VMALLOC_START),
+                       (void *)kasan_mem_to_shadow((void *)VMALLOC_END));
+       else
+               kasan_populate_early_shadow(
+                       (void *)kasan_mem_to_shadow((void *)VMALLOC_START),
+                       (void *)kasan_mem_to_shadow((void *)VMALLOC_END));
  
        for_each_mem_range(i, &_start, &_end) {
 -              void *start = (void *)_start;
 -              void *end = (void *)_end;
 +              void *start = (void *)__va(_start);
 +              void *end = (void *)__va(_end);
  
                if (start >= end)
                        break;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index f357c6c659d2c59def4a9964740b9e99ca02fa33,c0143651f4a94d70b69acfa844809ea78842aebb..e8a30c4c5aec5a4e5623a4e5dd155704c4d21c59
@@@ -22,6 -23,6 +23,5 @@@ source "drivers/soc/ti/Kconfig
  source "drivers/soc/ux500/Kconfig"
  source "drivers/soc/versatile/Kconfig"
  source "drivers/soc/xilinx/Kconfig"
- source "drivers/soc/kendryte/Kconfig"
 -source "drivers/soc/zte/Kconfig"
  
  endmenu
index 9bceb12b291d3ebb0dad0113c016aea936655b95,34b23645be14f656364d5ca4e92fe54f9e42030b..f678e4d9e58505a384bf2bb68851f81226912c45
@@@ -28,4 -29,4 +29,3 @@@ obj-y                         += ti
  obj-$(CONFIG_ARCH_U8500)      += ux500/
  obj-$(CONFIG_PLAT_VERSATILE)  += versatile/
  obj-y                         += xilinx/
- obj-$(CONFIG_SOC_KENDRYTE)    += kendryte/
 -obj-$(CONFIG_ARCH_ZX)         += zte/
Simple merge