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
f95ae0b0
Commit
f95ae0b0
authored
Dec 27, 2002
by
Geert Uytterhoeven
Committed by
Linus Torvalds
Dec 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Mac/m68k core local_irq*() updates
Convert core Mac/m68k code to new local_irq*() framework
parent
45450bff
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
44 deletions
+35
-44
arch/m68k/mac/config.c
arch/m68k/mac/config.c
+3
-4
arch/m68k/mac/iop.c
arch/m68k/mac/iop.c
+4
-5
arch/m68k/mac/macboing.c
arch/m68k/mac/macboing.c
+6
-9
arch/m68k/mac/macints.c
arch/m68k/mac/macints.c
+13
-15
arch/m68k/mac/misc.c
arch/m68k/mac/misc.c
+9
-11
No files found.
arch/m68k/mac/config.c
View file @
f95ae0b0
...
...
@@ -181,11 +181,10 @@ int __init mac_parse_bootinfo(const struct bi_record *record)
static
void
mac_cache_card_flush
(
int
writeback
)
{
unsigned
long
cpu_flags
;
save_flags
(
cpu_flags
);
cli
();
unsigned
long
flags
;
local_irq_save
(
flags
);
via_flush_cache
();
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
}
void
__init
config_mac
(
void
)
...
...
arch/m68k/mac/iop.c
View file @
f95ae0b0
...
...
@@ -212,20 +212,19 @@ static int iop_alive(volatile struct mac_iop *iop)
static
struct
iop_msg
*
iop_alloc_msg
(
void
)
{
int
i
;
u
long
cpu_
flags
;
u
nsigned
long
flags
;
save_flags
(
cpu_flags
);
cli
();
local_irq_save
(
flags
);
for
(
i
=
0
;
i
<
NUM_IOP_MSGS
;
i
++
)
{
if
(
iop_msg_pool
[
i
].
status
==
IOP_MSGSTATUS_UNUSED
)
{
iop_msg_pool
[
i
].
status
=
IOP_MSGSTATUS_WAITING
;
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
return
&
iop_msg_pool
[
i
];
}
}
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
return
NULL
;
}
...
...
arch/m68k/mac/macboing.c
View file @
f95ae0b0
...
...
@@ -187,8 +187,7 @@ void mac_mksound( unsigned int freq, unsigned int length )
return
;
}
save_flags
(
flags
);
cli
();
local_irq_save
(
flags
);
del_timer
(
&
mac_sound_timer
);
...
...
@@ -210,7 +209,7 @@ void mac_mksound( unsigned int freq, unsigned int length )
mac_sound_timer
.
expires
=
jiffies
+
length
;
add_timer
(
&
mac_sound_timer
);
restore_flags
(
flags
);
local_irq_restore
(
flags
);
}
/*
...
...
@@ -240,8 +239,7 @@ static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsig
mac_bell_phasepersample
=
(
freq
*
sizeof
(
mac_asc_wave_tab
)
)
/
mac_asc_samplespersec
;
/* this is reasonably big for small frequencies */
save_flags
(
flags
);
cli
();
local_irq_save
(
flags
);
/* set the volume */
mac_asc_regs
[
0x806
]
=
volume
;
...
...
@@ -263,7 +261,7 @@ static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsig
mac_sound_timer
.
expires
=
jiffies
+
1
;
add_timer
(
&
mac_sound_timer
);
restore_flags
(
flags
);
local_irq_restore
(
flags
);
}
/*
...
...
@@ -283,8 +281,7 @@ static void mac_quadra_ring_bell( unsigned long ignored )
* ...and the possibility to use a real sample (a boingy noise, maybe...)
*/
save_flags
(
flags
);
cli
();
local_irq_save
(
flags
);
del_timer
(
&
mac_sound_timer
);
...
...
@@ -301,7 +298,7 @@ static void mac_quadra_ring_bell( unsigned long ignored )
else
mac_asc_regs
[
0x801
]
=
0
;
restore_flags
(
flags
);
local_irq_restore
(
flags
);
}
/*
...
...
arch/m68k/mac/macints.c
View file @
f95ae0b0
...
...
@@ -276,15 +276,14 @@ void mac_init_IRQ(void)
static
inline
void
mac_insert_irq
(
irq_node_t
**
list
,
irq_node_t
*
node
)
{
unsigned
long
cpu_
flags
;
unsigned
long
flags
;
irq_node_t
*
cur
;
if
(
!
node
->
dev_id
)
printk
(
"%s: Warning: dev_id of %s is zero
\n
"
,
__FUNCTION__
,
node
->
devname
);
save_flags
(
cpu_flags
);
cli
();
local_irq_save
(
flags
);
cur
=
*
list
;
...
...
@@ -309,27 +308,26 @@ static inline void mac_insert_irq(irq_node_t **list, irq_node_t *node)
node
->
next
=
cur
;
*
list
=
node
;
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
}
static
inline
void
mac_delete_irq
(
irq_node_t
**
list
,
void
*
dev_id
)
{
unsigned
long
cpu_
flags
;
unsigned
long
flags
;
irq_node_t
*
node
;
save_flags
(
cpu_flags
);
cli
();
local_irq_save
(
flags
);
for
(
node
=
*
list
;
node
;
list
=
&
node
->
next
,
node
=
*
list
)
{
if
(
node
->
dev_id
==
dev_id
)
{
*
list
=
node
->
next
;
/* Mark it as free. */
node
->
handler
=
NULL
;
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
return
;
}
}
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
printk
(
"%s: tried to remove invalid irq
\n
"
,
__FUNCTION__
);
}
...
...
@@ -343,7 +341,7 @@ static inline void mac_delete_irq(irq_node_t **list, void *dev_id)
void
mac_do_irq_list
(
int
irq
,
struct
pt_regs
*
fp
)
{
irq_node_t
*
node
,
*
slow_nodes
;
unsigned
long
cpu_
flags
;
unsigned
long
flags
;
kstat_cpu
(
0
).
irqs
[
irq
]
++
;
...
...
@@ -360,8 +358,8 @@ void mac_do_irq_list(int irq, struct pt_regs *fp)
node
=
node
->
next
)
node
->
handler
(
irq
,
node
->
dev_id
,
fp
);
if
(
!
node
)
return
;
save_flags
(
cpu_
flags
);
restore_flags
((
cpu_
flags
&
~
0x0700
)
|
(
fp
->
sr
&
0x0700
));
local_save_flags
(
flags
);
local_irq_restore
((
flags
&
~
0x0700
)
|
(
fp
->
sr
&
0x0700
));
/* if slow handlers exists, serve them now */
slow_nodes
=
node
;
for
(;
node
;
node
=
node
->
next
)
{
...
...
@@ -735,15 +733,15 @@ void mac_scc_dispatch(int irq, void *dev_id, struct pt_regs *regs)
{
volatile
unsigned
char
*
scc
=
(
unsigned
char
*
)
mac_bi_data
.
sccbase
+
2
;
unsigned
char
reg
;
unsigned
long
cpu_
flags
;
unsigned
long
flags
;
/* Read RR3 from the chip. Always do this on channel A */
/* This must be an atomic operation so disable irqs. */
save_flags
(
cpu_flags
);
cli
(
);
local_irq_save
(
flags
);
*
scc
=
3
;
reg
=
*
scc
;
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
/* Now dispatch. Bits 0-2 are for channel B and */
/* bits 3-5 are for channel A. We can safely */
...
...
arch/m68k/mac/misc.c
View file @
f95ae0b0
...
...
@@ -165,11 +165,10 @@ static void via_pram_writebyte(__u8 data)
static
void
via_pram_command
(
int
command
,
__u8
*
data
)
{
unsigned
long
cpu_
flags
;
unsigned
long
flags
;
int
is_read
;
save_flags
(
cpu_flags
);
cli
();
local_irq_save
(
flags
);
/* Enable the RTC and make sure the strobe line is high */
...
...
@@ -193,7 +192,7 @@ static void via_pram_command(int command, __u8 *data)
via1
[
vBufB
]
|=
VIA1B_vRTCEnb
;
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
}
static
__u8
via_read_pram
(
int
offset
)
...
...
@@ -405,7 +404,7 @@ void mac_poweroff(void)
pmu_shutdown
();
#endif
}
sti
();
local_irq_enable
();
printk
(
"It is now safe to turn off your Macintosh.
\n
"
);
while
(
1
);
}
...
...
@@ -413,7 +412,7 @@ void mac_poweroff(void)
void
mac_reset
(
void
)
{
if
(
macintosh_config
->
adb_type
==
MAC_ADB_II
)
{
unsigned
long
cpu_
flags
;
unsigned
long
flags
;
/* need ROMBASE in booter */
/* indeed, plus need to MAP THE ROM !! */
...
...
@@ -429,12 +428,11 @@ void mac_reset(void)
* MSch: Machines known to crash on ROM reset ...
*/
}
else
{
save_flags
(
cpu_flags
);
cli
();
local_irq_save
(
flags
);
rom_reset
();
restore_flags
(
cpu_
flags
);
local_irq_restore
(
flags
);
}
#ifdef CONFIG_ADB_CUDA
}
else
if
(
macintosh_config
->
adb_type
==
MAC_ADB_CUDA
)
{
...
...
@@ -459,7 +457,7 @@ void mac_reset(void)
unsigned
long
virt
=
(
unsigned
long
)
mac_reset
;
unsigned
long
phys
=
virt_to_phys
(
mac_reset
);
unsigned
long
offset
=
phys
-
virt
;
cli
();
/* lets not screw this up, ok? */
local_irq_disable
();
/* lets not screw this up, ok? */
__asm__
__volatile__
(
".chip 68030
\n\t
"
"pmove %0,%/tt0
\n\t
"
".chip 68k"
...
...
@@ -495,7 +493,7 @@ void mac_reset(void)
}
/* should never get here */
sti
();
local_irq_enable
();
printk
(
"Restart failed. Please restart manually.
\n
"
);
while
(
1
);
}
...
...
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