Merge tag 'microblaze-v5.6-rc1' of git://git.monstr.eu/linux-2.6-microblaze
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Feb 2020 11:58:07 +0000 (11:58 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Feb 2020 11:58:07 +0000 (11:58 +0000)
Pull Microblaze update from Michal Simek:

 - enable CMA

 - add support for MB v11

 - defconfig updates

 - minor fixes

* tag 'microblaze-v5.6-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Add ID for Microblaze v11
  microblaze: Prevent the overflow of the start
  microblaze: Wire CMA allocator
  asm-generic: Make dma-contiguous.h a mandatory include/asm header
  microblaze: Sync defconfig with latest Kconfig layout
  microblaze: defconfig: Disable EXT2 driver and Enable EXT3 & EXT4 drivers
  microblaze: Align comments with register usage

15 files changed:
arch/arm64/include/asm/Kbuild
arch/csky/include/asm/Kbuild
arch/microblaze/Kconfig
arch/microblaze/configs/mmu_defconfig
arch/microblaze/configs/nommu_defconfig
arch/microblaze/kernel/cpu/cache.c
arch/microblaze/kernel/cpu/cpuinfo.c
arch/microblaze/kernel/head.S
arch/microblaze/mm/init.c
arch/mips/include/asm/Kbuild
arch/riscv/include/asm/Kbuild
arch/s390/include/asm/Kbuild
arch/x86/include/asm/Kbuild
arch/xtensa/include/asm/Kbuild
include/asm-generic/Kbuild

index bd23f87d6c55a17ce11d774e527ef6588fd10918..d3077c9919629b6fb192676ac6ce07ddb24585f7 100644 (file)
@@ -3,7 +3,6 @@ generic-y += bugs.h
 generic-y += delay.h
 generic-y += div64.h
 generic-y += dma.h
-generic-y += dma-contiguous.h
 generic-y += dma-mapping.h
 generic-y += early_ioremap.h
 generic-y += emergency-restart.h
index 4d4754e6bf8917444dfecb82d3eb84e652d2738a..bc15a26c782f9268fc47d1617594881d8d9bec29 100644 (file)
@@ -7,7 +7,6 @@ generic-y += delay.h
 generic-y += device.h
 generic-y += div64.h
 generic-y += dma.h
-generic-y += dma-contiguous.h
 generic-y += dma-mapping.h
 generic-y += emergency-restart.h
 generic-y += exec.h
index a105f113fd67c690ffd387dd5c377af44c31b9ed..6a331bd57ea84b1993be3ec1b4e372d59f9b0a54 100644 (file)
@@ -27,6 +27,7 @@ config MICROBLAZE
        select HAVE_ARCH_HASH
        select HAVE_ARCH_KGDB
        select HAVE_DEBUG_KMEMLEAK
+       select HAVE_DMA_CONTIGUOUS
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FUNCTION_GRAPH_TRACER
index b3b433db89d86446f88388042a5554e28d5bf2d5..9b8a50f30662545ff44486fafa851971d5ff7d05 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 # CONFIG_EFI_PARTITION is not set
+CONFIG_CMA=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -73,7 +74,7 @@ CONFIG_FB_XILINX=y
 CONFIG_UIO=y
 CONFIG_UIO_PDRV_GENIRQ=y
 CONFIG_UIO_DMEM_GENIRQ=y
-CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
 # CONFIG_DNOTIFY is not set
 CONFIG_TMPFS=y
 CONFIG_CRAMFS=y
@@ -82,10 +83,11 @@ CONFIG_NFS_FS=y
 CONFIG_CIFS=y
 CONFIG_CIFS_STATS2=y
 CONFIG_ENCRYPTED_KEYS=y
+CONFIG_DMA_CMA=y
 CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_SLAB=y
-CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DEBUG_SPINLOCK=y
 CONFIG_KGDB=y
 CONFIG_KGDB_TESTS=y
 CONFIG_KGDB_KDB=y
+CONFIG_DEBUG_SLAB=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEBUG_SPINLOCK=y
index 377de39ccb8cd29c5269bf146ae99a585e096cca..8c420782d6e42bf32528211dc22bf8b4e9380dbd 100644 (file)
@@ -70,7 +70,7 @@ CONFIG_XILINX_WATCHDOG=y
 CONFIG_FB=y
 CONFIG_FB_XILINX=y
 # CONFIG_USB_SUPPORT is not set
-CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
 # CONFIG_DNOTIFY is not set
 CONFIG_CRAMFS=y
 CONFIG_ROMFS_FS=y
index 0bde47e4fa694264256c1e8d2498436acc66320b..dcba53803fa5f9867eba2a0178c48ee5ed924c20 100644 (file)
@@ -92,7 +92,8 @@ static inline void __disable_dcache_nomsr(void)
 #define CACHE_LOOP_LIMITS(start, end, cache_line_length, cache_size)   \
 do {                                                                   \
        int align = ~(cache_line_length - 1);                           \
-       end = min(start + cache_size, end);                             \
+       if (start <  UINT_MAX - cache_size)                             \
+               end = min(start + cache_size, end);                     \
        start &= align;                                                 \
 } while (0)
 
index ef2f49471a2a069a9efe6c11c56653387d0186cd..cd9b4450763b0b91ba8152d45f38c48c81d1bd46 100644 (file)
@@ -51,6 +51,7 @@ const struct cpu_ver_key cpu_ver_lookup[] = {
        {"9.5", 0x22},
        {"9.6", 0x23},
        {"10.0", 0x24},
+       {"11.0", 0x25},
        {NULL, 0},
 };
 
index 7d2894418691cb06285399a849762ef9d4a8c2f8..14b27640615340b5cff47abc9eb7324e37cc7269 100644 (file)
@@ -121,10 +121,10 @@ no_fdt_arg:
        tophys(r4,r4)                   /* convert to phys address */
        ori     r3, r0, COMMAND_LINE_SIZE - 1 /* number of loops */
 _copy_command_line:
-       /* r2=r5+r6 - r5 contain pointer to command line */
+       /* r2=r5+r11 - r5 contain pointer to command line */
        lbu     r2, r5, r11
        beqid   r2, skip                /* Skip if no data */
-       sb      r2, r4, r11             /* addr[r4+r6]= r2 */
+       sb      r2, r4, r11             /* addr[r4+r11]= r2 */
        addik   r11, r11, 1             /* increment counting */
        bgtid   r3, _copy_command_line  /* loop for all entries       */
        addik   r3, r3, -1              /* decrement loop */
@@ -139,8 +139,8 @@ skip:
        ori     r4, r0, TOPHYS(_bram_load_start)        /* save bram context */
        ori     r3, r0, (LMB_SIZE - 4)
 _copy_bram:
-       lw      r7, r0, r11             /* r7 = r0 + r6 */
-       sw      r7, r4, r11             /* addr[r4 + r6] = r7 */
+       lw      r7, r0, r11             /* r7 = r0 + r11 */
+       sw      r7, r4, r11             /* addr[r4 + r11] = r7 */
        addik   r11, r11, 4             /* increment counting */
        bgtid   r3, _copy_bram          /* loop for all entries */
        addik   r3, r3, -4              /* descrement loop */
index 050fc621c9207caee067471e773d20bbd4997f09..1056f1674065f98f66560acfa1045f9f89a4b23c 100644 (file)
@@ -7,6 +7,7 @@
  * for more details.
  */
 
+#include <linux/dma-contiguous.h>
 #include <linux/memblock.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
@@ -345,6 +346,9 @@ asmlinkage void __init mmu_init(void)
        /* This will also cause that unflatten device tree will be allocated
         * inside 768MB limit */
        memblock_set_current_limit(memory_start + lowmem_size - 1);
+
+       /* CMA initialization */
+       dma_contiguous_reserve(memory_start + lowmem_size - 1);
 }
 
 /* This is only called until mem_init is done. */
