Index: zrignore
===================================================================
--- .bzrignore	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ 	(revision )
@@ -1,3 +1,0 @@
-kernel/arch/sparc64/include/mm/sun4v/.svn
-kernel/arch/sparc64/include/sun4v/.svn
-kernel/arch/sparc64/include/sun4v/smp/.svn
Index: kernel/arch/abs32le/Makefile.inc
===================================================================
--- kernel/arch/abs32le/Makefile.inc	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/abs32le/Makefile.inc	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -50,4 +50,8 @@
 endif
 
+ifeq ($(COMPILER),clang)
+	CLANG_ARCH = i386
+endif
+
 BITS = 32
 ENDIANESS = LE
Index: kernel/arch/sparc64/include/mm/sun4v/mmu.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4v/mmu.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/include/mm/sun4v/mmu.h	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -28,5 +28,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/mm/sun4v/tlb.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4v/tlb.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/include/mm/sun4v/tlb.h	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -28,5 +28,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/mm/sun4v/tsb.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4v/tsb.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/include/mm/sun4v/tsb.h	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -28,5 +28,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/mm/sun4v/tte.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4v/tte.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/include/mm/sun4v/tte.h	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/smp/sun4v/smp.h
===================================================================
--- kernel/arch/sparc64/include/smp/sun4v/smp.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/include/smp/sun4v/smp.h	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -38,5 +38,8 @@
 #define KERN_sparc64_sun4v_SMP_H_
 
-bool calculate_optimal_nrdy(exec_unit_t *exec_unit);
+#include <typedefs.h>
+#include <arch/sun4v/cpu.h>
+
+extern bool calculate_optimal_nrdy(exec_unit_t *);
 
 #endif
Index: kernel/arch/sparc64/include/sun4v/cpu.h
===================================================================
--- kernel/arch/sparc64/include/sun4v/cpu.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/include/sun4v/cpu.h	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -44,4 +44,7 @@
 #ifndef __ASM__
 
+#include <atomic.h>
+#include <synch/spinlock.h>
+
 struct cpu;
 
@@ -51,5 +54,4 @@
 	uint64_t cpuids[MAX_CORE_STRANDS];
 	struct cpu *cpus[MAX_CORE_STRANDS];
-	//cpu_t *cpus[MAX_CORE_STRANDS];
 	atomic_t nrdy;
 	SPINLOCK_DECLARE(proposed_nrdy_lock);
Index: kernel/arch/sparc64/include/sun4v/ipi.h
===================================================================
--- kernel/arch/sparc64/include/sun4v/ipi.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/include/sun4v/ipi.h	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -38,7 +38,8 @@
 #define KERN_sparc64_sun4v_IPI_H_
 
-uint64_t ipi_brodcast_to(void (*func)(void), uint16_t cpu_list[MAX_NUM_STRANDS],
-		uint64_t list_size);
-uint64_t ipi_unicast_to(void (*func)(void), uint16_t cpu_id);
+#include <arch/types.h>
+
+extern uint64_t ipi_brodcast_to(void (*)(void), uint16_t cpu_list[], uint64_t);
+extern uint64_t ipi_unicast_to(void (*)(void), uint16_t);
 
 #endif
Index: kernel/arch/sparc64/include/trap/sun4v/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/trap/sun4v/interrupt.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/include/trap/sun4v/interrupt.h	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -40,6 +40,6 @@
 #ifndef __ASM__
 
-void sun4v_ipi_init(void);
-void cpu_mondo(void);
+extern void sun4v_ipi_init(void);
+extern void cpu_mondo(void);
 
 #endif
Index: kernel/arch/sparc64/src/cpu/sun4v/cpu.c
===================================================================
--- kernel/arch/sparc64/src/cpu/sun4v/cpu.c	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/src/cpu/sun4v/cpu.c	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -42,6 +42,4 @@
 #include <arch/sun4v/hypercall.h>
 #include <arch/trap/sun4v/interrupt.h>
