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
cb141c23
Commit
cb141c23
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: Added call to pcireg_intr_status_get
From: Pat Gefre <pfg@sgi.com> Added call to pcireg_intr_status_get
parent
38fc9a4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
25 deletions
+43
-25
arch/ia64/sn/io/sn2/pcibr/pcibr_reg.c
arch/ia64/sn/io/sn2/pcibr/pcibr_reg.c
+42
-24
arch/ia64/sn/kernel/irq.c
arch/ia64/sn/kernel/irq.c
+1
-1
No files found.
arch/ia64/sn/io/sn2/pcibr/pcibr_reg.c
View file @
cb141c23
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
* Copyright (C) 2003 Silicon Graphics, Inc. All rights reserved.
* Copyright (C) 2003 Silicon Graphics, Inc. All rights reserved.
*/
*/
#include <linux/types.h>
#include <linux/types.h>
#include <asm/sn/sgi.h>
#include <asm/sn/sgi.h>
#include <asm/sn/iograph.h>
#include <asm/sn/iograph.h>
...
@@ -24,51 +23,70 @@
...
@@ -24,51 +23,70 @@
uint64_t
uint64_t
pcireg_control_get
(
void
*
ptr
)
pcireg_control_get
(
void
*
ptr
)
{
{
uint64_t
ret
=
0
;
uint64_t
ret
=
0
;
pic_t
*
bridge
;
pic_t
*
bridge
;
if
(
IS_IOADDR
(
ptr
))
bridge
=
(
pic_t
*
)
ptr
;
else
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
ret
=
((
pic_t
*
)
bridge
)
->
p_wid_control
;
return
ret
;
}
/*
* Interrupt Status Register Access -- Read Only 0000_0100
*/
uint64_t
pcireg_intr_status_get
(
void
*
ptr
)
{
short
bridge_type
;
pic_t
*
bridge
;
uint64_t
ret
=
0
;
if
(
IS_IOADDR
(
ptr
)
)
if
(
IS_IOADDR
(
ptr
)
)
bridge
=
(
pic_t
*
)
ptr
;
bridge
=
(
pic_t
*
)
ptr
;
else
else
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
ret
=
((
pic_t
*
)
bridge
)
->
p_wid_control
;
ret
=
((
pic_t
*
)
bridge
)
->
p_int_status
;
return
ret
;
return
ret
;
}
}
void
void
pcireg_intr_enable_bit_clr
(
void
*
ptr
,
uint64_t
bits
)
pcireg_intr_enable_bit_clr
(
void
*
ptr
,
uint64_t
bits
)
{
{
pic_t
*
bridge
;
pic_t
*
bridge
;
if
(
IS_IOADDR
(
ptr
)
)
if
(
IS_IOADDR
(
ptr
)
)
bridge
=
(
pic_t
*
)
ptr
;
bridge
=
(
pic_t
*
)
ptr
;
else
else
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
->
p_int_enable
&=
~
bits
;
bridge
->
p_int_enable
&=
~
bits
;
}
}
void
void
pcireg_intr_enable_bit_set
(
void
*
ptr
,
uint64_t
bits
)
pcireg_intr_enable_bit_set
(
void
*
ptr
,
uint64_t
bits
)
{
{
pic_t
*
bridge
;
pic_t
*
bridge
;
if
(
IS_IOADDR
(
ptr
)
)
if
(
IS_IOADDR
(
ptr
)
)
bridge
=
(
pic_t
*
)
ptr
;
bridge
=
(
pic_t
*
)
ptr
;
else
else
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
->
p_int_enable
|=
bits
;
bridge
->
p_int_enable
|=
bits
;
}
}
void
void
pcireg_intr_addr_addr_set
(
void
*
ptr
,
int
int_n
,
uint64_t
addr
)
pcireg_intr_addr_addr_set
(
void
*
ptr
,
int
int_n
,
uint64_t
addr
)
{
{
pic_t
*
bridge
;
pic_t
*
bridge
;
if
(
IS_IOADDR
(
ptr
)
)
if
(
IS_IOADDR
(
ptr
)
)
bridge
=
(
pic_t
*
)
ptr
;
bridge
=
(
pic_t
*
)
ptr
;
else
else
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
->
p_int_addr
[
int_n
]
&=
~
(
0x0000FFFFFFFFFFFF
);
bridge
->
p_int_addr
[
int_n
]
&=
~
(
0x0000FFFFFFFFFFFF
);
bridge
->
p_int_addr
[
int_n
]
|=
(
addr
&
0x0000FFFFFFFFFFFF
);
bridge
->
p_int_addr
[
int_n
]
|=
(
addr
&
0x0000FFFFFFFFFFFF
);
}
}
...
@@ -79,11 +97,11 @@ pcireg_intr_addr_addr_set(void *ptr, int int_n, uint64_t addr)
...
@@ -79,11 +97,11 @@ pcireg_intr_addr_addr_set(void *ptr, int int_n, uint64_t addr)
void
void
pcireg_force_intr_set
(
void
*
ptr
,
int
int_n
)
pcireg_force_intr_set
(
void
*
ptr
,
int
int_n
)
{
{
pic_t
*
bridge
;
pic_t
*
bridge
;
if
(
IS_IOADDR
(
ptr
)
)
if
(
IS_IOADDR
(
ptr
)
)
bridge
=
(
pic_t
*
)
ptr
;
bridge
=
(
pic_t
*
)
ptr
;
else
else
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
=
(
pic_t
*
)
((
pcibr_soft_t
)
(
ptr
))
->
bs_base
;
bridge
->
p_force_pin
[
int_n
]
=
1
;
bridge
->
p_force_pin
[
int_n
]
=
1
;
}
}
arch/ia64/sn/kernel/irq.c
View file @
cb141c23
...
@@ -262,7 +262,7 @@ sn_check_intr(int irq, pcibr_intr_t intr) {
...
@@ -262,7 +262,7 @@ sn_check_intr(int irq, pcibr_intr_t intr) {
unsigned
long
irr_reg
;
unsigned
long
irr_reg
;
regval
=
intr
->
bi_soft
->
bs_base
->
p_int_status_64
;
regval
=
pcireg_intr_status_get
(
intr
->
bi_soft
->
bs_base
)
;
irr_reg_num
=
irq_to_vector
(
irq
)
/
64
;
irr_reg_num
=
irq_to_vector
(
irq
)
/
64
;
irr_bit
=
irq_to_vector
(
irq
)
%
64
;
irr_bit
=
irq_to_vector
(
irq
)
%
64
;
switch
(
irr_reg_num
)
{
switch
(
irr_reg_num
)
{
...
...
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