From: Jes Sorensen <jes@wildopensource.com>
To: Benjamin LaHaise <bcrl@redhat.com>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
Linux Kernel <linux-kernel@vger.kernel.org>,
torvalds@transmeta.com
Subject: Re: highmem pci dma mapping does not work, missing cast in asm-i386/pci.h
Date: 23 Jun 2002 11:39:43 -0400 [thread overview]
Message-ID: <m37kkqngw0.fsf@trained-monkey.org> (raw)
In-Reply-To: Benjamin LaHaise's message of "Mon, 10 Jun 2002 19:56:44 -0400"
>>>>> "Ben" == Benjamin LaHaise <bcrl@redhat.com> writes:
Ben> Hello all, There's a missing cast in pci_map_page that causes 64
Ben> bit capable drivers to access the wrong memory for highmem pages.
Ben> Please include the patch below to fix it.
Looking at this one, I believe we need to do the same for
page_to_phys() - either by using dma_addr_t as the type or explicitly
going u64 #ifdef CONFIG_HIGHMEM.
Patch using dma_addr_t included relative to 2.4.18.
Btw. I noticed that in 2.5.24/ia32 we use CONFIG_HIGHMEM to declare
dma_addr_t as 64 bit but CONFIG_HIGHMEM64G to handle page_to_phys. Is
this just an oversight or on purpose?
Comments?
Jes
--- include/asm-i386/io.h~ Sun Jun 23 11:29:26 2002
+++ include/asm-i386/io.h Sun Jun 23 11:30:17 2002
@@ -2,6 +2,7 @@
#define _ASM_IO_H
#include <linux/config.h>
+#include <asm/types.h>
/*
* This file contains the definitions for the x86 IO instructions
@@ -76,7 +77,7 @@
/*
* Change "struct page" to physical address.
*/
-#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
+#define page_to_phys(page) ((dma_addr_t)(page - mem_map) << PAGE_SHIFT)
extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
prev parent reply other threads:[~2002-06-23 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-10 23:56 highmem pci dma mapping does not work, missing cast in asm-i386/pci.h Benjamin LaHaise
2002-06-23 15:39 ` Jes Sorensen [this message]
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=m37kkqngw0.fsf@trained-monkey.org \
--to=jes@wildopensource.com \
--cc=bcrl@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=torvalds@transmeta.com \
/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