misc fixes building sandbox 64-bit allyesconfig
Subsystems (14)
cover misc fixes building sandbox 64-bit allyesconfig
Eventually, I want to run static analysis against the configuration, but this series fixed build warnings/errors just compiling it normally with GCC 13 and clang 14.
The critical parts were factored into their own series, so this can go into next first.
Ahmad Fatoum (19):
clk: always define clk_prepare_enable/disable
clk: define clk_get_parent stub
pci: disable building CONFIG_PCI when CONFIG_COMPILE_TEST
mci: tegra: fix base address constant to be hexadecimal
ata: ide-sff: fix warnings when compiling as 64-bit
video: bochs: remove dependency on PCI header in common part
commands: ubsan: hide pointer provenance used to trigger UB
test: self: printf: silence clang warnings
crypto: caam - fix pointer to u32 casts
crypto: imx-scc: fix u32 to pointer casts
mci: sdhci: dove: fix pointer to u32 casts
lib: make_directory: return -ENOMEM on allocation failure include <linux/idr.h>: handle OOM gracefully inside idr_alloc_one
mci: tegra: use correct types for mmio and DMA address
mtd: spi-nor: cadence: fix types
video: simplefb-fixup: warn on framebuffers >= 4G
watchdog: imx28: use correct constant for computing timeout_max
firmware: mark firmware sections as having non-executable stack
phy: stm32: usb: depend on COMMON_CLK
commands/ubsan.c | 2 ++ drivers/ata/ide-sff.c | 8 ++++---- drivers/crypto/caam/jr.c | 2 +- drivers/crypto/caam/rng_self_test.c | 2 +- drivers/crypto/imx-scc/scc.c | 6 +++--- drivers/mci/dove-sdhci.c | 20 +++++++++++++------- drivers/mci/tegra-sdmmc.c | 11 ++++++----- drivers/mtd/spi-nor/cadence-quadspi.c | 8 +++----- drivers/pci/Kconfig | 2 +- drivers/phy/Kconfig | 1 + drivers/video/bochs/bochs_hw.c | 1 - drivers/video/simplefb-fixup.c | 10 +++++++--- drivers/watchdog/im28wd.c | 2 +- firmware/Makefile | 1 + include/linux/clk.h | 11 +++++++++-- include/linux/idr.h | 2 ++ lib/make_directory.c | 3 +++ test/self/Makefile | 2 +- 18 files changed, 59 insertions(+), 35 deletions(-)
Signature · 1 line
2.39.2
PATCH 1/19 clk: always define clk_prepare_enable/disable
clk_enable/clk_disable have stubs defined for !HAVE_CLK. By moving t clk_prepare_enable/disable definitions, we can reuse them for the prepare helpers as well.
--- include/linux/clk.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/clk.h +3 -2
@@ -72,7 +72,6 @@ struct clk *clk_get(struct device *dev, const char *id);* Returns success (0) or negative errno. */ int clk_enable (struct clk *clk); -#define clk_prepare_enable (clk) clk_enable(clk)/** * clk_disable - inform the system when the clock source is no longer required.
@@ -87,7 +86,6 @@ int clk_enable(struct clk *clk);* disabled. */ void clk_disable (struct clk *clk); -#define clk_disable_unprepare (clk) clk_disable(clk)/** * clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
@@ -206,6 +204,9 @@ static inline int clk_set_rate(struct clk *clk, unsigned long rate) }#endif +#define clk_prepare_enable (clk) clk_enable(clk) +#define clk_disable_unprepare (clk) clk_disable(clk) +static inline void clk_put (struct clk *clk) { }
Signature · 1 line
2.39.2
PATCH 2/19 clk: define clk_get_parent stub
In reply to Ahmad Fatoumclk_get_parent is used in stm32_ltdc driver, which can be compiled on !HAVE_CLK platforms, because it can be selected when COMPILE_TEST=y.
This leads to a build error, because clk_get_parent wasn't defined in that case. Fix this.
--- include/linux/clk.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/linux/clk.h +6 -0
@@ -179,6 +179,11 @@ static inline struct clk *clk_get(struct device *dev, const char *id)return NULL ; } +static inline struct clk *clk_get_parent (struct clk *clk) +{ +return NULL ; +} +static inline int clk_enable (struct clk *clk) {return 0 ;
@@ -744,6 +749,7 @@ static inline unsigned int of_clk_get_parent_count(struct device_node *np) {return 0 ; } +static inline int of_clk_init (void ) {return 0 ;
Signature · 1 line
2.39.2
PATCH 3/19 pci: disable building CONFIG_PCI when CONFIG_COMPILE_TEST
In reply to Ahmad FatoumArchitectures enabling HW_HAS_PCI are expected to also define <asm/pci.h>. Giving HW_HAS_PCI a prompt can thus lead to build errors on architectures that don't really support PCI. Remove the prompt again.
--- drivers/pci/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +1 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only config HW_HAS_PCI - bool "Compile in PCI core" if COMPILE_TEST + bool if HW_HAS_PCI
Signature · 1 line
2.39.2
PATCH 4/19 mci: tegra: fix base address constant to be hexadecimal
In reply to Ahmad FatoumTegra SoCs don't have MMC peripherals at decimal address 78000400 (hexadecimal: 0x4a63110), but they do at 0x78000400. Fix it.
--- drivers/mci/tegra-sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mci/tegra-sdmmc.c +1 -1
@@ -310,7 +310,7 @@ static int tegra_sdmmc_init(struct mci_host *mci, struct device *dev)/* sdmmc1 and sdmmc3 on T30 need a bit of padctrl init */ if (of_device_is_compatible (mci->hw_dev->of_node,"nvidia,tegra30-sdhci" ) && - ((u32 )regs ==0x78000000 || (u32 )regs ==78000400 )) { + ((u32 )regs ==0x78000000 || (u32 )regs ==0x78000400 )) { val =readl (regs +TEGRA_SDMMC_SDMEMCOMPPADCTRL ); val &=0xfffffff0 ; val |=0x7 <<TEGRA_SDMMC_SDMEMCOMPPADCTRL_VREF_SEL_SHIFT ;
Signature · 1 line
2.39.2
PATCH 5/19 ata: ide-sff: fix warnings when compiling as 64-bit
In reply to Ahmad FatoumDriver is applicable to both IDEs with I/O port and MMIO control. This is differentiated by ide->io.mmio. Compiler can't follow that and criticizes casting pointers to 32-bit integers on 64-bit architectures. Adjust the casts to silence this false positive.
--- drivers/ata/ide-sff.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ata/ide-sff.c +4 -4
@@ -26,7 +26,7 @@ static inline uint8_t ata_rd_byte(struct ide_port *ide, void __iomem *addr)if (ide->io.mmio)return readb (addr);else -return (uint8_t )inb ((int ) addr); +return (uint8_t )inb ((ulong )addr); }/**
@@ -42,7 +42,7 @@ static inline void ata_wr_byte(struct ide_port *ide, uint8_t value,if (ide->io.mmio)writeb (value, addr);else -outb (value, (int ) addr); +outb (value, (ulong )addr); }/**
@@ -57,7 +57,7 @@ static inline uint16_t ata_rd_word(struct ide_port *ide,if (ide->io.mmio)return readw (addr);else -return (uint16_t )inw ((int ) addr); +return (uint16_t )inw ((ulong )addr); }/**
@@ -73,7 +73,7 @@ static inline void ata_wr_word(struct ide_port *ide, uint16_t value,if (ide->io.mmio)writew (value, addr);else -outw (value, (int ) addr); +outw (value, (ulong )addr); }/**
Signature · 1 line
2.39.2
PATCH 6/19 video: bochs: remove dependency on PCI header in common part
In reply to Ahmad Fatoumbochs_hw is the common code that's called into from both PCI and ISA Bochs drivers. It has no need to include the PCI header, so drop it.
--- drivers/video/bochs/bochs_hw.c | 1 - 1 file changed, 1 deletion(-)
drivers/video/bochs/bochs_hw.c +0 -1
@@ -8,7 +8,6 @@#include <common.h> #include <driver.h> -#include <linux/pci.h> #include <fb.h> #include "../edid.h" #include "bochs_hw.h"
Signature · 1 line
2.39.2
PATCH 7/19 commands: ubsan: hide pointer provenance used to trigger UB
In reply to Ahmad FatoumThe ubsan command invokes various sort of undefined behavior to verify that the Undefined Behavior Sanitizer works as expected. Compiler warns about some of this, which is not helpful, so work around the warning.
--- commands/ubsan.c | 2 ++ 1 file changed, 2 insertions(+)
commands/ubsan.c +2 -0
@@ -102,6 +102,8 @@ static void test_ubsan_object_size_mismatch(void)volatile long long *ptr, val2; ptr = (long long *)&val; +OPTIMIZER_HIDE_VAR (ptr); + val2 = *ptr; }
Signature · 1 line
2.39.2
PATCH 8/19 test: self: printf: silence clang warnings
In reply to Ahmad FatoumWe added -Wno-format-security a short while back, because we didn't want GCC to warn us about possible format string issues in the self test that's meant to exercise the printf facility. In a similar vein, clang also sees potential problems in the code, so hide it, just for that file, with -Wno-format.
--- test/self/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
test/self/Makefile +1 -1
@@ -3,7 +3,7 @@ obj-$(CONFIG_SELFTEST) += core.o obj-$(CONFIG_SELFTEST_MALLOC) += malloc.o obj-$(CONFIG_SELFTEST_PRINTF) += printf.o -CFLAGS_printf.o += -Wno-format-security +CFLAGS_printf.o += -Wno-format-security -Wno-format obj-$(CONFIG_SELFTEST_PROGRESS_NOTIFIER) += progress-notifier.o obj-$(CONFIG_SELFTEST_OF_MANIPULATION) += of_manipulation.o of_manipulation.dtb.o obj-$(CONFIG_SELFTEST_ENVIRONMENT_VARIABLES) += envvar.o
Signature · 1 line
2.39.2
PATCH 9/19 crypto: caam - fix pointer to u32 casts
In reply to Ahmad FatoumFor 64-bit systems, we only have CAAM initialization support in PBL running as BL2 in EL3, but nothing for barebox proper. Understandably, trying to compile the CAAM code for 64-bit leads to warnings about casts between pointers and smaller integers. A sync with Linux to get 64-bit support is probably in-order for barebox proper CAAM drivers to actually work on i.MX8M, but for now, let's just fix the warnings.
--- drivers/crypto/caam/jr.c | 2 +- drivers/crypto/caam/rng_self_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/caam/jr.c +1 -1
@@ -207,7 +207,7 @@ int caam_jr_enqueue(struct device *dev, u32 *desc, } head_entry = &jrp->entinfo[head]; - head_entry->desc_addr_virt =phys_to_virt ((u32 ) desc); + head_entry->desc_addr_virt = desc; head_entry->desc_size = desc_size; head_entry->callbk = (void *)cbk; head_entry->cbkarg = areq;
drivers/crypto/caam/rng_self_test.c +1 -1
@@ -116,7 +116,7 @@ static void construct_rng_self_test_jobdesc(u32 *desc, const u32 *rng_st_dsc, u8 }/* Replace destination address in the descriptor */ - desc[result_addr_idx] = (u32 )res_addr; + desc[result_addr_idx] =virt_to_phys (res_addr); }/* rng_self_test_done() - callback for caam_jr_enqueue */
Signature · 1 line
2.39.2
PATCH 10/19 crypto: imx-scc: fix u32 to pointer casts
In reply to Ahmad FatoumWe don't deploy the driver to 64-bit systems, but fixing the lone warning we get while build testing is easy enough, so let's do that.
--- drivers/crypto/imx-scc/scc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/imx-scc/scc.c +3 -3
@@ -228,9 +228,9 @@ static int imx_scc_ablkcipher_next(struct imx_scc_ctx *ctx,if (err)return err; -dev_dbg (scc->dev,"Start encryption (0x%p/0x%p)\n" , - (void *)readl (scc->base +SCC_SCM_RED_START ), - (void *)readl (scc->base +SCC_SCM_BLACK_START )); +dev_dbg (scc->dev,"Start encryption (0x%x/0x%x)\n" , +readl (scc->base +SCC_SCM_RED_START ), +readl (scc->base +SCC_SCM_BLACK_START ));/* clear interrupt control registers */ writel(SCC_SCM_INTR_CTRL_CLR_INTR,
Signature · 1 line
2.39.2
PATCH 11/19 mci: sdhci: dove: fix pointer to u32 casts
In reply to Ahmad FatoumThe dove SDHCI driver doesn't fully work on 64-bit, which
is ok as the SoC is ARMv7-only anways. We do want to be able to build test the driver though, so replace straight casts of addr with lower_32_bits(virt_to_phys(addr)), which has the same result, but makes it clear that the upper 32 bit are truncated and silences the compiler warnings.
--- drivers/mci/dove-sdhci.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/mci/dove-sdhci.c +13 -7
@@ -87,9 +87,11 @@ static int dove_sdhci_mci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd,if (data) { num_bytes = data->blocks * data->blocksize;if (data->flags &MMC_DATA_READ ) -sdhci_write32 (&host->sdhci,SDHCI_DMA_ADDRESS , (u32 )data->dest); +sdhci_write32 (&host->sdhci,SDHCI_DMA_ADDRESS , +lower_32_bits (virt_to_phys (data->dest)));else -sdhci_write32 (&host->sdhci,SDHCI_DMA_ADDRESS , (u32 )data->src); +sdhci_write32 (&host->sdhci,SDHCI_DMA_ADDRESS , +lower_32_bits (virt_to_phys (data->src)));sdhci_write16 (&host->sdhci,SDHCI_BLOCK_SIZE ,SDHCI_DMA_BOUNDARY_512K |SDHCI_TRANSFER_BLOCK_SIZE (data->blocksize));sdhci_write16 (&host->sdhci,SDHCI_BLOCK_COUNT , data->blocks);
@@ -97,10 +99,12 @@ static int dove_sdhci_mci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd,if (data->flags &MMC_DATA_WRITE ) -dma_sync_single_for_device (host->mci.hw_dev, (unsigned long )data->src, +dma_sync_single_for_device (host->mci.hw_dev, +lower_32_bits (virt_to_phys (data->src)), num_bytes,DMA_TO_DEVICE );else -dma_sync_single_for_device (host->mci.hw_dev, (unsigned long )data->dest, +dma_sync_single_for_device (host->mci.hw_dev, +lower_32_bits (virt_to_phys (data->dest)), num_bytes,DMA_FROM_DEVICE ); }
@@ -126,11 +130,13 @@ static int dove_sdhci_mci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd,if (data) {if (data->flags &MMC_DATA_WRITE ) -dma_sync_single_for_cpu (host->mci.hw_dev, (unsigned long )data->src, +dma_sync_single_for_cpu (host->mci.hw_dev, +lower_32_bits (virt_to_phys (data->src)), num_bytes,DMA_TO_DEVICE );else -dma_sync_single_for_cpu (host->mci.hw_dev, (unsigned long )data->dest, - num_bytes,DMA_FROM_DEVICE ); +dma_sync_single_for_cpu (host->mci.hw_dev, +lower_32_bits (virt_to_phys (data->dest)), + num_bytes,DMA_FROM_DEVICE ); ret =dove_sdhci_wait_for_done (host,SDHCI_INT_XFER_COMPLETE );if (ret) {
Signature · 1 line
2.39.2
PATCH 12/19 lib: make_directory: return -ENOMEM on allocation failure
In reply to Ahmad Fatoummkdir calls strdup on the dir that's passed in, but doesn't account for allocation failure. Have it return -ENOMEM in that case.
--- lib/make_directory.c | 3 +++ 1 file changed, 3 insertions(+)
lib/make_directory.c +3 -0
@@ -19,6 +19,9 @@ STATIC int make_directory(const char *dir)char c;int ret =0 ; +if (!s) +return -ENOMEM ; + do { c = 0;
Signature · 1 line
2.39.2
PATCH 13/19 include <linux/idr.h>: handle OOM gracefully inside idr_alloc_one
In reply to Ahmad FatoumThe result of allocating a struct idr is dereferenced unconditionally. Return -ENOMEM in that case instead.
--- include/linux/idr.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/idr.h +2 -0
@@ -54,6 +54,8 @@ static inline int idr_alloc_one(struct idr *head, void *ptr, int start)return -EBUSY ; idr =malloc (sizeof (*idr)); +if (!idr) +return -ENOMEM ; idr->id = start; idr->ptr = ptr;
Signature · 1 line
2.39.2
PATCH 14/19 mci: tegra: use correct types for mmio and DMA address
In reply to Ahmad FatoumWe don't support any ARMv8 Tegra SoCs, but we still want to be able to build test the driver when compiling for 64-bit though, so replace straight casts of addr with lower_32_bits(virt_to_phys(addr)), which has the same result, but makes it clear that the upper 32 bit are truncated and silences the compiler warnings.
--- drivers/mci/tegra-sdmmc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/mci/tegra-sdmmc.c +6 -5
@@ -115,11 +115,13 @@ static int tegra_sdmmc_send_cmd(struct mci_host *mci, struct mci_cmd *cmd,if (data->flags &MMC_DATA_WRITE ) {dma_sync_single_for_device (mci->hw_dev, (unsigned long )data->src, num_bytes,DMA_TO_DEVICE ); -sdhci_write32 (&host->sdhci,SDHCI_DMA_ADDRESS , (u32 )data->src); +sdhci_write32 (&host->sdhci,SDHCI_DMA_ADDRESS , +lower_32_bits (virt_to_phys (data->src))); }else {dma_sync_single_for_device (mci->hw_dev, (unsigned long )data->dest, num_bytes,DMA_FROM_DEVICE ); -sdhci_write32 (&host->sdhci,SDHCI_DMA_ADDRESS , (u32 )data->dest); +sdhci_write32 (&host->sdhci,SDHCI_DMA_ADDRESS , +lower_32_bits (virt_to_phys (data->dest))); } sdhci_write32(&host->sdhci, SDHCI_BLOCK_SIZE__BLOCK_COUNT,
@@ -308,9 +310,8 @@ static int tegra_sdmmc_init(struct mci_host *mci, struct device *dev)sdhci_write32 (&host->sdhci,TEGRA_SDMMC_PWR_CNTL , val);/* sdmmc1 and sdmmc3 on T30 need a bit of padctrl init */ -if (of_device_is_compatible (mci->hw_dev->of_node, -"nvidia,tegra30-sdhci" ) && - ((u32 )regs ==0x78000000 || (u32 )regs ==0x78000400 )) { +if (of_device_is_compatible (mci->hw_dev->of_node,"nvidia,tegra30-sdhci" ) && + (regs ==IOMEM (0x78000000 ) || regs ==IOMEM (0x78000400 ))) { val =readl (regs +TEGRA_SDMMC_SDMEMCOMPPADCTRL ); val &=0xfffffff0 ; val |=0x7 <<TEGRA_SDMMC_SDMEMCOMPPADCTRL_VREF_SEL_SHIFT ;
Signature · 1 line
2.39.2
PATCH 15/19 mtd: spi-nor: cadence: fix types
In reply to Ahmad FatoumThe JH7100 for which we have basic support has 64-bit CPUs and a cadence quad SPI controller. Building the driver for that CPU would result in a couple of warning due to casting 64-bit pointers to 32-bit integers. Fix this.
--- drivers/mtd/spi-nor/cadence-quadspi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/mtd/spi-nor/cadence-quadspi.c +3 -5
@@ -336,8 +336,7 @@ static int cqspi_command_read(struct spi_nor *nor,if (!n_rx || n_rx >CQSPI_STIG_DATA_LEN_MAX || rxbuf ==NULL ) {dev_err (nor->dev, -"Invalid input argument, len %d rxbuf 0x%08x\n" , n_rx, - (unsigned int )rxbuf); +"Invalid input argument, len %d rxbuf 0x%p\n" , n_rx, rxbuf);return -EINVAL ; }
@@ -382,8 +381,7 @@ static __maybe_unused int cqspi_command_write(struct spi_nor *nor,if (n_tx >4 || (n_tx && txbuf ==NULL )) {dev_err (nor->dev, -"Invalid input argument, cmdlen %d txbuf 0x%08x\n" , - n_tx, (unsigned int )txbuf); +"Invalid input argument, cmdlen %d txbuf 0x%p\n" , n_tx, txbuf);return -EINVAL ; }
@@ -422,7 +420,7 @@ static int cqspi_indirect_read_setup(struct spi_nor *nor, {struct cqspi_flash_pdata *f_pdata;struct cqspi_st *cqspi = nor->priv; -unsigned int ahb_base = (unsigned int ) cqspi->ahb_base; +phys_addr_t ahb_base =virt_to_phys (cqspi->ahb_base);void __iomem *reg_base = cqspi->iobase;unsigned int dummy_clk =0 ;unsigned int dummy_bytes;
Signature · 1 line
2.39.2
PATCH 16/19 video: simplefb-fixup: warn on framebuffers >= 4G
In reply to Ahmad FatoumBuilding simplefb-fixup for 64-bit has the compiler inform us that the code doesn't handle 64-bit addresses as it should. Silence the warnings and have the code return -ENOSYS if this happens.
--- drivers/video/simplefb-fixup.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/video/simplefb-fixup.c +7 -3
@@ -90,6 +90,7 @@ static int simplefb_create_node(struct device_node *root, const struct fb_info *fbi, const char *format) { struct device_node *node; +phys_addr_t screen_base;u32 cells[2 ];int ret;
@@ -105,7 +106,11 @@ static int simplefb_create_node(struct device_node *root,if (ret)return ret; - cells[0 ] =cpu_to_be32 ((u32 )fbi->screen_base); + screen_base =virt_to_phys (fbi->screen_base); +if (upper_32_bits (screen_base)) +return -ENOSYS ; + + cells[0 ] =cpu_to_be32 (lower_32_bits (screen_base)); cells[1 ] =cpu_to_be32 (fbi->line_length * fbi->yres); ret =of_set_property (node,"reg" , cells,sizeof (cells[0 ]) *2 ,1 );if (ret <0 )
@@ -130,8 +135,7 @@ static int simplefb_create_node(struct device_node *root,if (ret <0 )return ret; -of_add_reserve_entry ((u32 )fbi->screen_base, - (u32 )fbi->screen_base + fbi->screen_size); +of_add_reserve_entry (screen_base, screen_base + fbi->screen_size);return of_property_write_string (node,"status" ,"okay" ); }
Signature · 1 line
2.39.2
PATCH 17/19 watchdog: imx28: use correct constant for computing timeout_max
In reply to Ahmad Fatoumtimeout_max is a 32-bit variable, so storing ULONG_MAX / WDOG_TICK_RATE into it causes a wrap around on 64-bit systems. As the SoC is a 32-bit one, it's likely the original intention was for it to be U32_MAX instead.
--- drivers/watchdog/im28wd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/im28wd.c +1 -1
@@ -187,7 +187,7 @@ static int imx28_wd_probe(struct device *dev)return PTR_ERR (iores); priv->regs =IOMEM (iores->start); priv->wd.set_timeout = imx28_watchdog_set_timeout; - priv->wd.timeout_max =ULONG_MAX /WDOG_TICK_RATE ; + priv->wd.timeout_max =U32_MAX /WDOG_TICK_RATE ; priv->wd.hwdev = dev;if (!(readl (priv->regs +MXS_RTC_STAT ) &MXS_RTC_STAT_WD_PRESENT )) {
Signature · 1 line
2.39.2
PATCH 18/19 firmware: mark firmware sections as having non-executable stack
In reply to Ahmad Fatoumallyesconfig on sandbox detects that firmware misses the annotation, which we already have for environment, DTs and other generated assembly files. Fix it there too.
--- firmware/Makefile | 1 + 1 file changed, 1 insertion(+)
firmware/Makefile +1 -0
@@ -45,6 +45,7 @@ ASM_ALIGN = $(if $(CONFIG_64BIT),3,2) filechk_fwbin = { \ echo "/* Generated by $(src)/Makefile */" ;\ + echo ".section .note.GNU-stack,\"\",%progbits" ;\ echo " .section $2,\"$3\"" ;\ echo " .p2align $(ASM_ALIGN)" ;\ echo ".global _fw_$(FWSTR)_start" ;\
Signature · 1 line
2.39.2
PATCH 19/19 phy: stm32: usb: depend on COMMON_CLK
In reply to Ahmad FatoumThe stm32-usbphyc driver registers a clock with the common clock framework, so compile testing without COMMON_CLK understandably fails and can't be expected to work. Fix the allyesconfig build on sandbox by making the COMMON_CLK dependency explicit.
--- drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
@@ -29,6 +29,7 @@ source "drivers/phy/rockchip/Kconfig" config PHY_STM32_USBPHYC tristate "STM32 USB HS PHY Controller" depends on ARCH_STM32MP || COMPILE_TEST + depends on COMMON_CLK help Enable this to support the High-Speed USB transceivers that are part of some STMicroelectronics STM32 SoCs.
Signature · 1 line
2.39.2
Sascha Hauer
AppliedQuoted 19 lines · Ahmad Fatoum
Eventually, I want to run static analysis against the configuration, but this series fixed build warnings/errors just compiling it normally with GCC 13 and clang 14.
The critical parts were factored into their own series, so this can go into next first.
Ahmad Fatoum (19):
clk: always define clk_prepare_enable/disable
clk: defineclk_get_parentstub
pci: disable buildingCONFIG_PCIwhenCONFIG_COMPILE_TEST
mci: tegra: fix base address constant to be hexadecimal
ata: ide-sff: fix warnings when compiling as 64-bit
video: bochs: remove dependency on PCI header in common part
commands: ubsan: hide pointer provenance used to trigger UB
test: self: printf: silence clang warnings
crypto: caam - fix pointer to u32 casts
crypto: imx-scc: fix u32 to pointer casts
mci: sdhci: dove: fix pointer to u32 casts
Quoted 8 lines
lib:
make_directory: return-ENOMEMon allocation failure include <linux/idr.h>: handle OOM gracefully insideidr_alloc_one
mci: tegra: use correct types for mmio and DMA address
mtd: spi-nor: cadence: fix types
video: simplefb-fixup: warn on framebuffers >= 4G
watchdog: imx28: use correct constant for computingtimeout_max
firmware: mark firmware sections as having non-executable stack
phy: stm32: usb: depend onCOMMON_CLK
Applied, thanks
Sascha
Quoted 26 lines
commands/ubsan.c | 2 ++ drivers/ata/ide-sff.c | 8 ++++---- drivers/crypto/caam/jr.c | 2 +- drivers/crypto/caam/rng_self_test.c | 2 +- drivers/crypto/imx-scc/scc.c | 6 +++--- drivers/mci/dove-sdhci.c | 20 +++++++++++++------- drivers/mci/tegra-sdmmc.c | 11 ++++++----- drivers/mtd/spi-nor/cadence-quadspi.c | 8 +++----- drivers/pci/Kconfig | 2 +- drivers/phy/Kconfig | 1 + drivers/video/bochs/bochs_hw.c | 1 - drivers/video/simplefb-fixup.c | 10 +++++++--- drivers/watchdog/im28wd.c | 2 +- firmware/Makefile | 1 + include/linux/clk.h | 11 +++++++++-- include/linux/idr.h | 2 ++ lib/make_directory.c | 3 +++ test/self/Makefile | 2 +- 18 files changed, 59 insertions(+), 35 deletions(-)Signature · 1 line
2.39.2
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |