Linux v4.15-rc1-24-g43570f0383d6

This commit is contained in:
Laura Abbott 2017-11-29 10:43:21 -08:00
parent aa10bc0225
commit c33b7ad1f2
5 changed files with 6 additions and 179 deletions

View File

@ -1,125 +0,0 @@
From patchwork Thu Nov 23 02:41:54 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: drm/ttm: don't attempt to use hugepages if dma32 requested (v2)
From: Dave Airlie <airlied@gmail.com>
X-Patchwork-Id: 189812
Message-Id: <20171123024154.10023-1-airlied@gmail.com>
To: dri-devel@lists.freedesktop.org
Date: Thu, 23 Nov 2017 12:41:54 +1000
From: Dave Airlie <airlied@redhat.com>
The commit below introduced thp support for ttm allocations, however it didn't
take into account the case where dma32 was requested. Some drivers always request
dma32, and the bochs driver is one of those.
This fixes an oops:
[ 30.108507] ------------[ cut here ]------------
[ 30.108920] kernel BUG at ./include/linux/gfp.h:408!
[ 30.109356] invalid opcode: 0000 [#1] SMP
[ 30.109700] Modules linked in: fuse nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack devlink ip_set nfnetlink ebtable_nat ebtable_broute bridge ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_raw iptable_security ebtable_filter ebtables ip6table_filter ip6_tables snd_hda_codec_generic kvm_intel kvm snd_hda_intel snd_hda_codec irqbypass ppdev snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm bochs_drm ttm joydev drm_kms_helper virtio_balloon snd_timer snd parport_pc drm soundcore parport i2c_piix4 nls_utf8 isofs squashfs zstd_decompress xxhash 8021q garp mrp stp llc virtio_net
[ 30.115605] virtio_console virtio_scsi crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel serio_raw virtio_pci virtio_ring virtio ata_generic pata_acpi qemu_fw_cfg sunrpc scsi_transport_iscsi loop
[ 30.117425] CPU: 0 PID: 1347 Comm: gnome-shell Not tainted 4.15.0-0.rc0.git6.1.fc28.x86_64 #1
[ 30.118141] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014
[ 30.118866] task: ffff923a77e03380 task.stack: ffffa78182228000
[ 30.119366] RIP: 0010:__alloc_pages_nodemask+0x35e/0x430
[ 30.119810] RSP: 0000:ffffa7818222bba8 EFLAGS: 00010202
[ 30.120250] RAX: 0000000000000001 RBX: 00000000014382c6 RCX: 0000000000000006
[ 30.120840] RDX: 0000000000000000 RSI: 0000000000000009 RDI: 0000000000000000
[ 30.121443] RBP: ffff923a760d6000 R08: 0000000000000000 R09: 0000000000000006
[ 30.122039] R10: 0000000000000040 R11: 0000000000000300 R12: ffff923a729273c0
[ 30.122629] R13: 0000000000000000 R14: 0000000000000000 R15: ffff923a7483d400
[ 30.123223] FS: 00007fe48da7dac0(0000) GS:ffff923a7cc00000(0000) knlGS:0000000000000000
[ 30.123896] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 30.124373] CR2: 00007fe457b73000 CR3: 0000000078313000 CR4: 00000000000006f0
[ 30.124968] Call Trace:
[ 30.125186] ttm_pool_populate+0x19b/0x400 [ttm]
[ 30.125578] ttm_bo_vm_fault+0x325/0x570 [ttm]
[ 30.125964] __do_fault+0x19/0x11e
[ 30.126255] __handle_mm_fault+0xcd3/0x1260
[ 30.126609] handle_mm_fault+0x14c/0x310
[ 30.126947] __do_page_fault+0x28c/0x530
[ 30.127282] do_page_fault+0x32/0x270
[ 30.127593] async_page_fault+0x22/0x30
[ 30.127922] RIP: 0033:0x7fe48aae39a8
[ 30.128225] RSP: 002b:00007ffc21c4d928 EFLAGS: 00010206
[ 30.128664] RAX: 00007fe457b73000 RBX: 000055cd4c1041a0 RCX: 00007fe457b73040
[ 30.129259] RDX: 0000000000300000 RSI: 0000000000000000 RDI: 00007fe457b73000
[ 30.129855] RBP: 0000000000000300 R08: 000000000000000c R09: 0000000100000000
[ 30.130457] R10: 0000000000000001 R11: 0000000000000246 R12: 000055cd4c1041a0
[ 30.131054] R13: 000055cd4bdfe990 R14: 000055cd4c104110 R15: 0000000000000400
[ 30.131648] Code: 11 01 00 0f 84 a9 00 00 00 65 ff 0d 6d cc dd 44 e9 0f ff ff ff 40 80 cd 80 e9 99 fe ff ff 48 89 c7 e8 e7 f6 01 00 e9 b7 fe ff ff <0f> 0b 0f ff e9 40 fd ff ff 65 48 8b 04 25 80 d5 00 00 8b 40 4c
[ 30.133245] RIP: __alloc_pages_nodemask+0x35e/0x430 RSP: ffffa7818222bba8
[ 30.133836] ---[ end trace d4f1deb60784f40a ]---
v2: handle free path as well.
Reported-by: Laura Abbott <labbott@redhat.com>
Reported-by: Adam Williamson <awilliam@redhat.com>
Fixes: 0284f1ead87463bc17cf5e81a24fc65c052486f3 (drm/ttm: add transparent huge page support for cached allocations v2)
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index 316f831..b0551aa 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -744,12 +744,14 @@ static void ttm_put_pages(struct page **pages, unsigned npages, int flags,
}
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
- for (j = 0; j < HPAGE_PMD_NR; ++j)
- if (p++ != pages[i + j])
- break;
+ if (!(flags & TTM_PAGE_FLAG_DMA32)) {
+ for (j = 0; j < HPAGE_PMD_NR; ++j)
+ if (p++ != pages[i + j])
+ break;
- if (j == HPAGE_PMD_NR)
- order = HPAGE_PMD_ORDER;
+ if (j == HPAGE_PMD_NR)
+ order = HPAGE_PMD_ORDER;
+ }
#endif
if (page_count(pages[i]) != 1)
@@ -865,20 +867,22 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,
i = 0;
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
- while (npages >= HPAGE_PMD_NR) {
- gfp_t huge_flags = gfp_flags;
+ if (!(gfp_flags & GFP_DMA32)) {
+ while (npages >= HPAGE_PMD_NR) {
+ gfp_t huge_flags = gfp_flags;
- huge_flags |= GFP_TRANSHUGE;
- huge_flags &= ~__GFP_MOVABLE;
- huge_flags &= ~__GFP_COMP;
- p = alloc_pages(huge_flags, HPAGE_PMD_ORDER);
- if (!p)
- break;
+ huge_flags |= GFP_TRANSHUGE;
+ huge_flags &= ~__GFP_MOVABLE;
+ huge_flags &= ~__GFP_COMP;
+ p = alloc_pages(huge_flags, HPAGE_PMD_ORDER);
+ if (!p)
+ break;
- for (j = 0; j < HPAGE_PMD_NR; ++j)
- pages[i++] = p++;
+ for (j = 0; j < HPAGE_PMD_NR; ++j)
+ pages[i++] = p++;
- npages -= HPAGE_PMD_NR;
+ npages -= HPAGE_PMD_NR;
+ }
}
#endif

2
gitrev
View File

@ -1 +1 @@
0c86a6bd85ff0629cd2c5141027fc1c8bb6cde9c
43570f0383d6d5879ae585e6c3cf027ba321546f

View File

@ -69,7 +69,7 @@ Summary: The Linux kernel
# The rc snapshot level
%global rcrev 1
# The git snapshot level
%define gitrev 0
%define gitrev 1
# Set rpm version accordingly
%define rpmversion 4.%{upstream_sublevel}.0
%endif
@ -626,16 +626,10 @@ Patch619: input-rmi4-remove-the-need-for-artifical-IRQ.patch
# rhbz 1509461
Patch625: v3-2-2-Input-synaptics---Lenovo-X1-Carbon-5-should-use-SMBUS-RMI.patch
# Pointed to by Eric Anholt
Patch627: rpi-graphics-fix.patch
# For https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife
# Queued in bluetooth-next for merging into 4.16
Patch628: 0001-Bluetooth-btusb-Add-a-Kconfig-option-to-enable-USB-a.patch
# rhbz 1516584
Patch629: drm-ttm-don-t-attempt-to-use-hugepages-if-dma32-requested.mbox
# Fix left-button not working with some hid-multitouch touchpads
# Adding these suggested by Benjamin Tissoires
# Queued in hid.git/for-4.16/hid-quirks-cleanup/multitouch for merging into 4.16
@ -2193,6 +2187,9 @@ fi
#
#
%changelog
* Wed Nov 29 2017 Laura Abbott <labbott@redhat.com> - 4.15.0-0.rc1.git1.1
- Linux v4.15-rc1-24-g43570f0383d6
* Wed Nov 29 2017 Laura Abbott <labbott@redhat.com>
- Reenable debugging options.

View File

@ -1,46 +0,0 @@
From 253696ccd613fbdaa5aba1de44c461a058e0a114 Mon Sep 17 00:00:00 2001
From: Stefan Schake <stschake@gmail.com>
Date: Fri, 10 Nov 2017 02:05:06 +0100
Subject: drm/vc4: Account for interrupts in flight
Synchronously disable the IRQ to make the following cancel_work_sync
invocation effective.
An interrupt in flight could enqueue further overflow mem work. As we
free the binner BO immediately following vc4_irq_uninstall this caused
a NULL pointer dereference in the work callback vc4_overflow_mem_work.
Link: https://github.com/anholt/linux/issues/114
Signed-off-by: Stefan Schake <stschake@gmail.com>
Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1510275907-993-2-git-send-email-stschake@gmail.com
diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c
index 7d7af3a..61b2e53 100644
--- a/drivers/gpu/drm/vc4/vc4_irq.c
+++ b/drivers/gpu/drm/vc4/vc4_irq.c
@@ -208,6 +208,9 @@ vc4_irq_postinstall(struct drm_device *dev)
{
struct vc4_dev *vc4 = to_vc4_dev(dev);
+ /* Undo the effects of a previous vc4_irq_uninstall. */
+ enable_irq(dev->irq);
+
/* Enable both the render done and out of memory interrupts. */
V3D_WRITE(V3D_INTENA, V3D_DRIVER_IRQS);
@@ -225,6 +228,9 @@ vc4_irq_uninstall(struct drm_device *dev)
/* Clear any pending interrupts we might have left. */
V3D_WRITE(V3D_INTCTL, V3D_DRIVER_IRQS);
+ /* Finish any interrupt handler still in flight. */
+ disable_irq(dev->irq);
+
cancel_work_sync(&vc4->overflow_mem_work);
}
--
cgit v0.10.2

View File

@ -1,3 +1,4 @@
SHA512 (linux-4.14.tar.xz) = 77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8
SHA512 (perf-man-4.14.tar.gz) = 76a9d8adc284cdffd4b3fbb060e7f9a14109267707ce1d03f4c3239cd70d8d164f697da3a0f90a363fbcac42a61d3c378afbcc2a86f112c501b9cb5ce74ef9f8
SHA512 (patch-4.15-rc1.xz) = 00cb666d762e46b2a965ce27a06272240e9dc375dc92644ade1a512f27ccea615ae609e3b685a0061614859acbdf28fd3d6bfb137e2208f2acc04114ff9fff46
SHA512 (patch-4.15-rc1-git1.xz) = be5d998166f0f3dc4b2474e5a6914050f18acc2823a179934fbf651f5f487ee97ab9a5196b20b43bf985121c9c5e44441dab8759cbee31686a39ab79bf5e7a9a