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

floppy: consolidate the dummy fd_cacheflush definition

Only mips defines this helper, so remove all the other arch definitions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>

+4 -6
-2
arch/alpha/include/asm/floppy.h
··· 24 24 #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count) 25 25 #define fd_enable_irq() enable_irq(FLOPPY_IRQ) 26 26 #define fd_disable_irq() disable_irq(FLOPPY_IRQ) 27 - #define fd_cacheflush(addr,size) /* nothing */ 28 27 #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\ 29 28 0, "floppy", NULL) 30 29 #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL) ··· 61 62 prev_dir = dir; 62 63 63 64 fd_clear_dma_ff(); 64 - fd_cacheflush(addr, size); 65 65 fd_set_dma_mode(mode); 66 66 set_dma_addr(FLOPPY_DMA, bus_addr); 67 67 fd_set_dma_count(size);
-2
arch/powerpc/include/asm/floppy.h
··· 25 25 #define fd_get_dma_residue() fd_ops->_get_dma_residue(FLOPPY_DMA) 26 26 #define fd_enable_irq() enable_irq(FLOPPY_IRQ) 27 27 #define fd_disable_irq() disable_irq(FLOPPY_IRQ) 28 - #define fd_cacheflush(addr,size) /* nothing */ 29 28 #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); 30 29 31 30 #include <linux/pci.h> ··· 151 152 prev_dir = dir; 152 153 153 154 fd_clear_dma_ff(); 154 - fd_cacheflush(addr, size); 155 155 fd_set_dma_mode(mode); 156 156 set_dma_addr(FLOPPY_DMA, bus_addr); 157 157 fd_set_dma_count(size);
-1
arch/sparc/include/asm/floppy_32.h
··· 70 70 #define fd_set_dma_count(count) sun_fd_set_dma_count(count) 71 71 #define fd_enable_irq() /* nothing... */ 72 72 #define fd_disable_irq() /* nothing... */ 73 - #define fd_cacheflush(addr, size) /* nothing... */ 74 73 #define fd_request_irq() sun_fd_request_irq() 75 74 #define fd_free_irq() /* nothing... */ 76 75 #if 0 /* P3: added by Alain, these cause a MMU corruption. 19960524 XXX */
-1
arch/sparc/include/asm/floppy_64.h
··· 72 72 #define fd_set_dma_addr(addr) sun_fdops.fd_set_dma_addr(addr) 73 73 #define fd_set_dma_count(count) sun_fdops.fd_set_dma_count(count) 74 74 #define get_dma_residue(x) sun_fdops.get_dma_residue() 75 - #define fd_cacheflush(addr, size) /* nothing... */ 76 75 #define fd_request_irq() sun_fdops.fd_request_irq() 77 76 #define fd_free_irq() sun_fdops.fd_free_irq() 78 77 #define fd_eject(drive) sun_fdops.fd_eject(drive)
+4
drivers/block/floppy.c
··· 275 275 #define fd_dma_mem_alloc(size) __get_dma_pages(GFP_KERNEL, get_order(size)) 276 276 #endif 277 277 278 + #ifndef fd_cacheflush 279 + #define fd_cacheflush(addr, size) /* nothing... */ 280 + #endif 281 + 278 282 static inline void fallback_on_nodma_alloc(char **addr, size_t l) 279 283 { 280 284 #ifdef FLOPPY_CAN_FALLBACK_ON_NODMA