public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND] [PATCH] x86: Allow MMCONFIG above 4GB on x86_64
@ 2008-07-10 17:51 John Keller
  0 siblings, 0 replies; 5+ messages in thread
From: John Keller @ 2008-07-10 17:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-acpi, John Keller

SGI UV will have MMCFG base addresses that are greater than 4GB (32 bits).

Signed-off-by: John Keller <jpk@sgi.com>
---

Resend #1: Use CONFIG_RESOURCES_64BIT instead of CONFIG_X86_64.


A similar patch was submitted over a year ago, but apparently was not
merged in.

   http://marc.info/?l=linux-acpi&m=117283388212912&w=2


Index: linux-2.6/arch/x86/kernel/acpi/boot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/boot.c	2008-07-09 13:02:54.000000000 -0500
+++ linux-2.6/arch/x86/kernel/acpi/boot.c	2008-07-10 10:19:28.000000000 -0500
@@ -200,6 +200,7 @@ int __init acpi_parse_mcfg(struct acpi_t
 	}
 
 	memcpy(pci_mmcfg_config, &mcfg[1], config_size);
+#ifndef CONFIG_RESOURCES_64BIT
 	for (i = 0; i < pci_mmcfg_config_num; ++i) {
 		if (pci_mmcfg_config[i].address > 0xFFFFFFFF) {
 			printk(KERN_ERR PREFIX
@@ -209,6 +210,7 @@ int __init acpi_parse_mcfg(struct acpi_t
 			return -ENODEV;
 		}
 	}
+#endif
 
 	return 0;
 }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RESEND] [PATCH] x86: Allow MMCONFIG above 4GB on x86_64
@ 2008-07-15 19:47 John Keller
  2008-07-29 19:34 ` John Keller
  0 siblings, 1 reply; 5+ messages in thread
From: John Keller @ 2008-07-15 19:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-acpi, John Keller

SGI UV will have MMCFG base addresses that are greater than 4GB (32 bits).

Signed-off-by: John Keller <jpk@sgi.com>
---

Resend #2: Create a flag, that is set by platform specific code,
           to disable the > 4GB check.

Resend #1: Use CONFIG_RESOURCES_64BIT instead of CONFIG_X86_64.



Index: linux-2.6/arch/x86/kernel/acpi/boot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/boot.c	2008-07-15 11:04:14.000000000 -0500
+++ linux-2.6/arch/x86/kernel/acpi/boot.c	2008-07-15 11:08:11.000000000 -0500
@@ -97,6 +97,8 @@ static u64 acpi_lapic_addr __initdata = 
 #warning ACPI uses CMPXCHG, i486 and later hardware
 #endif
 
+static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
+
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
    -------------------------------------------------------------------------- */
@@ -158,6 +160,14 @@ char *__init __acpi_map_table(unsigned l
 struct acpi_mcfg_allocation *pci_mmcfg_config;
 int pci_mmcfg_config_num;
 
+static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg)
+{
+	if (!strcmp(mcfg->header.oem_id, "SGI"))
+		acpi_mcfg_64bit_base_addr = TRUE;
+
+	return 0;
+}
+
 int __init acpi_parse_mcfg(struct acpi_table_header *header)
 {
 	struct acpi_table_mcfg *mcfg;
@@ -190,8 +200,12 @@ int __init acpi_parse_mcfg(struct acpi_t
 	}
 
 	memcpy(pci_mmcfg_config, &mcfg[1], config_size);
+
+	acpi_mcfg_oem_check(mcfg);
+
 	for (i = 0; i < pci_mmcfg_config_num; ++i) {
-		if (pci_mmcfg_config[i].address > 0xFFFFFFFF) {
+		if ((pci_mmcfg_config[i].address > 0xFFFFFFFF) &&
+		    !acpi_mcfg_64bit_base_addr) {
 			printk(KERN_ERR PREFIX
 			       "MMCONFIG not in low 4GB of memory\n");
 			kfree(pci_mmcfg_config);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [RESEND] [PATCH] x86: Allow MMCONFIG above 4GB on x86_64
  2008-07-15 19:47 [RESEND] [PATCH] x86: Allow MMCONFIG above 4GB on x86_64 John Keller
@ 2008-07-29 19:34 ` John Keller
  2008-07-31 10:45   ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: John Keller @ 2008-07-29 19:34 UTC (permalink / raw)
  To: linux-kernel, linux-acpi; +Cc: jpk

Just checking on the status of this patch.
If there are no issues, please apply.

Thanks,
John

================================


SGI UV will have MMCFG base addresses that are greater than 4GB (32 bits).

Signed-off-by: John Keller <jpk@sgi.com>
---

Resend #2: Create a flag, that is set by platform specific code,
           to disable the > 4GB check.

Resend #1: Use CONFIG_RESOURCES_64BIT instead of CONFIG_X86_64.



Index: linux-2.6/arch/x86/kernel/acpi/boot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/boot.c	2008-07-15 11:04:14.000000000 -0500
+++ linux-2.6/arch/x86/kernel/acpi/boot.c	2008-07-15 11:08:11.000000000 -0500
@@ -97,6 +97,8 @@ static u64 acpi_lapic_addr __initdata = 
 #warning ACPI uses CMPXCHG, i486 and later hardware
 #endif
 
+static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
+
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
    -------------------------------------------------------------------------- */
@@ -158,6 +160,14 @@ char *__init __acpi_map_table(unsigned l
 struct acpi_mcfg_allocation *pci_mmcfg_config;
 int pci_mmcfg_config_num;
 
+static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg)
+{
+	if (!strcmp(mcfg->header.oem_id, "SGI"))
+		acpi_mcfg_64bit_base_addr = TRUE;
+
+	return 0;
+}
+
 int __init acpi_parse_mcfg(struct acpi_table_header *header)
 {
 	struct acpi_table_mcfg *mcfg;
@@ -190,8 +200,12 @@ int __init acpi_parse_mcfg(struct acpi_t
 	}
 
 	memcpy(pci_mmcfg_config, &mcfg[1], config_size);
+
+	acpi_mcfg_oem_check(mcfg);
+
 	for (i = 0; i < pci_mmcfg_config_num; ++i) {
-		if (pci_mmcfg_config[i].address > 0xFFFFFFFF) {
+		if ((pci_mmcfg_config[i].address > 0xFFFFFFFF) &&
+		    !acpi_mcfg_64bit_base_addr) {
 			printk(KERN_ERR PREFIX
 			       "MMCONFIG not in low 4GB of memory\n");
 			kfree(pci_mmcfg_config);



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND] [PATCH] x86: Allow MMCONFIG above 4GB on x86_64
  2008-07-29 19:34 ` John Keller
@ 2008-07-31 10:45   ` Ingo Molnar
  2008-08-07 13:39     ` John Keller
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2008-07-31 10:45 UTC (permalink / raw)
  To: John Keller
  Cc: linux-kernel, linux-acpi, Yinghai Lu, H. Peter Anvin,
	Thomas Gleixner


* John Keller <jpk@sgi.com> wrote:

> Just checking on the status of this patch.
> If there are no issues, please apply.

> SGI UV will have MMCFG base addresses that are greater than 4GB (32 bits).

applied to tip/x86/uv, thanks John.

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND] [PATCH] x86: Allow MMCONFIG above 4GB on x86_64
  2008-07-31 10:45   ` Ingo Molnar
@ 2008-08-07 13:39     ` John Keller
  0 siblings, 0 replies; 5+ messages in thread
From: John Keller @ 2008-08-07 13:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: John Keller, linux-kernel, linux-acpi, Yinghai Lu, H. Peter Anvin,
	Thomas Gleixner

> 
> 
> * John Keller <jpk@sgi.com> wrote:
> 
> > Just checking on the status of this patch.
> > If there are no issues, please apply.
> 
> > SGI UV will have MMCFG base addresses that are greater than 4GB (32 bits).
> 
> applied to tip/x86/uv, thanks John.
> 
> 	Ingo


Thanks.

Will this patch be pushed into 2.6.27?

If not, how do I make this happen?

Thanks again,
John

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-07 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 19:47 [RESEND] [PATCH] x86: Allow MMCONFIG above 4GB on x86_64 John Keller
2008-07-29 19:34 ` John Keller
2008-07-31 10:45   ` Ingo Molnar
2008-08-07 13:39     ` John Keller
  -- strict thread matches above, loose matches on Subject: below --
2008-07-10 17:51 John Keller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox