Index: kernel/arch/sparc64/include/sun4v/hypercall.h
===================================================================
--- kernel/arch/sparc64/include/sun4v/hypercall.h	(revision 68acf213513e3ac598c949d4ee2669fb0cfe9cb1)
+++ kernel/arch/sparc64/include/sun4v/hypercall.h	(revision 7da160ba192d0a573fdd80c110c2e2499ff54e49)
@@ -75,22 +75,22 @@
 
 /* return codes */
-#define EOK		0	/**< Successful return */
-#define ENOCPU		1	/**< Invalid CPU id */
-#define ENORADDR	2	/**< Invalid real address */
-#define ENOINTR		3	/**< Invalid interrupt id */
-#define EBADPGSZ	4	/**< Invalid pagesize encoding */
-#define EBADTSB		5	/**< Invalid TSB description */
-#define	HV_EINVAL	6	/**< Invalid argument */
-#define EBADTRAP	7	/**< Invalid function number */
-#define EBADALIGN	8	/**< Invalid address alignment */
-#define EWOULDBLOCK	9	/**< Cannot complete operation without blocking */
-#define ENOACCESS	10	/**< No access to specified resource */
-#define EIO		11	/**< I/O Error */
-#define ECPUERROR	12	/**< CPU is in error state */
-#define ENOTSUPPORTED	13	/**< Function not supported */
-#define ENOMAP		14	/**< No mapping found */
-#define ETOOMANY	15	/**< Too many items specified / limit reached */
-#define ECHANNEL	16	/**< Invalid LDC channel */
-#define HV_EBUSY	17	/**< Operation failed as resource is otherwise busy */
+#define HV_EOK			0	/**< Successful return */
+#define HV_ENOCPU		1	/**< Invalid CPU id */
+#define HV_ENORADDR		2	/**< Invalid real address */
+#define HV_ENOINTR		3	/**< Invalid interrupt id */
+#define HV_EBADPGSZ		4	/**< Invalid pagesize encoding */
+#define HV_EBADTSB		5	/**< Invalid TSB description */
+#define	HV_EINVAL		6	/**< Invalid argument */
+#define HV_EBADTRAP		7	/**< Invalid function number */
+#define HV_EBADALIGN		8	/**< Invalid address alignment */
+#define HV_EWOULDBLOCK		9	/**< Cannot complete operation without blocking */
+#define HV_ENOACCESS		10	/**< No access to specified resource */
+#define HV_EIO			11	/**< I/O Error */
+#define HV_ECPUERROR		12	/**< CPU is in error state */
+#define HV_ENOTSUPPORTED	13	/**< Function not supported */
+#define HV_ENOMAP		14	/**< No mapping found */
+#define HV_ETOOMANY		15	/**< Too many items specified / limit reached */
+#define HV_ECHANNEL		16	/**< Invalid LDC channel */
+#define HV_EBUSY		17	/**< Operation failed as resource is otherwise busy */
 
 
Index: kernel/arch/sparc64/src/drivers/niagara.c
===================================================================
--- kernel/arch/sparc64/src/drivers/niagara.c	(revision 68acf213513e3ac598c949d4ee2669fb0cfe9cb1)
+++ kernel/arch/sparc64/src/drivers/niagara.c	(revision 7da160ba192d0a573fdd80c110c2e2499ff54e49)
@@ -104,5 +104,5 @@
 static inline void do_putchar(const char c) {
 	/* repeat until the buffer is non-full */
-	while (__hypercall_fast1(CONS_PUTCHAR, c) == EWOULDBLOCK)
+	while (__hypercall_fast1(CONS_PUTCHAR, c) == HV_EWOULDBLOCK)
 		;
 }
@@ -139,5 +139,5 @@
 
 	/* read character from keyboard, send it to upper layers of HelenOS */
