From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Adam Belay <ambx1@neo.rr.com>,
Matthieu Castet <castet.matthieu@free.fr>,
Li Shaohua <shaohua.li@intel.com>,
Len Brown <len.brown@intel.com>,
linux-acpi@vger.kernel.org,
Russell King <rmk+serial@arm.linux.org.uk>,
linux-serial@vger.kernel.org
Subject: [PATCH 1/2] PNPACPI: support shareable interrupts
Date: Fri, 30 Jun 2006 12:58:26 -0600 [thread overview]
Message-ID: <200606301258.26794.bjorn.helgaas@hp.com> (raw)
ACPI supplies a "shareable" indication, but PNPACPI ignores it.
If a PNP device uses a shared interrupt, request_irq() fails
because the PNP driver can't tell whether to supply SA_SHIRQ.
This patch allows PNP drivers to test
(pnp_irq_flags(dev, 0) & IORESOURCE_IRQ_SHAREABLE)
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Index: work-mm7/include/linux/ioport.h
===================================================================
--- work-mm7.orig/include/linux/ioport.h 2006-06-30 11:52:21.000000000 -0600
+++ work-mm7/include/linux/ioport.h 2006-06-30 12:18:41.000000000 -0600
@@ -55,6 +55,7 @@
#define IORESOURCE_IRQ_LOWEDGE (1<<1)
#define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
#define IORESOURCE_IRQ_LOWLEVEL (1<<3)
+#define IORESOURCE_IRQ_SHAREABLE (1<<4)
/* ISA PnP DMA specific bits (IORESOURCE_BITS) */
#define IORESOURCE_DMA_TYPE_MASK (3<<0)
Index: work-mm7/drivers/pnp/pnpacpi/rsparser.c
===================================================================
--- work-mm7.orig/drivers/pnp/pnpacpi/rsparser.c 2006-06-30 11:52:18.000000000 -0600
+++ work-mm7/drivers/pnp/pnpacpi/rsparser.c 2006-06-30 12:18:41.000000000 -0600
@@ -74,7 +74,7 @@
static void
pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, u32 gsi,
- int triggering, int polarity)
+ int triggering, int polarity, int shareable)
{
int i = 0;
int irq;
@@ -95,6 +95,9 @@
return;
}
+ if (shareable)
+ res->irq_resource[i].flags |= IORESOURCE_IRQ_SHAREABLE;
+
res->irq_resource[i].start = irq;
res->irq_resource[i].end = irq;
pcibios_penalize_isa_irq(irq, 1);
@@ -197,7 +200,8 @@
pnpacpi_parse_allocated_irqresource(res_table,
res->data.irq.interrupts[i],
res->data.irq.triggering,
- res->data.irq.polarity);
+ res->data.irq.polarity,
+ res->data.irq.sharable);
}
break;
@@ -263,7 +267,8 @@
pnpacpi_parse_allocated_irqresource(res_table,
res->data.extended_irq.interrupts[i],
res->data.extended_irq.triggering,
- res->data.extended_irq.polarity);
+ res->data.extended_irq.polarity,
+ res->data.extended_irq.sharable);
}
break;
next reply other threads:[~2006-06-30 18:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-30 18:58 Bjorn Helgaas [this message]
2006-06-30 23:02 ` [PATCH 1/2] PNPACPI: support shareable interrupts Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2006-07-01 0:59 Brown, Len
2006-07-01 1:14 ` Andrew Morton
2006-07-01 3:50 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200606301258.26794.bjorn.helgaas@hp.com \
--to=bjorn.helgaas@hp.com \
--cc=akpm@osdl.org \
--cc=ambx1@neo.rr.com \
--cc=castet.matthieu@free.fr \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rmk+serial@arm.linux.org.uk \
--cc=shaohua.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox