Re: [patch 0/4] x86: PAT followup - Incremental changes and bug fixes

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Venki Pallipadi <venkatesh.pallipadi@...>, <ak@...>, <ebiederm@...>, <rdreier@...>, <torvalds@...>, <gregkh@...>, <airlied@...>, <davej@...>, <tglx@...>, <hpa@...>, <akpm@...>, <arjan@...>, <jesse.barnes@...>, <davem@...>, <linux-kernel@...>, <suresh.b.siddha@...>
Date: Thursday, January 17, 2008 - 5:03 pm

On Thu, Jan 17, 2008 at 09:36:00PM +0100, Ingo Molnar wrote:

Yes.

Meanwhile I have figured out that it is some ACPI stuff that maps the page cached.
I've changed the ioremap's in drivers/acpi/osl.c to ioremap_nocache.
See attached patch.

Now the machine boots without conflicts.

  ACPI: EC: Look up EC in DSDT
  ioremap_nocache: addr c0403104, size fc
  ioremap_nocache: addr 77e7ade1, size 3
  ioremap_nocache: addr 77e7af04, size 1

...

  sata_sil 0000:00:12.0: version 2.3
  ACPI: PCI Interrupt 0000:00:12.0[A] -> GSI 22 (level, low) -> IRQ 22
  ioremap_nocache: addr c0403000, size 200
  scsi0 : sata_sil
  scsi1 : sata_sil
  ata1: SATA max UDMA/100 mmio m512@0xc0403000 tf 0xc0403080 irq 22
  ata2: SATA max UDMA/100 mmio m512@0xc0403000 tf 0xc04030c0 irq 22
  ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)

  ...

dmesg-output is attached.



I guess it is not a good idea to use an existing cachable attribute if the
IO-region is non-prefetchable. And in this example there are 3 devices
which are potentially affected:

  00:12.0 IDE interface: ATI Technologies Inc 4379 Serial ATA Controller (rev 80) (
     ...
        Memory at c0403000 (32-bit, non-prefetchable) [size=512]
     ...

  00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 82)
     ...
          Memory at c0403400 (32-bit, non-prefetchable) [size=1K]
     ...

  00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller (rev 80)
     ...
          Memory at c0403800 (32-bit, non-prefetchable) [size=256]
     ...

BTW, is there a need for osl.c to map all regions as cached?


Regards,

Andreas

---
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 1f1ec4a..175e6a4 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -221,7 +221,7 @@ void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
 		/*
 		* ioremap checks to ensure this is in reserved space
 		*/
-		return ioremap((unsigned long)phys, size);
+		return ioremap_nocache((unsigned long)phys, size);
 	else
 		return __acpi_map_table((unsigned long)phys, size);
 }
@@ -437,7 +437,7 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width)
 	u32 dummy;
 	void __iomem *virt_addr;
 
-	virt_addr = ioremap(phys_addr, width);
+	virt_addr = ioremap_nocache(phys_addr, width);
 	if (!value)
 		value = &dummy;
 
@@ -465,7 +465,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
 {
 	void __iomem *virt_addr;
 
-	virt_addr = ioremap(phys_addr, width);
+	virt_addr = ioremap_nocache(phys_addr, width);
 
 	switch (width) {
 	case 8:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 3:12 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 5:03 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 5:42 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 6:26 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 7:06 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 6:16 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Eric W. Biederman, (Thu Jan 24, 4:22 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 6:06 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 6:52 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Fri Jan 18, 12:10 pm)
RE: [patch 0/4] x86: PAT followup - Incremental changes and ..., Pallipadi, Venkatesh, (Fri Jan 18, 1:13 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 7:24 pm)
RE: [patch 0/4] x86: PAT followup - Incremental changes and ..., Pallipadi, Venkatesh, (Thu Jan 17, 7:42 pm)
Re: [patch 0/4] x86: PAT followup - Incremental changes and ..., Andreas Herrmann3, (Thu Jan 17, 3:54 pm)
RE: [patch 0/4] x86: PAT followup - Incremental changes and ..., Pallipadi, Venkatesh, (Wed Jan 16, 6:14 pm)
RE: [patch 0/4] x86: PAT followup - Incremental changes and ..., Pallipadi, Venkatesh, (Wed Jan 16, 3:05 pm)