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
e9b19b04
Commit
e9b19b04
authored
Jan 18, 2004
by
Andrew Morton
Committed by
Linus Torvalds
Jan 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sn: irq clean up and update
From: Pat Gefre <pfg@sgi.com> irq clean up and update
parent
e8577a89
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
47 deletions
+47
-47
arch/ia64/sn/io/sn2/shub_intr.c
arch/ia64/sn/io/sn2/shub_intr.c
+4
-0
arch/ia64/sn/kernel/irq.c
arch/ia64/sn/kernel/irq.c
+43
-47
No files found.
arch/ia64/sn/io/sn2/shub_intr.c
View file @
e9b19b04
...
...
@@ -26,6 +26,10 @@
#include <asm/sn/sn2/shub_mmr.h>
#include <asm/sn/sn_cpuid.h>
typedef
void
pci_bridge_t
;
/* ARGSUSED */
void
hub_intr_init
(
vertex_hdl_t
hubv
)
...
...
arch/ia64/sn/kernel/irq.c
View file @
e9b19b04
...
...
@@ -36,11 +36,12 @@
#include <asm/bitops.h>
#include <asm/sn/sn2/shub_mmr.h>
int
irq_to_bit_pos
(
int
irq
);
static
void
force_interrupt
(
int
irq
);
extern
void
pcibr_force_interrupt
(
pcibr_intr_t
intr
);
extern
int
sn_force_interrupt_flag
;
static
pcibr_intr_list_t
*
pcibr_intr_list
;
static
unsigned
int
...
...
@@ -113,8 +114,26 @@ sn_end_irq(unsigned int irq)
}
static
void
sn_set_affinity_irq
(
unsigned
int
irq
,
unsigned
long
mask
)
sn_set_affinity_irq
(
unsigned
int
irq
,
cpumask_t
mask
)
{
#if CONFIG_SMP
int
redir
=
0
;
pcibr_intr_list_t
p
=
pcibr_intr_list
[
irq
];
pcibr_intr_t
intr
;
int
cpu
;
extern
void
sn_tio_redirect_intr
(
pcibr_intr_t
intr
,
unsigned
long
cpu
);
if
(
p
==
NULL
)
return
;
intr
=
p
->
il_intr
;
if
(
intr
==
NULL
)
return
;
cpu
=
first_cpu
(
mask
);
(
void
)
set_irq_affinity_info
(
irq
,
cpu_physical_id
(
intr
->
bi_cpu
),
redir
);
#endif
/* CONFIG_SMP */
}
...
...
@@ -161,41 +180,18 @@ sn_irq_init (void)
}
}
int
bit_pos_to_irq
(
int
bit
)
{
#define BIT_TO_IRQ 64
if
(
bit
>
118
)
bit
=
118
;
return
bit
+
BIT_TO_IRQ
;
}
int
irq_to_bit_pos
(
int
irq
)
{
#define IRQ_TO_BIT 64
int
bit
=
irq
-
IRQ_TO_BIT
;
return
bit
;
}
struct
pcibr_intr_list_t
{
struct
pcibr_intr_list_t
*
next
;
pcibr_intr_t
intr
;
};
static
struct
pcibr_intr_list_t
**
pcibr_intr_list
;
void
register_pcibr_intr
(
int
irq
,
pcibr_intr_t
intr
)
{
struct
pcibr_intr_list_t
*
p
=
kmalloc
(
sizeof
(
struct
pcibr_intr_list_t
),
GFP_KERNEL
);
struct
pcibr_intr_list_t
*
list
;
pcibr_intr_list_t
p
=
kmalloc
(
sizeof
(
struct
pcibr_intr_list_s
),
GFP_KERNEL
);
pcibr_intr_list_t
list
;
int
cpu
=
SN_CPU_FROM_IRQ
(
irq
);
if
(
pcibr_intr_list
==
NULL
)
{
pcibr_intr_list
=
kmalloc
(
sizeof
(
struct
pcibr_intr_list_t
*
)
*
NR_IRQS
,
GFP_KERNEL
);
pcibr_intr_list
=
kmalloc
(
sizeof
(
pcibr_intr_list_t
)
*
NR_IRQS
,
GFP_KERNEL
);
if
(
pcibr_intr_list
==
NULL
)
pcibr_intr_list
=
vmalloc
(
sizeof
(
struct
pcibr_intr_list_t
*
)
*
NR_IRQS
);
pcibr_intr_list
=
vmalloc
(
sizeof
(
pcibr_intr_list_t
)
*
NR_IRQS
);
if
(
pcibr_intr_list
==
NULL
)
panic
(
"Could not allocate memory for pcibr_intr_list
\n
"
);
memset
(
(
void
*
)
pcibr_intr_list
,
0
,
sizeof
(
struct
pcibr_intr_list_t
*
)
*
NR_IRQS
);
memset
(
(
void
*
)
pcibr_intr_list
,
0
,
sizeof
(
pcibr_intr_list_t
)
*
NR_IRQS
);
}
if
(
pdacpu
(
cpu
)
->
sn_last_irq
<
irq
)
{
pdacpu
(
cpu
)
->
sn_last_irq
=
irq
;
...
...
@@ -203,42 +199,42 @@ register_pcibr_intr(int irq, pcibr_intr_t intr) {
if
(
pdacpu
(
cpu
)
->
sn_first_irq
>
irq
)
pdacpu
(
cpu
)
->
sn_first_irq
=
irq
;
if
(
!
p
)
panic
(
"Could not allocate memory for pcibr_intr_list_t
\n
"
);
if
((
list
=
pcibr_intr_list
[
irq
]))
{
while
(
list
->
next
)
list
=
list
->
next
;
list
->
next
=
p
;
p
->
next
=
NULL
;
p
->
intr
=
intr
;
while
(
list
->
il_next
)
list
=
list
->
il_
next
;
list
->
il_
next
=
p
;
p
->
il_
next
=
NULL
;
p
->
i
l_i
ntr
=
intr
;
}
else
{
pcibr_intr_list
[
irq
]
=
p
;
p
->
next
=
NULL
;
p
->
intr
=
intr
;
p
->
il_
next
=
NULL
;
p
->
i
l_i
ntr
=
intr
;
}
}
void
force_polled_int
(
void
)
{
int
i
;
struct
pcibr_intr_list_t
*
p
;
pcibr_intr_list_t
p
;
for
(
i
=
0
;
i
<
NR_IRQS
;
i
++
)
{
p
=
pcibr_intr_list
[
i
];
while
(
p
)
{
if
(
p
->
intr
){
pcibr_force_interrupt
(
p
->
intr
);
if
(
p
->
i
l_i
ntr
){
pcibr_force_interrupt
(
p
->
i
l_i
ntr
);
}
p
=
p
->
next
;
p
=
p
->
il_
next
;
}
}
}
static
void
force_interrupt
(
int
irq
)
{
struct
pcibr_intr_list_t
*
p
=
pcibr_intr_list
[
irq
];
pcibr_intr_list_t
p
=
pcibr_intr_list
[
irq
];
while
(
p
)
{
if
(
p
->
intr
)
{
pcibr_force_interrupt
(
p
->
intr
);
if
(
p
->
i
l_i
ntr
)
{
pcibr_force_interrupt
(
p
->
i
l_i
ntr
);
}
p
=
p
->
next
;
p
=
p
->
il_
next
;
}
}
...
...
@@ -298,13 +294,13 @@ sn_lb_int_war_check(void) {
if
(
pda
->
sn_first_irq
==
0
)
return
;
for
(
i
=
pda
->
sn_first_irq
;
i
<=
pda
->
sn_last_irq
;
i
++
)
{
struct
pcibr_intr_list_t
*
p
=
pcibr_intr_list
[
i
];
pcibr_intr_list_t
p
=
pcibr_intr_list
[
i
];
if
(
p
==
NULL
)
{
continue
;
}
while
(
p
)
{
sn_check_intr
(
i
,
p
->
intr
);
p
=
p
->
next
;
sn_check_intr
(
i
,
p
->
i
l_i
ntr
);
p
=
p
->
il_
next
;
}
}
}
...
...
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