Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
dc75aa33
Commit
dc75aa33
authored
Dec 27, 2002
by
Geert Uytterhoeven
Committed by
Linus Torvalds
Dec 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Sun-3/3x PTE updates
Sun-3/3x PTE updates (from Sam Creasey)
parent
114a3c1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
arch/m68k/mm/sun3mmu.c
arch/m68k/mm/sun3mmu.c
+1
-1
arch/m68k/sun3/dvma.c
arch/m68k/sun3/dvma.c
+9
-3
arch/m68k/sun3x/dvma.c
arch/m68k/sun3x/dvma.c
+4
-3
No files found.
arch/m68k/mm/sun3mmu.c
View file @
dc75aa33
...
@@ -83,7 +83,7 @@ void __init paging_init(void)
...
@@ -83,7 +83,7 @@ void __init paging_init(void)
/* now change pg_table to kernel virtual addresses */
/* now change pg_table to kernel virtual addresses */
pg_table
=
(
pte_t
*
)
__va
((
unsigned
long
)
pg_table
);
pg_table
=
(
pte_t
*
)
__va
((
unsigned
long
)
pg_table
);
for
(
i
=
0
;
i
<
PTRS_PER_PTE
;
++
i
,
++
pg_table
)
{
for
(
i
=
0
;
i
<
PTRS_PER_PTE
;
++
i
,
++
pg_table
)
{
pte_t
pte
=
__mk_pte
(
address
,
PAGE_INIT
);
pte_t
pte
=
pfn_pte
(
virt_to_pfn
(
address
)
,
PAGE_INIT
);
if
(
address
>=
(
unsigned
long
)
high_memory
)
if
(
address
>=
(
unsigned
long
)
high_memory
)
pte_val
(
pte
)
=
0
;
pte_val
(
pte
)
=
0
;
set_pte
(
pg_table
,
pte
);
set_pte
(
pg_table
,
pte
);
...
...
arch/m68k/sun3/dvma.c
View file @
dc75aa33
/*
/* dvma support routines */
* linux/arch/m68k/sun3/dvma.c
*
* Written by Sam Creasey
*
* Sun3 IOMMU routines used for dvma accesses.
*
*/
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/mm.h>
...
@@ -22,7 +28,7 @@ inline unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr)
...
@@ -22,7 +28,7 @@ inline unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr)
j
=
*
(
volatile
unsigned
long
*
)
kaddr
;
j
=
*
(
volatile
unsigned
long
*
)
kaddr
;
*
(
volatile
unsigned
long
*
)
kaddr
=
j
;
*
(
volatile
unsigned
long
*
)
kaddr
=
j
;
ptep
=
__mk_pte
(
kaddr
,
PAGE_KERNEL
);
ptep
=
pfn_pte
(
virt_to_pfn
(
kaddr
)
,
PAGE_KERNEL
);
pte
=
pte_val
(
ptep
);
pte
=
pte_val
(
ptep
);
// printk("dvma_remap: addr %lx -> %lx pte %08lx len %x\n",
// printk("dvma_remap: addr %lx -> %lx pte %08lx len %x\n",
// kaddr, vaddr, pte, len);
// kaddr, vaddr, pte, len);
...
...
arch/m68k/sun3x/dvma.c
View file @
dc75aa33
...
@@ -102,7 +102,7 @@ inline int dvma_map_cpu(unsigned long kaddr,
...
@@ -102,7 +102,7 @@ inline int dvma_map_cpu(unsigned long kaddr,
pmd_t
*
pmd
;
pmd_t
*
pmd
;
unsigned
long
end2
;
unsigned
long
end2
;
if
((
pmd
=
pmd_alloc
_kernel
(
pgd
,
vaddr
))
==
NULL
)
{
if
((
pmd
=
pmd_alloc
(
&
init_mm
,
pgd
,
vaddr
))
==
NULL
)
{
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
goto
out
;
goto
out
;
}
}
...
@@ -116,7 +116,7 @@ inline int dvma_map_cpu(unsigned long kaddr,
...
@@ -116,7 +116,7 @@ inline int dvma_map_cpu(unsigned long kaddr,
pte_t
*
pte
;
pte_t
*
pte
;
unsigned
long
end3
;
unsigned
long
end3
;
if
((
pte
=
pte_alloc_kernel
(
pmd
,
vaddr
))
==
NULL
)
{
if
((
pte
=
pte_alloc_kernel
(
&
init_mm
,
pmd
,
vaddr
))
==
NULL
)
{
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
goto
out
;
goto
out
;
}
}
...
@@ -131,7 +131,8 @@ inline int dvma_map_cpu(unsigned long kaddr,
...
@@ -131,7 +131,8 @@ inline int dvma_map_cpu(unsigned long kaddr,
printk
(
"mapping %08lx phys to %08lx
\n
"
,
printk
(
"mapping %08lx phys to %08lx
\n
"
,
__pa
(
kaddr
),
vaddr
);
__pa
(
kaddr
),
vaddr
);
#endif
#endif
set_pte
(
pte
,
__mk_pte
(
kaddr
,
PAGE_KERNEL
));
set_pte
(
pte
,
pfn_pte
(
virt_to_pfn
(
kaddr
),
PAGE_KERNEL
));
pte
++
;
pte
++
;
kaddr
+=
PAGE_SIZE
;
kaddr
+=
PAGE_SIZE
;
vaddr
+=
PAGE_SIZE
;
vaddr
+=
PAGE_SIZE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment