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

Merge tag 'm68knommu-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu

Pull m68knommu updates from Greg Ungerer:
"Fixes include:

- cleanup compiler warnings (IO access functions and unused
variables)

- ColdFire v3 cache control fix

- ColdFire MMU comment cleanup

- switch to using asm-generic cmpxchg_local()

- stmark platform updates"

* tag 'm68knommu-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68k: stmark2: enable edma support for dspi
m68k: use asm-generic cmpxchg_local()
m68k: mcfmmu: remove stale part of comment about steal_context
m68knommu: fix overwriting of bits in ColdFire V3 cache control
m68k: fix ColdFire mmu init compile warning
m68knommu: fix use of cpu_to_le() on IO access
m68knommu: __force type casts for raw IO access
m68k: stmark2: defconfig updates

+45 -47
+5
arch/m68k/coldfire/stmark2.c
··· 13 13 #include <linux/spi/spi.h> 14 14 #include <linux/spi/spi-fsl-dspi.h> 15 15 #include <linux/spi/flash.h> 16 + #include <linux/dma-mapping.h> 16 17 #include <asm/mcfsim.h> 17 18 18 19 /* ··· 79 78 }, 80 79 }; 81 80 81 + static u64 stmark2_dspi_mask = DMA_BIT_MASK(32); 82 + 82 83 /* SPI controller, id = bus number */ 83 84 static struct platform_device dspi_spi0_device = { 84 85 .name = "fsl-dspi", ··· 89 86 .resource = dspi_spi0_resource, 90 87 .dev = { 91 88 .platform_data = &dspi_spi0_info, 89 + .dma_mask = &stmark2_dspi_mask, 90 + .coherent_dma_mask = DMA_BIT_MASK(32), 92 91 }, 93 92 }; 94 93
+27 -20
arch/m68k/configs/stmark2_defconfig
··· 1 1 CONFIG_LOCALVERSION="stmark2-001" 2 2 CONFIG_DEFAULT_HOSTNAME="stmark2" 3 3 CONFIG_SYSVIPC=y 4 - # CONFIG_FHANDLE is not set 5 4 CONFIG_LOG_BUF_SHIFT=14 6 5 CONFIG_NAMESPACES=y 7 6 CONFIG_BLK_DEV_INITRD=y 8 - # CONFIG_RD_BZIP2 is not set 9 - # CONFIG_RD_LZMA is not set 10 - # CONFIG_RD_XZ is not set 11 - # CONFIG_RD_LZO is not set 12 - # CONFIG_RD_LZ4 is not set 13 7 CONFIG_CC_OPTIMIZE_FOR_SIZE=y 8 + # CONFIG_FHANDLE is not set 14 9 # CONFIG_AIO is not set 15 10 # CONFIG_ADVISE_SYSCALLS is not set 16 11 # CONFIG_MEMBARRIER is not set 17 12 CONFIG_EMBEDDED=y 18 13 # CONFIG_VM_EVENT_COUNTERS is not set 19 14 # CONFIG_COMPAT_BRK is not set 20 - # CONFIG_BLK_DEV_BSG is not set 21 - CONFIG_BLK_CMDLINE_PARSER=y 22 - # CONFIG_MMU is not set 15 + CONFIG_COLDFIRE=y 23 16 CONFIG_M5441x=y 24 17 CONFIG_CLOCK_FREQ=240000000 25 18 CONFIG_STMARK2=y 19 + CONFIG_UBOOT=y 26 20 CONFIG_RAMBASE=0x40000000 27 21 CONFIG_RAMSIZE=0x8000000 28 22 CONFIG_VECTORBASE=0x40000000 29 23 CONFIG_KERNELBASE=0x40001000 24 + # CONFIG_BLK_DEV_BSG is not set 25 + CONFIG_BLK_CMDLINE_PARSER=y 30 26 CONFIG_BINFMT_FLAT=y 27 + CONFIG_BINFMT_ZFLAT=y 31 28 CONFIG_BINFMT_MISC=y 32 - # CONFIG_UEVENT_HELPER is not set 33 29 CONFIG_DEVTMPFS=y 34 30 CONFIG_DEVTMPFS_MOUNT=y 35 - CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y 36 31 # CONFIG_ALLOW_DEV_COREDUMP is not set 37 32 CONFIG_MTD=y 38 33 CONFIG_MTD_CMDLINE_PARTS=y ··· 60 65 CONFIG_GPIO_SYSFS=y 61 66 CONFIG_GPIO_GENERIC_PLATFORM=y 62 67 # CONFIG_HWMON is not set 63 - # CONFIG_RC_CORE is not set 64 68 # CONFIG_HID is not set 65 69 # CONFIG_USB_SUPPORT is not set 70 + CONFIG_MMC=y 71 + CONFIG_MMC_DEBUG=y 72 + CONFIG_MMC_SDHCI=y 73 + CONFIG_MMC_SDHCI_PLTFM=y 74 + CONFIG_MMC_SDHCI_ESDHC_MCF=y 75 + CONFIG_DMADEVICES=y 76 + CONFIG_MCF_EDMA=y 77 + CONFIG_EXT2_FS=y 78 + CONFIG_EXT2_FS_XATTR=y 79 + CONFIG_EXT2_FS_POSIX_ACL=y 80 + CONFIG_EXT2_FS_SECURITY=y 81 + CONFIG_EXT3_FS=y 82 + CONFIG_EXT3_FS_POSIX_ACL=y 83 + CONFIG_EXT3_FS_SECURITY=y 66 84 # CONFIG_FILE_LOCKING is not set 67 85 # CONFIG_DNOTIFY is not set 68 86 # CONFIG_INOTIFY_USER is not set 87 + CONFIG_OVERLAY_FS=y 69 88 CONFIG_FSCACHE=y 70 89 # CONFIG_PROC_SYSCTL is not set 90 + CONFIG_CRAMFS=y 91 + CONFIG_SQUASHFS=y 92 + CONFIG_ROMFS_FS=y 93 + CONFIG_CRYPTO_ANSI_CPRNG=y 94 + # CONFIG_CRYPTO_HW is not set 71 95 CONFIG_PRINTK_TIME=y 96 + # CONFIG_DEBUG_BUGVERBOSE is not set 72 97 # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set 73 98 CONFIG_SLUB_DEBUG_ON=y 74 99 CONFIG_PANIC_ON_OOPS=y 75 100 # CONFIG_SCHED_DEBUG is not set 76 - # CONFIG_DEBUG_BUGVERBOSE is not set 77 - CONFIG_BOOTPARAM=y 78 - CONFIG_BOOTPARAM_STRING="console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/bin/init devtmpfs.mount=1" 79 - CONFIG_CRYPTO=y 80 - # CONFIG_CRYPTO_ECHAINIV is not set 81 - CONFIG_CRYPTO_ANSI_CPRNG=y 82 - # CONFIG_CRYPTO_HW is not set 83 - CONFIG_CRC16=y
-8
arch/m68k/include/asm/cmpxchg.h
··· 129 129 130 130 #else 131 131 132 - /* 133 - * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make 134 - * them available. 135 - */ 136 - #define cmpxchg_local(ptr, o, n) \ 137 - ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ 138 - (unsigned long)(n), sizeof(*(ptr)))) 139 - 140 132 #include <asm-generic/cmpxchg.h> 141 133 142 134 #endif
+10 -10
arch/m68k/include/asm/io_no.h
··· 14 14 * that behavior here first before we include asm-generic/io.h. 15 15 */ 16 16 #define __raw_readb(addr) \ 17 - ({ unsigned char __v = (*(volatile unsigned char *) (addr)); __v; }) 17 + ({ u8 __v = (*(__force volatile u8 *) (addr)); __v; }) 18 18 #define __raw_readw(addr) \ 19 - ({ unsigned short __v = (*(volatile unsigned short *) (addr)); __v; }) 19 + ({ u16 __v = (*(__force volatile u16 *) (addr)); __v; }) 20 20 #define __raw_readl(addr) \ 21 - ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; }) 21 + ({ u32 __v = (*(__force volatile u32 *) (addr)); __v; }) 22 22 23 - #define __raw_writeb(b, addr) (void)((*(volatile unsigned char *) (addr)) = (b)) 24 - #define __raw_writew(b, addr) (void)((*(volatile unsigned short *) (addr)) = (b)) 25 - #define __raw_writel(b, addr) (void)((*(volatile unsigned int *) (addr)) = (b)) 23 + #define __raw_writeb(b, addr) (void)((*(__force volatile u8 *) (addr)) = (b)) 24 + #define __raw_writew(b, addr) (void)((*(__force volatile u16 *) (addr)) = (b)) 25 + #define __raw_writel(b, addr) (void)((*(__force volatile u32 *) (addr)) = (b)) 26 26 27 27 #if defined(CONFIG_COLDFIRE) 28 28 /* ··· 67 67 { 68 68 if (cf_internalio(addr)) 69 69 return __raw_readw(addr); 70 - return __le16_to_cpu(__raw_readw(addr)); 70 + return swab16(__raw_readw(addr)); 71 71 } 72 72 73 73 #define readl readl ··· 75 75 { 76 76 if (cf_internalio(addr)) 77 77 return __raw_readl(addr); 78 - return __le32_to_cpu(__raw_readl(addr)); 78 + return swab32(__raw_readl(addr)); 79 79 } 80 80 81 81 #define writew writew ··· 84 84 if (cf_internalio(addr)) 85 85 __raw_writew(value, addr); 86 86 else 87 - __raw_writew(__cpu_to_le16(value), addr); 87 + __raw_writew(swab16(value), addr); 88 88 } 89 89 90 90 #define writel writel ··· 93 93 if (cf_internalio(addr)) 94 94 __raw_writel(value, addr); 95 95 else 96 - __raw_writel(__cpu_to_le32(value), addr); 96 + __raw_writel(swab32(value), addr); 97 97 } 98 98 99 99 #else
+3 -3
arch/m68k/include/asm/m53xxacr.h
··· 89 89 * coherency though in all cases. And for copyback caches we will need 90 90 * to push cached data as well. 91 91 */ 92 - #define CACHE_INIT CACR_CINVA 93 - #define CACHE_INVALIDATE CACR_CINVA 94 - #define CACHE_INVALIDATED CACR_CINVA 92 + #define CACHE_INIT (CACHE_MODE + CACR_CINVA - CACR_EC) 93 + #define CACHE_INVALIDATE (CACHE_MODE + CACR_CINVA) 94 + #define CACHE_INVALIDATED (CACHE_MODE + CACR_CINVA) 95 95 96 96 #define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \ 97 97 (0x000f0000) + \
-6
arch/m68k/mm/mcfmmu.c
··· 39 39 unsigned long address, size; 40 40 unsigned long next_pgtable, bootmem_end; 41 41 unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 }; 42 - enum zone_type zone; 43 42 int i; 44 43 45 44 empty_zero_page = (void *) memblock_alloc(PAGE_SIZE, PAGE_SIZE); ··· 213 214 214 215 /* 215 216 * Steal a context from a task that has one at the moment. 216 - * This is only used on 8xx and 4xx and we presently assume that 217 - * they don't do SMP. If they do then thicfpgalloc.hs will have to check 218 - * whether the MM we steal is in use. 219 - * We also assume that this is only used on systems that don't 220 - * use an MMU hash table - this is true for 8xx and 4xx. 221 217 * This isn't an LRU system, it just frees up each context in 222 218 * turn (sort-of pseudo-random replacement :). This would be the 223 219 * place to implement an LRU scheme if anyone was motivated to do it.