Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
5cd9194a
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5cd9194a
编写于
11月 28, 2005
作者:
D
David S. Miller
提交者:
Linus Torvalds
11月 28, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] sparc: convert IO remapping to VM_PFNMAP
Here are the Sparc bits. Signed-off-by:
N
Linus Torvalds
<
torvalds@osdl.org
>
上级
6aab341e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
16 deletion
+19
-16
arch/sparc/mm/generic.c
arch/sparc/mm/generic.c
+5
-5
arch/sparc64/mm/generic.c
arch/sparc64/mm/generic.c
+14
-1
include/asm-sparc64/pgtable.h
include/asm-sparc64/pgtable.h
+0
-10
未找到文件。
arch/sparc/mm/generic.c
浏览文件 @
5cd9194a
...
...
@@ -32,9 +32,7 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigne
if
(
end
>
PMD_SIZE
)
end
=
PMD_SIZE
;
do
{
pte_t
oldpage
=
*
pte
;
pte_clear
(
mm
,
address
,
pte
);
set_pte
(
pte
,
mk_pte_io
(
offset
,
prot
,
space
));
set_pte_at
(
mm
,
address
,
pte
,
mk_pte_io
(
offset
,
prot
,
space
));
address
+=
PAGE_SIZE
;
offset
+=
PAGE_SIZE
;
pte
++
;
...
...
@@ -63,7 +61,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned
}
int
io_remap_pfn_range
(
struct
vm_area_struct
*
vma
,
unsigned
long
from
,
unsigned
long
pfn
,
unsigned
long
size
,
pgprot_t
prot
)
unsigned
long
pfn
,
unsigned
long
size
,
pgprot_t
prot
)
{
int
error
=
0
;
pgd_t
*
dir
;
...
...
@@ -74,7 +72,9 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
unsigned
long
offset
=
GET_PFN
(
pfn
)
<<
PAGE_SHIFT
;
/* See comment in mm/memory.c remap_pfn_range */
vma
->
vm_flags
|=
VM_IO
|
VM_RESERVED
|
VM_UNPAGED
;
vma
->
vm_flags
|=
VM_IO
|
VM_RESERVED
|
VM_PFNMAP
;
vma
->
vm_pgoff
=
(
offset
>>
PAGE_SHIFT
)
|
((
unsigned
long
)
space
<<
28UL
);
prot
=
__pgprot
(
pg_iobits
);
offset
-=
from
;
...
...
arch/sparc64/mm/generic.c
浏览文件 @
5cd9194a
...
...
@@ -15,6 +15,15 @@
#include <asm/page.h>
#include <asm/tlbflush.h>
static
inline
pte_t
mk_pte_io
(
unsigned
long
page
,
pgprot_t
prot
,
int
space
)
{
pte_t
pte
;
pte_val
(
pte
)
=
(((
page
)
|
pgprot_val
(
prot
)
|
_PAGE_E
)
&
~
(
unsigned
long
)
_PAGE_CACHE
);
pte_val
(
pte
)
|=
(((
unsigned
long
)
space
)
<<
32
);
return
pte
;
}
/* Remap IO memory, the same way as remap_pfn_range(), but use
* the obio memory space.
*
...
...
@@ -126,9 +135,13 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
struct
mm_struct
*
mm
=
vma
->
vm_mm
;
int
space
=
GET_IOSPACE
(
pfn
);
unsigned
long
offset
=
GET_PFN
(
pfn
)
<<
PAGE_SHIFT
;
unsigned
long
phys_base
;
phys_base
=
offset
|
(((
unsigned
long
)
space
)
<<
32UL
);
/* See comment in mm/memory.c remap_pfn_range */
vma
->
vm_flags
|=
VM_IO
|
VM_RESERVED
|
VM_UNPAGED
;
vma
->
vm_flags
|=
VM_IO
|
VM_RESERVED
|
VM_PFNMAP
;
vma
->
vm_pgoff
=
phys_base
>>
PAGE_SHIFT
;
prot
=
__pgprot
(
pg_iobits
);
offset
-=
from
;
...
...
include/asm-sparc64/pgtable.h
浏览文件 @
5cd9194a
...
...
@@ -348,16 +348,6 @@ extern unsigned long find_ecache_flush_span(unsigned long size);
struct
vm_area_struct
;
extern
void
update_mmu_cache
(
struct
vm_area_struct
*
,
unsigned
long
,
pte_t
);
/* Make a non-present pseudo-TTE. */
static
inline
pte_t
mk_pte_io
(
unsigned
long
page
,
pgprot_t
prot
,
int
space
)
{
pte_t
pte
;
pte_val
(
pte
)
=
(((
page
)
|
pgprot_val
(
prot
)
|
_PAGE_E
)
&
~
(
unsigned
long
)
_PAGE_CACHE
);
pte_val
(
pte
)
|=
(((
unsigned
long
)
space
)
<<
32
);
return
pte
;
}
/* Encode and de-code a swap entry */
#define __swp_type(entry) (((entry).val >> PAGE_SHIFT) & 0xffUL)
#define __swp_offset(entry) ((entry).val >> (PAGE_SHIFT + 8UL))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录