Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0d10e064
Commit
0d10e064
authored
Oct 03, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/home/anton/linux-2.5
into samba.org:/home/anton/2.5.39-BK-base
parents
48452f9f
e25c47bc
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
49 additions
and
43 deletions
+49
-43
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+6
-0
arch/ppc64/kernel/signal.c
arch/ppc64/kernel/signal.c
+16
-16
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/signal32.c
+14
-15
arch/ppc64/mm/fault.c
arch/ppc64/mm/fault.c
+2
-1
include/asm-ppc64/hardirq.h
include/asm-ppc64/hardirq.h
+0
-2
include/asm-ppc64/ppc32.h
include/asm-ppc64/ppc32.h
+2
-2
include/asm-ppc64/semaphore.h
include/asm-ppc64/semaphore.h
+2
-0
include/asm-ppc64/sigcontext.h
include/asm-ppc64/sigcontext.h
+1
-1
include/asm-ppc64/thread_info.h
include/asm-ppc64/thread_info.h
+5
-5
include/asm-ppc64/ucontext.h
include/asm-ppc64/ucontext.h
+1
-1
No files found.
arch/ppc64/kernel/process.c
View file @
0d10e064
...
...
@@ -43,6 +43,7 @@
#include <asm/ppcdebug.h>
#include <asm/machdep.h>
#include <asm/iSeries/HvCallHpt.h>
#include <asm/hardirq.h>
struct
task_struct
*
last_task_used_math
=
NULL
;
...
...
@@ -485,3 +486,8 @@ void show_trace_task(struct task_struct *p)
}
while
(
count
++
<
16
);
printk
(
"
\n
"
);
}
void
dump_stack
(
void
)
{
show_stack
(
NULL
);
}
arch/ppc64/kernel/signal.c
View file @
0d10e064
...
...
@@ -108,11 +108,11 @@ long sys_sigsuspend(old_sigset_t mask, int p2, int p3, int p4, int p6, int p7,
sigset_t
saveset
;
mask
&=
_BLOCKABLE
;
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
saveset
=
current
->
blocked
;
siginitset
(
&
current
->
blocked
,
mask
);
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
regs
->
gpr
[
3
]
=
-
EINTR
;
while
(
1
)
{
...
...
@@ -144,11 +144,11 @@ long sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, int p3, int p4, int
return
-
EFAULT
;
sigdelsetmask
(
&
newset
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
saveset
=
current
->
blocked
;
current
->
blocked
=
newset
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
regs
->
gpr
[
3
]
=
-
EINTR
;
while
(
1
)
{
...
...
@@ -213,7 +213,7 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
struct
pt_regs
*
regs
)
{
struct
rt_sigframe
*
rt_sf
;
struct
sigcontext
_struct
sigctx
;
struct
sigcontext
sigctx
;
struct
sigregs
*
sr
;
elf_gregset_t
saved_regs
;
/* an array of ELF_NGREG unsigned longs */
sigset_t
set
;
...
...
@@ -225,10 +225,10 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
||
copy_from_user
(
&
st
,
&
rt_sf
->
uc
.
uc_stack
,
sizeof
(
st
)))
goto
badframe
;
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
current
->
blocked
=
set
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
...
...
@@ -331,12 +331,12 @@ long sys_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned
long
r6
,
unsigned
long
r7
,
unsigned
long
r8
,
struct
pt_regs
*
regs
)
{
struct
sigcontext
_struct
*
sc
,
sigctx
;
struct
sigcontext
*
sc
,
sigctx
;
struct
sigregs
*
sr
;
elf_gregset_t
saved_regs
;
/* an array of ELF_NGREG unsigned longs */
sigset_t
set
;
sc
=
(
struct
sigcontext
_struct
*
)(
regs
->
gpr
[
1
]
+
__SIGNAL_FRAMESIZE
);
sc
=
(
struct
sigcontext
*
)(
regs
->
gpr
[
1
]
+
__SIGNAL_FRAMESIZE
);
if
(
copy_from_user
(
&
sigctx
,
sc
,
sizeof
(
sigctx
)))
goto
badframe
;
...
...
@@ -345,10 +345,10 @@ long sys_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
set
.
sig
[
1
]
=
sigctx
.
_unused
[
3
];
#endif
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
current
->
blocked
=
set
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
...
...
@@ -391,7 +391,7 @@ static void setup_frame(struct pt_regs *regs, struct sigregs *frame,
struct
funct_descr_entry
*
funct_desc_ptr
;
unsigned
long
temp_ptr
;
struct
sigcontext
_struct
*
sc
=
(
struct
sigcontext_struc
t
*
)
newsp
;
struct
sigcontext
*
sc
=
(
struct
sigcontex
t
*
)
newsp
;
if
(
verify_area
(
VERIFY_WRITE
,
frame
,
sizeof
(
*
frame
)))
goto
badframe
;
...
...
@@ -440,7 +440,7 @@ static void setup_frame(struct pt_regs *regs, struct sigregs *frame,
static
void
handle_signal
(
unsigned
long
sig
,
siginfo_t
*
info
,
sigset_t
*
oldset
,
struct
pt_regs
*
regs
,
unsigned
long
*
newspp
,
unsigned
long
frame
)
{
struct
sigcontext
_struct
*
sc
;
struct
sigcontext
*
sc
;
struct
rt_sigframe
*
rt_sf
;
struct
k_sigaction
*
ka
=
&
current
->
sig
->
action
[
sig
-
1
];
...
...
@@ -481,7 +481,7 @@ static void handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
}
else
{
/* Put a sigcontext on the stack */
*
newspp
-=
sizeof
(
*
sc
);
sc
=
(
struct
sigcontext
_struct
*
)
*
newspp
;
sc
=
(
struct
sigcontext
*
)
*
newspp
;
if
(
verify_area
(
VERIFY_WRITE
,
sc
,
sizeof
(
*
sc
)))
goto
badframe
;
...
...
@@ -499,11 +499,11 @@ static void handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
ka
->
sa
.
sa_handler
=
SIG_DFL
;
if
(
!
(
ka
->
sa
.
sa_flags
&
SA_NODEFER
))
{
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
sigorsets
(
&
current
->
blocked
,
&
current
->
blocked
,
&
ka
->
sa
.
sa_mask
);
sigaddset
(
&
current
->
blocked
,
sig
);
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
}
return
;
...
...
arch/ppc64/kernel/signal32.c
View file @
0d10e064
...
...
@@ -218,14 +218,14 @@ long sys32_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned
long
r6
,
unsigned
long
r7
,
unsigned
long
r8
,
struct
pt_regs
*
regs
)
{
struct
sigcontext32
_struct
*
sc
,
sigctx
;
struct
sigcontext32
*
sc
,
sigctx
;
struct
sigregs32
*
sr
;
int
ret
;
elf_gregset_t32
saved_regs
;
/* an array of ELF_NGREG unsigned ints (32 bits) */
sigset_t
set
;
int
i
;
sc
=
(
struct
sigcontext32
_struct
*
)(
regs
->
gpr
[
1
]
+
__SIGNAL_FRAMESIZE32
);
sc
=
(
struct
sigcontext32
*
)(
regs
->
gpr
[
1
]
+
__SIGNAL_FRAMESIZE32
);
if
(
copy_from_user
(
&
sigctx
,
sc
,
sizeof
(
sigctx
)))
goto
badframe
;
...
...
@@ -235,10 +235,10 @@ long sys32_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
*/
set
.
sig
[
0
]
=
sigctx
.
oldmask
+
((
long
)(
sigctx
.
_unused
[
3
])
<<
32
);
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
current
->
blocked
=
set
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
/* Last stacked signal - restore registers */
...
...
@@ -315,8 +315,7 @@ long sys32_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
static
void
setup_frame32
(
struct
pt_regs
*
regs
,
struct
sigregs32
*
frame
,
unsigned
int
newsp
)
{
struct
sigcontext32_struct
*
sc
=
(
struct
sigcontext32_struct
*
)(
u64
)
newsp
;
struct
sigcontext32
*
sc
=
(
struct
sigcontext32
*
)(
u64
)
newsp
;
int
i
;
if
(
verify_area
(
VERIFY_WRITE
,
frame
,
sizeof
(
*
frame
)))
...
...
@@ -430,7 +429,7 @@ long sys32_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
struct
pt_regs
*
regs
)
{
struct
rt_sigframe_32
*
rt_sf
;
struct
sigcontext32
_struct
sigctx
;
struct
sigcontext32
sigctx
;
struct
sigregs32
*
sr
;
int
ret
;
elf_gregset_t32
saved_regs
;
/* an array of 32 bit register values */
...
...
@@ -455,10 +454,10 @@ long sys32_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
*/
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
/* update the current based on the sigmask found in the rt_stackframe */
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
current
->
blocked
=
set
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
/* If currently owning the floating point - give them up */
if
(
regs
->
msr
&
MSR_FP
)
...
...
@@ -842,11 +841,11 @@ int sys32_rt_sigsuspend(sigset32_t* unewset, size_t sigsetsize, int p3,
sigdelsetmask
(
&
newset
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
saveset
=
current
->
blocked
;
current
->
blocked
=
newset
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
regs
->
gpr
[
3
]
=
-
EINTR
;
while
(
1
)
{
...
...
@@ -958,7 +957,7 @@ static void handle_signal32(unsigned long sig, siginfo_t *info,
sigset_t
*
oldset
,
struct
pt_regs
*
regs
,
unsigned
int
*
newspp
,
unsigned
int
frame
)
{
struct
sigcontext32
_struct
*
sc
;
struct
sigcontext32
*
sc
;
struct
rt_sigframe_32
*
rt_sf
;
struct
k_sigaction
*
ka
=
&
current
->
sig
->
action
[
sig
-
1
];
...
...
@@ -1000,7 +999,7 @@ static void handle_signal32(unsigned long sig, siginfo_t *info,
}
else
{
/* Put a sigcontext on the stack */
*
newspp
-=
sizeof
(
*
sc
);
sc
=
(
struct
sigcontext32
_struct
*
)(
u64
)
*
newspp
;
sc
=
(
struct
sigcontext32
*
)(
u64
)
*
newspp
;
if
(
verify_area
(
VERIFY_WRITE
,
sc
,
sizeof
(
*
sc
)))
goto
badframe
;
/*
...
...
@@ -1019,11 +1018,11 @@ static void handle_signal32(unsigned long sig, siginfo_t *info,
ka
->
sa
.
sa_handler
=
SIG_DFL
;
if
(
!
(
ka
->
sa
.
sa_flags
&
SA_NODEFER
))
{
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
sigorsets
(
&
current
->
blocked
,
&
current
->
blocked
,
&
ka
->
sa
.
sa_mask
);
sigaddset
(
&
current
->
blocked
,
sig
);
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
}
return
;
...
...
arch/ppc64/mm/fault.c
View file @
0d10e064
...
...
@@ -27,6 +27,7 @@
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <asm/page.h>
#include <asm/pgtable.h>
...
...
@@ -79,7 +80,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
}
#endif
if
(
in_
interrupt
()
||
mm
==
NULL
)
{
if
(
in_
atomic
()
||
mm
==
NULL
)
{
bad_page_fault
(
regs
,
address
,
SIGSEGV
);
return
;
}
...
...
include/asm-ppc64/hardirq.h
View file @
0d10e064
...
...
@@ -112,6 +112,4 @@ do { \
print_backtrace(_get_SP()); \
} while (0)
#define dump_stack() show_stack()
#endif
/* __ASM_HARDIRQ_H */
include/asm-ppc64/ppc32.h
View file @
0d10e064
...
...
@@ -212,7 +212,7 @@ struct __old_kernel_stat32
unsigned
int
st_ctime
;
};
struct
sigcontext32
_struct
{
struct
sigcontext32
{
unsigned
int
_unused
[
4
];
int
signal
;
unsigned
int
handler
;
...
...
@@ -224,7 +224,7 @@ struct ucontext32 {
unsigned
int
uc_flags
;
unsigned
int
uc_link
;
stack_32_t
uc_stack
;
struct
sigcontext32
_struct
uc_mcontext
;
struct
sigcontext32
uc_mcontext
;
sigset_t
uc_sigmask
;
/* mask last for extensibility */
};
...
...
include/asm-ppc64/semaphore.h
View file @
0d10e064
...
...
@@ -77,6 +77,7 @@ static inline void down(struct semaphore * sem)
#if WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
#endif
might_sleep
();
/*
* Try to get the semaphore, take the slow path if we fail.
...
...
@@ -93,6 +94,7 @@ static inline int down_interruptible(struct semaphore * sem)
#if WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
#endif
might_sleep
();
if
(
atomic_dec_return
(
&
sem
->
count
)
<
0
)
ret
=
__down_interruptible
(
sem
);
...
...
include/asm-ppc64/sigcontext.h
View file @
0d10e064
...
...
@@ -10,7 +10,7 @@
#include <asm/ptrace.h>
struct
sigcontext
_struct
{
struct
sigcontext
{
unsigned
long
_unused
[
4
];
int
signal
;
unsigned
long
handler
;
...
...
include/asm-ppc64/thread_info.h
View file @
0d10e064
...
...
@@ -32,11 +32,11 @@ struct thread_info {
*/
#define INIT_THREAD_INFO(tsk) \
{ \
task:
&tsk, \
exec_domain:
&default_exec_domain, \
flags:
0, \
cpu:
0, \
preempt_count:
1, \
.task =
&tsk, \
.exec_domain =
&default_exec_domain, \
.flags =
0, \
.cpu =
0, \
.preempt_count =
1, \
}
#define init_thread_info (init_thread_union.thread_info)
...
...
include/asm-ppc64/ucontext.h
View file @
0d10e064
...
...
@@ -13,7 +13,7 @@ struct ucontext {
unsigned
long
uc_flags
;
struct
ucontext
*
uc_link
;
stack_t
uc_stack
;
struct
sigcontext
_struct
uc_mcontext
;
struct
sigcontext
uc_mcontext
;
sigset_t
uc_sigmask
;
/* mask last for extensibility */
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment