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
23ae2fde
Commit
23ae2fde
authored
Apr 25, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: update ppc64 to new IRQ API from Andrew Morton
parent
8b71770a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
14 deletions
+24
-14
arch/ppc64/kernel/irq.c
arch/ppc64/kernel/irq.c
+4
-2
arch/ppc64/kernel/open_pic.c
arch/ppc64/kernel/open_pic.c
+3
-1
arch/ppc64/kernel/open_pic_defs.h
arch/ppc64/kernel/open_pic_defs.h
+2
-1
arch/ppc64/kernel/ras.c
arch/ppc64/kernel/ras.c
+11
-9
arch/ppc64/kernel/xics.c
arch/ppc64/kernel/xics.c
+4
-1
No files found.
arch/ppc64/kernel/irq.c
View file @
23ae2fde
...
@@ -212,7 +212,8 @@ do_free_irq(int irq, void* dev_id)
...
@@ -212,7 +212,8 @@ do_free_irq(int irq, void* dev_id)
return
-
ENOENT
;
return
-
ENOENT
;
}
}
int
request_irq
(
unsigned
int
irq
,
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
int
request_irq
(
unsigned
int
irq
,
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
irqflags
,
const
char
*
devname
,
void
*
dev_id
)
unsigned
long
irqflags
,
const
char
*
devname
,
void
*
dev_id
)
{
{
struct
irqaction
*
action
;
struct
irqaction
*
action
;
...
@@ -743,6 +744,7 @@ void init_irq_proc (void)
...
@@ -743,6 +744,7 @@ void init_irq_proc (void)
}
}
}
}
void
no_action
(
int
irq
,
void
*
dev
,
struct
pt_regs
*
regs
)
irqreturn_t
no_action
(
int
irq
,
void
*
dev
,
struct
pt_regs
*
regs
)
{
{
return
IRQ_NONE
;
}
}
arch/ppc64/kernel/open_pic.c
View file @
23ae2fde
...
@@ -764,9 +764,11 @@ static void openpic_end_ipi(unsigned int irq_nr)
...
@@ -764,9 +764,11 @@ static void openpic_end_ipi(unsigned int irq_nr)
openpic_eoi
();
openpic_eoi
();
}
}
static
void
openpic_ipi_action
(
int
cpl
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
openpic_ipi_action
(
int
cpl
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
smp_message_recv
(
cpl
-
openpic_vec_ipi
,
regs
);
smp_message_recv
(
cpl
-
openpic_vec_ipi
,
regs
);
return
IRQ_HANDLED
;
}
}
#endif
/* CONFIG_SMP */
#endif
/* CONFIG_SMP */
...
...
arch/ppc64/kernel/open_pic_defs.h
View file @
23ae2fde
...
@@ -298,7 +298,8 @@ static void openpic_set_spurious(u_int vector);
...
@@ -298,7 +298,8 @@ static void openpic_set_spurious(u_int vector);
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
/* Interprocessor Interrupts */
/* Interprocessor Interrupts */
static
void
openpic_initipi
(
u_int
ipi
,
u_int
pri
,
u_int
vector
);
static
void
openpic_initipi
(
u_int
ipi
,
u_int
pri
,
u_int
vector
);
static
void
openpic_ipi_action
(
int
cpl
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
irqreturn_t
openpic_ipi_action
(
int
cpl
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
#endif
#endif
/* Timer Interrupts */
/* Timer Interrupts */
...
...
arch/ppc64/kernel/ras.c
View file @
23ae2fde
...
@@ -54,8 +54,10 @@
...
@@ -54,8 +54,10 @@
#include <asm/rtas.h>
#include <asm/rtas.h>
#include <asm/ppcdebug.h>
#include <asm/ppcdebug.h>
static
void
ras_epow_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
irqreturn_t
ras_epow_interrupt
(
int
irq
,
void
*
dev_id
,
static
void
ras_error_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
struct
pt_regs
*
regs
);
static
irqreturn_t
ras_error_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
void
init_ras_IRQ
(
void
);
void
init_ras_IRQ
(
void
);
/* #define DEBUG */
/* #define DEBUG */
...
@@ -73,7 +75,7 @@ void init_ras_IRQ(void) {
...
@@ -73,7 +75,7 @@ void init_ras_IRQ(void) {
&
len
)))
{
&
len
)))
{
for
(
i
=
0
;
i
<
(
len
/
sizeof
(
*
ireg
));
i
++
)
{
for
(
i
=
0
;
i
<
(
len
/
sizeof
(
*
ireg
));
i
++
)
{
request_irq
(
virt_irq_create_mapping
(
*
(
ireg
))
+
NUM_8259_INTERRUPTS
,
request_irq
(
virt_irq_create_mapping
(
*
(
ireg
))
+
NUM_8259_INTERRUPTS
,
&
ras_error_interrupt
,
0
,
ras_error_interrupt
,
0
,
"RAS_ERROR"
,
NULL
);
"RAS_ERROR"
,
NULL
);
ireg
++
;
ireg
++
;
}
}
...
@@ -84,7 +86,7 @@ void init_ras_IRQ(void) {
...
@@ -84,7 +86,7 @@ void init_ras_IRQ(void) {
&
len
)))
{
&
len
)))
{
for
(
i
=
0
;
i
<
(
len
/
sizeof
(
*
ireg
));
i
++
)
{
for
(
i
=
0
;
i
<
(
len
/
sizeof
(
*
ireg
));
i
++
)
{
request_irq
(
virt_irq_create_mapping
(
*
(
ireg
))
+
NUM_8259_INTERRUPTS
,
request_irq
(
virt_irq_create_mapping
(
*
(
ireg
))
+
NUM_8259_INTERRUPTS
,
&
ras_epow_interrupt
,
0
,
ras_epow_interrupt
,
0
,
"RAS_EPOW"
,
NULL
);
"RAS_EPOW"
,
NULL
);
ireg
++
;
ireg
++
;
}
}
...
@@ -98,7 +100,7 @@ void init_ras_IRQ(void) {
...
@@ -98,7 +100,7 @@ void init_ras_IRQ(void) {
* to examine the type of power failure and take appropriate action where
* to examine the type of power failure and take appropriate action where
* the time horizon permits something useful to be done.
* the time horizon permits something useful to be done.
*/
*/
static
void
static
irqreturn_t
ras_epow_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
ras_epow_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
rtas_error_log
log_entry
;
struct
rtas_error_log
log_entry
;
...
@@ -114,7 +116,8 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -114,7 +116,8 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
udbg_printf
(
"EPOW <0x%lx 0x%lx>
\n
"
,
udbg_printf
(
"EPOW <0x%lx 0x%lx>
\n
"
,
*
((
unsigned
long
*
)
&
log_entry
),
status
);
*
((
unsigned
long
*
)
&
log_entry
),
status
);
printk
(
KERN_WARNING
printk
(
KERN_WARNING
"EPOW <0x%lx 0x%lx>
\n
"
,
*
((
unsigned
long
*
)
&
log_entry
),
status
);
"EPOW <0x%lx 0x%lx>
\n
"
,
*
((
unsigned
long
*
)
&
log_entry
),
status
);
return
IRQ_HANDLED
;
}
}
/*
/*
...
@@ -125,7 +128,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -125,7 +128,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
* For nonrecoverable errors, an error is logged and we stop all processing
* For nonrecoverable errors, an error is logged and we stop all processing
* as quickly as possible in order to prevent propagation of the failure.
* as quickly as possible in order to prevent propagation of the failure.
*/
*/
static
void
static
irqreturn_t
ras_error_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
ras_error_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
rtas_error_log
log_entry
;
struct
rtas_error_log
log_entry
;
...
@@ -158,7 +161,6 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -158,7 +161,6 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
printk
(
KERN_WARNING
printk
(
KERN_WARNING
"Warning: Recoverable hardware error <0x%lx 0x%lx>
\n
"
,
"Warning: Recoverable hardware error <0x%lx 0x%lx>
\n
"
,
*
((
unsigned
long
*
)
&
log_entry
),
status
);
*
((
unsigned
long
*
)
&
log_entry
),
status
);
return
;
}
}
return
IRQ_HANDLED
;
}
}
arch/ppc64/kernel/xics.c
View file @
23ae2fde
...
@@ -319,12 +319,14 @@ int xics_get_irq(struct pt_regs *regs)
...
@@ -319,12 +319,14 @@ int xics_get_irq(struct pt_regs *regs)
extern
struct
xics_ipi_struct
xics_ipi_message
[
NR_CPUS
]
__cacheline_aligned
;
extern
struct
xics_ipi_struct
xics_ipi_message
[
NR_CPUS
]
__cacheline_aligned
;
void
xics_ipi_action
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
irqreturn_t
xics_ipi_action
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
int
cpu
=
smp_processor_id
();
int
cpu
=
smp_processor_id
();
int
handled
=
0
;
ops
->
qirr_info
(
cpu
,
0xff
);
ops
->
qirr_info
(
cpu
,
0xff
);
while
(
xics_ipi_message
[
cpu
].
value
)
{
while
(
xics_ipi_message
[
cpu
].
value
)
{
handled
=
1
;
if
(
test_and_clear_bit
(
PPC_MSG_CALL_FUNCTION
,
if
(
test_and_clear_bit
(
PPC_MSG_CALL_FUNCTION
,
&
xics_ipi_message
[
cpu
].
value
))
{
&
xics_ipi_message
[
cpu
].
value
))
{
mb
();
mb
();
...
@@ -350,6 +352,7 @@ void xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -350,6 +352,7 @@ void xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
}
}
#endif
#endif
}
}
return
IRQ_RETVAL
(
handled
);
}
}
void
xics_cause_IPI
(
int
cpu
)
void
xics_cause_IPI
(
int
cpu
)
...
...
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