From c465de5be7c94eb1a54d8a288e66b2c0dc681d5f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 3 Jul 2024 11:44:38 +0200 Subject: [PATCH] drop some 4.19 patches that were dropped from later releases --- ...ace-dereferences-of-memblock_region..patch | 193 ------------------ ...t-strip-remove-function-when-driver-.patch | 59 ------ ...convert-to-platform-remove-callback-.patch | 67 ------ queue-4.19/series | 4 - ...numa_no_node-when-calling-memblock_s.patch | 58 ------ 5 files changed, 381 deletions(-) delete mode 100644 queue-4.19/mm-memblock-replace-dereferences-of-memblock_region..patch delete mode 100644 queue-4.19/mmc-davinci-don-t-strip-remove-function-when-driver-.patch delete mode 100644 queue-4.19/mmc-davinci_mmc-convert-to-platform-remove-callback-.patch delete mode 100644 queue-4.19/x86-mm-numa-use-numa_no_node-when-calling-memblock_s.patch diff --git a/queue-4.19/mm-memblock-replace-dereferences-of-memblock_region..patch b/queue-4.19/mm-memblock-replace-dereferences-of-memblock_region..patch deleted file mode 100644 index d8d04f22fdd..00000000000 --- a/queue-4.19/mm-memblock-replace-dereferences-of-memblock_region..patch +++ /dev/null @@ -1,193 +0,0 @@ -From d57f56efe757cf1ca1ab585b8542bb9964e46b3d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 3 Jun 2020 15:56:53 -0700 -Subject: mm: memblock: replace dereferences of memblock_region.nid with API - calls - -From: Mike Rapoport - -[ Upstream commit d622abf74f3d81365e41c3bfdbbda50ecd99ba3d ] - -Patch series "mm: rework free_area_init*() funcitons". - -After the discussion [1] about removal of CONFIG_NODES_SPAN_OTHER_NODES -and CONFIG_HAVE_MEMBLOCK_NODE_MAP options, I took it a bit further and -updated the node/zone initialization. - -Since all architectures have memblock, it is possible to use only the -newer version of free_area_init_node() that calculates the zone and node -boundaries based on memblock node mapping and architectural limits on -possible zone PFNs. - -The architectures that still determined zone and hole sizes can be -switched to the generic code and the old code that took those zone and -hole sizes can be simply removed. - -And, since it all started from the removal of -CONFIG_NODES_SPAN_OTHER_NODES, the memmap_init() is now updated to iterate -over memblocks and so it does not need to perform early_pfn_to_nid() query -for every PFN. - -[1] https://lore.kernel.org/lkml/1585420282-25630-1-git-send-email-Hoan@os.amperecomputing.com - -This patch (of 21): - -There are several places in the code that directly dereference -memblock_region.nid despite this field being defined only when -CONFIG_HAVE_MEMBLOCK_NODE_MAP=y. - -Replace these with calls to memblock_get_region_nid() to improve code -robustness and to avoid possible breakage when -CONFIG_HAVE_MEMBLOCK_NODE_MAP will be removed. - -Signed-off-by: Mike Rapoport -Signed-off-by: Andrew Morton -Tested-by: Hoan Tran [arm64] -Reviewed-by: Baoquan He -Cc: Brian Cain -Cc: Catalin Marinas -Cc: "David S. Miller" -Cc: Geert Uytterhoeven -Cc: Greentime Hu -Cc: Greg Ungerer -Cc: Guan Xuetao -Cc: Guo Ren -Cc: Heiko Carstens -Cc: Helge Deller -Cc: "James E.J. Bottomley" -Cc: Jonathan Corbet -Cc: Ley Foon Tan -Cc: Mark Salter -Cc: Matt Turner -Cc: Max Filippov -Cc: Michael Ellerman -Cc: Michal Hocko -Cc: Michal Simek -Cc: Mike Rapoport -Cc: Nick Hu -Cc: Paul Walmsley -Cc: Richard Weinberger -Cc: Rich Felker -Cc: Russell King -Cc: Stafford Horne -Cc: Thomas Bogendoerfer -Cc: Tony Luck -Cc: Vineet Gupta -Cc: Yoshinori Sato -Link: http://lkml.kernel.org/r/20200412194859.12663-1-rppt@kernel.org -Link: http://lkml.kernel.org/r/20200412194859.12663-2-rppt@kernel.org -Signed-off-by: Linus Torvalds -Stable-dep-of: 3ac36aa73073 ("x86/mm/numa: Use NUMA_NO_NODE when calling memblock_set_node()") -Signed-off-by: Sasha Levin ---- - arch/arm64/mm/numa.c | 9 ++++++--- - arch/x86/mm/numa.c | 6 ++++-- - mm/memblock.c | 8 +++++--- - mm/page_alloc.c | 4 ++-- - 4 files changed, 17 insertions(+), 10 deletions(-) - -diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c -index 15eaf1e09d0ca..f2f4c056822a7 100644 ---- a/arch/arm64/mm/numa.c -+++ b/arch/arm64/mm/numa.c -@@ -365,13 +365,16 @@ static int __init numa_register_nodes(void) - struct memblock_region *mblk; - - /* Check that valid nid is set to memblks */ -- for_each_memblock(memory, mblk) -- if (mblk->nid == NUMA_NO_NODE || mblk->nid >= MAX_NUMNODES) { -+ for_each_memblock(memory, mblk) { -+ int mblk_nid = memblock_get_region_node(mblk); -+ -+ if (mblk_nid == NUMA_NO_NODE || mblk_nid >= MAX_NUMNODES) { - pr_warn("Warning: invalid memblk node %d [mem %#010Lx-%#010Lx]\n", -- mblk->nid, mblk->base, -+ mblk_nid, mblk->base, - mblk->base + mblk->size - 1); - return -EINVAL; - } -+ } - - /* Finally register nodes. */ - for_each_node_mask(nid, numa_nodes_parsed) { -diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c -index a830d49341ecc..411ded8664a9e 100644 ---- a/arch/x86/mm/numa.c -+++ b/arch/x86/mm/numa.c -@@ -506,8 +506,10 @@ static void __init numa_clear_kernel_node_hotplug(void) - * reserve specific pages for Sandy Bridge graphics. ] - */ - for_each_memblock(reserved, mb_region) { -- if (mb_region->nid != MAX_NUMNODES) -- node_set(mb_region->nid, reserved_nodemask); -+ int nid = memblock_get_region_node(mb_region); -+ -+ if (nid != MAX_NUMNODES) -+ node_set(nid, reserved_nodemask); - } - - /* -diff --git a/mm/memblock.c b/mm/memblock.c -index 4d471da3cc479..0510d6c7ad14c 100644 ---- a/mm/memblock.c -+++ b/mm/memblock.c -@@ -1147,13 +1147,15 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, - { - struct memblock_type *type = &memblock.memory; - struct memblock_region *r; -+ int r_nid; - - while (++*idx < type->cnt) { - r = &type->regions[*idx]; -+ r_nid = memblock_get_region_node(r); - - if (PFN_UP(r->base) >= PFN_DOWN(r->base + r->size)) - continue; -- if (nid == MAX_NUMNODES || nid == r->nid) -+ if (nid == MAX_NUMNODES || nid == r_nid) - break; - } - if (*idx >= type->cnt) { -@@ -1166,7 +1168,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, - if (out_end_pfn) - *out_end_pfn = PFN_DOWN(r->base + r->size); - if (out_nid) -- *out_nid = r->nid; -+ *out_nid = r_nid; - } - - /** -@@ -1714,7 +1716,7 @@ int __init_memblock memblock_search_pfn_nid(unsigned long pfn, - *start_pfn = PFN_DOWN(type->regions[mid].base); - *end_pfn = PFN_DOWN(type->regions[mid].base + type->regions[mid].size); - -- return type->regions[mid].nid; -+ return memblock_get_region_node(&type->regions[mid]); - } - #endif - -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 147b67d31431d..b8cccd1a9965e 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -6743,7 +6743,7 @@ static void __init find_zone_movable_pfns_for_nodes(void) - if (!memblock_is_hotpluggable(r)) - continue; - -- nid = r->nid; -+ nid = memblock_get_region_node(r); - - usable_startpfn = PFN_DOWN(r->base); - zone_movable_pfn[nid] = zone_movable_pfn[nid] ? -@@ -6764,7 +6764,7 @@ static void __init find_zone_movable_pfns_for_nodes(void) - if (memblock_is_mirror(r)) - continue; - -- nid = r->nid; -+ nid = memblock_get_region_node(r); - - usable_startpfn = memblock_region_memory_base_pfn(r); - --- -2.43.0 - diff --git a/queue-4.19/mmc-davinci-don-t-strip-remove-function-when-driver-.patch b/queue-4.19/mmc-davinci-don-t-strip-remove-function-when-driver-.patch deleted file mode 100644 index 14d7ec092ee..00000000000 --- a/queue-4.19/mmc-davinci-don-t-strip-remove-function-when-driver-.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 13eb98409a95b2a6eb1f84bc79c623314d9ab6f3 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sun, 24 Mar 2024 12:40:17 +0100 -Subject: mmc: davinci: Don't strip remove function when driver is builtin -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Uwe Kleine-König - -[ Upstream commit 55c421b364482b61c4c45313a535e61ed5ae4ea3 ] - -Using __exit for the remove function results in the remove callback being -discarded with CONFIG_MMC_DAVINCI=y. When such a device gets unbound (e.g. -using sysfs or hotplug), the driver is just removed without the cleanup -being performed. This results in resource leaks. Fix it by compiling in the -remove callback unconditionally. - -This also fixes a W=1 modpost warning: - -WARNING: modpost: drivers/mmc/host/davinci_mmc: section mismatch in -reference: davinci_mmcsd_driver+0x10 (section: .data) -> -davinci_mmcsd_remove (section: .exit.text) - -Fixes: b4cff4549b7a ("DaVinci: MMC: MMC/SD controller driver for DaVinci family") -Signed-off-by: Uwe Kleine-König -Cc: stable@vger.kernel.org -Link: https://lore.kernel.org/r/20240324114017.231936-2-u.kleine-koenig@pengutronix.de -Signed-off-by: Ulf Hansson -Signed-off-by: Sasha Levin ---- - drivers/mmc/host/davinci_mmc.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c -index 8af5df181d764..65b511f440c82 100644 ---- a/drivers/mmc/host/davinci_mmc.c -+++ b/drivers/mmc/host/davinci_mmc.c -@@ -1361,7 +1361,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) - return ret; - } - --static void __exit davinci_mmcsd_remove(struct platform_device *pdev) -+static void davinci_mmcsd_remove(struct platform_device *pdev) - { - struct mmc_davinci_host *host = platform_get_drvdata(pdev); - -@@ -1415,7 +1415,7 @@ static struct platform_driver davinci_mmcsd_driver = { - .of_match_table = davinci_mmc_dt_ids, - }, - .probe = davinci_mmcsd_probe, -- .remove_new = __exit_p(davinci_mmcsd_remove), -+ .remove_new = davinci_mmcsd_remove, - .id_table = davinci_mmc_devtype, - }; - --- -2.43.0 - diff --git a/queue-4.19/mmc-davinci_mmc-convert-to-platform-remove-callback-.patch b/queue-4.19/mmc-davinci_mmc-convert-to-platform-remove-callback-.patch deleted file mode 100644 index cb26bdf361f..00000000000 --- a/queue-4.19/mmc-davinci_mmc-convert-to-platform-remove-callback-.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 9c9009388174387b31572799b39aff53452809aa Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 27 Jul 2023 14:59:56 +0800 -Subject: mmc: davinci_mmc: Convert to platform remove callback returning void -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Yangtao Li - -[ Upstream commit bc1711e8332da03648d8fe1950189237e66313af ] - -The .remove() callback for a platform driver returns an int which makes -many driver authors wrongly assume it's possible to do error handling by -returning an error code. However the value returned is (mostly) ignored -and this typically results in resource leaks. To improve here there is a -quest to make the remove callback return void. In the first step of this -quest all drivers are converted to .remove_new() which already returns -void. - -Trivially convert this driver from always returning zero in the remove -callback to the void returning variant. - -Cc: Uwe Kleine-König -Signed-off-by: Yangtao Li -Link: https://lore.kernel.org/r/20230727070051.17778-7-frank.li@vivo.com -Signed-off-by: Ulf Hansson -Stable-dep-of: 55c421b36448 ("mmc: davinci: Don't strip remove function when driver is builtin") -Signed-off-by: Sasha Levin ---- - drivers/mmc/host/davinci_mmc.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c -index 70d04962f53ac..8af5df181d764 100644 ---- a/drivers/mmc/host/davinci_mmc.c -+++ b/drivers/mmc/host/davinci_mmc.c -@@ -1361,7 +1361,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) - return ret; - } - --static int __exit davinci_mmcsd_remove(struct platform_device *pdev) -+static void __exit davinci_mmcsd_remove(struct platform_device *pdev) - { - struct mmc_davinci_host *host = platform_get_drvdata(pdev); - -@@ -1370,8 +1370,6 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) - davinci_release_dma_channels(host); - clk_disable_unprepare(host->clk); - mmc_free_host(host->mmc); -- -- return 0; - } - - #ifdef CONFIG_PM -@@ -1417,7 +1415,7 @@ static struct platform_driver davinci_mmcsd_driver = { - .of_match_table = davinci_mmc_dt_ids, - }, - .probe = davinci_mmcsd_probe, -- .remove = __exit_p(davinci_mmcsd_remove), -+ .remove_new = __exit_p(davinci_mmcsd_remove), - .id_table = davinci_mmc_devtype, - }; - --- -2.43.0 - diff --git a/queue-4.19/series b/queue-4.19/series index 7b21dfb6922..a7a416bdf52 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -19,8 +19,6 @@ drm-amd-display-handle-y-carry-over-in-vcp-x.y-calcu.patch serial-sc16is7xx-replace-hardcoded-divisor-value-wit.patch serial-sc16is7xx-fix-bug-in-sc16is7xx_set_baud-when-.patch media-mc-mark-the-media-devnode-as-registered-from-t.patch -mmc-davinci_mmc-convert-to-platform-remove-callback-.patch -mmc-davinci-don-t-strip-remove-function-when-driver-.patch selftests-mm-compaction_test-fix-incorrect-write-of-.patch selftests-mm-conform-test-to-tap-format-output.patch selftests-mm-log-a-consistent-test-name-for-check_co.patch @@ -99,8 +97,6 @@ iio-dac-ad5592r-fix-temperature-channel-scaling-valu.patch scsi-mpt3sas-add-ioc_-level-logging-macros.patch scsi-mpt3sas-gracefully-handle-online-firmware-updat.patch scsi-mpt3sas-avoid-test-set_bit-operating-in-non-all.patch -mm-memblock-replace-dereferences-of-memblock_region..patch -x86-mm-numa-use-numa_no_node-when-calling-memblock_s.patch xhci-use-soft-retry-to-recover-faster-from-transacti.patch xhci-set-correct-transferred-length-for-cancelled-bu.patch pinctrl-fix-deadlock-in-create_pinctrl-when-handling.patch diff --git a/queue-4.19/x86-mm-numa-use-numa_no_node-when-calling-memblock_s.patch b/queue-4.19/x86-mm-numa-use-numa_no_node-when-calling-memblock_s.patch deleted file mode 100644 index e53ad3e0231..00000000000 --- a/queue-4.19/x86-mm-numa-use-numa_no_node-when-calling-memblock_s.patch +++ /dev/null @@ -1,58 +0,0 @@ -From d6322292e8cd794c12927256eb1390d2415370ae Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 29 May 2024 09:42:05 +0200 -Subject: x86/mm/numa: Use NUMA_NO_NODE when calling memblock_set_node() - -From: Jan Beulich - -[ Upstream commit 3ac36aa7307363b7247ccb6f6a804e11496b2b36 ] - -memblock_set_node() warns about using MAX_NUMNODES, see - - e0eec24e2e19 ("memblock: make memblock_set_node() also warn about use of MAX_NUMNODES") - -for details. - -Reported-by: Narasimhan V -Signed-off-by: Jan Beulich -Cc: stable@vger.kernel.org -[bp: commit message] -Signed-off-by: Borislav Petkov (AMD) -Reviewed-by: Mike Rapoport (IBM) -Tested-by: Paul E. McKenney -Link: https://lore.kernel.org/r/20240603141005.23261-1-bp@kernel.org -Link: https://lore.kernel.org/r/abadb736-a239-49e4-ab42-ace7acdd4278@suse.com -Signed-off-by: Mike Rapoport (IBM) -Signed-off-by: Sasha Levin ---- - arch/x86/mm/numa.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c -index 411ded8664a9e..b018eac5e4191 100644 ---- a/arch/x86/mm/numa.c -+++ b/arch/x86/mm/numa.c -@@ -508,7 +508,7 @@ static void __init numa_clear_kernel_node_hotplug(void) - for_each_memblock(reserved, mb_region) { - int nid = memblock_get_region_node(mb_region); - -- if (nid != MAX_NUMNODES) -+ if (nid != NUMA_NO_NODE) - node_set(nid, reserved_nodemask); - } - -@@ -628,9 +628,9 @@ static int __init numa_init(int (*init_func)(void)) - nodes_clear(node_online_map); - memset(&numa_meminfo, 0, sizeof(numa_meminfo)); - WARN_ON(memblock_set_node(0, ULLONG_MAX, &memblock.memory, -- MAX_NUMNODES)); -+ NUMA_NO_NODE)); - WARN_ON(memblock_set_node(0, ULLONG_MAX, &memblock.reserved, -- MAX_NUMNODES)); -+ NUMA_NO_NODE)); - /* In case that parsing SRAT failed. */ - WARN_ON(memblock_clear_hotplug(0, ULLONG_MAX)); - numa_reset_distance(); --- -2.43.0 - -- 2.47.3