Commit d6075262 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull nios2 updates from Ley Foon Tan:
 "Most of updates are MMU related"

* tag 'nios2-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
  nios2: Fix update_mmu_cache preload the TLB with the new PTE
  nios2: update_mmu_cache preload the TLB with the new PTE
  nios2: User address TLB flush break after finding the matching entry
  nios2: flush_tlb_all use TLBMISC way auto-increment feature
  nios2: improve readability of tlb functions
  nios2: flush_tlb_mm flush only the pid
  nios2: flush_tlb_pid can just restore TLBMISC once
  nios2: TLBMISC writes do not require PID bits to be set
  nios2: Use an invalid TLB entry address helper function
  nios2: pte_clear does not need to flush TLB
  nios2: flush_tlb_page use PID based flush
  nios2: update_mmu_cache clear the old entry from the TLB
  nios2: remove redundant 'default n' from Kconfig-s
  nios2: ksyms: Add missing symbol exports
parents 6cdc577a 21e6bff5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -123,7 +123,6 @@ config NIOS2_CMDLINE_IGNORE_DTB

config NIOS2_PASS_CMDLINE
	bool "Passed kernel command line from u-boot"
	default n
	help
	  Use bootargs env variable from u-boot for kernel command line.
	  will override "Default kernel command string".
+0 −1
Original line number Diff line number Diff line
@@ -232,7 +232,6 @@ static inline void pte_clear(struct mm_struct *mm,
	pte_val(null) = (addr >> PAGE_SHIFT) & 0xf;

	set_pte_at(mm, addr, ptep, null);
	flush_tlb_one(addr);
}

/*
+15 −4
Original line number Diff line number Diff line
@@ -26,21 +26,32 @@ struct mm_struct;
 *
 *  - flush_tlb_all() flushes all processes TLB entries
 *  - flush_tlb_mm(mm) flushes the specified mm context TLB entries
 *  - flush_tlb_page(vma, vmaddr) flushes one page
 *  - flush_tlb_range(vma, start, end) flushes a range of pages
 *  - flush_tlb_page(vma, address) flushes a page
 *  - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
 *  - flush_tlb_kernel_page(address) flushes a kernel page
 *
 *  - reload_tlb_page(vma, address, pte) flushes the TLB for address like
 *    flush_tlb_page, then replaces it with a TLB for pte.
 */
extern void flush_tlb_all(void);
extern void flush_tlb_mm(struct mm_struct *mm);
extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
			    unsigned long end);
extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
extern void flush_tlb_one(unsigned long vaddr);

static inline void flush_tlb_page(struct vm_area_struct *vma,
				unsigned long addr)
				  unsigned long address)
{
	flush_tlb_one(addr);
	flush_tlb_range(vma, address, address + PAGE_SIZE);
}

static inline void flush_tlb_kernel_page(unsigned long address)
{
	flush_tlb_kernel_range(address, address + PAGE_SIZE);
}

extern void reload_tlb_page(struct vm_area_struct *vma, unsigned long addr,
			    pte_t pte);

#endif /* _ASM_NIOS2_TLBFLUSH_H */
+12 −0
Original line number Diff line number Diff line
@@ -9,12 +9,20 @@
#include <linux/export.h>
#include <linux/string.h>

#include <asm/cacheflush.h>
#include <asm/pgtable.h>

/* string functions */

EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memmove);

/* memory management */

EXPORT_SYMBOL(empty_zero_page);
EXPORT_SYMBOL(flush_icache_range);

/*
 * libgcc functions - functions that are used internally by the
 * compiler...  (prototypes are not correct though, but that
@@ -31,3 +39,7 @@ DECLARE_EXPORT(__udivsi3);
DECLARE_EXPORT(__umoddi3);
DECLARE_EXPORT(__umodsi3);
DECLARE_EXPORT(__muldi3);
DECLARE_EXPORT(__ucmpdi2);
DECLARE_EXPORT(__lshrdi3);
DECLARE_EXPORT(__ashldi3);
DECLARE_EXPORT(__ashrdi3);
+5 −2
Original line number Diff line number Diff line
@@ -198,12 +198,15 @@ void flush_dcache_page(struct page *page)
EXPORT_SYMBOL(flush_dcache_page);

void update_mmu_cache(struct vm_area_struct *vma,
		      unsigned long address, pte_t *pte)
		      unsigned long address, pte_t *ptep)
{
	unsigned long pfn = pte_pfn(*pte);
	pte_t pte = *ptep;
	unsigned long pfn = pte_pfn(pte);
	struct page *page;
	struct address_space *mapping;

	reload_tlb_page(vma, address, pte);

	if (!pfn_valid(pfn))
		return;

Loading