diff options
author | Marcelo Tosatti <marcelo.tosatti@cyclades.com> | 2005-08-07 12:42:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-07 13:00:39 -0400 |
commit | 079da354db3473b56eb938ca53a2cb0804ea9c8c (patch) | |
tree | fab030e2a029b063f548431d966879526341bc1b /arch/ppc/8xx_io/commproc.c | |
parent | 204085c52aa9975a90a894cb385360a141f1e4a3 (diff) |
[PATCH] ppc32: 8xx commproc avoid direct pte manipulation, use dma coherent API instead
Touching the pte directly causes the 8Mbyte TLB entry to be invalidated.
This has been fixed in v2.4 for ages.
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/8xx_io/commproc.c')
-rw-r--r-- | arch/ppc/8xx_io/commproc.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 67194c18dd5c..11726e2a4ec8 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c | |||
@@ -39,8 +39,6 @@ | |||
39 | #include <asm/tlbflush.h> | 39 | #include <asm/tlbflush.h> |
40 | #include <asm/rheap.h> | 40 | #include <asm/rheap.h> |
41 | 41 | ||
42 | extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep); | ||
43 | |||
44 | static void m8xx_cpm_dpinit(void); | 42 | static void m8xx_cpm_dpinit(void); |
45 | static uint host_buffer; /* One page of host buffer */ | 43 | static uint host_buffer; /* One page of host buffer */ |
46 | static uint host_end; /* end + 1 */ | 44 | static uint host_end; /* end + 1 */ |
@@ -108,14 +106,11 @@ struct hw_interrupt_type cpm_pic = { | |||
108 | .end = cpm_eoi, | 106 | .end = cpm_eoi, |
109 | }; | 107 | }; |
110 | 108 | ||
111 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | ||
112 | |||
113 | void | 109 | void |
114 | m8xx_cpm_reset(uint bootpage) | 110 | m8xx_cpm_reset(void) |
115 | { | 111 | { |
116 | volatile immap_t *imp; | 112 | volatile immap_t *imp; |
117 | volatile cpm8xx_t *commproc; | 113 | volatile cpm8xx_t *commproc; |
118 | pte_t *pte; | ||
119 | 114 | ||
120 | imp = (immap_t *)IMAP_ADDR; | 115 | imp = (immap_t *)IMAP_ADDR; |
121 | commproc = (cpm8xx_t *)&imp->im_cpm; | 116 | commproc = (cpm8xx_t *)&imp->im_cpm; |
@@ -143,17 +138,6 @@ m8xx_cpm_reset(uint bootpage) | |||
143 | /* Reclaim the DP memory for our use. */ | 138 | /* Reclaim the DP memory for our use. */ |
144 | m8xx_cpm_dpinit(); | 139 | m8xx_cpm_dpinit(); |
145 | 140 | ||
146 | /* get the PTE for the bootpage */ | ||
147 | if (!get_pteptr(&init_mm, bootpage, &pte)) | ||
148 | panic("get_pteptr failed\n"); | ||
149 | |||
150 | /* and make it uncachable */ | ||
151 | pte_val(*pte) |= _PAGE_NO_CACHE; | ||
152 | _tlbie(bootpage); | ||
153 | |||
154 | host_buffer = bootpage; | ||
155 | host_end = host_buffer + PAGE_SIZE; | ||
156 | |||
157 | /* Tell everyone where the comm processor resides. | 141 | /* Tell everyone where the comm processor resides. |
158 | */ | 142 | */ |
159 | cpmp = (cpm8xx_t *)commproc; | 143 | cpmp = (cpm8xx_t *)commproc; |