mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Karsten Wiese <annabellesgarden@yahoo.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: "K.R. Foley" <kr@cybsft.com>, Chuck Harding <charding@llnl.gov>,
	William Weston <weston@sysex.net>,
	Linux Kernel Discussion List <linux-kernel@vger.kernel.org>,
	Gene Heskett <gene.heskett@verizon.net>
Subject: Re: Realtime Preemption, 2.6.12, Beginners Guide?
Date: Tue, 19 Jul 2005 13:14:23 +0200	[thread overview]
Message-ID: <200507191314.24093.annabellesgarden@yahoo.de> (raw)
In-Reply-To: <200507171407.20373.annabellesgarden@yahoo.de>

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

Am Sonntag, 17. Juli 2005 14:07 schrieb Karsten Wiese:
> Am Samstag, 16. Juli 2005 19:15 schrieb Ingo Molnar:
> > 
> > * Karsten Wiese <annabellesgarden@yahoo.de> wrote:
> > 
> > > Have I corrected the other path of ioapic early initialization, which 
> > > had lacked virtual-address setup before ioapic_data[ioapic] was to be 
> > > filled in -51-28? Please test attached patch on top of -51-29 or 
> > > later. Also on Systems that liked -51-28.
> > 
> > thanks - i've applied it to my tree and have released the -51-31 patch.  
> > It looks good on my testboxes.
> > 
> Found another error:
> the ioapic cache isn't fully initialized in -51-31's ioapic_cache_init().
> <snip>
> 
and another: some NULL-pointers are used in -51-31 instead of ioapic_data[0].
Please apply attached patch on top of -51-31. It includes yesterday's fix.

    Karsten

[-- Attachment #2: io_apic-RT-51-31.2 --]
[-- Type: text/x-diff, Size: 4698 bytes --]

--- linux-2.6.12-RT-51-31/arch/i386/kernel/io_apic.c	2005-07-17 12:40:35.000000000 +0200
+++ linux-2.6.12-RT/arch/i386/kernel/io_apic.c	2005-07-19 12:53:00.000000000 +0200
@@ -158,7 +158,7 @@
 static void __init ioapic_cache_init(struct ioapic_data_struct *ioapic)
 {
 	int reg;
-	for (reg = 0; reg < (ioapic->nr_registers + 10); reg++)
+	for (reg = 0; reg < (0x10 + 2 * ioapic->nr_registers); reg++)
 		ioapic->cached_val[reg] = __raw_io_apic_read(ioapic, reg);
 }
 # endif
@@ -1396,8 +1396,8 @@
 	 * Add it to the IO-APIC irq-routing table:
 	 */
 	spin_lock_irqsave(&ioapic_lock, flags);
-	io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1));
-	io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0));
+	io_apic_write(ioapic_data[0], 0x11+2*pin, *(((int *)&entry)+1));
+	io_apic_write(ioapic_data[0], 0x10+2*pin, *(((int *)&entry)+0));
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 
 	enable_8259A_irq(0);
@@ -2087,25 +2087,25 @@
  * races.
  */
 static struct hw_interrupt_type ioapic_edge_type = {
-	.typename 	= "IO-APIC-edge",
+	.typename	= "IO-APIC-edge",
 	.startup 	= startup_edge_ioapic,
 	.shutdown 	= shutdown_edge_ioapic,
 	.enable 	= enable_edge_ioapic,
 	.disable 	= disable_edge_ioapic,
 	.ack 		= ack_edge_ioapic,
 	.end 		= end_edge_ioapic,
-	.set_affinity 	= set_ioapic_affinity,
+	.set_affinity	= set_ioapic_affinity,
 };
 
 static struct hw_interrupt_type ioapic_level_type = {
-	.typename 	= "IO-APIC-level",
+	.typename	= "IO-APIC-level",
 	.startup 	= startup_level_ioapic,
 	.shutdown 	= shutdown_level_ioapic,
 	.enable 	= enable_level_ioapic,
 	.disable 	= disable_level_ioapic,
 	.ack 		= mask_and_ack_level_ioapic,
 	.end 		= end_level_ioapic,
-	.set_affinity 	= set_ioapic_affinity,
+	.set_affinity	= set_ioapic_affinity,
 };
 
 static inline void init_IO_APIC_traps(void)
@@ -2169,13 +2169,13 @@
 static void end_lapic_irq (unsigned int i) { /* nothing */ }
 
 static struct hw_interrupt_type lapic_irq_type = {
-	.typename 	= "local-APIC-edge",
-	.startup 	= NULL, /* startup_irq() not used for IRQ0 */
-	.shutdown 	= NULL, /* shutdown_irq() not used for IRQ0 */
-	.enable 	= enable_lapic_irq,
-	.disable 	= disable_lapic_irq,
-	.ack 		= ack_lapic_irq,
-	.end 		= end_lapic_irq
+	.typename	= "local-APIC-edge",
+	.startup	= NULL, /* startup_irq() not used for IRQ0 */
+	.shutdown	= NULL, /* shutdown_irq() not used for IRQ0 */
+	.enable		= enable_lapic_irq,
+	.disable	= disable_lapic_irq,
+	.ack		= ack_lapic_irq,
+	.end		= end_lapic_irq
 };
 
 static void setup_nmi (void)
