From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: + riscv-use-asm-generic-cacheflushh.patch added to -mm tree Date: Mon, 18 May 2020 18:13:14 -0700 Message-ID: <20200519011314.823ShMCtP%akpm@linux-foundation.org> References: <20200513175005.1f4839360c18c0238df292d1@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.29.99]:58994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727125AbgESBNQ (ORCPT ); Mon, 18 May 2020 21:13:16 -0400 In-Reply-To: <20200513175005.1f4839360c18c0238df292d1@linux-foundation.org> Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: aou@eecs.berkeley.edu, hch@lst.de, mm-commits@vger.kernel.org, palmer@sifive.com, palmerdabbelt@google.com, paul.walmsley@sifive.com The patch titled Subject: riscv: use asm-generic/cacheflush.h has been added to the -mm tree. Its filename is riscv-use-asm-generic-cacheflushh.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/riscv-use-asm-generic-cacheflushh.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/riscv-use-asm-generic-cacheflushh.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Christoph Hellwig Subject: riscv: use asm-generic/cacheflush.h RISC-V needs almost no cache flushing routines of its own. Rely on asm-generic/cacheflush.h for the defaults. Also remove the pointless __KERNEL__ ifdef while we're at it. Link: http://lkml.kernel.org/r/20200515143646.3857579-18-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Signed-off-by: Andrew Morton --- arch/riscv/include/asm/cacheflush.h | 62 +------------------------- 1 file changed, 3 insertions(+), 59 deletions(-) --- a/arch/riscv/include/asm/cacheflush.h~riscv-use-asm-generic-cacheflushh +++ a/arch/riscv/include/asm/cacheflush.h @@ -8,65 +8,6 @@ #include -#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 - -/* - * The cache doesn't need to be flushed when TLB entries change when - * the cache is mapped to physical memory, not virtual memory - */ -static inline void flush_cache_all(void) -{ -} - -static inline void flush_cache_mm(struct mm_struct *mm) -{ -} - -static inline void flush_cache_dup_mm(struct mm_struct *mm) -{ -} - -static inline void flush_cache_range(struct vm_area_struct *vma, - unsigned long start, - unsigned long end) -{ -} - -static inline void flush_cache_page(struct vm_area_struct *vma, - unsigned long vmaddr, - unsigned long pfn) -{ -} - -static inline void flush_dcache_mmap_lock(struct address_space *mapping) -{ -} - -static inline void flush_dcache_mmap_unlock(struct address_space *mapping) -{ -} - -static inline void flush_icache_page(struct vm_area_struct *vma, - struct page *page) -{ -} - -static inline void flush_cache_vmap(unsigned long start, unsigned long end) -{ -} - -static inline void flush_cache_vunmap(unsigned long start, unsigned long end) -{ -} - -#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - memcpy(dst, src, len); \ - flush_icache_user_range(vma, page, vaddr, len); \ - } while (0) -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - memcpy(dst, src, len) - static inline void local_flush_icache_all(void) { asm volatile ("fence.i" ::: "memory"); @@ -79,6 +20,7 @@ static inline void flush_dcache_page(str if (test_bit(PG_dcache_clean, &page->flags)) clear_bit(PG_dcache_clean, &page->flags); } +#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 /* * RISC-V doesn't have an instruction to flush parts of the instruction cache, @@ -105,4 +47,6 @@ void flush_icache_mm(struct mm_struct *m #define SYS_RISCV_FLUSH_ICACHE_LOCAL 1UL #define SYS_RISCV_FLUSH_ICACHE_ALL (SYS_RISCV_FLUSH_ICACHE_LOCAL) +#include + #endif /* _ASM_RISCV_CACHEFLUSH_H */ _ Patches currently in -mm which might be from hch@lst.de are x86-hyperv-use-vmalloc_exec-for-the-hypercall-page.patch x86-fix-vmap-arguments-in-map_irq_stack.patch staging-android-ion-use-vmap-instead-of-vm_map_ram.patch staging-media-ipu3-use-vmap-instead-of-reimplementing-it.patch dma-mapping-use-vmap-insted-of-reimplementing-it.patch powerpc-add-an-ioremap_phb-helper.patch powerpc-remove-__ioremap_at-and-__iounmap_at.patch mm-remove-__get_vm_area.patch mm-unexport-unmap_kernel_range_noflush.patch mm-rename-config_pgtable_mapping-to-config_zsmalloc_pgtable_mapping.patch mm-only-allow-page-table-mappings-for-built-in-zsmalloc.patch mm-pass-addr-as-unsigned-long-to-vb_free.patch mm-remove-vmap_page_range_noflush-and-vunmap_page_range.patch mm-rename-vmap_page_range-to-map_kernel_range.patch mm-dont-return-the-number-of-pages-from-map_kernel_range_noflush.patch mm-remove-map_vm_range.patch mm-remove-unmap_vmap_area.patch mm-remove-the-prot-argument-from-vm_map_ram.patch mm-enforce-that-vmap-cant-map-pages-executable.patch gpu-drm-remove-the-powerpc-hack-in-drm_legacy_sg_alloc.patch mm-remove-the-pgprot-argument-to-__vmalloc.patch mm-remove-the-prot-argument-to-__vmalloc_node.patch mm-remove-both-instances-of-__vmalloc_node_flags.patch mm-remove-__vmalloc_node_flags_caller.patch mm-switch-the-test_vmalloc-module-to-use-__vmalloc_node.patch mm-remove-vmalloc_user_node_flags.patch arm64-use-__vmalloc_node-in-arch_alloc_vmap_stack.patch powerpc-use-__vmalloc_node-in-alloc_vm_stack.patch s390-use-__vmalloc_node-in-stack_alloc.patch exec-simplify-the-copy_strings_kernel-calling-convention.patch exec-open-code-copy_string_kernel.patch amdgpu-a-null-mm-does-not-mean-a-thread-is-a-kthread.patch kernel-move-use_mm-unuse_mm-to-kthreadc.patch kernel-move-use_mm-unuse_mm-to-kthreadc-v2.patch kernel-better-document-the-use_mm-unuse_mm-api-contract.patch kernel-better-document-the-use_mm-unuse_mm-api-contract-v2.patch kernel-set-user_ds-in-kthread_use_mm.patch arm-fix-the-flush_icache_range-arguments-in-set_fiq_handler.patch nds32-unexport-flush_icache_page.patch powerpc-unexport-flush_icache_user_range.patch unicore32-remove-flush_cache_user_range.patch asm-generic-fix-the-inclusion-guards-for-cacheflushh.patch asm-generic-dont-include-linux-mmh-in-cacheflushh.patch asm-generic-improve-the-flush_dcache_page-stub.patch alpha-use-asm-generic-cacheflushh.patch arm64-use-asm-generic-cacheflushh.patch c6x-use-asm-generic-cacheflushh.patch hexagon-use-asm-generic-cacheflushh.patch ia64-use-asm-generic-cacheflushh.patch microblaze-use-asm-generic-cacheflushh.patch m68knommu-use-asm-generic-cacheflushh.patch openrisc-use-asm-generic-cacheflushh.patch powerpc-use-asm-generic-cacheflushh.patch riscv-use-asm-generic-cacheflushh.patch armsparcunicore32-remove-flush_icache_user_range.patch mm-rename-flush_icache_user_range-to-flush_icache_user_page.patch asm-generic-add-a-flush_icache_user_range-stub.patch sh-implement-flush_icache_user_range.patch xtensa-implement-flush_icache_user_range.patch arm-rename-flush_cache_user_range-to-flush_icache_user_range.patch m68k-implement-flush_icache_user_range.patch exec-only-build-read_code-when-needed.patch exec-use-flush_icache_user_range-in-read_code.patch binfmt_flat-use-flush_icache_user_range.patch nommu-use-flush_icache_user_range-in-brk-and-mmap.patch module-move-the-set_fs-hack-for-flush_icache_range-to-m68k.patch