xref: /dflybsd-src/sys/dev/drm/include/asm/processor.h (revision 862a9d7e2e9a803518c3179b9854396cefc1611a)
1c6002f72SFrançois Tigeot /*
2*862a9d7eSFrançois Tigeot  * Copyright (c) 2019-2020 François Tigeot <ftigeot@wolfpond.org>
3c6002f72SFrançois Tigeot  * All rights reserved.
4c6002f72SFrançois Tigeot  *
5c6002f72SFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
6c6002f72SFrançois Tigeot  * modification, are permitted provided that the following conditions
7c6002f72SFrançois Tigeot  * are met:
8c6002f72SFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
9c6002f72SFrançois Tigeot  *    notice unmodified, this list of conditions, and the following
10c6002f72SFrançois Tigeot  *    disclaimer.
11c6002f72SFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
12c6002f72SFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
13c6002f72SFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
14c6002f72SFrançois Tigeot  *
15c6002f72SFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16c6002f72SFrançois Tigeot  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17c6002f72SFrançois Tigeot  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18c6002f72SFrançois Tigeot  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19c6002f72SFrançois Tigeot  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20c6002f72SFrançois Tigeot  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21c6002f72SFrançois Tigeot  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22c6002f72SFrançois Tigeot  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23c6002f72SFrançois Tigeot  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24c6002f72SFrançois Tigeot  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25c6002f72SFrançois Tigeot  */
26c6002f72SFrançois Tigeot 
27c6002f72SFrançois Tigeot #ifndef _ASM_PROCESSOR_H_
28c6002f72SFrançois Tigeot #define _ASM_PROCESSOR_H_
29c6002f72SFrançois Tigeot 
30c6002f72SFrançois Tigeot #include <asm/types.h>
31c6002f72SFrançois Tigeot #include <asm/current.h>
32c6002f72SFrançois Tigeot #include <asm/cpufeatures.h>
33c6002f72SFrançois Tigeot #include <asm/page.h>
34c6002f72SFrançois Tigeot #include <asm/pgtable_types.h>
35c6002f72SFrançois Tigeot #include <asm/special_insns.h>
36c6002f72SFrançois Tigeot 
37c6002f72SFrançois Tigeot #include <linux/cache.h>
38c6002f72SFrançois Tigeot #include <linux/threads.h>
39c6002f72SFrançois Tigeot #include <linux/math64.h>
40c6002f72SFrançois Tigeot #include <linux/err.h>
41c6002f72SFrançois Tigeot #include <linux/irqflags.h>
42c6002f72SFrançois Tigeot 
43c6002f72SFrançois Tigeot #include <machine/cpufunc.h>
44c6002f72SFrançois Tigeot 
45c6002f72SFrançois Tigeot #define cpu_relax()	cpu_pause()
46c6002f72SFrançois Tigeot 
47*862a9d7eSFrançois Tigeot struct cpuinfo_x86 {
48*862a9d7eSFrançois Tigeot 	u16		x86_clflush_size;
49*862a9d7eSFrançois Tigeot };
50*862a9d7eSFrançois Tigeot 
51*862a9d7eSFrançois Tigeot extern struct cpuinfo_x86	boot_cpu_data;
52*862a9d7eSFrançois Tigeot 
53c6002f72SFrançois Tigeot #endif	/* _ASM_PROCESSOR_H_ */
54