diff --git a/configs/base-generic/CONFIG_PREEMPTIRQ_EVENTS b/configs/base-generic/CONFIG_PREEMPTIRQ_EVENTS new file mode 100644 index 000000000..a7fcee823 --- /dev/null +++ b/configs/base-generic/CONFIG_PREEMPTIRQ_EVENTS @@ -0,0 +1 @@ +# CONFIG_PREEMPTIRQ_EVENTS is not set diff --git a/configs/base-generic/arm/aarch64/CONFIG_REFCOUNT_FULL b/configs/base-generic/arm/aarch64/CONFIG_REFCOUNT_FULL new file mode 100644 index 000000000..c7e4a167a --- /dev/null +++ b/configs/base-generic/arm/aarch64/CONFIG_REFCOUNT_FULL @@ -0,0 +1 @@ +CONFIG_REFCOUNT_FULL=y diff --git a/drm-ttm-don-t-attempt-to-use-hugepages-if-dma32-requested.mbox b/drm-ttm-don-t-attempt-to-use-hugepages-if-dma32-requested.mbox new file mode 100644 index 000000000..fad495a97 --- /dev/null +++ b/drm-ttm-don-t-attempt-to-use-hugepages-if-dma32-requested.mbox @@ -0,0 +1,125 @@ +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 +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 + +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 +Reported-by: Adam Williamson +Fixes: 0284f1ead87463bc17cf5e81a24fc65c052486f3 (drm/ttm: add transparent huge page support for cached allocations v2) +Signed-off-by: Dave Airlie +--- + 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 + diff --git a/gitrev b/gitrev index fa36c369c..30fbb7917 100644 --- a/gitrev +++ b/gitrev @@ -1 +1 @@ -c8a0739b185d11d6e2ca7ad9f5835841d1cfc765 +0c86a6bd85ff0629cd2c5141027fc1c8bb6cde9c diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config index 846249802..b5f2dd4b8 100644 --- a/kernel-aarch64-debug.config +++ b/kernel-aarch64-debug.config @@ -4227,6 +4227,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-aarch64.config b/kernel-aarch64.config index aeeece59d..168d8836c 100644 --- a/kernel-aarch64.config +++ b/kernel-aarch64.config @@ -4206,6 +4206,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y @@ -4382,7 +4383,7 @@ CONFIG_RD_XZ=y # CONFIG_READABLE_ASM is not set CONFIG_REALTEK_AUTOPM=y CONFIG_REALTEK_PHY=m -# CONFIG_REFCOUNT_FULL is not set +CONFIG_REFCOUNT_FULL=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_SPMI=y CONFIG_REGMAP=y diff --git a/kernel-armv7hl-debug.config b/kernel-armv7hl-debug.config index beaf191b0..acc0a2fab 100644 --- a/kernel-armv7hl-debug.config +++ b/kernel-armv7hl-debug.config @@ -4536,6 +4536,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-armv7hl-lpae-debug.config b/kernel-armv7hl-lpae-debug.config index 82c9f2474..2b8808be3 100644 --- a/kernel-armv7hl-lpae-debug.config +++ b/kernel-armv7hl-lpae-debug.config @@ -4291,6 +4291,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-armv7hl-lpae.config b/kernel-armv7hl-lpae.config index 3c19cc226..463c8adc1 100644 --- a/kernel-armv7hl-lpae.config +++ b/kernel-armv7hl-lpae.config @@ -4270,6 +4270,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-armv7hl.config b/kernel-armv7hl.config index 3cfbfa369..a35ac30a2 100644 --- a/kernel-armv7hl.config +++ b/kernel-armv7hl.config @@ -4515,6 +4515,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-i686-PAE.config b/kernel-i686-PAE.config index 14611f85c..079266b71 100644 --- a/kernel-i686-PAE.config +++ b/kernel-i686-PAE.config @@ -4040,6 +4040,7 @@ CONFIG_PPS_CLIENT_PARPORT=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-i686-PAEdebug.config b/kernel-i686-PAEdebug.config index aefe4af97..b722c7149 100644 --- a/kernel-i686-PAEdebug.config +++ b/kernel-i686-PAEdebug.config @@ -4060,6 +4060,7 @@ CONFIG_PPS_CLIENT_PARPORT=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-i686-debug.config b/kernel-i686-debug.config index cd28d050a..cc4812f0f 100644 --- a/kernel-i686-debug.config +++ b/kernel-i686-debug.config @@ -4060,6 +4060,7 @@ CONFIG_PPS_CLIENT_PARPORT=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-i686.config b/kernel-i686.config index 2bbe28fcb..3bbea9727 100644 --- a/kernel-i686.config +++ b/kernel-i686.config @@ -4040,6 +4040,7 @@ CONFIG_PPS_CLIENT_PARPORT=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-ppc64-debug.config b/kernel-ppc64-debug.config index 595308f80..16d9d3167 100644 --- a/kernel-ppc64-debug.config +++ b/kernel-ppc64-debug.config @@ -3873,6 +3873,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-ppc64.config b/kernel-ppc64.config index 480b93fd9..2778b32c9 100644 --- a/kernel-ppc64.config +++ b/kernel-ppc64.config @@ -3851,6 +3851,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config index bd1c62f42..a15f58035 100644 --- a/kernel-ppc64le-debug.config +++ b/kernel-ppc64le-debug.config @@ -3812,6 +3812,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config index eb58c88da..300e0d972 100644 --- a/kernel-ppc64le.config +++ b/kernel-ppc64le.config @@ -3790,6 +3790,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-s390x-debug.config b/kernel-s390x-debug.config index d5bb9c53f..6bdcd77ce 100644 --- a/kernel-s390x-debug.config +++ b/kernel-s390x-debug.config @@ -3704,6 +3704,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_TRACER is not set diff --git a/kernel-s390x.config b/kernel-s390x.config index cac9bab8c..3620509d3 100644 --- a/kernel-s390x.config +++ b/kernel-s390x.config @@ -3682,6 +3682,7 @@ CONFIG_PPS_CLIENT_LDISC=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_TRACER is not set diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config index ed749cb46..3828a6ec5 100644 --- a/kernel-x86_64-debug.config +++ b/kernel-x86_64-debug.config @@ -4101,6 +4101,7 @@ CONFIG_PPS_CLIENT_PARPORT=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel-x86_64.config b/kernel-x86_64.config index 085d88c72..4988c690c 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -4081,6 +4081,7 @@ CONFIG_PPS_CLIENT_PARPORT=m # CONFIG_PPS_DEBUG is not set CONFIG_PPS=m CONFIG_PPTP=m +# CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y diff --git a/kernel.spec b/kernel.spec index e0bf60a42..a2994a2eb 100644 --- a/kernel.spec +++ b/kernel.spec @@ -42,7 +42,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 1 +%global baserelease 2 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %global rcrev 0 # The git snapshot level -%define gitrev 6 +%define gitrev 7 # Set rpm version accordingly %define rpmversion 4.%{upstream_sublevel}.0 %endif @@ -638,6 +638,9 @@ Patch627: rpi-graphics-fix.patch # 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 + # END OF PATCH DEFINITIONS %endif @@ -2187,6 +2190,12 @@ fi # # %changelog +* Thu Nov 23 2017 Laura Abbott - 4.15.0-0.rc0.git7.2 +- Fix for TTM regression (rhbz 1516584) + +* Tue Nov 21 2017 Laura Abbott - 4.15.0-0.rc0.git7.1 +- Linux v4.14-12995-g0c86a6bd85ff + * Mon Nov 20 2017 Laura Abbott - 4.15.0-0.rc0.git6.1 - Linux v4.14-12891-gc8a0739b185d diff --git a/sources b/sources index 3a3d21c76..fa6046fcd 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (linux-4.14.tar.xz) = 77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8 SHA512 (perf-man-4.14.tar.gz) = 76a9d8adc284cdffd4b3fbb060e7f9a14109267707ce1d03f4c3239cd70d8d164f697da3a0f90a363fbcac42a61d3c378afbcc2a86f112c501b9cb5ce74ef9f8 -SHA512 (patch-4.14-git6.xz) = d2d6bd157ea097c35964ea71a871797d12cbfedfdc30be58b0bd064c857b5799a9dcfa02435b839246140855368cc8d049303b9225d999e31eaa9f8698924969 +SHA512 (patch-4.14-git7.xz) = 69050e1688dfc7727f668c82e24e63c1afcbb9f30c1cb66f64411953efe0bf5508979174a1251d12fc8412cc2fc279d37fe27845fd3c24a4ebc39292ad805cd0