• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/arch/sh64/mm/

Lines Matching refs:to

2  * This file is subject to the terms and conditions of the GNU General Public
11 * Hacks to third version Copyright (C) 2003 Paul Mundt
72 * Though in the meantime it saves us from having to duplicate all of
87 * We also need to reserve a slot for the D-cache in the DTLB, so we
110 The major changes in this compared to the old version are;
111 1. use more selective purging through OCBP instead of using ALLOCO to purge
113 that happen to be in the same set.
127 /* In order to accomplish this, we use the generic interface for adding and
248 is conservative and invalidates to the ends of the enclosing pages.
254 resolved. The icbi instruction has to be used through the user
256 would be cheaper to use the selective code for a large range than is
305 aligned_start = vma->vm_end; /* Skip to start of next region */
328 typically won't match current_asid. We'll have to switch ASID to do
336 belonging to another mm, so the owning process has to refill them
341 /* Align to start of cache line. Otherwise, suppose len==8 and start
395 /* Buffer used as the target of alloco instructions to purge data from cache
439 /* Don't use OCBI to invalidate the lines. That costs cycles directly.
450 /* Purge the entire contents of the dcache. The most efficient way to
451 achieve this is to use alloco instructions on a region of unused
452 memory equal in size to the cache, thereby causing the current
453 contents to be discarded by natural eviction. The alternative,
504 this by switching ASID to match the original mapping and purged
514 /* As long as the kernel is not pre-emptible, this doesn't need to be
524 to part of the OCBP execution.) */
546 /* As long as the kernel is not pre-emptible, this doesn't need to be
576 return; /* No way to find physical address of page */
608 advance (=> flush_tlb_range in advance to avoid multiple hits)
612 2. temporarily map each page in the range to a special effective
621 occurs create a page mapping to ocbp the line through
630 occurs use 4 * alloco to purge the line (+3 other probably
644 benchmarking to determine.
673 handling will be OK (TBC) : the range has just been written to by
680 we'll doubtless have to fault the TLB entry/ies in again with the
700 user_eaddr which will eventually be mapped to it, create a one-off
701 kernel-private eaddr mapped to the same paddr. This is used for
723 static void sh64_copy_user_page_coloured(void *to, void *from, unsigned long address)
729 internally, then given it up, then it's been allocated to the user.
731 sh64_dcache_purge_coloured_phy_page(__pa(to), (unsigned long) to);
733 coloured_to = (void *) sh64_make_unique_eaddr(address, __pa(to));
739 static void sh64_clear_user_page_coloured(void *to, unsigned long address)
745 sh64_dcache_purge_coloured_phy_page(__pa(to), (unsigned long) to);
747 coloured_to = (void *) sh64_make_unique_eaddr(address, __pa(to));
765 Note that the Linux term 'flush' corresponds to what is termed 'purge' in
774 /* Invalidate the entire contents of both caches, after writing back to
792 /* Have to do a purge here, despite the comments re I-cache below.
803 will be a flush_cache_all. Hence we don't need to touch the
804 I-cache. This is similar to the lack of action needed in
819 Note, 'end' is 1 byte beyond the end of the range to flush. */
831 'eaddr'. This seems to be used primarily in breaking COW. Note,
849 void copy_user_page(void *to, void *from, unsigned long address, struct page *page)
851 /* 'from' and 'to' are kernel virtual addresses (within the superpage
853 where the copy 'to' will be mapped after. This allows a custom
854 mapping to be used to ensure that the new copy is placed in the
855 right cache sets for the user to see it without having to bounce it
856 out via memory. Note however : the call to flush_page_to_ram in
862 always used just to deal with COW? (I suspect not). */
866 * by the/a user (e.g. for break_COW) : need to purge.
869 'from' there is no need to purge any cache lines from the 'from'
878 if (((address ^ (unsigned long) to) & CACHE_OC_SYN_MASK) == 0) {
880 sh64_page_copy(from, to);
882 sh64_copy_user_page_coloured(to, from, address);
885 /* Note, don't need to flush 'from' page from the cache again - it's
889 void clear_user_page(void *to, unsigned long address, struct page *page)
891 /* 'to' is a kernel virtual address (within the superpage
893 where the 'to' page will be mapped after. This allows a custom
894 mapping to be used to ensure that the new copy is placed in the
895 right cache sets for the user to see it without having to bounce it
899 if (((address ^ (unsigned long) to) & CACHE_OC_SYN_MASK) == 0) {
901 sh64_page_clear(to);
903 sh64_clear_user_page_coloured(to, address);
931 /* We also make sure to purge the same range from the D-cache since
947 the range is 'page'. This seems to be used mainly for invalidating
968 the current process. Used to flush signal trampolines on the stack
969 to make them executable. */