Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4a975df3
Commit
4a975df3
authored
Oct 08, 2002
by
Martin Schwidefsky
Committed by
Linus Torvalds
Oct 08, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] s390 update: tasklets
Switch from work queues to tasklets in the 3215 and 3270 drivers.
parent
636efd6a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
drivers/s390/char/con3215.c
drivers/s390/char/con3215.c
+14
-16
drivers/s390/char/tubfs.c
drivers/s390/char/tubfs.c
+7
-6
No files found.
drivers/s390/char/con3215.c
View file @
4a975df3
...
@@ -89,7 +89,7 @@ typedef struct _raw3215_info {
...
@@ -89,7 +89,7 @@ typedef struct _raw3215_info {
int
written
;
/* number of bytes in write requests */
int
written
;
/* number of bytes in write requests */
devstat_t
devstat
;
/* device status structure for do_IO */
devstat_t
devstat
;
/* device status structure for do_IO */
struct
tty_struct
*
tty
;
/* pointer to tty structure if present */
struct
tty_struct
*
tty
;
/* pointer to tty structure if present */
struct
work_struct
tqueue
;
/* task queue to bottom half */
struct
tasklet_struct
tasklet
;
raw3215_req
*
queued_read
;
/* pointer to queued read requests */
raw3215_req
*
queued_read
;
/* pointer to queued read requests */
raw3215_req
*
queued_write
;
/* pointer to queued write requests */
raw3215_req
*
queued_write
;
/* pointer to queued write requests */
wait_queue_head_t
empty_wait
;
/* wait queue for flushing */
wait_queue_head_t
empty_wait
;
/* wait queue for flushing */
...
@@ -369,16 +369,13 @@ static void raw3215_tasklet(void *data)
...
@@ -369,16 +369,13 @@ static void raw3215_tasklet(void *data)
}
}
/*
/*
* Function to safely add raw3215_softint to tq_immediate.
* The s390irq spinlock must be held.
*/
*/
static
inline
void
raw3215_sched_
bh
(
raw3215_info
*
raw
)
static
inline
void
raw3215_sched_
tasklet
(
raw3215_info
*
raw
)
{
{
if
(
raw
->
flags
&
RAW3215_BH_PENDING
)
if
(
raw
->
flags
&
RAW3215_BH_PENDING
)
return
;
/* already pending */
return
;
/* already pending */
raw
->
flags
|=
RAW3215_BH_PENDING
;
raw
->
flags
|=
RAW3215_BH_PENDING
;
INIT_WORK
(
&
raw
->
tqueue
,
raw3215_softint
,
raw
);
tasklet_hi_schedule
(
&
raw
->
tasklet
);
schedule_work
(
&
raw
->
tqueue
);
}
}
/*
/*
...
@@ -421,7 +418,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
...
@@ -421,7 +418,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
"(dev %i, dev sts 0x%2x, sch sts 0x%2x)"
;
"(dev %i, dev sts 0x%2x, sch sts 0x%2x)"
;
raw
->
msg_dstat
=
dstat
;
raw
->
msg_dstat
=
dstat
;
raw
->
msg_cstat
=
cstat
;
raw
->
msg_cstat
=
cstat
;
raw3215_sched_bh
(
raw
);
raw3215_sched_tasklet
(
raw
);
}
}
}
}
if
(
dstat
&
0x01
)
{
/* we got a unit exception */
if
(
dstat
&
0x01
)
{
/* we got a unit exception */
...
@@ -438,7 +435,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
...
@@ -438,7 +435,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
raw3215_mk_read_req
(
raw
);
raw3215_mk_read_req
(
raw
);
if
(
MACHINE_IS_P390
)
if
(
MACHINE_IS_P390
)
memset
(
raw
->
inbuf
,
0
,
RAW3215_INBUF_SIZE
);
memset
(
raw
->
inbuf
,
0
,
RAW3215_INBUF_SIZE
);
raw3215_sched_bh
(
raw
);
raw3215_sched_tasklet
(
raw
);
break
;
break
;
case
0x08
:
case
0x08
:
case
0x0C
:
case
0x0C
:
...
@@ -512,7 +509,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
...
@@ -512,7 +509,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
raw
->
queued_read
==
NULL
)
{
raw
->
queued_read
==
NULL
)
{
wake_up_interruptible
(
&
raw
->
empty_wait
);
wake_up_interruptible
(
&
raw
->
empty_wait
);
}
}
raw3215_sched_bh
(
raw
);
raw3215_sched_tasklet
(
raw
);
break
;
break
;
default:
default:
/* Strange interrupt, I'll do my best to clean up */
/* Strange interrupt, I'll do my best to clean up */
...
@@ -532,7 +529,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
...
@@ -532,7 +529,7 @@ static void raw3215_irq(int irq, void *int_parm, struct pt_regs *regs)
"(dev %i, dev sts 0x%2x, sch sts 0x%2x)"
;
"(dev %i, dev sts 0x%2x, sch sts 0x%2x)"
;
raw
->
msg_dstat
=
dstat
;
raw
->
msg_dstat
=
dstat
;
raw
->
msg_cstat
=
cstat
;
raw
->
msg_cstat
=
cstat
;
raw3215_sched_bh
(
raw
);
raw3215_sched_tasklet
(
raw
);
}
}
return
;
return
;
}
}
...
@@ -868,7 +865,6 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp)
...
@@ -868,7 +865,6 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp)
kfree
(
raw
);
kfree
(
raw
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
INIT_WORK
(
&
raw
->
tqueue
,
raw3215_softint
,
raw
);
init_waitqueue_head
(
&
raw
->
empty_wait
);
init_waitqueue_head
(
&
raw
->
empty_wait
);
raw3215
[
line
]
=
raw
;
raw3215
[
line
]
=
raw
;
}
}
...
@@ -1110,7 +1106,9 @@ void __init con3215_init(void)
...
@@ -1110,7 +1106,9 @@ void __init con3215_init(void)
/* Find the first console */
/* Find the first console */
raw
->
irq
=
irq
;
raw
->
irq
=
irq
;
raw
->
flags
|=
RAW3215_FIXED
;
raw
->
flags
|=
RAW3215_FIXED
;
INIT_WORK
(
&
raw
->
tqueue
,
raw3215_softint
,
raw
);
tasklet_init
(
&
raw
->
tasklet
,
(
void
(
*
)(
unsigned
long
))
raw3215_tasklet
,
(
unsigned
long
)
raw
);
init_waitqueue_head
(
&
raw
->
empty_wait
);
init_waitqueue_head
(
&
raw
->
empty_wait
);
/* Request the console irq */
/* Request the console irq */
...
...
drivers/s390/char/tubfs.c
View file @
4a975df3
...
@@ -226,7 +226,7 @@ fs3270_io(tub_t *tubp, ccw1_t *ccwp)
...
@@ -226,7 +226,7 @@ fs3270_io(tub_t *tubp, ccw1_t *ccwp)
}
}
/*
/*
* fs3270_
bh
(tubp) -- Perform back-half processing
* fs3270_
tasklet
(tubp) -- Perform back-half processing
*/
*/
static
void
static
void
fs3270_tasklet
(
unsigned
long
data
)
fs3270_tasklet
(
unsigned
long
data
)
...
@@ -256,17 +256,18 @@ fs3270_tasklet(unsigned long data)
...
@@ -256,17 +256,18 @@ fs3270_tasklet(unsigned long data)
}
}
/*
/*
* fs3270_sched_
bh
(tubp) -- Schedule the back half
* fs3270_sched_
tasklet
(tubp) -- Schedule the back half
* Irq lock must be held on entry and remains held on exit.
* Irq lock must be held on entry and remains held on exit.
*/
*/
static
void
static
void
fs3270_sched_
bh
(
tub_t
*
tubp
)
fs3270_sched_
tasklet
(
tub_t
*
tubp
)
{
{
if
(
tubp
->
flags
&
TUB_BHPENDING
)
if
(
tubp
->
flags
&
TUB_BHPENDING
)
return
;
return
;
tubp
->
flags
|=
TUB_BHPENDING
;
tubp
->
flags
|=
TUB_BHPENDING
;
INIT_WORK
(
&
tubp
->
tqueue
,
fs3270_bh
,
tubp
);
tasklet_init
(
&
tubp
->
tasklet
,
fs3270_tasklet
,
schedule_work
(
&
tubp
->
tqueue
);
(
unsigned
long
)
tubp
);
tasklet_schedule
(
&
tubp
->
tasklet
);
}
}
/*
/*
...
@@ -316,7 +317,7 @@ fs3270_int(tub_t *tubp, devstat_t *dsp)
...
@@ -316,7 +317,7 @@ fs3270_int(tub_t *tubp, devstat_t *dsp)
tubp
->
flags
&=
~
TUB_WORKING
;
tubp
->
flags
&=
~
TUB_WORKING
;
if
((
tubp
->
flags
&
TUB_WORKING
)
==
0
)
if
((
tubp
->
flags
&
TUB_WORKING
)
==
0
)
fs3270_sched_
bh
(
tubp
);
fs3270_sched_
tasklet
(
tubp
);
}
}
/*
/*
...
...
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