index 16d1eb4c8fe66ca0f7f7f7a4e2b1afc94880d897..4ebd8ce254ce1de46e8d1bf0fbd425ba8253a3c0 100644 (file)
@@ -6,7 +6,6 @@ generated-y += syscall_table_64_n64.h
 generated-y += syscall_table_64_o32.h
 generic-y += current.h
 generic-y += device.h
-generic-y += dma-contiguous.h
 generic-y += emergency-restart.h
 generic-y += export.h
 generic-y += irq_work.h
index 1efaeddf1e4b97abe1de77dc119cd41ac01e343b..ec0ca8c6ab64d6dca0a6763b05ccbc46a355db43 100644 (file)
@@ -7,7 +7,6 @@ generic-y += div64.h
 generic-y += extable.h
 generic-y += flat.h
 generic-y += dma.h
-generic-y += dma-contiguous.h
 generic-y += dma-mapping.h
 generic-y += emergency-restart.h
 generic-y += exec.h
index 2531f673f099cb6ccdac14ff153f65eb59fcdc46..1832ae6442ef846e3ae3d936fd8b4e1d7d53c3d8 100644 (file)
@@ -7,7 +7,6 @@ generated-y += unistd_nr.h
 generic-y += asm-offsets.h
 generic-y += cacheflush.h
 generic-y += device.h
-generic-y += dma-contiguous.h
 generic-y += dma-mapping.h
 generic-y += div64.h
 generic-y += emergency-restart.h
index 8b52bc5ddf694b86fb63c6335ecca46e2f87962f..ea34464d6221633644d3a0d3f00e1cef678f22d4 100644 (file)
@@ -7,7 +7,6 @@ generated-y += unistd_32_ia32.h
 generated-y += unistd_64_x32.h
 generated-y += xen-hypercalls.h
 
-generic-y += dma-contiguous.h
 generic-y += early_ioremap.h
 generic-y += export.h
 generic-y += mcs_spinlock.h
index 3acc31e55e029568f1971501c7c6ffc20ed391ef..271917c24b7fcef9933a3ae3f34968937c14fffd 100644 (file)
@@ -4,7 +4,6 @@ generic-y += bug.h
 generic-y += compat.h
 generic-y += device.h
 generic-y += div64.h
-generic-y += dma-contiguous.h
 generic-y += dma-mapping.h
 generic-y += emergency-restart.h
 generic-y += exec.h
index ddfee1bd9dc158fefd776e5648c33f65742dce7d..cd17d50697cc240ed6ba068a91ad375742a11a45 100644 (file)
@@ -4,5 +4,6 @@
 # (This file is not included when SRCARCH=um since UML borrows several
 # asm headers from the host architecutre.)
 
+mandatory-y += dma-contiguous.h
 mandatory-y += msi.h
 mandatory-y += simd.h