]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
swiotlb: remove panic for alloc_coherent failure
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 23 Oct 2008 09:42:03 +0000 (18:42 +0900)
committerIngo Molnar <mingo@elte.hu>
Thu, 23 Oct 2008 19:54:38 +0000 (21:54 +0200)
commita2b89b596c5a0b288adac84b17bdda6bde8d144e
treecb33305ff4f30ceaba1c5cbd0eef84d68edca942
parentff3c536291ce96ef6f45704cd37eaed71127dd42
swiotlb: remove panic for alloc_coherent failure

swiotlb_alloc_coherent calls panic() when allocated swiotlb pages is
not fit for a device's dma mask. However, alloc_coherent failure is
not a disaster at all. AFAIK, none of other x86 and IA64 IOMMU
implementations don't crash in case of alloc_coherent failure.

There are some drivers that don't check alloc_coherent failure but not
many (about ten and I've already started to fix some of
them). alloc_coherent returns NULL in case of failure so it's likely
that these guilty drivers crash immediately. So swiotlb doesn't need
to call panic() just for them.

Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
lib/swiotlb.c