Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
97d26b80
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
97d26b80
编写于
6月 08, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/home/rmk/linux-2.6-arm
上级
5131bf5d
dcef1f63
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
73 addition
and
8 deletion
+73
-8
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-armv.S
+11
-5
arch/arm/kernel/traps.c
arch/arm/kernel/traps.c
+49
-0
arch/arm/lib/io-writesw-armv4.S
arch/arm/lib/io-writesw-armv4.S
+3
-3
arch/arm/mm/Kconfig
arch/arm/mm/Kconfig
+8
-0
include/asm-arm/arch-pxa/pxa-regs.h
include/asm-arm/arch-pxa/pxa-regs.h
+2
-0
未找到文件。
arch/arm/kernel/entry-armv.S
浏览文件 @
97d26b80
...
...
@@ -269,7 +269,7 @@ __pabt_svc:
add
r5
,
sp
,
#
S_PC
ldmia
r7
,
{
r2
-
r4
}
@
Get
USR
pc
,
cpsr
#if __LINUX_ARM_ARCH__ < 6
#if __LINUX_ARM_ARCH__ < 6
&& !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
@
make
sure
our
user
space
atomic
helper
is
aborted
cmp
r2
,
#
VIRT_OFFSET
bichs
r3
,
r3
,
#
PSR_Z_BIT
...
...
@@ -616,11 +616,17 @@ __kuser_helper_start:
__kuser_cmpxchg
:
@
0xffff0fc0
#if
__LINUX_ARM_ARCH__ < 6
#if
defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
#ifdef CONFIG_SMP /* sanity check */
#error "CONFIG_SMP on a machine supporting pre-ARMv6 processors?"
#endif
/
*
*
Poor
you
.
No
fast
solution
possible
...
*
The
kernel
itself
must
perform
the
operation
.
*
A
special
ghost
syscall
is
used
for
that
(
see
traps
.
c
)
.
*/
swi
#
0x9ffff0
mov
pc
,
lr
#elif __LINUX_ARM_ARCH__ < 6
/
*
*
Theory
of
operation
:
...
...
arch/arm/kernel/traps.c
浏览文件 @
97d26b80
...
...
@@ -464,6 +464,55 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
#endif
return
0
;
#ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG
/*
* Atomically store r1 in *r2 if *r2 is equal to r0 for user space.
* Return zero in r0 if *MEM was changed or non-zero if no exchange
* happened. Also set the user C flag accordingly.
* If access permissions have to be fixed up then non-zero is
* returned and the operation has to be re-attempted.
*
* *NOTE*: This is a ghost syscall private to the kernel. Only the
* __kuser_cmpxchg code in entry-armv.S should be aware of its
* existence. Don't ever use this from user code.
*/
case
0xfff0
:
{
extern
void
do_DataAbort
(
unsigned
long
addr
,
unsigned
int
fsr
,
struct
pt_regs
*
regs
);
unsigned
long
val
;
unsigned
long
addr
=
regs
->
ARM_r2
;
struct
mm_struct
*
mm
=
current
->
mm
;
pgd_t
*
pgd
;
pmd_t
*
pmd
;
pte_t
*
pte
;
regs
->
ARM_cpsr
&=
~
PSR_C_BIT
;
spin_lock
(
&
mm
->
page_table_lock
);
pgd
=
pgd_offset
(
mm
,
addr
);
if
(
!
pgd_present
(
*
pgd
))
goto
bad_access
;
pmd
=
pmd_offset
(
pgd
,
addr
);
if
(
!
pmd_present
(
*
pmd
))
goto
bad_access
;
pte
=
pte_offset_map
(
pmd
,
addr
);
if
(
!
pte_present
(
*
pte
)
||
!
pte_write
(
*
pte
))
goto
bad_access
;
val
=
*
(
unsigned
long
*
)
addr
;
val
-=
regs
->
ARM_r0
;
if
(
val
==
0
)
{
*
(
unsigned
long
*
)
addr
=
regs
->
ARM_r1
;
regs
->
ARM_cpsr
|=
PSR_C_BIT
;
}
spin_unlock
(
&
mm
->
page_table_lock
);
return
val
;
bad_access:
spin_unlock
(
&
mm
->
page_table_lock
);
/* simulate a read access fault */
do_DataAbort
(
addr
,
15
+
(
1
<<
11
),
regs
);
return
-
1
;
}
#endif
default:
/* Calls 9f00xx..9f07ff are defined to return -ENOSYS
if not implemented, rather than raising SIGILL. This
...
...
arch/arm/lib/io-writesw-armv4.S
浏览文件 @
97d26b80
...
...
@@ -87,9 +87,9 @@ ENTRY(__raw_writesw)
subs
r2
,
r2
,
#
2
orr
ip
,
ip
,
r3
,
push_hbyte1
strh
ip
,
[
r0
]
bpl
2
b
bpl
1
b
3
:
tst
r2
,
#
1
2
:
movne
ip
,
r3
,
lsr
#
8
tst
r2
,
#
1
3
:
movne
ip
,
r3
,
lsr
#
8
strneh
ip
,
[
r0
]
mov
pc
,
lr
arch/arm/mm/Kconfig
浏览文件 @
97d26b80
...
...
@@ -422,3 +422,11 @@ config HAS_TLS_REG
assume directly accessing that register and always obtain the
expected value only on ARMv7 and above.
config NEEDS_SYSCALL_FOR_CMPXCHG
bool
default y if SMP && (CPU_32v5 || CPU_32v4 || CPU_32v3)
help
SMP on a pre-ARMv6 processor? Well OK then.
Forget about fast user space cmpxchg support.
It is just not possible.
include/asm-arm/arch-pxa/pxa-regs.h
浏览文件 @
97d26b80
...
...
@@ -1296,6 +1296,7 @@
#define GPIO111_MMCDAT3 111
/* MMC DAT3 (PXA27x) */
#define GPIO111_MMCCS1 111
/* MMC Chip Select 1 (PXA27x) */
#define GPIO112_MMCCMD 112
/* MMC CMD (PXA27x) */
#define GPIO113_I2S_SYSCLK 113
/* I2S System Clock (PXA27x) */
#define GPIO113_AC97_RESET_N 113
/* AC97 NRESET on (PXA27x) */
/* GPIO alternate function mode & direction */
...
...
@@ -1428,6 +1429,7 @@
#define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT)
#define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT)
#define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT)
#define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
#define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT)
#define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_OUT)
#define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录