[Letux-kernel] [Openpvrsgx-devgroup] [PATCH] pvrsgx/1.14: get_user_pages_remote no longer takes task_struct

H. Nikolaus Schaller hns at goldelico.com
Wed Nov 11 16:55:22 CET 2020


> Am 11.11.2020 um 06:27 schrieb Tony Lindgren <tony at atomide.com>:
> 
> * Tony Lindgren <tony at atomide.com> [201111 04:46]:
>> Hi,
>> 
>> * David Shah <dave at ds0.me> [200818 18:26]:
>>> This isn't actually running yet, I get the following error:
>>> 
>>> [   12.663492] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
>>> [   13.846168] PVR_K:(Error): PollForValueKM: Timeout. Expected 0x1 but found 0x0 (mask 0x1).
>>> [   13.880820] PVR_K:(Error): SGXInitialise: Wait for uKernel initialisation failed
>>> 
>>> followed by a PVR register dump.
>> 
>> I'm seeing the above too running pvrsrvinit with ddk-1.17. Looks like we
>> have some regression for ddk-1.14 and ddk-1.17 somewhere, or something got
>> changed in Linux that caused it.
>> 
>> I've confirmed that letux-pvrsrvkm-5.7-rc1 still works for pvrsrvinit with
>> no errors, while running pvrsrvinit starting with letux-pvrsrvkm-5.8-rc1
>> causes the the error above.
>> 
>> There are hardly any changes to drivers/gput/pvrsgx between those versions,
>> does anybody have ideas what might have broken?
> 
> Oh and we have ddk-1.9 working for droid4 though, and I have the following
> added -DPVR_LINUX_MEM_AREA_USE_VMAP to those hacks.. Looks like the following
> change fixes the issue for ddk-1.17, and probably for ddk-1.4 too.
> No idea what changed to need this though, any ideas?

seems to switch from using

https://www.kernel.org/doc/htmldocs/kernel-api/API-vmalloc.html

to

https://www.kernel.org/doc/htmldocs/kernel-api/API-vmap.html

in services4/srvkm/env/linux/mm.c

Maybe some subtle difference has creeped into vmalloc breaking DDK assumptions?

Alternatively, our last fix was wrong:

https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/commit/fa998661f8bde168f350b8c0787d4b652eb81a27

because it changes the memory protection parameter since v5.8-rc1?

> 
> I wonder if we should just enable this unconditionally for all the makefiles
> after we understand why this is needed?

Yes, if it doesn't break anything else.

BR,
Nikolaus


> 
> Regards,
> 
> Tony
> diff --git a/drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/Makefile b/drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/Makefile
> index d6dbeb513566c..ba54bf2ff1a5c 100644
> --- a/drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/Makefile
> +++ b/drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/Makefile
> @@ -117,6 +117,7 @@ ccflags-y += \
> 	-DLDM_PLATFORM \
> 	-DSUPPORT_SGX_EVENT_OBJECT \
> 	-DPVR2D_ALT_2DHW \
> +	-DPVR_LINUX_MEM_AREA_USE_VMAP \
> 	-DSUPPORT_SGX_HWPERF \
> 	-DSUPPORT_SGX_LOW_LATENCY_SCHEDULING \
> 	-DSUPPORT_LINUX_X86_PAT \
> diff --git a/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile b/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
> index fb5507bf5ba31..fdca642a9c3e2 100644
> --- a/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
> +++ b/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/Makefile
> @@ -117,6 +117,7 @@ ccflags-y += \
> 	-DLDM_PLATFORM \
> 	-DSUPPORT_SGX_EVENT_OBJECT \
> 	-DPVR2D_ALT_2DHW \
> +	-DPVR_LINUX_MEM_AREA_USE_VMAP \
> 	-DSUPPORT_SGX_HWPERF \
> 	-DSUPPORT_SGX_LOW_LATENCY_SCHEDULING \
> 	-DSUPPORT_LINUX_X86_PAT \
> _______________________________________________
> https://github.com/openpvrsgx-devgroup/linux_openpvrsgx
> openpvrsgx-devgroup mailing list
> openpvrsgx-devgroup at letux.org
> https://lists.goldelico.com/mailman/listinfo.cgi/openpvrsgx-devgroup



More information about the Letux-kernel mailing list