mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: Tobias Diedrich <ranma+kernel@tdiedrich.de>,
	Yinghai Lu <yinghai.lu@amd.com>, Andrew Morton <akpm@osdl.org>,
	Adrian Bunk <bunk@stusta.de>, Andi Kleen <ak@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq
Date: Mon, 08 Jan 2007 08:49:36 -0700	[thread overview]
Message-ID: <m1lkkdikmn.fsf_-_@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0701071708240.3661@woody.osdl.org> (Linus Torvalds's message of "Sun, 7 Jan 2007 17:09:17 -0800 (PST)")


To try different irq routing combinations so we can make an informed
guess as to how to route irqs when the BIOS gets it wrong we need
the ability to modify our irq routing data structures.

This adds remove_pin_to_irq which removes the mapping from and apic pin
to an irq.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/x86_64/kernel/io_apic.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 2a1dcd5..7365f5f 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -286,6 +286,29 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
 	entry->pin = pin;
 }
 
+static void remove_pin_to_irq(unsigned int irq, int apic, int pin)
+{
+	struct irq_pin_list *entry = irq_2_pin + irq;
+
+	BUG_ON(irq >= NR_IRQS);
+
+	while (entry->next && ((entry->apic != apic) || (entry->pin != pin)))
+		entry = irq_2_pin + entry->next;
+
+	if (entry->pin == apic && entry->pin == pin) {
+		if (entry->next) {
+			struct irq_pin_list *next = irq_2_pin + entry->next;
+			*entry = *next;
+			next->pin = -1;
+			next->apic = -1;
+			next->next = 0;
+		} else {
+			entry->pin = -1;
+			entry->apic = -1;
+		}
+	}
+}
+
 
 #define DO_ACTION(name,R,ACTION, FINAL)					\
 									\
-- 
1.4.4.1.g278f


  reply	other threads:[~2007-01-08 15:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5986589C150B2F49A46483AC44C7BCA490733F@ssvlexmb2.amd.com>
2007-01-03  6:23 ` 2.6.20-rc3: known unfixed regressions - x86_64 boot failure: "IO-APIC + timer doesn't work" Yinghai Lu
2007-01-08  0:55   ` Tobias Diedrich
2007-01-08  1:09     ` Linus Torvalds
2007-01-08 15:49       ` Eric W. Biederman [this message]
2007-01-08 15:53         ` PATCH 2/4] x86_64 io_apic: Implement irq_from_pin Eric W. Biederman
2007-01-08 15:56           ` [PATCH 3/4] x86_64 io_apic: Implment update_irq0_entry Eric W. Biederman
2007-01-08 16:11             ` [PATCH 4/4] x86_64 ioapic: Improve the heuristics for when check_timer fails Eric W. Biederman
2007-01-08 20:21               ` Adrian Bunk
2007-01-08 21:45                 ` Eric W. Biederman
2007-01-08 22:33                   ` Adrian Bunk
2007-01-08 22:57                     ` Linus Torvalds
2007-01-08 23:14                     ` [discuss] " Andi Kleen
2007-01-08 23:21                       ` Adrian Bunk
2007-01-08 23:18                     ` Eric W. Biederman
2007-01-09 22:00               ` Tobias Diedrich
2007-01-08 21:09 [PATCH 1/4] x86_64 io_apic: Implement remove_pin_to_irq Lu, Yinghai
2007-01-08 21:30 ` Eric W. Biederman
2007-01-08 21:46 Lu, Yinghai

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=m1lkkdikmn.fsf_-_@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ranma+kernel@tdiedrich.de \
    --cc=torvalds@osdl.org \
    --cc=yinghai.lu@amd.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

Powered by JetHome