-	if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == EOK) {
+	if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == HV_EOK) {
 		if (!silent) {
 			/* kconsole active, send the character to kernel */
Index: kernel/arch/sparc64/src/mm/sun4v/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 68acf213513e3ac598c949d4ee2669fb0cfe9cb1)
+++ kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 7da160ba192d0a573fdd80c110c2e2499ff54e49)
@@ -406,5 +406,5 @@
 	uint64_t errno =  __hypercall_fast3(MMU_DEMAP_ALL, 0, 0,
 		MMU_FLAG_DTLB | MMU_FLAG_ITLB);
-	if (errno != EOK) {
+	if (errno != HV_EOK) {
 		panic("Error code = %d.\n", errno);
 	}
Index: kernel/arch/sparc64/src/sun4v/md.c
===================================================================
--- kernel/arch/sparc64/src/sun4v/md.c	(revision 68acf213513e3ac598c949d4ee2669fb0cfe9cb1)
+++ kernel/arch/sparc64/src/sun4v/md.c	(revision 7da160ba192d0a573fdd80c110c2e2499ff54e49)
@@ -104,6 +104,6 @@
 static md_element_t *get_element(element_idx_t idx)
 {
-	return (md_element_t *) (
-		mach_desc + sizeof(md_header_t) + idx * sizeof(md_element_t));
+	return (md_element_t *) (mach_desc +
+	    sizeof(md_header_t) + idx * sizeof(md_element_t));
 }
 
@@ -114,5 +114,5 @@
 	uintptr_t name_offset = get_element(idx)->name_offset;
 	return (char *) mach_desc + sizeof(md_header_t) +
-		md_header->node_blk_sz + name_offset;
+	    md_header->node_blk_sz + name_offset;
 }
 
@@ -137,5 +137,5 @@
 		md_element_t *element = get_element(idx);
 		if (element->tag == PROP_VAL &&
-				str_cmp(key, get_element_name(idx)) == 0) {
+		    str_cmp(key, get_element_name(idx)) == 0) {
 			*result = element->d.val;
 			return true;
@@ -161,8 +161,8 @@
 		md_element_t *element = get_element(idx);
 		if (element->tag == PROP_DATA &&
-				str_cmp(key, get_element_name(idx)) == 0) {
+		    str_cmp(key, get_element_name(idx)) == 0) {
 			*result = (char *) mach_desc + sizeof(md_header_t) +
-				md_header->node_blk_sz + md_header->name_blk_sz +
-				element->d.y.data_offset;
+			    md_header->node_blk_sz + md_header->name_blk_sz +
+			    element->d.y.data_offset;
 			return true;
 		}
@@ -186,5 +186,5 @@
 		md_element_t *element = get_element(*it);
 		if (element->tag == PROP_ARC &&
-				str_cmp("fwd", get_element_name(*it)) == 0) {
+		    str_cmp("fwd", get_element_name(*it)) == 0) {
 			return true;
 		}
@@ -289,5 +289,5 @@
 
 		if (element->tag == NODE &&
-				str_cmp(name, get_element_name(*node)) == 0) {
+		    str_cmp(name, get_element_name(*node)) == 0) {
 			return true;
 		}
@@ -306,10 +306,10 @@
 {
 	uint64_t retval = __hypercall_fast2(MACH_DESC, KA2PA(mach_desc),
-		MD_MAX_SIZE);
+	    MD_MAX_SIZE);
 
 	retval = retval;
-	if (retval != EOK) {
+	if (retval != HV_EOK) {
 		printf("Could not retrieve machine description, error = %d.\n",
-			retval);
+		    retval);
 	}
 }
Index: kernel/arch/sparc64/src/trap/sun4v/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision 68acf213513e3ac598c949d4ee2669fb0cfe9cb1)
+++ kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision 7da160ba192d0a573fdd80c110c2e2499ff54e49)
@@ -86,5 +86,5 @@
 		CPU_MONDO_QUEUE_ID,
 		KA2PA(cpu_mondo_queues[CPU->id]),
-		CPU_MONDO_NENTRIES) != EOK)
+		CPU_MONDO_NENTRIES) != HV_EOK)
 			panic("Initializing mondo queue failed on CPU %d.\n",
 			    CPU->arch.id);
