diff options
author | 2019-04-14 10:14:50 +0000 | |
---|---|---|
committer | 2019-04-14 10:14:50 +0000 | |
commit | 7f4dd37977dc50fdbac8c09deb3ed9ed9b8d0c87 (patch) | |
tree | 6c75a844a113c0987bd29861e921b2d54ba0752c /sys/dev/pci/drm/include/asm/pgtable.h | |
parent | Add lock order checking for timeouts (diff) | |
download | wireguard-openbsd-7f4dd37977dc50fdbac8c09deb3ed9ed9b8d0c87.tar.xz wireguard-openbsd-7f4dd37977dc50fdbac8c09deb3ed9ed9b8d0c87.zip |
Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.
Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)
This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).
Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.
Diffstat (limited to 'sys/dev/pci/drm/include/asm/pgtable.h')
-rw-r--r-- | sys/dev/pci/drm/include/asm/pgtable.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/include/asm/pgtable.h b/sys/dev/pci/drm/include/asm/pgtable.h new file mode 100644 index 00000000000..58f3a0aa1d4 --- /dev/null +++ b/sys/dev/pci/drm/include/asm/pgtable.h @@ -0,0 +1,42 @@ +/* Public domain. */ + +#ifndef _ASM_PGTABLE_H +#define _ASM_PGTABLE_H + +#include <machine/pmap.h> +#include <machine/pte.h> +#include <linux/types.h> + +#define pgprot_val(v) (v) +#define PAGE_KERNEL 0 +#define PAGE_KERNEL_IO 0 + +static inline pgprot_t +pgprot_writecombine(pgprot_t prot) +{ +#if PMAP_WC != 0 + return prot | PMAP_WC; +#else + return prot | PMAP_NOCACHE; +#endif +} + +static inline pgprot_t +pgprot_noncached(pgprot_t prot) +{ +#if PMAP_DEVICE != 0 + return prot | PMAP_DEVICE; +#else + return prot | PMAP_NOCACHE; +#endif +} + +#if defined(__i386__) || defined(__amd64__) +#define _PAGE_PRESENT PG_V +#define _PAGE_RW PG_RW +#define _PAGE_PAT PG_PAT +#define _PAGE_PWT PG_WT +#define _PAGE_PCD PG_N +#endif + +#endif |