@@ -2209,16 +2209,17 @@
 	struct IO_APIC_route_entry entry0, entry1;
 	unsigned char save_control, save_freq_select;
 	unsigned long flags;
+	struct ioapic_data_struct *ioapic0 = ioapic_data[0];
 
 	pin = find_isa_irq_pin(8, mp_INT);
 	if (pin == -1)
 		return;
 
 	spin_lock_irqsave(&ioapic_lock, flags);
-	*(((int *)&entry0) + 1) = io_apic_read(0, 0x11 + 2 * pin);
-	*(((int *)&entry0) + 0) = io_apic_read(0, 0x10 + 2 * pin);
+	*(((int *)&entry0) + 1) = io_apic_read(ioapic0, 0x11 + 2 * pin);
+	*(((int *)&entry0) + 0) = io_apic_read(ioapic0, 0x10 + 2 * pin);
 	spin_unlock_irqrestore(&ioapic_lock, flags);
-	clear_IO_APIC_pin(0, pin);
+	clear_IO_APIC_pin(ioapic0, pin);
 
 	memset(&entry1, 0, sizeof(entry1));
 
@@ -2231,8 +2232,8 @@
 	entry1.vector = 0;
 
 	spin_lock_irqsave(&ioapic_lock, flags);
-	io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry1) + 1));
-	io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry1) + 0));
+	io_apic_write(ioapic0, 0x11 + 2 * pin, *(((int *)&entry1) + 1));
+	io_apic_write(ioapic0, 0x10 + 2 * pin, *(((int *)&entry1) + 0));
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 
 	save_control = CMOS_READ(RTC_CONTROL);
@@ -2250,11 +2251,11 @@
 
 	CMOS_WRITE(save_control, RTC_CONTROL);
 	CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
-	clear_IO_APIC_pin(0, pin);
+	clear_IO_APIC_pin(ioapic0, pin);
 
 	spin_lock_irqsave(&ioapic_lock, flags);
