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
50a34dbd
Commit
50a34dbd
authored
Mar 24, 2006
by
Kyle McMartin
Committed by
Kyle McMartin
Mar 30, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PARISC] Add PREEMPT support
Signed-off-by:
Kyle McMartin
<
kyle@parisc-linux.org
>
parent
bc8846c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
9 deletions
+39
-9
arch/parisc/Kconfig
arch/parisc/Kconfig
+1
-5
arch/parisc/kernel/entry.S
arch/parisc/kernel/entry.S
+36
-3
include/asm-parisc/thread_info.h
include/asm-parisc/thread_info.h
+2
-1
No files found.
arch/parisc/Kconfig
View file @
50a34dbd
...
@@ -177,14 +177,10 @@ config ARCH_DISCONTIGMEM_DEFAULT
...
@@ -177,14 +177,10 @@ config ARCH_DISCONTIGMEM_DEFAULT
def_bool y
def_bool y
depends on ARCH_DISCONTIGMEM_ENABLE
depends on ARCH_DISCONTIGMEM_ENABLE
source "kernel/Kconfig.preempt"
source "kernel/Kconfig.hz"
source "kernel/Kconfig.hz"
source "mm/Kconfig"
source "mm/Kconfig"
config PREEMPT
bool
# bool "Preemptible Kernel"
default n
config COMPAT
config COMPAT
def_bool y
def_bool y
depends on 64BIT
depends on 64BIT
...
...
arch/parisc/kernel/entry.S
View file @
50a34dbd
...
@@ -1014,14 +1014,21 @@ intr_restore:
...
@@ -1014,14 +1014,21 @@ intr_restore:
nop
nop
nop
nop
#ifndef CONFIG_PREEMPT
# define intr_do_preempt intr_restore
#endif /* !CONFIG_PREEMPT */
.
import
schedule
,
code
.
import
schedule
,
code
intr_do_resched
:
intr_do_resched
:
/
*
Only
do
reschedule
if
we
are
returning
to
user
space
*/
/
*
Only
call
schedule
on
return
to
userspace
.
If
we
're returning
*
to
kernel
space
,
we
may
schedule
if
CONFIG_PREEMPT
,
otherwise
*
we
jump
back
to
intr_restore
.
*/
LDREG
PT_IASQ0
(%
r16
),
%
r20
LDREG
PT_IASQ0
(%
r16
),
%
r20
CMPIB
=
0
,%
r20
,
intr_restore
/*
backward
*/
CMPIB
=
0
,
%
r20
,
intr_do_preempt
nop
nop
LDREG
PT_IASQ1
(%
r16
),
%
r20
LDREG
PT_IASQ1
(%
r16
),
%
r20
CMPIB
=
0
,%
r20
,
intr_restore
/*
backward
*/
CMPIB
=
0
,
%
r20
,
intr_do_preempt
nop
nop
#ifdef CONFIG_64BIT
#ifdef CONFIG_64BIT
...
@@ -1037,6 +1044,32 @@ intr_do_resched:
...
@@ -1037,6 +1044,32 @@ intr_do_resched:
#endif
#endif
ldo
R
%
intr_check_sig
(%
r2
),
%
r2
ldo
R
%
intr_check_sig
(%
r2
),
%
r2
/
*
preempt
the
current
task
on
returning
to
kernel
*
mode
from
an
interrupt
,
iff
need_resched
is
set
,
*
and
preempt_count
is
0
.
otherwise
,
we
continue
on
*
our
merry
way
back
to
the
current
running
task
.
*/
#ifdef CONFIG_PREEMPT
.
import
preempt_schedule_irq
,
code
intr_do_preempt
:
rsm
PSW_SM_I
,
%
r0
/*
disable
interrupts
*/
/
*
current_thread_info
()->
preempt_count
*/
mfctl
%
cr30
,
%
r1
LDREG
TI_PRE_COUNT
(%
r1
),
%
r19
CMPIB
<>
0
,
%
r19
,
intr_restore
/*
if
preempt_count
>
0
*/
nop
/*
prev
insn
branched
backwards
*/
/
*
check
if
we
interrupted
a
critical
path
*/
LDREG
PT_PSW
(%
r16
),
%
r20
bb
,<,
n
%
r20
,
31
-
PSW_SM_I
,
intr_restore
nop
BL
preempt_schedule_irq
,
%
r2
nop
b
intr_restore
/*
ssm
PSW_SM_I
done
by
intr_restore
*/
#endif /* CONFIG_PREEMPT */
.
import
do_signal
,
code
.
import
do_signal
,
code
intr_do_signal
:
intr_do_signal
:
...
...
include/asm-parisc/thread_info.h
View file @
50a34dbd
...
@@ -49,7 +49,8 @@ struct thread_info {
...
@@ -49,7 +49,8 @@ struct thread_info {
#endif
/* !__ASSEMBLY */
#endif
/* !__ASSEMBLY */
#define PREEMPT_ACTIVE 0x10000000
#define PREEMPT_ACTIVE_BIT 28
#define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT)
/*
/*
* thread information flags
* thread information flags
...
...
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