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
1c0f6476
Commit
1c0f6476
authored
Feb 10, 2011
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'irq' into for-next
parents
2c250ad2
4c4231ea
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
88 deletions
+98
-88
arch/parisc/Kconfig
arch/parisc/Kconfig
+1
-0
arch/parisc/include/asm/irq.h
arch/parisc/include/asm/irq.h
+4
-9
arch/parisc/kernel/irq.c
arch/parisc/kernel/irq.c
+37
-27
drivers/parisc/dino.c
drivers/parisc/dino.c
+11
-11
drivers/parisc/eisa.c
drivers/parisc/eisa.c
+7
-5
drivers/parisc/gsc.c
drivers/parisc/gsc.c
+11
-11
drivers/parisc/iosapic.c
drivers/parisc/iosapic.c
+20
-20
drivers/parisc/superio.c
drivers/parisc/superio.c
+7
-5
No files found.
arch/parisc/Kconfig
View file @
1c0f6476
...
@@ -15,6 +15,7 @@ config PARISC
...
@@ -15,6 +15,7 @@ config PARISC
select HAVE_GENERIC_HARDIRQS
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_PROBE
select GENERIC_IRQ_PROBE
select IRQ_PER_CPU
select IRQ_PER_CPU
select GENERIC_HARDIRQS_NO_DEPRECATED
help
help
The PA-RISC microprocessor is designed by Hewlett-Packard and used
The PA-RISC microprocessor is designed by Hewlett-Packard and used
...
...
arch/parisc/include/asm/irq.h
View file @
1c0f6476
...
@@ -32,15 +32,10 @@ static __inline__ int irq_canonicalize(int irq)
...
@@ -32,15 +32,10 @@ static __inline__ int irq_canonicalize(int irq)
}
}
struct
irq_chip
;
struct
irq_chip
;
struct
irq_data
;
/*
void
cpu_ack_irq
(
struct
irq_data
*
d
);
* Some useful "we don't have to do anything here" handlers. Should
void
cpu_eoi_irq
(
struct
irq_data
*
d
);
* probably be provided by the generic code.
*/
void
no_ack_irq
(
unsigned
int
irq
);
void
no_end_irq
(
unsigned
int
irq
);
void
cpu_ack_irq
(
unsigned
int
irq
);
void
cpu_eoi_irq
(
unsigned
int
irq
);
extern
int
txn_alloc_irq
(
unsigned
int
nbits
);
extern
int
txn_alloc_irq
(
unsigned
int
nbits
);
extern
int
txn_claim_irq
(
int
);
extern
int
txn_claim_irq
(
int
);
...
@@ -49,7 +44,7 @@ extern unsigned long txn_alloc_addr(unsigned int);
...
@@ -49,7 +44,7 @@ extern unsigned long txn_alloc_addr(unsigned int);
extern
unsigned
long
txn_affinity_addr
(
unsigned
int
irq
,
int
cpu
);
extern
unsigned
long
txn_affinity_addr
(
unsigned
int
irq
,
int
cpu
);
extern
int
cpu_claim_irq
(
unsigned
int
irq
,
struct
irq_chip
*
,
void
*
);
extern
int
cpu_claim_irq
(
unsigned
int
irq
,
struct
irq_chip
*
,
void
*
);
extern
int
cpu_check_affinity
(
unsigned
int
irq
,
const
struct
cpumask
*
dest
);
extern
int
cpu_check_affinity
(
struct
irq_data
*
d
,
const
struct
cpumask
*
dest
);
/* soft power switch support (power.c) */
/* soft power switch support (power.c) */
extern
struct
tasklet_struct
power_tasklet
;
extern
struct
tasklet_struct
power_tasklet
;
...
...
arch/parisc/kernel/irq.c
View file @
1c0f6476
...
@@ -52,9 +52,9 @@ static volatile unsigned long cpu_eiem = 0;
...
@@ -52,9 +52,9 @@ static volatile unsigned long cpu_eiem = 0;
*/
*/
static
DEFINE_PER_CPU
(
unsigned
long
,
local_ack_eiem
)
=
~
0UL
;
static
DEFINE_PER_CPU
(
unsigned
long
,
local_ack_eiem
)
=
~
0UL
;
static
void
cpu_mask_irq
(
unsigned
int
irq
)
static
void
cpu_mask_irq
(
struct
irq_data
*
d
)
{
{
unsigned
long
eirr_bit
=
EIEM_MASK
(
irq
);
unsigned
long
eirr_bit
=
EIEM_MASK
(
d
->
irq
);
cpu_eiem
&=
~
eirr_bit
;
cpu_eiem
&=
~
eirr_bit
;
/* Do nothing on the other CPUs. If they get this interrupt,
/* Do nothing on the other CPUs. If they get this interrupt,
...
@@ -63,7 +63,7 @@ static void cpu_mask_irq(unsigned int irq)
...
@@ -63,7 +63,7 @@ static void cpu_mask_irq(unsigned int irq)
* then gets disabled */
* then gets disabled */
}
}
static
void
cpu_unmask_irq
(
unsigned
int
irq
)
static
void
__
cpu_unmask_irq
(
unsigned
int
irq
)
{
{
unsigned
long
eirr_bit
=
EIEM_MASK
(
irq
);
unsigned
long
eirr_bit
=
EIEM_MASK
(
irq
);
...
@@ -75,9 +75,14 @@ static void cpu_unmask_irq(unsigned int irq)
...
@@ -75,9 +75,14 @@ static void cpu_unmask_irq(unsigned int irq)
smp_send_all_nop
();
smp_send_all_nop
();
}
}
void
cpu_ack_irq
(
unsigned
int
irq
)
static
void
cpu_unmask_irq
(
struct
irq_data
*
d
)
{
{
unsigned
long
mask
=
EIEM_MASK
(
irq
);
__cpu_unmask_irq
(
d
->
irq
);
}
void
cpu_ack_irq
(
struct
irq_data
*
d
)
{
unsigned
long
mask
=
EIEM_MASK
(
d
->
irq
);
int
cpu
=
smp_processor_id
();
int
cpu
=
smp_processor_id
();
/* Clear in EIEM so we can no longer process */
/* Clear in EIEM so we can no longer process */
...
@@ -90,9 +95,9 @@ void cpu_ack_irq(unsigned int irq)
...
@@ -90,9 +95,9 @@ void cpu_ack_irq(unsigned int irq)
mtctl
(
mask
,
23
);
mtctl
(
mask
,
23
);
}
}
void
cpu_eoi_irq
(
unsigned
int
irq
)
void
cpu_eoi_irq
(
struct
irq_data
*
d
)
{
{
unsigned
long
mask
=
EIEM_MASK
(
irq
);
unsigned
long
mask
=
EIEM_MASK
(
d
->
irq
);
int
cpu
=
smp_processor_id
();
int
cpu
=
smp_processor_id
();
/* set it in the eiems---it's no longer in process */
/* set it in the eiems---it's no longer in process */
...
@@ -103,15 +108,16 @@ void cpu_eoi_irq(unsigned int irq)
...
@@ -103,15 +108,16 @@ void cpu_eoi_irq(unsigned int irq)
}
}
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
int
cpu_check_affinity
(
unsigned
int
irq
,
const
struct
cpumask
*
dest
)
int
cpu_check_affinity
(
struct
irq_data
*
d
,
const
struct
cpumask
*
dest
)
{
{
int
cpu_dest
;
int
cpu_dest
;
/* timer and ipi have to always be received on all CPUs */
/* timer and ipi have to always be received on all CPUs */
if
(
CHECK_IRQ_PER_CPU
(
irq_to_desc
(
irq
)
->
status
))
{
if
(
CHECK_IRQ_PER_CPU
(
irq_to_desc
(
d
->
irq
)
->
status
))
{
/* Bad linux design decision. The mask has already
/* Bad linux design decision. The mask has already
* been set; we must reset it */
* been set; we must reset it. Will fix - tglx
cpumask_setall
(
irq_desc
[
irq
].
affinity
);
*/
cpumask_setall
(
d
->
affinity
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -121,15 +127,16 @@ int cpu_check_affinity(unsigned int irq, const struct cpumask *dest)
...
@@ -121,15 +127,16 @@ int cpu_check_affinity(unsigned int irq, const struct cpumask *dest)
return
cpu_dest
;
return
cpu_dest
;
}
}
static
int
cpu_set_affinity_irq
(
unsigned
int
irq
,
const
struct
cpumask
*
dest
)
static
int
cpu_set_affinity_irq
(
struct
irq_data
*
d
,
const
struct
cpumask
*
dest
,
bool
force
)
{
{
int
cpu_dest
;
int
cpu_dest
;
cpu_dest
=
cpu_check_affinity
(
irq
,
dest
);
cpu_dest
=
cpu_check_affinity
(
d
,
dest
);
if
(
cpu_dest
<
0
)
if
(
cpu_dest
<
0
)
return
-
1
;
return
-
1
;
cpumask_copy
(
irq_desc
[
irq
].
affinity
,
dest
);
cpumask_copy
(
d
->
affinity
,
dest
);
return
0
;
return
0
;
}
}
...
@@ -137,17 +144,17 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
...
@@ -137,17 +144,17 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
static
struct
irq_chip
cpu_interrupt_type
=
{
static
struct
irq_chip
cpu_interrupt_type
=
{
.
name
=
"CPU"
,
.
name
=
"CPU"
,
.
mask
=
cpu_mask_irq
,
.
irq_
mask
=
cpu_mask_irq
,
.
unmask
=
cpu_unmask_irq
,
.
irq_
unmask
=
cpu_unmask_irq
,
.
ack
=
cpu_ack_irq
,
.
irq_
ack
=
cpu_ack_irq
,
.
eoi
=
cpu_eoi_irq
,
.
irq_
eoi
=
cpu_eoi_irq
,
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
.
set_affinity
=
cpu_set_affinity_irq
,
.
irq_
set_affinity
=
cpu_set_affinity_irq
,
#endif
#endif
/* XXX: Needs to be written. We managed without it so far, but
/* XXX: Needs to be written. We managed without it so far, but
* we really ought to write it.
* we really ought to write it.
*/
*/
.
retrigger
=
NULL
,
.
irq_
retrigger
=
NULL
,
};
};
int
show_interrupts
(
struct
seq_file
*
p
,
void
*
v
)
int
show_interrupts
(
struct
seq_file
*
p
,
void
*
v
)
...
@@ -181,7 +188,7 @@ int show_interrupts(struct seq_file *p, void *v)
...
@@ -181,7 +188,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_printf
(
p
,
"%10u "
,
kstat_irqs
(
i
));
seq_printf
(
p
,
"%10u "
,
kstat_irqs
(
i
));
#endif
#endif
seq_printf
(
p
,
" %14s"
,
irq_desc
[
i
].
chip
->
name
);
seq_printf
(
p
,
" %14s"
,
irq_desc
[
i
].
irq_data
.
chip
->
name
);
#ifndef PARISC_IRQ_CR16_COUNTS
#ifndef PARISC_IRQ_CR16_COUNTS
seq_printf
(
p
,
" %s"
,
action
->
name
);
seq_printf
(
p
,
" %s"
,
action
->
name
);
...
@@ -233,14 +240,14 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
...
@@ -233,14 +240,14 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
{
{
if
(
irq_desc
[
irq
].
action
)
if
(
irq_desc
[
irq
].
action
)
return
-
EBUSY
;
return
-
EBUSY
;
if
(
irq_desc
[
irq
].
chip
!=
&
cpu_interrupt_type
)
if
(
get_irq_chip
(
irq
)
!=
&
cpu_interrupt_type
)
return
-
EBUSY
;
return
-
EBUSY
;
/* for iosapic interrupts */
/* for iosapic interrupts */
if
(
type
)
{
if
(
type
)
{
set_irq_chip_and_handler
(
irq
,
type
,
handle_percpu_irq
);
set_irq_chip_and_handler
(
irq
,
type
,
handle_percpu_irq
);
set_irq_chip_data
(
irq
,
data
);
set_irq_chip_data
(
irq
,
data
);
cpu_unmask_irq
(
irq
);
__
cpu_unmask_irq
(
irq
);
}
}
return
0
;
return
0
;
}
}
...
@@ -289,7 +296,8 @@ int txn_alloc_irq(unsigned int bits_wide)
...
@@ -289,7 +296,8 @@ int txn_alloc_irq(unsigned int bits_wide)
unsigned
long
txn_affinity_addr
(
unsigned
int
irq
,
int
cpu
)
unsigned
long
txn_affinity_addr
(
unsigned
int
irq
,
int
cpu
)
{
{
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
cpumask_copy
(
irq_desc
[
irq
].
affinity
,
cpumask_of
(
cpu
));
struct
irq_data
*
d
=
irq_get_irq_data
(
irq
);
cpumask_copy
(
d
->
affinity
,
cpumask_of
(
cpu
));
#endif
#endif
return
per_cpu
(
cpu_data
,
cpu
).
txn_addr
;
return
per_cpu
(
cpu_data
,
cpu
).
txn_addr
;
...
@@ -333,6 +341,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
...
@@ -333,6 +341,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
unsigned
long
eirr_val
;
unsigned
long
eirr_val
;
int
irq
,
cpu
=
smp_processor_id
();
int
irq
,
cpu
=
smp_processor_id
();
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
struct
irq_desc
*
desc
;
cpumask_t
dest
;
cpumask_t
dest
;
#endif
#endif
...
@@ -346,8 +355,9 @@ void do_cpu_irq_mask(struct pt_regs *regs)
...
@@ -346,8 +355,9 @@ void do_cpu_irq_mask(struct pt_regs *regs)
irq
=
eirr_to_irq
(
eirr_val
);
irq
=
eirr_to_irq
(
eirr_val
);
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
cpumask_copy
(
&
dest
,
irq_desc
[
irq
].
affinity
);
desc
=
irq_to_desc
(
irq
);
if
(
CHECK_IRQ_PER_CPU
(
irq_desc
[
irq
].
status
)
&&
cpumask_copy
(
&
dest
,
desc
->
irq_data
.
affinity
);
if
(
CHECK_IRQ_PER_CPU
(
desc
->
status
)
&&
!
cpu_isset
(
smp_processor_id
(),
dest
))
{
!
cpu_isset
(
smp_processor_id
(),
dest
))
{
int
cpu
=
first_cpu
(
dest
);
int
cpu
=
first_cpu
(
dest
);
...
...
drivers/parisc/dino.c
View file @
1c0f6476
...
@@ -296,25 +296,25 @@ static struct pci_port_ops dino_port_ops = {
...
@@ -296,25 +296,25 @@ static struct pci_port_ops dino_port_ops = {
.
outl
=
dino_out32
.
outl
=
dino_out32
};
};
static
void
dino_mask_irq
(
unsigned
int
irq
)
static
void
dino_mask_irq
(
struct
irq_data
*
d
)
{
{
struct
dino_device
*
dino_dev
=
get_irq_chip_data
(
irq
);
struct
dino_device
*
dino_dev
=
irq_data_get_irq_chip_data
(
d
);
int
local_irq
=
gsc_find_local_irq
(
irq
,
dino_dev
->
global_irq
,
DINO_LOCAL_IRQS
);
int
local_irq
=
gsc_find_local_irq
(
d
->
irq
,
dino_dev
->
global_irq
,
DINO_LOCAL_IRQS
);
DBG
(
KERN_WARNING
"%s(0x%p, %d)
\n
"
,
__func__
,
dino_dev
,
irq
);
DBG
(
KERN_WARNING
"%s(0x%p, %d)
\n
"
,
__func__
,
dino_dev
,
d
->
irq
);
/* Clear the matching bit in the IMR register */
/* Clear the matching bit in the IMR register */
dino_dev
->
imr
&=
~
(
DINO_MASK_IRQ
(
local_irq
));
dino_dev
->
imr
&=
~
(
DINO_MASK_IRQ
(
local_irq
));
__raw_writel
(
dino_dev
->
imr
,
dino_dev
->
hba
.
base_addr
+
DINO_IMR
);
__raw_writel
(
dino_dev
->
imr
,
dino_dev
->
hba
.
base_addr
+
DINO_IMR
);
}
}
static
void
dino_unmask_irq
(
unsigned
int
irq
)
static
void
dino_unmask_irq
(
struct
irq_data
*
d
)
{
{
struct
dino_device
*
dino_dev
=
get_irq_chip_data
(
irq
);
struct
dino_device
*
dino_dev
=
irq_data_get_irq_chip_data
(
d
);
int
local_irq
=
gsc_find_local_irq
(
irq
,
dino_dev
->
global_irq
,
DINO_LOCAL_IRQS
);
int
local_irq
=
gsc_find_local_irq
(
d
->
irq
,
dino_dev
->
global_irq
,
DINO_LOCAL_IRQS
);
u32
tmp
;
u32
tmp
;
DBG
(
KERN_WARNING
"%s(0x%p, %d)
\n
"
,
__func__
,
dino_dev
,
irq
);
DBG
(
KERN_WARNING
"%s(0x%p, %d)
\n
"
,
__func__
,
dino_dev
,
d
->
irq
);
/*
/*
** clear pending IRQ bits
** clear pending IRQ bits
...
@@ -347,8 +347,8 @@ static void dino_unmask_irq(unsigned int irq)
...
@@ -347,8 +347,8 @@ static void dino_unmask_irq(unsigned int irq)
static
struct
irq_chip
dino_interrupt_type
=
{
static
struct
irq_chip
dino_interrupt_type
=
{
.
name
=
"GSC-PCI"
,
.
name
=
"GSC-PCI"
,
.
unmask
=
dino_unmask_irq
,
.
irq_
unmask
=
dino_unmask_irq
,
.
mask
=
dino_mask_irq
,
.
irq_
mask
=
dino_mask_irq
,
};
};
...
...
drivers/parisc/eisa.c
View file @
1c0f6476
...
@@ -144,8 +144,9 @@ static unsigned int eisa_irq_level __read_mostly; /* default to edge triggered *
...
@@ -144,8 +144,9 @@ static unsigned int eisa_irq_level __read_mostly; /* default to edge triggered *
/* called by free irq */
/* called by free irq */
static
void
eisa_mask_irq
(
unsigned
int
irq
)
static
void
eisa_mask_irq
(
struct
irq_data
*
d
)
{
{
unsigned
int
irq
=
d
->
irq
;
unsigned
long
flags
;
unsigned
long
flags
;
EISA_DBG
(
"disable irq %d
\n
"
,
irq
);
EISA_DBG
(
"disable irq %d
\n
"
,
irq
);
...
@@ -164,8 +165,9 @@ static void eisa_mask_irq(unsigned int irq)
...
@@ -164,8 +165,9 @@ static void eisa_mask_irq(unsigned int irq)
}
}
/* called by request irq */
/* called by request irq */
static
void
eisa_unmask_irq
(
unsigned
int
irq
)
static
void
eisa_unmask_irq
(
struct
irq_data
*
d
)
{
{
unsigned
int
irq
=
d
->
irq
;
unsigned
long
flags
;
unsigned
long
flags
;
EISA_DBG
(
"enable irq %d
\n
"
,
irq
);
EISA_DBG
(
"enable irq %d
\n
"
,
irq
);
...
@@ -184,8 +186,8 @@ static void eisa_unmask_irq(unsigned int irq)
...
@@ -184,8 +186,8 @@ static void eisa_unmask_irq(unsigned int irq)
static
struct
irq_chip
eisa_interrupt_type
=
{
static
struct
irq_chip
eisa_interrupt_type
=
{
.
name
=
"EISA"
,
.
name
=
"EISA"
,
.
unmask
=
eisa_unmask_irq
,
.
irq_
unmask
=
eisa_unmask_irq
,
.
mask
=
eisa_mask_irq
,
.
irq_
mask
=
eisa_mask_irq
,
};
};
static
irqreturn_t
eisa_irq
(
int
wax_irq
,
void
*
intr_dev
)
static
irqreturn_t
eisa_irq
(
int
wax_irq
,
void
*
intr_dev
)
...
...
drivers/parisc/gsc.c
View file @
1c0f6476
...
@@ -105,13 +105,13 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit)
...
@@ -105,13 +105,13 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit)
return
NO_IRQ
;
return
NO_IRQ
;
}
}
static
void
gsc_asic_mask_irq
(
unsigned
int
irq
)
static
void
gsc_asic_mask_irq
(
struct
irq_data
*
d
)
{
{
struct
gsc_asic
*
irq_dev
=
get_irq_chip_data
(
irq
);
struct
gsc_asic
*
irq_dev
=
irq_data_get_irq_chip_data
(
d
);
int
local_irq
=
gsc_find_local_irq
(
irq
,
irq_dev
->
global_irq
,
32
);
int
local_irq
=
gsc_find_local_irq
(
d
->
irq
,
irq_dev
->
global_irq
,
32
);
u32
imr
;
u32
imr
;
DEBPRINTK
(
KERN_DEBUG
"%s(%d) %s: IMR 0x%x
\n
"
,
__func__
,
irq
,
DEBPRINTK
(
KERN_DEBUG
"%s(%d) %s: IMR 0x%x
\n
"
,
__func__
,
d
->
irq
,
irq_dev
->
name
,
imr
);
irq_dev
->
name
,
imr
);
/* Disable the IRQ line by clearing the bit in the IMR */
/* Disable the IRQ line by clearing the bit in the IMR */
...
@@ -120,13 +120,13 @@ static void gsc_asic_mask_irq(unsigned int irq)
...
@@ -120,13 +120,13 @@ static void gsc_asic_mask_irq(unsigned int irq)
gsc_writel
(
imr
,
irq_dev
->
hpa
+
OFFSET_IMR
);
gsc_writel
(
imr
,
irq_dev
->
hpa
+
OFFSET_IMR
);
}
}
static
void
gsc_asic_unmask_irq
(
unsigned
int
irq
)
static
void
gsc_asic_unmask_irq
(
struct
irq_data
*
d
)
{
{
struct
gsc_asic
*
irq_dev
=
get_irq_chip_data
(
irq
);
struct
gsc_asic
*
irq_dev
=
irq_data_get_irq_chip_data
(
d
);
int
local_irq
=
gsc_find_local_irq
(
irq
,
irq_dev
->
global_irq
,
32
);
int
local_irq
=
gsc_find_local_irq
(
d
->
irq
,
irq_dev
->
global_irq
,
32
);
u32
imr
;
u32
imr
;
DEBPRINTK
(
KERN_DEBUG
"%s(%d) %s: IMR 0x%x
\n
"
,
__func__
,
irq
,
DEBPRINTK
(
KERN_DEBUG
"%s(%d) %s: IMR 0x%x
\n
"
,
__func__
,
d
->
irq
,
irq_dev
->
name
,
imr
);
irq_dev
->
name
,
imr
);
/* Enable the IRQ line by setting the bit in the IMR */
/* Enable the IRQ line by setting the bit in the IMR */
...
@@ -141,8 +141,8 @@ static void gsc_asic_unmask_irq(unsigned int irq)
...
@@ -141,8 +141,8 @@ static void gsc_asic_unmask_irq(unsigned int irq)
static
struct
irq_chip
gsc_asic_interrupt_type
=
{
static
struct
irq_chip
gsc_asic_interrupt_type
=
{
.
name
=
"GSC-ASIC"
,
.
name
=
"GSC-ASIC"
,
.
unmask
=
gsc_asic_unmask_irq
,
.
irq_
unmask
=
gsc_asic_unmask_irq
,
.
mask
=
gsc_asic_mask_irq
,
.
irq_
mask
=
gsc_asic_mask_irq
,
};
};
int
gsc_assign_irq
(
struct
irq_chip
*
type
,
void
*
data
)
int
gsc_assign_irq
(
struct
irq_chip
*
type
,
void
*
data
)
...
...
drivers/parisc/iosapic.c
View file @
1c0f6476
...
@@ -615,10 +615,10 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1)
...
@@ -615,10 +615,10 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1)
}
}
static
void
iosapic_mask_irq
(
unsigned
int
irq
)
static
void
iosapic_mask_irq
(
struct
irq_data
*
d
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
struct
vector_info
*
vi
=
get_irq_chip_data
(
irq
);
struct
vector_info
*
vi
=
irq_data_get_irq_chip_data
(
d
);
u32
d0
,
d1
;
u32
d0
,
d1
;
spin_lock_irqsave
(
&
iosapic_lock
,
flags
);
spin_lock_irqsave
(
&
iosapic_lock
,
flags
);
...
@@ -628,9 +628,9 @@ static void iosapic_mask_irq(unsigned int irq)
...
@@ -628,9 +628,9 @@ static void iosapic_mask_irq(unsigned int irq)
spin_unlock_irqrestore
(
&
iosapic_lock
,
flags
);
spin_unlock_irqrestore
(
&
iosapic_lock
,
flags
);
}
}
static
void
iosapic_unmask_irq
(
unsigned
int
irq
)
static
void
iosapic_unmask_irq
(
struct
irq_data
*
d
)
{
{
struct
vector_info
*
vi
=
get_irq_chip_data
(
irq
);
struct
vector_info
*
vi
=
irq_data_get_irq_chip_data
(
d
);
u32
d0
,
d1
;
u32
d0
,
d1
;
/* data is initialized by fixup_irq */
/* data is initialized by fixup_irq */
...
@@ -666,34 +666,34 @@ printk("\n");
...
@@ -666,34 +666,34 @@ printk("\n");
* enables their IRQ. It can lead to "interesting" race conditions
* enables their IRQ. It can lead to "interesting" race conditions
* in the driver initialization sequence.
* in the driver initialization sequence.
*/
*/
DBG
(
KERN_DEBUG
"enable_irq(%d): eoi(%p, 0x%x)
\n
"
,
irq
,
DBG
(
KERN_DEBUG
"enable_irq(%d): eoi(%p, 0x%x)
\n
"
,
d
->
irq
,
vi
->
eoi_addr
,
vi
->
eoi_data
);
vi
->
eoi_addr
,
vi
->
eoi_data
);
iosapic_eoi
(
vi
->
eoi_addr
,
vi
->
eoi_data
);
iosapic_eoi
(
vi
->
eoi_addr
,
vi
->
eoi_data
);
}
}
static
void
iosapic_eoi_irq
(
unsigned
int
irq
)
static
void
iosapic_eoi_irq
(
struct
irq_data
*
d
)
{
{
struct
vector_info
*
vi
=
get_irq_chip_data
(
irq
);
struct
vector_info
*
vi
=
irq_data_get_irq_chip_data
(
d
);
iosapic_eoi
(
vi
->
eoi_addr
,
vi
->
eoi_data
);
iosapic_eoi
(
vi
->
eoi_addr
,
vi
->
eoi_data
);
cpu_eoi_irq
(
irq
);
cpu_eoi_irq
(
d
);
}
}
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
static
int
iosapic_set_affinity_irq
(
unsigned
int
irq
,
static
int
iosapic_set_affinity_irq
(
struct
irq_data
*
d
,
const
struct
cpumask
*
dest
)
const
struct
cpumask
*
dest
,
bool
force
)
{
{
struct
vector_info
*
vi
=
get_irq_chip_data
(
irq
);
struct
vector_info
*
vi
=
irq_data_get_irq_chip_data
(
d
);
u32
d0
,
d1
,
dummy_d0
;
u32
d0
,
d1
,
dummy_d0
;
unsigned
long
flags
;
unsigned
long
flags
;
int
dest_cpu
;
int
dest_cpu
;
dest_cpu
=
cpu_check_affinity
(
irq
,
dest
);
dest_cpu
=
cpu_check_affinity
(
d
,
dest
);
if
(
dest_cpu
<
0
)
if
(
dest_cpu
<
0
)
return
-
1
;
return
-
1
;
cpumask_copy
(
irq_desc
[
irq
].
affinity
,
cpumask_of
(
dest_cpu
));
cpumask_copy
(
d
->
affinity
,
cpumask_of
(
dest_cpu
));
vi
->
txn_addr
=
txn_affinity_addr
(
irq
,
dest_cpu
);
vi
->
txn_addr
=
txn_affinity_addr
(
d
->
irq
,
dest_cpu
);
spin_lock_irqsave
(
&
iosapic_lock
,
flags
);
spin_lock_irqsave
(
&
iosapic_lock
,
flags
);
/* d1 contains the destination CPU, so only want to set that
/* d1 contains the destination CPU, so only want to set that
...
@@ -709,12 +709,12 @@ static int iosapic_set_affinity_irq(unsigned int irq,
...
@@ -709,12 +709,12 @@ static int iosapic_set_affinity_irq(unsigned int irq,
static
struct
irq_chip
iosapic_interrupt_type
=
{
static
struct
irq_chip
iosapic_interrupt_type
=
{
.
name
=
"IO-SAPIC-level"
,
.
name
=
"IO-SAPIC-level"
,
.
unmask
=
iosapic_unmask_irq
,
.
irq_
unmask
=
iosapic_unmask_irq
,
.
mask
=
iosapic_mask_irq
,
.
irq_
mask
=
iosapic_mask_irq
,
.
ack
=
cpu_ack_irq
,
.
irq_
ack
=
cpu_ack_irq
,
.
eoi
=
iosapic_eoi_irq
,
.
irq_
eoi
=
iosapic_eoi_irq
,
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
.
set_affinity
=
iosapic_set_affinity_irq
,
.
irq_
set_affinity
=
iosapic_set_affinity_irq
,
#endif
#endif
};
};
...
...
drivers/parisc/superio.c
View file @
1c0f6476
...
@@ -286,8 +286,9 @@ superio_init(struct pci_dev *pcidev)
...
@@ -286,8 +286,9 @@ superio_init(struct pci_dev *pcidev)
}
}
DECLARE_PCI_FIXUP_FINAL
(
PCI_VENDOR_ID_NS
,
PCI_DEVICE_ID_NS_87560_LIO
,
superio_init
);
DECLARE_PCI_FIXUP_FINAL
(
PCI_VENDOR_ID_NS
,
PCI_DEVICE_ID_NS_87560_LIO
,
superio_init
);
static
void
superio_mask_irq
(
unsigned
int
irq
)
static
void
superio_mask_irq
(
struct
irq_data
*
d
)
{
{
unsigned
int
irq
=
d
->
irq
;
u8
r8
;
u8
r8
;
if
((
irq
<
1
)
||
(
irq
==
2
)
||
(
irq
>
7
))
{
if
((
irq
<
1
)
||
(
irq
==
2
)
||
(
irq
>
7
))
{
...
@@ -303,8 +304,9 @@ static void superio_mask_irq(unsigned int irq)
...
@@ -303,8 +304,9 @@ static void superio_mask_irq(unsigned int irq)
outb
(
r8
,
IC_PIC1
+
1
);
outb
(
r8
,
IC_PIC1
+
1
);
}
}
static
void
superio_unmask_irq
(
unsigned
int
irq
)
static
void
superio_unmask_irq
(
struct
irq_data
*
d
)
{
{
unsigned
int
irq
=
d
->
irq
;
u8
r8
;
u8
r8
;
if
((
irq
<
1
)
||
(
irq
==
2
)
||
(
irq
>
7
))
{
if
((
irq
<
1
)
||
(
irq
==
2
)
||
(
irq
>
7
))
{
...
@@ -321,8 +323,8 @@ static void superio_unmask_irq(unsigned int irq)
...
@@ -321,8 +323,8 @@ static void superio_unmask_irq(unsigned int irq)
static
struct
irq_chip
superio_interrupt_type
=
{
static
struct
irq_chip
superio_interrupt_type
=
{
.
name
=
SUPERIO
,
.
name
=
SUPERIO
,
.
unmask
=
superio_unmask_irq
,
.
irq_
unmask
=
superio_unmask_irq
,
.
mask
=
superio_mask_irq
,
.
irq_
mask
=
superio_mask_irq
,
};
};
#ifdef DEBUG_SUPERIO_INIT
#ifdef DEBUG_SUPERIO_INIT
...
...
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