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
1bfaf6af
Commit
1bfaf6af
authored
Jul 23, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPARC64: Kill more cli/sti use.
parent
7475d10b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
35 deletions
+22
-35
arch/sparc64/kernel/etrap.S
arch/sparc64/kernel/etrap.S
+1
-9
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/irq.c
+1
-1
arch/sparc64/kernel/process.c
arch/sparc64/kernel/process.c
+0
-12
arch/sparc64/kernel/rtrap.S
arch/sparc64/kernel/rtrap.S
+1
-6
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/setup.c
+8
-2
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/smp.c
+4
-2
arch/sparc64/kernel/unaligned.c
arch/sparc64/kernel/unaligned.c
+7
-3
No files found.
arch/sparc64/kernel/etrap.S
View file @
1bfaf6af
...
...
@@ -27,17 +27,9 @@
.
text
.
align
64
.
globl
etrap
,
etrap_irq
,
etraptl1
#ifdef CONFIG_PREEMPT
etrap_irq
:
ldsw
[%
g6
+
TI_PRE_COUNT
],
%
g1
add
%
g1
,
1
,
%
g1
ba
,
pt
%
xcc
,
etrap_irq2
stw
%
g1
,
[%
g6
+
TI_PRE_COUNT
]
#endif
etrap
:
rdpr
%
pil
,
%
g2
!
Single
Group
#ifndef CONFIG_PREEMPT
etrap_irq
:
#endif
etrap_irq2
:
rdpr
%
tstate
,
%
g1
!
Single
Group
rdpr
%
tstate
,
%
g1
!
Single
Group
sllx
%
g2
,
20
,
%
g3
!
IEU0
Group
andcc
%
g1
,
TSTATE_PRIV
,
%
g0
!
IEU1
or
%
g1
,
%
g3
,
%
g1
!
IEU0
Group
...
...
arch/sparc64/kernel/irq.c
View file @
1bfaf6af
...
...
@@ -1055,7 +1055,7 @@ void init_timers(void (*cfunc)(int, void *, struct pt_regs *),
:
/* no outputs */
:
"r"
(
pstate
));
__sti
();
local_irq_enable
();
}
#ifdef CONFIG_SMP
...
...
arch/sparc64/kernel/process.c
View file @
1bfaf6af
...
...
@@ -107,18 +107,6 @@ int cpu_idle(void)
#endif
#ifdef CONFIG_PREEMPT
void
kpreempt_maybe
(
void
)
{
int
cpu
=
smp_processor_id
();
if
(
local_irq_count
(
cpu
)
==
0
&&
local_bh_count
(
cpu
)
==
0
&&
test_thread_flag
(
TIF_NEED_RESCHED
))
schedule
();
}
#endif
extern
char
reboot_command
[];
#ifdef CONFIG_SUN_CONSOLE
...
...
arch/sparc64/kernel/rtrap.S
View file @
1bfaf6af
...
...
@@ -151,11 +151,6 @@ __handle_signal:
.
align
64
.
globl
rtrap_irq
,
rtrap_clr_l6
,
rtrap
,
irqsz_patchme
,
rtrap_xcall
rtrap_irq
:
#ifdef CONFIG_PREEMPT
ldsw
[%
g6
+
TI_PRE_COUNT
],
%
l0
sub
%
l0
,
1
,
%
l0
stw
%
l0
,
[%
g6
+
TI_PRE_COUNT
]
#endif
rtrap_clr_l6
:
clr
%
l6
rtrap
:
ldub
[%
g6
+
TI_CPU
],
%
l0
sethi
%
hi
(
irq_stat
),
%
l2
!
&
softirq_active
...
...
@@ -276,7 +271,7 @@ to_kernel:
brnz
%
l5
,
kern_fpucheck
sethi
%
hi
(
PREEMPT_ACTIVE
),
%
l6
stw
%
l6
,
[%
g6
+
TI_PRE_COUNT
]
call
kpreempt_mayb
e
call
schedul
e
nop
ba
,
pt
%
xcc
,
rtrap
stw
%
g0
,
[%
g6
+
TI_PRE_COUNT
]
...
...
arch/sparc64/kernel/setup.c
View file @
1bfaf6af
...
...
@@ -108,7 +108,12 @@ int prom_callback(long *args)
* case, the cpu is marked as in-interrupt. Drop IRQ locks.
*/
irq_exit
();
save_and_cli
(
flags
);
/* XXX Revisit the locking here someday. This is a debugging
* XXX feature so it isnt all that critical. -DaveM
*/
local_irq_save
(
flags
);
spin_unlock
(
&
prom_entry_lock
);
cons
=
console_drivers
;
while
(
cons
)
{
...
...
@@ -301,7 +306,8 @@ int prom_callback(long *args)
register_console
(
cons
);
}
spin_lock
(
&
prom_entry_lock
);
restore_flags
(
flags
);
local_irq_restore
(
flags
);
/*
* Restore in-interrupt status for a resume from obp.
*/
...
...
arch/sparc64/kernel/smp.c
View file @
1bfaf6af
...
...
@@ -1294,6 +1294,8 @@ static void __init smp_tune_scheduling(void)
}
/* /proc/profile writes can call this, don't __init it please. */
static
spinlock_t
prof_setup_lock
=
SPIN_LOCK_UNLOCKED
;
int
setup_profiling_timer
(
unsigned
int
multiplier
)
{
unsigned
long
flags
;
...
...
@@ -1302,11 +1304,11 @@ int setup_profiling_timer(unsigned int multiplier)
if
((
!
multiplier
)
||
(
timer_tick_offset
/
multiplier
)
<
1000
)
return
-
EINVAL
;
s
ave_and_cli
(
flags
);
s
pin_lock_irqsave
(
&
prof_setup_lock
,
flags
);
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
prof_multiplier
(
i
)
=
multiplier
;
current_tick_offset
=
(
timer_tick_offset
/
multiplier
);
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
prof_setup_lock
,
flags
);
return
0
;
}
arch/sparc64/kernel/unaligned.c
View file @
1bfaf6af
...
...
@@ -320,15 +320,19 @@ __asm__ __volatile__ ( \
store_common(dst_addr, size, src_val, asi, errh); \
})
/* XXX Need to capture/release other cpu's for SMP around this. */
extern
void
smp_capture
(
void
);
extern
void
smp_release
(
void
);
#define do_atomic(srcdest_reg, mem, errh) ({ \
unsigned long flags, tmp; \
\
save_and_cli(flags); \
smp_capture(); \
local_irq_save(flags); \
tmp = *srcdest_reg; \
do_integer_load(srcdest_reg, 4, mem, 0, errh); \
store_common(mem, 4, &tmp, errh); \
restore_flags(flags); \
local_irq_restore(flags); \
smp_release(); \
})
static
inline
void
advance
(
struct
pt_regs
*
regs
)
...
...
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