Re: DRM-current-kmod is still a problem at r353339

From: Yuri Pankov <yuripv_at_yuripv.net>
Date: Mon, 21 Oct 2019 04:16:32 +0300
On 10/21/2019 4:14 AM, Neel Chauhan wrote:
> For me, the following code is still necessary for me (HP Spectre x360 
> 2018), which is the remaining parts of the patches not committed if you 
> are using a recent kernel. I don't know about you all ThinkPad users, it 
> should still apply as it's Intel in general not just HP or Lenovo. 
> Without these patches, I get a kernel panic.
> 
> Keep in mind that the patch may render as spaces, but it should be tabs.
> 
> Index: amd64/pmap.c
> ===================================================================
> --- amd64/pmap.c    (revision 353788)
> +++ amd64/pmap.c    (working copy)
> _at__at_ -355,8 +355,9 _at__at_
>       }                        \
>   } while (0)
> 
> -#define    CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m)    \
> -            CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, VM_PAGE_TO_PHYS(m))
> +#define    CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m) do {    \
> +        CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, VM_PAGE_TO_PHYS(m)); \
> +} while (0)
> 
>   #define    RELEASE_PV_LIST_LOCK(lockp)        do {    \
>       struct rwlock **_lockp = (lockp);        \
> _at__at_ -951,8 +952,16 _at__at_
>   static u_long *
>   pmap_delayed_invl_genp(vm_page_t m)
>   {
> +    vm_paddr_t pa;
> +    u_long *gen;
> 
> -    return (&pa_to_pmdp(VM_PAGE_TO_PHYS(m))->pv_invl_gen);
> +    pa = VM_PAGE_TO_PHYS(m);
> +    if (__predict_false((pa) > pmap_last_pa))
> +        gen = &pv_dummy_large.pv_invl_gen;
> +    else
> +        gen = &(pa_to_pmdp(pa)->pv_invl_gen);
> +
> +    return (gen);
>   }
>   #else
>   static u_long *

If you look below, that's exactly the patch mjg_at_ provided and Xin 
pointed you at.

> On 2019-10-20 02:45, Yuri Pankov wrote:
>> On 10/18/2019 8:01 AM, Xin Li wrote:
>>> Another (semi-fixed!) data point -- I can confirm that with if
>>> (vm_page_sleep_if_busy(page, "linuxkpi"))
>>>   -> if (!vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL)) change and
>>> mjg_at_'s earlier patch at
>>> https://people.freebsd.org/~mjg/pmap-fict-invl.diff (please commit it) ,
>>> the latest drm-v5.0 branch of drm-current-kmod worked just fine with
>>> Intel HD Graphics P630 on Lenovo P51.
>>
>> Confirmed that it worked for me too on P51.
>>
>> Sorry for offtopic, but do you see the console getting "stuck" after
>> loading i915kms, i.e. for input to show you need to switch to another
>> console and back?
Received on Sun Oct 20 2019 - 23:16:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:22 UTC