Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
62b3f981
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看板
提交
62b3f981
编写于
9月 04, 2008
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'x86/debug' into x86/cpu
上级
af2e1f27
b05f78f5
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
105 addition
and
6 deletion
+105
-6
Documentation/kernel-parameters.txt
Documentation/kernel-parameters.txt
+6
-0
arch/x86/kernel/cpu/common_64.c
arch/x86/kernel/cpu/common_64.c
+51
-0
arch/x86/kernel/entry_64.S
arch/x86/kernel/entry_64.S
+2
-2
arch/x86/kernel/paravirt.c
arch/x86/kernel/paravirt.c
+1
-0
arch/x86/kernel/setup_percpu.c
arch/x86/kernel/setup_percpu.c
+8
-1
arch/x86/kernel/traps_64.c
arch/x86/kernel/traps_64.c
+2
-3
include/asm-x86/msr.h
include/asm-x86/msr.h
+23
-0
include/asm-x86/paravirt.h
include/asm-x86/paravirt.h
+12
-0
未找到文件。
Documentation/kernel-parameters.txt
浏览文件 @
62b3f981
...
...
@@ -1882,6 +1882,12 @@ and is between 256 and 4096 characters. It is defined in the file
shapers= [NET]
Maximal number of shapers.
show_msr= [x86] show boot-time MSR settings
Format: { <integer> }
Show boot-time (BIOS-initialized) MSR settings.
The parameter means the number of CPUs to show,
for example 1 means boot CPU only.
sim710= [SCSI,HW]
See header of drivers/scsi/sim710.c.
...
...
arch/x86/kernel/cpu/common_64.c
浏览文件 @
62b3f981
...
...
@@ -430,6 +430,49 @@ static __init int setup_noclflush(char *arg)
}
__setup
(
"noclflush"
,
setup_noclflush
);
struct
msr_range
{
unsigned
min
;
unsigned
max
;
};
static
struct
msr_range
msr_range_array
[]
__cpuinitdata
=
{
{
0x00000000
,
0x00000418
},
{
0xc0000000
,
0xc000040b
},
{
0xc0010000
,
0xc0010142
},
{
0xc0011000
,
0xc001103b
},
};
static
void
__cpuinit
print_cpu_msr
(
void
)
{
unsigned
index
;
u64
val
;
int
i
;
unsigned
index_min
,
index_max
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
msr_range_array
);
i
++
)
{
index_min
=
msr_range_array
[
i
].
min
;
index_max
=
msr_range_array
[
i
].
max
;
for
(
index
=
index_min
;
index
<
index_max
;
index
++
)
{
if
(
rdmsrl_amd_safe
(
index
,
&
val
))
continue
;
printk
(
KERN_INFO
" MSR%08x: %016llx
\n
"
,
index
,
val
);
}
}
}
static
int
show_msr
__cpuinitdata
;
static
__init
int
setup_show_msr
(
char
*
arg
)
{
int
num
;
get_option
(
&
arg
,
&
num
);
if
(
num
>
0
)
show_msr
=
num
;
return
1
;
}
__setup
(
"show_msr="
,
setup_show_msr
);
void
__cpuinit
print_cpu_info
(
struct
cpuinfo_x86
*
c
)
{
if
(
c
->
x86_model_id
[
0
])
...
...
@@ -439,6 +482,14 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
printk
(
KERN_CONT
" stepping %02x
\n
"
,
c
->
x86_mask
);
else
printk
(
KERN_CONT
"
\n
"
);
#ifdef CONFIG_SMP
if
(
c
->
cpu_index
<
show_msr
)
print_cpu_msr
();
#else
if
(
show_msr
)
print_cpu_msr
();
#endif
}
static
__init
int
setup_disablecpuid
(
char
*
arg
)
...
...
arch/x86/kernel/entry_64.S
浏览文件 @
62b3f981
...
...
@@ -275,9 +275,9 @@ ENTRY(native_usergs_sysret64)
ENTRY
(
ret_from_fork
)
CFI_DEFAULT_STACK
push
kernel_eflags
(%
rip
)
CFI_ADJUST_CFA_OFFSET
4
CFI_ADJUST_CFA_OFFSET
8
popf
#
reset
kernel
eflags
CFI_ADJUST_CFA_OFFSET
-
4
CFI_ADJUST_CFA_OFFSET
-
8
call
schedule_tail
GET_THREAD_INFO
(%
rcx
)
testl
$
(
_TIF_SYSCALL_TRACE
|
_TIF_SYSCALL_AUDIT
),
TI_flags
(%
rcx
)
...
...
arch/x86/kernel/paravirt.c
浏览文件 @
62b3f981
...
...
@@ -330,6 +330,7 @@ struct pv_cpu_ops pv_cpu_ops = {
#endif
.
wbinvd
=
native_wbinvd
,
.
read_msr
=
native_read_msr_safe
,
.
read_msr_amd
=
native_read_msr_amd_safe
,
.
write_msr
=
native_write_msr_safe
,
.
read_tsc
=
native_read_tsc
,
.
read_pmc
=
native_read_pmc
,
...
...
arch/x86/kernel/setup_percpu.c
浏览文件 @
62b3f981
...
...
@@ -162,9 +162,16 @@ void __init setup_per_cpu_areas(void)
printk
(
KERN_INFO
"cpu %d has no node %d or node-local memory
\n
"
,
cpu
,
node
);
if
(
ptr
)
printk
(
KERN_DEBUG
"per cpu data for cpu%d at %016lx
\n
"
,
cpu
,
__pa
(
ptr
));
}
else
else
{
ptr
=
alloc_bootmem_pages_node
(
NODE_DATA
(
node
),
size
);
if
(
ptr
)
printk
(
KERN_DEBUG
"per cpu data for cpu%d on node%d at %016lx
\n
"
,
cpu
,
node
,
__pa
(
ptr
));
}
#endif
per_cpu_offset
(
cpu
)
=
ptr
-
__per_cpu_start
;
memcpy
(
ptr
,
__per_cpu_start
,
__per_cpu_end
-
__per_cpu_start
);
...
...
arch/x86/kernel/traps_64.c
浏览文件 @
62b3f981
...
...
@@ -339,9 +339,8 @@ static void
show_trace_log_lvl
(
struct
task_struct
*
task
,
struct
pt_regs
*
regs
,
unsigned
long
*
stack
,
unsigned
long
bp
,
char
*
log_lvl
)
{
printk
(
"
\n
Call Trace:
\n
"
);
printk
(
"Call Trace:
\n
"
);
dump_trace
(
task
,
regs
,
stack
,
bp
,
&
print_trace_ops
,
log_lvl
);
printk
(
"
\n
"
);
}
void
show_trace
(
struct
task_struct
*
task
,
struct
pt_regs
*
regs
,
...
...
@@ -386,6 +385,7 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
printk
(
" %016lx"
,
*
stack
++
);
touch_nmi_watchdog
();
}
printk
(
"
\n
"
);
show_trace_log_lvl
(
task
,
regs
,
sp
,
bp
,
log_lvl
);
}
...
...
@@ -443,7 +443,6 @@ void show_registers(struct pt_regs *regs)
printk
(
"Stack: "
);
show_stack_log_lvl
(
NULL
,
regs
,
(
unsigned
long
*
)
sp
,
regs
->
bp
,
""
);
printk
(
"
\n
"
);
printk
(
KERN_EMERG
"Code: "
);
...
...
include/asm-x86/msr.h
浏览文件 @
62b3f981
...
...
@@ -63,6 +63,22 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr,
return
EAX_EDX_VAL
(
val
,
low
,
high
);
}
static
inline
unsigned
long
long
native_read_msr_amd_safe
(
unsigned
int
msr
,
int
*
err
)
{
DECLARE_ARGS
(
val
,
low
,
high
);
asm
volatile
(
"2: rdmsr ; xor %0,%0
\n
"
"1:
\n\t
"
".section .fixup,
\"
ax
\"\n\t
"
"3: mov %3,%0 ; jmp 1b
\n\t
"
".previous
\n\t
"
_ASM_EXTABLE
(
2
b
,
3
b
)
:
"=r"
(
*
err
),
EAX_EDX_RET
(
val
,
low
,
high
)
:
"c"
(
msr
),
"D"
(
0x9c5a203a
),
"i"
(
-
EFAULT
));
return
EAX_EDX_VAL
(
val
,
low
,
high
);
}
static
inline
void
native_write_msr
(
unsigned
int
msr
,
unsigned
low
,
unsigned
high
)
{
...
...
@@ -158,6 +174,13 @@ static inline int rdmsrl_safe(unsigned msr, unsigned long long *p)
*
p
=
native_read_msr_safe
(
msr
,
&
err
);
return
err
;
}
static
inline
int
rdmsrl_amd_safe
(
unsigned
msr
,
unsigned
long
long
*
p
)
{
int
err
;
*
p
=
native_read_msr_amd_safe
(
msr
,
&
err
);
return
err
;
}
#define rdtscl(low) \
((low) = (u32)native_read_tsc())
...
...
include/asm-x86/paravirt.h
浏览文件 @
62b3f981
...
...
@@ -137,6 +137,7 @@ struct pv_cpu_ops {
/* MSR, PMC and TSR operations.
err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */
u64
(
*
read_msr_amd
)(
unsigned
int
msr
,
int
*
err
);
u64
(
*
read_msr
)(
unsigned
int
msr
,
int
*
err
);
int
(
*
write_msr
)(
unsigned
int
msr
,
unsigned
low
,
unsigned
high
);
...
...
@@ -726,6 +727,10 @@ static inline u64 paravirt_read_msr(unsigned msr, int *err)
{
return
PVOP_CALL2
(
u64
,
pv_cpu_ops
.
read_msr
,
msr
,
err
);
}
static
inline
u64
paravirt_read_msr_amd
(
unsigned
msr
,
int
*
err
)
{
return
PVOP_CALL2
(
u64
,
pv_cpu_ops
.
read_msr_amd
,
msr
,
err
);
}
static
inline
int
paravirt_write_msr
(
unsigned
msr
,
unsigned
low
,
unsigned
high
)
{
return
PVOP_CALL3
(
int
,
pv_cpu_ops
.
write_msr
,
msr
,
low
,
high
);
...
...
@@ -771,6 +776,13 @@ static inline int rdmsrl_safe(unsigned msr, unsigned long long *p)
*
p
=
paravirt_read_msr
(
msr
,
&
err
);
return
err
;
}
static
inline
int
rdmsrl_amd_safe
(
unsigned
msr
,
unsigned
long
long
*
p
)
{
int
err
;
*
p
=
paravirt_read_msr_amd
(
msr
,
&
err
);
return
err
;
}
static
inline
u64
paravirt_read_tsc
(
void
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录