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
nexedi
linux
Commits
86a7dc29
Commit
86a7dc29
authored
Dec 14, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Fix Rules.make removal merge
parents
59db688e
34725cc4
Changes
54
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
516 additions
and
2332 deletions
+516
-2332
arch/s390/Makefile
arch/s390/Makefile
+16
-15
arch/s390/boot/Makefile
arch/s390/boot/Makefile
+10
-15
arch/s390/defconfig
arch/s390/defconfig
+2
-0
arch/s390/kernel/entry.S
arch/s390/kernel/entry.S
+24
-8
arch/s390/kernel/s390_ksyms.c
arch/s390/kernel/s390_ksyms.c
+1
-0
arch/s390/kernel/signal.c
arch/s390/kernel/signal.c
+9
-0
arch/s390/math-emu/Makefile
arch/s390/math-emu/Makefile
+2
-2
arch/s390x/Makefile
arch/s390x/Makefile
+14
-13
arch/s390x/boot/Makefile
arch/s390x/boot/Makefile
+10
-14
arch/s390x/defconfig
arch/s390x/defconfig
+2
-0
arch/s390x/kernel/entry.S
arch/s390x/kernel/entry.S
+21
-6
arch/s390x/kernel/s390_ksyms.c
arch/s390x/kernel/s390_ksyms.c
+1
-0
arch/s390x/kernel/signal.c
arch/s390x/kernel/signal.c
+9
-0
arch/s390x/mm/Makefile
arch/s390x/mm/Makefile
+1
-1
arch/s390x/mm/extable.c
arch/s390x/mm/extable.c
+0
-1
drivers/s390/Makefile
drivers/s390/Makefile
+1
-1
drivers/s390/char/sclp.c
drivers/s390/char/sclp.c
+3
-3
drivers/s390/char/sclp_con.c
drivers/s390/char/sclp_con.c
+4
-4
drivers/s390/char/sclp_rw.c
drivers/s390/char/sclp_rw.c
+1
-1
drivers/s390/char/sclp_tty.c
drivers/s390/char/sclp_tty.c
+2
-2
drivers/s390/char/tape.c
drivers/s390/char/tape.c
+0
-1907
drivers/s390/cio/Makefile
drivers/s390/cio/Makefile
+1
-1
drivers/s390/cio/blacklist.c
drivers/s390/cio/blacklist.c
+5
-5
drivers/s390/cio/chsc.c
drivers/s390/cio/chsc.c
+80
-165
drivers/s390/cio/chsc.h
drivers/s390/cio/chsc.h
+80
-0
drivers/s390/cio/cio.c
drivers/s390/cio/cio.c
+16
-19
drivers/s390/cio/cio.h
drivers/s390/cio/cio.h
+0
-2
drivers/s390/cio/css.c
drivers/s390/cio/css.c
+8
-2
drivers/s390/cio/device.c
drivers/s390/cio/device.c
+19
-4
drivers/s390/cio/device_fsm.c
drivers/s390/cio/device_fsm.c
+13
-7
drivers/s390/cio/ioasm.h
drivers/s390/cio/ioasm.h
+1
-1
drivers/s390/cio/qdio.c
drivers/s390/cio/qdio.c
+18
-16
drivers/s390/misc/Makefile
drivers/s390/misc/Makefile
+0
-5
drivers/s390/net/ctcmain.c
drivers/s390/net/ctcmain.c
+8
-8
drivers/s390/net/cu3088.c
drivers/s390/net/cu3088.c
+3
-3
drivers/s390/net/lcs.c
drivers/s390/net/lcs.c
+10
-10
include/asm-s390/bitops.h
include/asm-s390/bitops.h
+43
-27
include/asm-s390/cio.h
include/asm-s390/cio.h
+0
-2
include/asm-s390/current.h
include/asm-s390/current.h
+1
-1
include/asm-s390/page.h
include/asm-s390/page.h
+1
-1
include/asm-s390/posix_types.h
include/asm-s390/posix_types.h
+3
-3
include/asm-s390/rwsem.h
include/asm-s390/rwsem.h
+1
-1
include/asm-s390/setup.h
include/asm-s390/setup.h
+6
-6
include/asm-s390/thread_info.h
include/asm-s390/thread_info.h
+10
-4
include/asm-s390/uaccess.h
include/asm-s390/uaccess.h
+1
-1
include/asm-s390/unistd.h
include/asm-s390/unistd.h
+1
-0
include/asm-s390x/bitops.h
include/asm-s390x/bitops.h
+34
-30
include/asm-s390x/ccwgroup.h
include/asm-s390x/ccwgroup.h
+4
-4
include/asm-s390x/cio.h
include/asm-s390x/cio.h
+0
-2
include/asm-s390x/current.h
include/asm-s390x/current.h
+1
-1
include/asm-s390x/posix_types.h
include/asm-s390x/posix_types.h
+3
-3
include/asm-s390x/rwsem.h
include/asm-s390x/rwsem.h
+1
-1
include/asm-s390x/thread_info.h
include/asm-s390x/thread_info.h
+10
-4
include/asm-s390x/unistd.h
include/asm-s390x/unistd.h
+1
-0
No files found.
arch/s390/Makefile
View file @
86a7dc29
...
@@ -20,36 +20,37 @@ LDFLAGS_BLOB := --format binary --oformat elf32-s390
...
@@ -20,36 +20,37 @@ LDFLAGS_BLOB := --format binary --oformat elf32-s390
CFLAGS
+=
-pipe
-fno-strength-reduce
CFLAGS
+=
-pipe
-fno-strength-reduce
HEAD
:=
arch
/
s390/kernel/head.o
arch
/s390
/kernel/init_task.o
HEAD
:=
arch
/
$(ARCH)
/kernel/head.o
arch
/
$(ARCH)
/kernel/init_task.o
core-y
+=
arch
/s390/mm/
arch
/s390/kernel/
core-y
+=
arch
/
$(ARCH)
/mm/
arch
/
$(ARCH)
/kernel/
drivers-y
+=
drivers/s390/
libs-y
+=
arch
/
$(ARCH)
/lib/
drivers-$(CONFIG_MATHEMU)
+=
arch
/s390/math-emu/
drivers-y
+=
drivers/s390/
libs-y
+=
arch
/s390/lib/
drivers-$(CONFIG_MATHEMU)
+=
arch
/
$(ARCH)
/math-emu/
makeboot
=
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
arch
/
$(ARCH)
/boot
$(1)
all
:
image listing
all
:
image listing
makeboot
=
$(
call
descend,arch/
$(ARCH)
/boot,
$(1)
)
listing image
:
vmlinux
BOOTIMAGE
=
arch
/
$(ARCH)
/boot/image
$(
call
makeboot,arch/
$(ARCH)
/boot/
$@
)
listing install image
:
vmlinux
install
:
vmlinux
+@
$(
call
makeboot,BOOTIMAGE
=
$(BOOTIMAGE)
$@
)
$(
call
makeboot,
$@
)
archmrproper
:
archclean
:
archclean
:
+@
$(
call
makeboot,clean
)
$(Q)$(MAKE)
-f
scripts/Makefile.clean
obj
=
arch
/
$(ARCH)
/boot
archmrproper
:
prepare
:
include/asm-$(ARCH)/offsets.h
prepare
:
include/asm-$(ARCH)/offsets.h
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
include/config/MARKER
include/config/MARKER
include/asm-$(ARCH)/offsets.h.tmp
:
arch/$(ARCH)/kernel/asm-offsets.s
include/asm-$(ARCH)/offsets.h
:
arch/$(ARCH)/kernel/asm-offsets.s
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
include/asm-$(ARCH)/offsets.h
:
include/asm-$(ARCH)/offsets.h.tmp
@
echo
-n
' Generating $@'
@
echo
-n
' Generating $@'
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
.tmp
@
$
(
update-if-changed
)
@
$
(
update-if-changed
)
CLEAN_FILES
+=
include/asm-
$(ARCH)
/offsets.h.tmp
\
CLEAN_FILES
+=
include/asm-
$(ARCH)
/offsets.h.tmp
\
...
...
arch/s390/boot/Makefile
View file @
86a7dc29
...
@@ -2,24 +2,19 @@
...
@@ -2,24 +2,19 @@
# Makefile for the linux s390-specific parts of the memory manager.
# Makefile for the linux s390-specific parts of the memory manager.
#
#
EXTRA_AFLAGS
:=
-traditional
EXTRA_TARGETS
:=
image listing
EXTRA_AFLAGS
:=
-traditional
quiet_cmd_listing
=
OBJDUMP
$@
cmd_listing
=
$(OBJDUMP)
--disassemble
--disassemble-all
\
--disassemble-zeroes
--reloc
vmlinux
>
$@
quiet_cmd_listing
=
OBJDUMP
$(echo_target)
$(obj)/image
:
vmlinux FORCE
cmd_listing
=
$(OBJDUMP)
--disassemble
--disassemble-all
\
--disassemble-zeroes
--reloc
vmlinux
>
$@
$(obj)/image
:
vmlinux
$(
call
if_changed,objcopy
)
$(
call
if_changed,objcopy
)
$(obj)/listing
:
vmlinux
$(obj)/listing
:
vmlinux
FORCE
$(
call
if_changed,listing
)
$(
call
if_changed,listing
)
image
:
$(obj)/image
listing
:
$(obj)/listing
clean
:
rm
-f
$(obj)
/image
$(obj)
/listing
install
:
$(CONFIGURE) $(BOOTIMAGE)
install
:
$(CONFIGURE) $(obj)/image
sh
-x
$(obj)
/install.sh
$(KERNELRELEASE)
$(BOOTIMAGE)
System.map Kerntypes
"
$(INSTALL_PATH)
"
sh
-x
$(obj)
/install.sh
$(KERNELRELEASE)
$(obj)
/image
\
System.map Kerntypes
"
$(INSTALL_PATH)
"
arch/s390/defconfig
View file @
86a7dc29
...
@@ -321,6 +321,8 @@ CONFIG_CRYPTO=y
...
@@ -321,6 +321,8 @@ CONFIG_CRYPTO=y
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEST is not set
# CONFIG_CRYPTO_TEST is not set
#
#
...
...
arch/s390/kernel/entry.S
View file @
86a7dc29
...
@@ -47,7 +47,8 @@ SP_ORIG_R2 = STACK_FRAME_OVERHEAD + PT_ORIGGPR2
...
@@ -47,7 +47,8 @@ SP_ORIG_R2 = STACK_FRAME_OVERHEAD + PT_ORIGGPR2
SP_TRAP
=
(
SP_ORIG_R2
+
GPR_SIZE
)
SP_TRAP
=
(
SP_ORIG_R2
+
GPR_SIZE
)
SP_SIZE
=
(
SP_TRAP
+
4
)
SP_SIZE
=
(
SP_TRAP
+
4
)
_TIF_WORK_MASK
=
(
_TIF_SIGPENDING
|
_TIF_NEED_RESCHED
)
_TIF_WORK_SVC
=
(
_TIF_SIGPENDING
| _TIF_NEED_RESCHED |
_TIF_RESTART_SVC
)
_TIF_WORK_INT
=
(
_TIF_SIGPENDING
|
_TIF_NEED_RESCHED
)
/*
/*
*
Base
Address
of
this
Module
---
saved
in
__LC_ENTRY_BASE
*
Base
Address
of
this
Module
---
saved
in
__LC_ENTRY_BASE
...
@@ -181,6 +182,7 @@ system_call:
...
@@ -181,6 +182,7 @@ system_call:
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
sll
%
r7
,
2
sll
%
r7
,
2
stosm
24
(%
r15
),
0x03
#
reenable
interrupts
stosm
24
(%
r15
),
0x03
#
reenable
interrupts
sysc_do_restart
:
l
%
r8
,
sys_call_table
-
entry_base
(%
r7
,%
r13
)
#
get
system
call
addr
.
l
%
r8
,
sys_call_table
-
entry_base
(%
r7
,%
r13
)
#
get
system
call
addr
.
tm
__TI_flags
+
3
(%
r9
),
_TIF_SYSCALL_TRACE
tm
__TI_flags
+
3
(%
r9
),
_TIF_SYSCALL_TRACE
bo
BASED
(
sysc_tracesys
)
bo
BASED
(
sysc_tracesys
)
...
@@ -191,7 +193,7 @@ system_call:
...
@@ -191,7 +193,7 @@ system_call:
sysc_return
:
sysc_return
:
stnsm
24
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
stnsm
24
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
tm
__TI_flags
+
3
(%
r9
),
_TIF_WORK_
MASK
tm
__TI_flags
+
3
(%
r9
),
_TIF_WORK_
SVC
bnz
BASED
(
sysc_work
)
#
there
is
work
to
do
(
signals
etc
.
)
bnz
BASED
(
sysc_work
)
#
there
is
work
to
do
(
signals
etc
.
)
sysc_leave
:
sysc_leave
:
RESTORE_ALL
1
RESTORE_ALL
1
...
@@ -202,7 +204,7 @@ sysc_leave:
...
@@ -202,7 +204,7 @@ sysc_leave:
sysc_work_loop
:
sysc_work_loop
:
stnsm
24
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
stnsm
24
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
tm
__TI_flags
+
3
(%
r9
),
_TIF_WORK_
MASK
tm
__TI_flags
+
3
(%
r9
),
_TIF_WORK_
SVC
bz
BASED
(
sysc_leave
)
#
there
is
no
work
to
do
bz
BASED
(
sysc_leave
)
#
there
is
no
work
to
do
#
#
#
One
of
the
work
bits
is
on
.
Find
out
which
one
.
#
One
of
the
work
bits
is
on
.
Find
out
which
one
.
...
@@ -213,6 +215,8 @@ sysc_work:
...
@@ -213,6 +215,8 @@ sysc_work:
bo
BASED
(
sysc_reschedule
)
bo
BASED
(
sysc_reschedule
)
tm
__TI_flags
+
3
(%
r9
),
_TIF_SIGPENDING
tm
__TI_flags
+
3
(%
r9
),
_TIF_SIGPENDING
bo
BASED
(
sysc_sigpending
)
bo
BASED
(
sysc_sigpending
)
tm
__TI_flags
+
3
(%
r9
),
_TIF_RESTART_SVC
bo
BASED
(
sysc_restart
)
b
BASED
(
sysc_leave
)
b
BASED
(
sysc_leave
)
#
#
...
@@ -236,15 +240,27 @@ sysc_sigpending:
...
@@ -236,15 +240,27 @@ sysc_sigpending:
stnsm
24
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
stnsm
24
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
b
BASED
(
sysc_leave
)
#
out
of
here
,
do
NOT
recheck
b
BASED
(
sysc_leave
)
#
out
of
here
,
do
NOT
recheck
#
#
_TIF_RESTART_SVC
is
set
,
set
up
registers
and
restart
svc
#
sysc_restart
:
ni
__TI_flags
+
3
(%
r9
),
255
-
_TIF_RESTART_SVC
#
clear
TIF_RESTART_SVC
stosm
24
(%
r15
),
0x03
#
reenable
interrupts
l
%
r7
,
SP_R2
(%
r15
)
#
load
new
svc
number
sll
%
r7
,
2
mvc
SP_R2
(
4
,%
r15
),
SP_ORIG_R2
(%
r15
)
#
restore
first
argument
lm
%
r2
,%
r6
,
SP_R2
(%
r15
)
#
load
svc
arguments
b
BASED
(
sysc_do_restart
)
#
restart
svc
#
#
#
call
trace
before
and
after
sys_call
#
call
trace
before
and
after
sys_call
#
#
sysc_tracesys
:
sysc_tracesys
:
l
%
r1
,
BASED
(
.
Ltrace
)
l
%
r1
,
BASED
(
.
Ltrace
)
srl
%
r7
,
2
srl
%
r7
,
2
st
%
r7
,
SP_R2
(
4
,
%
r15
)
st
%
r7
,
SP_R2
(%
r15
)
basr
%
r14
,%
r1
basr
%
r14
,%
r1
l
%
r7
,
SP_R2
(
4
,%
r15
)
#
strace
might
have
changed
the
l
%
r7
,
SP_R2
(
%
r15
)
#
strace
might
have
changed
the
n
%
r7
,
BASED
(
.
Lc256
)
#
system
call
n
%
r7
,
BASED
(
.
Lc256
)
#
system
call
sll
%
r7
,
2
sll
%
r7
,
2
l
%
r8
,
sys_call_table
-
entry_base
(%
r7
,%
r13
)
l
%
r8
,
sys_call_table
-
entry_base
(%
r7
,%
r13
)
...
@@ -354,7 +370,7 @@ sys_call_table:
...
@@ -354,7 +370,7 @@ sys_call_table:
.
long
sys_write
.
long
sys_write
.
long
sys_open
/*
5
*/
.
long
sys_open
/*
5
*/
.
long
sys_close
.
long
sys_close
.
long
sys_
ni_syscall
/*
old
waitpid
syscall
holder
*/
.
long
sys_
restart_syscall
.
long
sys_creat
.
long
sys_creat
.
long
sys_link
.
long
sys_link
.
long
sys_unlink
/*
10
*/
.
long
sys_unlink
/*
10
*/
...
@@ -752,7 +768,7 @@ io_return:
...
@@ -752,7 +768,7 @@ io_return:
#else
#else
bno
BASED
(
io_leave
)
#
no
->
skip
resched
&
signal
bno
BASED
(
io_leave
)
#
no
->
skip
resched
&
signal
#endif
#endif
tm
__TI_flags
+
3
(%
r9
),
_TIF_WORK_
MASK
tm
__TI_flags
+
3
(%
r9
),
_TIF_WORK_
INT
bnz
BASED
(
io_work
)
#
there
is
work
to
do
(
signals
etc
.
)
bnz
BASED
(
io_work
)
#
there
is
work
to
do
(
signals
etc
.
)
io_leave
:
io_leave
:
RESTORE_ALL
0
RESTORE_ALL
0
...
@@ -788,7 +804,7 @@ io_resume_loop:
...
@@ -788,7 +804,7 @@ io_resume_loop:
io_work_loop
:
io_work_loop
:
stnsm
24
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
stnsm
24
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
tm
__TI_flags
+
3
(%
r9
),
_TIF_WORK_
MASK
tm
__TI_flags
+
3
(%
r9
),
_TIF_WORK_
INT
bz
BASED
(
io_leave
)
#
there
is
no
work
to
do
bz
BASED
(
io_leave
)
#
there
is
no
work
to
do
#
#
#
One
of
the
work
bits
is
on
.
Find
out
which
one
.
#
One
of
the
work
bits
is
on
.
Find
out
which
one
.
...
...
arch/s390/kernel/s390_ksyms.c
View file @
86a7dc29
...
@@ -59,3 +59,4 @@ EXPORT_SYMBOL(csum_fold);
...
@@ -59,3 +59,4 @@ EXPORT_SYMBOL(csum_fold);
EXPORT_SYMBOL
(
console_mode
);
EXPORT_SYMBOL
(
console_mode
);
EXPORT_SYMBOL
(
console_device
);
EXPORT_SYMBOL
(
console_device
);
EXPORT_SYMBOL_NOVERS
(
do_call_softirq
);
EXPORT_SYMBOL_NOVERS
(
do_call_softirq
);
EXPORT_SYMBOL
(
sys_wait4
);
arch/s390/kernel/signal.c
View file @
86a7dc29
...
@@ -397,6 +397,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
...
@@ -397,6 +397,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
if
(
regs
->
trap
==
__LC_SVC_OLD_PSW
)
{
if
(
regs
->
trap
==
__LC_SVC_OLD_PSW
)
{
/* If so, check system call restarting.. */
/* If so, check system call restarting.. */
switch
(
regs
->
gprs
[
2
])
{
switch
(
regs
->
gprs
[
2
])
{
case
-
ERESTART_RESTARTBLOCK
:
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
clear_thread_flag
(
TIF_RESTART_SVC
);
case
-
ERESTARTNOHAND
:
case
-
ERESTARTNOHAND
:
regs
->
gprs
[
2
]
=
-
EINTR
;
regs
->
gprs
[
2
]
=
-
EINTR
;
break
;
break
;
...
@@ -473,6 +477,11 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
...
@@ -473,6 +477,11 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
regs
->
gprs
[
2
]
=
regs
->
orig_gpr2
;
regs
->
gprs
[
2
]
=
regs
->
orig_gpr2
;
regs
->
psw
.
addr
-=
2
;
regs
->
psw
.
addr
-=
2
;
}
}
/* Restart the system call with a new system call number */
if
(
regs
->
gprs
[
2
]
==
-
ERESTART_RESTARTBLOCK
)
{
regs
->
gprs
[
2
]
=
__NR_restart_syscall
;
set_thread_flag
(
TIF_RESTART_SVC
);
}
}
}
return
0
;
return
0
;
}
}
arch/s390/math-emu/Makefile
View file @
86a7dc29
...
@@ -4,5 +4,5 @@
...
@@ -4,5 +4,5 @@
obj-$(CONFIG_MATHEMU)
:=
math.o qrnnd.o
obj-$(CONFIG_MATHEMU)
:=
math.o qrnnd.o
EXTRA_CFLAGS
=
-I
.
-I
$(TOPDIR)
/
include/math-emu
-w
EXTRA_CFLAGS
:=
-I
$(src)
-I
include
/math-emu
-w
EXTRA_AFLAGS
:=
-traditional
EXTRA_AFLAGS
:=
-traditional
arch/s390x/Makefile
View file @
86a7dc29
...
@@ -21,35 +21,36 @@ LDFLAGS_BLOB := --format binary --oformat elf64-s390
...
@@ -21,35 +21,36 @@ LDFLAGS_BLOB := --format binary --oformat elf64-s390
CFLAGS
+=
-pipe
-fno-strength-reduce
CFLAGS
+=
-pipe
-fno-strength-reduce
HEAD
:=
arch
/
s390x/kernel/head.o
arch
/s390x
/kernel/init_task.o
HEAD
:=
arch
/
$(ARCH)
/kernel/head.o
arch
/
$(ARCH)
/kernel/init_task.o
core-y
+=
arch
/s390x/mm/
arch
/s390x/kernel/
core-y
+=
arch
/
$(ARCH)
/mm/
arch
/
$(ARCH)
/kernel/
libs-y
+=
arch
/
$(ARCH)
/lib/
drivers-y
+=
drivers/s390/
drivers-y
+=
drivers/s390/
libs-y
+=
arch
/s390x/lib/
makeboot
=
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
arch
/
$(ARCH)
/boot
$(1)
all
:
image listing
all
:
image listing
makeboot
=
$(
call
descend,arch/
$(ARCH)
/boot,
$(1)
)
listing image
:
vmlinux
BOOTIMAGE
=
arch
/
$(ARCH)
/boot/image
$(
call
makeboot,arch/
$(ARCH)
/boot/
$@
)
listing install image
:
vmlinux
install
:
vmlinux
+@
$(
call
makeboot,BOOTIMAGE
=
$(BOOTIMAGE)
$@
)
$(
call
makeboot,
$@
)
archmrproper
:
archclean
:
archclean
:
+@
$(
call
makeboot,clean
)
$(Q)$(MAKE)
-f
scripts/Makefile.clean
obj
=
arch
/
$(ARCH)
/boot
archmrproper
:
prepare
:
include/asm-$(ARCH)/offsets.h
prepare
:
include/asm-$(ARCH)/offsets.h
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
include/config/MARKER
include/config/MARKER
include/asm-$(ARCH)/offsets.h.tmp
:
arch/$(ARCH)/kernel/asm-offsets.s
include/asm-$(ARCH)/offsets.h
:
arch/$(ARCH)/kernel/asm-offsets.s
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
include/asm-$(ARCH)/offsets.h
:
include/asm-$(ARCH)/offsets.h.tmp
@
echo
-n
' Generating $@'
@
echo
-n
' Generating $@'
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
.tmp
@
$
(
update-if-changed
)
@
$
(
update-if-changed
)
CLEAN_FILES
+=
include/asm-
$(ARCH)
/offsets.h.tmp
\
CLEAN_FILES
+=
include/asm-
$(ARCH)
/offsets.h.tmp
\
...
...
arch/s390x/boot/Makefile
View file @
86a7dc29
...
@@ -2,24 +2,20 @@
...
@@ -2,24 +2,20 @@
# Makefile for the linux s390-specific parts of the memory manager.
# Makefile for the linux s390-specific parts of the memory manager.
#
#
EXTRA_AFLAGS
:=
-traditional
EXTRA_TARGETS
:=
image listing
EXTRA_AFLAGS
:=
-traditional
quiet_cmd_listing
=
OBJDUMP
$
(echo_target)
quiet_cmd_listing
=
OBJDUMP
$
@
cmd_listing
=
$(OBJDUMP)
--disassemble
--disassemble-all
\
cmd_listing
=
$(OBJDUMP)
--disassemble
--disassemble-all
\
--disassemble-zeroes
--reloc
vmlinux
>
$@
--disassemble-zeroes
--reloc
vmlinux
>
$@
$(obj)/image
:
vmlinux
$(obj)/image
:
vmlinux
FORCE
$(
call
if_changed,objcopy
)
$(
call
if_changed,objcopy
)
$(obj)/listing
:
vmlinux
$(obj)/listing
:
vmlinux
FORCE
$(
call
if_changed,listing
)
$(
call
if_changed,listing
)
image
:
$(obj)/image
listing
:
$(obj)/listing
install
:
$(CONFIGURE) $(obj)/image
sh
-x
$(obj)
/install.sh
$(KERNELRELEASE)
$(obj)
/image
\
clean
:
System.map Kerntypes
"
$(INSTALL_PATH)
"
rm
-f
$(obj)
/image
$(obj)
/listing
install
:
$(CONFIGURE) $(BOOTIMAGE)
sh
-x
$(obj)
/install.sh
$(KERNELRELEASE)
$(BOOTIMAGE)
System.map Kerntypes
"
$(INSTALL_PATH)
"
arch/s390x/defconfig
View file @
86a7dc29
...
@@ -382,6 +382,8 @@ CONFIG_CRYPTO=y
...
@@ -382,6 +382,8 @@ CONFIG_CRYPTO=y
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEST is not set
# CONFIG_CRYPTO_TEST is not set
#
#
...
...
arch/s390x/kernel/entry.S
View file @
86a7dc29
...
@@ -47,7 +47,8 @@ SP_ORIG_R2 = STACK_FRAME_OVERHEAD + PT_ORIGGPR2
...
@@ -47,7 +47,8 @@ SP_ORIG_R2 = STACK_FRAME_OVERHEAD + PT_ORIGGPR2
SP_TRAP
=
(
SP_ORIG_R2
+
GPR_SIZE
)
SP_TRAP
=
(
SP_ORIG_R2
+
GPR_SIZE
)
SP_SIZE
=
(
SP_TRAP
+
4
)
SP_SIZE
=
(
SP_TRAP
+
4
)
_TIF_WORK_MASK
=
(
_TIF_SIGPENDING
|
_TIF_NEED_RESCHED
)
_TIF_WORK_SVC
=
(
_TIF_SIGPENDING
| _TIF_NEED_RESCHED |
_TIF_RESTART_SVC
)
_TIF_WORK_INT
=
(
_TIF_SIGPENDING
|
_TIF_NEED_RESCHED
)
/*
/*
*
Register
usage
in
interrupt
handlers
:
*
Register
usage
in
interrupt
handlers
:
...
@@ -161,6 +162,7 @@ system_call:
...
@@ -161,6 +162,7 @@ system_call:
llgh
%
r7
,
__LC_SVC_INT_CODE
#
get
svc
number
from
lowcore
llgh
%
r7
,
__LC_SVC_INT_CODE
#
get
svc
number
from
lowcore
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
stosm
48
(%
r15
),
0x03
#
reenable
interrupts
stosm
48
(%
r15
),
0x03
#
reenable
interrupts
sysc_do_restart
:
larl
%
r10
,
sys_call_table
larl
%
r10
,
sys_call_table
sll
%
r7
,
3
sll
%
r7
,
3
tm
SP_PSW
+
3
(%
r15
),
0x01
#
are
we
running
in
31
bit
mode
?
tm
SP_PSW
+
3
(%
r15
),
0x01
#
are
we
running
in
31
bit
mode
?
...
@@ -177,7 +179,7 @@ sysc_noemu:
...
@@ -177,7 +179,7 @@ sysc_noemu:
sysc_return
:
sysc_return
:
stnsm
48
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
stnsm
48
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
tm
__TI_flags
+
7
(%
r9
),
_TIF_WORK_
MASK
tm
__TI_flags
+
7
(%
r9
),
_TIF_WORK_
SVC
jnz
sysc_work
#
there
is
work
to
do
(
signals
etc
.
)
jnz
sysc_work
#
there
is
work
to
do
(
signals
etc
.
)
sysc_leave
:
sysc_leave
:
RESTORE_ALL
1
RESTORE_ALL
1
...
@@ -188,7 +190,7 @@ sysc_leave:
...
@@ -188,7 +190,7 @@ sysc_leave:
sysc_work_loop
:
sysc_work_loop
:
stnsm
48
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
stnsm
48
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
tm
__TI_flags
+
7
(%
r9
),
_TIF_WORK_
MASK
tm
__TI_flags
+
7
(%
r9
),
_TIF_WORK_
SVC
jz
sysc_leave
#
there
is
no
work
to
do
jz
sysc_leave
#
there
is
no
work
to
do
#
#
#
One
of
the
work
bits
is
on
.
Find
out
which
one
.
#
One
of
the
work
bits
is
on
.
Find
out
which
one
.
...
@@ -199,6 +201,8 @@ sysc_work:
...
@@ -199,6 +201,8 @@ sysc_work:
jo
sysc_reschedule
jo
sysc_reschedule
tm
__TI_flags
+
7
(%
r9
),
_TIF_SIGPENDING
tm
__TI_flags
+
7
(%
r9
),
_TIF_SIGPENDING
jo
sysc_sigpending
jo
sysc_sigpending
tm
__TI_flags
+
7
(%
r9
),
_TIF_RESTART_SVC
jo
sysc_restart
j
sysc_leave
j
sysc_leave
#
#
...
@@ -220,6 +224,17 @@ sysc_sigpending:
...
@@ -220,6 +224,17 @@ sysc_sigpending:
stnsm
48
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
stnsm
48
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
j
sysc_leave
#
out
of
here
,
do
NOT
recheck
j
sysc_leave
#
out
of
here
,
do
NOT
recheck
#
#
_TIF_RESTART_SVC
is
set
,
set
up
registers
and
restart
svc
#
sysc_restart
:
ni
__TI_flags
+
3
(%
r9
),
255
-
_TIF_RESTART_SVC
#
clear
TIF_RESTART_SVC
stosm
48
(%
r15
),
0x03
#
reenable
interrupts
lg
%
r7
,
SP_R2
(%
r15
)
#
load
new
svc
number
mvc
SP_R2
(
8
,%
r15
),
SP_ORIG_R2
(%
r15
)
#
restore
first
argument
lmg
%
r2
,%
r6
,
SP_R2
(%
r15
)
#
load
svc
arguments
j
sysc_do_restart
#
restart
svc
#
#
#
call
syscall_trace
before
and
after
system
call
#
call
syscall_trace
before
and
after
system
call
#
special
linkage
:
%
r12
contains
the
return
address
for
trace_svc
#
special
linkage
:
%
r12
contains
the
return
address
for
trace_svc
...
@@ -383,7 +398,7 @@ sys_call_table:
...
@@ -383,7 +398,7 @@ sys_call_table:
.
long
SYSCALL
(
sys_write
,
sys32_write_wrapper
)
.
long
SYSCALL
(
sys_write
,
sys32_write_wrapper
)
.
long
SYSCALL
(
sys_open
,
sys32_open_wrapper
)
/*
5
*/
.
long
SYSCALL
(
sys_open
,
sys32_open_wrapper
)
/*
5
*/
.
long
SYSCALL
(
sys_close
,
sys32_close_wrapper
)
.
long
SYSCALL
(
sys_close
,
sys32_close_wrapper
)
.
long
SYSCALL
(
sys_
ni_syscall
,
sys_ni_syscall
)
/*
old
waitpid
syscall
*/
.
long
SYSCALL
(
sys_
restart_syscall
,
sys_ni_syscall
)
.
long
SYSCALL
(
sys_creat
,
sys32_creat_wrapper
)
.
long
SYSCALL
(
sys_creat
,
sys32_creat_wrapper
)
.
long
SYSCALL
(
sys_link
,
sys32_link_wrapper
)
.
long
SYSCALL
(
sys_link
,
sys32_link_wrapper
)
.
long
SYSCALL
(
sys_unlink
,
sys32_unlink_wrapper
)
/*
10
*/
.
long
SYSCALL
(
sys_unlink
,
sys32_unlink_wrapper
)
/*
10
*/
...
@@ -777,7 +792,7 @@ io_return:
...
@@ -777,7 +792,7 @@ io_return:
#else
#else
jno
io_leave
#
no
->
skip
resched
&
signal
jno
io_leave
#
no
->
skip
resched
&
signal
#endif
#endif
tm
__TI_flags
+
7
(%
r9
),
_TIF_WORK_
MASK
tm
__TI_flags
+
7
(%
r9
),
_TIF_WORK_
INT
jnz
io_work
#
there
is
work
to
do
(
signals
etc
.
)
jnz
io_work
#
there
is
work
to
do
(
signals
etc
.
)
io_leave
:
io_leave
:
RESTORE_ALL
0
RESTORE_ALL
0
...
@@ -813,7 +828,7 @@ io_resume_loop:
...
@@ -813,7 +828,7 @@ io_resume_loop:
io_work_loop
:
io_work_loop
:
stnsm
48
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
stnsm
48
(%
r15
),
0xfc
#
disable
I
/
O
and
ext
.
interrupts
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
tm
__TI_flags
+
7
(%
r9
),
_TIF_WORK_
MASK
tm
__TI_flags
+
7
(%
r9
),
_TIF_WORK_
INT
jz
io_leave
#
there
is
no
work
to
do
jz
io_leave
#
there
is
no
work
to
do
#
#
#
One
of
the
work
bits
is
on
.
Find
out
which
one
.
#
One
of
the
work
bits
is
on
.
Find
out
which
one
.
...
...
arch/s390x/kernel/s390_ksyms.c
View file @
86a7dc29
...
@@ -83,3 +83,4 @@ EXPORT_SYMBOL(kernel_thread);
...
@@ -83,3 +83,4 @@ EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL
(
console_mode
);
EXPORT_SYMBOL
(
console_mode
);
EXPORT_SYMBOL
(
console_device
);
EXPORT_SYMBOL
(
console_device
);
EXPORT_SYMBOL_NOVERS
(
do_call_softirq
);
EXPORT_SYMBOL_NOVERS
(
do_call_softirq
);
EXPORT_SYMBOL
(
sys_wait4
);
arch/s390x/kernel/signal.c
View file @
86a7dc29
...
@@ -391,6 +391,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
...
@@ -391,6 +391,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
if
(
regs
->
trap
==
__LC_SVC_OLD_PSW
)
{
if
(
regs
->
trap
==
__LC_SVC_OLD_PSW
)
{
/* If so, check system call restarting.. */
/* If so, check system call restarting.. */
switch
(
regs
->
gprs
[
2
])
{
switch
(
regs
->
gprs
[
2
])
{
case
-
ERESTART_RESTARTBLOCK
:
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
clear_thread_flag
(
TIF_RESTART_SVC
);
case
-
ERESTARTNOHAND
:
case
-
ERESTARTNOHAND
:
regs
->
gprs
[
2
]
=
-
EINTR
;
regs
->
gprs
[
2
]
=
-
EINTR
;
break
;
break
;
...
@@ -473,6 +477,11 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
...
@@ -473,6 +477,11 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
regs
->
gprs
[
2
]
=
regs
->
orig_gpr2
;
regs
->
gprs
[
2
]
=
regs
->
orig_gpr2
;
regs
->
psw
.
addr
-=
2
;
regs
->
psw
.
addr
-=
2
;
}
}
/* Restart the system call with a new system call number */
if
(
regs
->
gprs
[
2
]
==
-
ERESTART_RESTARTBLOCK
)
{
regs
->
gprs
[
2
]
=
__NR_restart_syscall
;
set_thread_flag
(
TIF_RESTART_SVC
);
}
}
}
return
0
;
return
0
;
}
}
arch/s390x/mm/Makefile
View file @
86a7dc29
#
#
# Makefile for the linux
i386
-specific parts of the memory manager.
# Makefile for the linux
s390
-specific parts of the memory manager.
#
#
obj-y
:=
init.o fault.o ioremap.o extable.o
obj-y
:=
init.o fault.o ioremap.o extable.o
arch/s390x/mm/extable.c
View file @
86a7dc29
...
@@ -40,7 +40,6 @@ extern spinlock_t modlist_lock;
...
@@ -40,7 +40,6 @@ extern spinlock_t modlist_lock;
unsigned
long
unsigned
long
search_exception_table
(
unsigned
long
addr
)
search_exception_table
(
unsigned
long
addr
)
{
{
struct
list_head
*
i
;
unsigned
long
ret
=
0
;
unsigned
long
ret
=
0
;
#ifndef CONFIG_MODULES
#ifndef CONFIG_MODULES
...
...
drivers/s390/Makefile
View file @
86a7dc29
...
@@ -3,6 +3,6 @@
...
@@ -3,6 +3,6 @@
#
#
obj-y
+=
s390mach.o sysinfo.o
obj-y
+=
s390mach.o sysinfo.o
obj-y
+=
cio/ block/ char/
misc/
net/
obj-y
+=
cio/ block/ char/ net/
drivers-y
+=
drivers/s390/built-in.o
drivers-y
+=
drivers/s390/built-in.o
drivers/s390/char/sclp.c
View file @
86a7dc29
...
@@ -47,7 +47,7 @@ static sccb_mask_t sclp_send_mask;
...
@@ -47,7 +47,7 @@ static sccb_mask_t sclp_send_mask;
static
struct
list_head
sclp_reg_list
;
static
struct
list_head
sclp_reg_list
;
/* sccb queue */
/* sccb queue */
struct
list_head
sclp_req_queue
;
st
atic
st
ruct
list_head
sclp_req_queue
;
/* sccb for unconditional read */
/* sccb for unconditional read */
static
struct
sclp_req
sclp_read_req
;
static
struct
sclp_req
sclp_read_req
;
...
@@ -448,7 +448,7 @@ sclp_state_change(struct evbuf_header *evbuf)
...
@@ -448,7 +448,7 @@ sclp_state_change(struct evbuf_header *evbuf)
spin_unlock_irqrestore
(
&
sclp_lock
,
flags
);
spin_unlock_irqrestore
(
&
sclp_lock
,
flags
);
}
}
struct
sclp_register
sclp_state_change_event
=
{
st
atic
st
ruct
sclp_register
sclp_state_change_event
=
{
.
receive_mask
=
EvTyp_StateChange_Mask
,
.
receive_mask
=
EvTyp_StateChange_Mask
,
.
receiver_fn
=
sclp_state_change
.
receiver_fn
=
sclp_state_change
};
};
...
@@ -514,7 +514,7 @@ sclp_quiesce(struct evbuf_header *evbuf)
...
@@ -514,7 +514,7 @@ sclp_quiesce(struct evbuf_header *evbuf)
ctrl_alt_del
();
ctrl_alt_del
();
}
}
struct
sclp_register
sclp_quiesce_event
=
{
st
atic
st
ruct
sclp_register
sclp_quiesce_event
=
{
.
receive_mask
=
EvTyp_SigQuiesce_Mask
,
.
receive_mask
=
EvTyp_SigQuiesce_Mask
,
.
receiver_fn
=
sclp_quiesce
.
receiver_fn
=
sclp_quiesce
};
};
...
...
drivers/s390/char/sclp_con.c
View file @
86a7dc29
...
@@ -97,7 +97,7 @@ sclp_console_timeout(unsigned long data)
...
@@ -97,7 +97,7 @@ sclp_console_timeout(unsigned long data)
/*
/*
* Writes the given message to S390 system console
* Writes the given message to S390 system console
*/
*/
void
static
void
sclp_console_write
(
struct
console
*
console
,
const
char
*
message
,
sclp_console_write
(
struct
console
*
console
,
const
char
*
message
,
unsigned
int
count
)
unsigned
int
count
)
{
{
...
@@ -152,7 +152,7 @@ sclp_console_write(struct console *console, const char *message,
...
@@ -152,7 +152,7 @@ sclp_console_write(struct console *console, const char *message,
}
}
/* returns the device number of the SCLP console */
/* returns the device number of the SCLP console */
kdev_t
static
kdev_t
sclp_console_device
(
struct
console
*
c
)
sclp_console_device
(
struct
console
*
c
)
{
{
return
mk_kdev
(
sclp_console_major
,
sclp_console_minor
);
return
mk_kdev
(
sclp_console_major
,
sclp_console_minor
);
...
@@ -163,7 +163,7 @@ sclp_console_device(struct console *c)
...
@@ -163,7 +163,7 @@ sclp_console_device(struct console *c)
* is going to give up. We have to make sure that all buffers
* is going to give up. We have to make sure that all buffers
* will be flushed to the SCLP.
* will be flushed to the SCLP.
*/
*/
void
static
void
sclp_console_unblank
(
void
)
sclp_console_unblank
(
void
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -187,7 +187,7 @@ sclp_console_unblank(void)
...
@@ -187,7 +187,7 @@ sclp_console_unblank(void)
* used to register the SCLP console to the kernel and to
* used to register the SCLP console to the kernel and to
* give printk necessary information
* give printk necessary information
*/
*/
struct
console
sclp_console
=
st
atic
st
ruct
console
sclp_console
=
{
{
.
name
=
sclp_console_name
,
.
name
=
sclp_console_name
,
.
write
=
sclp_console_write
,
.
write
=
sclp_console_write
,
...
...
drivers/s390/char/sclp_rw.c
View file @
86a7dc29
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#define MAX_SCCB_ROOM (PAGE_SIZE - sizeof(struct sclp_buffer))
#define MAX_SCCB_ROOM (PAGE_SIZE - sizeof(struct sclp_buffer))
/* Event type structure for write message and write priority message */
/* Event type structure for write message and write priority message */
struct
sclp_register
sclp_rw_event
=
{
st
atic
st
ruct
sclp_register
sclp_rw_event
=
{
.
send_mask
=
EvTyp_Msg_Mask
|
EvTyp_PMsgCmd_Mask
.
send_mask
=
EvTyp_Msg_Mask
|
EvTyp_PMsgCmd_Mask
};
};
...
...
drivers/s390/char/sclp_tty.c
View file @
86a7dc29
...
@@ -466,7 +466,7 @@ sclp_tty_flush_buffer(struct tty_struct *tty)
...
@@ -466,7 +466,7 @@ sclp_tty_flush_buffer(struct tty_struct *tty)
/*
/*
* push input to tty
* push input to tty
*/
*/
void
sclp_tty_input
(
unsigned
char
*
buf
,
unsigned
int
count
)
static
void
sclp_tty_input
(
unsigned
char
*
buf
,
unsigned
int
count
)
{
{
unsigned
int
cchar
;
unsigned
int
cchar
;
...
@@ -694,7 +694,7 @@ sclp_tty_state_change(struct sclp_register *reg)
...
@@ -694,7 +694,7 @@ sclp_tty_state_change(struct sclp_register *reg)
{
{
}
}
struct
sclp_register
sclp_input_event
=
st
atic
st
ruct
sclp_register
sclp_input_event
=
{
{
.
receive_mask
=
EvTyp_OpCmd_Mask
|
EvTyp_PMsgCmd_Mask
,
.
receive_mask
=
EvTyp_OpCmd_Mask
|
EvTyp_PMsgCmd_Mask
,
.
state_change_fn
=
sclp_tty_state_change
,
.
state_change_fn
=
sclp_tty_state_change
,
...
...
drivers/s390/char/tape.c
deleted
100644 → 0
View file @
59db688e
This diff is collapsed.
Click to expand it.
drivers/s390/cio/Makefile
View file @
86a7dc29
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#
#
obj-y
+=
airq.o blacklist.o chsc.o cio.o css.o requestirq.o
obj-y
+=
airq.o blacklist.o chsc.o cio.o css.o requestirq.o
export-objs
+=
airq.o css.o c
hsc.o c
io.o requestirq.o
export-objs
+=
airq.o css.o cio.o requestirq.o
ccw_device-objs
+=
device.o device_fsm.o device_ops.o
ccw_device-objs
+=
device.o device_fsm.o device_ops.o
ccw_device-objs
+=
device_id.o device_pgid.o device_status.o
ccw_device-objs
+=
device_id.o device_pgid.o device_status.o
...
...
drivers/s390/cio/blacklist.c
View file @
86a7dc29
/*
/*
* drivers/s390/cio/blacklist.c
* drivers/s390/cio/blacklist.c
* S/390 common I/O routines -- blacklisting of specific devices
* S/390 common I/O routines -- blacklisting of specific devices
* $Revision: 1.2
2
$
* $Revision: 1.2
3
$
*
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
* IBM Corporation
...
@@ -162,10 +162,10 @@ blacklist_parse_proc_parameters (char *buf)
...
@@ -162,10 +162,10 @@ blacklist_parse_proc_parameters (char *buf)
else
else
blacklist_parse_parameters
(
buf
+
5
,
free
);
blacklist_parse_parameters
(
buf
+
5
,
free
);
}
else
if
(
strncmp
(
buf
,
"add "
,
4
)
==
0
)
{
}
else
if
(
strncmp
(
buf
,
"add "
,
4
)
==
0
)
{
/*
FIXME: the old code was checking if the new bl'ed
/*
*
devices are already known to the system so
*
We don't need to check for known devices since
*
validate_subchannel would still give a working
*
css_probe_device will handle this correctly.
*
status. is that necessary? *
/
*/
blacklist_parse_parameters
(
buf
+
4
,
add
);
blacklist_parse_parameters
(
buf
+
4
,
add
);
}
else
{
}
else
{
printk
(
KERN_WARNING
"cio_ignore: Parse error;
\n
"
printk
(
KERN_WARNING
"cio_ignore: Parse error;
\n
"
...
...
drivers/s390/cio/chsc.c
View file @
86a7dc29
/*
/*
* drivers/s390/cio/chsc.c
* drivers/s390/cio/chsc.c
* S/390 common I/O routines -- channel subsystem call
* S/390 common I/O routines -- channel subsystem call
* $Revision: 1.4
3
$
* $Revision: 1.4
6
$
*
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
* IBM Corporation
...
@@ -37,26 +37,6 @@ static int cio_chsc_desc_avail;
...
@@ -37,26 +37,6 @@ static int cio_chsc_desc_avail;
static
int
new_channel_path
(
int
chpid
,
int
status
);
static
int
new_channel_path
(
int
chpid
,
int
status
);
int
chsc
(
void
*
data
)
{
void
*
area
;
int
cc
;
if
(
!
data
)
return
-
EINVAL
;
area
=
(
void
*
)
get_zeroed_page
(
GFP_KERNEL
);
if
(
!
area
)
return
-
ENOMEM
;
memcpy
(
area
,
data
,
PAGE_SIZE
);
cc
=
do_chsc
(
area
);
if
(
cc
==
0
)
memcpy
(
data
,
area
,
PAGE_SIZE
);
free_page
((
unsigned
long
)
area
);
return
cc
;
}
static
int
static
int
set_chp_status
(
int
chp
,
int
status
)
set_chp_status
(
int
chp
,
int
status
)
{
{
...
@@ -114,21 +94,18 @@ chsc_get_sch_desc_irq(int irq)
...
@@ -114,21 +94,18 @@ chsc_get_sch_desc_irq(int irq)
* be page-aligned. Implement proper locking or dynamic
* be page-aligned. Implement proper locking or dynamic
* allocation or prove that this function does not have to be
* allocation or prove that this function does not have to be
* reentrant! */
* reentrant! */
static
struct
chsc_area
__attribute__
((
aligned
(
PAGE_SIZE
)))
chsc_area_ssd
;
static
struct
ssd_area
chsc_area_ssd
__attribute__
((
aligned
(
PAGE_SIZE
)));
typeof
(
chsc_area_ssd
.
response_block
.
response_block_data
.
ssd_res
)
typeof
(
chsc_area_ssd
.
response_block
)
*
ssd_res
=
&
chsc_area_ssd
.
response_block
.
response_block_data
.
ssd_res
;
*
ssd_res
=
&
chsc_area_ssd
.
response_block
;
chsc_area_ssd
=
(
struct
chsc
_area
)
{
chsc_area_ssd
=
(
struct
ssd
_area
)
{
.
request_block
=
{
.
request_block
=
{
.
command_code1
=
0x0010
,
.
command_code1
=
0x0010
,
.
command_code2
=
0x0004
,
.
command_code2
=
0x0004
,
.
request_block_data
=
{
.
f_sch
=
irq
,
.
ssd_req
=
{
.
l_sch
=
irq
,
.
f_sch
=
irq
,
.
l_sch
=
irq
,
}
}
}
}
};
};
...
@@ -306,14 +283,59 @@ s390_set_chpid_offline( __u8 chpid)
...
@@ -306,14 +283,59 @@ s390_set_chpid_offline( __u8 chpid)
#endif
#endif
}
}
/* this used to be in s390_process_res_acc_*, FIXME: find a better name
* for this function */
static
int
static
int
s390_check_valid_chpid
(
u8
chpid
)
s390_process_res_acc_sch
(
u8
chpid
,
__u16
fla
,
u32
fla_mask
,
struct
subchannel
*
sch
)
{
int
found
;
int
chp
;
int
ccode
;
/* Update our ssd_info */
if
(
chsc_get_sch_desc_irq
(
sch
->
irq
))
return
0
;
found
=
0
;
for
(
chp
=
0
;
chp
<=
7
;
chp
++
)
/*
* check if chpid is in information updated by ssd
*/
if
(
sch
->
ssd_info
.
valid
&&
sch
->
ssd_info
.
chpid
[
chp
]
==
chpid
&&
(
sch
->
ssd_info
.
fla
[
chp
]
&
fla_mask
)
==
fla
)
{
found
=
1
;
break
;
}
if
(
found
==
0
)
return
0
;
/*
* Do a stsch to update our subchannel structure with the
* new path information and eventually check for logically
* offline chpids.
*/
ccode
=
stsch
(
sch
->
irq
,
&
sch
->
schib
);
if
(
ccode
>
0
)
return
0
;
return
0x80
>>
chp
;
}
static
void
s390_process_res_acc
(
u8
chpid
,
__u16
fla
,
u32
fla_mask
)
{
{
struct
subchannel
*
sch
;
int
irq
;
int
ret
;
char
dbf_txt
[
15
];
char
dbf_txt
[
15
];
sprintf
(
dbf_txt
,
"accpr%x"
,
chpid
);
sprintf
(
dbf_txt
,
"accpr%x"
,
chpid
);
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
if
(
fla
!=
0
)
{
sprintf
(
dbf_txt
,
"fla%x"
,
fla
);
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
}
/*
/*
* I/O resources may have become accessible.
* I/O resources may have become accessible.
...
@@ -333,31 +355,14 @@ s390_check_valid_chpid(u8 chpid)
...
@@ -333,31 +355,14 @@ s390_check_valid_chpid(u8 chpid)
CIO_CRW_EVENT
(
0
,
"Error: Could not retrieve "
CIO_CRW_EVENT
(
0
,
"Error: Could not retrieve "
"subchannel descriptions, will not process css"
"subchannel descriptions, will not process css"
"machine check...
\n
"
);
"machine check...
\n
"
);
return
0
;
return
;
}
}
if
(
!
test_bit
(
chpid
,
chpids_logical
))
if
(
!
test_bit
(
chpid
,
chpids_logical
))
return
0
;
/* no need to do the rest */
return
;
/* no need to do the rest */
return
1
;
}
static
void
s390_process_res_acc_chpid
(
u8
chpid
)
{
struct
subchannel
*
sch
;
int
irq
;
int
ccode
;
int
chp
;
int
ret
;
if
(
!
s390_check_valid_chpid
(
chpid
))
return
;
pr_debug
(
KERN_DEBUG
"Looking at chpid %x...
\n
"
,
chpid
);
for
(
irq
=
0
;
irq
<=
__MAX_SUBCHANNELS
;
irq
++
)
{
for
(
irq
=
0
;
irq
<=
__MAX_SUBCHANNELS
;
irq
++
)
{
int
found
;
int
chp_mask
;
sch
=
ioinfo
[
irq
];
sch
=
ioinfo
[
irq
];
if
(
!
sch
)
{
if
(
!
sch
)
{
...
@@ -375,122 +380,33 @@ s390_process_res_acc_chpid (u8 chpid)
...
@@ -375,122 +380,33 @@ s390_process_res_acc_chpid (u8 chpid)
return
;
return
;
continue
;
continue
;
}
}
spin_lock_irq
(
&
sch
->
lock
);
spin_lock_irq
(
&
sch
->
lock
);
/* Update our ssd_info */
chp_mask
=
s390_process_res_acc_sch
(
chpid
,
fla
,
fla_mask
,
sch
);
if
(
chsc_get_sch_desc_irq
(
sch
->
irq
))
if
(
chp_mask
==
0
)
{
break
;
found
=
0
;
for
(
chp
=
0
;
chp
<=
7
;
chp
++
)
/*
* check if chpid is in information updated by ssd
*/
if
(
sch
->
ssd_info
.
valid
&&
(
sch
->
ssd_info
.
chpid
[
chp
]
==
chpid
))
{
found
=
1
;
break
;
}
if
(
found
==
0
)
{
spin_unlock_irq
(
&
sch
->
lock
);
spin_unlock_irq
(
&
sch
->
lock
);
continue
;
}
if
(
fla_mask
!=
0
)
/*
break
;
* Do a stsch to update our subchannel structure with the
else
* new path information and eventually check for logically
continue
;
* offline chpids.
*/
ccode
=
stsch
(
sch
->
irq
,
&
sch
->
schib
);
if
(
ccode
>
0
)
{
// FIXME: ccw_device_recognition(cdev);
spin_unlock_irq
(
&
sch
->
lock
);
continue
;
}
}
sch
->
lpm
=
sch
->
schib
.
pmcw
.
pim
&
sch
->
lpm
=
(
sch
->
schib
.
pmcw
.
pim
&
sch
->
schib
.
pmcw
.
pam
&
sch
->
schib
.
pmcw
.
pam
&
sch
->
schib
.
pmcw
.
pom
;
sch
->
schib
.
pmcw
.
pom
)
|
chp_mask
;
chsc_validate_chpids
(
sch
);
chsc_validate_chpids
(
sch
);
sch
->
lpm
|=
(
0x80
>>
chp
);
dev_fsm_event
(
sch
->
dev
.
driver_data
,
DEV_EVENT_VERIFY
);
dev_fsm_event
(
sch
->
dev
.
driver_data
,
DEV_EVENT_VERIFY
);
spin_unlock_irq
(
&
sch
->
lock
);
spin_unlock_irq
(
&
sch
->
lock
);
}
}
static
void
s390_process_res_acc_linkaddr
(
__u8
chpid
,
__u16
fla
,
u32
fla_mask
)
{
char
dbf_txt
[
15
];
struct
subchannel
*
sch
;
int
irq
;
int
ccode
;
int
ret
;
int
j
;
if
(
!
s390_check_valid_chpid
(
chpid
))
return
;
sprintf
(
dbf_txt
,
"fla%x"
,
fla
);
if
(
fla_mask
!=
0
)
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
pr_debug
(
KERN_DEBUG
"Looking at chpid %x, link addr %x...
\n
"
,
chpid
,
fla
);
for
(
irq
=
0
;
irq
<=
__MAX_SUBCHANNELS
;
irq
++
)
{
int
found
;
sch
=
ioinfo
[
irq
];
if
(
!
sch
)
{
/* The full program again (see above), grr... */
ret
=
css_probe_device
(
irq
);
if
(
ret
==
-
ENXIO
)
/* We're through */
return
;
return
;
}
/*
* Walk through all subchannels and
* look if our chpid and our (masked) link
* address are in somewhere
* Do a stsch for the found subchannels and
* perform path grouping
*/
/* Update our ssd_info */
if
(
chsc_get_sch_desc_irq
(
sch
->
irq
))
break
;
found
=
0
;
for
(
j
=
0
;
j
<
8
;
j
++
)
if
(
sch
->
ssd_info
.
valid
&&
sch
->
ssd_info
.
chpid
[
j
]
==
chpid
&&
(
sch
->
ssd_info
.
fla
[
j
]
&
fla_mask
)
==
fla
)
{
found
=
1
;
break
;
}
if
(
found
==
0
)
continue
;
ccode
=
stsch
(
sch
->
irq
,
&
sch
->
schib
);
if
(
ccode
>
0
)
break
;
break
;
sch
->
lpm
=
sch
->
schib
.
pmcw
.
pim
&
sch
->
schib
.
pmcw
.
pam
&
sch
->
schib
.
pmcw
.
pom
;
chsc_validate_chpids
(
sch
);
sch
->
lpm
|=
(
0x80
>>
j
);
dev_fsm_event
(
sch
->
dev
.
driver_data
,
DEV_EVENT_VERIFY
);
/* We've found it, get out of here. */
break
;
}
}
}
}
...
@@ -508,7 +424,7 @@ do_process_crw(void *ignore)
...
@@ -508,7 +424,7 @@ do_process_crw(void *ignore)
* be page-aligned. Implement proper locking or dynamic
* be page-aligned. Implement proper locking or dynamic
* allocation or prove that this function does not have to be
* allocation or prove that this function does not have to be
* reentrant! */
* reentrant! */
static
struct
chsc
_area
chsc_area_sei
static
struct
sei
_area
chsc_area_sei
__attribute__
((
aligned
(
PAGE_SIZE
)))
=
{
__attribute__
((
aligned
(
PAGE_SIZE
)))
=
{
.
request_block
=
{
.
request_block
=
{
.
command_code1
=
0x0010
,
.
command_code1
=
0x0010
,
...
@@ -516,8 +432,8 @@ do_process_crw(void *ignore)
...
@@ -516,8 +432,8 @@ do_process_crw(void *ignore)
}
}
};
};
typeof
(
chsc_area_sei
.
response_block
.
response_block_data
.
sei_res
)
typeof
(
chsc_area_sei
.
response_block
)
*
sei_res
=
&
chsc_area_sei
.
response_block
.
response_block_data
.
sei_res
;
*
sei_res
=
&
chsc_area_sei
.
response_block
;
CIO_TRACE_EVENT
(
2
,
"prcss"
);
CIO_TRACE_EVENT
(
2
,
"prcss"
);
...
@@ -582,17 +498,17 @@ do_process_crw(void *ignore)
...
@@ -582,17 +498,17 @@ do_process_crw(void *ignore)
if
((
sei_res
->
vf
&
0x80
)
==
0
)
{
if
((
sei_res
->
vf
&
0x80
)
==
0
)
{
pr_debug
(
KERN_DEBUG
"chpid: %x
\n
"
,
sei_res
->
rsid
);
pr_debug
(
KERN_DEBUG
"chpid: %x
\n
"
,
sei_res
->
rsid
);
s390_process_res_acc
_chpid
(
sei_res
->
rsid
);
s390_process_res_acc
(
sei_res
->
rsid
,
0
,
0
);
}
else
if
((
sei_res
->
vf
&
0xc0
)
==
0x80
)
{
}
else
if
((
sei_res
->
vf
&
0xc0
)
==
0x80
)
{
pr_debug
(
KERN_DEBUG
"chpid: %x link addr: %x
\n
"
,
pr_debug
(
KERN_DEBUG
"chpid: %x link addr: %x
\n
"
,
sei_res
->
rsid
,
sei_res
->
fla
);
sei_res
->
rsid
,
sei_res
->
fla
);
s390_process_res_acc
_linkaddr
(
sei_res
->
rsid
,
s390_process_res_acc
(
sei_res
->
rsid
,
sei_res
->
fla
,
sei_res
->
fla
,
0xff00
);
0xff00
);
}
else
if
((
sei_res
->
vf
&
0xc0
)
==
0xc0
)
{
}
else
if
((
sei_res
->
vf
&
0xc0
)
==
0xc0
)
{
pr_debug
(
KERN_DEBUG
"chpid: %x full link addr: %x
\n
"
,
pr_debug
(
KERN_DEBUG
"chpid: %x full link addr: %x
\n
"
,
sei_res
->
rsid
,
sei_res
->
fla
);
sei_res
->
rsid
,
sei_res
->
fla
);
s390_process_res_acc
_linkaddr
(
sei_res
->
rsid
,
s390_process_res_acc
(
sei_res
->
rsid
,
sei_res
->
fla
,
sei_res
->
fla
,
0xffff
);
0xffff
);
}
}
pr_debug
(
KERN_DEBUG
"
\n
"
);
pr_debug
(
KERN_DEBUG
"
\n
"
);
...
@@ -810,4 +726,3 @@ register_channel_paths(void)
...
@@ -810,4 +726,3 @@ register_channel_paths(void)
}
}
module_init
(
register_channel_paths
);
module_init
(
register_channel_paths
);
EXPORT_SYMBOL
(
chsc
);
drivers/s390/cio/chsc.h
View file @
86a7dc29
...
@@ -12,6 +12,86 @@
...
@@ -12,6 +12,86 @@
#define CHSC_SEI_ACC_LINKADDR 2
#define CHSC_SEI_ACC_LINKADDR 2
#define CHSC_SEI_ACC_FULLLINKADDR 3
#define CHSC_SEI_ACC_FULLLINKADDR 3
struct
sei_area
{
struct
{
/* word 0 */
__u16
command_code1
;
__u16
command_code2
;
/* word 1 */
__u32
reserved1
;
/* word 2 */
__u32
reserved2
;
/* word 3 */
__u32
reserved3
;
}
__attribute__
((
packed
,
aligned
(
8
)))
request_block
;
struct
{
/* word 0 */
__u16
length
;
__u16
response_code
;
/* word 1 */
__u32
reserved1
;
/* word 2 */
__u8
flags
;
__u8
vf
;
/* validity flags */
__u8
rs
;
/* reporting source */
__u8
cc
;
/* content code */
/* word 3 */
__u16
fla
;
/* full link address */
__u16
rsid
;
/* reporting source id */
/* word 4 */
__u32
reserved2
;
/* word 5 */
__u32
reserved3
;
/* word 6 */
__u32
ccdf
;
/* content-code dependent field */
/* word 7 */
__u32
reserved4
;
/* word 8 */
__u32
reserved5
;
/* word 9 */
__u32
reserved6
;
}
__attribute__
((
packed
,
aligned
(
8
)))
response_block
;
}
__attribute__
((
packed
,
aligned
(
PAGE_SIZE
)));
struct
ssd_area
{
struct
{
/* word 0 */
__u16
command_code1
;
__u16
command_code2
;
/* word 1 */
__u16
reserved1
;
__u16
f_sch
;
/* first subchannel */
/* word 2 */
__u16
reserved2
;
__u16
l_sch
;
/* last subchannel */
/* word 3 */
__u32
reserved3
;
}
__attribute__
((
packed
,
aligned
(
8
)))
request_block
;
struct
{
/* word 0 */
__u16
length
;
__u16
response_code
;
/* word 1 */
__u32
reserved1
;
/* word 2 */
__u8
sch_valid
:
1
;
__u8
dev_valid
:
1
;
__u8
st
:
3
;
/* subchannel type */
__u8
zeroes
:
3
;
__u8
unit_addr
;
/* unit address */
__u16
devno
;
/* device number */
/* word 3 */
__u8
path_mask
;
__u8
fla_valid_mask
;
__u16
sch
;
/* subchannel */
/* words 4-5 */
__u8
chpid
[
8
];
/* chpids 0-7 */
/* words 6-9 */
__u16
fla
[
8
];
/* full link addresses 0-7 */
}
__attribute__
((
packed
,
aligned
(
8
)))
response_block
;
}
__attribute__
((
packed
,
aligned
(
PAGE_SIZE
)));
struct
channel_path
{
struct
channel_path
{
int
id
;
int
id
;
int
state
;
int
state
;
...
...
drivers/s390/cio/cio.c
View file @
86a7dc29
/*
/*
* drivers/s390/cio/cio.c
* drivers/s390/cio/cio.c
* S/390 common I/O routines -- low level i/o calls
* S/390 common I/O routines -- low level i/o calls
* $Revision: 1.
89
$
* $Revision: 1.
90
$
*
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
* IBM Corporation
...
@@ -609,6 +609,7 @@ do_IRQ (struct pt_regs regs)
...
@@ -609,6 +609,7 @@ do_IRQ (struct pt_regs regs)
struct
subchannel
*
sch
;
struct
subchannel
*
sch
;
struct
irb
*
irb
;
struct
irb
*
irb
;
irq_enter
();
/*
/*
* Get interrupt information from lowcore
* Get interrupt information from lowcore
*/
*/
...
@@ -620,28 +621,23 @@ do_IRQ (struct pt_regs regs)
...
@@ -620,28 +621,23 @@ do_IRQ (struct pt_regs regs)
*/
*/
if
(
tpi_info
->
adapter_IO
==
1
&&
if
(
tpi_info
->
adapter_IO
==
1
&&
tpi_info
->
int_type
==
IO_INTERRUPT_TYPE
)
{
tpi_info
->
int_type
==
IO_INTERRUPT_TYPE
)
{
irq_enter
();
do_adapter_IO
(
tpi_info
->
intparm
);
do_adapter_IO
(
tpi_info
->
intparm
);
irq_exit
();
continue
;
continue
;
}
}
/* Store interrupt response block to lowcore. */
if
(
tsch
(
tpi_info
->
irq
,
irb
)
!=
0
)
/* Not status pending or not operational. */
continue
;
sch
=
ioinfo
[
tpi_info
->
irq
];
sch
=
ioinfo
[
tpi_info
->
irq
];
if
(
!
sch
)
if
(
sch
)
continue
;
spin_lock
(
&
sch
->
lock
);
/* Store interrupt response block to lowcore. */
irq_enter
();
if
(
tsch
(
tpi_info
->
irq
,
irb
)
==
0
&&
sch
)
{
spin_lock
(
&
sch
->
lock
);
/* Keep subchannel information word up to date. */
memcpy
(
&
sch
->
schib
.
scsw
,
&
irb
->
scsw
,
sizeof
(
irb
->
scsw
));
memcpy
(
&
sch
->
schib
.
scsw
,
&
irb
->
scsw
,
if
(
sch
->
driver
&&
sch
->
driver
->
irq
)
sizeof
(
irb
->
scsw
));
sch
->
driver
->
irq
(
&
sch
->
dev
);
/* Call interrupt handler if there is one. */
spin_unlock
(
&
sch
->
lock
);
if
(
sch
->
driver
&&
sch
->
driver
->
irq
)
irq_exit
();
sch
->
driver
->
irq
(
&
sch
->
dev
);
}
if
(
sch
)
spin_unlock
(
&
sch
->
lock
);
/*
/*
* Are more interrupts pending?
* Are more interrupts pending?
* If so, the tpi instruction will update the lowcore
* If so, the tpi instruction will update the lowcore
...
@@ -650,6 +646,7 @@ do_IRQ (struct pt_regs regs)
...
@@ -650,6 +646,7 @@ do_IRQ (struct pt_regs regs)
* out of the sie which costs more cycles than it saves.
* out of the sie which costs more cycles than it saves.
*/
*/
}
while
(
!
MACHINE_IS_VM
&&
tpi
(
NULL
)
!=
0
);
}
while
(
!
MACHINE_IS_VM
&&
tpi
(
NULL
)
!=
0
);
irq_exit
();
}
}
#ifdef CONFIG_CCW_CONSOLE
#ifdef CONFIG_CCW_CONSOLE
...
...
drivers/s390/cio/cio.h
View file @
86a7dc29
...
@@ -113,7 +113,6 @@ struct subchannel {
...
@@ -113,7 +113,6 @@ struct subchannel {
#define to_subchannel(n) container_of(n, struct subchannel, dev)
#define to_subchannel(n) container_of(n, struct subchannel, dev)
extern
int
cio_validate_subchannel
(
struct
subchannel
*
,
unsigned
int
);
extern
int
cio_validate_subchannel
(
struct
subchannel
*
,
unsigned
int
);
extern
int
cio_modify
(
struct
subchannel
*
);
extern
int
cio_enable_subchannel
(
struct
subchannel
*
,
unsigned
int
);
extern
int
cio_enable_subchannel
(
struct
subchannel
*
,
unsigned
int
);
extern
int
cio_disable_subchannel
(
struct
subchannel
*
);
extern
int
cio_disable_subchannel
(
struct
subchannel
*
);
extern
int
cio_cancel
(
struct
subchannel
*
);
extern
int
cio_cancel
(
struct
subchannel
*
);
...
@@ -127,7 +126,6 @@ extern int cio_set_options (struct subchannel *, int);
...
@@ -127,7 +126,6 @@ extern int cio_set_options (struct subchannel *, int);
extern
int
cio_get_options
(
struct
subchannel
*
);
extern
int
cio_get_options
(
struct
subchannel
*
);
/* Use with care. */
/* Use with care. */
extern
int
cio_tpi
(
void
);
extern
struct
subchannel
*
cio_probe_console
(
void
);
extern
struct
subchannel
*
cio_probe_console
(
void
);
extern
void
cio_release_console
(
void
);
extern
void
cio_release_console
(
void
);
...
...
drivers/s390/cio/css.c
View file @
86a7dc29
/*
/*
* drivers/s390/cio/css.c
* drivers/s390/cio/css.c
* driver for channel subsystem
* driver for channel subsystem
* $Revision: 1.
39
$
* $Revision: 1.
40
$
*
*
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
* IBM Corporation
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "cio.h"
#include "cio.h"
#include "cio_debug.h"
#include "cio_debug.h"
#include "device.h" // FIXME: dito
#include "device.h" // FIXME: dito
#include "ioasm.h"
struct
subchannel
*
ioinfo
[
__MAX_SUBCHANNELS
];
struct
subchannel
*
ioinfo
[
__MAX_SUBCHANNELS
];
unsigned
int
highest_subchannel
;
unsigned
int
highest_subchannel
;
...
@@ -154,6 +155,7 @@ css_process_crw(int irq)
...
@@ -154,6 +155,7 @@ css_process_crw(int irq)
{
{
static
DECLARE_WORK
(
work
,
do_process_crw
,
0
);
static
DECLARE_WORK
(
work
,
do_process_crw
,
0
);
struct
subchannel
*
sch
;
struct
subchannel
*
sch
;
int
ccode
,
devno
;
CIO_CRW_EVENT
(
2
,
"source is subchannel %04X
\n
"
,
irq
);
CIO_CRW_EVENT
(
2
,
"source is subchannel %04X
\n
"
,
irq
);
...
@@ -164,9 +166,13 @@ css_process_crw(int irq)
...
@@ -164,9 +166,13 @@ css_process_crw(int irq)
}
}
if
(
!
sch
->
dev
.
driver_data
)
if
(
!
sch
->
dev
.
driver_data
)
return
;
return
;
devno
=
sch
->
schib
.
pmcw
.
dev
;
/* FIXME: css_process_crw must not know about ccw_device */
/* FIXME: css_process_crw must not know about ccw_device */
dev_fsm_event
(
sch
->
dev
.
driver_data
,
DEV_EVENT_NOTOPER
);
dev_fsm_event
(
sch
->
dev
.
driver_data
,
DEV_EVENT_NOTOPER
);
// FIXME: revalidate machine checks?
ccode
=
stsch
(
irq
,
&
sch
->
schib
);
if
(
!
ccode
)
if
(
devno
!=
sch
->
schib
.
pmcw
.
dev
)
schedule_work
(
&
work
);
}
}
/*
/*
...
...
drivers/s390/cio/device.c
View file @
86a7dc29
/*
/*
* drivers/s390/cio/device.c
* drivers/s390/cio/device.c
* bus driver for ccw devices
* bus driver for ccw devices
* $Revision: 1.4
4
$
* $Revision: 1.4
5
$
*
*
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
* IBM Corporation
...
@@ -362,18 +362,28 @@ io_subchannel_register(void *data)
...
@@ -362,18 +362,28 @@ io_subchannel_register(void *data)
sch
->
dev
.
driver_data
=
0
;
sch
->
dev
.
driver_data
=
0
;
kfree
(
cdev
->
private
);
kfree
(
cdev
->
private
);
kfree
(
cdev
);
kfree
(
cdev
);
return
;
goto
out
;
}
}
ret
=
subchannel_add_files
(
cdev
->
dev
.
parent
);
ret
=
subchannel_add_files
(
cdev
->
dev
.
parent
);
if
(
ret
)
if
(
ret
)
printk
(
KERN_WARNING
"%s: could not add attributes to %04x
\n
"
,
printk
(
KERN_WARNING
"%s: could not add attributes to %04x
\n
"
,
__func__
,
sch
->
irq
);
__func__
,
sch
->
irq
);
out:
put_device
(
&
sch
->
dev
);
}
}
static
void
static
void
io_subchannel_recog
(
struct
ccw_device
*
cdev
,
struct
subchannel
*
sch
)
io_subchannel_recog
(
struct
ccw_device
*
cdev
,
struct
subchannel
*
sch
)
{
{
int
rc
;
if
(
!
get_device
(
&
sch
->
dev
))
{
if
(
cdev
->
dev
.
release
)
cdev
->
dev
.
release
(
&
cdev
->
dev
);
return
;
}
sch
->
dev
.
driver_data
=
cdev
;
sch
->
dev
.
driver_data
=
cdev
;
sch
->
driver
=
&
io_subchannel_driver
;
sch
->
driver
=
&
io_subchannel_driver
;
cdev
->
ccwlock
=
&
sch
->
lock
;
cdev
->
ccwlock
=
&
sch
->
lock
;
...
@@ -392,12 +402,17 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
...
@@ -392,12 +402,17 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
/* Do first half of device_register. */
/* Do first half of device_register. */
device_initialize
(
&
cdev
->
dev
);
device_initialize
(
&
cdev
->
dev
);
get_device
(
&
sch
->
dev
);
/* keep parent refcount in sync. */
/* Start async. device sensing. */
/* Start async. device sensing. */
spin_lock_irq
(
cdev
->
ccwlock
);
spin_lock_irq
(
cdev
->
ccwlock
);
ccw_device_recognition
(
cdev
);
rc
=
ccw_device_recognition
(
cdev
);
spin_unlock_irq
(
cdev
->
ccwlock
);
spin_unlock_irq
(
cdev
->
ccwlock
);
if
(
rc
)
{
sch
->
dev
.
driver_data
=
0
;
put_device
(
&
sch
->
dev
);
if
(
cdev
->
dev
.
release
)
cdev
->
dev
.
release
(
&
cdev
->
dev
);
}
}
}
static
int
static
int
...
...
drivers/s390/cio/device_fsm.c
View file @
86a7dc29
...
@@ -112,7 +112,10 @@ ccw_device_recog_done(struct ccw_device *cdev, int state)
...
@@ -112,7 +112,10 @@ ccw_device_recog_done(struct ccw_device *cdev, int state)
CIO_DEBUG
(
KERN_WARNING
,
2
,
CIO_DEBUG
(
KERN_WARNING
,
2
,
"SenseID : unknown device %04X on subchannel %04X
\n
"
,
"SenseID : unknown device %04X on subchannel %04X
\n
"
,
sch
->
schib
.
pmcw
.
dev
,
sch
->
irq
);
sch
->
schib
.
pmcw
.
dev
,
sch
->
irq
);
device_unregister
(
&
cdev
->
dev
);
sch
->
dev
.
driver_data
=
0
;
put_device
(
&
sch
->
dev
);
if
(
cdev
->
dev
.
release
)
cdev
->
dev
.
release
(
&
cdev
->
dev
);
break
;
break
;
case
DEV_STATE_OFFLINE
:
case
DEV_STATE_OFFLINE
:
/* fill out sense information */
/* fill out sense information */
...
@@ -235,10 +238,8 @@ ccw_device_done(struct ccw_device *cdev, int state)
...
@@ -235,10 +238,8 @@ ccw_device_done(struct ccw_device *cdev, int state)
sch
=
to_subchannel
(
cdev
->
dev
.
parent
);
sch
=
to_subchannel
(
cdev
->
dev
.
parent
);
if
(
state
!=
DEV_STATE_ONLINE
)
{
if
(
state
!=
DEV_STATE_ONLINE
)
cio_disable_subchannel
(
sch
);
cio_disable_subchannel
(
sch
);
device_unregister
(
&
cdev
->
dev
);
}
/* Reset device status. */
/* Reset device status. */
memset
(
&
cdev
->
private
->
irb
,
0
,
sizeof
(
struct
irb
));
memset
(
&
cdev
->
private
->
irb
,
0
,
sizeof
(
struct
irb
));
...
@@ -246,6 +247,9 @@ ccw_device_done(struct ccw_device *cdev, int state)
...
@@ -246,6 +247,9 @@ ccw_device_done(struct ccw_device *cdev, int state)
cdev
->
private
->
state
=
state
;
cdev
->
private
->
state
=
state
;
wake_up
(
&
cdev
->
private
->
wait_q
);
wake_up
(
&
cdev
->
private
->
wait_q
);
if
(
state
!=
DEV_STATE_ONLINE
)
put_device
(
&
cdev
->
dev
);
}
}
void
void
...
@@ -275,6 +279,8 @@ ccw_device_online(struct ccw_device *cdev)
...
@@ -275,6 +279,8 @@ ccw_device_online(struct ccw_device *cdev)
if
(
cdev
->
private
->
state
!=
DEV_STATE_OFFLINE
)
if
(
cdev
->
private
->
state
!=
DEV_STATE_OFFLINE
)
return
-
EINVAL
;
return
-
EINVAL
;
sch
=
to_subchannel
(
cdev
->
dev
.
parent
);
sch
=
to_subchannel
(
cdev
->
dev
.
parent
);
if
(
!
get_device
(
&
cdev
->
dev
))
return
-
ENODEV
;
if
(
cio_enable_subchannel
(
sch
,
sch
->
schib
.
pmcw
.
isc
)
!=
0
)
{
if
(
cio_enable_subchannel
(
sch
,
sch
->
schib
.
pmcw
.
isc
)
!=
0
)
{
/* Couldn't enable the subchannel for i/o. Sick device. */
/* Couldn't enable the subchannel for i/o. Sick device. */
dev_fsm_event
(
cdev
,
DEV_EVENT_NOTOPER
);
dev_fsm_event
(
cdev
,
DEV_EVENT_NOTOPER
);
...
@@ -683,19 +689,19 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS] = {
...
@@ -683,19 +689,19 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS] = {
[
DEV_EVENT_NOTOPER
]
ccw_device_online_notoper
,
[
DEV_EVENT_NOTOPER
]
ccw_device_online_notoper
,
[
DEV_EVENT_INTERRUPT
]
ccw_device_qdio_init_irq
,
[
DEV_EVENT_INTERRUPT
]
ccw_device_qdio_init_irq
,
[
DEV_EVENT_TIMEOUT
]
ccw_device_qdio_init_timeout
,
[
DEV_EVENT_TIMEOUT
]
ccw_device_qdio_init_timeout
,
[
DEV_EVENT_VERIFY
]
ccw_device_nop
,
//FIXME
[
DEV_EVENT_VERIFY
]
ccw_device_nop
,
},
},
[
DEV_STATE_QDIO_ACTIVE
]
{
[
DEV_STATE_QDIO_ACTIVE
]
{
[
DEV_EVENT_NOTOPER
]
ccw_device_online_notoper
,
[
DEV_EVENT_NOTOPER
]
ccw_device_online_notoper
,
[
DEV_EVENT_INTERRUPT
]
ccw_device_irq
,
[
DEV_EVENT_INTERRUPT
]
ccw_device_irq
,
[
DEV_EVENT_TIMEOUT
]
ccw_device_nop
,
[
DEV_EVENT_TIMEOUT
]
ccw_device_nop
,
[
DEV_EVENT_VERIFY
]
ccw_device_nop
,
//FIXME
[
DEV_EVENT_VERIFY
]
ccw_device_nop
,
},
},
[
DEV_STATE_QDIO_CLEANUP
]
{
[
DEV_STATE_QDIO_CLEANUP
]
{
[
DEV_EVENT_NOTOPER
]
ccw_device_online_notoper
,
[
DEV_EVENT_NOTOPER
]
ccw_device_online_notoper
,
[
DEV_EVENT_INTERRUPT
]
ccw_device_qdio_cleanup_irq
,
[
DEV_EVENT_INTERRUPT
]
ccw_device_qdio_cleanup_irq
,
[
DEV_EVENT_TIMEOUT
]
ccw_device_qdio_cleanup_timeout
,
[
DEV_EVENT_TIMEOUT
]
ccw_device_qdio_cleanup_timeout
,
[
DEV_EVENT_VERIFY
]
ccw_device_nop
,
//FIXME
[
DEV_EVENT_VERIFY
]
ccw_device_nop
,
},
},
/* states to wait for i/o completion before doing something */
/* states to wait for i/o completion before doing something */
[
DEV_STATE_ONLINE_VERIFY
]
{
[
DEV_STATE_ONLINE_VERIFY
]
{
...
...
drivers/s390/cio/ioasm.h
View file @
86a7dc29
...
@@ -260,7 +260,7 @@ extern __inline__ int xsch(int irq)
...
@@ -260,7 +260,7 @@ extern __inline__ int xsch(int irq)
return
ccode
;
return
ccode
;
}
}
extern
__inline__
int
do_
chsc
(
void
*
chsc_area
)
extern
__inline__
int
chsc
(
void
*
chsc_area
)
{
{
int
cc
;
int
cc
;
...
...
drivers/s390/cio/qdio.c
View file @
86a7dc29
...
@@ -53,8 +53,9 @@
...
@@ -53,8 +53,9 @@
#include "device.h"
#include "device.h"
#include "airq.h"
#include "airq.h"
#include "qdio.h"
#include "qdio.h"
#include "ioasm.h"
#define VERSION_QDIO_C "$Revision: 1.1
6
$"
#define VERSION_QDIO_C "$Revision: 1.1
8
$"
/****************** MODULE PARAMETER VARIABLES ********************/
/****************** MODULE PARAMETER VARIABLES ********************/
MODULE_AUTHOR
(
"Utz Bacher <utz.bacher@de.ibm.com>"
);
MODULE_AUTHOR
(
"Utz Bacher <utz.bacher@de.ibm.com>"
);
...
@@ -1573,33 +1574,33 @@ qdio_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
...
@@ -1573,33 +1574,33 @@ qdio_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
{
{
struct
qdio_irq
*
irq_ptr
;
struct
qdio_irq
*
irq_ptr
;
struct
qdio_q
*
q
;
struct
qdio_q
*
q
;
int
irq
;
int
cstat
,
dstat
;
int
cstat
,
dstat
;
char
dbf_text
[
15
]
=
"qintXXXX"
;
char
dbf_text
[
15
];
irq
=
cdev
->
private
->
irq
;
/* FIXME: use different dbg */
cstat
=
irb
->
scsw
.
cstat
;
cstat
=
irb
->
scsw
.
cstat
;
dstat
=
irb
->
scsw
.
dstat
;
dstat
=
irb
->
scsw
.
dstat
;
*
((
int
*
)(
&
dbf_text
[
4
]))
=
irq
;
QDIO_DBF_TEXT4
(
0
,
trace
,
"qint"
);
QDIO_DBF_HEX4
(
0
,
trace
,
dbf_text
,
QDIO_DBF_TRACE_LEN
);
sprintf
(
dbf_text
,
"%s"
,
cdev
->
dev
.
bus_id
);
QDIO_DBF_TEXT4
(
0
,
trace
,
dbf_text
);
if
(
!
intparm
||
!
cdev
)
{
if
(
!
intparm
||
!
cdev
)
{
QDIO_PRINT_STUPID
(
"got unsolicited interrupt in qdio "
\
QDIO_PRINT_STUPID
(
"got unsolicited interrupt in qdio "
\
"handler,
irq 0x%x
\n
"
,
irq
);
"handler,
device %s
\n
"
,
cdev
->
dev
.
bus_id
);
return
;
return
;
}
}
irq_ptr
=
cdev
->
private
->
qdio_data
;
irq_ptr
=
cdev
->
private
->
qdio_data
;
if
(
!
irq_ptr
)
{
if
(
!
irq_ptr
)
{
sprintf
(
dbf_text
,
"uint%4x"
,
irq
);
QDIO_DBF_TEXT2
(
1
,
trace
,
"uint"
);
sprintf
(
dbf_text
,
"%s"
,
cdev
->
dev
.
bus_id
);
QDIO_DBF_TEXT2
(
1
,
trace
,
dbf_text
);
QDIO_DBF_TEXT2
(
1
,
trace
,
dbf_text
);
QDIO_PRINT_ERR
(
"received interrupt on unused
irq 0x%04x
!
\n
"
,
QDIO_PRINT_ERR
(
"received interrupt on unused
device %s
!
\n
"
,
irq
);
cdev
->
dev
.
bus_id
);
return
;
return
;
}
}
qdio_irq_check_sense
(
irq
,
irb
);
qdio_irq_check_sense
(
irq
_ptr
->
irq
,
irb
);
if
(
cstat
&
SCHN_STAT_PCI
)
{
if
(
cstat
&
SCHN_STAT_PCI
)
{
qdio_handle_pci
(
irq_ptr
);
qdio_handle_pci
(
irq_ptr
);
...
@@ -1607,21 +1608,22 @@ qdio_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
...
@@ -1607,21 +1608,22 @@ qdio_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
}
}
if
((
cstat
&~
SCHN_STAT_PCI
)
||
dstat
)
{
if
((
cstat
&~
SCHN_STAT_PCI
)
||
dstat
)
{
sprintf
(
dbf_text
,
"ick2%4x"
,
irq
);
QDIO_DBF_TEXT2
(
1
,
trace
,
"ick2"
);
sprintf
(
dbf_text
,
"%s"
,
cdev
->
dev
.
bus_id
);
QDIO_DBF_TEXT2
(
1
,
trace
,
dbf_text
);
QDIO_DBF_TEXT2
(
1
,
trace
,
dbf_text
);
QDIO_DBF_HEX2
(
0
,
trace
,
&
intparm
,
sizeof
(
int
));
QDIO_DBF_HEX2
(
0
,
trace
,
&
intparm
,
sizeof
(
int
));
QDIO_DBF_HEX2
(
0
,
trace
,
&
dstat
,
sizeof
(
int
));
QDIO_DBF_HEX2
(
0
,
trace
,
&
dstat
,
sizeof
(
int
));
QDIO_DBF_HEX2
(
0
,
trace
,
&
cstat
,
sizeof
(
int
));
QDIO_DBF_HEX2
(
0
,
trace
,
&
cstat
,
sizeof
(
int
));
QDIO_PRINT_ERR
(
"received check condition on activate "
\
QDIO_PRINT_ERR
(
"received check condition on activate "
\
"queues on
irq 0x%x
(cs=x%x, ds=x%x).
\n
"
,
"queues on
device %s
(cs=x%x, ds=x%x).
\n
"
,
irq
,
cstat
,
dstat
);
cdev
->
dev
.
bus_id
,
cstat
,
dstat
);
if
(
irq_ptr
->
no_input_qs
)
{
if
(
irq_ptr
->
no_input_qs
)
{
q
=
irq_ptr
->
input_qs
[
0
];
q
=
irq_ptr
->
input_qs
[
0
];
}
else
if
(
irq_ptr
->
no_output_qs
)
{
}
else
if
(
irq_ptr
->
no_output_qs
)
{
q
=
irq_ptr
->
output_qs
[
0
];
q
=
irq_ptr
->
output_qs
[
0
];
}
else
{
}
else
{
QDIO_PRINT_ERR
(
"oops... no queue registered
on irq
"
\
QDIO_PRINT_ERR
(
"oops... no queue registered
for
"
\
"0x%x!?
\n
"
,
irq
);
"device %s!?
\n
"
,
cdev
->
dev
.
bus_id
);
goto
omit_handler_call
;
goto
omit_handler_call
;
}
}
q
->
handler
(
q
->
irq
,
QDIO_STATUS_ACTIVATE_CHECK_CONDITION
|
q
->
handler
(
q
->
irq
,
QDIO_STATUS_ACTIVATE_CHECK_CONDITION
|
...
...
drivers/s390/misc/Makefile
deleted
100644 → 0
View file @
59db688e
#
# S/390 miscellaneous devices
#
# placeholder for stuff to come...
drivers/s390/net/ctcmain.c
View file @
86a7dc29
/*
/*
* $Id: ctcmain.c,v 1.
29 2002/12/06 12:31:38 cohuck
Exp $
* $Id: ctcmain.c,v 1.
30 2002/12/09 13:56:20 aberg
Exp $
*
*
* CTC / ESCON network driver
* CTC / ESCON network driver
*
*
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
* along with this program; if not, write to the Free Software
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.
29
$
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.
30
$
*
*
*/
*/
...
@@ -279,7 +279,7 @@ static void
...
@@ -279,7 +279,7 @@ static void
print_banner
(
void
)
print_banner
(
void
)
{
{
static
int
printed
=
0
;
static
int
printed
=
0
;
char
vbuf
[]
=
"$Revision: 1.
29
$"
;
char
vbuf
[]
=
"$Revision: 1.
30
$"
;
char
*
version
=
vbuf
;
char
*
version
=
vbuf
;
if
(
printed
)
if
(
printed
)
...
@@ -2821,7 +2821,7 @@ ctc_remove_files(struct device *dev)
...
@@ -2821,7 +2821,7 @@ ctc_remove_files(struct device *dev)
* @returns 0 on success, !0 on failure.
* @returns 0 on success, !0 on failure.
*/
*/
int
static
int
ctc_probe_device
(
struct
ccwgroup_device
*
cgdev
)
ctc_probe_device
(
struct
ccwgroup_device
*
cgdev
)
{
{
struct
ctc_priv
*
priv
;
struct
ctc_priv
*
priv
;
...
@@ -2864,7 +2864,7 @@ ctc_probe_device(struct ccwgroup_device *cgdev)
...
@@ -2864,7 +2864,7 @@ ctc_probe_device(struct ccwgroup_device *cgdev)
*
*
* @returns 0 on success, !0 on failure.
* @returns 0 on success, !0 on failure.
*/
*/
int
static
int
ctc_new_device
(
struct
ccwgroup_device
*
cgdev
)
ctc_new_device
(
struct
ccwgroup_device
*
cgdev
)
{
{
char
read_id
[
CTC_ID_SIZE
];
char
read_id
[
CTC_ID_SIZE
];
...
@@ -2941,7 +2941,7 @@ ctc_new_device(struct ccwgroup_device *cgdev)
...
@@ -2941,7 +2941,7 @@ ctc_new_device(struct ccwgroup_device *cgdev)
*
*
* @returns 0 on success, !0 on failure.
* @returns 0 on success, !0 on failure.
*/
*/
int
static
int
ctc_shutdown_device
(
struct
ccwgroup_device
*
cgdev
)
ctc_shutdown_device
(
struct
ccwgroup_device
*
cgdev
)
{
{
struct
ctc_priv
*
priv
;
struct
ctc_priv
*
priv
;
...
@@ -2975,7 +2975,7 @@ ctc_shutdown_device(struct ccwgroup_device *cgdev)
...
@@ -2975,7 +2975,7 @@ ctc_shutdown_device(struct ccwgroup_device *cgdev)
}
}
int
static
int
ctc_remove_device
(
struct
ccwgroup_device
*
cgdev
)
ctc_remove_device
(
struct
ccwgroup_device
*
cgdev
)
{
{
struct
ctc_priv
*
priv
;
struct
ctc_priv
*
priv
;
...
@@ -2991,7 +2991,7 @@ ctc_remove_device(struct ccwgroup_device *cgdev)
...
@@ -2991,7 +2991,7 @@ ctc_remove_device(struct ccwgroup_device *cgdev)
return
0
;
return
0
;
}
}
struct
ccwgroup_driver
ctc_group_driver
=
{
st
atic
st
ruct
ccwgroup_driver
ctc_group_driver
=
{
.
name
=
"ctc"
,
.
name
=
"ctc"
,
.
max_slaves
=
2
,
.
max_slaves
=
2
,
.
driver_id
=
0xC3E3C3
,
.
driver_id
=
0xC3E3C3
,
...
...
drivers/s390/net/cu3088.c
View file @
86a7dc29
/*
/*
* $Id: cu3088.c,v 1.2
1 2002/12/03 16:26:4
5 cohuck Exp $
* $Id: cu3088.c,v 1.2
2 2002/12/10 09:53:5
5 cohuck Exp $
*
*
* CTC / LCS ccw_device driver
* CTC / LCS ccw_device driver
*
*
...
@@ -172,5 +172,5 @@ MODULE_LICENSE("GPL");
...
@@ -172,5 +172,5 @@ MODULE_LICENSE("GPL");
module_init
(
cu3088_init
);
module_init
(
cu3088_init
);
module_exit
(
cu3088_exit
);
module_exit
(
cu3088_exit
);
EXPORT_SYMBOL
(
register_cu3088_discipline
);
EXPORT_SYMBOL
_GPL
(
register_cu3088_discipline
);
EXPORT_SYMBOL
(
unregister_cu3088_discipline
);
EXPORT_SYMBOL
_GPL
(
unregister_cu3088_discipline
);
drivers/s390/net/lcs.c
View file @
86a7dc29
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
* Frank Pavlic (pavlic@de.ibm.com) and
* Frank Pavlic (pavlic@de.ibm.com) and
* Martin Schwidefsky <schwidefsky@de.ibm.com>
* Martin Schwidefsky <schwidefsky@de.ibm.com>
*
*
* $Revision: 1.4
1 $ $Date: 2002/12/06 12:42:01
$
* $Revision: 1.4
2 $ $Date: 2002/12/09 13:55:28
$
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
/**
/**
* initialization string for output
* initialization string for output
*/
*/
#define VERSION_LCS_C "$Revision: 1.4
1
$"
#define VERSION_LCS_C "$Revision: 1.4
2
$"
static
const
char
*
version
=
"LCS driver ("
VERSION_LCS_C
"/"
VERSION_LCS_H
")"
;
static
const
char
*
version
=
"LCS driver ("
VERSION_LCS_C
"/"
VERSION_LCS_H
")"
;
...
@@ -1576,7 +1576,7 @@ lcs_get_frames_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
...
@@ -1576,7 +1576,7 @@ lcs_get_frames_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
/**
/**
* get network statistics for ifconfig and other user programs
* get network statistics for ifconfig and other user programs
*/
*/
struct
net_device_stats
*
st
atic
st
ruct
net_device_stats
*
lcs_getstats
(
struct
net_device
*
dev
)
lcs_getstats
(
struct
net_device
*
dev
)
{
{
struct
lcs_card
*
card
;
struct
lcs_card
*
card
;
...
@@ -1590,7 +1590,7 @@ lcs_getstats(struct net_device *dev)
...
@@ -1590,7 +1590,7 @@ lcs_getstats(struct net_device *dev)
* stop lcs device
* stop lcs device
* This function will be called by user doing ifconfig xxx down
* This function will be called by user doing ifconfig xxx down
*/
*/
int
static
int
lcs_stop_device
(
struct
net_device
*
dev
)
lcs_stop_device
(
struct
net_device
*
dev
)
{
{
struct
lcs_card
*
card
;
struct
lcs_card
*
card
;
...
@@ -1612,7 +1612,7 @@ lcs_stop_device(struct net_device *dev)
...
@@ -1612,7 +1612,7 @@ lcs_stop_device(struct net_device *dev)
* start lcs device and make it runnable
* start lcs device and make it runnable
* This function will be called by user doing ifconfig xxx up
* This function will be called by user doing ifconfig xxx up
*/
*/
int
static
int
lcs_open_device
(
struct
net_device
*
dev
)
lcs_open_device
(
struct
net_device
*
dev
)
{
{
struct
lcs_card
*
card
;
struct
lcs_card
*
card
;
...
@@ -1678,7 +1678,7 @@ static DEVICE_ATTR(portno, 0644, lcs_portno_show, lcs_portno_store);
...
@@ -1678,7 +1678,7 @@ static DEVICE_ATTR(portno, 0644, lcs_portno_show, lcs_portno_store);
/**
/**
* lcs_probe_device is called on establishing a new ccwgroup_device.
* lcs_probe_device is called on establishing a new ccwgroup_device.
*/
*/
int
static
int
lcs_probe_device
(
struct
ccwgroup_device
*
ccwgdev
)
lcs_probe_device
(
struct
ccwgroup_device
*
ccwgdev
)
{
{
struct
lcs_card
*
card
;
struct
lcs_card
*
card
;
...
@@ -1714,7 +1714,7 @@ lcs_probe_device(struct ccwgroup_device *ccwgdev)
...
@@ -1714,7 +1714,7 @@ lcs_probe_device(struct ccwgroup_device *ccwgdev)
/**
/**
* lcs_new_device will be called by setting the group device online.
* lcs_new_device will be called by setting the group device online.
*/
*/
int
static
int
lcs_new_device
(
struct
ccwgroup_device
*
ccwgdev
)
lcs_new_device
(
struct
ccwgroup_device
*
ccwgdev
)
{
{
struct
lcs_card
*
card
;
struct
lcs_card
*
card
;
...
@@ -1794,7 +1794,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
...
@@ -1794,7 +1794,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
/**
/**
* lcs_shutdown_device, called when setting the group device offline.
* lcs_shutdown_device, called when setting the group device offline.
*/
*/
int
static
int
lcs_shutdown_device
(
struct
ccwgroup_device
*
ccwgdev
)
lcs_shutdown_device
(
struct
ccwgroup_device
*
ccwgdev
)
{
{
struct
lcs_card
*
card
;
struct
lcs_card
*
card
;
...
@@ -1810,7 +1810,7 @@ lcs_shutdown_device(struct ccwgroup_device *ccwgdev)
...
@@ -1810,7 +1810,7 @@ lcs_shutdown_device(struct ccwgroup_device *ccwgdev)
/**
/**
* lcs_remove_device, free buffers and card
* lcs_remove_device, free buffers and card
*/
*/
int
static
int
lcs_remove_device
(
struct
ccwgroup_device
*
ccwgdev
)
lcs_remove_device
(
struct
ccwgroup_device
*
ccwgdev
)
{
{
struct
lcs_card
*
card
;
struct
lcs_card
*
card
;
...
@@ -1828,7 +1828,7 @@ lcs_remove_device(struct ccwgroup_device *ccwgdev)
...
@@ -1828,7 +1828,7 @@ lcs_remove_device(struct ccwgroup_device *ccwgdev)
/**
/**
* LCS ccwgroup driver registration
* LCS ccwgroup driver registration
*/
*/
struct
ccwgroup_driver
lcs_group_driver
=
{
st
atic
st
ruct
ccwgroup_driver
lcs_group_driver
=
{
.
name
=
"lcs"
,
.
name
=
"lcs"
,
.
max_slaves
=
2
,
.
max_slaves
=
2
,
.
driver_id
=
0xD3C3E2
,
.
driver_id
=
0xD3C3E2
,
...
...
include/asm-s390/bitops.h
View file @
86a7dc29
...
@@ -53,7 +53,7 @@ extern const char _sb_findmap[];
...
@@ -53,7 +53,7 @@ extern const char _sb_findmap[];
/*
/*
* SMP save set_bit routine based on compare and swap (CS)
* SMP save set_bit routine based on compare and swap (CS)
*/
*/
static
inline
void
set_bit_cs
(
int
nr
,
volatile
void
*
ptr
)
static
inline
void
set_bit_cs
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -78,7 +78,7 @@ static inline void set_bit_cs(int nr, volatile void *ptr)
...
@@ -78,7 +78,7 @@ static inline void set_bit_cs(int nr, volatile void *ptr)
/*
/*
* SMP save clear_bit routine based on compare and swap (CS)
* SMP save clear_bit routine based on compare and swap (CS)
*/
*/
static
inline
void
clear_bit_cs
(
int
nr
,
volatile
void
*
ptr
)
static
inline
void
clear_bit_cs
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -103,7 +103,7 @@ static inline void clear_bit_cs(int nr, volatile void *ptr)
...
@@ -103,7 +103,7 @@ static inline void clear_bit_cs(int nr, volatile void *ptr)
/*
/*
* SMP save change_bit routine based on compare and swap (CS)
* SMP save change_bit routine based on compare and swap (CS)
*/
*/
static
inline
void
change_bit_cs
(
int
nr
,
volatile
void
*
ptr
)
static
inline
void
change_bit_cs
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -128,7 +128,8 @@ static inline void change_bit_cs(int nr, volatile void *ptr)
...
@@ -128,7 +128,8 @@ static inline void change_bit_cs(int nr, volatile void *ptr)
/*
/*
* SMP save test_and_set_bit routine based on compare and swap (CS)
* SMP save test_and_set_bit routine based on compare and swap (CS)
*/
*/
static
inline
int
test_and_set_bit_cs
(
int
nr
,
volatile
void
*
ptr
)
static
inline
int
test_and_set_bit_cs
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -154,7 +155,8 @@ static inline int test_and_set_bit_cs(int nr, volatile void *ptr)
...
@@ -154,7 +155,8 @@ static inline int test_and_set_bit_cs(int nr, volatile void *ptr)
/*
/*
* SMP save test_and_clear_bit routine based on compare and swap (CS)
* SMP save test_and_clear_bit routine based on compare and swap (CS)
*/
*/
static
inline
int
test_and_clear_bit_cs
(
int
nr
,
volatile
void
*
ptr
)
static
inline
int
test_and_clear_bit_cs
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -180,7 +182,8 @@ static inline int test_and_clear_bit_cs(int nr, volatile void *ptr)
...
@@ -180,7 +182,8 @@ static inline int test_and_clear_bit_cs(int nr, volatile void *ptr)
/*
/*
* SMP save test_and_change_bit routine based on compare and swap (CS)
* SMP save test_and_change_bit routine based on compare and swap (CS)
*/
*/
static
inline
int
test_and_change_bit_cs
(
int
nr
,
volatile
void
*
ptr
)
static
inline
int
test_and_change_bit_cs
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -207,7 +210,7 @@ static inline int test_and_change_bit_cs(int nr, volatile void *ptr)
...
@@ -207,7 +210,7 @@ static inline int test_and_change_bit_cs(int nr, volatile void *ptr)
/*
/*
* fast, non-SMP set_bit routine
* fast, non-SMP set_bit routine
*/
*/
static
inline
void
__set_bit
(
int
nr
,
volatile
void
*
ptr
)
static
inline
void
__set_bit
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -219,7 +222,7 @@ static inline void __set_bit(int nr, volatile void *ptr)
...
@@ -219,7 +222,7 @@ static inline void __set_bit(int nr, volatile void *ptr)
}
}
static
inline
void
static
inline
void
__constant_set_bit
(
const
int
nr
,
volatile
void
*
ptr
)
__constant_set_bit
(
const
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -269,7 +272,7 @@ __constant_set_bit(const int nr, volatile void *ptr)
...
@@ -269,7 +272,7 @@ __constant_set_bit(const int nr, volatile void *ptr)
* fast, non-SMP clear_bit routine
* fast, non-SMP clear_bit routine
*/
*/
static
inline
void
static
inline
void
__clear_bit
(
int
nr
,
volatile
void
*
ptr
)
__clear_bit
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -281,7 +284,7 @@ __clear_bit(int nr, volatile void *ptr)
...
@@ -281,7 +284,7 @@ __clear_bit(int nr, volatile void *ptr)
}
}
static
inline
void
static
inline
void
__constant_clear_bit
(
const
int
nr
,
volatile
void
*
ptr
)
__constant_clear_bit
(
const
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -330,7 +333,7 @@ __constant_clear_bit(const int nr, volatile void *ptr)
...
@@ -330,7 +333,7 @@ __constant_clear_bit(const int nr, volatile void *ptr)
/*
/*
* fast, non-SMP change_bit routine
* fast, non-SMP change_bit routine
*/
*/
static
inline
void
__change_bit
(
int
nr
,
volatile
void
*
ptr
)
static
inline
void
__change_bit
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -342,7 +345,7 @@ static inline void __change_bit(int nr, volatile void *ptr)
...
@@ -342,7 +345,7 @@ static inline void __change_bit(int nr, volatile void *ptr)
}
}
static
inline
void
static
inline
void
__constant_change_bit
(
const
int
nr
,
volatile
void
*
ptr
)
__constant_change_bit
(
const
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -391,7 +394,8 @@ __constant_change_bit(const int nr, volatile void *ptr)
...
@@ -391,7 +394,8 @@ __constant_change_bit(const int nr, volatile void *ptr)
/*
/*
* fast, non-SMP test_and_set_bit routine
* fast, non-SMP test_and_set_bit routine
*/
*/
static
inline
int
test_and_set_bit_simple
(
int
nr
,
volatile
void
*
ptr
)
static
inline
int
test_and_set_bit_simple
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
unsigned
char
ch
;
unsigned
char
ch
;
...
@@ -409,7 +413,8 @@ static inline int test_and_set_bit_simple(int nr, volatile void *ptr)
...
@@ -409,7 +413,8 @@ static inline int test_and_set_bit_simple(int nr, volatile void *ptr)
/*
/*
* fast, non-SMP test_and_clear_bit routine
* fast, non-SMP test_and_clear_bit routine
*/
*/
static
inline
int
test_and_clear_bit_simple
(
int
nr
,
volatile
void
*
ptr
)
static
inline
int
test_and_clear_bit_simple
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
unsigned
char
ch
;
unsigned
char
ch
;
...
@@ -427,7 +432,8 @@ static inline int test_and_clear_bit_simple(int nr, volatile void *ptr)
...
@@ -427,7 +432,8 @@ static inline int test_and_clear_bit_simple(int nr, volatile void *ptr)
/*
/*
* fast, non-SMP test_and_change_bit routine
* fast, non-SMP test_and_change_bit routine
*/
*/
static
inline
int
test_and_change_bit_simple
(
int
nr
,
volatile
void
*
ptr
)
static
inline
int
test_and_change_bit_simple
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
unsigned
char
ch
;
unsigned
char
ch
;
...
@@ -463,7 +469,7 @@ static inline int test_and_change_bit_simple(int nr, volatile void *ptr)
...
@@ -463,7 +469,7 @@ static inline int test_and_change_bit_simple(int nr, volatile void *ptr)
* This routine doesn't need to be atomic.
* This routine doesn't need to be atomic.
*/
*/
static
inline
int
__test_bit
(
int
nr
,
volatile
void
*
ptr
)
static
inline
int
__test_bit
(
int
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
unsigned
char
ch
;
unsigned
char
ch
;
...
@@ -473,7 +479,8 @@ static inline int __test_bit(int nr, volatile void *ptr)
...
@@ -473,7 +479,8 @@ static inline int __test_bit(int nr, volatile void *ptr)
return
(
ch
>>
(
nr
&
7
))
&
1
;
return
(
ch
>>
(
nr
&
7
))
&
1
;
}
}
static
inline
int
__constant_test_bit
(
int
nr
,
volatile
void
*
addr
)
{
static
inline
int
__constant_test_bit
(
int
nr
,
volatile
unsigned
long
*
addr
)
{
return
(((
volatile
char
*
)
addr
)[(
nr
>>
3
)
^
3
]
&
(
1
<<
(
nr
&
7
)))
!=
0
;
return
(((
volatile
char
*
)
addr
)[(
nr
>>
3
)
^
3
]
&
(
1
<<
(
nr
&
7
)))
!=
0
;
}
}
...
@@ -485,7 +492,8 @@ static inline int __constant_test_bit(int nr, volatile void * addr) {
...
@@ -485,7 +492,8 @@ static inline int __constant_test_bit(int nr, volatile void * addr) {
/*
/*
* Find-bit routines..
* Find-bit routines..
*/
*/
static
inline
int
find_first_zero_bit
(
void
*
addr
,
unsigned
size
)
static
inline
int
find_first_zero_bit
(
unsigned
long
*
addr
,
unsigned
size
)
{
{
unsigned
long
cmp
,
count
;
unsigned
long
cmp
,
count
;
int
res
;
int
res
;
...
@@ -523,7 +531,8 @@ static inline int find_first_zero_bit(void * addr, unsigned size)
...
@@ -523,7 +531,8 @@ static inline int find_first_zero_bit(void * addr, unsigned size)
return
(
res
<
size
)
?
res
:
size
;
return
(
res
<
size
)
?
res
:
size
;
}
}
static
inline
int
find_first_bit
(
void
*
addr
,
unsigned
size
)
static
inline
int
find_first_bit
(
unsigned
long
*
addr
,
unsigned
size
)
{
{
unsigned
long
cmp
,
count
;
unsigned
long
cmp
,
count
;
int
res
;
int
res
;
...
@@ -561,7 +570,8 @@ static inline int find_first_bit(void * addr, unsigned size)
...
@@ -561,7 +570,8 @@ static inline int find_first_bit(void * addr, unsigned size)
return
(
res
<
size
)
?
res
:
size
;
return
(
res
<
size
)
?
res
:
size
;
}
}
static
inline
int
find_next_zero_bit
(
void
*
addr
,
int
size
,
int
offset
)
static
inline
int
find_next_zero_bit
(
unsigned
long
*
addr
,
int
size
,
int
offset
)
{
{
unsigned
long
*
p
=
((
unsigned
long
*
)
addr
)
+
(
offset
>>
5
);
unsigned
long
*
p
=
((
unsigned
long
*
)
addr
)
+
(
offset
>>
5
);
unsigned
long
bitvec
,
reg
;
unsigned
long
bitvec
,
reg
;
...
@@ -599,7 +609,8 @@ static inline int find_next_zero_bit (void * addr, int size, int offset)
...
@@ -599,7 +609,8 @@ static inline int find_next_zero_bit (void * addr, int size, int offset)
return
(
offset
+
res
);
return
(
offset
+
res
);
}
}
static
inline
int
find_next_bit
(
void
*
addr
,
int
size
,
int
offset
)
static
inline
int
find_next_bit
(
unsigned
long
*
addr
,
int
size
,
int
offset
)
{
{
unsigned
long
*
p
=
((
unsigned
long
*
)
addr
)
+
(
offset
>>
5
);
unsigned
long
*
p
=
((
unsigned
long
*
)
addr
)
+
(
offset
>>
5
);
unsigned
long
bitvec
,
reg
;
unsigned
long
bitvec
,
reg
;
...
@@ -668,7 +679,7 @@ static inline unsigned long ffz(unsigned long word)
...
@@ -668,7 +679,7 @@ static inline unsigned long ffz(unsigned long word)
* __ffs = find first bit in word. Undefined if no bit exists,
* __ffs = find first bit in word. Undefined if no bit exists,
* so code should check against 0UL first..
* so code should check against 0UL first..
*/
*/
static
inline
unsigned
long
__ffs
(
unsigned
long
word
)
static
inline
unsigned
long
__ffs
(
unsigned
long
word
)
{
{
unsigned
long
reg
,
result
;
unsigned
long
reg
,
result
;
...
@@ -707,7 +718,7 @@ static inline int sched_find_first_bit(unsigned long *b)
...
@@ -707,7 +718,7 @@ static inline int sched_find_first_bit(unsigned long *b)
* differs in spirit from the above ffz (man ffs).
* differs in spirit from the above ffz (man ffs).
*/
*/
extern
in
t
inline
ffs
(
int
x
)
extern
in
line
int
ffs
(
int
x
)
{
{
int
r
=
1
;
int
r
=
1
;
...
@@ -792,10 +803,15 @@ extern __inline__ int fls(int x)
...
@@ -792,10 +803,15 @@ extern __inline__ int fls(int x)
* 23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
* 23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
*/
*/
#define ext2_set_bit(nr, addr) test_and_set_bit((nr)^24, addr)
#define ext2_set_bit(nr, addr) \
#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr)^24, addr)
test_and_set_bit((nr)^24, (unsigned long *)addr)
#define ext2_test_bit(nr, addr) test_bit((nr)^24, addr)
#define ext2_clear_bit(nr, addr) \
static
inline
int
ext2_find_first_zero_bit
(
void
*
vaddr
,
unsigned
size
)
test_and_clear_bit((nr)^24, (unsigned long *)addr)
#define ext2_test_bit(nr, addr) \
test_bit((nr)^24, (unsigned long *)addr)
static
inline
int
ext2_find_first_zero_bit
(
void
*
vaddr
,
unsigned
size
)
{
{
unsigned
long
cmp
,
count
;
unsigned
long
cmp
,
count
;
int
res
;
int
res
;
...
...
include/asm-s390/cio.h
View file @
86a7dc29
...
@@ -262,8 +262,6 @@ struct diag210 {
...
@@ -262,8 +262,6 @@ struct diag210 {
extern
int
diag210
(
struct
diag210
*
addr
);
extern
int
diag210
(
struct
diag210
*
addr
);
extern
int
chsc
(
void
*
data
);
extern
void
wait_cons_dev
(
void
);
extern
void
wait_cons_dev
(
void
);
#endif
#endif
...
...
include/asm-s390/current.h
View file @
86a7dc29
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#ifdef __KERNEL__
#ifdef __KERNEL__
#include <
asm
/thread_info.h>
#include <
linux
/thread_info.h>
struct
task_struct
;
struct
task_struct
;
...
...
include/asm-s390/page.h
View file @
86a7dc29
...
@@ -64,7 +64,7 @@ static inline void copy_page(void *to, void *from)
...
@@ -64,7 +64,7 @@ static inline void copy_page(void *to, void *from)
#define BUG() do { \
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
__asm__ __volatile__(".
word 0x000
0"); \
__asm__ __volatile__(".
long
0"); \
} while (0)
} while (0)
#define PAGE_BUG(page) do { \
#define PAGE_BUG(page) do { \
...
...
include/asm-s390/posix_types.h
View file @
86a7dc29
...
@@ -60,13 +60,13 @@ typedef struct {
...
@@ -60,13 +60,13 @@ typedef struct {
#endif
#endif
#undef __FD_SET
#undef __FD_SET
#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp)
#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp
->fds_bits
)
#undef __FD_CLR
#undef __FD_CLR
#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp)
#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp
->fds_bits
)
#undef __FD_ISSET
#undef __FD_ISSET
#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp)
#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp
->fds_bits
)
#undef __FD_ZERO
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
...
...
include/asm-s390/rwsem.h
View file @
86a7dc29
...
@@ -228,7 +228,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
...
@@ -228,7 +228,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"m"
(
tmp
)
:
"a"
(
&
sem
->
count
),
"m"
(
tmp
)
:
"cc"
,
"memory"
);
:
"cc"
,
"memory"
);
if
(
new
>
1
)
// FIXME: is this correct ?!?
if
(
new
>
1
)
rwsem_downgrade_wake
(
sem
);
rwsem_downgrade_wake
(
sem
);
}
}
...
...
include/asm-s390/setup.h
View file @
86a7dc29
...
@@ -25,13 +25,13 @@
...
@@ -25,13 +25,13 @@
*/
*/
extern
unsigned
long
machine_flags
;
extern
unsigned
long
machine_flags
;
#define MACHINE_IS_VM
(machine_flags & 1)
#define MACHINE_IS_VM
(machine_flags & 1)
#define MACHINE_HAS_IEEE
(machine_flags & 2)
#define MACHINE_HAS_IEEE
(machine_flags & 2)
#define MACHINE_IS_P390
(machine_flags & 4)
#define MACHINE_IS_P390
(machine_flags & 4)
#define MACHINE_HAS_CSP
(machine_flags & 8)
#define MACHINE_HAS_CSP
(machine_flags & 8)
#define MACHINE_HAS_MVPG
(machine_flags & 16)
#define MACHINE_HAS_MVPG
(machine_flags & 16)
#define MACHINE_HAS_SCLP
(!MACHINE_IS_P390)
#define MACHINE_HAS_SCLP
(!MACHINE_IS_P390)
/*
/*
* Console mode. Override with conmode=
* Console mode. Override with conmode=
...
...
include/asm-s390/thread_info.h
View file @
86a7dc29
...
@@ -26,6 +26,7 @@ struct thread_info {
...
@@ -26,6 +26,7 @@ struct thread_info {
unsigned
long
flags
;
/* low level flags */
unsigned
long
flags
;
/* low level flags */
unsigned
int
cpu
;
/* current CPU */
unsigned
int
cpu
;
/* current CPU */
unsigned
int
preempt_count
;
/* 0 => preemptable */
unsigned
int
preempt_count
;
/* 0 => preemptable */
struct
restart_block
restart_block
;
};
};
/*
/*
...
@@ -33,10 +34,13 @@ struct thread_info {
...
@@ -33,10 +34,13 @@ struct thread_info {
*/
*/
#define INIT_THREAD_INFO(tsk) \
#define INIT_THREAD_INFO(tsk) \
{ \
{ \
task: &tsk, \
.task = &tsk, \
exec_domain: &default_exec_domain, \
.exec_domain = &default_exec_domain, \
flags: 0, \
.flags = 0, \
cpu: 0, \
.cpu = 0, \
.restart_block = { \
.fn = do_no_restart_syscall, \
}, \
}
}
#define init_thread_info (init_thread_union.thread_info)
#define init_thread_info (init_thread_union.thread_info)
...
@@ -69,6 +73,7 @@ static inline struct thread_info *current_thread_info(void)
...
@@ -69,6 +73,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_NOTIFY_RESUME 1
/* resumption notification requested */
#define TIF_NOTIFY_RESUME 1
/* resumption notification requested */
#define TIF_SIGPENDING 2
/* signal pending */
#define TIF_SIGPENDING 2
/* signal pending */
#define TIF_NEED_RESCHED 3
/* rescheduling necessary */
#define TIF_NEED_RESCHED 3
/* rescheduling necessary */
#define TIF_RESTART_SVC 4
/* restart svc with new svc number */
#define TIF_USEDFPU 16
/* FPU was used by this task this quantum (SMP) */
#define TIF_USEDFPU 16
/* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17
/* true if poll_idle() is polling
#define TIF_POLLING_NRFLAG 17
/* true if poll_idle() is polling
TIF_NEED_RESCHED */
TIF_NEED_RESCHED */
...
@@ -77,6 +82,7 @@ static inline struct thread_info *current_thread_info(void)
...
@@ -77,6 +82,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
...
...
include/asm-s390/uaccess.h
View file @
86a7dc29
...
@@ -84,7 +84,7 @@ extern inline int __put_user_asm_8(void *x, void *ptr)
...
@@ -84,7 +84,7 @@ extern inline int __put_user_asm_8(void *x, void *ptr)
{
{
int
err
;
int
err
;
__asm__
__volatile__
(
" sr %0,
01
\n
"
__asm__
__volatile__
(
" sr %0,
%0
\n
"
" lr 2,%1
\n
"
" lr 2,%1
\n
"
" lr 4,%2
\n
"
" lr 4,%2
\n
"
" sacf 512
\n
"
" sacf 512
\n
"
...
...
include/asm-s390/unistd.h
View file @
86a7dc29
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#define __NR_write 4
#define __NR_write 4
#define __NR_open 5
#define __NR_open 5
#define __NR_close 6
#define __NR_close 6
#define __NR_restart_syscall 7
#define __NR_creat 8
#define __NR_creat 8
#define __NR_link 9
#define __NR_link 9
#define __NR_unlink 10
#define __NR_unlink 10
...
...
include/asm-s390x/bitops.h
View file @
86a7dc29
#ifndef _S390_BITOPS_H
#define _S390_BITOPS_H
/*
/*
* include/asm-s390/bitops.h
* include/asm-s390/bitops.h
*
*
...
@@ -9,9 +12,7 @@
...
@@ -9,9 +12,7 @@
* Copyright (C) 1992, Linus Torvalds
* Copyright (C) 1992, Linus Torvalds
*
*
*/
*/
#include <linux/config.h>
#ifndef _S390_BITOPS_H
#define _S390_BITOPS_H
/*
/*
* bit 0 is the LSB of *addr; bit 63 is the MSB of *addr;
* bit 0 is the LSB of *addr; bit 63 is the MSB of *addr;
...
@@ -32,7 +33,6 @@
...
@@ -32,7 +33,6 @@
* of the form "flags |= (1 << bitnr)" are used INTERMIXED
* of the form "flags |= (1 << bitnr)" are used INTERMIXED
* with operation of the form "set_bit(bitnr, flags)".
* with operation of the form "set_bit(bitnr, flags)".
*/
*/
#include <linux/config.h>
/* set ALIGN_CS to 1 if the SMP safe bit operations should
/* set ALIGN_CS to 1 if the SMP safe bit operations should
* align the address to 4 byte boundary. It seems to work
* align the address to 4 byte boundary. It seems to work
...
@@ -57,7 +57,7 @@ extern const char _sb_findmap[];
...
@@ -57,7 +57,7 @@ extern const char _sb_findmap[];
/*
/*
* SMP save set_bit routine based on compare and swap (CS)
* SMP save set_bit routine based on compare and swap (CS)
*/
*/
static
inline
void
set_bit_cs
(
unsigned
long
nr
,
volatile
void
*
ptr
)
static
inline
void
set_bit_cs
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -82,7 +82,7 @@ static inline void set_bit_cs(unsigned long nr, volatile void *ptr)
...
@@ -82,7 +82,7 @@ static inline void set_bit_cs(unsigned long nr, volatile void *ptr)
/*
/*
* SMP save clear_bit routine based on compare and swap (CS)
* SMP save clear_bit routine based on compare and swap (CS)
*/
*/
static
inline
void
clear_bit_cs
(
unsigned
long
nr
,
volatile
void
*
ptr
)
static
inline
void
clear_bit_cs
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -107,7 +107,7 @@ static inline void clear_bit_cs(unsigned long nr, volatile void *ptr)
...
@@ -107,7 +107,7 @@ static inline void clear_bit_cs(unsigned long nr, volatile void *ptr)
/*
/*
* SMP save change_bit routine based on compare and swap (CS)
* SMP save change_bit routine based on compare and swap (CS)
*/
*/
static
inline
void
change_bit_cs
(
unsigned
long
nr
,
volatile
void
*
ptr
)
static
inline
void
change_bit_cs
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -132,8 +132,8 @@ static inline void change_bit_cs(unsigned long nr, volatile void *ptr)
...
@@ -132,8 +132,8 @@ static inline void change_bit_cs(unsigned long nr, volatile void *ptr)
/*
/*
* SMP save test_and_set_bit routine based on compare and swap (CS)
* SMP save test_and_set_bit routine based on compare and swap (CS)
*/
*/
static
inline
int
static
inline
int
test_and_set_bit_cs
(
unsigned
long
nr
,
volatile
void
*
ptr
)
test_and_set_bit_cs
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -160,7 +160,7 @@ test_and_set_bit_cs(unsigned long nr, volatile void *ptr)
...
@@ -160,7 +160,7 @@ test_and_set_bit_cs(unsigned long nr, volatile void *ptr)
* SMP save test_and_clear_bit routine based on compare and swap (CS)
* SMP save test_and_clear_bit routine based on compare and swap (CS)
*/
*/
static
inline
int
static
inline
int
test_and_clear_bit_cs
(
unsigned
long
nr
,
volatile
void
*
ptr
)
test_and_clear_bit_cs
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -187,7 +187,7 @@ test_and_clear_bit_cs(unsigned long nr, volatile void *ptr)
...
@@ -187,7 +187,7 @@ test_and_clear_bit_cs(unsigned long nr, volatile void *ptr)
* SMP save test_and_change_bit routine based on compare and swap (CS)
* SMP save test_and_change_bit routine based on compare and swap (CS)
*/
*/
static
inline
int
static
inline
int
test_and_change_bit_cs
(
unsigned
long
nr
,
volatile
void
*
ptr
)
test_and_change_bit_cs
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
,
old
,
new
,
mask
;
unsigned
long
addr
,
old
,
new
,
mask
;
...
@@ -214,7 +214,7 @@ test_and_change_bit_cs(unsigned long nr, volatile void *ptr)
...
@@ -214,7 +214,7 @@ test_and_change_bit_cs(unsigned long nr, volatile void *ptr)
/*
/*
* fast, non-SMP set_bit routine
* fast, non-SMP set_bit routine
*/
*/
static
inline
void
__set_bit
(
unsigned
long
nr
,
volatile
void
*
ptr
)
static
inline
void
__set_bit
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -226,7 +226,7 @@ static inline void __set_bit(unsigned long nr, volatile void *ptr)
...
@@ -226,7 +226,7 @@ static inline void __set_bit(unsigned long nr, volatile void *ptr)
}
}
static
inline
void
static
inline
void
__constant_set_bit
(
const
unsigned
long
nr
,
volatile
void
*
ptr
)
__constant_set_bit
(
const
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -276,7 +276,7 @@ __constant_set_bit(const unsigned long nr, volatile void *ptr)
...
@@ -276,7 +276,7 @@ __constant_set_bit(const unsigned long nr, volatile void *ptr)
* fast, non-SMP clear_bit routine
* fast, non-SMP clear_bit routine
*/
*/
static
inline
void
static
inline
void
__clear_bit
(
unsigned
long
nr
,
volatile
void
*
ptr
)
__clear_bit
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -288,7 +288,7 @@ __clear_bit(unsigned long nr, volatile void *ptr)
...
@@ -288,7 +288,7 @@ __clear_bit(unsigned long nr, volatile void *ptr)
}
}
static
inline
void
static
inline
void
__constant_clear_bit
(
const
unsigned
long
nr
,
volatile
void
*
ptr
)
__constant_clear_bit
(
const
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -337,7 +337,7 @@ __constant_clear_bit(const unsigned long nr, volatile void *ptr)
...
@@ -337,7 +337,7 @@ __constant_clear_bit(const unsigned long nr, volatile void *ptr)
/*
/*
* fast, non-SMP change_bit routine
* fast, non-SMP change_bit routine
*/
*/
static
inline
void
__change_bit
(
unsigned
long
nr
,
volatile
void
*
ptr
)
static
inline
void
__change_bit
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -349,7 +349,7 @@ static inline void __change_bit(unsigned long nr, volatile void *ptr)
...
@@ -349,7 +349,7 @@ static inline void __change_bit(unsigned long nr, volatile void *ptr)
}
}
static
inline
void
static
inline
void
__constant_change_bit
(
const
unsigned
long
nr
,
volatile
void
*
ptr
)
__constant_change_bit
(
const
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
...
@@ -399,7 +399,7 @@ __constant_change_bit(const unsigned long nr, volatile void *ptr)
...
@@ -399,7 +399,7 @@ __constant_change_bit(const unsigned long nr, volatile void *ptr)
* fast, non-SMP test_and_set_bit routine
* fast, non-SMP test_and_set_bit routine
*/
*/
static
inline
int
static
inline
int
test_and_set_bit_simple
(
unsigned
long
nr
,
volatile
void
*
ptr
)
test_and_set_bit_simple
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
unsigned
char
ch
;
unsigned
char
ch
;
...
@@ -418,7 +418,7 @@ test_and_set_bit_simple(unsigned long nr, volatile void *ptr)
...
@@ -418,7 +418,7 @@ test_and_set_bit_simple(unsigned long nr, volatile void *ptr)
* fast, non-SMP test_and_clear_bit routine
* fast, non-SMP test_and_clear_bit routine
*/
*/
static
inline
int
static
inline
int
test_and_clear_bit_simple
(
unsigned
long
nr
,
volatile
void
*
ptr
)
test_and_clear_bit_simple
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
unsigned
char
ch
;
unsigned
char
ch
;
...
@@ -437,7 +437,7 @@ test_and_clear_bit_simple(unsigned long nr, volatile void *ptr)
...
@@ -437,7 +437,7 @@ test_and_clear_bit_simple(unsigned long nr, volatile void *ptr)
* fast, non-SMP test_and_change_bit routine
* fast, non-SMP test_and_change_bit routine
*/
*/
static
inline
int
static
inline
int
test_and_change_bit_simple
(
unsigned
long
nr
,
volatile
void
*
ptr
)
test_and_change_bit_simple
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
unsigned
char
ch
;
unsigned
char
ch
;
...
@@ -473,7 +473,7 @@ test_and_change_bit_simple(unsigned long nr, volatile void *ptr)
...
@@ -473,7 +473,7 @@ test_and_change_bit_simple(unsigned long nr, volatile void *ptr)
* This routine doesn't need to be atomic.
* This routine doesn't need to be atomic.
*/
*/
static
inline
int
__test_bit
(
unsigned
long
nr
,
volatile
void
*
ptr
)
static
inline
int
__test_bit
(
unsigned
long
nr
,
volatile
unsigned
long
*
ptr
)
{
{
unsigned
long
addr
;
unsigned
long
addr
;
unsigned
char
ch
;
unsigned
char
ch
;
...
@@ -484,7 +484,7 @@ static inline int __test_bit(unsigned long nr, volatile void *ptr)
...
@@ -484,7 +484,7 @@ static inline int __test_bit(unsigned long nr, volatile void *ptr)
}
}
static
inline
int
static
inline
int
__constant_test_bit
(
unsigned
long
nr
,
volatile
void
*
addr
)
{
__constant_test_bit
(
unsigned
long
nr
,
volatile
unsigned
long
*
addr
)
{
return
(((
volatile
char
*
)
addr
)[(
nr
>>
3
)
^
7
]
&
(
1
<<
(
nr
&
7
)))
!=
0
;
return
(((
volatile
char
*
)
addr
)[(
nr
>>
3
)
^
7
]
&
(
1
<<
(
nr
&
7
)))
!=
0
;
}
}
...
@@ -497,7 +497,7 @@ __constant_test_bit(unsigned long nr, volatile void *addr) {
...
@@ -497,7 +497,7 @@ __constant_test_bit(unsigned long nr, volatile void *addr) {
* Find-bit routines..
* Find-bit routines..
*/
*/
static
inline
unsigned
long
static
inline
unsigned
long
find_first_zero_bit
(
void
*
addr
,
unsigned
long
size
)
find_first_zero_bit
(
unsigned
long
*
addr
,
unsigned
long
size
)
{
{
unsigned
long
res
,
cmp
,
count
;
unsigned
long
res
,
cmp
,
count
;
...
@@ -539,7 +539,7 @@ find_first_zero_bit(void * addr, unsigned long size)
...
@@ -539,7 +539,7 @@ find_first_zero_bit(void * addr, unsigned long size)
}
}
static
inline
unsigned
long
static
inline
unsigned
long
find_first_bit
(
void
*
addr
,
unsigned
long
size
)
find_first_bit
(
unsigned
long
*
addr
,
unsigned
long
size
)
{
{
unsigned
long
res
,
cmp
,
count
;
unsigned
long
res
,
cmp
,
count
;
...
@@ -581,7 +581,7 @@ find_first_bit(void * addr, unsigned long size)
...
@@ -581,7 +581,7 @@ find_first_bit(void * addr, unsigned long size)
}
}
static
inline
unsigned
long
static
inline
unsigned
long
find_next_zero_bit
(
void
*
addr
,
unsigned
long
size
,
unsigned
long
offset
)
find_next_zero_bit
(
unsigned
long
*
addr
,
unsigned
long
size
,
unsigned
long
offset
)
{
{
unsigned
long
*
p
=
((
unsigned
long
*
)
addr
)
+
(
offset
>>
6
);
unsigned
long
*
p
=
((
unsigned
long
*
)
addr
)
+
(
offset
>>
6
);
unsigned
long
bitvec
,
reg
;
unsigned
long
bitvec
,
reg
;
...
@@ -625,7 +625,7 @@ find_next_zero_bit (void * addr, unsigned long size, unsigned long offset)
...
@@ -625,7 +625,7 @@ find_next_zero_bit (void * addr, unsigned long size, unsigned long offset)
}
}
static
inline
unsigned
long
static
inline
unsigned
long
find_next_bit
(
void
*
addr
,
unsigned
long
size
,
unsigned
long
offset
)
find_next_bit
(
unsigned
long
*
addr
,
unsigned
long
size
,
unsigned
long
offset
)
{
{
unsigned
long
*
p
=
((
unsigned
long
*
)
addr
)
+
(
offset
>>
6
);
unsigned
long
*
p
=
((
unsigned
long
*
)
addr
)
+
(
offset
>>
6
);
unsigned
long
bitvec
,
reg
;
unsigned
long
bitvec
,
reg
;
...
@@ -744,7 +744,7 @@ static inline int sched_find_first_bit(unsigned long *b)
...
@@ -744,7 +744,7 @@ static inline int sched_find_first_bit(unsigned long *b)
* the libc and compiler builtin ffs routines, therefore
* the libc and compiler builtin ffs routines, therefore
* differs in spirit from the above ffz (man ffs).
* differs in spirit from the above ffz (man ffs).
*/
*/
extern
in
t
inline
ffs
(
int
x
)
extern
in
line
int
ffs
(
int
x
)
{
{
int
r
=
1
;
int
r
=
1
;
...
@@ -836,9 +836,13 @@ extern __inline__ int fls(int x)
...
@@ -836,9 +836,13 @@ extern __inline__ int fls(int x)
* 23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
* 23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
*/
*/
#define ext2_set_bit(nr, addr) test_and_set_bit((nr)^56, addr)
#define ext2_set_bit(nr, addr) \
#define ext2_clear_bit(nr, addr) test_and_clear_bit((nr)^56, addr)
test_and_set_bit((nr)^56, (unsigned long *)addr)
#define ext2_test_bit(nr, addr) test_bit((nr)^56, addr)
#define ext2_clear_bit(nr, addr) \
test_and_clear_bit((nr)^56, (unsigned long *)addr)
#define ext2_test_bit(nr, addr) \
test_bit((nr)^56, (unsigned long *)addr)
static
inline
unsigned
long
static
inline
unsigned
long
ext2_find_first_zero_bit
(
void
*
vaddr
,
unsigned
long
size
)
ext2_find_first_zero_bit
(
void
*
vaddr
,
unsigned
long
size
)
{
{
...
...
include/asm-s390x/ccwgroup.h
View file @
86a7dc29
...
@@ -31,10 +31,10 @@ struct ccwgroup_driver {
...
@@ -31,10 +31,10 @@ struct ccwgroup_driver {
extern
int
ccwgroup_driver_register
(
struct
ccwgroup_driver
*
cdriver
);
extern
int
ccwgroup_driver_register
(
struct
ccwgroup_driver
*
cdriver
);
extern
void
ccwgroup_driver_unregister
(
struct
ccwgroup_driver
*
cdriver
);
extern
void
ccwgroup_driver_unregister
(
struct
ccwgroup_driver
*
cdriver
);
extern
int
ccwgroup_create
_dev
(
struct
device
*
root
,
extern
int
ccwgroup_create
(
struct
device
*
root
,
unsigned
int
creator_id
,
unsigned
int
creator_id
,
struct
ccw_driver
*
gdrv
,
struct
ccw_driver
*
gdrv
,
int
argc
,
char
*
argv
[]);
int
argc
,
char
*
argv
[]);
extern
int
ccwgroup_probe_ccwdev
(
struct
ccw_device
*
cdev
);
extern
int
ccwgroup_probe_ccwdev
(
struct
ccw_device
*
cdev
);
extern
int
ccwgroup_remove_ccwdev
(
struct
ccw_device
*
cdev
);
extern
int
ccwgroup_remove_ccwdev
(
struct
ccw_device
*
cdev
);
...
...
include/asm-s390x/cio.h
View file @
86a7dc29
...
@@ -262,8 +262,6 @@ struct diag210 {
...
@@ -262,8 +262,6 @@ struct diag210 {
extern
int
diag210
(
struct
diag210
*
addr
);
extern
int
diag210
(
struct
diag210
*
addr
);
extern
int
chsc
(
void
*
data
);
extern
void
wait_cons_dev
(
void
);
extern
void
wait_cons_dev
(
void
);
#endif
#endif
...
...
include/asm-s390x/current.h
View file @
86a7dc29
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#ifdef __KERNEL__
#ifdef __KERNEL__
#include <
asm
/thread_info.h>
#include <
linux
/thread_info.h>
struct
task_struct
;
struct
task_struct
;
...
...
include/asm-s390x/posix_types.h
View file @
86a7dc29
...
@@ -58,13 +58,13 @@ typedef struct {
...
@@ -58,13 +58,13 @@ typedef struct {
#endif
#endif
#undef __FD_SET
#undef __FD_SET
#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp)
#define __FD_SET(fd,fdsetp) set_bit(fd,fdsetp
->fds_bits
)
#undef __FD_CLR
#undef __FD_CLR
#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp)
#define __FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp
->fds_bits
)
#undef __FD_ISSET
#undef __FD_ISSET
#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp)
#define __FD_ISSET(fd,fdsetp) test_bit(fd,fdsetp
->fds_bits
)
#undef __FD_ZERO
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
...
...
include/asm-s390x/rwsem.h
View file @
86a7dc29
...
@@ -228,7 +228,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
...
@@ -228,7 +228,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"m"
(
tmp
)
:
"a"
(
&
sem
->
count
),
"m"
(
tmp
)
:
"cc"
,
"memory"
);
:
"cc"
,
"memory"
);
if
(
new
>
1
)
// FIXME: is this correct ?!?
if
(
new
>
1
)
rwsem_downgrade_wake
(
sem
);
rwsem_downgrade_wake
(
sem
);
}
}
...
...
include/asm-s390x/thread_info.h
View file @
86a7dc29
...
@@ -26,6 +26,7 @@ struct thread_info {
...
@@ -26,6 +26,7 @@ struct thread_info {
unsigned
long
flags
;
/* low level flags */
unsigned
long
flags
;
/* low level flags */
unsigned
int
cpu
;
/* current CPU */
unsigned
int
cpu
;
/* current CPU */
unsigned
int
preempt_count
;
/* 0 => preemptable */
unsigned
int
preempt_count
;
/* 0 => preemptable */
struct
restart_block
restart_block
;
};
};
/*
/*
...
@@ -33,10 +34,13 @@ struct thread_info {
...
@@ -33,10 +34,13 @@ struct thread_info {
*/
*/
#define INIT_THREAD_INFO(tsk) \
#define INIT_THREAD_INFO(tsk) \
{ \
{ \
task: &tsk, \
.task = &tsk, \
exec_domain: &default_exec_domain, \
.exec_domain = &default_exec_domain, \
flags: 0, \
.flags = 0, \
cpu: 0, \
.cpu = 0, \
.restart_block = { \
.fn = do_no_restart_syscall, \
}, \
}
}
#define init_thread_info (init_thread_union.thread_info)
#define init_thread_info (init_thread_union.thread_info)
...
@@ -69,6 +73,7 @@ static inline struct thread_info *current_thread_info(void)
...
@@ -69,6 +73,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_NOTIFY_RESUME 1
/* resumption notification requested */
#define TIF_NOTIFY_RESUME 1
/* resumption notification requested */
#define TIF_SIGPENDING 2
/* signal pending */
#define TIF_SIGPENDING 2
/* signal pending */
#define TIF_NEED_RESCHED 3
/* rescheduling necessary */
#define TIF_NEED_RESCHED 3
/* rescheduling necessary */
#define TIF_RESTART_SVC 4
/* restart svc with new svc number */
#define TIF_USEDFPU 16
/* FPU was used by this task this quantum (SMP) */
#define TIF_USEDFPU 16
/* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17
/* true if poll_idle() is polling
#define TIF_POLLING_NRFLAG 17
/* true if poll_idle() is polling
TIF_NEED_RESCHED */
TIF_NEED_RESCHED */
...
@@ -77,6 +82,7 @@ static inline struct thread_info *current_thread_info(void)
...
@@ -77,6 +82,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
...
...
include/asm-s390x/unistd.h
View file @
86a7dc29
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#define __NR_write 4
#define __NR_write 4
#define __NR_open 5
#define __NR_open 5
#define __NR_close 6
#define __NR_close 6
#define __NR_restart_syscall 7
#define __NR_creat 8
#define __NR_creat 8
#define __NR_link 9
#define __NR_link 9
#define __NR_unlink 10
#define __NR_unlink 10
...
...
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