Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
3aa6b46c
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3aa6b46c
编写于
2月 09, 2016
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'locking/urgent' into locking/core, to pick up fixes
Signed-off-by:
N
Ingo Molnar
<
mingo@kernel.org
>
上级
975db45e
8a5fd564
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
82 addition
and
29 deletion
+82
-29
arch/arm64/include/asm/kvm_arm.h
arch/arm64/include/asm/kvm_arm.h
+1
-0
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/asm/kvm_emulate.h
+6
-2
arch/arm64/kvm/hyp/switch.c
arch/arm64/kvm/hyp/switch.c
+6
-2
arch/arm64/kvm/inject_fault.c
arch/arm64/kvm/inject_fault.c
+35
-3
arch/arm64/kvm/sys_regs.c
arch/arm64/kvm/sys_regs.c
+4
-5
arch/mips/boot/dts/brcm/bcm6328.dtsi
arch/mips/boot/dts/brcm/bcm6328.dtsi
+1
-0
arch/mips/boot/dts/brcm/bcm7125.dtsi
arch/mips/boot/dts/brcm/bcm7125.dtsi
+1
-0
arch/mips/boot/dts/brcm/bcm7346.dtsi
arch/mips/boot/dts/brcm/bcm7346.dtsi
+1
-0
arch/mips/boot/dts/brcm/bcm7358.dtsi
arch/mips/boot/dts/brcm/bcm7358.dtsi
+1
-0
arch/mips/boot/dts/brcm/bcm7360.dtsi
arch/mips/boot/dts/brcm/bcm7360.dtsi
+1
-0
arch/mips/boot/dts/brcm/bcm7362.dtsi
arch/mips/boot/dts/brcm/bcm7362.dtsi
+1
-0
arch/mips/boot/dts/brcm/bcm7420.dtsi
arch/mips/boot/dts/brcm/bcm7420.dtsi
+1
-0
arch/mips/boot/dts/brcm/bcm7425.dtsi
arch/mips/boot/dts/brcm/bcm7425.dtsi
+1
-0
arch/mips/boot/dts/brcm/bcm7435.dtsi
arch/mips/boot/dts/brcm/bcm7435.dtsi
+1
-0
drivers/base/regmap/regmap-mmio.c
drivers/base/regmap/regmap-mmio.c
+8
-8
kernel/locking/lockdep.c
kernel/locking/lockdep.c
+10
-6
lib/scatterlist.c
lib/scatterlist.c
+3
-3
未找到文件。
arch/arm64/include/asm/kvm_arm.h
浏览文件 @
3aa6b46c
...
...
@@ -182,6 +182,7 @@
#define CPTR_EL2_TCPAC (1 << 31)
#define CPTR_EL2_TTA (1 << 20)
#define CPTR_EL2_TFP (1 << CPTR_EL2_TFP_SHIFT)
#define CPTR_EL2_DEFAULT 0x000033ff
/* Hyp Debug Configuration Register bits */
#define MDCR_EL2_TDRA (1 << 11)
...
...
arch/arm64/include/asm/kvm_emulate.h
浏览文件 @
3aa6b46c
...
...
@@ -127,10 +127,14 @@ static inline unsigned long *vcpu_spsr(const struct kvm_vcpu *vcpu)
static
inline
bool
vcpu_mode_priv
(
const
struct
kvm_vcpu
*
vcpu
)
{
u32
mode
=
*
vcpu_cpsr
(
vcpu
)
&
PSR_MODE_MASK
;
u32
mode
;
if
(
vcpu_mode_is_32bit
(
vcpu
))
if
(
vcpu_mode_is_32bit
(
vcpu
))
{
mode
=
*
vcpu_cpsr
(
vcpu
)
&
COMPAT_PSR_MODE_MASK
;
return
mode
>
COMPAT_PSR_MODE_USR
;
}
mode
=
*
vcpu_cpsr
(
vcpu
)
&
PSR_MODE_MASK
;
return
mode
!=
PSR_MODE_EL0t
;
}
...
...
arch/arm64/kvm/hyp/switch.c
浏览文件 @
3aa6b46c
...
...
@@ -36,7 +36,11 @@ static void __hyp_text __activate_traps(struct kvm_vcpu *vcpu)
write_sysreg
(
val
,
hcr_el2
);
/* Trap on AArch32 cp15 c15 accesses (EL1 or EL0) */
write_sysreg
(
1
<<
15
,
hstr_el2
);
write_sysreg
(
CPTR_EL2_TTA
|
CPTR_EL2_TFP
,
cptr_el2
);
val
=
CPTR_EL2_DEFAULT
;
val
|=
CPTR_EL2_TTA
|
CPTR_EL2_TFP
;
write_sysreg
(
val
,
cptr_el2
);
write_sysreg
(
vcpu
->
arch
.
mdcr_el2
,
mdcr_el2
);
}
...
...
@@ -45,7 +49,7 @@ static void __hyp_text __deactivate_traps(struct kvm_vcpu *vcpu)
write_sysreg
(
HCR_RW
,
hcr_el2
);
write_sysreg
(
0
,
hstr_el2
);
write_sysreg
(
read_sysreg
(
mdcr_el2
)
&
MDCR_EL2_HPMN_MASK
,
mdcr_el2
);
write_sysreg
(
0
,
cptr_el2
);
write_sysreg
(
CPTR_EL2_DEFAULT
,
cptr_el2
);
}
static
void
__hyp_text
__activate_vm
(
struct
kvm_vcpu
*
vcpu
)
...
...
arch/arm64/kvm/inject_fault.c
浏览文件 @
3aa6b46c
...
...
@@ -27,7 +27,11 @@
#define PSTATE_FAULT_BITS_64 (PSR_MODE_EL1h | PSR_A_BIT | PSR_F_BIT | \
PSR_I_BIT | PSR_D_BIT)
#define EL1_EXCEPT_SYNC_OFFSET 0x200
#define CURRENT_EL_SP_EL0_VECTOR 0x0
#define CURRENT_EL_SP_ELx_VECTOR 0x200
#define LOWER_EL_AArch64_VECTOR 0x400
#define LOWER_EL_AArch32_VECTOR 0x600
static
void
prepare_fault32
(
struct
kvm_vcpu
*
vcpu
,
u32
mode
,
u32
vect_offset
)
{
...
...
@@ -97,6 +101,34 @@ static void inject_abt32(struct kvm_vcpu *vcpu, bool is_pabt,
*
fsr
=
0x14
;
}
enum
exception_type
{
except_type_sync
=
0
,
except_type_irq
=
0x80
,
except_type_fiq
=
0x100
,
except_type_serror
=
0x180
,
};
static
u64
get_except_vector
(
struct
kvm_vcpu
*
vcpu
,
enum
exception_type
type
)
{
u64
exc_offset
;
switch
(
*
vcpu_cpsr
(
vcpu
)
&
(
PSR_MODE_MASK
|
PSR_MODE32_BIT
))
{
case
PSR_MODE_EL1t
:
exc_offset
=
CURRENT_EL_SP_EL0_VECTOR
;
break
;
case
PSR_MODE_EL1h
:
exc_offset
=
CURRENT_EL_SP_ELx_VECTOR
;
break
;
case
PSR_MODE_EL0t
:
exc_offset
=
LOWER_EL_AArch64_VECTOR
;
break
;
default:
exc_offset
=
LOWER_EL_AArch32_VECTOR
;
}
return
vcpu_sys_reg
(
vcpu
,
VBAR_EL1
)
+
exc_offset
+
type
;
}
static
void
inject_abt64
(
struct
kvm_vcpu
*
vcpu
,
bool
is_iabt
,
unsigned
long
addr
)
{
unsigned
long
cpsr
=
*
vcpu_cpsr
(
vcpu
);
...
...
@@ -108,8 +140,8 @@ static void inject_abt64(struct kvm_vcpu *vcpu, bool is_iabt, unsigned long addr
*
vcpu_spsr
(
vcpu
)
=
cpsr
;
*
vcpu_elr_el1
(
vcpu
)
=
*
vcpu_pc
(
vcpu
);
*
vcpu_pc
(
vcpu
)
=
get_except_vector
(
vcpu
,
except_type_sync
);
*
vcpu_cpsr
(
vcpu
)
=
PSTATE_FAULT_BITS_64
;
*
vcpu_pc
(
vcpu
)
=
vcpu_sys_reg
(
vcpu
,
VBAR_EL1
)
+
EL1_EXCEPT_SYNC_OFFSET
;
vcpu_sys_reg
(
vcpu
,
FAR_EL1
)
=
addr
;
...
...
@@ -143,8 +175,8 @@ static void inject_undef64(struct kvm_vcpu *vcpu)
*
vcpu_spsr
(
vcpu
)
=
cpsr
;
*
vcpu_elr_el1
(
vcpu
)
=
*
vcpu_pc
(
vcpu
);
*
vcpu_pc
(
vcpu
)
=
get_except_vector
(
vcpu
,
except_type_sync
);
*
vcpu_cpsr
(
vcpu
)
=
PSTATE_FAULT_BITS_64
;
*
vcpu_pc
(
vcpu
)
=
vcpu_sys_reg
(
vcpu
,
VBAR_EL1
)
+
EL1_EXCEPT_SYNC_OFFSET
;
/*
* Build an unknown exception, depending on the instruction
...
...
arch/arm64/kvm/sys_regs.c
浏览文件 @
3aa6b46c
...
...
@@ -1007,10 +1007,9 @@ static int emulate_cp(struct kvm_vcpu *vcpu,
if
(
likely
(
r
->
access
(
vcpu
,
params
,
r
)))
{
/* Skip instruction, since it was emulated */
kvm_skip_instr
(
vcpu
,
kvm_vcpu_trap_il_is32bit
(
vcpu
));
/* Handled */
return
0
;
}
/* Handled */
return
0
;
}
/* Not handled */
...
...
@@ -1043,7 +1042,7 @@ static void unhandled_cp_access(struct kvm_vcpu *vcpu,
}
/**
* kvm_handle_cp_64 -- handles a mrrc/mcrr trap on a guest CP15 access
* kvm_handle_cp_64 -- handles a mrrc/mcrr trap on a guest CP1
4/CP1
5 access
* @vcpu: The VCPU pointer
* @run: The kvm_run struct
*/
...
...
@@ -1095,7 +1094,7 @@ static int kvm_handle_cp_64(struct kvm_vcpu *vcpu,
}
/**
* kvm_handle_cp
15_32 -- handles a mrc/mcr trap on a guest
CP15 access
* kvm_handle_cp
_32 -- handles a mrc/mcr trap on a guest CP14/
CP15 access
* @vcpu: The VCPU pointer
* @run: The kvm_run struct
*/
...
...
arch/mips/boot/dts/brcm/bcm6328.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -74,6 +74,7 @@
timer: timer@10000040 {
compatible = "syscon";
reg = <0x10000040 0x2c>;
little-endian;
};
reboot {
...
...
arch/mips/boot/dts/brcm/bcm7125.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -98,6 +98,7 @@
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7125-sun-top-ctrl", "syscon";
reg = <0x404000 0x60c>;
little-endian;
};
reboot {
...
...
arch/mips/boot/dts/brcm/bcm7346.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -118,6 +118,7 @@
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7346-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
...
...
arch/mips/boot/dts/brcm/bcm7358.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -112,6 +112,7 @@
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7358-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
...
...
arch/mips/boot/dts/brcm/bcm7360.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -112,6 +112,7 @@
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7360-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
...
...
arch/mips/boot/dts/brcm/bcm7362.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -118,6 +118,7 @@
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7362-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
...
...
arch/mips/boot/dts/brcm/bcm7420.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -99,6 +99,7 @@
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7420-sun-top-ctrl", "syscon";
reg = <0x404000 0x60c>;
little-endian;
};
reboot {
...
...
arch/mips/boot/dts/brcm/bcm7425.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -100,6 +100,7 @@
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7425-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
...
...
arch/mips/boot/dts/brcm/bcm7435.dtsi
浏览文件 @
3aa6b46c
...
...
@@ -114,6 +114,7 @@
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7425-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
...
...
drivers/base/regmap/regmap-mmio.c
浏览文件 @
3aa6b46c
...
...
@@ -133,17 +133,17 @@ static int regmap_mmio_gather_write(void *context,
while
(
val_size
)
{
switch
(
ctx
->
val_bytes
)
{
case
1
:
__raw_
writeb
(
*
(
u8
*
)
val
,
ctx
->
regs
+
offset
);
writeb
(
*
(
u8
*
)
val
,
ctx
->
regs
+
offset
);
break
;
case
2
:
__raw_
writew
(
*
(
u16
*
)
val
,
ctx
->
regs
+
offset
);
writew
(
*
(
u16
*
)
val
,
ctx
->
regs
+
offset
);
break
;
case
4
:
__raw_
writel
(
*
(
u32
*
)
val
,
ctx
->
regs
+
offset
);
writel
(
*
(
u32
*
)
val
,
ctx
->
regs
+
offset
);
break
;
#ifdef CONFIG_64BIT
case
8
:
__raw_
writeq
(
*
(
u64
*
)
val
,
ctx
->
regs
+
offset
);
writeq
(
*
(
u64
*
)
val
,
ctx
->
regs
+
offset
);
break
;
#endif
default:
...
...
@@ -193,17 +193,17 @@ static int regmap_mmio_read(void *context,
while
(
val_size
)
{
switch
(
ctx
->
val_bytes
)
{
case
1
:
*
(
u8
*
)
val
=
__raw_
readb
(
ctx
->
regs
+
offset
);
*
(
u8
*
)
val
=
readb
(
ctx
->
regs
+
offset
);
break
;
case
2
:
*
(
u16
*
)
val
=
__raw_
readw
(
ctx
->
regs
+
offset
);
*
(
u16
*
)
val
=
readw
(
ctx
->
regs
+
offset
);
break
;
case
4
:
*
(
u32
*
)
val
=
__raw_
readl
(
ctx
->
regs
+
offset
);
*
(
u32
*
)
val
=
readl
(
ctx
->
regs
+
offset
);
break
;
#ifdef CONFIG_64BIT
case
8
:
*
(
u64
*
)
val
=
__raw_
readq
(
ctx
->
regs
+
offset
);
*
(
u64
*
)
val
=
readq
(
ctx
->
regs
+
offset
);
break
;
#endif
default:
...
...
kernel/locking/lockdep.c
浏览文件 @
3aa6b46c
...
...
@@ -1822,7 +1822,7 @@ check_deadlock(struct task_struct *curr, struct held_lock *next,
*/
static
int
check_prev_add
(
struct
task_struct
*
curr
,
struct
held_lock
*
prev
,
struct
held_lock
*
next
,
int
distance
,
int
trylock_loop
)
struct
held_lock
*
next
,
int
distance
,
int
*
stack_saved
)
{
struct
lock_list
*
entry
;
int
ret
;
...
...
@@ -1883,8 +1883,11 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
}
}
if
(
!
trylock_loop
&&
!
save_trace
(
&
trace
))
return
0
;
if
(
!*
stack_saved
)
{
if
(
!
save_trace
(
&
trace
))
return
0
;
*
stack_saved
=
1
;
}
/*
* Ok, all validations passed, add the new lock
...
...
@@ -1907,6 +1910,8 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
* Debugging printouts:
*/
if
(
verbose
(
hlock_class
(
prev
))
||
verbose
(
hlock_class
(
next
)))
{
/* We drop graph lock, so another thread can overwrite trace. */
*
stack_saved
=
0
;
graph_unlock
();
printk
(
"
\n
new dependency: "
);
print_lock_name
(
hlock_class
(
prev
));
...
...
@@ -1929,7 +1934,7 @@ static int
check_prevs_add
(
struct
task_struct
*
curr
,
struct
held_lock
*
next
)
{
int
depth
=
curr
->
lockdep_depth
;
int
trylock_loop
=
0
;
int
stack_saved
=
0
;
struct
held_lock
*
hlock
;
/*
...
...
@@ -1956,7 +1961,7 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next)
*/
if
(
hlock
->
read
!=
2
&&
hlock
->
check
)
{
if
(
!
check_prev_add
(
curr
,
hlock
,
next
,
distance
,
trylock_loop
))
distance
,
&
stack_saved
))
return
0
;
/*
* Stop after the first non-trylock entry,
...
...
@@ -1979,7 +1984,6 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next)
if
(
curr
->
held_locks
[
depth
].
irq_context
!=
curr
->
held_locks
[
depth
-
1
].
irq_context
)
break
;
trylock_loop
=
1
;
}
return
1
;
out_bug:
...
...
lib/scatterlist.c
浏览文件 @
3aa6b46c
...
...
@@ -598,9 +598,9 @@ EXPORT_SYMBOL(sg_miter_next);
*
* Description:
* Stops mapping iterator @miter. @miter should have been started
*
started using sg_miter_start(). A stopped iteration can be
*
resumed by calling sg_miter_next() on it. This is useful when
*
resources (kmap)
need to be released during iteration.
*
using sg_miter_start(). A stopped iteration can be resumed by
*
calling sg_miter_next() on it. This is useful when resources (kmap)
* need to be released during iteration.
*
* Context:
* Preemption disabled if the SG_MITER_ATOMIC is set. Don't care
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录