Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- From: FUJITA Tomonori <tomof@xxxxxxx>
- Date: Fri, 28 Dec 2007 16:48:33 +0900
On Fri, 28 Dec 2007 13:05:39 +0530
Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:
FUJITA Tomonori wrote:
[snip]
Thanks,
Can you try this?
diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c
index e7d8544..495575a 100644
--- a/lib/iommu-helper.c
+++ b/lib/iommu-helper.c
@@ -8,15 +8,20 @@
static unsigned long find_next_zero_area(unsigned long *map,
unsigned long size,
unsigned long start,
- unsigned int nr)
+ unsigned int nr,
+ unsigned long align_mask)
{
unsigned long index, end, i;
again:
index = find_next_zero_bit(map, size, start);
+
+ /* Align allocation */
+ index = (index + align_mask) & ~align_mask;
+
end = index + nr;
- if (end > size)
+ if (end >= size)
return -1;
- for (i = index + 1; i < end; i++) {
+ for (i = index; i < end; i++) {
if (test_bit(i, map)) {
start = i+1;
goto again;
@@ -50,9 +55,8 @@ unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
{
unsigned long index;
again:
- index = find_next_zero_area(map, size, start, nr);
+ index = find_next_zero_area(map, size, start, nr, align_mask);
if (index != -1) {
- index = (index + align_mask) & ~align_mask;
if (is_span_boundary(index, nr, shift, boundary_size)) {
/* we could do more effectively */
start = index + 1;
This on top of -mm? Or on top of the reverted iommu patch.
Oops, it's for -mm.
Thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- From: Balbir Singh
- Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- References:
- Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- From: Balbir Singh
- Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- From: FUJITA Tomonori
- Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- From: Balbir Singh
- Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- Prev by Date: Re: kernel panic - help!?
- Next by Date: [PATCH] jfs: clear PAGECACHE_TAG_DIRTY for no-write pages
- Previous by thread: Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- Next by thread: Re: SCSI errors on powerpc with 2.6.24-rc6-mm1
- Index(es):
Relevant Pages
|
|