Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5394
b: refs/heads/master
c: 3829ee6
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jul 29, 2005
1 parent c71e0ed commit 698430b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ba80e7595f3e308e5e7135445b513779fc0ba3b
refs/heads/master: 3829ee6b1be03d5aa3005fe7d19f30088b539836
10 changes: 5 additions & 5 deletions trunk/arch/x86_64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

.macro FAKE_STACK_FRAME child_rip
/* push in order ss, rsp, eflags, cs, rip */
xorq %rax, %rax
xorl %eax, %eax
pushq %rax /* ss */
CFI_ADJUST_CFA_OFFSET 8
pushq %rax /* rsp */
Expand Down Expand Up @@ -423,7 +423,7 @@ ENTRY(stub_rt_sigreturn)
testl $3,CS(%rdi)
je 1f
swapgs
1: addl $1,%gs:pda_irqcount # RED-PEN should check preempt count
1: incl %gs:pda_irqcount # RED-PEN should check preempt count
movq %gs:pda_irqstackptr,%rax
cmoveq %rax,%rsp
pushq %rdi # save old stack
Expand All @@ -436,7 +436,7 @@ ENTRY(common_interrupt)
ret_from_intr:
popq %rdi
cli
subl $1,%gs:pda_irqcount
decl %gs:pda_irqcount
#ifdef CONFIG_DEBUG_INFO
movq RBP(%rdi),%rbp
#endif
Expand Down Expand Up @@ -494,7 +494,7 @@ retint_signal:
sti
SAVE_REST
movq $-1,ORIG_RAX(%rsp)
xorq %rsi,%rsi # oldset
xorl %esi,%esi # oldset
movq %rsp,%rdi # &pt_regs
call do_notify_resume
RESTORE_REST
Expand Down Expand Up @@ -752,7 +752,7 @@ child_rip:
movq %rsi, %rdi
call *%rax
# exit
xorq %rdi, %rdi
xorl %edi, %edi
call do_exit

/*
Expand Down
16 changes: 8 additions & 8 deletions trunk/arch/x86_64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ startup_64:
wrmsr

/* Setup cr0 */
xorq %rax, %rax
btsq $31, %rax /* Enable paging */
btsq $0, %rax /* Enable protected mode */
btsq $1, %rax /* Enable MP */
btsq $4, %rax /* Enable ET */
btsq $5, %rax /* Enable NE */
btsq $16, %rax /* Enable WP */
btsq $18, %rax /* Enable AM */
#define CR0_PM 1 /* protected mode */
#define CR0_MP (1<<1)
#define CR0_ET (1<<4)
#define CR0_NE (1<<5)
#define CR0_WP (1<<16)
#define CR0_AM (1<<18)
#define CR0_PAGING (1<<31)
movl $CR0_PM|CR0_MP|CR0_ET|CR0_NE|CR0_WP|CR0_AM|CR0_PAGING,%eax
/* Make changes effective */
movq %rax, %cr0

Expand Down

0 comments on commit 698430b

Please sign in to comment.