xref: /netbsd-src/sys/compat/linux/common/linux_machdep.h (revision abbc8a65e23054d25cf7067e2df63d999881954c)
1*abbc8a65Sryo /*	$NetBSD: linux_machdep.h,v 1.20 2021/09/23 06:56:27 ryo Exp $	*/
25f13e451Schristos 
35f13e451Schristos /*-
45f13e451Schristos  * Copyright (c) 1998 The NetBSD Foundation, Inc.
55f13e451Schristos  * All rights reserved.
65f13e451Schristos  *
75f13e451Schristos  * This code is derived from software contributed to The NetBSD Foundation
85f13e451Schristos  * by Eric Haszlakiewicz.
95f13e451Schristos  *
105f13e451Schristos  * Redistribution and use in source and binary forms, with or without
115f13e451Schristos  * modification, are permitted provided that the following conditions
125f13e451Schristos  * are met:
135f13e451Schristos  * 1. Redistributions of source code must retain the above copyright
145f13e451Schristos  *    notice, this list of conditions and the following disclaimer.
155f13e451Schristos  * 2. Redistributions in binary form must reproduce the above copyright
165f13e451Schristos  *    notice, this list of conditions and the following disclaimer in the
175f13e451Schristos  *    documentation and/or other materials provided with the distribution.
185f13e451Schristos  *
195f13e451Schristos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
205f13e451Schristos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
215f13e451Schristos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
225f13e451Schristos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
235f13e451Schristos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
245f13e451Schristos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
255f13e451Schristos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
265f13e451Schristos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
275f13e451Schristos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
285f13e451Schristos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
295f13e451Schristos  * POSSIBILITY OF SUCH DAMAGE.
305f13e451Schristos  */
315f13e451Schristos 
325f13e451Schristos #ifndef _LINUX_MACHDEP_H
335f13e451Schristos #define _LINUX_MACHDEP_H
345f13e451Schristos 
355f13e451Schristos #if defined(__i386__)
365f13e451Schristos #include <compat/linux/arch/i386/linux_machdep.h>
370c080222Sitohy #elif defined(__m68k__)
380c080222Sitohy #include <compat/linux/arch/m68k/linux_machdep.h>
395f13e451Schristos #elif defined(__alpha__)
405f13e451Schristos #include <compat/linux/arch/alpha/linux_machdep.h>
41cac0b393Smanu #elif defined(__powerpc__)
42cac0b393Smanu #include <compat/linux/arch/powerpc/linux_machdep.h>
43e302bb5bSmanu #elif defined(__mips__)
44e302bb5bSmanu #include <compat/linux/arch/mips/linux_machdep.h>
45*abbc8a65Sryo #elif defined(__aarch64__)
46*abbc8a65Sryo #include <compat/linux/arch/aarch64/linux_machdep.h>
4764625064Sbjh21 #elif defined(__arm__)
4864625064Sbjh21 #include <compat/linux/arch/arm/linux_machdep.h>
4989647c7cSmanu #elif defined(__amd64__)
5089647c7cSmanu #include <compat/linux/arch/amd64/linux_machdep.h>
515f13e451Schristos #else
525f13e451Schristos #error Undefined linux_machdep.h machine type.
535f13e451Schristos #endif
545f13e451Schristos 
5548f401a8Schristos #ifndef LINUX_UNAME_ARCH
5648f401a8Schristos #define LINUX_UNAME_ARCH machine
5748f401a8Schristos #endif
5848f401a8Schristos 
5933fa5ccbSchs #ifndef LINUX_LWP_SETPRIVATE
6033fa5ccbSchs #define LINUX_LWP_SETPRIVATE lwp_setprivate
6133fa5ccbSchs #endif
6233fa5ccbSchs 
6328debea3Schristos #ifdef _KERNEL
6428debea3Schristos __BEGIN_DECLS
65f2af9174Sdsl void linux_sendsig(const ksiginfo_t *, const sigset_t *);
66f2af9174Sdsl dev_t linux_fakedev(dev_t, int);
6728debea3Schristos __END_DECLS
6828debea3Schristos #endif /* !_KERNEL */
6928debea3Schristos 
705f13e451Schristos #endif /* !_LINUX_MACHDEP_H */
71