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
f1f701e9
Commit
f1f701e9
authored
Feb 04, 2011
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Convert msi to new irq_chip functions
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
545c8d8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
arch/ia64/kernel/msi_ia64.c
arch/ia64/kernel/msi_ia64.c
+22
-19
No files found.
arch/ia64/kernel/msi_ia64.c
View file @
f1f701e9
...
...
@@ -12,12 +12,13 @@
static
struct
irq_chip
ia64_msi_chip
;
#ifdef CONFIG_SMP
static
int
ia64_set_msi_irq_affinity
(
unsigned
int
irq
,
const
cpumask_t
*
cpu_mask
)
static
int
ia64_set_msi_irq_affinity
(
struct
irq_data
*
idata
,
const
cpumask_t
*
cpu_mask
,
bool
force
)
{
struct
msi_msg
msg
;
u32
addr
,
data
;
int
cpu
=
first_cpu
(
*
cpu_mask
);
unsigned
int
irq
=
idata
->
irq
;
if
(
!
cpu_online
(
cpu
))
return
-
1
;
...
...
@@ -38,7 +39,7 @@ static int ia64_set_msi_irq_affinity(unsigned int irq,
msg
.
data
=
data
;
write_msi_msg
(
irq
,
&
msg
);
cpumask_copy
(
i
rq_desc
[
irq
].
affinity
,
cpumask_of
(
cpu
));
cpumask_copy
(
i
data
->
affinity
,
cpumask_of
(
cpu
));
return
0
;
}
...
...
@@ -84,16 +85,16 @@ void ia64_teardown_msi_irq(unsigned int irq)
destroy_irq
(
irq
);
}
static
void
ia64_ack_msi_irq
(
unsigned
int
irq
)
static
void
ia64_ack_msi_irq
(
struct
irq_data
*
data
)
{
irq_complete_move
(
irq
);
move_native_irq
(
irq
);
irq_complete_move
(
data
->
irq
);
move_native_irq
(
data
->
irq
);
ia64_eoi
();
}
static
int
ia64_msi_retrigger_irq
(
unsigned
int
irq
)
static
int
ia64_msi_retrigger_irq
(
struct
irq_data
*
data
)
{
unsigned
int
vector
=
irq_to_vector
(
irq
);
unsigned
int
vector
=
irq_to_vector
(
data
->
irq
);
ia64_resend_irq
(
vector
);
return
1
;
...
...
@@ -103,14 +104,14 @@ static int ia64_msi_retrigger_irq(unsigned int irq)
* Generic ops used on most IA64 platforms.
*/
static
struct
irq_chip
ia64_msi_chip
=
{
.
name
=
"PCI-MSI"
,
.
irq_mask
=
mask_msi_irq
,
.
irq_unmask
=
unmask_msi_irq
,
.
ack
=
ia64_ack_msi_irq
,
.
name
=
"PCI-MSI"
,
.
irq_mask
=
mask_msi_irq
,
.
irq_unmask
=
unmask_msi_irq
,
.
irq_
ack
=
ia64_ack_msi_irq
,
#ifdef CONFIG_SMP
.
set_affinity
=
ia64_set_msi_irq_affinity
,
.
irq_
set_affinity
=
ia64_set_msi_irq_affinity
,
#endif
.
retrigger
=
ia64_msi_retrigger_irq
,
.
irq_retrigger
=
ia64_msi_retrigger_irq
,
};
...
...
@@ -132,8 +133,10 @@ void arch_teardown_msi_irq(unsigned int irq)
#ifdef CONFIG_DMAR
#ifdef CONFIG_SMP
static
int
dmar_msi_set_affinity
(
unsigned
int
irq
,
const
struct
cpumask
*
mask
)
static
int
dmar_msi_set_affinity
(
struct
irq_data
*
data
,
const
struct
cpumask
*
mask
,
bool
force
)
{
unsigned
int
irq
=
data
->
irq
;
struct
irq_cfg
*
cfg
=
irq_cfg
+
irq
;
struct
msi_msg
msg
;
int
cpu
=
cpumask_first
(
mask
);
...
...
@@ -152,7 +155,7 @@ static int dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask)
msg
.
address_lo
|=
MSI_ADDR_DEST_ID_CPU
(
cpu_physical_id
(
cpu
));
dmar_msi_write
(
irq
,
&
msg
);
cpumask_copy
(
irq_desc
[
irq
].
affinity
,
mask
);
cpumask_copy
(
data
->
affinity
,
mask
);
return
0
;
}
...
...
@@ -162,11 +165,11 @@ static struct irq_chip dmar_msi_type = {
.
name
=
"DMAR_MSI"
,
.
irq_unmask
=
dmar_msi_unmask
,
.
irq_mask
=
dmar_msi_mask
,
.
ack
=
ia64_ack_msi_irq
,
.
irq_
ack
=
ia64_ack_msi_irq
,
#ifdef CONFIG_SMP
.
set_affinity
=
dmar_msi_set_affinity
,
.
irq_
set_affinity
=
dmar_msi_set_affinity
,
#endif
.
retrigger
=
ia64_msi_retrigger_irq
,
.
irq_
retrigger
=
ia64_msi_retrigger_irq
,
};
static
int
...
...
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