git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nfs: new subdir Documentation/filesystems/nfs
[safe/jmp/linux-2.6]
/
drivers
/
parisc
/
iosapic.c
diff --git
a/drivers/parisc/iosapic.c
b/drivers/parisc/iosapic.c
index
6fb3f79
..
88e3335
100644
(file)
--- a/
drivers/parisc/iosapic.c
+++ b/
drivers/parisc/iosapic.c
@@
-487,7
+487,7
@@
iosapic_xlate_pin(struct iosapic_info *isi, struct pci_dev *pcidev)
}
/* Check if pcidev behind a PPB */
}
/* Check if pcidev behind a PPB */
- if (
NULL != pcidev->bus->self
) {
+ if (
pcidev->bus->parent
) {
/* Convert pcidev INTR_PIN into something we
** can lookup in the IRT.
*/
/* Convert pcidev INTR_PIN into something we
** can lookup in the IRT.
*/
@@
-519,15
+519,13
@@
iosapic_xlate_pin(struct iosapic_info *isi, struct pci_dev *pcidev)
**
** Advantage is it's really easy to implement.
*/
**
** Advantage is it's really easy to implement.
*/
- intr_pin = ((intr_pin-1)+PCI_SLOT(pcidev->devfn)) % 4;
- intr_pin++; /* convert back to INTA-D (1-4) */
+ intr_pin = pci_swizzle_interrupt_pin(pcidev, intr_pin);
#endif /* PCI_BRIDGE_FUNCS */
/*
#endif /* PCI_BRIDGE_FUNCS */
/*
- ** Locate the host slot the PPB nearest the Host bus
- ** adapter.
- */
- while (NULL != p->parent->self)
+ * Locate the host slot of the PPB.
+ */
+ while (p->parent->parent)
p = p->parent;
intr_slot = PCI_SLOT(p->self->devfn);
p = p->parent;
intr_slot = PCI_SLOT(p->self->devfn);
@@
-619,7
+617,9
@@
iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1)
static struct vector_info *iosapic_get_vector(unsigned int irq)
{
static struct vector_info *iosapic_get_vector(unsigned int irq)
{
- return irq_desc[irq].chip_data;
+ struct irq_desc *desc = irq_to_desc(irq);
+
+ return desc->chip_data;
}
static void iosapic_disable_irq(unsigned int irq)
}
static void iosapic_disable_irq(unsigned int irq)
@@
-702,16
+702,20
@@
static unsigned int iosapic_startup_irq(unsigned int irq)
}
#ifdef CONFIG_SMP
}
#ifdef CONFIG_SMP
-static void iosapic_set_affinity_irq(unsigned int irq, cpumask_t dest)
+static int iosapic_set_affinity_irq(unsigned int irq,
+ const struct cpumask *dest)
{
struct vector_info *vi = iosapic_get_vector(irq);
u32 d0, d1, dummy_d0;
unsigned long flags;
{
struct vector_info *vi = iosapic_get_vector(irq);
u32 d0, d1, dummy_d0;
unsigned long flags;
+ int dest_cpu;
- if (cpu_check_affinity(irq, &dest))
- return;
+ dest_cpu = cpu_check_affinity(irq, dest);
+ if (dest_cpu < 0)
+ return -1;
- vi->txn_addr = txn_affinity_addr(irq, first_cpu(dest));
+ cpumask_copy(irq_desc[irq].affinity, cpumask_of(dest_cpu));
+ vi->txn_addr = txn_affinity_addr(irq, dest_cpu);
spin_lock_irqsave(&iosapic_lock, flags);
/* d1 contains the destination CPU, so only want to set that
spin_lock_irqsave(&iosapic_lock, flags);
/* d1 contains the destination CPU, so only want to set that
@@
-720,10
+724,12
@@
static void iosapic_set_affinity_irq(unsigned int irq, cpumask_t dest)
iosapic_set_irt_data(vi, &dummy_d0, &d1);
iosapic_wr_irt_entry(vi, d0, d1);
spin_unlock_irqrestore(&iosapic_lock, flags);
iosapic_set_irt_data(vi, &dummy_d0, &d1);
iosapic_wr_irt_entry(vi, d0, d1);
spin_unlock_irqrestore(&iosapic_lock, flags);
+
+ return 0;
}
#endif
}
#endif
-static struct
hw_interrupt_type
iosapic_interrupt_type = {
+static struct
irq_chip
iosapic_interrupt_type = {
.typename = "IO-SAPIC-level",
.startup = iosapic_startup_irq,
.shutdown = iosapic_disable_irq,
.typename = "IO-SAPIC-level",
.startup = iosapic_startup_irq,
.shutdown = iosapic_disable_irq,