From: Paolo Galtieri <pgaltieri@mvista.com>
To: linuxppc-dev@ozlabs.org
Subject: Updated high mem patch
Date: Fri, 07 Oct 2005 11:09:37 -0700 [thread overview]
Message-ID: <1128708577.4809.36.camel@playin.mvista.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 109 bytes --]
There was a minor error in the high mem patch I posted yesterday. I
have attached the correct patch.
Paolo
[-- Attachment #2: PPC-highmempatch --]
[-- Type: text/plain, Size: 692 bytes --]
--- linux-2.6.14/arch/ppc/kernel/dma-mapping.c.orig 2005-10-06 15:50:46.000000000 -0700
+++ linux-2.6.14/arch/ppc/kernel/dma-mapping.c 2005-10-07 08:36:33.000000000 -0700
@@ -401,10 +401,10 @@
static inline void __dma_sync_page_highmem(struct page *page,
unsigned long offset, size_t size, int direction)
{
- size_t seg_size = min((size_t)PAGE_SIZE, size) - offset;
+ size_t seg_size = min((size_t)(PAGE_SIZE - offset), size);
size_t cur_size = seg_size;
unsigned long flags, start, seg_offset = offset;
- int nr_segs = PAGE_ALIGN(size + (PAGE_SIZE - offset))/PAGE_SIZE;
+ int nr_segs = 1 + ((size - seg_size) + PAGE_SIZE - 1)/PAGE_SIZE;
int seg_nr = 0;
local_irq_save(flags);
reply other threads:[~2005-10-07 18:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1128708577.4809.36.camel@playin.mvista.com \
--to=pgaltieri@mvista.com \
--cc=linuxppc-dev@ozlabs.org \
/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