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
91594f8a
Commit
91594f8a
authored
Apr 07, 2003
by
Alan Cox
Committed by
Linus Torvalds
Apr 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] make vm86 machine independant using new headers
parent
0a917d84
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
arch/i386/kernel/vm86.c
arch/i386/kernel/vm86.c
+5
-4
No files found.
arch/i386/kernel/vm86.c
View file @
91594f8a
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
*
*
*/
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/sched.h>
...
@@ -725,7 +726,7 @@ static inline void free_vm86_irq(int irqnumber)
...
@@ -725,7 +726,7 @@ static inline void free_vm86_irq(int irqnumber)
void
release_x86_irqs
(
struct
task_struct
*
task
)
void
release_x86_irqs
(
struct
task_struct
*
task
)
{
{
int
i
;
int
i
;
for
(
i
=
3
;
i
<
16
;
i
++
)
for
(
i
=
FIRST_VM86_IRQ
;
i
<=
LAST_VM86_IRQ
;
i
++
)
if
(
vm86_irqs
[
i
].
tsk
==
task
)
if
(
vm86_irqs
[
i
].
tsk
==
task
)
free_vm86_irq
(
i
);
free_vm86_irq
(
i
);
}
}
...
@@ -735,7 +736,7 @@ static inline int get_and_reset_irq(int irqnumber)
...
@@ -735,7 +736,7 @@ static inline int get_and_reset_irq(int irqnumber)
int
bit
;
int
bit
;
unsigned
long
flags
;
unsigned
long
flags
;
if
(
(
irqnumber
<
3
)
||
(
irqnumber
>
15
)
)
return
0
;
if
(
invalid_vm86_irq
(
irqnumber
)
)
return
0
;
if
(
vm86_irqs
[
irqnumber
].
tsk
!=
current
)
return
0
;
if
(
vm86_irqs
[
irqnumber
].
tsk
!=
current
)
return
0
;
spin_lock_irqsave
(
&
irqbits_lock
,
flags
);
spin_lock_irqsave
(
&
irqbits_lock
,
flags
);
bit
=
irqbits
&
(
1
<<
irqnumber
);
bit
=
irqbits
&
(
1
<<
irqnumber
);
...
@@ -760,7 +761,7 @@ static int do_vm86_irq_handling(int subfunction, int irqnumber)
...
@@ -760,7 +761,7 @@ static int do_vm86_irq_handling(int subfunction, int irqnumber)
int
irq
=
irqnumber
&
255
;
int
irq
=
irqnumber
&
255
;
if
(
!
capable
(
CAP_SYS_ADMIN
))
return
-
EPERM
;
if
(
!
capable
(
CAP_SYS_ADMIN
))
return
-
EPERM
;
if
(
!
((
1
<<
sig
)
&
ALLOWED_SIGS
))
return
-
EPERM
;
if
(
!
((
1
<<
sig
)
&
ALLOWED_SIGS
))
return
-
EPERM
;
if
(
(
irq
<
3
)
||
(
irq
>
15
)
)
return
-
EPERM
;
if
(
invalid_vm86_irq
(
irq
)
)
return
-
EPERM
;
if
(
vm86_irqs
[
irq
].
tsk
)
return
-
EPERM
;
if
(
vm86_irqs
[
irq
].
tsk
)
return
-
EPERM
;
ret
=
request_irq
(
irq
,
&
irq_handler
,
0
,
VM86_IRQNAME
,
0
);
ret
=
request_irq
(
irq
,
&
irq_handler
,
0
,
VM86_IRQNAME
,
0
);
if
(
ret
)
return
ret
;
if
(
ret
)
return
ret
;
...
@@ -769,7 +770,7 @@ static int do_vm86_irq_handling(int subfunction, int irqnumber)
...
@@ -769,7 +770,7 @@ static int do_vm86_irq_handling(int subfunction, int irqnumber)
return
irq
;
return
irq
;
}
}
case
VM86_FREE_IRQ
:
{
case
VM86_FREE_IRQ
:
{
if
(
(
irqnumber
<
3
)
||
(
irqnumber
>
15
)
)
return
-
EPERM
;
if
(
invalid_vm86_irq
(
irqnumber
)
)
return
-
EPERM
;
if
(
!
vm86_irqs
[
irqnumber
].
tsk
)
return
0
;
if
(
!
vm86_irqs
[
irqnumber
].
tsk
)
return
0
;
if
(
vm86_irqs
[
irqnumber
].
tsk
!=
current
)
return
-
EPERM
;
if
(
vm86_irqs
[
irqnumber
].
tsk
!=
current
)
return
-
EPERM
;
free_vm86_irq
(
irqnumber
);
free_vm86_irq
(
irqnumber
);
...
...
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