mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig
@ 2023-06-12 13:02 Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 01/19] clk: always define clk_prepare_enable/disable Ahmad Fatoum
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox

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(-)

-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 01/19] clk: always define clk_prepare_enable/disable
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 02/19] clk: define clk_get_parent stub Ahmad Fatoum
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/linux/clk.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/clk.h b/include/linux/clk.h
index c78132d40582..60534ddb732c 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -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)
 {
 }
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 02/19] clk: define clk_get_parent stub
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 01/19] clk: always define clk_prepare_enable/disable Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 03/19] pci: disable building CONFIG_PCI when CONFIG_COMPILE_TEST Ahmad Fatoum
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

clk_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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/linux/clk.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/clk.h b/include/linux/clk.h
index 60534ddb732c..8509d5ece9d5 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -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;
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 03/19] pci: disable building CONFIG_PCI when CONFIG_COMPILE_TEST
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 01/19] clk: always define clk_prepare_enable/disable Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 02/19] clk: define clk_get_parent stub Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 04/19] mci: tegra: fix base address constant to be hexadecimal Ahmad Fatoum
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Architectures 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/pci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 32a9e831b9e3..39df54f215cf 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -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
 
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 04/19] mci: tegra: fix base address constant to be hexadecimal
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (2 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 03/19] pci: disable building CONFIG_PCI when CONFIG_COMPILE_TEST Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 05/19] ata: ide-sff: fix warnings when compiling as 64-bit Ahmad Fatoum
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Tegra SoCs don't have MMC peripherals at decimal address 78000400
(hexadecimal: 0x4a63110), but they do at 0x78000400. Fix it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mci/tegra-sdmmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mci/tegra-sdmmc.c b/drivers/mci/tegra-sdmmc.c
index f8ce6c8d7ba0..a6e2b3032057 100644
--- a/drivers/mci/tegra-sdmmc.c
+++ b/drivers/mci/tegra-sdmmc.c
@@ -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;
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 05/19] ata: ide-sff: fix warnings when compiling as 64-bit
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (3 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 04/19] mci: tegra: fix base address constant to be hexadecimal Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 06/19] video: bochs: remove dependency on PCI header in common part Ahmad Fatoum
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Driver 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/ata/ide-sff.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/ide-sff.c b/drivers/ata/ide-sff.c
index 69055e058503..f25dfeae4328 100644
--- a/drivers/ata/ide-sff.c
+++ b/drivers/ata/ide-sff.c
@@ -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);
 }
 
 /**
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 06/19] video: bochs: remove dependency on PCI header in common part
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (4 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 05/19] ata: ide-sff: fix warnings when compiling as 64-bit Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 07/19] commands: ubsan: hide pointer provenance used to trigger UB Ahmad Fatoum
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

bochs_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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/video/bochs/bochs_hw.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/video/bochs/bochs_hw.c b/drivers/video/bochs/bochs_hw.c
index 48de5ea0bd7a..60439ddee576 100644
--- a/drivers/video/bochs/bochs_hw.c
+++ b/drivers/video/bochs/bochs_hw.c
@@ -8,7 +8,6 @@
 
 #include <common.h>
 #include <driver.h>
-#include <linux/pci.h>
 #include <fb.h>
 #include "../edid.h"
 #include "bochs_hw.h"
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 07/19] commands: ubsan: hide pointer provenance used to trigger UB
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (5 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 06/19] video: bochs: remove dependency on PCI header in common part Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 08/19] test: self: printf: silence clang warnings Ahmad Fatoum
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 commands/ubsan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/commands/ubsan.c b/commands/ubsan.c
index 620b4774c3c2..4a9716139c4b 100644
--- a/commands/ubsan.c
+++ b/commands/ubsan.c
@@ -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;
 }
 
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 08/19] test: self: printf: silence clang warnings
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (6 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 07/19] commands: ubsan: hide pointer provenance used to trigger UB Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 09/19] crypto: caam - fix pointer to u32 casts Ahmad Fatoum
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 test/self/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/self/Makefile b/test/self/Makefile
index 080ef303cc35..78a337810d1f 100644
--- a/test/self/Makefile
+++ b/test/self/Makefile
@@ -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
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 09/19] crypto: caam - fix pointer to u32 casts
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (7 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 08/19] test: self: printf: silence clang warnings Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 10/19] crypto: imx-scc: fix u32 to pointer casts Ahmad Fatoum
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

For 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/crypto/caam/jr.c            | 2 +-
 drivers/crypto/caam/rng_self_test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index f15902866998..b5d70b24b380 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -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;
diff --git a/drivers/crypto/caam/rng_self_test.c b/drivers/crypto/caam/rng_self_test.c
index 3b20f8aad293..b6fcc3bc0947 100644
--- a/drivers/crypto/caam/rng_self_test.c
+++ b/drivers/crypto/caam/rng_self_test.c
@@ -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 */
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 10/19] crypto: imx-scc: fix u32 to pointer casts
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (8 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 09/19] crypto: caam - fix pointer to u32 casts Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 11/19] mci: sdhci: dove: fix pointer to u32 casts Ahmad Fatoum
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/crypto/imx-scc/scc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/imx-scc/scc.c b/drivers/crypto/imx-scc/scc.c
index afd7ebe9cb2e..fcff7e9e6e56 100644
--- a/drivers/crypto/imx-scc/scc.c
+++ b/drivers/crypto/imx-scc/scc.c
@@ -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,
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 11/19] mci: sdhci: dove: fix pointer to u32 casts
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (9 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 10/19] crypto: imx-scc: fix u32 to pointer casts Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 12/19] lib: make_directory: return -ENOMEM on allocation failure Ahmad Fatoum
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mci/dove-sdhci.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/mci/dove-sdhci.c b/drivers/mci/dove-sdhci.c
index 9e6da6a81be1..5954058e6b30 100644
--- a/drivers/mci/dove-sdhci.c
+++ b/drivers/mci/dove-sdhci.c
@@ -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) {
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 12/19] lib: make_directory: return -ENOMEM on allocation failure
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (10 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 11/19] mci: sdhci: dove: fix pointer to u32 casts Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 13/19] include <linux/idr.h>: handle OOM gracefully inside idr_alloc_one Ahmad Fatoum
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

