aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarcelo Tosatti <marcelo.tosatti@cyclades.com>2005-08-07 12:42:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-07 13:00:39 -0400
commit079da354db3473b56eb938ca53a2cb0804ea9c8c (patch)
treefab030e2a029b063f548431d966879526341bc1b /arch
parent204085c52aa9975a90a894cb385360a141f1e4a3 (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')
-rw-r--r--arch/ppc/8xx_io/commproc.c18
-rw-r--r--arch/ppc/syslib/m8xx_setup.c8
2 files changed, 3 insertions, 23 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
42extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep);
43
44static void m8xx_cpm_dpinit(void); 42static void m8xx_cpm_dpinit(void);
45static uint host_buffer; /* One page of host buffer */ 43static uint host_buffer; /* One page of host buffer */
46static uint host_end; /* end + 1 */ 44static 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
111extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
112
113void 109void
114m8xx_cpm_reset(uint bootpage) 110m8xx_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;
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index c1db2ab1d154..55a381af4e37 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -57,7 +57,7 @@ unsigned char __res[sizeof(bd_t)];
57extern void m8xx_ide_init(void); 57extern void m8xx_ide_init(void);
58 58
59extern unsigned long find_available_memory(void); 59extern unsigned long find_available_memory(void);
60extern void m8xx_cpm_reset(uint cpm_page); 60extern void m8xx_cpm_reset();
61extern void m8xx_wdt_handler_install(bd_t *bp); 61extern void m8xx_wdt_handler_install(bd_t *bp);
62extern void rpxfb_alloc_pages(void); 62extern void rpxfb_alloc_pages(void);
63extern void cpm_interrupt_init(void); 63extern void cpm_interrupt_init(void);
@@ -70,13 +70,9 @@ board_init(void)
70void __init 70void __init
71m8xx_setup_arch(void) 71m8xx_setup_arch(void)
72{ 72{
73 int cpm_page;
74
75 cpm_page = (int) alloc_bootmem_pages(PAGE_SIZE);
76
77 /* Reset the Communication Processor Module. 73 /* Reset the Communication Processor Module.
78 */ 74 */
79 m8xx_cpm_reset(cpm_page); 75 m8xx_cpm_reset();
80 76
81#ifdef CONFIG_FB_RPX 77#ifdef CONFIG_FB_RPX
82 rpxfb_alloc_pages(); 78 rpxfb_alloc_pages();