All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Ostrowski <mostrows@watson.ibm.com>
To: <linuxppc-dev@ozlabs.org>
Subject: [PATCH] Do not write virq back to PCI config space (revised patch).
Date: Wed, 27 Dec 2006 22:14:43 -0600	[thread overview]
Message-ID: <E1GzmfD-00076j-G2@arlx188.austin.ibm.com> (raw)


(Revised version, includes changes for 32 and 64 bit platforms.)

- Drivers will not rely on the PCI config space value, as they've
  already been conditioned to rely on the irq field in "struct pci_dev".

- The virq value may not be < 256 as it has been remapped.

- The PCI config space should reflect the hardware configuration, which
  is not being changed.  We are only creating a virtual irq mapping that
  exists in the kernel only. One would never expect the PCI hardware to
  generate the "virq" interrupt.

Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
---
 arch/powerpc/kernel/pci_32.c |    1 -
 arch/powerpc/kernel/pci_64.c |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 0d9ff72..0df9126 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -1459,7 +1459,6 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
 		return -1;
 	}
 	pci_dev->irq = virq;
-	pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq);
 
 	return 0;
 }
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 9bae8a5..81a73fb 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -1305,7 +1305,6 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
 	DBG(" -> mapped to linux irq %d\n", virq);
 
 	pci_dev->irq = virq;
-	pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq);
 
 	return 0;
 }
-- 
1.4.4.2

             reply	other threads:[~2006-12-28  4:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-28  4:14 Michal Ostrowski [this message]
2006-12-28  4:45 ` [PATCH] Do not write virq back to PCI config space (revised patch) Benjamin Herrenschmidt

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=E1GzmfD-00076j-G2@arlx188.austin.ibm.com \
    --to=mostrows@watson.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.