mkdir calls strdup on the dir that's passed in, but doesn't account for
allocation failure. Have it return -ENOMEM in that case.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 lib/make_directory.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/make_directory.c b/lib/make_directory.c
index 7db93ded8817..59ac87e6bfdf 100644
--- a/lib/make_directory.c
+++ b/lib/make_directory.c
@@ -19,6 +19,9 @@ STATIC int make_directory(const char *dir)
 	char c;
 	int ret = 0;
 
+	if (!s)
+		return -ENOMEM;
+
 	do {
 		c = 0;
 
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 13/19] include <linux/idr.h>: handle OOM gracefully inside idr_alloc_one
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (11 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 12/19] lib: make_directory: return -ENOMEM on allocation failure Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 14/19] mci: tegra: use correct types for mmio and DMA address Ahmad Fatoum
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The result of allocating a struct idr is dereferenced unconditionally.
Return -ENOMEM in that case instead.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/linux/idr.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/idr.h b/include/linux/idr.h
index 50c9e3f81ade..12494b1f01cb 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -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;
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 14/19] mci: tegra: use correct types for mmio and DMA address
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (12 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 13/19] include <linux/idr.h>: handle OOM gracefully inside idr_alloc_one Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 15/19] mtd: spi-nor: cadence: fix types Ahmad Fatoum
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mci/tegra-sdmmc.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/mci/tegra-sdmmc.c b/drivers/mci/tegra-sdmmc.c
index a6e2b3032057..e940edf3227a 100644
--- a/drivers/mci/tegra-sdmmc.c
+++ b/drivers/mci/tegra-sdmmc.c
@@ -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;
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 15/19] mtd: spi-nor: cadence: fix types
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (13 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 14/19] mci: tegra: use correct types for mmio and DMA address Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 16/19] video: simplefb-fixup: warn on framebuffers >= 4G Ahmad Fatoum
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mtd/spi-nor/cadence-quadspi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c
index 5079127be43a..763858567b9c 100644
--- a/drivers/mtd/spi-nor/cadence-quadspi.c
+++ b/drivers/mtd/spi-nor/cadence-quadspi.c
@@ -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;
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 16/19] video: simplefb-fixup: warn on framebuffers >= 4G
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (14 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 15/19] mtd: spi-nor: cadence: fix types Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 17/19] watchdog: imx28: use correct constant for computing timeout_max Ahmad Fatoum
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Building 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/video/simplefb-fixup.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/video/simplefb-fixup.c b/drivers/video/simplefb-fixup.c
index a2c59de364a5..65e0281a189f 100644
--- a/drivers/video/simplefb-fixup.c
+++ b/drivers/video/simplefb-fixup.c
@@ -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");
 }
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 17/19] watchdog: imx28: use correct constant for computing timeout_max
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (15 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 16/19] video: simplefb-fixup: warn on framebuffers >= 4G Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 18/19] firmware: mark firmware sections as having non-executable stack Ahmad Fatoum
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