-
-//#include <arch/trap/sun4v/interrupt.h>
 
 /** Perform sparc64 specific initialization of the processor structure for the
@@ -97,5 +95,5 @@
 {
 	printf("cpu%d: Niagara (%d MHz)\n", m->id,
-		m->arch.clock_frequency / 1000000);
+	    m->arch.clock_frequency / 1000000);
 }
 
Index: kernel/arch/sparc64/src/smp/sun4u/smp.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4u/smp.c	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/src/smp/sun4u/smp.c	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -36,5 +36,5 @@
 #include <genarch/ofw/ofw_tree.h>
 #include <cpu.h>
-#include <arch/sun4u/cpu_family.h>
+#include <arch/cpu_family.h>
 #include <arch/cpu.h>
 #include <arch.h>
@@ -45,5 +45,5 @@
 #include <synch/waitq.h>
 #include <print.h>
-#include <arch/sun4u/cpu_node.h>
+#include <arch/cpu_node.h>
 
 /**
@@ -62,5 +62,5 @@
 {
 	ofw_tree_node_t *node;
-	count_t cnt = 0;
+	unsigned int cnt = 0;
 	
 	if (is_us() || is_us_iii()) {
Index: kernel/arch/sparc64/src/trap/sun4v/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -36,5 +36,4 @@
 #include <arch/trap/interrupt.h>
 #include <arch/sparc64.h>
-#include <arch/trap/interrupt.h>
 #include <interrupt.h>
 #include <ddi/irq.h>
@@ -89,5 +88,5 @@
 		CPU_MONDO_NENTRIES) != EOK)
 			panic("Initializing mondo queue failed on CPU %d.\n",
-			CPU->arch.id);
+			    CPU->arch.id);
 }
 
@@ -98,24 +97,23 @@
 void cpu_mondo(void)
 {
+#ifdef CONFIG_SMP
 	unsigned int tail = asi_u64_read(ASI_QUEUE, VA_CPU_MONDO_QUEUE_TAIL);
 	unsigned int head = asi_u64_read(ASI_QUEUE, VA_CPU_MONDO_QUEUE_HEAD);
 
 	while (head != tail) {
-
 		uint64_t data1 = cpu_mondo_queues[CPU->id][0];
 
 		head = (head + CPU_MONDO_ENTRY_SIZE * sizeof(uint64_t)) %
-			(CPU_MONDO_QUEUE_SIZE * sizeof(uint64_t));
+		    (CPU_MONDO_QUEUE_SIZE * sizeof(uint64_t));
 		asi_u64_write(ASI_QUEUE, VA_CPU_MONDO_QUEUE_HEAD, head);
 
-		if (data1 == (uint64_t) tlb_shootdown_ipi_recv) {
+		if (data1 == (uintptr_t) tlb_shootdown_ipi_recv) {
 			((void (*)(void)) data1)();
 		} else {
 			printf("Spurious interrupt on %d, data = %lx.\n",
-				CPU->arch.id, data1);
+			    CPU->arch.id, data1);
 		}
-
 	}
-
+#endif
 }
 
Index: kernel/generic/src/proc/scheduler.c
===================================================================
--- kernel/generic/src/proc/scheduler.c	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ kernel/generic/src/proc/scheduler.c	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -201,4 +201,5 @@
 		 * even though there is a runnable thread.
 		 */
+
 		 cpu_sleep();
 		 goto loop;
Index: uspace/lib/libc/arch/abs32le/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/abs32le/Makefile.inc	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ uspace/lib/libc/arch/abs32le/Makefile.inc	(revision 72bf0d24c385bb60c29d5035914d6402640fc6d2)
@@ -46,4 +46,8 @@
 endif
 
+ifeq ($(COMPILER),clang)
+	CLANG_ARCH = i386
+endif
+
 ARCH_SOURCES = \
 	arch/$(UARCH)/src/entry.c \
Index: pace/lib/libpci/Makefile.build
===================================================================
--- uspace/lib/libpci/Makefile.build	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ 	(revision )
@@ -1,64 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-## Setup toolchain
-#
-
-include Makefile.common
-include $(LIBC_PREFIX)/Makefile.toolchain
-
-## Sources
-#
-
-SOURCES = \
-	access.c \
-	generic.c \
-	names.c \
-	i386-ports.c
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-
-.PHONY: all
-
-all: $(LIBPCI)
-
--include $(DEPEND)
-
-$(LIBPCI): $(OBJECTS)
-	$(AR) rc $@ $(OBJECTS)
-
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
-endif
-
-$(DEPEND):
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: pace/lib/libpci/Makefile.common
===================================================================
--- uspace/lib/libpci/Makefile.common	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-
-## Common names
-#
-
-LIBC_PREFIX = ../../../../../lib/libc
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-JOB = libpci.job
-LIBPCI = libpci.a
Index: pace/srv/hid/kbd/port/i8042.h
===================================================================
--- uspace/srv/hid/kbd/port/i8042.h	(revision f8f7dba7f188538fbac35a54676bdf8299a6e04a)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- * Copyright (c) 2006 Josef Cejka
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup kbd_port
- * @ingroup  kbd
- * @{
- */
-
-/** @file
- * @brief i8042 port driver.
- */
-
-#ifndef KBD_PORT_i8042_H_
-#define KBD_PORT_i8042_H_
-
-#include <libarch/ddi.h>
-#include <libarch/types.h>
-
-struct i8042 {
-	ioport8_t data;
-	uint8_t pad[3];
-	ioport8_t status;
-} __attribute__ ((packed));
-typedef struct i8042 i8042_t;
-
-#endif
-
-/**
- * @}
- */ 
