linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YhLu <YhLu@tyan.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: 256 apic id for amd64
Date: Tue, 28 Dec 2004 20:43:47 -0800	[thread overview]
Message-ID: <3174569B9743D511922F00A0C943142307290EEE@TYANWEB> (raw)

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

Can someone who maintains the x86-64 io_apic.c look at my patch about 256
apic id for amd64?

YH


[-- Attachment #2: x86_64_ioapic.patch --]
[-- Type: application/octet-stream, Size: 1300 bytes --]

diff -uNr linux-2.6.10/arch/x86_64/kernel/io_apic.c linux-2.6.10.new.x86_64/arch/x86_64/kernel/io_apic.c
--- linux-2.6.10/arch/x86_64/kernel/io_apic.c	2004-12-24 13:34:45.000000000 -0800
+++ linux-2.6.10.new.x86_64/arch/x86_64/kernel/io_apic.c	2004-12-28 15:46:35.828076192 -0800
@@ -1148,6 +1148,19 @@
 	unsigned char old_id;
 	unsigned long flags;
 
+        unsigned int max_apic;
+        u32 vendor;
+
+        /* get the max apic */
+        vendor = read_pci_config(0, 0x18, 0, PCI_VENDOR_ID);
+        vendor &= 0xffff;
+        if(vendor == PCI_VENDOR_ID_AMD) { /* AMD */
+                max_apic = (((read_pci_config(0, 0x18, 0, 0x68)>>17) & 3) == 3) ? 0xff : 0xf;
+        }
+        else { /* intel:  how to find out if intel em64t support 256 apic id? */
+                max_apic = 0xf;
+        }
+
 	/*
 	 * Set the IOAPIC ID to the value stored in the MPC table.
 	 */
@@ -1160,7 +1173,7 @@
 		
 		old_id = mp_ioapics[apic].mpc_apicid;
 
-		if (mp_ioapics[apic].mpc_apicid >= 0xf) {
+		if (mp_ioapics[apic].mpc_apicid >= max_apic) {
 			apic_printk(APIC_QUIET,KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n",
 				apic, mp_ioapics[apic].mpc_apicid);
 			apic_printk(APIC_QUIET,KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",

             reply	other threads:[~2004-12-29  4:33 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-29  4:43 YhLu [this message]
2004-12-30 18:45 ` 256 apic id for amd64 Andi Kleen
2004-12-30 22:56   ` Matt Domsch
2004-12-30 23:26     ` Andi Kleen
2004-12-30 23:16 YhLu
2004-12-30 23:19 YhLu
2005-01-07  1:06 YhLu
2005-01-07 12:44 ` Andi Kleen
2005-01-07  2:53 YhLu
2005-01-07 12:24 ` Andi Kleen
2005-01-08  1:30   ` James Cleverdon
2005-01-07 18:19 YhLu
2005-01-07 19:29 ` Andi Kleen
2005-01-07 18:27 YhLu
2005-01-07 19:29 ` Andi Kleen
2005-01-07 19:43 YhLu
2005-01-07 19:40 ` Andi Kleen
2005-01-07 21:14 YhLu
2005-01-07 21:12 ` Andi Kleen
2005-01-07 21:44 YhLu
2005-01-07 22:18 ` Andi Kleen
2005-01-08  0:04 YhLu
2005-01-08  0:12 ` James Cleverdon
2005-01-08  0:28 YhLu
2005-01-08  0:26 ` James Cleverdon
2005-01-08  0:34   ` Andi Kleen
2005-01-08  0:50 YhLu
2005-01-08  0:42 ` Andi Kleen
2005-01-08  1:50 YhLu
2005-01-08  2:37 Mikael Pettersson
2005-01-08 15:46 ` Andi Kleen
2005-01-08  2:53 YhLu
2005-01-09 23:56 ` James Cleverdon
2005-01-10 18:44 Andi Kleen
2005-01-11  4:04 ` Siddha, Suresh B
2005-01-11  4:39   ` Andi Kleen
2005-01-11 17:50   ` Andi Kleen
2005-01-10 18:48 YhLu
2005-01-10 18:45 ` Andi Kleen
2005-01-10 19:41 YhLu
2005-01-10 19:43 ` Andi Kleen
2005-01-11  0:42 ` James Cleverdon
2005-01-11  3:28   ` Siddha, Suresh B
2005-01-11  4:42     ` Andi Kleen
2005-01-10 20:09 YhLu
2005-01-10 20:18 ` Andi Kleen
2005-01-10 20:37 YhLu
2005-01-10 20:46 YhLu
2005-01-11  5:36 ` Andi Kleen
2005-01-10 20:48 YhLu
2005-01-11 19:04 YhLu
2005-01-11 19:11 YhLu

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=3174569B9743D511922F00A0C943142307290EEE@TYANWEB \
    --to=yhlu@tyan.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).