-	io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry0) + 1));
-	io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry0) + 0));
+	io_apic_write(ioapic0, 0x11 + 2 * pin, *(((int *)&entry0) + 1));
+	io_apic_write(ioapic0, 0x10 + 2 * pin, *(((int *)&entry0) + 0));
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
@@ -2268,6 +2269,7 @@
 {
 	int pin1, pin2;
 	int vector;
+	struct ioapic_data_struct *ioapic0 = ioapic_data[0];
 
 	/*
 	 * get/set the timer IRQ vector:
@@ -2309,7 +2311,7 @@
 			}
 			return;
 		}
-		clear_IO_APIC_pin(0, pin1);
+		clear_IO_APIC_pin(ioapic0, pin1);
 		printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n");
 	}
 
@@ -2334,7 +2336,7 @@
 		/*
 		 * Cleanup, just in case ...
 		 */
-		clear_IO_APIC_pin(0, pin2);
+		clear_IO_APIC_pin(ioapic0, pin2);
 	}
 	printk(" failed.\n");
 

  parent reply	other threads:[~2005-07-19 11:11 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06 11:57 Alistair John Strachan
2005-07-06 12:51 ` Alistair John Strachan
2005-07-06 13:39   ` Ingo Molnar
2005-07-06 15:58     ` Alistair John Strachan
2005-07-06 16:28       ` Ingo Molnar
2005-07-06 16:31         ` Alistair John Strachan
2005-07-06 13:31 ` Ingo Molnar
2005-07-06 15:55   ` Alistair John Strachan
2005-07-06 16:24     ` Ingo Molnar
2005-07-06 16:37       ` Alistair John Strachan
2005-07-06 16:56         ` Alistair John Strachan
2005-07-06 17:01           ` Ingo Molnar
2005-07-06 17:14             ` Alistair John Strachan
2005-07-06 17:27               ` Ingo Molnar
2005-07-06 18:23                 ` Alistair John Strachan
2005-07-06 18:38                   ` Ingo Molnar
2005-07-06 18:41                     ` Ingo Molnar
2005-07-06 19:47                       ` Alistair John Strachan
2005-07-06 20:44                         ` Ingo Molnar
2005-07-06 21:00                           ` Alistair John Strachan
2005-07-06 21:02                             ` Ingo Molnar
2005-07-06 22:15                               ` Alistair John Strachan
2005-07-06 23:08                                 ` Fernando Lopez-Lezcano
2005-07-07  6:04                                   ` Michal Schmidt
2005-07-07 10:25                                     ` Ingo Molnar
2005-07-07  9:46                           ` Alistair John Strachan
2005-07-07 11:21                             ` Alistair John Strachan
2005-07-07 11:29                               ` Ingo Molnar
2005-07-07 11:37                                 ` Alistair John Strachan
2005-07-07 11:42                                   ` Ingo Molnar
2005-07-07 12:15                                     ` Alistair John Strachan
2005-07-07 12:29                                       ` Ingo Molnar
2005-07-07 13:38                                         ` Alistair John Strachan
2005-07-07 12:33                                       ` Alistair John Strachan
2005-07-08  9:47                                     ` Alistair John Strachan
2005-07-08 11:46                                       ` Ingo Molnar
2005-07-08 18:38                                         ` Alistair John Strachan
2005-07-08 19:12                                           ` USB storage does not work with 3GB of RAM, but does with 2G of RAM Jon Schindler
2005-07-08 19:25                                           ` Realtime Preemption, 2.6.12, Beginners Guide? Ingo Molnar
2005-07-08 19:31                                           ` Ingo Molnar
2005-07-08 19:34                                             ` Ingo Molnar
2005-07-08 19:48                                           ` Ingo Molnar
2005-07-08 19:55                                             ` Alistair John Strachan
2005-07-08 20:45                                             ` Alistair John Strachan
2005-07-09 11:58                                               ` Ingo Molnar
2005-07-09 14:07                                                 ` Alistair John Strachan
2005-07-09 14:55                                                   ` Ingo Molnar
2005-07-09 15:57                                                   ` Ingo Molnar
2005-07-09 16:02                                                     ` Ingo Molnar
2005-07-09 16:04                                                     ` Alistair John Strachan
2005-07-11 13:55                                                       ` Alistair John Strachan
2005-07-11 14:12                                                         ` Ingo Molnar
2005-07-11 14:16                                                           ` Ingo Molnar
2005-07-11 14:38                                                             ` Alistair John Strachan
2005-07-11 14:43                                                               ` Ingo Molnar
2005-07-11 15:50                                                                 ` Alistair John Strachan
2005-07-13 14:45                                                                   ` Ingo Molnar
2005-07-13 15:30                                                                     ` Ingo Molnar
2005-07-14 19:58                                                                       ` Alistair John Strachan
2005-07-14 20:16                                                                         ` Lee Revell
2005-07-15 22:12                                                                           ` Alistair John Strachan
2005-07-12  2:56                                                               ` Lee Revell
2005-07-11 15:07                                                             ` Ingo Molnar
2005-07-12 20:09                                                               ` Lee Revell
2005-07-12 21:01                                                                 ` Chuck Harding
2005-07-13 10:39                                                                   ` Ingo Molnar
2005-07-13 12:29                                                                     ` Gene Heskett
2005-07-13 14:01                                                                     ` K.R. Foley
2005-07-13 19:41                                                                       ` Chuck Harding
2005-07-13 19:45                                                                         ` Ingo Molnar
2005-07-14 13:39                                                                           ` K.R. Foley
2005-07-14 12:50                                                                       ` Karsten Wiese
2005-07-14 13:56                                                                         ` K.R. Foley
2005-07-14 14:10                                                                           ` K.R. Foley
2005-07-14 14:11                                                                             ` K.R. Foley
2005-07-14 19:49                                                                         ` Chuck Harding
2005-07-16 17:15                                                                         ` Ingo Molnar
2005-07-16 19:01                                                                           ` K.R. Foley
2005-07-17 12:07                                                                           ` Karsten Wiese
2005-07-18 15:46                                                                             ` K.R. Foley
2005-07-19 11:14                                                                             ` Karsten Wiese [this message]
2005-07-19 13:35                                                                               ` Gene Heskett
2005-07-19 13:57                                                                               ` Ingo Molnar
2005-07-19 15:19                                                                                 ` Gene Heskett
2005-07-19 23:00                                                                                   ` Karsten Wiese
2005-07-09 12:41                                               ` Ingo Molnar
2005-07-09 12:46                                                 ` Ingo Molnar
2005-07-09 13:05                                                 ` Ingo Molnar
2005-07-11 22:48                                                   ` William Weston
2005-07-12 13:53                                                     ` Ingo Molnar
2005-07-09 13:13                                                 ` Ingo Molnar
2005-07-09 13:26                                                 ` Ingo Molnar
2005-07-10 19:01                                                   ` PCMCIA stack reduction patch [Was: Re: Realtime Preemption, 2.6.12, Beginners Guide?] Dominik Brodowski
2005-07-09 13:36                                                 ` Realtime Preemption, 2.6.12, Beginners Guide? Ingo Molnar
2005-07-11 13:28                                                 ` Paulo Marques
2005-07-08 11:48                                       ` Ingo Molnar
2005-07-08 17:42                                         ` Alistair John Strachan
2005-07-08 17:48                                           ` Jakub Jelinek
2005-07-08 18:12                                             ` Alistair John Strachan
     [not found] <20050713063310.GA12661@elte.hu>
2005-07-13 10:30 ` karsten wiese
2005-07-13 18:38   ` Chuck Harding

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=200507191314.24093.annabellesgarden@yahoo.de \
    --to=annabellesgarden@yahoo.de \
    --cc=charding@llnl.gov \
    --cc=gene.heskett@verizon.net \
    --cc=kr@cybsft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=weston@sysex.net \
    /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

all inboxes | Powered by JetHome®