From owner-freebsd-current@freebsd.org Mon Oct 21 01:14:34 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 154DA16FA31; Mon, 21 Oct 2019 01:14:34 +0000 (UTC) (envelope-from neel@neelc.org) Received: from nyc1.neelc.org (nyc1.neelc.org [185.213.26.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46xJZc6ZYnz4Ypj; Mon, 21 Oct 2019 01:14:32 +0000 (UTC) (envelope-from neel@neelc.org) Received: from mail.neelc.org (nyc1.neelc.org [IPv6:2a0d:5600:33:11::2]) by nyc1.neelc.org (Postfix) with ESMTPSA id 21BA4151569; Sun, 20 Oct 2019 21:14:22 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 20 Oct 2019 21:14:22 -0400 From: Neel Chauhan To: Yuri Pankov Cc: freebsd-current@freebsd.org, owner-freebsd-current@freebsd.org Subject: Re: DRM-current-kmod is still a problem at r353339 In-Reply-To: <7cb6ecd6-2dcd-92e4-75a3-5e5d34377ed6@yuripv.net> References: <7ca3b30a-81f6-f79d-1486-7fd29765646f@acm.org> <99c89ca0-462c-f4c7-fa07-6f61e9d39d66@acm.org> <3bb2e410-51dd-bc3f-7660-41a4683551b3@daemonic.se> <20191017195347.GB6447@raichu> <53ff1ac5-c7e8-1b6c-bd43-481eaef61120@daemonic.se> <72d67f0a-aeef-1c06-2b12-9351a1f52060@anduin.net> <689d53378dcca22adb29aa23f03e8e1b@neelc.org> <25593555-6452-0933-d0fe-0459425cde55@delphij.net> <7cb6ecd6-2dcd-92e4-75a3-5e5d34377ed6@yuripv.net> Message-ID: X-Sender: neel@neelc.org User-Agent: Roundcube Webmail/1.3.9 X-Rspamd-Queue-Id: 46xJZc6ZYnz4Ypj X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of neel@neelc.org designates 185.213.26.161 as permitted sender) smtp.mailfrom=neel@neelc.org X-Spamd-Result: default: False [-2.83 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[neelc.org]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-0.53)[asn: 63473(-2.61), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:63473, ipnet:185.213.26.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2019 01:14:34 -0000 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) @@ -355,8 +355,9 @@ } \ } 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); \ @@ -951,8 +952,16 @@ 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 * -Neel === https://www.neelc.org/ 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@'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? > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"