aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-15mmc: tmio: remove outdated members from host structWolfram Sang1-4/+0
The wrappers are gone for two years now but they have still pointers reserved in the tmio_mmc_host struct. Remove them. Reported-by: Yoshihiro Shimoda <[email protected]> Fixes: f22084b662e5 ("mmc: tmio: remove superfluous callback wrappers") Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-03-15mmc: mtk-sd: Silence delay phase calculation debug logAlexandre Bailon1-2/+2
The driver prints the following log everytime data is written to RPMB: mtk-msdc 11230000.mmc: phase: [map:ffffffff] [maxlen:32] [final:10] dev_info is used to print that log but it seems that log is only useful for debbuging. Use dev_dbg instead of dev_info. Signed-off-by: Alexandre Bailon <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-03-15mmc: davinci_mmc: Handle error for clk_enableJiasheng Jiang1-1/+5
As the potential failure of the clk_enable(), it should be better to check it and return error if fails. Fixes: bbce5802afc5 ("davinci: mmc: updates to suspend/resume implementation") Signed-off-by: Jiasheng Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-03-15mmc: sdhci-pci-gli: Add runtime PM for GL9763EBen Chuang1-0/+47
Add runtime PM for GL9763E and disable PLL in runtime suspend. So power gated of upstream port can be enabled. GL9763E has an auxiliary power so it keep states in runtime suspend. In runtime resume, PLL is enabled and waits for it to stabilize. Signed-off-by: Ben Chuang <[email protected]> Tested-by: Kevin Chang <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-03-15mmc: core: Drop HS400 caps unless 8-bit bus is supported tooUlf Hansson2-7/+11
When mmc_select_hs400es() tries to switch to the HS400 ES mode, it may bail out early if the host doesn't support an 8-bit buswidth, as it's required for the HS400 mode. To improve the situation, let's instead drop the HS400 bits from the capability field if the 8-bit bus isn't supported. In this way, we allow the mmc initialization to continue by trying a lower speed mode. Signed-off-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-03-15mmc: host: Return an error when ->enable_sdio_irq() ops is missingUlf Hansson1-2/+13
Even if the current WARN() notifies the user that something is severely wrong, we can still end up in a PANIC() when trying to invoke the missing ->enable_sdio_irq() ops. Therefore, let's also return an error code and prevent the host from being added. While at it, move the code into a separate function to prepare for subsequent changes and for further host caps validations. Signed-off-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-03-15mmc: core: Improve fallback to speed modes if eMMC HS200 failsUlf Hansson1-3/+13
In the error path of mmc_select_hs200() we are trying our best to restore the card/host into a valid state. This makes sense, especially if we encounter a simple switch error (-EBADMSG). However, rather than then continue with using the legacy speed mode, let's try the other better speed modes first. Additionally, let's update the card->mmc_avail_type to avoid us from trying a broken HS200 mode again. In an Amlogic S905W based TV box where the switch to HS200 mode fails for the eMMC, this allows us to use the eMMC in DDR mode in favor of the legacy mode, which greatly improves the performance. Suggested-by: Heiner Kallweit <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Tested-by: Heiner Kallweit <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-03-11dt-bindings: mmc: sunxi: add Allwinner F1c100s compatibleJesse Taube1-0/+3
The Allwinner F1C100 series contains two MMC controller blocks. From comparing the data sheets, they seem to be compatible with the one used in the Allwinner A20: the register layout is the same, and they use the same separate sample and output clocks design. The only difference is the missing reset line in the A20 version, but both the binding and the Linux driver make this optional, so it's still a fit. Add the new SoC specific name and require it to be paired with the A20 fallback name, as this is all the driver needs to care about. Signed-off-by: Jesse Taube <[email protected]> Signed-off-by: Andre Przywara <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-03-07mmc: dw-mmc-rockchip: Fix handling invalid clock ratesPeter Geis1-4/+23
The Rockchip rk356x ciu clock cannot be set as low as the dw-mmc hardware supports. This leads to a situation during card initialization where the clock is set lower than the clock driver can support. The dw-mmc-rockchip driver spews errors when this happens. For normal operation this only happens a few times during boot, but when cd-broken is enabled (in cases such as the SoQuartz module) this fires multiple times each poll cycle. Fix this by testing the lowest possible frequency that the clock driver can support which is within the mmc specification. Divide that rate by the internal divider and set f_min to this. Signed-off-by: Peter Geis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-03-07mmc: dw_mmc: Support setting f_min from host driversPeter Geis2-1/+8
Host drivers may not be able to support frequencies as low as dw-mmc supports. Unfortunately f_min isn't available when the drv_data->init function is called, as the mmc_host struct hasn't been set up yet. Support the host drivers saving the requested minimum frequency, so we can later set f_min when it is available. Signed-off-by: Peter Geis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-03-07mmc: host: Drop commas after SoC match table sentinelsGeert Uytterhoeven2-6/+6
It does not make sense to have a comma after a sentinel, as any new elements must be added before the sentinel. Add comments to clarify the purpose of the empty elements. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/9050fa278eaaa9e6ec719a3b158a2fad285560d0.1646311673.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson <[email protected]>
2022-03-07Merge branch 'fixes' into nextUlf Hansson5-8/+14
2022-03-07mmc: core: Restore (almost) the busy polling for MMC_SEND_OP_CONDUlf Hansson5-8/+14
Commit 76bfc7ccc2fa ("mmc: core: adjust polling interval for CMD1"), significantly decreased the polling period from ~10-12ms into just a couple of us. The purpose was to decrease the total time spent in the busy polling loop, but unfortunate it has lead to problems, that causes eMMC cards to never gets out busy and thus fails to be initialized. To fix the problem, but also to try to keep some of the new improved behaviour, let's start by using a polling period of 1-2ms, which then increases for each loop, according to common polling loop in __mmc_poll_for_busy(). Reported-by: Jean Rene Dawin <[email protected]> Reported-by: H. Nikolaus Schaller <[email protected]> Cc: Huijin Park <[email protected]> Fixes: 76bfc7ccc2fa ("mmc: core: adjust polling interval for CMD1") Signed-off-by: Ulf Hansson <[email protected]> Tested-by: Jean Rene Dawin <[email protected]> Tested-by: H. Nikolaus Schaller <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-03-02mmc: rtsx: add 74 Clocks in power on flowRicky WU1-10/+19
SD spec definition: "Host provides at least 74 Clocks before issuing first command" After 1ms for the voltage stable then start issuing the Clock signals if POWER STATE is MMC_POWER_OFF to MMC_POWER_UP to issue Clock signal to card MMC_POWER_UP to MMC_POWER_ON to stop issuing signal to card Signed-off-by: Ricky Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-03-01dt-bindings: mmc: renesas,sdhi: Document RZ/V2L SoCLad Prabhakar1-1/+4
Document RZ/V2L SDHI bindings. RZ/V2L SDHI is almost identical to one found on the R-Car Gen3. No driver changes are required as generic compatible string "renesas,rcar-gen3-sdhi" will be used as a fallback. Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Biju Das <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28Merge branch 'fixes' into nextUlf Hansson1-7/+8
2022-02-28mmc: sh_mmcif: Simplify division/shift logicGeert Uytterhoeven1-4/+3
"a / (1 << b)" == "a >> b". No change in generated code. Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/68d689c39c769d298b53ee8cb9de0e594a2999b2.1645460780.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sdhci_am654: Add Support for TI's AM62 SoCAswath Govindraju1-0/+4
Add support for the controller present on the AM62x SoC. There are instances: sdhci0: 8bit bus width, max 200 MBps sdhci1: 4bit bus width, max 100 MBps sdhci2: 4bit bus width, max 100 MBps The PHY used for 8 bit instance is same as the PHY for the 4 bit instance. Therefore, introduce a new bus width independent compatible for AM62 SoC that uses the driver data required for 4 bit instance. Signed-off-by: Aswath Govindraju <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: meson: Fix usage of meson_mmc_post_req()Rong Chen1-7/+8
Currently meson_mmc_post_req() is called in meson_mmc_request() right after meson_mmc_start_cmd(). This could lead to DMA unmapping before the request is actually finished. To fix, don't call meson_mmc_post_req() until meson_mmc_request_done(). Signed-off-by: Rong Chen <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Fixes: 79ed05e329c3 ("mmc: meson-gx: add support for descriptor chain mode") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28dt-bindings: mmc: imx-esdhc: Add imx93 compatible stringPeng Fan1-0/+1
Add i.MX93 compatible string, it uses two compatible strings. Signed-off-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28dt-bindings: mmc: sdhci-am654: Add compatible string for AM62 SoCAswath Govindraju1-0/+1
Add compatible string for AM62 SoC in device tree binding of AM654 SDHCI module as the same IP is used. Signed-off-by: Aswath Govindraju <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sdhci_am654: Fix the driver data of AM64 SoCAswath Govindraju1-22/+2
The MMCSD IPs used in AM64 are the same as the ones used in J721E. Therefore, fix this by using the driver data from J721E for AM64 too, for both 8 and 4 bit instances. Fixes: 754b7f2f7d2a ("mmc: sdhci_am654: Add Support for TI's AM64 SoC") Signed-off-by: Aswath Govindraju <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: core: use sysfs_emit() instead of sprintf()Sergey Shtylyov6-31/+34
sprintf() (still used in the MMC core for the sysfs output) is vulnerable to the buffer overflow. Use the new-fangled sysfs_emit() instead. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sunxi-mmc: Add D1 MMC variantSamuel Holland1-0/+9
D1's MMC controllers are unique in that they have the DMA address shift (like A100) with a 13-bit descriptor size field (like sun4i). Add the compatible and parameters for this new variant. Signed-off-by: Samuel Holland <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28dt-bindings: mmc: sunxi: Add D1 MMC and eMMC compatiblesSamuel Holland1-0/+4
D1 contains variants of the usual sunxi MMC controller. The eMMC controller has the same parameters as the A100 eMMC controller. The other controllers have a DMA address shift like on A100, but they have a smaller 13-bit size field, making them a new incompatible variant. Signed-off-by: Samuel Holland <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: dw_mmc: Use device_property_string_array_count()Andy Shevchenko1-2/+1
Use device_property_string_array_count() to get number of strings in a string array property. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: davinci: Use of_device_get_match_data() helperBean Huo1-4/+2
Only the device data is needed, not the entire struct of_device_id. Use of_device_get_match_data() instead of of_match_device(). Signed-off-by: Bean Huo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sdhci-of-at91: Use of_device_get_match_data() helperBean Huo1-4/+2
Only the device data is needed, not the entire struct of_device_id. Use of_device_get_match_data() instead of open coding of_match_device(). Signed-off-by: Bean Huo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sdhci-tegra: Use of_device_get_match_data() helperBean Huo1-4/+2
Only the device data is needed,not the whole struct of_device_id. Use of_device_get_match_data() instead of open coding of of_match_device(). Signed-off-by: Bean Huo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: wmt-sdmmc: Use of_device_get_match_data() helperBean Huo1-5/+2
Only the device data is needed, not the whole struct of_device_id. Use of_device_get_match_data() instead of open coding of of_match_device(). Signed-off-by: Bean Huo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28dt-bindings: mmc: Add compatible for Mediatek MT8186Allen-KH Cheng1-0/+3
This commit adds dt-binding documentation of mmc for Mediatek MT8186 SoC Platform. Signed-off-by: Allen-KH Cheng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sdhci-pci-gli: Add a switch to enable/disable SSC for GL9750 and GL9755Ben Chuang1-12/+54
Add a vendor-specific bit at the bit26 of GL9750's register 878h and GL9755's register 78h to decide whether to disable SSC function. If this bit is set, the SSC function will be disabled. Signed-off-by: Ben Chuang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sdhci-pci-gli: Enable SSC at 50MHz and 100MHz for GL9750 and GL9755Ben Chuang1-0/+36
Enable SSC function at 50MHz and 100MHz for GL9750 and GL9755. Signed-off-by: Ben Chuang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sdhci-pci-gli: Reduce the SSC value at 205MHz for GL9750 and GL9755Ben Chuang1-2/+2
The SSC value is 0xFFE7 at 205MHz and may be saturated. Reduce the SSC value to 0x5A1D at 205MHz to reduce this situation for GL9750 and GL9755. Signed-off-by: Ben Chuang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: Add driver for LiteX's LiteSDCard interfaceGabriel Somlo3-0/+675
LiteX (https://github.com/enjoy-digital/litex) is a SoC framework that targets FPGAs. LiteSDCard is a small footprint, configurable SDCard core commonly used in LiteX designs. The driver was first written in May 2020 and has been maintained cooperatively by the LiteX community. Thanks to all contributors! Co-developed-by: Kamil Rakoczy <[email protected]> Signed-off-by: Kamil Rakoczy <[email protected]> Co-developed-by: Maciej Dudek <[email protected]> Signed-off-by: Maciej Dudek <[email protected]> Co-developed-by: Paul Mackerras <[email protected]> Signed-off-by: Paul Mackerras <[email protected]> Signed-off-by: Gabriel Somlo <[email protected]> Reviewed-by: Joel Stanley <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28dt-bindings: mmc: Add bindings for LiteSDCardGabriel Somlo1-0/+78
LiteSDCard is a small footprint, configurable SDCard core for FPGA based SoCs. Signed-off-by: Gabriel Somlo <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Joel Stanley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28MAINTAINERS: co-maintain LiteX platformGabriel Somlo1-2/+7
Add the litex_mmc (LiteSDCard) and LiteETH drivers to the list of files maintained under LiteX. Add Gabriel Somlo and Joel Stanley as maintainers; Joel authored the LiteETH driver, and Gabriel is currently curating the LiteX out-of-tree device drivers as they are tested and prepared for upstream submission, having also co-authored a number of them. Signed-off-by: Gabriel Somlo <[email protected]> Acked-by: Joel Stanley <[email protected]> Acked-by: Mateusz Holenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: sdhci-tegra: Enable wake on SD card eventAniruddha Rao1-1/+8
Enable GPIO wake source on SD card detect line. Physical card insertion/removal event should wake the system from suspend. Signed-off-by: Aniruddha Rao <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28dt-bindings: mmc: sdhci-msm: Add msm8953 compatibleLuca Weiss1-0/+1
Add msm8953 SoC specific compatible strings for qcom-sdhci controller. Signed-off-by: Luca Weiss <[email protected]> Acked-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-28mmc: dw_mmc: Fix potential null pointer riskWen Zhiwei1-1/+1
we previously assumed 'host->slot' could be null, null pointer judgment should be added Signed-off-by: Wen Zhiwei <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
2022-02-27Linux 5.17-rc6Linus Torvalds1-1/+1
2022-02-27Merge tag 'irq-urgent-2022-02-27' of ↵Linus Torvalds1-7/+7
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A single fix for a regression caused by the recent PCI/MSI rework which resulted in a recursive locking problem in the VMD driver. The cure is to cache the relevant information upfront instead of retrieving it at runtime" * tag 'irq-urgent-2022-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: PCI: vmd: Prevent recursive locking on interrupt allocation
2022-02-27Merge tag 'dma-mapping-5.17-1' of git://git.infradead.org/users/hch/dma-mappingLinus Torvalds3-1/+18
Pull dma-mapping fix from Christoph Hellwig: - fix a swiotlb info leak (Halil Pasic) * tag 'dma-mapping-5.17-1' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: fix info leak with DMA_FROM_DEVICE
2022-02-27Merge tag 'pinctrl-v5-17-3' of ↵Linus Torvalds4-8/+13
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Fix some drive strength and pull-up code in the K210 driver. - Add the Alder Lake-M ACPI ID so it starts to work properly. - Use a static name for the StarFive GPIO irq_chip, forestalling an upcoming fixes series from Marc Zyngier. - Fix an ages old bug in the Tegra 186 driver where we were indexing at random into struct and being lucky getting the right member. * tag 'pinctrl-v5-17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: gpio: tegra186: Fix chip_data type confusion pinctrl: starfive: Use a static name for the GPIO irq_chip pinctrl: tigerlake: Revert "Add Alder Lake-M ACPI ID" pinctrl: k210: Fix bias-pull-up pinctrl: fix loop in k210_pinconf_get_drive()
2022-02-26Merge tag 'trace-v5.17-rc4' of ↵Linus Torvalds18-79/+148
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - rtla (Real-Time Linux Analysis tool): - fix typo in man page - Update API -e to -E before it is released - Error message fix and memory leak fix - Partially uninline trace event soft disable to shrink text - Fix function graph start up test - Have triggers affect the trace instance they are in and not top level - Have osnoise sleep in the units it says it uses - Remove unused ftrace stub function - Remove event probe redundant info from event in the buffer - Fix group ownership setting in tracefs - Ensure trace buffer is minimum size to prevent crashes * tag 'trace-v5.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: rtla/osnoise: Fix error message when failing to enable trace instance rtla/osnoise: Free params at the exit rtla/hist: Make -E the short version of --entries tracing: Fix selftest config check for function graph start up test tracefs: Set the group ownership in apply_options() not parse_options() tracing/osnoise: Make osnoise_main to sleep for microseconds ftrace: Remove unused ftrace_startup_enable() stub tracing: Ensure trace buffer is at least 4096 bytes large tracing: Uninline trace_trigger_soft_disabled() partly eprobes: Remove redundant event type information tracing: Have traceon and traceoff trigger honor the instance tracing: Dump stacktrace trigger to the corresponding instance rtla: Fix systme -> system typo on man page
2022-02-26Merge tag 'fixes-2022-02-26' of ↵Linus Torvalds1-2/+8
git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock fix from Mike Rapoport: "Use kfree() to release kmalloced memblock regions memblock.{reserved,memory}.regions may be allocated using kmalloc() in memblock_double_array(). Use kfree() to release these kmalloced regions" * tag 'fixes-2022-02-26' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock: use kfree() to release kmalloced memblock regions
2022-02-26Merge branch 'akpm' (patches from Andrew)Linus Torvalds7-20/+56
Merge misc fixes from Andrew Morton: "12 patches. Subsystems affected by this patch series: MAINTAINERS, mailmap, memfd, and mm (hugetlb, kasan, hugetlbfs, pagemap, selftests, memcg, and slab)" * emailed patches from Andrew Morton <[email protected]>: selftests/memfd: clean up mapping in mfd_fail_write mailmap: update Roman Gushchin's email MAINTAINERS, SLAB: add Roman as reviewer, git tree MAINTAINERS: add Shakeel as a memcg co-maintainer MAINTAINERS: remove Vladimir from memcg maintainers MAINTAINERS: add Roman as a memcg co-maintainer selftest/vm: fix map_fixed_noreplace test failure mm: fix use-after-free bug when mm->mmap is reused after being freed hugetlbfs: fix a truncation issue in hugepages parameter kasan: test: prevent cache merging in kmem_cache_double_destroy mm/hugetlb: fix kernel crash with hugetlb mremap MAINTAINERS: add sysctl-next git tree
2022-02-26Merge tag 'riscv-for-linus-5.17-rc6' of ↵Linus Torvalds5-6/+46
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix for the K210 sdcard defconfig, to avoid using a fixed delay for the root FS - A fix to make sure there's a proper call frame for trace_hardirqs_{on,off}(). * tag 'riscv-for-linus-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: fix oops caused by irqsoff latency tracer riscv: fix nommu_k210_sdcard_defconfig
2022-02-26Merge tag 'xfs-5.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linuxLinus Torvalds1-2/+5
Pull xfs fixes from Darrick Wong: "Nothing exciting, just more fixes for not returning sync_filesystem error values (and eliding it when it's not necessary). Summary: - Only call sync_filesystem when we're remounting the filesystem readonly readonly, and actually check its return value" * tag 'xfs-5.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: only bother with sync_filesystem during readonly remount
2022-02-26selftests/memfd: clean up mapping in mfd_fail_writeMike Kravetz1-0/+1
Running the memfd script ./run_hugetlbfs_test.sh will often end in error as follows: memfd-hugetlb: CREATE memfd-hugetlb: BASIC memfd-hugetlb: SEAL-WRITE memfd-hugetlb: SEAL-FUTURE-WRITE memfd-hugetlb: SEAL-SHRINK fallocate(ALLOC) failed: No space left on device ./run_hugetlbfs_test.sh: line 60: 166855 Aborted (core dumped) ./memfd_test hugetlbfs opening: ./mnt/memfd fuse: DONE If no hugetlb pages have been preallocated, run_hugetlbfs_test.sh will allocate 'just enough' pages to run the test. In the SEAL-FUTURE-WRITE test the mfd_fail_write routine maps the file, but does not unmap. As a result, two hugetlb pages remain reserved for the mapping. When the fallocate call in the SEAL-SHRINK test attempts allocate all hugetlb pages, it is short by the two reserved pages. Fix by making sure to unmap in mfd_fail_write. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Mike Kravetz <[email protected]> Cc: Joel Fernandes <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>