Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 225157 - sytem crashes on dma_map_sg()
Summary: sytem crashes on dma_map_sg()
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: ia64
OS: Linux
Target Milestone: ---
: ---
Assignee: Prarit Bhargava
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2007-01-29 14:58 UTC by Eli Cohen
Modified: 2008-03-14 05:30 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-03-14 05:30:21 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Eli Cohen 2007-01-29 14:58:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060601 Firefox/ (Ubuntu-edgy)

Description of problem:
When calling dma_map_sg() for a region more than 1 GB the kernel panics. To workaround this problem, need to call multiple times dma_map_sg() with a single entry rather than calling once with multiple entries.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. call dma_map_sg() with several entries for more than 1 GB

Actual Results:

Expected Results:

Additional info:
Here are the specs agian since I am not sure I put then correctly:
component: kernel, IOMMU
arch: ia64
chipset HP

Please forward to HP.

Comment 1 Bjorn Helgaas 2007-01-29 16:11:44 UTC
This happens because sba_alloc_range(), which is called in the dma_map_sg()
path, panics instead of returning an allocation failure.

I think this was originally done because some drivers didn't check the
return code of dma_map_sg().  But it looks like most other IOTLB drivers
return failure instead of panicking, and it shouldn't be hard to fix 
sba_iommu.c to do the same thing.  Then it's "just" a question of
testing the supported drivers to make sure they have the right error

Comment 2 Ra P. 2007-02-14 15:09:44 UTC
Rather than fail the request, maybe it is better to fall back on registering
multiple chunks as if dma_map_single was called multiple times.

Comment 3 Bjorn Helgaas 2007-02-14 19:15:19 UTC
If the device can directly address all the buffers in the sglist,
we could bypass the IOMMU.  This has some effect on performance, so
would have to be evaluated.  You win some by not having to set up the
IOMMU mappings, but you also lose the benefit of coalescing many
sglist buffers into a few.

But for devices that can't reach all the buffers (e.g., 32-bit cards),
we can't bypass the IOMMU, so we have to either panic or return failure.

Comment 4 Luming Yu 2007-08-15 06:15:40 UTC
Are there any update on this issue?
What is the upstream status?
Is there any patch needs to be back ported?

Comment 5 Luming Yu 2008-03-14 05:30:21 UTC
Since __no__ update for these bug for about half year. Closing it...

Note You need to log in before you can comment on or make changes to this bug.