Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7e3bfc7c
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看板
提交
7e3bfc7c
编写于
4月 05, 2006
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MIPS] Handle IDE PIO cache aliases on SMP.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
bb12d612
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
60 addition
and
2 deletion
+60
-2
arch/mips/mm/c-r3k.c
arch/mips/mm/c-r3k.c
+5
-0
arch/mips/mm/c-r4k.c
arch/mips/mm/c-r4k.c
+1
-0
arch/mips/mm/c-sb1.c
arch/mips/mm/c-sb1.c
+1
-0
arch/mips/mm/c-tx39.c
arch/mips/mm/c-tx39.c
+7
-0
arch/mips/mm/cache.c
arch/mips/mm/cache.c
+1
-0
include/asm-mips/cacheflush.h
include/asm-mips/cacheflush.h
+1
-0
include/asm-mips/mach-generic/ide.h
include/asm-mips/mach-generic/ide.h
+44
-2
未找到文件。
arch/mips/mm/c-r3k.c
浏览文件 @
7e3bfc7c
...
...
@@ -260,6 +260,10 @@ static void r3k_flush_cache_page(struct vm_area_struct *vma, unsigned long page,
{
}
static
void
local_r3k_flush_data_cache_page
(
unsigned
long
addr
)
{
}
static
void
r3k_flush_data_cache_page
(
unsigned
long
addr
)
{
}
...
...
@@ -335,6 +339,7 @@ void __init r3k_cache_init(void)
flush_icache_range
=
r3k_flush_icache_range
;
flush_cache_sigtramp
=
r3k_flush_cache_sigtramp
;
local_flush_data_cache_page
=
local_r3k_flush_data_cache_page
;
flush_data_cache_page
=
r3k_flush_data_cache_page
;
_dma_cache_wback_inv
=
r3k_dma_cache_wback_inv
;
...
...
arch/mips/mm/c-r4k.c
浏览文件 @
7e3bfc7c
...
...
@@ -1199,6 +1199,7 @@ void __init r4k_cache_init(void)
flush_cache_sigtramp
=
r4k_flush_cache_sigtramp
;
flush_icache_all
=
r4k_flush_icache_all
;
local_flush_data_cache_page
=
local_r4k_flush_data_cache_page
;
flush_data_cache_page
=
r4k_flush_data_cache_page
;
flush_icache_range
=
r4k_flush_icache_range
;
...
...
arch/mips/mm/c-sb1.c
浏览文件 @
7e3bfc7c
...
...
@@ -528,6 +528,7 @@ void sb1_cache_init(void)
flush_cache_page
=
sb1_flush_cache_page
;
flush_cache_sigtramp
=
sb1_flush_cache_sigtramp
;
local_flush_data_cache_page
=
(
void
*
)
sb1_nop
;
flush_data_cache_page
=
(
void
*
)
sb1_nop
;
/* Full flush */
...
...
arch/mips/mm/c-tx39.c
浏览文件 @
7e3bfc7c
...
...
@@ -216,6 +216,11 @@ static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page
tx39_blast_icache_page_indexed
(
page
);
}
static
void
local_tx39_flush_data_cache_page
(
void
*
addr
)
{
tx39_blast_dcache_page
(
addr
);
}
static
void
tx39_flush_data_cache_page
(
unsigned
long
addr
)
{
tx39_blast_dcache_page
(
addr
);
...
...
@@ -381,6 +386,7 @@ void __init tx39_cache_init(void)
flush_icache_range
=
(
void
*
)
tx39h_flush_icache_all
;
flush_cache_sigtramp
=
(
void
*
)
tx39h_flush_icache_all
;
local_flush_data_cache_page
=
(
void
*
)
tx39h_flush_icache_all
;
flush_data_cache_page
=
(
void
*
)
tx39h_flush_icache_all
;
_dma_cache_wback_inv
=
tx39h_dma_cache_wback_inv
;
...
...
@@ -406,6 +412,7 @@ void __init tx39_cache_init(void)
flush_icache_range
=
tx39_flush_icache_range
;
flush_cache_sigtramp
=
tx39_flush_cache_sigtramp
;
local_flush_data_cache_page
=
local_tx39_flush_data_cache_page
;
flush_data_cache_page
=
tx39_flush_data_cache_page
;
_dma_cache_wback_inv
=
tx39_dma_cache_wback_inv
;
...
...
arch/mips/mm/cache.c
浏览文件 @
7e3bfc7c
...
...
@@ -30,6 +30,7 @@ void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page);
/* MIPS specific cache operations */
void
(
*
flush_cache_sigtramp
)(
unsigned
long
addr
);
void
(
*
local_flush_data_cache_page
)(
void
*
addr
);
void
(
*
flush_data_cache_page
)(
unsigned
long
addr
);
void
(
*
flush_icache_all
)(
void
);
...
...
include/asm-mips/cacheflush.h
浏览文件 @
7e3bfc7c
...
...
@@ -74,6 +74,7 @@ static inline void copy_from_user_page(struct vm_area_struct *vma,
extern
void
(
*
flush_cache_sigtramp
)(
unsigned
long
addr
);
extern
void
(
*
flush_icache_all
)(
void
);
extern
void
(
*
local_flush_data_cache_page
)(
void
*
addr
);
extern
void
(
*
flush_data_cache_page
)(
unsigned
long
addr
);
/*
...
...
include/asm-mips/mach-generic/ide.h
浏览文件 @
7e3bfc7c
...
...
@@ -104,65 +104,107 @@ static __inline__ unsigned long ide_default_io_base(int index)
#endif
/* MIPS port and memory-mapped I/O string operations. */
static
inline
void
__ide_flush_prologue
(
void
)
{
#ifdef CONFIG_SMP
if
(
cpu_has_dc_aliases
)
preempt_disable
();
#endif
}
static
inline
void
__ide_flush_epilogue
(
void
)
{
#ifdef CONFIG_SMP
if
(
cpu_has_dc_aliases
)
preempt_enable
();
#endif
}
static
inline
void
__ide_flush_dcache_range
(
unsigned
long
addr
,
unsigned
long
size
)
{
if
(
cpu_has_dc_aliases
)
{
unsigned
long
end
=
addr
+
size
;
for
(;
addr
<
end
;
addr
+=
PAGE_SIZE
)
flush_dcache_page
(
virt_to_page
(
addr
));
while
(
addr
<
end
)
{
local_flush_data_cache_page
((
void
*
)
addr
);
addr
+=
PAGE_SIZE
;
}
}
}
/*
* insw() and gang might be called with interrupts disabled, so we can't
* send IPIs for flushing due to the potencial of deadlocks, see the comment
* above smp_call_function() in arch/mips/kernel/smp.c. We work around the
* problem by disabling preemption so we know we actually perform the flush
* on the processor that actually has the lines to be flushed which hopefully
* is even better for performance anyway.
*/
static
inline
void
__ide_insw
(
unsigned
long
port
,
void
*
addr
,
unsigned
int
count
)
{
__ide_flush_prologue
();
insw
(
port
,
addr
,
count
);
__ide_flush_dcache_range
((
unsigned
long
)
addr
,
count
*
2
);
__ide_flush_epilogue
();
}
static
inline
void
__ide_insl
(
unsigned
long
port
,
void
*
addr
,
unsigned
int
count
)
{
__ide_flush_prologue
();
insl
(
port
,
addr
,
count
);
__ide_flush_dcache_range
((
unsigned
long
)
addr
,
count
*
4
);
__ide_flush_epilogue
();
}
static
inline
void
__ide_outsw
(
unsigned
long
port
,
const
void
*
addr
,
unsigned
long
count
)
{
__ide_flush_prologue
();
outsw
(
port
,
addr
,
count
);
__ide_flush_dcache_range
((
unsigned
long
)
addr
,
count
*
2
);
__ide_flush_epilogue
();
}
static
inline
void
__ide_outsl
(
unsigned
long
port
,
const
void
*
addr
,
unsigned
long
count
)
{
__ide_flush_prologue
();
outsl
(
port
,
addr
,
count
);
__ide_flush_dcache_range
((
unsigned
long
)
addr
,
count
*
4
);
__ide_flush_epilogue
();
}
static
inline
void
__ide_mm_insw
(
void
__iomem
*
port
,
void
*
addr
,
u32
count
)
{
__ide_flush_prologue
();
readsw
(
port
,
addr
,
count
);
__ide_flush_dcache_range
((
unsigned
long
)
addr
,
count
*
2
);
__ide_flush_epilogue
();
}
static
inline
void
__ide_mm_insl
(
void
__iomem
*
port
,
void
*
addr
,
u32
count
)
{
__ide_flush_prologue
();
readsl
(
port
,
addr
,
count
);
__ide_flush_dcache_range
((
unsigned
long
)
addr
,
count
*
4
);
__ide_flush_epilogue
();
}
static
inline
void
__ide_mm_outsw
(
void
__iomem
*
port
,
void
*
addr
,
u32
count
)
{
__ide_flush_prologue
();
writesw
(
port
,
addr
,
count
);
__ide_flush_dcache_range
((
unsigned
long
)
addr
,
count
*
2
);
__ide_flush_epilogue
();
}
static
inline
void
__ide_mm_outsl
(
void
__iomem
*
port
,
void
*
addr
,
u32
count
)
{
__ide_flush_prologue
();
writesl
(
port
,
addr
,
count
);
__ide_flush_dcache_range
((
unsigned
long
)
addr
,
count
*
4
);
__ide_flush_epilogue
();
}
/* ide_insw calls insw, not __ide_insw. Why? */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录