Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a5ee3634
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看板
提交
a5ee3634
编写于
11月 09, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
上级
28d838cc
49ebd7c6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
30 addition
and
12 deletion
+30
-12
drivers/char/agp/backend.c
drivers/char/agp/backend.c
+7
-2
drivers/char/agp/generic.c
drivers/char/agp/generic.c
+8
-3
drivers/char/agp/i460-agp.c
drivers/char/agp/i460-agp.c
+11
-6
drivers/char/agp/intel-agp.c
drivers/char/agp/intel-agp.c
+4
-1
未找到文件。
drivers/char/agp/backend.c
浏览文件 @
a5ee3634
...
...
@@ -147,6 +147,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
printk
(
KERN_ERR
PFX
"unable to get memory for scratch page.
\n
"
);
return
-
ENOMEM
;
}
global_flush_tlb
();
bridge
->
scratch_page_real
=
virt_to_gart
(
addr
);
bridge
->
scratch_page
=
...
...
@@ -187,9 +188,11 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
return
0
;
err_out:
if
(
bridge
->
driver
->
needs_scratch_page
)
if
(
bridge
->
driver
->
needs_scratch_page
)
{
bridge
->
driver
->
agp_destroy_page
(
gart_to_virt
(
bridge
->
scratch_page_real
));
global_flush_tlb
();
}
if
(
got_gatt
)
bridge
->
driver
->
free_gatt_table
(
bridge
);
if
(
got_keylist
)
{
...
...
@@ -211,9 +214,11 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
bridge
->
key_list
=
NULL
;
if
(
bridge
->
driver
->
agp_destroy_page
&&
bridge
->
driver
->
needs_scratch_page
)
bridge
->
driver
->
needs_scratch_page
)
{
bridge
->
driver
->
agp_destroy_page
(
gart_to_virt
(
bridge
->
scratch_page_real
));
global_flush_tlb
();
}
}
/* When we remove the global variable agp_bridge from all drivers
...
...
drivers/char/agp/generic.c
浏览文件 @
a5ee3634
...
...
@@ -57,7 +57,8 @@ int map_page_into_agp(struct page *page)
{
int
i
;
i
=
change_page_attr
(
page
,
1
,
PAGE_KERNEL_NOCACHE
);
global_flush_tlb
();
/* Caller's responsibility to call global_flush_tlb() for
* performance reasons */
return
i
;
}
EXPORT_SYMBOL_GPL
(
map_page_into_agp
);
...
...
@@ -66,7 +67,8 @@ int unmap_page_from_agp(struct page *page)
{
int
i
;
i
=
change_page_attr
(
page
,
1
,
PAGE_KERNEL
);
global_flush_tlb
();
/* Caller's responsibility to call global_flush_tlb() for
* performance reasons */
return
i
;
}
EXPORT_SYMBOL_GPL
(
unmap_page_from_agp
);
...
...
@@ -153,6 +155,7 @@ void agp_free_memory(struct agp_memory *curr)
for
(
i
=
0
;
i
<
curr
->
page_count
;
i
++
)
{
curr
->
bridge
->
driver
->
agp_destroy_page
(
gart_to_virt
(
curr
->
memory
[
i
]));
}
global_flush_tlb
();
}
agp_free_key
(
curr
->
key
);
vfree
(
curr
->
memory
);
...
...
@@ -210,7 +213,9 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
new
->
memory
[
i
]
=
virt_to_gart
(
addr
);
new
->
page_count
++
;
}
new
->
bridge
=
bridge
;
global_flush_tlb
();
new
->
bridge
=
bridge
;
flush_agp_mappings
();
...
...
drivers/char/agp/i460-agp.c
浏览文件 @
a5ee3634
...
...
@@ -111,8 +111,10 @@ static int i460_fetch_size (void)
if
(
i460
.
io_page_shift
!=
I460_IO_PAGE_SHIFT
)
{
printk
(
KERN_ERR
PFX
"I/O (GART) page-size %ZuKB doesn't match expected size %ZuKB
\n
"
,
1UL
<<
(
i460
.
io_page_shift
-
10
),
1UL
<<
(
I460_IO_PAGE_SHIFT
));
"I/O (GART) page-size %luKB doesn't match expected "
"size %luKB
\n
"
,
1UL
<<
(
i460
.
io_page_shift
-
10
),
1UL
<<
(
I460_IO_PAGE_SHIFT
));
return
0
;
}
...
...
@@ -514,9 +516,10 @@ static void *i460_alloc_page (struct agp_bridge_data *bridge)
{
void
*
page
;
if
(
I460_IO_PAGE_SHIFT
<=
PAGE_SHIFT
)
if
(
I460_IO_PAGE_SHIFT
<=
PAGE_SHIFT
)
{
page
=
agp_generic_alloc_page
(
agp_bridge
);
else
global_flush_tlb
();
}
else
/* Returning NULL would cause problems */
/* AK: really dubious code. */
page
=
(
void
*
)
~
0UL
;
...
...
@@ -525,8 +528,10 @@ static void *i460_alloc_page (struct agp_bridge_data *bridge)
static
void
i460_destroy_page
(
void
*
page
)
{
if
(
I460_IO_PAGE_SHIFT
<=
PAGE_SHIFT
)
if
(
I460_IO_PAGE_SHIFT
<=
PAGE_SHIFT
)
{
agp_generic_destroy_page
(
page
);
global_flush_tlb
();
}
}
#endif
/* I460_LARGE_IO_PAGES */
...
...
@@ -536,7 +541,7 @@ static unsigned long i460_mask_memory (struct agp_bridge_data *bridge,
{
/* Make sure the returned address is a valid GATT entry */
return
bridge
->
driver
->
masks
[
0
].
mask
|
(((
addr
&
~
((
1
<<
I460_IO_PAGE_SHIFT
)
-
1
))
&
0xfffff
f
000
)
>>
12
);
|
(((
addr
&
~
((
1
<<
I460_IO_PAGE_SHIFT
)
-
1
))
&
0xfffff000
)
>>
12
);
}
struct
agp_bridge_driver
intel_i460_driver
=
{
...
...
drivers/char/agp/intel-agp.c
浏览文件 @
a5ee3634
...
...
@@ -270,6 +270,7 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type)
switch
(
pg_count
)
{
case
1
:
addr
=
agp_bridge
->
driver
->
agp_alloc_page
(
agp_bridge
);
global_flush_tlb
();
break
;
case
4
:
/* kludge to get 4 physical pages for ARGB cursor */
...
...
@@ -330,9 +331,11 @@ static void intel_i810_free_by_type(struct agp_memory *curr)
if
(
curr
->
type
==
AGP_PHYS_MEMORY
)
{
if
(
curr
->
page_count
==
4
)
i8xx_destroy_pages
(
gart_to_virt
(
curr
->
memory
[
0
]));
else
else
{
agp_bridge
->
driver
->
agp_destroy_page
(
gart_to_virt
(
curr
->
memory
[
0
]));
global_flush_tlb
();
}
vfree
(
curr
->
memory
);
}
kfree
(
curr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录