]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc64/kernel/pci_sun4v_asm.S
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/configh
[linux-2.6-omap-h63xx.git] / arch / sparc64 / kernel / pci_sun4v_asm.S
index 424db652664897dcd935c3a4ef5e503f06a19fb8..6604fdbf746cc44b2c410013563a87e27ae84ee3 100644 (file)
         * %o3: io_attributes
         * %o4: io_page_list phys address
         *
-        * returns %o0: num ttes mapped
+        * returns %o0: -status if status was non-zero, else
+        *         %o0: num pages mapped
         */
        .globl  pci_sun4v_iommu_map
 pci_sun4v_iommu_map:
+       mov     %o5, %g1
        mov     HV_FAST_PCI_IOMMU_MAP, %o5
        ta      HV_FAST_TRAP
-       retl
-        mov    %o1, %o0
+       brnz,pn %o0, 1f
+        sub    %g0, %o0, %o0
+       mov     %o1, %o0
+1:     retl
+        nop
 
        /* %o0: devhandle
         * %o1: tsbid