timeout_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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/watchdog/im28wd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/im28wd.c b/drivers/watchdog/im28wd.c
index 7df2e2d99506..b52e5851750b 100644
--- a/drivers/watchdog/im28wd.c
+++ b/drivers/watchdog/im28wd.c
@@ -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)) {
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 18/19] firmware: mark firmware sections as having non-executable stack
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (16 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 17/19] watchdog: imx28: use correct constant for computing timeout_max Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-12 13:02 ` [PATCH 19/19] phy: stm32: usb: depend on COMMON_CLK Ahmad Fatoum
  2023-06-13  7:49 ` [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Sascha Hauer
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

allyesconfig on sandbox detects that firmware misses the annotation,
which we already have for environment, DTs and other generated assembly
files. Fix it there too.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 firmware/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/firmware/Makefile b/firmware/Makefile
index 75812cb6bf24..efdd5c0da541 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -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"			;\
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 19/19] phy: stm32: usb: depend on COMMON_CLK
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (17 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 18/19] firmware: mark firmware sections as having non-executable stack Ahmad Fatoum
@ 2023-06-12 13:02 ` Ahmad Fatoum
  2023-06-13  7:49 ` [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Sascha Hauer
  19 siblings, 0 replies; 21+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The 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.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 4df9bd0523bc..52c792914909 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -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.
-- 
2.39.2




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig
  2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
                   ` (18 preceding siblings ...)
  2023-06-12 13:02 ` [PATCH 19/19] phy: stm32: usb: depend on COMMON_CLK Ahmad Fatoum
@ 2023-06-13  7:49 ` Sascha Hauer
  19 siblings, 0 replies; 21+ messages in thread
From: Sascha Hauer @ 2023-06-13  7:49 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Mon, Jun 12, 2023 at 03:02:21PM +0200, Ahmad Fatoum wrote:
> 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

Applied, thanks

Sascha

> 
>  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(-)
> 
> -- 
> 2.39.2
> 
> 
> 

-- 
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 |



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-06-13  7:50 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 13:02 [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 01/19] clk: always define clk_prepare_enable/disable Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 02/19] clk: define clk_get_parent stub Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 03/19] pci: disable building CONFIG_PCI when CONFIG_COMPILE_TEST Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 04/19] mci: tegra: fix base address constant to be hexadecimal Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 05/19] ata: ide-sff: fix warnings when compiling as 64-bit Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 06/19] video: bochs: remove dependency on PCI header in common part Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 07/19] commands: ubsan: hide pointer provenance used to trigger UB Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 08/19] test: self: printf: silence clang warnings Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 09/19] crypto: caam - fix pointer to u32 casts Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 10/19] crypto: imx-scc: fix u32 to pointer casts Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 11/19] mci: sdhci: dove: fix pointer to u32 casts Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 12/19] lib: make_directory: return -ENOMEM on allocation failure Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 13/19] include <linux/idr.h>: handle OOM gracefully inside idr_alloc_one Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 14/19] mci: tegra: use correct types for mmio and DMA address Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 15/19] mtd: spi-nor: cadence: fix types Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 16/19] video: simplefb-fixup: warn on framebuffers >= 4G Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 17/19] watchdog: imx28: use correct constant for computing timeout_max Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 18/19] firmware: mark firmware sections as having non-executable stack Ahmad Fatoum
2023-06-12 13:02 ` [PATCH 19/19] phy: stm32: usb: depend on COMMON_CLK Ahmad Fatoum
2023-06-13  7:49 ` [PATCH 00/19] misc fixes building sandbox 64-bit allyesconfig Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox