From 40d57955f2f1a3a65c42ea374f86c74cf879d76d Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 2 Aug 2023 11:03:17 +0000 Subject: [PATCH] don't change the end marker in sg_set_page() Prompted by bad memory accesses seen with page flipping on alder lake and raptor lake. Starting xfce reliably caused problems. reported by kn@ and yasuoka@, both confirmed this fixes it ok kn@ kettenis@ --- sys/dev/pci/drm/include/linux/scatterlist.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/include/linux/scatterlist.h b/sys/dev/pci/drm/include/linux/scatterlist.h index b2c0cb50dd9..614459edbfe 100644 --- a/sys/dev/pci/drm/include/linux/scatterlist.h +++ b/sys/dev/pci/drm/include/linux/scatterlist.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scatterlist.h,v 1.5 2023/01/01 01:34:58 jsg Exp $ */ +/* $OpenBSD: scatterlist.h,v 1.6 2023/08/02 11:03:17 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * @@ -119,7 +119,6 @@ sg_set_page(struct scatterlist *sgl, struct vm_page *page, sgl->dma_address = page ? VM_PAGE_TO_PHYS(page) : 0; sgl->offset = offset; sgl->length = length; - sgl->end = false; } #define sg_dma_address(sg) ((sg)->dma_address) -- 2.20.1