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
07843e17
Commit
07843e17
authored
May 24, 2003
by
Geert Uytterhoeven
Committed by
Linus Torvalds
May 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] M68k IRQ API updates [11/20]
M68k Sun-3: Update to the new irq API (from Roman Zippel and me) [11/20]
parent
bfe278e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
18 deletions
+21
-18
arch/m68k/sun3/config.c
arch/m68k/sun3/config.c
+2
-2
arch/m68k/sun3/sun3ints.c
arch/m68k/sun3/sun3ints.c
+15
-12
include/asm-m68k/sun3ints.h
include/asm-m68k/sun3ints.h
+4
-4
No files found.
arch/m68k/sun3/config.c
View file @
07843e17
...
...
@@ -37,7 +37,7 @@ char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
extern
unsigned
long
sun3_gettimeoffset
(
void
);
extern
int
show_sun3_interrupts
(
struct
seq_file
*
,
void
*
);
extern
void
sun3_sched_init
(
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
));
extern
void
sun3_sched_init
(
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
));
extern
void
sun3_get_model
(
char
*
model
);
extern
void
idprom_init
(
void
);
extern
int
sun3_hwclk
(
int
set
,
struct
rtc_time
*
t
);
...
...
@@ -174,7 +174,7 @@ void __init config_sun3(void)
sun3_bootmem_alloc
(
memory_start
,
memory_end
);
}
void
__init
sun3_sched_init
(
void
(
*
timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
))
void
__init
sun3_sched_init
(
irqreturn_t
(
*
timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
))
{
sun3_disable_interrupts
();
intersil_clock
->
cmd_reg
=
(
INTERSIL_RUN
|
INTERSIL_INT_DISABLE
|
INTERSIL_24H_MODE
);
...
...
arch/m68k/sun3/sun3ints.c
View file @
07843e17
...
...
@@ -18,7 +18,7 @@
#include <linux/seq_file.h>
extern
void
sun3_leds
(
unsigned
char
);
static
void
sun3_inthandle
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
);
static
irqreturn_t
sun3_inthandle
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
);
void
sun3_disable_interrupts
(
void
)
{
...
...
@@ -64,15 +64,16 @@ inline void sun3_do_irq(int irq, struct pt_regs *fp)
*
sun3_intreg
|=
(
1
<<
irq
);
}
static
void
sun3_int7
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
static
irqreturn_t
sun3_int7
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
{
sun3_do_irq
(
irq
,
fp
);
if
(
!
(
kstat_cpu
(
0
).
irqs
[
SYS_IRQS
+
irq
]
%
2000
))
sun3_leds
(
led_pattern
[(
kstat_cpu
(
0
).
irqs
[
SYS_IRQS
+
irq
]
%
16000
)
/
2000
]);
return
IRQ_HANDLED
;
}
static
void
sun3_int5
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
static
irqreturn_t
sun3_int5
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
{
kstat_cpu
(
0
).
irqs
[
SYS_IRQS
+
irq
]
++
;
#ifdef CONFIG_SUN3
...
...
@@ -87,11 +88,12 @@ static void sun3_int5(int irq, void *dev_id, struct pt_regs *fp)
if
(
!
(
kstat_cpu
(
0
).
irqs
[
SYS_IRQS
+
irq
]
%
20
))
sun3_leds
(
led_pattern
[(
kstat_cpu
(
0
).
irqs
[
SYS_IRQS
+
irq
]
%
160
)
/
20
]);
return
IRQ_HANDLED
;
}
/* handle requested ints, excepting 5 and 7, which always do the same
thing */
void
(
*
sun3_default_handler
[
SYS_IRQS
])(
int
,
void
*
,
struct
pt_regs
*
)
=
{
irqreturn_t
(
*
sun3_default_handler
[
SYS_IRQS
])(
int
,
void
*
,
struct
pt_regs
*
)
=
{
sun3_inthandle
,
sun3_inthandle
,
sun3_inthandle
,
sun3_inthandle
,
sun3_inthandle
,
sun3_int5
,
sun3_inthandle
,
sun3_int7
};
...
...
@@ -99,10 +101,10 @@ void (*sun3_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
static
const
char
*
dev_names
[
SYS_IRQS
]
=
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
"timer"
,
NULL
,
"int7 handler"
};
static
void
*
dev_ids
[
SYS_IRQS
];
static
void
(
*
sun3_inthandler
[
SYS_IRQS
])(
int
,
void
*
,
struct
pt_regs
*
)
=
{
static
irqreturn_t
(
*
sun3_inthandler
[
SYS_IRQS
])(
int
,
void
*
,
struct
pt_regs
*
)
=
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
sun3_int5
,
NULL
,
sun3_int7
};
static
void
(
*
sun3_vechandler
[
SUN3_INT_VECS
])(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
(
*
sun3_vechandler
[
SUN3_INT_VECS
])(
int
,
void
*
,
struct
pt_regs
*
);
static
void
*
vec_ids
[
SUN3_INT_VECS
];
static
const
char
*
vec_names
[
SUN3_INT_VECS
];
static
int
vec_ints
[
SUN3_INT_VECS
];
...
...
@@ -124,7 +126,7 @@ int show_sun3_interrupts(struct seq_file *p, void *v)
return
0
;
}
static
void
sun3_inthandle
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
static
irqreturn_t
sun3_inthandle
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
{
if
(
sun3_inthandler
[
irq
]
==
NULL
)
panic
(
"bad interrupt %d received (id %p)
\n
"
,
irq
,
dev_id
);
...
...
@@ -133,11 +135,13 @@ static void sun3_inthandle(int irq, void *dev_id, struct pt_regs *fp)
*
sun3_intreg
&=
~
(
1
<<
irq
);
sun3_inthandler
[
irq
](
irq
,
dev_ids
[
irq
],
fp
);
return
IRQ_HANDLED
;
}
static
void
sun3_vec255
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
static
irqreturn_t
sun3_vec255
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
{
// intersil_clear();
return
IRQ_HANDLED
;
}
void
sun3_init_IRQ
(
void
)
...
...
@@ -159,7 +163,7 @@ void sun3_init_IRQ(void)
sun3_vechandler
[
191
]
=
sun3_vec255
;
}
int
sun3_request_irq
(
unsigned
int
irq
,
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
int
sun3_request_irq
(
unsigned
int
irq
,
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
flags
,
const
char
*
devname
,
void
*
dev_id
)
{
...
...
@@ -228,7 +232,7 @@ void sun3_free_irq(unsigned int irq, void *dev_id)
}
}
void
sun3_process_int
(
int
irq
,
struct
pt_regs
*
regs
)
irqreturn_t
sun3_process_int
(
int
irq
,
struct
pt_regs
*
regs
)
{
if
((
irq
>=
64
)
&&
(
irq
<=
255
))
{
...
...
@@ -239,8 +243,7 @@ void sun3_process_int(int irq, struct pt_regs *regs)
panic
(
"bad interrupt vector %d received
\n
"
,
irq
);
vec_ints
[
vec
]
++
;
sun3_vechandler
[
vec
](
irq
,
vec_ids
[
vec
],
regs
);
return
;
return
sun3_vechandler
[
vec
](
irq
,
vec_ids
[
vec
],
regs
);
}
else
{
panic
(
"sun3_process_int: unable to handle interrupt vector %d
\n
"
,
irq
);
...
...
include/asm-m68k/sun3ints.h
View file @
07843e17
...
...
@@ -26,17 +26,17 @@
void
sun3_enable_irq
(
unsigned
int
irq
);
void
sun3_disable_irq
(
unsigned
int
irq
);
int
sun3_request_irq
(
unsigned
int
irq
,
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
flags
,
const
char
*
devname
,
void
*
dev_id
);
extern
void
sun3_init_IRQ
(
void
);
extern
void
(
*
sun3_default_handler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
extern
void
(
*
sun3_inthandler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
extern
irqreturn_t
(
*
sun3_default_handler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
extern
irqreturn_t
(
*
sun3_inthandler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
extern
void
sun3_free_irq
(
unsigned
int
irq
,
void
*
dev_id
);
extern
void
sun3_enable_interrupts
(
void
);
extern
void
sun3_disable_interrupts
(
void
);
extern
int
show_sun3_interrupts
(
struct
seq_file
*
,
void
*
);
extern
void
sun3_process_int
(
int
,
struct
pt_regs
*
);
extern
irqreturn_t
sun3_process_int
(
int
,
struct
pt_regs
*
);
extern
volatile
unsigned
char
*
sun3_intreg
;
/* master list of VME vectors -- don't fuck with this */
...
...
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