From: Sasha Levin Date: Fri, 29 Sep 2023 13:45:23 +0000 (-0400) Subject: Fixes for 4.19 X-Git-Tag: v6.5.6~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efaa69f7e01cc6def80ac5524294c5ee0e6d00fc;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.19 Signed-off-by: Sasha Levin --- diff --git a/queue-4.19/mips-alchemy-only-build-mmc-support-helpers-if-au1xm.patch b/queue-4.19/mips-alchemy-only-build-mmc-support-helpers-if-au1xm.patch new file mode 100644 index 00000000000..dd72a5d4fb2 --- /dev/null +++ b/queue-4.19/mips-alchemy-only-build-mmc-support-helpers-if-au1xm.patch @@ -0,0 +1,135 @@ +From 48d46832975eb2cac92f99fdabe7767ffd2c5399 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 Sep 2023 09:06:56 +0200 +Subject: MIPS: Alchemy: only build mmc support helpers if au1xmmc is enabled + +From: Christoph Hellwig + +[ Upstream commit ef8f8f04a0b25e8f294b24350e8463a8d6a9ba0b ] + +While commit d4a5c59a955b ("mmc: au1xmmc: force non-modular build and +remove symbol_get usage") to be built in, it can still build a kernel +without MMC support and thuse no mmc_detect_change symbol at all. + +Add ifdefs to build the mmc support code in the alchemy arch code +conditional on mmc support. + +Fixes: d4a5c59a955b ("mmc: au1xmmc: force non-modular build and remove symbol_get usage") +Reported-by: kernel test robot +Signed-off-by: Christoph Hellwig +Acked-by: Randy Dunlap +Tested-by: Randy Dunlap # build-tested +Signed-off-by: Thomas Bogendoerfer +Signed-off-by: Sasha Levin +--- + arch/mips/alchemy/devboards/db1000.c | 4 ++++ + arch/mips/alchemy/devboards/db1200.c | 6 ++++++ + arch/mips/alchemy/devboards/db1300.c | 4 ++++ + 3 files changed, 14 insertions(+) + +diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c +index 6fe0f0f95ed7c..548bd4db0f976 100644 +--- a/arch/mips/alchemy/devboards/db1000.c ++++ b/arch/mips/alchemy/devboards/db1000.c +@@ -173,6 +173,7 @@ static struct platform_device db1x00_audio_dev = { + + /******************************************************************************/ + ++#ifdef CONFIG_MMC_AU1X + static irqreturn_t db1100_mmc_cd(int irq, void *ptr) + { + mmc_detect_change(ptr, msecs_to_jiffies(500)); +@@ -380,6 +381,7 @@ static struct platform_device db1100_mmc1_dev = { + .num_resources = ARRAY_SIZE(au1100_mmc1_res), + .resource = au1100_mmc1_res, + }; ++#endif /* CONFIG_MMC_AU1X */ + + /******************************************************************************/ + +@@ -497,9 +499,11 @@ static struct platform_device *db1000_devs[] = { + + static struct platform_device *db1100_devs[] = { + &au1100_lcd_device, ++#ifdef CONFIG_MMC_AU1X + &db1100_mmc0_dev, + &db1100_mmc1_dev, + &db1000_irda_dev, ++#endif + }; + + int __init db1000_dev_setup(void) +diff --git a/arch/mips/alchemy/devboards/db1200.c b/arch/mips/alchemy/devboards/db1200.c +index ae81e05fcb2c9..48840e48e79a0 100644 +--- a/arch/mips/alchemy/devboards/db1200.c ++++ b/arch/mips/alchemy/devboards/db1200.c +@@ -341,6 +341,7 @@ static struct platform_device db1200_ide_dev = { + + /**********************************************************************/ + ++#ifdef CONFIG_MMC_AU1X + /* SD carddetects: they're supposed to be edge-triggered, but ack + * doesn't seem to work (CPLD Rev 2). Instead, the screaming one + * is disabled and its counterpart enabled. The 200ms timeout is +@@ -601,6 +602,7 @@ static struct platform_device pb1200_mmc1_dev = { + .num_resources = ARRAY_SIZE(au1200_mmc1_res), + .resource = au1200_mmc1_res, + }; ++#endif /* CONFIG_MMC_AU1X */ + + /**********************************************************************/ + +@@ -768,7 +770,9 @@ static struct platform_device db1200_audiodma_dev = { + static struct platform_device *db1200_devs[] __initdata = { + NULL, /* PSC0, selected by S6.8 */ + &db1200_ide_dev, ++#ifdef CONFIG_MMC_AU1X + &db1200_mmc0_dev, ++#endif + &au1200_lcd_dev, + &db1200_eth_dev, + &db1200_nand_dev, +@@ -779,7 +783,9 @@ static struct platform_device *db1200_devs[] __initdata = { + }; + + static struct platform_device *pb1200_devs[] __initdata = { ++#ifdef CONFIG_MMC_AU1X + &pb1200_mmc1_dev, ++#endif + }; + + /* Some peripheral base addresses differ on the PB1200 */ +diff --git a/arch/mips/alchemy/devboards/db1300.c b/arch/mips/alchemy/devboards/db1300.c +index 0c12fbc07117a..664a5a783d2c5 100644 +--- a/arch/mips/alchemy/devboards/db1300.c ++++ b/arch/mips/alchemy/devboards/db1300.c +@@ -448,6 +448,7 @@ static struct platform_device db1300_ide_dev = { + + /**********************************************************************/ + ++#ifdef CONFIG_MMC_AU1X + static irqreturn_t db1300_mmc_cd(int irq, void *ptr) + { + disable_irq_nosync(irq); +@@ -626,6 +627,7 @@ static struct platform_device db1300_sd0_dev = { + .resource = au1300_sd0_res, + .num_resources = ARRAY_SIZE(au1300_sd0_res), + }; ++#endif /* CONFIG_MMC_AU1X */ + + /**********************************************************************/ + +@@ -756,8 +758,10 @@ static struct platform_device *db1300_dev[] __initdata = { + &db1300_5waysw_dev, + &db1300_nand_dev, + &db1300_ide_dev, ++#ifdef CONFIG_MMC_AU1X + &db1300_sd0_dev, + &db1300_sd1_dev, ++#endif + &db1300_lcd_dev, + &db1300_ac97_dev, + &db1300_i2s_dev, +-- +2.40.1 + diff --git a/queue-4.19/series b/queue-4.19/series index 3dd27adc8fa..aa610b9dd93 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -29,3 +29,4 @@ ext4-mark-group-as-trimmed-only-if-it-was-fully-scan.patch ext4-replace-the-traditional-ternary-conditional-ope.patch ext4-move-setting-of-trimmed-bit-into-ext4_try_to_tr.patch ext4-do-not-let-fstrim-block-system-suspend.patch +mips-alchemy-only-build-mmc-support-helpers-if-au1xm.patch