lkml.org 
[lkml]   [2005]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [patch -mm series] ia64 specific /dev/mem handlers
From
Date
>>>>> "Jes" == Jes Sorensen <jes@wildopensource.com> writes:

>>>>> "Andrew" == Andrew Morton <akpm@osdl.org> writes:
Andrew> This patch causes hiccups on my ia32e box.

Andrew> linux:/home/akpm# /usr/sbin/hwscan --isapnp zsh: 7528
Andrew> segmentation fault

Jes> Weird, I'll take a look.

-EPROGRAMMERISANIDIOT ... try this.

Cheers,
Jes

/dev/mem handle read/write case where ppos+count < PAGE_SIZE

Signed-off-by: Jes Sorensen <jes@wildopensource.com>


--- ../old/linux-2.6.11-rc5-mm1/drivers/char/mem.c 2005-03-04 07:20:51.000000000 -0500
+++ drivers/char/mem.c 2005-03-04 07:22:20.000000000 -0500
@@ -152,7 +152,9 @@
if (-p & (PAGE_SIZE - 1))
sz = -p & (PAGE_SIZE - 1);
else
- sz = min_t(unsigned long, PAGE_SIZE, count);
+ sz = PAGE_SIZE;
+
+ sz = min_t(unsigned long, sz, count);

/*
* On ia64 if a page has been mapped somewhere as
@@ -207,7 +209,9 @@
if (-p & (PAGE_SIZE - 1))
sz = -p & (PAGE_SIZE - 1);
else
- sz = min_t(unsigned long, PAGE_SIZE, count);
+ sz = PAGE_SIZE;
+
+ sz = min_t(unsigned long, sz, count);

/*
* On ia64 if a page has been mapped somewhere as
@@ -353,7 +357,9 @@
if (-p & (PAGE_SIZE - 1))
sz = -p & (PAGE_SIZE - 1);
else
- sz = min_t(unsigned long, PAGE_SIZE, count);
+ sz = PAGE_SIZE;
+
+ sz = min_t(unsigned long, sz, count);

/*
* On ia64 if a page has been mapped somewhere as
@@ -430,7 +436,9 @@
if (-realp & (PAGE_SIZE - 1))
sz = -realp & (PAGE_SIZE - 1);
else
- sz = min_t(unsigned long, PAGE_SIZE, count);
+ sz = PAGE_SIZE;
+
+ sz = min_t(unsigned long, sz, count);

/*
* On ia64 if a page has been mapped somewhere as
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.945 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site