public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chubb <peter@chubb.wattle.id.au>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] sba_iommu status?
Date: Mon, 31 Mar 2003 10:17:46 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590723705362@msgid-missing> (raw)

Hi,
	What is the status of the IOMMU support?  I'm finding that
with CONFIG_ZX1 turned on, that PCI cards that can do only 32-bit DMA
cause system hangs.

I enabled all the debug options in sba_iommu.c, and note that the
normal case bypasses the IOMMU.  It's only when a 32-bit DMA to high
memory happens that the hang happens.

Here's a sample trace from my driver:  I've added a printout of what's
in the scatterlist when pci_map_sg() returns.  The driver is mapping
user-mode virtual addresses by doing essentially in this instance:
	  get_user_pages(current, current->mm, vaddr, 1,
	  0, pages, NULL);
	  sg[0].page = pages[0];
	  sg[0].offset = (unsigned long)vaddr & (PAGE_SIZE - 1);
	  sg[0].length = 1024;
	  n = pci_map_sg(devp, sg, 1, DMA_FROM_DEVICE);

	  (setup and do DMA via sg_dma_address(&sg[0]) and sg_dma_len(&sg[0]))
	  pci_unmap_sg(devp, sg, 1, DMA_FROM_DEVICE);

The code works when I build the kernel as CONFIG_DIG; but not
otherwise.
The trace below is typical of what I see.
All DMA mappings except my driver bypass the IOMMU (they're mostly for
the SCSI card, which is a 64-bit card, and can do 64-bit DMA)
...
sba_map_sg() START 1 entries, 0xe00000003cb74000,0x400
sba_search_bitmap() o 1 e0000000040d0000    e0000000040d0000 1 1
    e0000000040d0000 2 1
sba_alloc_range(4000) 1 -> 1 hint 0/2
sba_map_single() 0x0000000000000000 -> 0x4000
     pdir 0xe00000003eb80008 a0000000000000ff
sba_map_sg() DONE 1 mapping

sglist[0] dmaaddr = 40004000, len = 1024

sba_unmap_sg() START 1 entries, 0xe00000003cb74000,0x400
sba_unmap_single() iovp 0x40004000/400
sba_unmap_sg() DONE (nents 0)

sba_map_sg() START 1 entries, 0xe00000003cb74400,0x400
sba_search_bitmap() o 1 e0000000040d0000    e0000000040d0000 4 3
sba_alloc_range(4000) 1 -> 2 hint 0/3
sba_map_single() 0x0000000000000000 -> 0x8000
     pdir 0xe00000003eb80010 a0000000000000ff
sba_map_sg() DONE 1 mapping


sba_unmap_sg() START 1 entries, 0xe00000003cb74400,0x400
sba_unmap_single() iovp 0x40008000/400
sba_unmap_sg() DONE (nents 0)

sba_map_sg() START 1 entries, 0xe00000003cb74800,0x400
sba_search_bitmap() o 1 e0000000040d0000    e0000000040d0000 8 7
sba_alloc_range(4000) 1 -> 3 hint 0/4
sba_map_single() 0x0000000040008000 -> 0xc000
     pdir 0xe00000003eb80018 a0000000400080ff
sba_map_sg() DONE 1 mapping

+BEGIN HARDWARE ERROR STATE AT MCA
+Err Record ID: 16    SAL Rev:  0.02
+Time: 03/31/2003 06:22:22    Severity 1
+Processor Device Error Info Section
 Processor Error Map: 0x201004000
 Processor State Param: 0xa8000000fff21330
 Processor LID: 0x0
+ Cache check info[0]
+  Level: L0, Index: 8388608, Operation: Unknown,
+ BUS Check Info [0]
+ Status Info: 2 ,Severity: 0 ,Transaction Type: 0 ,Transaction Size: 0 ,Error : Internal
e000000004007308 01 00 00 00 00 00 00 00 01 30 00 00 00 00 80 00 
e000000004007318 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
e000000004007328 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
 CPUID Regs: 0x49656e69756e6547 0x6c65746e 0x0 0x1f000704
...


             reply	other threads:[~2003-03-31 10:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-31 10:17 Peter Chubb [this message]
2003-03-31 13:10 ` [Linux-ia64] sba_iommu status? Matthew Wilcox
2003-03-31 20:38 ` Grant Grundler
2003-03-31 20:40 ` Peter Chubb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590723705362@msgid-missing \
    --to=peter@chubb.wattle.id.au \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox