diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index ff74579cd02c..3b771090a5ab 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -170,7 +170,7 @@ typedef u_int32_t u32; #elif defined __ia64__ #define MEMORY_BARRIER() __asm__ volatile("mf.a; mf" : : : "memory") #elif defined __sparc64__ -#error "Sorry, but maintainer is ignorant about sparc64 :)" +#define MEMORY_BARRIER() __asm__ volatile("membar #Sync" : : : "memory") #else #error "Not supported platform" #endif @@ -697,7 +697,7 @@ static void sym_mfree(void *ptr, int size, char *name) #define __sym_mfree_dma(b, p, s, n) sym_mfree(p, s, n) #ifdef __alpha__ #define __vtobus(b, p) alpha_XXX_dmamap((vm_offset_t)(p)) -#else /*__i386__*/ +#else /*__i386__, __sparc64__*/ #define __vtobus(b, p) vtophys(p) #endif @@ -1047,7 +1047,7 @@ struct sym_nvram { #define mmio_write32(a, b) writel(a, b) #define memcpy_to_pci(d, s, n) memcpy_toio((u32)(d), (void *)(s), (n)) -#else /*__i386__*/ +#else /*__i386__, __sparc64__*/ #define mmio_read8(a) scr_to_cpu((*(volatile unsigned char *) (a))) #define mmio_read16(a) scr_to_cpu((*(volatile unsigned short *) (a))) @@ -9371,7 +9371,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit) np->targtbl = (u32 *) sym_calloc_dma(256, "TARGTBL"); if (!np->targtbl) goto attach_failed; - np->targtbl_ba = cpu_to_scr(vtobus(np->targtbl)); + np->targtbl_ba = vtobus(np->targtbl); /* * Allocate SCRIPTS areas.