* [PATCH] fix powerpc breakage in sg chaining code (again)
@ 2007-10-23 21:00 Johannes Berg
2007-10-23 21:47 ` Johannes Berg
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2007-10-23 21:00 UTC (permalink / raw)
To: Anton Blanchard; +Cc: linuxppc-dev list, Paul Mackerras, Jens Axboe
Commit 33ff910f0f466184ffc3514628f18403dcd86761 fixed commit
78bdc3106a877cfa50439fa66b52acbc4e7868df but the code that got put in
uses struct scatterlist->page which no longer exists since commit
18dabf473e15850c0dbc8ff13ac1e2806d542c15 which requires using
sg_page(sg) instead of sg->page.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
If it was fixed before please ignore, I just ran into this.
--- linux-2.6.orig/include/asm/dma-mapping.h 2007-10-23 22:55:33.551133142 +0200
+++ linux-2.6/include/asm/dma-mapping.h 2007-10-23 22:56:07.081133142 +0200
@@ -285,9 +285,9 @@ dma_map_sg(struct device *dev, struct sc
BUG_ON(direction == DMA_NONE);
for_each_sg(sgl, sg, nents, i) {
- BUG_ON(!sg->page);
- __dma_sync_page(sg->page, sg->offset, sg->length, direction);
- sg->dma_address = page_to_bus(sg->page) + sg->offset;
+ BUG_ON(!sg_page(sg));
+ __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
+ sg->dma_address = page_to_bus(sg_page(sg)) + sg->offset;
}
return nents;
@@ -328,7 +328,7 @@ static inline void dma_sync_sg_for_cpu(s
BUG_ON(direction == DMA_NONE);
for_each_sg(sgl, sg, nents, i)
- __dma_sync_page(sg->page, sg->offset, sg->length, direction);
+ __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
}
static inline void dma_sync_sg_for_device(struct device *dev,
@@ -341,7 +341,7 @@ static inline void dma_sync_sg_for_devic
BUG_ON(direction == DMA_NONE);
for_each_sg(sgl, sg, nents, i)
- __dma_sync_page(sg->page, sg->offset, sg->length, direction);
+ __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
}
static inline int dma_mapping_error(dma_addr_t dma_addr)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix powerpc breakage in sg chaining code (again)
2007-10-23 21:00 [PATCH] fix powerpc breakage in sg chaining code (again) Johannes Berg
@ 2007-10-23 21:47 ` Johannes Berg
2007-10-24 9:14 ` Jens Axboe
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2007-10-23 21:47 UTC (permalink / raw)
To: Anton Blanchard; +Cc: linuxppc-dev list, Paul Mackerras, Jens Axboe
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
On Tue, 2007-10-23 at 23:00 +0200, Johannes Berg wrote:
> Commit 33ff910f0f466184ffc3514628f18403dcd86761 fixed commit
> 78bdc3106a877cfa50439fa66b52acbc4e7868df but the code that got put in
> uses struct scatterlist->page which no longer exists since commit
> 18dabf473e15850c0dbc8ff13ac1e2806d542c15 which requires using
> sg_page(sg) instead of sg->page.
This doesn't help though, when I boot I get a NULL-pointer dereference
that looks approximately like this:
NIP blk_rq_map_sg + 0x64/0x190
LR ide_map_sg + 0x38/?
Call trace:
cfq_remove_request + 0x168 (unreliable)
cfq_dispatch_request + 0x44
ide_build_sglist + 0x38?
pmac_ide_dma_setup + 0xa0?
ide_do_rw_disk? + ?
[...]
I can upload the picture I took but it's hardly readable (taken with my
crappy cell phone)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix powerpc breakage in sg chaining code (again)
2007-10-23 21:47 ` Johannes Berg
@ 2007-10-24 9:14 ` Jens Axboe
2007-10-24 9:22 ` Johannes Berg
0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2007-10-24 9:14 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev list, Paul Mackerras, Anton Blanchard
On Tue, Oct 23 2007, Johannes Berg wrote:
> On Tue, 2007-10-23 at 23:00 +0200, Johannes Berg wrote:
> > Commit 33ff910f0f466184ffc3514628f18403dcd86761 fixed commit
> > 78bdc3106a877cfa50439fa66b52acbc4e7868df but the code that got put in
> > uses struct scatterlist->page which no longer exists since commit
> > 18dabf473e15850c0dbc8ff13ac1e2806d542c15 which requires using
> > sg_page(sg) instead of sg->page.
>
> This doesn't help though, when I boot I get a NULL-pointer dereference
> that looks approximately like this:
>
> NIP blk_rq_map_sg + 0x64/0x190
> LR ide_map_sg + 0x38/?
> Call trace:
> cfq_remove_request + 0x168 (unreliable)
> cfq_dispatch_request + 0x44
> ide_build_sglist + 0x38?
> pmac_ide_dma_setup + 0xa0?
> ide_do_rw_disk? + ?
> [...]
>
> I can upload the picture I took but it's hardly readable (taken with my
> crappy cell phone)
I lost track - which kernel are you booting? This looks like something
that should be fixed, did you try 2.6.24-rc1?
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix powerpc breakage in sg chaining code (again)
2007-10-24 9:14 ` Jens Axboe
@ 2007-10-24 9:22 ` Johannes Berg
2007-10-24 9:23 ` Jens Axboe
2007-10-24 9:23 ` Johannes Berg
0 siblings, 2 replies; 8+ messages in thread
From: Johannes Berg @ 2007-10-24 9:22 UTC (permalink / raw)
To: Jens Axboe; +Cc: linuxppc-dev list, Paul Mackerras, Anton Blanchard
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
On Wed, 2007-10-24 at 11:14 +0200, Jens Axboe wrote:
> I lost track - which kernel are you booting? This looks like something
> that should be fixed, did you try 2.6.24-rc1?
No, it came out after I pulled, I was on v2.6.23-6815-g0895e91. I'll
give it a try, but I don't think I can confirm it works before tomorrow.
I see the build failure got fixed with commit
5edadbd0ae35d2daabaf6b44f2c58d67d4021ed2 too.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix powerpc breakage in sg chaining code (again)
2007-10-24 9:22 ` Johannes Berg
@ 2007-10-24 9:23 ` Jens Axboe
2007-10-24 11:21 ` Johannes Berg
2007-10-24 9:23 ` Johannes Berg
1 sibling, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2007-10-24 9:23 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev list, Paul Mackerras, Anton Blanchard
On Wed, Oct 24 2007, Johannes Berg wrote:
> On Wed, 2007-10-24 at 11:14 +0200, Jens Axboe wrote:
>
> > I lost track - which kernel are you booting? This looks like something
> > that should be fixed, did you try 2.6.24-rc1?
>
> No, it came out after I pulled, I was on v2.6.23-6815-g0895e91. I'll
> give it a try, but I don't think I can confirm it works before tomorrow.
> I see the build failure got fixed with commit
> 5edadbd0ae35d2daabaf6b44f2c58d67d4021ed2 too.
0895e91d60ef9bdef426d1ce14bb94bd5875870d is definitely too old, so it
will break on IDE. I'm confident that a newer kernel will solve this
issue.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix powerpc breakage in sg chaining code (again)
2007-10-24 9:22 ` Johannes Berg
2007-10-24 9:23 ` Jens Axboe
@ 2007-10-24 9:23 ` Johannes Berg
2007-10-24 9:24 ` Johannes Berg
1 sibling, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2007-10-24 9:23 UTC (permalink / raw)
To: Jens Axboe; +Cc: linuxppc-dev list, Paul Mackerras, Anton Blanchard
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
On Wed, 2007-10-24 at 11:22 +0200, Johannes Berg wrote:
> No, it came out after I pulled, I was on v2.6.23-6815-g0895e91. I'll
> give it a try, but I don't think I can confirm it works before tomorrow.
> I see the build failure got fixed with commit
> 5edadbd0ae35d2daabaf6b44f2c58d67d4021ed2 too.
Wait, now I lost track. This patch is identical to that commit 5edad...,
what I was thinking of was the oops I got.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix powerpc breakage in sg chaining code (again)
2007-10-24 9:23 ` Johannes Berg
@ 2007-10-24 9:24 ` Johannes Berg
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2007-10-24 9:24 UTC (permalink / raw)
To: Jens Axboe; +Cc: linuxppc-dev list, Paul Mackerras, Anton Blanchard
[-- Attachment #1: Type: text/plain, Size: 619 bytes --]
On Wed, 2007-10-24 at 11:23 +0200, Johannes Berg wrote:
> On Wed, 2007-10-24 at 11:22 +0200, Johannes Berg wrote:
>
> > No, it came out after I pulled, I was on v2.6.23-6815-g0895e91. I'll
> > give it a try, but I don't think I can confirm it works before tomorrow.
> > I see the build failure got fixed with commit
> > 5edadbd0ae35d2daabaf6b44f2c58d67d4021ed2 too.
>
> Wait, now I lost track. This patch is identical to that commit 5edad...,
> what I was thinking of was the oops I got.
Nah, never mind. Apologies to everybody. I'm confused, Jens says the
oops was fixed. I'll verify that.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix powerpc breakage in sg chaining code (again)
2007-10-24 9:23 ` Jens Axboe
@ 2007-10-24 11:21 ` Johannes Berg
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2007-10-24 11:21 UTC (permalink / raw)
To: Jens Axboe; +Cc: linuxppc-dev list, Paul Mackerras, Anton Blanchard
[-- Attachment #1: Type: text/plain, Size: 774 bytes --]
On Wed, 2007-10-24 at 11:23 +0200, Jens Axboe wrote:
> On Wed, Oct 24 2007, Johannes Berg wrote:
> > On Wed, 2007-10-24 at 11:14 +0200, Jens Axboe wrote:
> >
> > > I lost track - which kernel are you booting? This looks like something
> > > that should be fixed, did you try 2.6.24-rc1?
> >
> > No, it came out after I pulled, I was on v2.6.23-6815-g0895e91. I'll
> > give it a try, but I don't think I can confirm it works before tomorrow.
> > I see the build failure got fixed with commit
> > 5edadbd0ae35d2daabaf6b44f2c58d67d4021ed2 too.
>
> 0895e91d60ef9bdef426d1ce14bb94bd5875870d is definitely too old, so it
> will break on IDE. I'm confident that a newer kernel will solve this
> issue.
It does indeed, 2.6.24-rc1 runs fine. Thanks.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-10-24 13:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 21:00 [PATCH] fix powerpc breakage in sg chaining code (again) Johannes Berg
2007-10-23 21:47 ` Johannes Berg
2007-10-24 9:14 ` Jens Axboe
2007-10-24 9:22 ` Johannes Berg
2007-10-24 9:23 ` Jens Axboe
2007-10-24 11:21 ` Johannes Berg
2007-10-24 9:23 ` Johannes Berg
2007-10-24 9:24 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).