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
fbd32c90
Commit
fbd32c90
authored
Oct 03, 2002
by
Martin Schwidefsky
Committed by
Linus Torvalds
Oct 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] s390 update (17/27): beautification.
Remove bogus sanity checks and code cleanup.
parent
57e19bfe
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
124 additions
and
157 deletions
+124
-157
arch/s390/kernel/process.c
arch/s390/kernel/process.c
+5
-5
arch/s390/kernel/setup.c
arch/s390/kernel/setup.c
+4
-1
arch/s390/kernel/smp.c
arch/s390/kernel/smp.c
+6
-6
arch/s390/mm/fault.c
arch/s390/mm/fault.c
+6
-4
arch/s390x/kernel/process.c
arch/s390x/kernel/process.c
+5
-5
arch/s390x/kernel/setup.c
arch/s390x/kernel/setup.c
+4
-1
arch/s390x/kernel/smp.c
arch/s390x/kernel/smp.c
+6
-6
arch/s390x/mm/fault.c
arch/s390x/mm/fault.c
+6
-4
drivers/s390/char/hwc_rw.c
drivers/s390/char/hwc_rw.c
+0
-2
drivers/s390/cio/airq.c
drivers/s390/cio/airq.c
+3
-3
drivers/s390/cio/blacklist.c
drivers/s390/cio/blacklist.c
+4
-4
drivers/s390/cio/cio.c
drivers/s390/cio/cio.c
+17
-29
drivers/s390/cio/cio_debug.h
drivers/s390/cio/cio_debug.h
+4
-4
drivers/s390/cio/ioinfo.c
drivers/s390/cio/ioinfo.c
+12
-12
drivers/s390/cio/requestirq.c
drivers/s390/cio/requestirq.c
+2
-6
drivers/s390/cio/s390io.c
drivers/s390/cio/s390io.c
+14
-26
drivers/s390/s390mach.c
drivers/s390/s390mach.c
+3
-3
include/asm-s390/debug.h
include/asm-s390/debug.h
+4
-2
include/asm-s390/lowcore.h
include/asm-s390/lowcore.h
+4
-13
include/asm-s390/system.h
include/asm-s390/system.h
+3
-3
include/asm-s390x/debug.h
include/asm-s390x/debug.h
+4
-2
include/asm-s390x/lowcore.h
include/asm-s390x/lowcore.h
+4
-12
include/asm-s390x/system.h
include/asm-s390x/system.h
+4
-4
No files found.
arch/s390/kernel/process.c
View file @
fbd32c90
...
...
@@ -302,15 +302,15 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
dump
->
magic
=
CMAGIC
;
dump
->
start_code
=
0
;
dump
->
start_stack
=
regs
->
gprs
[
15
]
&
~
(
PAGE_SIZE
-
1
);
dump
->
u_tsize
=
((
unsigned
long
)
current
->
mm
->
end_code
)
>>
PAGE_SHIFT
;
dump
->
u_dsize
=
(
(
unsigned
long
)
(
current
->
mm
->
brk
+
(
PAGE_SIZE
-
1
))
)
>>
PAGE_SHIFT
;
dump
->
u_tsize
=
current
->
mm
->
end_code
>>
PAGE_SHIFT
;
dump
->
u_dsize
=
(
current
->
mm
->
brk
+
PAGE_SIZE
-
1
)
>>
PAGE_SHIFT
;
dump
->
u_dsize
-=
dump
->
u_tsize
;
dump
->
u_ssize
=
0
;
if
(
dump
->
start_stack
<
TASK_SIZE
)
dump
->
u_ssize
=
(
(
unsigned
long
)
(
TASK_SIZE
-
dump
->
start_stack
)
)
>>
PAGE_SHIFT
;
memcpy
(
&
dump
->
regs
.
gprs
[
0
],
regs
,
sizeof
(
s390_regs
));
dump
->
u_ssize
=
(
TASK_SIZE
-
dump
->
start_stack
)
>>
PAGE_SHIFT
;
memcpy
(
&
dump
->
regs
,
regs
,
sizeof
(
s390_regs
));
dump_fpu
(
regs
,
&
dump
->
regs
.
fp_regs
);
memcpy
(
&
dump
->
regs
.
per_info
,
&
current
->
thread
.
per_info
,
sizeof
(
per_struct
))
;
dump
->
regs
.
per_info
=
current
->
thread
.
per_info
;
}
/*
...
...
arch/s390/kernel/setup.c
View file @
fbd32c90
...
...
@@ -526,7 +526,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
(
loops_per_jiffy
/
(
5000
/
HZ
))
%
100
);
}
if
(
cpu_online_map
&
(
1
<<
n
))
{
cpuinfo
=
&
safe_get_cpu_lowcore
(
n
)
->
cpu_data
;
if
(
smp_processor_id
()
==
n
)
cpuinfo
=
&
S390_lowcore
.
cpu_data
;
else
cpuinfo
=
&
lowcore_ptr
[
n
]
->
cpu_data
;
seq_printf
(
m
,
"processor %li: "
"version = %02X, "
"identification = %06X, "
...
...
arch/s390/kernel/smp.c
View file @
fbd32c90
...
...
@@ -173,7 +173,7 @@ static inline void do_store_status(void)
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
if
(
!
cpu_online
(
i
)
||
smp_processor_id
()
==
i
)
continue
;
low_core_addr
=
(
unsigned
long
)
get_cpu_lowcore
(
i
)
;
low_core_addr
=
(
unsigned
long
)
lowcore_ptr
[
i
]
;
do
{
rc
=
signal_processor_ps
(
&
dummy
,
low_core_addr
,
i
,
sigp_store_status_at_address
);
...
...
@@ -188,7 +188,7 @@ static inline void do_store_status(void)
void
smp_send_stop
(
void
)
{
/* write magic number to zero page (absolute 0) */
get_cpu_lowcore
(
smp_processor_id
())
->
panic_magic
=
__PANIC_MAGIC
;
lowcore_ptr
[
smp_processor_id
()]
->
panic_magic
=
__PANIC_MAGIC
;
/* stop other processors. */
do_send_stop
();
...
...
@@ -296,7 +296,7 @@ void do_ext_call_interrupt(struct pt_regs *regs, __u16 code)
*/
static
sigp_ccode
smp_ext_bitcall
(
int
cpu
,
ec_bit_sig
sig
)
{
struct
_lowcore
*
lowcore
=
get_cpu_lowcore
(
cpu
)
;
struct
_lowcore
*
lowcore
=
lowcore_ptr
[
cpu
]
;
sigp_ccode
ccode
;
/*
...
...
@@ -319,7 +319,7 @@ static void smp_ext_bitcall_others(ec_bit_sig sig)
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
if
(
!
cpu_online
(
i
)
||
smp_processor_id
()
==
i
)
continue
;
lowcore
=
get_cpu_lowcore
(
i
)
;
lowcore
=
lowcore_ptr
[
i
]
;
/*
* Set signaling bit in lowcore of target cpu and kick it
*/
...
...
@@ -519,7 +519,7 @@ int __cpu_up(unsigned int cpu)
unhash_process
(
idle
);
cpu_lowcore
=
get_cpu_lowcore
(
cpu
)
;
cpu_lowcore
=
lowcore_ptr
[
cpu
]
;
cpu_lowcore
->
save_area
[
15
]
=
idle
->
thread
.
ksp
;
cpu_lowcore
->
kernel_stack
=
(
__u32
)
idle
->
thread_info
+
(
2
*
PAGE_SIZE
);
__asm__
__volatile__
(
"la 1,%0
\n\t
"
...
...
@@ -555,7 +555,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
/*
* Initialize prefix pages and stacks for all possible cpus
*/
print_cpu_info
(
&
safe_get_cpu_lowcore
(
0
)
->
cpu_data
);
print_cpu_info
(
&
S390_lowcore
.
cpu_data
);
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
if
(
!
cpu_possible
(
i
))
...
...
arch/s390/mm/fault.c
View file @
fbd32c90
...
...
@@ -233,16 +233,18 @@ extern inline void do_exception(struct pt_regs *regs, unsigned long error_code)
* the fault.
*/
switch
(
handle_mm_fault
(
mm
,
vma
,
address
,
error_code
==
4
))
{
case
1
:
case
VM_FAULT_MINOR
:
tsk
->
min_flt
++
;
break
;
case
2
:
case
VM_FAULT_MAJOR
:
tsk
->
maj_flt
++
;
break
;
case
0
:
case
VM_FAULT_SIGBUS
:
goto
do_sigbus
;
default
:
case
VM_FAULT_OOM
:
goto
out_of_memory
;
default:
BUG
();
}
up_read
(
&
mm
->
mmap_sem
);
...
...
arch/s390x/kernel/process.c
View file @
fbd32c90
...
...
@@ -292,15 +292,15 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
dump
->
magic
=
CMAGIC
;
dump
->
start_code
=
0
;
dump
->
start_stack
=
regs
->
gprs
[
15
]
&
~
(
PAGE_SIZE
-
1
);
dump
->
u_tsize
=
((
unsigned
long
)
current
->
mm
->
end_code
)
>>
PAGE_SHIFT
;
dump
->
u_dsize
=
(
(
unsigned
long
)
(
current
->
mm
->
brk
+
(
PAGE_SIZE
-
1
))
)
>>
PAGE_SHIFT
;
dump
->
u_tsize
=
current
->
mm
->
end_code
>>
PAGE_SHIFT
;
dump
->
u_dsize
=
(
current
->
mm
->
brk
+
PAGE_SIZE
-
1
)
>>
PAGE_SHIFT
;
dump
->
u_dsize
-=
dump
->
u_tsize
;
dump
->
u_ssize
=
0
;
if
(
dump
->
start_stack
<
TASK_SIZE
)
dump
->
u_ssize
=
(
(
unsigned
long
)
(
TASK_SIZE
-
dump
->
start_stack
)
)
>>
PAGE_SHIFT
;
memcpy
(
&
dump
->
regs
.
gprs
[
0
],
regs
,
sizeof
(
s390_regs
));
dump
->
u_ssize
=
(
TASK_SIZE
-
dump
->
start_stack
)
>>
PAGE_SHIFT
;
memcpy
(
&
dump
->
regs
,
regs
,
sizeof
(
s390_regs
));
dump_fpu
(
regs
,
&
dump
->
regs
.
fp_regs
);
memcpy
(
&
dump
->
regs
.
per_info
,
&
current
->
thread
.
per_info
,
sizeof
(
per_struct
))
;
dump
->
regs
.
per_info
=
current
->
thread
.
per_info
;
}
/*
...
...
arch/s390x/kernel/setup.c
View file @
fbd32c90
...
...
@@ -516,7 +516,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
(
loops_per_jiffy
/
(
5000
/
HZ
))
%
100
);
}
if
(
cpu_online_map
&
(
1
<<
n
))
{
cpuinfo
=
&
safe_get_cpu_lowcore
(
n
)
->
cpu_data
;
if
(
smp_processor_id
()
==
n
)
cpuinfo
=
&
S390_lowcore
.
cpu_data
;
else
cpuinfo
=
&
lowcore_ptr
[
n
]
->
cpu_data
;
seq_printf
(
m
,
"processor %li: "
"version = %02X, "
"identification = %06X, "
...
...
arch/s390x/kernel/smp.c
View file @
fbd32c90
...
...
@@ -172,7 +172,7 @@ static inline void do_store_status(void)
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
if
(
!
cpu_online
(
i
)
||
smp_processor_id
()
==
i
)
continue
;
low_core_addr
=
(
unsigned
long
)
get_cpu_lowcore
(
i
)
;
low_core_addr
=
(
unsigned
long
)
lowcore_ptr
[
i
]
;
do
{
rc
=
signal_processor_ps
(
&
dummy
,
low_core_addr
,
i
,
sigp_store_status_at_address
);
...
...
@@ -187,7 +187,7 @@ static inline void do_store_status(void)
void
smp_send_stop
(
void
)
{
/* write magic number to zero page (absolute 0) */
get_cpu_lowcore
(
smp_processor_id
())
->
panic_magic
=
__PANIC_MAGIC
;
lowcore_ptr
[
smp_processor_id
()]
->
panic_magic
=
__PANIC_MAGIC
;
/* stop other processors. */
do_send_stop
();
...
...
@@ -298,7 +298,7 @@ static sigp_ccode smp_ext_bitcall(int cpu, ec_bit_sig sig)
/*
* Set signaling bit in lowcore of target cpu and kick it
*/
set_bit
(
sig
,
&
(
get_cpu_lowcore
(
cpu
)
->
ext_call_fast
)
);
set_bit
(
sig
,
&
lowcore_ptr
[
cpu
]
->
ext_call_fast
);
ccode
=
signal_processor
(
cpu
,
sigp_external_call
);
return
ccode
;
}
...
...
@@ -317,7 +317,7 @@ static void smp_ext_bitcall_others(ec_bit_sig sig)
/*
* Set signaling bit in lowcore of target cpu and kick it
*/
set_bit
(
sig
,
&
(
get_cpu_lowcore
(
i
)
->
ext_call_fast
)
);
set_bit
(
sig
,
&
lowcore_ptr
[
i
]
->
ext_call_fast
);
while
(
signal_processor
(
i
,
sigp_external_call
)
==
sigp_busy
)
udelay
(
10
);
}
...
...
@@ -499,7 +499,7 @@ int __cpu_up(unsigned int cpu)
unhash_process
(
idle
);
cpu_lowcore
=
get_cpu_lowcore
(
cpu
)
;
cpu_lowcore
=
lowcore_ptr
[
cpu
]
;
cpu_lowcore
->
save_area
[
15
]
=
idle
->
thread
.
ksp
;
cpu_lowcore
->
kernel_stack
=
(
__u64
)
idle
->
thread_info
+
(
4
*
PAGE_SIZE
);
__asm__
__volatile__
(
"la 1,%0
\n\t
"
...
...
@@ -535,7 +535,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
/*
* Initialize prefix pages and stacks for all possible cpus
*/
print_cpu_info
(
&
safe_get_cpu_lowcore
(
0
)
->
cpu_data
);
print_cpu_info
(
&
S390_lowcore
.
cpu_data
);
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
if
(
!
cpu_possible
(
i
))
...
...
arch/s390x/mm/fault.c
View file @
fbd32c90
...
...
@@ -233,16 +233,18 @@ extern inline void do_exception(struct pt_regs *regs, unsigned long error_code)
* the fault.
*/
switch
(
handle_mm_fault
(
mm
,
vma
,
address
,
error_code
==
4
))
{
case
1
:
case
VM_FAULT_MINOR
:
tsk
->
min_flt
++
;
break
;
case
2
:
case
VM_FAULT_MAJOR
:
tsk
->
maj_flt
++
;
break
;
case
0
:
case
VM_FAULT_SIGBUS
:
goto
do_sigbus
;
default
:
case
VM_FAULT_OOM
:
goto
out_of_memory
;
default:
BUG
();
}
up_read
(
&
mm
->
mmap_sem
);
...
...
drivers/s390/char/hwc_rw.c
View file @
fbd32c90
...
...
@@ -2215,8 +2215,6 @@ hwc_do_interrupt (u32 ext_int_param)
void
hwc_interrupt_handler
(
struct
pt_regs
*
regs
,
__u16
code
)
{
int
cpu
=
smp_processor_id
();
u32
ext_int_param
=
hwc_ext_int_param
();
irq_enter
();
...
...
drivers/s390/cio/airq.c
View file @
fbd32c90
...
...
@@ -3,7 +3,7 @@
* S/390 common I/O routines -- special interrupt registration
* currently used only by qdio
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
...
...
@@ -60,7 +60,7 @@ s390_register_adapter_interrupt (adapter_int_handler_t handler)
sprintf
(
dbf_txt
,
"ret:%d"
,
ret
);
CIO_TRACE_EVENT
(
4
,
dbf_txt
);
return
(
ret
)
;
return
ret
;
}
int
...
...
@@ -85,7 +85,7 @@ s390_unregister_adapter_interrupt (adapter_int_handler_t handler)
sprintf
(
dbf_txt
,
"ret:%d"
,
ret
);
CIO_TRACE_EVENT
(
4
,
dbf_txt
);
return
(
ret
)
;
return
ret
;
}
void
...
...
drivers/s390/cio/blacklist.c
View file @
fbd32c90
/*
* drivers/s390/cio/blacklist.c
* S/390 common I/O routines -- blacklisting of specific devices
* $Revision: 1.
5
$
* $Revision: 1.
7
$
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
...
...
@@ -134,7 +134,7 @@ __setup ("cio_ignore=", blacklist_setup);
int
is_blacklisted
(
int
devno
)
{
return
(
test_bit
(
devno
,
&
bl_dev
)
);
return
test_bit
(
devno
,
&
bl_dev
);
}
#ifdef CONFIG_PROC_FS
...
...
@@ -243,10 +243,10 @@ static int cio_ignore_write (struct file *file, const char *user_buf,
return
-
EFAULT
;
}
buf
[
user_len
]
=
'\0'
;
#if 0
CIO_DEBUG(KERN_DEBUG, 2,
"/proc/cio_ignore: '%s'\n", buf);
#endif
blacklist_parse_proc_parameters
(
buf
);
vfree
(
buf
);
...
...
drivers/s390/cio/cio.c
View file @
fbd32c90
/*
* drivers/s390/cio/cio.c
* S/390 common I/O routines -- low level i/o calls
* $Revision: 1.
1
5 $
* $Revision: 1.
2
5 $
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
...
...
@@ -52,7 +52,7 @@ s390_displayhex (void *ptr, s32 cnt, int level)
}
DBG
(
"%s
\n
"
,
buffer
);
if
(
cio_debug_initialized
)
debug_text_event
(
cio_debug_
trace
_id
,
level
,
buffer
);
debug_text_event
(
cio_debug_
msg
_id
,
level
,
buffer
);
}
...
...
@@ -433,8 +433,6 @@ s390_start_IO (int irq, /* IRQ */
int
ret
=
0
;
char
dbf_txt
[
15
];
SANITY_CHECK
(
irq
);
/*
* The flag usage is mutal exclusive ...
*/
...
...
@@ -456,7 +454,7 @@ s390_start_IO (int irq, /* IRQ */
ret
=
enable_cpu_sync_isc
(
irq
);
if
(
ret
)
return
(
ret
)
;
return
ret
;
}
...
...
@@ -556,7 +554,7 @@ s390_start_IO (int irq, /* IRQ */
if
(
flag
&
DOIO_DONT_CALL_INTHDLR
)
ioinfo
[
irq
]
->
ui
.
flags
.
repnone
=
0
;
return
(
ret
)
;
return
ret
;
}
int
...
...
@@ -618,7 +616,7 @@ do_IO (int irq, /* IRQ */
}
return
(
ret
)
;
return
ret
;
}
...
...
@@ -677,7 +675,7 @@ resume_IO (int irq)
}
return
(
ret
)
;
return
ret
;
}
/*
...
...
@@ -720,7 +718,7 @@ halt_IO (int irq, unsigned long user_intparm, unsigned long flag)
ret
=
enable_cpu_sync_isc
(
irq
);
if
(
ret
)
return
(
ret
)
;
return
ret
;
}
/*
...
...
@@ -784,7 +782,7 @@ halt_IO (int irq, unsigned long user_intparm, unsigned long flag)
if
(
flag
&
DOIO_WAIT_FOR_INTERRUPT
)
disable_cpu_sync_isc
(
irq
);
return
(
ret
)
;
return
ret
;
}
/*
...
...
@@ -803,7 +801,7 @@ clear_IO (int irq, unsigned long user_intparm, unsigned long flag)
SANITY_CHECK
(
irq
);
if
(
ioinfo
[
irq
]
==
INVALID_STORAGE_AREA
)
return
(
-
ENODEV
)
;
return
-
ENODEV
;
/*
* we only allow for clear_IO if the device has an I/O handler associated
...
...
@@ -829,7 +827,7 @@ clear_IO (int irq, unsigned long user_intparm, unsigned long flag)
ret
=
enable_cpu_sync_isc
(
irq
);
if
(
ret
)
return
(
ret
)
;
return
ret
;
}
/*
...
...
@@ -891,7 +889,7 @@ clear_IO (int irq, unsigned long user_intparm, unsigned long flag)
if
(
flag
&
DOIO_WAIT_FOR_INTERRUPT
)
disable_cpu_sync_isc
(
irq
);
return
(
ret
)
;
return
ret
;
}
/*
...
...
@@ -908,8 +906,6 @@ cancel_IO (int irq)
char
dbf_txt
[
15
];
int
ret
=
0
;
SANITY_CHECK
(
irq
);
sprintf
(
dbf_txt
,
"cancelIO%x"
,
irq
);
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
...
...
@@ -955,7 +951,6 @@ do_IRQ (struct pt_regs regs)
* Get interrupt info from lowcore
*/
volatile
tpi_info_t
*
tpi_info
=
(
tpi_info_t
*
)
(
__LC_SUBCHANNEL_ID
);
int
cpu
=
smp_processor_id
();
/*
* take fast exit if CPU is in sync. I/O state
...
...
@@ -1183,7 +1178,7 @@ s390_process_IRQ_normal(unsigned int irq,
* take fast exit if no handler is available
*/
if
(
!
ioinfo
[
irq
]
->
ui
.
flags
.
ready
)
return
(
ending_status
)
;
return
ending_status
;
/*
* Check whether we must issue a SENSE CCW ourselves if there is no
...
...
@@ -1485,7 +1480,8 @@ s390_process_IRQ (unsigned int irq)
s390_irq_count
[
cpu
]
++
;
}
sprintf
(
dbf_txt
,
"procIRQ%x"
,
irq
);
CIO_TRACE_EVENT
(
3
,
"procIRQ"
);
sprintf
(
dbf_txt
,
"%x"
,
irq
);
CIO_TRACE_EVENT
(
3
,
dbf_txt
);
if
(
ioinfo
[
irq
]
==
INVALID_STORAGE_AREA
)
{
...
...
@@ -1497,14 +1493,8 @@ s390_process_IRQ (unsigned int irq)
"for non-initialized subchannel!
\n
"
,
irq
);
tsch
(
irq
,
&
p_init_irb
);
return
(
1
);
}
if
(
ioinfo
[
irq
]
->
st
)
{
/* can't be */
BUG
();
return
1
;
}
dp
=
&
ioinfo
[
irq
]
->
devstat
;
...
...
@@ -1715,8 +1705,6 @@ set_cons_dev (int irq)
int
rc
=
0
;
char
dbf_txt
[
15
];
SANITY_CHECK
(
irq
);
if
(
cons_dev
!=
-
1
)
return
-
EBUSY
;
...
...
@@ -1750,7 +1738,7 @@ set_cons_dev (int irq)
}
}
return
(
rc
)
;
return
rc
;
}
int
...
...
@@ -1801,7 +1789,7 @@ wait_cons_dev (int irq)
}
return
(
rc
)
;
return
rc
;
}
/*
...
...
drivers/s390/cio/cio_debug.h
View file @
fbd32c90
...
...
@@ -3,9 +3,9 @@
#define SANITY_CHECK(irq) do { \
if (irq > highest_subchannel || irq < 0) \
return
(-ENODEV)
; \
return
-ENODEV
; \
if (ioinfo[irq] == INVALID_STORAGE_AREA) \
return
(-ENODEV)
; \
return
-ENODEV
; \
if (ioinfo[irq]->st) \
return -ENODEV; \
} while(0)
...
...
@@ -20,14 +20,14 @@ if (irq > highest_subchannel || irq < 0) \
#define CIO_MSG_EVENT(imp, args...) do { \
if (cio_debug_initialized) \
debug_sprintf_event(cio_debug_msg_id, \
imp, \
imp
, \
##args); \
} while (0)
#define CIO_CRW_EVENT(imp, args...) do { \
if (cio_debug_initialized) \
debug_sprintf_event(cio_debug_crw_id, \
imp, \
imp
, \
##args); \
} while (0)
...
...
drivers/s390/cio/ioinfo.c
View file @
fbd32c90
/*
* drivers/s390/cio/ioinfo.c
* S/390 common I/O routines -- the ioinfo structure
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
...
...
@@ -102,12 +102,12 @@ get_irq_next (int irq)
int
get_dev_info_by_irq
(
int
irq
,
s390_dev_info_t
*
pdi
)
{
if
(
irq
>
highest_subchannel
||
irq
<
0
)
\
return
(
-
ENODEV
);
\
if
(
ioinfo
[
irq
]
==
INVALID_STORAGE_AREA
)
\
return
(
-
ENODEV
);
\
if
(
ioinfo
[
irq
]
->
st
)
\
return
-
ENODEV
;
\
if
(
irq
>
highest_subchannel
||
irq
<
0
)
return
-
ENODEV
;
if
(
ioinfo
[
irq
]
==
INVALID_STORAGE_AREA
)
return
-
ENODEV
;
if
(
ioinfo
[
irq
]
->
st
)
return
-
ENODEV
;
if
(
pdi
==
NULL
)
return
-
EINVAL
;
...
...
@@ -189,7 +189,7 @@ get_dev_info_by_devno (__u16 devno, s390_dev_info_t * pdi)
}
}
return
(
rc
)
;
return
rc
;
}
...
...
@@ -211,7 +211,7 @@ get_irq_by_devno (__u16 devno)
}
}
return
(
rc
)
;
return
rc
;
}
unsigned
int
...
...
@@ -235,7 +235,7 @@ get_devno_by_irq (int irq)
* defined who's device number isn't valid ...
*/
if
(
ioinfo
[
irq
]
->
schib
.
pmcw
.
dnv
)
return
(
ioinfo
[
irq
]
->
schib
.
pmcw
.
dev
)
;
return
ioinfo
[
irq
]
->
schib
.
pmcw
.
dev
;
else
return
-
1
;
}
...
...
@@ -258,9 +258,9 @@ int
s390_set_private_data
(
int
irq
,
void
*
data
)
{
if
(
irq
>
highest_subchannel
||
irq
<
0
)
return
(
-
ENODEV
)
;
return
-
ENODEV
;
if
(
ioinfo
[
irq
]
==
INVALID_STORAGE_AREA
)
return
(
-
ENODEV
)
;
return
-
ENODEV
;
if
(
ioinfo
[
irq
]
->
st
)
return
-
ENODEV
;
ioinfo
[
irq
]
->
private_data
=
data
;
...
...
drivers/s390/cio/requestirq.c
View file @
fbd32c90
...
...
@@ -253,8 +253,6 @@ enable_subchannel (unsigned int irq)
int
retry
=
5
;
char
dbf_txt
[
15
];
SANITY_CHECK
(
irq
);
sprintf
(
dbf_txt
,
"ensch%x"
,
irq
);
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
...
...
@@ -324,7 +322,7 @@ enable_subchannel (unsigned int irq)
sprintf
(
dbf_txt
,
"ret:%d"
,
ret
);
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
return
(
ret
)
;
return
ret
;
}
/*
...
...
@@ -338,8 +336,6 @@ disable_subchannel (unsigned int irq)
int
retry
=
5
;
char
dbf_txt
[
15
];
SANITY_CHECK
(
irq
);
sprintf
(
dbf_txt
,
"dissch%x"
,
irq
);
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
...
...
@@ -427,7 +423,7 @@ disable_subchannel (unsigned int irq)
sprintf
(
dbf_txt
,
"ret:%d"
,
ret
);
CIO_TRACE_EVENT
(
2
,
dbf_txt
);
return
(
ret
)
;
return
ret
;
}
/* FIXME: there must be a cleaner way to express what happens */
...
...
drivers/s390/cio/s390io.c
View file @
fbd32c90
...
...
@@ -565,17 +565,13 @@ read_dev_chars (int irq, void **buffer, int length)
char
dbf_txt
[
15
];
if
(
!
buffer
||
!
length
)
{
return
(
-
EINVAL
);
}
if
(
!
buffer
||
!
length
)
return
-
EINVAL
;
SANITY_CHECK
(
irq
);
if
(
ioinfo
[
irq
]
->
ui
.
flags
.
oper
==
0
)
{
return
(
-
ENODEV
);
}
if
(
ioinfo
[
irq
]
->
ui
.
flags
.
oper
==
0
)
return
-
ENODEV
;
sprintf
(
dbf_txt
,
"rddevch%x"
,
irq
);
CIO_TRACE_EVENT
(
4
,
dbf_txt
);
...
...
@@ -687,11 +683,11 @@ read_conf_data (int irq, void **buffer, int *length, __u8 lpm)
SANITY_CHECK
(
irq
);
if
(
!
buffer
||
!
length
)
{
return
(
-
EINVAL
)
;
return
-
EINVAL
;
}
else
if
(
ioinfo
[
irq
]
->
ui
.
flags
.
oper
==
0
)
{
return
(
-
ENODEV
)
;
return
-
ENODEV
;
}
else
if
(
ioinfo
[
irq
]
->
ui
.
flags
.
esid
==
0
)
{
return
(
-
EOPNOTSUPP
)
;
return
-
EOPNOTSUPP
;
}
...
...
@@ -857,7 +853,7 @@ read_conf_data (int irq, void **buffer, int *length, __u8 lpm)
}
return
(
ret
)
;
return
ret
;
}
...
...
@@ -1299,7 +1295,7 @@ s390_validate_subchannel (int irq, int enable)
}
return
(
ret
)
;
return
ret
;
}
/*
...
...
@@ -1336,10 +1332,8 @@ s390_SenseID (int irq, senseid_t * sid, __u8 lpm)
int
i
;
int
failure
=
0
;
/* nothing went wrong yet */
SANITY_CHECK
(
irq
);
if
(
ioinfo
[
irq
]
->
ui
.
flags
.
oper
==
0
)
{
return
(
-
ENODEV
)
;
return
-
ENODEV
;
}
...
...
@@ -1939,10 +1933,8 @@ s390_SetPGID (int irq, __u8 lpm, pgid_t * pgid)
int
inlreq
=
0
;
/* inline request_irq() */
int
mpath
=
1
;
/* try multi-path first */
SANITY_CHECK
(
irq
);
if
(
ioinfo
[
irq
]
->
ui
.
flags
.
oper
==
0
)
{
return
(
-
ENODEV
)
;
return
-
ENODEV
;
}
...
...
@@ -2150,7 +2142,7 @@ s390_SetPGID (int irq, __u8 lpm, pgid_t * pgid)
if
(
inlreq
)
free_irq
(
irq
,
pdevstat
);
return
(
irq_ret
)
;
return
irq_ret
;
}
/*
...
...
@@ -2172,10 +2164,8 @@ s390_SensePGID (int irq, __u8 lpm, pgid_t * pgid)
int
inlreq
=
0
;
/* inline request_irq() */
unsigned
long
flags
;
SANITY_CHECK
(
irq
);
if
(
ioinfo
[
irq
]
->
ui
.
flags
.
oper
==
0
)
{
return
(
-
ENODEV
)
;
return
-
ENODEV
;
}
...
...
@@ -2339,7 +2329,7 @@ s390_SensePGID (int irq, __u8 lpm, pgid_t * pgid)
if
(
inlreq
)
free_irq
(
irq
,
pdevstat
);
return
(
irq_ret
)
;
return
irq_ret
;
}
/*
...
...
@@ -2360,8 +2350,6 @@ s390_send_nop(int irq, __u8 lpm)
int
irq_ret
=
0
;
int
inlreq
=
0
;
SANITY_CHECK
(
irq
);
if
(
!
ioinfo
[
irq
]
->
ui
.
flags
.
oper
)
/* no sense in trying */
return
-
ENODEV
;
...
...
drivers/s390/s390mach.c
View file @
fbd32c90
...
...
@@ -314,7 +314,7 @@ s390_machine_check_handler(void *parm)
}
while
(
1
);
return
(
0
)
;
return
0
;
}
/*
...
...
@@ -557,7 +557,7 @@ s390_collect_crw_info(void)
}
while
(
ccode
==
0
);
return
(
count
)
;
return
count
;
}
#ifdef CONFIG_MACHCHK_WARNING
...
...
@@ -587,6 +587,6 @@ s390_post_warning(void)
DBG
(
KERN_DEBUG
"post_warning : 1 warning machine check posted
\n
"
);
return
(
1
)
;
return
1
;
}
#endif
include/asm-s390/debug.h
View file @
fbd32c90
...
...
@@ -160,7 +160,8 @@ debug_text_event(debug_info_t* id, int level, const char* txt)
}
extern
debug_entry_t
*
debug_sprintf_event
(
debug_info_t
*
id
,
int
level
,
char
*
string
,...);
debug_sprintf_event
(
debug_info_t
*
id
,
int
level
,
char
*
string
,...)
__attribute__
((
format
(
printf
,
3
,
4
)));
extern
inline
debug_entry_t
*
...
...
@@ -195,7 +196,8 @@ debug_text_exception(debug_info_t* id, int level, const char* txt)
extern
debug_entry_t
*
debug_sprintf_exception
(
debug_info_t
*
id
,
int
level
,
char
*
string
,...);
debug_sprintf_exception
(
debug_info_t
*
id
,
int
level
,
char
*
string
,...)
__attribute__
((
format
(
printf
,
3
,
4
)));
int
debug_register_view
(
debug_info_t
*
id
,
struct
debug_view
*
view
);
int
debug_unregister_view
(
debug_info_t
*
id
,
struct
debug_view
*
view
);
...
...
include/asm-s390/lowcore.h
View file @
fbd32c90
...
...
@@ -176,25 +176,16 @@ struct _lowcore
__u8
pad12
[
0x1000
-
0xe04
];
/* 0xe04 */
}
__attribute__
((
packed
));
/* End structure*/
#define S390_lowcore (*((struct _lowcore *) 0))
extern
struct
_lowcore
*
lowcore_ptr
[];
extern
__inline__
void
set_prefix
(
__u32
address
)
{
__asm__
__volatile__
(
"spx %0"
:
:
"m"
(
address
)
:
"memory"
);
}
#define S390_lowcore (*((struct _lowcore *) 0))
extern
struct
_lowcore
*
lowcore_ptr
[];
#ifndef CONFIG_SMP
#define get_cpu_lowcore(cpu) (&S390_lowcore)
#define safe_get_cpu_lowcore(cpu) (&S390_lowcore)
#else
#define get_cpu_lowcore(cpu) (lowcore_ptr[(cpu)])
#define safe_get_cpu_lowcore(cpu) \
((cpu) == smp_processor_id() ? &S390_lowcore : lowcore_ptr[(cpu)])
#endif
#endif
/* __ASSEMBLY__ */
#define __PANIC_MAGIC 0xDEADC0DE
#endif
#endif
include/asm-s390/system.h
View file @
fbd32c90
...
...
@@ -184,18 +184,18 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
#define local_irq_enable() ({ \
__u8 __dummy; \
__asm__ __volatile__ ( \
"stosm 0(%
0),0x03" : : "a" (&__dummy) : "memory"
); \
"stosm 0(%
1),0x03" : "=m" (__dummy) : "a" (&__dummy)
); \
})
#define local_irq_disable() ({ \
__u32 __flags; \
__asm__ __volatile__ ( \
"stnsm 0(%
0),0xFC" : : "a" (&__flags) : "memory"
); \
"stnsm 0(%
1),0xFC" : "=m" (__flags) : "a" (&__flags)
); \
__flags; \
})
#define local_save_flags(x) \
__asm__ __volatile__("stosm 0(%
0),0" : : "a" (&x) : "memory"
)
__asm__ __volatile__("stosm 0(%
1),0" : "=m" (x) : "a" (&x)
)
#define local_irq_restore(x) \
__asm__ __volatile__("ssm 0(%0)" : : "a" (&x) : "memory")
...
...
include/asm-s390x/debug.h
View file @
fbd32c90
...
...
@@ -160,7 +160,8 @@ debug_text_event(debug_info_t* id, int level, const char* txt)
}
extern
debug_entry_t
*
debug_sprintf_event
(
debug_info_t
*
id
,
int
level
,
char
*
string
,...);
debug_sprintf_event
(
debug_info_t
*
id
,
int
level
,
char
*
string
,...)
__attribute__
((
format
(
printf
,
3
,
4
)));
extern
inline
debug_entry_t
*
...
...
@@ -195,7 +196,8 @@ debug_text_exception(debug_info_t* id, int level, const char* txt)
extern
debug_entry_t
*
debug_sprintf_exception
(
debug_info_t
*
id
,
int
level
,
char
*
string
,...);
debug_sprintf_exception
(
debug_info_t
*
id
,
int
level
,
char
*
string
,...)
__attribute__
((
format
(
printf
,
3
,
4
)));
int
debug_register_view
(
debug_info_t
*
id
,
struct
debug_view
*
view
);
int
debug_unregister_view
(
debug_info_t
*
id
,
struct
debug_view
*
view
);
...
...
include/asm-s390x/lowcore.h
View file @
fbd32c90
...
...
@@ -194,25 +194,17 @@ struct _lowcore
__u8
pad17
[
0x2000
-
0x1400
];
/* 0x1400 */
}
__attribute__
((
packed
));
/* End structure*/
#define S390_lowcore (*((struct _lowcore *) 0))
extern
struct
_lowcore
*
lowcore_ptr
[];
extern
__inline__
void
set_prefix
(
__u32
address
)
{
__asm__
__volatile__
(
"spx %0"
:
:
"m"
(
address
)
:
"memory"
);
}
#define S390_lowcore (*((struct _lowcore *) 0))
extern
struct
_lowcore
*
lowcore_ptr
[];
#define __PANIC_MAGIC 0xDEADC0DE
#ifndef CONFIG_SMP
#define get_cpu_lowcore(cpu) (&S390_lowcore)
#define safe_get_cpu_lowcore(cpu) (&S390_lowcore)
#else
#define get_cpu_lowcore(cpu) (lowcore_ptr[(cpu)])
#define safe_get_cpu_lowcore(cpu) \
((cpu) == smp_processor_id() ? &S390_lowcore : lowcore_ptr[(cpu)])
#endif
#endif
/* __ASSEMBLY__ */
#define __PANIC_MAGIC 0xDEADC0DE
#endif
include/asm-s390x/system.h
View file @
fbd32c90
...
...
@@ -202,21 +202,21 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
#define local_irq_enable() ({ \
unsigned long __dummy; \
__asm__ __volatile__ ( \
"stosm 0(%
0),0x03" : : "a" (&__dummy) : "memory"
); \
"stosm 0(%
1),0x03" : "=m" (__dummy) : "a" (&__dummy)
); \
})
#define local_irq_disable() ({ \
unsigned long __flags; \
__asm__ __volatile__ ( \
"stnsm 0(%
0),0xFC" : : "a" (&__flags) : "memory"
); \
"stnsm 0(%
1),0xfc" : "=m" (__flags) : "a" (&__flags)
); \
__flags; \
})
#define local_save_flags(x) \
__asm__ __volatile__("stosm 0(%
0),0" : : "a" (&x) : "memory"
)
__asm__ __volatile__("stosm 0(%
1),0" : "=m" (x) : "a" (&x)
)
#define local_irq_restore(x) \
__asm__ __volatile__("ssm 0(%0)" : : "a" (&x)
: "memory"
)
__asm__ __volatile__("ssm 0(%0)" : : "a" (&x) )
#define irqs_disabled() \
({ \
...
...
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