Index: uspace/lib/c/arch/ia64/include/atomic.h
===================================================================
--- uspace/lib/c/arch/ia64/include/atomic.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,119 +1,0 @@
-/*
- * Copyright (c) 2005 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.
- */
-
-/** @addtogroup libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_ATOMIC_H_
-#define LIBC_ia64_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-
-#include <atomicdflt.h>
-
-static inline void atomic_inc(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], 1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-}
-
-static inline void atomic_dec(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], -1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-}
-
-static inline atomic_count_t atomic_preinc(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], 1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-	
-	return (v + 1);
-}
-
-static inline atomic_count_t atomic_predec(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], -1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-	
-	return (v - 1);
-}
-
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], 1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-	
-	return v;
-}
-
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], -1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-	
-	return v;
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/barrier.h
===================================================================
--- uspace/lib/c/arch/ia64/include/barrier.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../../../../kernel/arch/ia64/include/barrier.h
Index: uspace/lib/c/arch/ia64/include/config.h
===================================================================
--- uspace/lib/c/arch/ia64/include/config.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2006 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.
- */
-
-/** @addtogroup libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_CONFIG_H_
-#define LIBC_ia64_CONFIG_H_
-
-#define PAGE_WIDTH	14
-#define PAGE_SIZE	(1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/ddi.h
===================================================================
--- uspace/lib/c/arch/ia64/include/ddi.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,160 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Vana
- * 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 libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_DDI_H_
-#define LIBC_ia64_DDI_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-#define IO_SPACE_BOUNDARY	((void *) (64 * 1024))
-
-uint64_t get_ia64_iospace_address(void);
-
-extern uint64_t ia64_iospace_address;
-
-#define IA64_IOSPACE_ADDRESS \
-	(ia64_iospace_address ? \
-	    ia64_iospace_address : \
-	    (ia64_iospace_address = get_ia64_iospace_address()))
-
-static inline void arch_pio_write_8(ioport8_t *port, uint8_t v)
-{
-	if (port < (ioport8_t *) IO_SPACE_BOUNDARY) {
-		uintptr_t prt = (uintptr_t) port;
-
-		*((ioport8_t *)(IA64_IOSPACE_ADDRESS +
-		    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
-	} else {
-		*port = v;
-	}
-
-	asm volatile ("mf\n" ::: "memory");
-	asm volatile ("mf.a\n" ::: "memory");
-}
-
-static inline void arch_pio_write_16(ioport16_t *port, uint16_t v)
-{
-	if (port < (ioport16_t *) IO_SPACE_BOUNDARY) {
-		uintptr_t prt = (uintptr_t) port;
-
-		*((ioport16_t *)(IA64_IOSPACE_ADDRESS +
-		    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
-	} else {
-		*port = v;
-	}
-
-	asm volatile ("mf\n" ::: "memory");
-	asm volatile ("mf.a\n" ::: "memory");
-}
-
-static inline void arch_pio_write_32(ioport32_t *port, uint32_t v)
-{
-	if (port < (ioport32_t *) IO_SPACE_BOUNDARY) {
-		uintptr_t prt = (uintptr_t) port;
-
-		*((ioport32_t *)(IA64_IOSPACE_ADDRESS +
-		    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
-	} else {
-		*port = v;
-	}
-
-	asm volatile ("mf\n" ::: "memory");
-	asm volatile ("mf.a\n" ::: "memory");
-}
-
-static inline uint8_t arch_pio_read_8(const ioport8_t *port)
-{
-	uint8_t v;
-
-	asm volatile ("mf\n" ::: "memory");
-
-	if (port < (ioport8_t *) IO_SPACE_BOUNDARY) {
-		uintptr_t prt = (uintptr_t) port;
-
-		v = *((ioport8_t *)(IA64_IOSPACE_ADDRESS +
-		    ((prt & 0xfff) | ((prt >> 2) << 12))));
-	} else {
-		v = *port;
-	}
-
-	asm volatile ("mf.a\n" ::: "memory");
-
-	return v;
-}
-
-static inline uint16_t arch_pio_read_16(const ioport16_t *port)
-{
-	uint16_t v;
-
-	asm volatile ("mf\n" ::: "memory");
-
-	if (port < (ioport16_t *) IO_SPACE_BOUNDARY) {
-		uintptr_t prt = (uintptr_t) port;
-
-		v = *((ioport16_t *)(IA64_IOSPACE_ADDRESS +
-		    ((prt & 0xfff) | ((prt >> 2) << 12))));
-	} else {
-		v = *port;
-	}
-
-	asm volatile ("mf.a\n" ::: "memory");
-
-	return v;
-}
-
-static inline uint32_t arch_pio_read_32(const ioport32_t *port)
-{
-	uint32_t v;
-
-	asm volatile ("mf\n" ::: "memory");
-
-	if (port < (ioport32_t *) IO_SPACE_BOUNDARY) {
-		uintptr_t prt = (uintptr_t) port;
-
-		v = *((ioport32_t *)(IA64_IOSPACE_ADDRESS +
-		    ((prt & 0xfff) | ((prt >> 2) << 12))));
-	} else {
-		v = *port;
-	}
-
-	asm volatile ("mf.a\n" ::: "memory");
-
-	return v;
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/elf.h
===================================================================
--- uspace/lib/c/arch/ia64/include/elf.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../../../../kernel/arch/ia64/include/elf.h
Index: uspace/lib/c/arch/ia64/include/elf_linux.h
===================================================================
--- uspace/lib/c/arch/ia64/include/elf_linux.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- * Copyright (c) 2011 Jiri Svoboda
- * 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 libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_ELF_LINUX_H_
-#define LBIC_ia64_ELF_LINUX_H_
-
-#include <libarch/istate.h>
-#include <sys/types.h>
-
-typedef struct {
-	/* TODO */
-	uint64_t pad[16];
-} elf_regs_t;
-
-static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
-{
-	/* TODO */
-	(void) istate; (void) elf_regs;
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/faddr.h
===================================================================
--- uspace/lib/c/arch/ia64/include/faddr.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- * Copyright (c) 2005 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.
- */
-
-/** @addtogroup libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_FADDR_H_
-#define LIBC_ia64_FADDR_H_
-
-#include <libarch/types.h>
-
-/**
- *
- * Calculate absolute address of function
- * referenced by fptr pointer.
- *
- * @param fptr Function pointer.
- *
- */
-#define FADDR(fptr)  (((fncptr_t *) (fptr))->fnc)
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/fibril.h
===================================================================
--- uspace/lib/c/arch/ia64/include/fibril.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*
- * Copyright (c) 2005 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.
- */
-
-/** @addtogroup libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_FIBRIL_H_
-#define LIBC_ia64_FIBRIL_H_
-
-#include <sys/types.h>
-#include <align.h>
-#include <libarch/stack.h>
-#include <libarch/types.h>
-
-/*
- * context_save() and context_restore() are both leaf procedures.
- * No need to allocate scratch area.
- */
-#define SP_DELTA  (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
-
-#define PFM_MASK  (~0x3fffffffff)
-
-/* Stack is divided into two equal parts (for memory stack and register stack). */
-#define FIBRIL_INITIAL_STACK_DIVISION  2
-
-#define context_set(c, _pc, stack, size, tls) \
-	do { \
-		(c)->pc = (uint64_t) _pc; \
-		(c)->bsp = ((uint64_t) stack) + \
-		    size / FIBRIL_INITIAL_STACK_DIVISION; \
-		(c)->ar_pfs &= PFM_MASK; \
-		(c)->sp = ((uint64_t) stack) + \
-		    ALIGN_UP((size / FIBRIL_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - \
-		    SP_DELTA; \
-		(c)->tp = (uint64_t) tls; \
-	} while (0)
-
-/*
- * Only save registers that must be preserved across
- * function calls.
- */
-typedef struct context {
-
-	/*
-	 * Application registers
-	 */
-	uint64_t ar_pfs;
-	uint64_t ar_unat_caller;
-	uint64_t ar_unat_callee;
-	uint64_t ar_rsc;
-	uint64_t bsp;		/* ar_bsp */
-	uint64_t ar_rnat;
-	uint64_t ar_lc;
-
-	/*
-	 * General registers
-	 */
-	uint64_t r1;
-	uint64_t r4;
-	uint64_t r5;
-	uint64_t r6;
-	uint64_t r7;
-	uint64_t sp;		/* r12 */
-	uint64_t tp;		/* r13 */
-	
-	/*
-	 * Branch registers
-	 */
-	uint64_t pc;		/* b0 */
-	uint64_t b1;
-	uint64_t b2;
-	uint64_t b3;
-	uint64_t b4;
-	uint64_t b5;
-
-	/*
-	 * Predicate registers
-	 */
-	uint64_t pr;
-
-	uint128_t f2 __attribute__ ((aligned(16)));
-	uint128_t f3;
-	uint128_t f4;
-	uint128_t f5;
-
-	uint128_t f16;
-	uint128_t f17;
-	uint128_t f18;
-	uint128_t f19;
-	uint128_t f20;
-	uint128_t f21;
-	uint128_t f22;
-	uint128_t f23;
-	uint128_t f24;
-	uint128_t f25;
-	uint128_t f26;
-	uint128_t f27;
-	uint128_t f28;
-	uint128_t f29;
-	uint128_t f30;
-	uint128_t f31;
-
-} context_t;
-
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return 0;	/* FIXME */
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/ia64/include/inttypes.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2010 Jiri Svoboda
- * 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 libia64
- * @{
- */
-
-#ifndef LIBC_ia64_INTTYPES_H_
-#define LIBC_ia64_INTTYPES_H_
-
-#define PRIdn  PRId64  /**< Format for native_t. */
-#define PRIun  PRIu64  /**< Format for sysarg_t. */
-#define PRIxn  PRIx64  /**< Format for hexadecimal sysarg_t. */
-#define PRIua  PRIu64  /**< Format for atomic_count_t. */
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/istate.h
===================================================================
--- uspace/lib/c/arch/ia64/include/istate.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../../../../kernel/arch/ia64/include/istate.h
Index: uspace/lib/c/arch/ia64/include/libarch/atomic.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/atomic.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/atomic.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2005 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.
+ */
+
+/** @addtogroup libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_ATOMIC_H_
+#define LIBC_ia64_ATOMIC_H_
+
+#define LIBC_ARCH_ATOMIC_H_
+
+#include <atomicdflt.h>
+
+static inline void atomic_inc(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], 1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+}
+
+static inline void atomic_dec(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], -1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+}
+
+static inline atomic_count_t atomic_preinc(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], 1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+	
+	return (v + 1);
+}
+
+static inline atomic_count_t atomic_predec(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], -1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+	
+	return (v - 1);
+}
+
+static inline atomic_count_t atomic_postinc(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], 1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+	
+	return v;
+}
+
+static inline atomic_count_t atomic_postdec(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], -1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+	
+	return v;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/barrier.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/barrier.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/barrier.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,1 @@
+../../../../../../../kernel/arch/ia64/include/arch/barrier.h
Index: uspace/lib/c/arch/ia64/include/libarch/config.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/config.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/config.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2006 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.
+ */
+
+/** @addtogroup libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_CONFIG_H_
+#define LIBC_ia64_CONFIG_H_
+
+#define PAGE_WIDTH	14
+#define PAGE_SIZE	(1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/ddi.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/ddi.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/ddi.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2005 Jakub Vana
+ * 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 libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_DDI_H_
+#define LIBC_ia64_DDI_H_
+
+#include <sys/types.h>
+#include <libarch/types.h>
+
+#define IO_SPACE_BOUNDARY	((void *) (64 * 1024))
+
+uint64_t get_ia64_iospace_address(void);
+
+extern uint64_t ia64_iospace_address;
+
+#define IA64_IOSPACE_ADDRESS \
+	(ia64_iospace_address ? \
+	    ia64_iospace_address : \
+	    (ia64_iospace_address = get_ia64_iospace_address()))
+
+static inline void arch_pio_write_8(ioport8_t *port, uint8_t v)
+{
+	if (port < (ioport8_t *) IO_SPACE_BOUNDARY) {
+		uintptr_t prt = (uintptr_t) port;
+
+		*((ioport8_t *)(IA64_IOSPACE_ADDRESS +
+		    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
+	} else {
+		*port = v;
+	}
+
+	asm volatile ("mf\n" ::: "memory");
+	asm volatile ("mf.a\n" ::: "memory");
+}
+
+static inline void arch_pio_write_16(ioport16_t *port, uint16_t v)
+{
+	if (port < (ioport16_t *) IO_SPACE_BOUNDARY) {
+		uintptr_t prt = (uintptr_t) port;
+
+		*((ioport16_t *)(IA64_IOSPACE_ADDRESS +
+		    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
+	} else {
+		*port = v;
+	}
+
+	asm volatile ("mf\n" ::: "memory");
+	asm volatile ("mf.a\n" ::: "memory");
+}
+
+static inline void arch_pio_write_32(ioport32_t *port, uint32_t v)
+{
+	if (port < (ioport32_t *) IO_SPACE_BOUNDARY) {
+		uintptr_t prt = (uintptr_t) port;
+
+		*((ioport32_t *)(IA64_IOSPACE_ADDRESS +
+		    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
+	} else {
+		*port = v;
+	}
+
+	asm volatile ("mf\n" ::: "memory");
+	asm volatile ("mf.a\n" ::: "memory");
+}
+
+static inline uint8_t arch_pio_read_8(const ioport8_t *port)
+{
+	uint8_t v;
+
+	asm volatile ("mf\n" ::: "memory");
+
+	if (port < (ioport8_t *) IO_SPACE_BOUNDARY) {
+		uintptr_t prt = (uintptr_t) port;
+
+		v = *((ioport8_t *)(IA64_IOSPACE_ADDRESS +
+		    ((prt & 0xfff) | ((prt >> 2) << 12))));
+	} else {
+		v = *port;
+	}
+
+	asm volatile ("mf.a\n" ::: "memory");
+
+	return v;
+}
+
+static inline uint16_t arch_pio_read_16(const ioport16_t *port)
+{
+	uint16_t v;
+
+	asm volatile ("mf\n" ::: "memory");
+
+	if (port < (ioport16_t *) IO_SPACE_BOUNDARY) {
+		uintptr_t prt = (uintptr_t) port;
+
+		v = *((ioport16_t *)(IA64_IOSPACE_ADDRESS +
+		    ((prt & 0xfff) | ((prt >> 2) << 12))));
+	} else {
+		v = *port;
+	}
+
+	asm volatile ("mf.a\n" ::: "memory");
+
+	return v;
+}
+
+static inline uint32_t arch_pio_read_32(const ioport32_t *port)
+{
+	uint32_t v;
+
+	asm volatile ("mf\n" ::: "memory");
+
+	if (port < (ioport32_t *) IO_SPACE_BOUNDARY) {
+		uintptr_t prt = (uintptr_t) port;
+
+		v = *((ioport32_t *)(IA64_IOSPACE_ADDRESS +
+		    ((prt & 0xfff) | ((prt >> 2) << 12))));
+	} else {
+		v = *port;
+	}
+
+	asm volatile ("mf.a\n" ::: "memory");
+
+	return v;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/elf.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/elf.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/elf.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,1 @@
+../../../../../../../kernel/arch/ia64/include/arch/elf.h
Index: uspace/lib/c/arch/ia64/include/libarch/elf_linux.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/elf_linux.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/elf_linux.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2011 Jiri Svoboda
+ * 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 libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_ELF_LINUX_H_
+#define LBIC_ia64_ELF_LINUX_H_
+
+#include <libarch/istate.h>
+#include <sys/types.h>
+
+typedef struct {
+	/* TODO */
+	uint64_t pad[16];
+} elf_regs_t;
+
+static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
+{
+	/* TODO */
+	(void) istate; (void) elf_regs;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/faddr.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/faddr.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/faddr.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2005 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.
+ */
+
+/** @addtogroup libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_FADDR_H_
+#define LIBC_ia64_FADDR_H_
+
+#include <libarch/types.h>
+
+/**
+ *
+ * Calculate absolute address of function
+ * referenced by fptr pointer.
+ *
+ * @param fptr Function pointer.
+ *
+ */
+#define FADDR(fptr)  (((fncptr_t *) (fptr))->fnc)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/fibril.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/fibril.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/fibril.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2005 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.
+ */
+
+/** @addtogroup libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_FIBRIL_H_
+#define LIBC_ia64_FIBRIL_H_
+
+#include <sys/types.h>
+#include <align.h>
+#include <libarch/stack.h>
+#include <libarch/types.h>
+
+/*
+ * context_save() and context_restore() are both leaf procedures.
+ * No need to allocate scratch area.
+ */
+#define SP_DELTA  (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
+
+#define PFM_MASK  (~0x3fffffffff)
+
+/* Stack is divided into two equal parts (for memory stack and register stack). */
+#define FIBRIL_INITIAL_STACK_DIVISION  2
+
+#define context_set(c, _pc, stack, size, tls) \
+	do { \
+		(c)->pc = (uint64_t) _pc; \
+		(c)->bsp = ((uint64_t) stack) + \
+		    size / FIBRIL_INITIAL_STACK_DIVISION; \
+		(c)->ar_pfs &= PFM_MASK; \
+		(c)->sp = ((uint64_t) stack) + \
+		    ALIGN_UP((size / FIBRIL_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - \
+		    SP_DELTA; \
+		(c)->tp = (uint64_t) tls; \
+	} while (0)
+
+/*
+ * Only save registers that must be preserved across
+ * function calls.
+ */
+typedef struct context {
+
+	/*
+	 * Application registers
+	 */
+	uint64_t ar_pfs;
+	uint64_t ar_unat_caller;
+	uint64_t ar_unat_callee;
+	uint64_t ar_rsc;
+	uint64_t bsp;		/* ar_bsp */
+	uint64_t ar_rnat;
+	uint64_t ar_lc;
+
+	/*
+	 * General registers
+	 */
+	uint64_t r1;
+	uint64_t r4;
+	uint64_t r5;
+	uint64_t r6;
+	uint64_t r7;
+	uint64_t sp;		/* r12 */
+	uint64_t tp;		/* r13 */
+	
+	/*
+	 * Branch registers
+	 */
+	uint64_t pc;		/* b0 */
+	uint64_t b1;
+	uint64_t b2;
+	uint64_t b3;
+	uint64_t b4;
+	uint64_t b5;
+
+	/*
+	 * Predicate registers
+	 */
+	uint64_t pr;
+
+	uint128_t f2 __attribute__ ((aligned(16)));
+	uint128_t f3;
+	uint128_t f4;
+	uint128_t f5;
+
+	uint128_t f16;
+	uint128_t f17;
+	uint128_t f18;
+	uint128_t f19;
+	uint128_t f20;
+	uint128_t f21;
+	uint128_t f22;
+	uint128_t f23;
+	uint128_t f24;
+	uint128_t f25;
+	uint128_t f26;
+	uint128_t f27;
+	uint128_t f28;
+	uint128_t f29;
+	uint128_t f30;
+	uint128_t f31;
+
+} context_t;
+
+static inline uintptr_t context_get_fp(context_t *ctx)
+{
+	return 0;	/* FIXME */
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/inttypes.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/inttypes.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/inttypes.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 Jiri Svoboda
+ * 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 libia64
+ * @{
+ */
+
+#ifndef LIBC_ia64_INTTYPES_H_
+#define LIBC_ia64_INTTYPES_H_
+
+#define PRIdn  PRId64  /**< Format for native_t. */
+#define PRIun  PRIu64  /**< Format for sysarg_t. */
+#define PRIxn  PRIx64  /**< Format for hexadecimal sysarg_t. */
+#define PRIua  PRIu64  /**< Format for atomic_count_t. */
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/istate.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/istate.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/istate.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,1 @@
+../../../../../../../kernel/arch/ia64/include/arch/istate.h
Index: uspace/lib/c/arch/ia64/include/libarch/register.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/register.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/register.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,1 @@
+../../../../../../../kernel/arch/ia64/include/arch/register.h
Index: uspace/lib/c/arch/ia64/include/libarch/stack.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/stack.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/stack.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2005 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.
+ */
+
+/** @addtogroup libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_STACK_H_
+#define LIBC_ia64_STACK_H_
+
+#define STACK_ITEM_SIZE			8
+#define STACK_ALIGNMENT			16
+#define STACK_SCRATCH_AREA_SIZE		16
+#define REGISTER_STACK_ALIGNMENT 	8
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/stackarg.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/stackarg.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/stackarg.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,43 @@
+/*
+ * 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 libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STACKARG_H_
+#define LIBC_STACKARG_H_
+
+#endif
+
+
+ /** @}
+ */
+
Index: uspace/lib/c/arch/ia64/include/libarch/syscall.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/syscall.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/syscall.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBC_ia64_SYSCALL_H_
+#define LIBC_ia64_SYSCALL_H_
+
+#define LIBARCH_SYSCALL_GENERIC
+
+#include <syscall.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/thread.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/thread.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/thread.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2006 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.
+ */
+
+/** @addtogroup libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_THREAD_H_
+#define LIBC_ia64_THREAD_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/tls.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/tls.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/tls.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2006 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.
+ */
+
+/** @addtogroup libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_TLS_H_
+#define LIBC_ia64_TLS_H_
+
+#define CONFIG_TLS_VARIANT_1
+
+#include <sys/types.h>
+
+/* This structure must be exactly 16 bytes long */
+typedef struct {
+	void *dtv; /* unused in static linking*/
+	void *fibril_data;
+} tcb_t;
+
+static inline void __tcb_set(tcb_t *tcb)
+{
+	asm volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13");
+}
+
+static inline tcb_t *__tcb_get(void)
+{
+	void *retval;
+
+	asm volatile ("mov %0 = r13\n" : "=r" (retval));
+
+	return retval;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/libarch/types.h
===================================================================
--- uspace/lib/c/arch/ia64/include/libarch/types.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
+++ uspace/lib/c/arch/ia64/include/libarch/types.h	(revision d2d5329e4b1afac22d5b4e82e280e6acb29db280)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2006 Ondrej Palkovsky
+ * 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 libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_TYPES_H_
+#define LIBC_ia64_TYPES_H_
+
+#define __64_BITS__
+
+#include <libarch/common.h>
+
+#define SIZE_MIN  UINT64_MIN
+#define SIZE_MAX  UINT64_MAX
+
+#define SSIZE_MIN  INT64_MIN
+#define SSIZE_MAX  INT64_MAX
+
+typedef struct {
+	uint64_t lo;
+	int64_t hi;
+} int128_t;
+
+typedef struct {
+	uint64_t lo;
+	uint64_t hi;
+} uint128_t;
+
+typedef uint64_t sysarg_t;
+typedef int64_t native_t;
+
+typedef int64_t ssize_t;
+typedef uint64_t size_t;
+
+typedef uint64_t uintptr_t;
+typedef int64_t intptr_t;
+typedef uint64_t atomic_count_t;
+typedef int64_t atomic_signed_t;
+
+typedef struct {
+	uintptr_t fnc;
+	uintptr_t gp;
+} __attribute__((may_alias)) fncptr_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/register.h
===================================================================
--- uspace/lib/c/arch/ia64/include/register.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../../../../kernel/arch/ia64/include/register.h
Index: uspace/lib/c/arch/ia64/include/stack.h
===================================================================
--- uspace/lib/c/arch/ia64/include/stack.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2005 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.
- */
-
-/** @addtogroup libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_STACK_H_
-#define LIBC_ia64_STACK_H_
-
-#define STACK_ITEM_SIZE			8
-#define STACK_ALIGNMENT			16
-#define STACK_SCRATCH_AREA_SIZE		16
-#define REGISTER_STACK_ALIGNMENT 	8
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/stackarg.h
===================================================================
--- uspace/lib/c/arch/ia64/include/stackarg.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,43 +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 libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STACKARG_H_
-#define LIBC_STACKARG_H_
-
-#endif
-
-
- /** @}
- */
-
Index: uspace/lib/c/arch/ia64/include/syscall.h
===================================================================
--- uspace/lib/c/arch/ia64/include/syscall.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,46 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBC_ia64_SYSCALL_H_
-#define LIBC_ia64_SYSCALL_H_
-
-#define LIBARCH_SYSCALL_GENERIC
-
-#include <syscall.h>
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/thread.h
===================================================================
--- uspace/lib/c/arch/ia64/include/thread.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
- * Copyright (c) 2006 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.
- */
-
-/** @addtogroup libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_THREAD_H_
-#define LIBC_ia64_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/tls.h
===================================================================
--- uspace/lib/c/arch/ia64/include/tls.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*
- * Copyright (c) 2006 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.
- */
-
-/** @addtogroup libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_TLS_H_
-#define LIBC_ia64_TLS_H_
-
-#define CONFIG_TLS_VARIANT_1
-
-#include <sys/types.h>
-
-/* This structure must be exactly 16 bytes long */
-typedef struct {
-	void *dtv; /* unused in static linking*/
-	void *fibril_data;
-} tcb_t;
-
-static inline void __tcb_set(tcb_t *tcb)
-{
-	asm volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13");
-}
-
-static inline tcb_t *__tcb_get(void)
-{
-	void *retval;
-
-	asm volatile ("mov %0 = r13\n" : "=r" (retval));
-
-	return retval;
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/ia64/include/types.h
===================================================================
--- uspace/lib/c/arch/ia64/include/types.h	(revision b5c2f5646cd6ac5e55c6a21110f700bb5fb3bae1)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * 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 libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_TYPES_H_
-#define LIBC_ia64_TYPES_H_
-
-#define __64_BITS__
-
-#include <libarch/common.h>
-
-#define SIZE_MIN  UINT64_MIN
-#define SIZE_MAX  UINT64_MAX
-
-#define SSIZE_MIN  INT64_MIN
-#define SSIZE_MAX  INT64_MAX
-
-typedef struct {
-	uint64_t lo;
-	int64_t hi;
-} int128_t;
-
-typedef struct {
-	uint64_t lo;
-	uint64_t hi;
-} uint128_t;
-
-typedef uint64_t sysarg_t;
-typedef int64_t native_t;
-
-typedef int64_t ssize_t;
-typedef uint64_t size_t;
-
-typedef uint64_t uintptr_t;
-typedef int64_t intptr_t;
-typedef uint64_t atomic_count_t;
-typedef int64_t atomic_signed_t;
-
-typedef struct {
-	uintptr_t fnc;
-	uintptr_t gp;
-} __attribute__((may_alias)) fncptr_t;
-
-#endif
-
-/** @}
- */
