xref: /dflybsd-src/sys/dev/drm/include/asm/pgtable.h (revision c5cb444a188f6b4bc890e750a7351696ead5d008)
12cd2ed12SFrançois Tigeot /*
2f0bba3d1SFrançois Tigeot  * Copyright (c) 2015-2018 François Tigeot <ftigeot@wolfpond.org>
32cd2ed12SFrançois Tigeot  * All rights reserved.
42cd2ed12SFrançois Tigeot  *
52cd2ed12SFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
62cd2ed12SFrançois Tigeot  * modification, are permitted provided that the following conditions
72cd2ed12SFrançois Tigeot  * are met:
82cd2ed12SFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
92cd2ed12SFrançois Tigeot  *    notice unmodified, this list of conditions, and the following
102cd2ed12SFrançois Tigeot  *    disclaimer.
112cd2ed12SFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
122cd2ed12SFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
132cd2ed12SFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
142cd2ed12SFrançois Tigeot  *
152cd2ed12SFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
162cd2ed12SFrançois Tigeot  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
172cd2ed12SFrançois Tigeot  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
182cd2ed12SFrançois Tigeot  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
192cd2ed12SFrançois Tigeot  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
202cd2ed12SFrançois Tigeot  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
212cd2ed12SFrançois Tigeot  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
222cd2ed12SFrançois Tigeot  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
232cd2ed12SFrançois Tigeot  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
242cd2ed12SFrançois Tigeot  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
252cd2ed12SFrançois Tigeot  */
262cd2ed12SFrançois Tigeot 
272cd2ed12SFrançois Tigeot #ifndef _ASM_PGTABLE_H_
282cd2ed12SFrançois Tigeot #define _ASM_PGTABLE_H_
292cd2ed12SFrançois Tigeot 
30f0bba3d1SFrançois Tigeot #include <asm/page.h>
31f0bba3d1SFrançois Tigeot 
322cd2ed12SFrançois Tigeot #include <asm/pgtable_types.h>
332cd2ed12SFrançois Tigeot 
pgprot_noncached(pgprot_t prot)341ca9f5d2SFrançois Tigeot static inline pgprot_t pgprot_noncached(pgprot_t prot)
351ca9f5d2SFrançois Tigeot {
36*c5cb444aSFrançois Tigeot 	return (prot | VM_MEMATTR_UNCACHEABLE);
371ca9f5d2SFrançois Tigeot }
381ca9f5d2SFrançois Tigeot 
392cd2ed12SFrançois Tigeot #endif	/* _ASM_PGTABLE_H_ */
40