diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 20:25:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 20:25:38 -0400 |
commit | e404f91ed2180dfecbab15dd4d39c543353385fb (patch) | |
tree | c256e29b1c738d5e5b5478f19b369b1fd90bd1e2 /arch/tile/mm | |
parent | 18a043f9413277523cf5011e594caa1747db4948 (diff) | |
parent | e18105c128734b1671739ad4d85e216ebec28c61 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/tile: convert a BUG_ON to BUILD_BUG_ON
arch/tile: make ptrace() work properly for TILE-Gx COMPAT mode
arch/tile: support new info op generated by compiler
arch/tile: minor whitespace/naming changes for string support files
arch/tile: enable single-step support for TILE-Gx
arch/tile: parameterize system PLs to support KVM port
arch/tile: add Tilera's <arch/sim.h> header as an open-source header
arch/tile: Bomb C99 comments to C89 comments in tile's <arch/sim_def.h>
arch/tile: prevent corrupt top frame from causing backtracer runaway
arch/tile: various top-level Makefile cleanups
arch/tile: change lower bound on syscall error return to -4095
arch/tile: properly export __mb_incoherent for modules
arch/tile: provide a definition of MAP_STACK
kmemleak: add TILE to the list of supported architectures.
char: hvc: check for error case
arch/tile: Add a warning if we try to allocate too much vmalloc memory.
arch/tile: update some comments to clarify register usage.
arch/tile: use better "punctuation" for VMSPLIT_3_5G and friends
arch/tile: Use <asm-generic/syscalls.h>
tile: replace some BUG_ON checks with BUILD_BUG_ON checks
Diffstat (limited to 'arch/tile/mm')
-rw-r--r-- | arch/tile/mm/fault.c | 12 | ||||
-rw-r--r-- | arch/tile/mm/homecache.c | 11 | ||||
-rw-r--r-- | arch/tile/mm/init.c | 2 |
3 files changed, 10 insertions, 15 deletions
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index 704f3e8a4385..f295b4ac941d 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
@@ -66,10 +66,10 @@ static noinline void force_sig_info_fault(int si_signo, int si_code, | |||
66 | #ifndef __tilegx__ | 66 | #ifndef __tilegx__ |
67 | /* | 67 | /* |
68 | * Synthesize the fault a PL0 process would get by doing a word-load of | 68 | * Synthesize the fault a PL0 process would get by doing a word-load of |
69 | * an unaligned address or a high kernel address. Called indirectly | 69 | * an unaligned address or a high kernel address. |
70 | * from sys_cmpxchg() in kernel/intvec.S. | ||
71 | */ | 70 | */ |
72 | int _sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *regs) | 71 | SYSCALL_DEFINE2(cmpxchg_badaddr, unsigned long, address, |
72 | struct pt_regs *, regs) | ||
73 | { | 73 | { |
74 | if (address >= PAGE_OFFSET) | 74 | if (address >= PAGE_OFFSET) |
75 | force_sig_info_fault(SIGSEGV, SEGV_MAPERR, address, | 75 | force_sig_info_fault(SIGSEGV, SEGV_MAPERR, address, |
@@ -563,10 +563,10 @@ do_sigbus: | |||
563 | /* | 563 | /* |
564 | * When we take an ITLB or DTLB fault or access violation in the | 564 | * When we take an ITLB or DTLB fault or access violation in the |
565 | * supervisor while the critical section bit is set, the hypervisor is | 565 | * supervisor while the critical section bit is set, the hypervisor is |
566 | * reluctant to write new values into the EX_CONTEXT_1_x registers, | 566 | * reluctant to write new values into the EX_CONTEXT_K_x registers, |
567 | * since that might indicate we have not yet squirreled the SPR | 567 | * since that might indicate we have not yet squirreled the SPR |
568 | * contents away and can thus safely take a recursive interrupt. | 568 | * contents away and can thus safely take a recursive interrupt. |
569 | * Accordingly, the hypervisor passes us the PC via SYSTEM_SAVE_1_2. | 569 | * Accordingly, the hypervisor passes us the PC via SYSTEM_SAVE_K_2. |
570 | * | 570 | * |
571 | * Note that this routine is called before homecache_tlb_defer_enter(), | 571 | * Note that this routine is called before homecache_tlb_defer_enter(), |
572 | * which means that we can properly unlock any atomics that might | 572 | * which means that we can properly unlock any atomics that might |
@@ -610,7 +610,7 @@ struct intvec_state do_page_fault_ics(struct pt_regs *regs, int fault_num, | |||
610 | * fault. We didn't set up a kernel stack on initial entry to | 610 | * fault. We didn't set up a kernel stack on initial entry to |
611 | * sys_cmpxchg, but instead had one set up by the fault, which | 611 | * sys_cmpxchg, but instead had one set up by the fault, which |
612 | * (because sys_cmpxchg never releases ICS) came to us via the | 612 | * (because sys_cmpxchg never releases ICS) came to us via the |
613 | * SYSTEM_SAVE_1_2 mechanism, and thus EX_CONTEXT_1_[01] are | 613 | * SYSTEM_SAVE_K_2 mechanism, and thus EX_CONTEXT_K_[01] are |
614 | * still referencing the original user code. We release the | 614 | * still referencing the original user code. We release the |
615 | * atomic lock and rewrite pt_regs so that it appears that we | 615 | * atomic lock and rewrite pt_regs so that it appears that we |
616 | * came from user-space directly, and after we finish the | 616 | * came from user-space directly, and after we finish the |
diff --git a/arch/tile/mm/homecache.c b/arch/tile/mm/homecache.c index fb3b4a55cec4..d78df3a6ee15 100644 --- a/arch/tile/mm/homecache.c +++ b/arch/tile/mm/homecache.c | |||
@@ -37,6 +37,8 @@ | |||
37 | #include <asm/pgalloc.h> | 37 | #include <asm/pgalloc.h> |
38 | #include <asm/homecache.h> | 38 | #include <asm/homecache.h> |
39 | 39 | ||
40 | #include <arch/sim.h> | ||
41 | |||
40 | #include "migrate.h" | 42 | #include "migrate.h" |
41 | 43 | ||
42 | 44 | ||
@@ -217,13 +219,6 @@ static unsigned long cache_flush_length(unsigned long length) | |||
217 | return (length >= CHIP_L2_CACHE_SIZE()) ? HV_FLUSH_EVICT_L2 : length; | 219 | return (length >= CHIP_L2_CACHE_SIZE()) ? HV_FLUSH_EVICT_L2 : length; |
218 | } | 220 | } |
219 | 221 | ||
220 | /* On the simulator, confirm lines have been evicted everywhere. */ | ||
221 | static void validate_lines_evicted(unsigned long pfn, size_t length) | ||
222 | { | ||
223 | sim_syscall(SIM_SYSCALL_VALIDATE_LINES_EVICTED, | ||
224 | (HV_PhysAddr)pfn << PAGE_SHIFT, length); | ||
225 | } | ||
226 | |||
227 | /* Flush a page out of whatever cache(s) it is in. */ | 222 | /* Flush a page out of whatever cache(s) it is in. */ |
228 | void homecache_flush_cache(struct page *page, int order) | 223 | void homecache_flush_cache(struct page *page, int order) |
229 | { | 224 | { |
@@ -234,7 +229,7 @@ void homecache_flush_cache(struct page *page, int order) | |||
234 | 229 | ||
235 | homecache_mask(page, pages, &home_mask); | 230 | homecache_mask(page, pages, &home_mask); |
236 | flush_remote(pfn, length, &home_mask, 0, 0, 0, NULL, NULL, 0); | 231 | flush_remote(pfn, length, &home_mask, 0, 0, 0, NULL, NULL, 0); |
237 | validate_lines_evicted(pfn, pages * PAGE_SIZE); | 232 | sim_validate_lines_evicted(PFN_PHYS(pfn), pages * PAGE_SIZE); |
238 | } | 233 | } |
239 | 234 | ||
240 | 235 | ||
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c index d89c9eacd162..78e1982cb6c9 100644 --- a/arch/tile/mm/init.c +++ b/arch/tile/mm/init.c | |||
@@ -1060,7 +1060,7 @@ void free_initmem(void) | |||
1060 | 1060 | ||
1061 | /* | 1061 | /* |
1062 | * Free the pages mapped from 0xc0000000 that correspond to code | 1062 | * Free the pages mapped from 0xc0000000 that correspond to code |
1063 | * pages from 0xfd000000 that we won't use again after init. | 1063 | * pages from MEM_SV_INTRPT that we won't use again after init. |
1064 | */ | 1064 | */ |
1065 | free_init_pages("unused kernel text", | 1065 | free_init_pages("unused kernel text", |
1066 | (unsigned long)_sinittext - text_delta, | 1066 | (unsigned long)_sinittext - text_delta, |