diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2016-02-27 10:04:51 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2016-02-27 10:04:51 +0100 |
commit | 516adb39976c5963ff356ffa8b9ebae920304196 (patch) | |
tree | 6948187b9b27aa9d9672d32c7661c3f541d2c89b | |
parent | f20fdcee15dae240bd864548ace02133866e7657 (diff) | |
parent | b71532b6ec221fa83ebe66614859e4e8028562d7 (diff) | |
download | kernel-4.5.0-0.rc5.git0.2.vanilla.knurd.1.fc22.tar.gz kernel-4.5.0-0.rc5.git0.2.vanilla.knurd.1.fc22.tar.xz kernel-4.5.0-0.rc5.git0.2.vanilla.knurd.1.fc22.zip |
Merge remote-tracking branch 'origin/master' into f22-user-thl-vanilla-rawhidekernel-4.5.0-0.rc5.git0.2.vanilla.knurd.1.fc22
-rw-r--r-- | 0001-Revert-powerpc-Simplify-module-TOC-handling.patch | 103 | ||||
-rw-r--r-- | 0001-mm-CONFIG_NR_ZONES_EXTENDED.patch | 173 | ||||
-rw-r--r-- | config-x86_64-generic | 3 | ||||
-rw-r--r-- | drm-nouveau-platform-Fix-deferred-probe.patch | 116 | ||||
-rw-r--r-- | kernel.spec | 17 |
5 files changed, 305 insertions, 107 deletions
diff --git a/0001-Revert-powerpc-Simplify-module-TOC-handling.patch b/0001-Revert-powerpc-Simplify-module-TOC-handling.patch deleted file mode 100644 index 85438ee80..000000000 --- a/0001-Revert-powerpc-Simplify-module-TOC-handling.patch +++ /dev/null @@ -1,103 +0,0 @@ -From b66e7caab9e6634dadce2aced6e174c095e1ca0e Mon Sep 17 00:00:00 2001 -From: Peter Robinson <pbrobinson@gmail.com> -Date: Tue, 9 Feb 2016 15:00:02 +0000 -Subject: [PATCH] Revert "powerpc: Simplify module TOC handling" - -This reverts commit c153693d7eb9eeb28478aa2deaaf0b4e7b5ff5e9. ---- - arch/powerpc/kernel/misc_64.S | 28 ++++++++++++++++++++++++++++ - arch/powerpc/kernel/module_64.c | 12 +++--------- - scripts/mod/modpost.c | 3 +-- - 3 files changed, 32 insertions(+), 11 deletions(-) - -diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S -index f28754c..db475d4 100644 ---- a/arch/powerpc/kernel/misc_64.S -+++ b/arch/powerpc/kernel/misc_64.S -@@ -701,3 +701,31 @@ _GLOBAL(kexec_sequence) - li r5,0 - blr /* image->start(physid, image->start, 0); */ - #endif /* CONFIG_KEXEC */ -+ -+#ifdef CONFIG_MODULES -+#if defined(_CALL_ELF) && _CALL_ELF == 2 -+ -+#ifdef CONFIG_MODVERSIONS -+.weak __crc_TOC. -+.section "___kcrctab+TOC.","a" -+.globl __kcrctab_TOC. -+__kcrctab_TOC.: -+ .llong __crc_TOC. -+#endif -+ -+/* -+ * Export a fake .TOC. since both modpost and depmod will complain otherwise. -+ * Both modpost and depmod strip the leading . so we do the same here. -+ */ -+.section "__ksymtab_strings","a" -+__kstrtab_TOC.: -+ .asciz "TOC." -+ -+.section "___ksymtab+TOC.","a" -+/* This symbol name is important: it's used by modpost to find exported syms */ -+.globl __ksymtab_TOC. -+__ksymtab_TOC.: -+ .llong 0 /* .value */ -+ .llong __kstrtab_TOC. -+#endif /* ELFv2 */ -+#endif /* MODULES */ -diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c -index ac64ffd..59663af 100644 ---- a/arch/powerpc/kernel/module_64.c -+++ b/arch/powerpc/kernel/module_64.c -@@ -326,10 +326,7 @@ static void dedotify_versions(struct modversion_info *vers, - } - } - --/* -- * Undefined symbols which refer to .funcname, hack to funcname. Make .TOC. -- * seem to be defined (value set later). -- */ -+/* Undefined symbols which refer to .funcname, hack to funcname (or .TOC.) */ - static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab) - { - unsigned int i; -@@ -337,11 +334,8 @@ static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab) - for (i = 1; i < numsyms; i++) { - if (syms[i].st_shndx == SHN_UNDEF) { - char *name = strtab + syms[i].st_name; -- if (name[0] == '.') { -- if (strcmp(name+1, "TOC.") == 0) -- syms[i].st_shndx = SHN_ABS; -+ if (name[0] == '.') - memmove(name, name+1, strlen(name)); -- } - } - } - } -@@ -357,7 +351,7 @@ static Elf64_Sym *find_dot_toc(Elf64_Shdr *sechdrs, - numsyms = sechdrs[symindex].sh_size / sizeof(Elf64_Sym); - - for (i = 1; i < numsyms; i++) { -- if (syms[i].st_shndx == SHN_ABS -+ if (syms[i].st_shndx == SHN_UNDEF - && strcmp(strtab + syms[i].st_name, "TOC.") == 0) - return &syms[i]; - } -diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c -index 48958d3..e080746 100644 ---- a/scripts/mod/modpost.c -+++ b/scripts/mod/modpost.c -@@ -594,8 +594,7 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname) - if (strncmp(symname, "_restgpr0_", sizeof("_restgpr0_") - 1) == 0 || - strncmp(symname, "_savegpr0_", sizeof("_savegpr0_") - 1) == 0 || - strncmp(symname, "_restvr_", sizeof("_restvr_") - 1) == 0 || -- strncmp(symname, "_savevr_", sizeof("_savevr_") - 1) == 0 || -- strcmp(symname, ".TOC.") == 0) -+ strncmp(symname, "_savevr_", sizeof("_savevr_") - 1) == 0) - return 1; - /* Do not ignore this symbol */ - return 0; --- -2.5.0 - diff --git a/0001-mm-CONFIG_NR_ZONES_EXTENDED.patch b/0001-mm-CONFIG_NR_ZONES_EXTENDED.patch new file mode 100644 index 000000000..44ef3662b --- /dev/null +++ b/0001-mm-CONFIG_NR_ZONES_EXTENDED.patch @@ -0,0 +1,173 @@ +From 8b368e8e961944105945fbe36f3f264252bfd19a Mon Sep 17 00:00:00 2001 +From: Dan Williams <dan.j.williams@intel.com> +Date: Thu, 25 Feb 2016 01:02:30 +0000 +Subject: [PATCH] mm: CONFIG_NR_ZONES_EXTENDED + +ZONE_DEVICE (merged in 4.3) and ZONE_CMA (proposed) are examples of new mm +zones that are bumping up against the current maximum limit of 4 zones, +i.e. 2 bits in page->flags. When adding a zone this equation still needs +to be satisified: + + SECTIONS_WIDTH + ZONES_WIDTH + NODES_SHIFT + LAST_CPUPID_SHIFT + <= BITS_PER_LONG - NR_PAGEFLAGS + +ZONE_DEVICE currently tries to satisfy this equation by requiring that +ZONE_DMA be disabled, but this is untenable given generic kernels want to +support ZONE_DEVICE and ZONE_DMA simultaneously. ZONE_CMA would like to +increase the amount of memory covered per section, but that limits the +minimum granularity at which consecutive memory ranges can be added via +devm_memremap_pages(). + +The trade-off of what is acceptable to sacrifice depends heavily on the +platform. For example, ZONE_CMA is targeted for 32-bit platforms where +page->flags is constrained, but those platforms likely do not care about +the minimum granularity of memory hotplug. A big iron machine with 1024 +numa nodes can likely sacrifice ZONE_DMA where a general purpose +distribution kernel can not. + +CONFIG_NR_ZONES_EXTENDED is a configuration symbol that gets selected when +the number of configured zones exceeds 4. It documents the configuration +symbols and definitions that get modified when ZONES_WIDTH is greater than +2. + +For now, it steals a bit from NODES_SHIFT. Later on it can be used to +document the definitions that get modified when a 32-bit configuration +wants more zone bits. + +Note that GFP_ZONE_TABLE poses an interesting constraint since +include/linux/gfp.h gets included by the 32-bit portion of a 64-bit build. +We need to be careful to only build the table for zones that have a +corresponding gfp_t flag. GFP_ZONES_SHIFT is introduced for this purpose. +This patch does not attempt to solve the problem of adding a new zone +that also has a corresponding GFP_ flag. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=110931 +Fixes: 033fbae988fc ("mm: ZONE_DEVICE for "device memory"") +Signed-off-by: Dan Williams <dan.j.williams@intel.com> +Reported-by: Mark <markk@clara.co.uk> +Cc: Mel Gorman <mgorman@suse.de> +Cc: Rik van Riel <riel@redhat.com> +Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> +Cc: Dave Hansen <dave.hansen@linux.intel.com> +Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +--- + arch/x86/Kconfig | 6 ++++-- + include/linux/gfp.h | 33 ++++++++++++++++++++------------- + include/linux/page-flags-layout.h | 2 ++ + mm/Kconfig | 7 +++++-- + 4 files changed, 31 insertions(+), 17 deletions(-) + +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig +index 3fef519..b94704a 100644 +--- a/arch/x86/Kconfig ++++ b/arch/x86/Kconfig +@@ -1409,8 +1409,10 @@ config NUMA_EMU + + config NODES_SHIFT + int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP +- range 1 10 +- default "10" if MAXSMP ++ range 1 10 if !NR_ZONES_EXTENDED ++ range 1 9 if NR_ZONES_EXTENDED ++ default "10" if MAXSMP && !NR_ZONES_EXTENDED ++ default "9" if MAXSMP && NR_ZONES_EXTENDED + default "6" if X86_64 + default "3" + depends on NEED_MULTIPLE_NODES +diff --git a/include/linux/gfp.h b/include/linux/gfp.h +index af1f2b2..d201d8a 100644 +--- a/include/linux/gfp.h ++++ b/include/linux/gfp.h +@@ -329,22 +329,29 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) + * 0xe => BAD (MOVABLE+DMA32+HIGHMEM) + * 0xf => BAD (MOVABLE+DMA32+HIGHMEM+DMA) + * +- * ZONES_SHIFT must be <= 2 on 32 bit platforms. ++ * GFP_ZONES_SHIFT must be <= 2 on 32 bit platforms. + */ + +-#if 16 * ZONES_SHIFT > BITS_PER_LONG +-#error ZONES_SHIFT too large to create GFP_ZONE_TABLE integer ++#if defined(CONFIG_ZONE_DEVICE) && (MAX_NR_ZONES-1) <= 4 ++/* ZONE_DEVICE is not a valid GFP zone specifier */ ++#define GFP_ZONES_SHIFT 2 ++#else ++#define GFP_ZONES_SHIFT ZONES_SHIFT ++#endif ++ ++#if 16 * GFP_ZONES_SHIFT > BITS_PER_LONG ++#error GFP_ZONES_SHIFT too large to create GFP_ZONE_TABLE integer + #endif + + #define GFP_ZONE_TABLE ( \ +- (ZONE_NORMAL << 0 * ZONES_SHIFT) \ +- | (OPT_ZONE_DMA << ___GFP_DMA * ZONES_SHIFT) \ +- | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * ZONES_SHIFT) \ +- | (OPT_ZONE_DMA32 << ___GFP_DMA32 * ZONES_SHIFT) \ +- | (ZONE_NORMAL << ___GFP_MOVABLE * ZONES_SHIFT) \ +- | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * ZONES_SHIFT) \ +- | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * ZONES_SHIFT) \ +- | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * ZONES_SHIFT) \ ++ (ZONE_NORMAL << 0 * GFP_ZONES_SHIFT) \ ++ | (OPT_ZONE_DMA << ___GFP_DMA * GFP_ZONES_SHIFT) \ ++ | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * GFP_ZONES_SHIFT) \ ++ | (OPT_ZONE_DMA32 << ___GFP_DMA32 * GFP_ZONES_SHIFT) \ ++ | (ZONE_NORMAL << ___GFP_MOVABLE * GFP_ZONES_SHIFT) \ ++ | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * GFP_ZONES_SHIFT) \ ++ | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * GFP_ZONES_SHIFT) \ ++ | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * GFP_ZONES_SHIFT) \ + ) + + /* +@@ -369,8 +376,8 @@ static inline enum zone_type gfp_zone(gfp_t flags) + enum zone_type z; + int bit = (__force int) (flags & GFP_ZONEMASK); + +- z = (GFP_ZONE_TABLE >> (bit * ZONES_SHIFT)) & +- ((1 << ZONES_SHIFT) - 1); ++ z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) & ++ ((1 << GFP_ZONES_SHIFT) - 1); + VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1); + return z; + } +diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h +index da52366..77b078c 100644 +--- a/include/linux/page-flags-layout.h ++++ b/include/linux/page-flags-layout.h +@@ -17,6 +17,8 @@ + #define ZONES_SHIFT 1 + #elif MAX_NR_ZONES <= 4 + #define ZONES_SHIFT 2 ++#elif MAX_NR_ZONES <= 8 ++#define ZONES_SHIFT 3 + #else + #error ZONES_SHIFT -- too many zones configured adjust calculation + #endif +diff --git a/mm/Kconfig b/mm/Kconfig +index 031a329..7826216 100644 +--- a/mm/Kconfig ++++ b/mm/Kconfig +@@ -652,8 +652,6 @@ config IDLE_PAGE_TRACKING + + config ZONE_DEVICE + bool "Device memory (pmem, etc...) hotplug support" +- default !ZONE_DMA +- depends on !ZONE_DMA + depends on MEMORY_HOTPLUG + depends on MEMORY_HOTREMOVE + depends on X86_64 #arch_add_memory() comprehends device memory +@@ -667,5 +665,10 @@ config ZONE_DEVICE + + If FS_DAX is enabled, then say Y. + ++config NR_ZONES_EXTENDED ++ bool ++ default n if !64BIT ++ default y if ZONE_DEVICE && ZONE_DMA && ZONE_DMA32 ++ + config FRAME_VECTOR + bool +-- +2.5.0 + diff --git a/config-x86_64-generic b/config-x86_64-generic index dd42a8fdd..8d8b27519 100644 --- a/config-x86_64-generic +++ b/config-x86_64-generic @@ -216,7 +216,8 @@ CONFIG_CMA=y CONFIG_CMA_AREAS=7 # Changes for persistent memory devices -# CONFIG_ZONE_DMA is not set +# ZONE_DMA and ZONE_DEVICE can now co-exist +CONFIG_ZONE_DMA=y CONFIG_ZONE_DEVICE=y CONFIG_NVDIMM_PFN=y CONFIG_ND_PFN=m diff --git a/drm-nouveau-platform-Fix-deferred-probe.patch b/drm-nouveau-platform-Fix-deferred-probe.patch new file mode 100644 index 000000000..bae1dae7a --- /dev/null +++ b/drm-nouveau-platform-Fix-deferred-probe.patch @@ -0,0 +1,116 @@ +From patchwork Wed Feb 24 17:34:43 2016 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: drm/nouveau: platform: Fix deferred probe +From: Thierry Reding <thierry.reding@gmail.com> +X-Patchwork-Id: 587554 +Message-Id: <1456335283-22097-1-git-send-email-thierry.reding@gmail.com> +To: Ben Skeggs <bskeggs@redhat.com> +Cc: Alexandre Courbot <gnurou@gmail.com>, Nicolas Chauvet <kwizart@gmail.com>, + dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org +Date: Wed, 24 Feb 2016 18:34:43 +0100 + +From: Thierry Reding <treding@nvidia.com> + +The error cleanup paths aren't quite correct and will crash upon +deferred probe. + +Cc: stable@vger.kernel.org # v4.3+ +Signed-off-by: Thierry Reding <treding@nvidia.com> +Reviewed-by: Ben Skeggs <bskeggs@redhat.com> +Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> +--- + drivers/gpu/drm/nouveau/nouveau_platform.c | 2 +- + drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 40 ++++++++++++++++------ + 2 files changed, 30 insertions(+), 12 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c +index 8a70cec59bcd..2dfe58af12e4 100644 +--- a/drivers/gpu/drm/nouveau/nouveau_platform.c ++++ b/drivers/gpu/drm/nouveau/nouveau_platform.c +@@ -24,7 +24,7 @@ + static int nouveau_platform_probe(struct platform_device *pdev) + { + const struct nvkm_device_tegra_func *func; +- struct nvkm_device *device; ++ struct nvkm_device *device = NULL; + struct drm_device *drm; + int ret; + +diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +index 7f8a42721eb2..e7e581d6a8ff 100644 +--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c ++++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +@@ -252,32 +252,40 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, + + if (!(tdev = kzalloc(sizeof(*tdev), GFP_KERNEL))) + return -ENOMEM; +- *pdevice = &tdev->device; ++ + tdev->func = func; + tdev->pdev = pdev; + tdev->irq = -1; + + tdev->vdd = devm_regulator_get(&pdev->dev, "vdd"); +- if (IS_ERR(tdev->vdd)) +- return PTR_ERR(tdev->vdd); ++ if (IS_ERR(tdev->vdd)) { ++ ret = PTR_ERR(tdev->vdd); ++ goto free; ++ } + + tdev->rst = devm_reset_control_get(&pdev->dev, "gpu"); +- if (IS_ERR(tdev->rst)) +- return PTR_ERR(tdev->rst); ++ if (IS_ERR(tdev->rst)) { ++ ret = PTR_ERR(tdev->rst); ++ goto free; ++ } + + tdev->clk = devm_clk_get(&pdev->dev, "gpu"); +- if (IS_ERR(tdev->clk)) +- return PTR_ERR(tdev->clk); ++ if (IS_ERR(tdev->clk)) { ++ ret = PTR_ERR(tdev->clk); ++ goto free; ++ } + + tdev->clk_pwr = devm_clk_get(&pdev->dev, "pwr"); +- if (IS_ERR(tdev->clk_pwr)) +- return PTR_ERR(tdev->clk_pwr); ++ if (IS_ERR(tdev->clk_pwr)) { ++ ret = PTR_ERR(tdev->clk_pwr); ++ goto free; ++ } + + nvkm_device_tegra_probe_iommu(tdev); + + ret = nvkm_device_tegra_power_up(tdev); + if (ret) +- return ret; ++ goto remove; + + tdev->gpu_speedo = tegra_sku_info.gpu_speedo_value; + ret = nvkm_device_ctor(&nvkm_device_tegra_func, NULL, &pdev->dev, +@@ -285,9 +293,19 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, + cfg, dbg, detect, mmio, subdev_mask, + &tdev->device); + if (ret) +- return ret; ++ goto powerdown; ++ ++ *pdevice = &tdev->device; + + return 0; ++ ++powerdown: ++ nvkm_device_tegra_power_down(tdev); ++remove: ++ nvkm_device_tegra_remove_iommu(tdev); ++free: ++ kfree(tdev); ++ return ret; + } + #else + int diff --git a/kernel.spec b/kernel.spec index 8a40669e7..d5d053458 100644 --- a/kernel.spec +++ b/kernel.spec @@ -44,7 +44,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 @@ -522,8 +522,11 @@ Patch454: arm64-avoid-needing-console-to-enable-serial-console.patch Patch456: arm64-acpi-drop-expert-patch.patch +# http://patchwork.ozlabs.org/patch/587554/ Patch457: ARM-tegra-usb-no-reset.patch +Patch458: drm-nouveau-platform-Fix-deferred-probe.patch + Patch463: arm-i.MX6-Utilite-device-dtb.patch Patch466: input-kill-stupid-messages.patch @@ -602,8 +605,6 @@ Patch502: firmware-Drop-WARN-from-usermodehelper_read_trylock-.patch Patch508: kexec-uefi-copy-secure_boot-flag-in-boot-params.patch -# Patch510: 0001-Revert-powerpc-Simplify-module-TOC-handling.patch - #rhbz 1286293 Patch571: ideapad-laptop-Add-Lenovo-ideapad-Y700-17ISK-to-no_h.patch @@ -623,6 +624,9 @@ Patch646: HID-sony-do-not-bail-out-when-the-sixaxis-refuses-th.patch #rhbz 1288684 Patch647: 0001-vsock-Fix-blocking-ops-call-in-prepare_to_wait.patch +#rhbz 1309658 +Patch648: 0001-mm-CONFIG_NR_ZONES_EXTENDED.patch + # END OF PATCH DEFINITIONS %endif @@ -2145,6 +2149,13 @@ fi # # %changelog +* Thu Feb 25 2016 Laura Abbott <labbott@fedoraproject.org> +- Re-enable ZONE_DMA (rhbz 1309658) + +* Thu Feb 25 2016 Peter Robinson <pbrobinson@fedoraproject.org> 4.5.0-0.rc5.git0.2 +- Fix tegra nouveau module load (thank kwizart for reference) +- PowerPC Little Endian ToC fix + * Sun Feb 21 2016 Justin M. Forbes <jforbes@fedoraproject.org> - 4.5.0-0.rc5.git0.1 - Disable debugging options. - Linux v4.5-rc5 |