public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86_64: acpi map table fix
@ 2005-12-08  4:15 Vivek Goyal
  2005-12-08  8:37 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Vivek Goyal @ 2005-12-08  4:15 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux kernel mailing list, Morton Andrew Morton, len.brown



o Memory till end_pfn_map has been directly mapped. So all the memory
  references to the last page (represented by end_pfn_map) should be
  valid.

o I run into problem with kdump when I use memmap=exactmap option and also
  pass memmap=X#Y to directly map acpi tables. ACPI initialization in second
  kernel fails because some of the valid ACPI memory is not accessible.

o /proc/iomem shows ACPI tables at c7fcb940-c7fcf7ff : ACPI Tables. Here
  end_pfn_map is set to c7fcf000. But c7fcf700 should also be a valid access.  

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---


diff -puN arch/i386/kernel/acpi/boot.c~acpi-map-address-fix arch/i386/kernel/acpi/boot.c
--- linux-2.6.15-rc5-mm1-16M/arch/i386/kernel/acpi/boot.c~acpi-map-address-fix	2005-12-07 15:56:33.000000000 +0530
+++ linux-2.6.15-rc5-mm1-16M-root/arch/i386/kernel/acpi/boot.c	2005-12-07 15:58:04.000000000 +0530
@@ -108,7 +108,7 @@ char *__acpi_map_table(unsigned long phy
 	if (!phys_addr || !size)
 		return NULL;
 
-	if (phys_addr < (end_pfn_map << PAGE_SHIFT))
+	if (phys_addr < ((end_pfn_map << PAGE_SHIFT) + PAGE_SIZE))
 		return __va(phys_addr);
 
 	return NULL;
_

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

* Re: [PATCH] x86_64: acpi map table fix
  2005-12-08  4:15 [PATCH] x86_64: acpi map table fix Vivek Goyal
@ 2005-12-08  8:37 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2005-12-08  8:37 UTC (permalink / raw)
  To: Vivek Goyal; +Cc: linux kernel mailing list, Morton Andrew Morton, len.brown

On Thu, Dec 08, 2005 at 09:45:09AM +0530, Vivek Goyal wrote:
> 
> 
> o Memory till end_pfn_map has been directly mapped. So all the memory
>   references to the last page (represented by end_pfn_map) should be
>   valid.
> 
I think the correct test is

    if (phys_addr+size <= (end_pfn_map << PAGE_SHIFT) + PAGE_SIZE)
                return __va(phys_addr);


I changed it to that. Thanks.

-Andi

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

end of thread, other threads:[~2005-12-08  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-08  4:15 [PATCH] x86_64: acpi map table fix Vivek Goyal
2005-12-08  8:37 ` Andi Kleen

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