From: Badari Pulavarty <pbadari@us.ibm.com>
To: linux-kernel@vger.kernel.org, marcelo@conectiva.com.br,
alan@lxorguk.ukuu.org.uk, axboe@suse.de, andrea@suse.de
Cc: pbadari@us.ibm.com
Subject: [PATCH] page_to_phys() fix for >4GB pages (i386)
Date: Fri, 15 Mar 2002 14:57:09 -0800 (PST) [thread overview]
Message-ID: <200203152257.g2FMv9h10896@eng2.beaverton.ibm.com> (raw)
Hi,
I found that page_to_phys() is broken for pages > 4GB on x86.
It is truncating the physical addresses to 32bit, loosing higher
bits. (pci_map_sg() uses this).
Here is the patch to fix it. Marcelo, could you consider this
patch ? I have not looked at 2.5 yet, it may be needed there also.
Thanks,
Badari
--- linux/include/asm-i386/io.h Fri Mar 15 11:19:28 2002
+++ linux.new/include/asm-i386/io.h Fri Mar 15 11:20:38 2002
@@ -76,7 +76,11 @@
/*
* Change "struct page" to physical address.
*/
+#ifdef CONFIG_HIGHMEM64G
+#define page_to_phys(page) ((u64)(page - mem_map) << PAGE_SHIFT)
+#else
#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
+#endif
extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
next reply other threads:[~2002-03-15 22:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-15 22:57 Badari Pulavarty [this message]
2002-03-18 8:18 ` Jens Axboe
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=200203152257.g2FMv9h10896@eng2.beaverton.ibm.com \
--to=pbadari@us.ibm.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrea@suse.de \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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®