linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.4 01/26] ARC: Fix ICCM & DCCM runtime size checks
@ 2020-05-28 11:56 Sasha Levin
  2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 02/26] ARC: [plat-eznps]: Restrict to CONFIG_ISA_ARCOMPACT Sasha Levin
                   ` (24 more replies)
  0 siblings, 25 replies; 27+ messages in thread
From: Sasha Levin @ 2020-05-28 11:56 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Eugeniy Paltsev, Paul Greco, Vineet Gupta, Sasha Levin, linux-snps-arc

From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

[ Upstream commit 43900edf67d7ef3ac8909854d75b8a1fba2d570c ]

As of today the ICCM and DCCM size checks are incorrectly using
mismatched units (KiB checked against bytes). The CONFIG_ARC_DCCM_SZ
and CONFIG_ARC_ICCM_SZ are in KiB, but the size calculated in
runtime and stored in cpu->dccm.sz and cpu->iccm.sz is in bytes.

Fix that.

Reported-by: Paul Greco <pmgreco@us.ibm.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arc/kernel/setup.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index 7ee89dc61f6e..23dc002aa574 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -12,6 +12,7 @@
 #include <linux/clocksource.h>
 #include <linux/console.h>
 #include <linux/module.h>
+#include <linux/sizes.h>
 #include <linux/cpu.h>
 #include <linux/of_fdt.h>
 #include <linux/of.h>
@@ -409,12 +410,12 @@ static void arc_chk_core_config(void)
 	if ((unsigned int)__arc_dccm_base != cpu->dccm.base_addr)
 		panic("Linux built with incorrect DCCM Base address\n");
 
-	if (CONFIG_ARC_DCCM_SZ != cpu->dccm.sz)
+	if (CONFIG_ARC_DCCM_SZ * SZ_1K != cpu->dccm.sz)
 		panic("Linux built with incorrect DCCM Size\n");
 #endif
 
 #ifdef CONFIG_ARC_HAS_ICCM
-	if (CONFIG_ARC_ICCM_SZ != cpu->iccm.sz)
+	if (CONFIG_ARC_ICCM_SZ * SZ_1K != cpu->iccm.sz)
 		panic("Linux built with incorrect ICCM Size\n");
 #endif
 
-- 
2.25.1


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

end of thread, other threads:[~2020-05-31 21:19 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 11:56 [PATCH AUTOSEL 5.4 01/26] ARC: Fix ICCM & DCCM runtime size checks Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 02/26] ARC: [plat-eznps]: Restrict to CONFIG_ISA_ARCOMPACT Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 03/26] evm: Fix RCU list related warnings Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 04/26] scsi: pm: Balance pm_only counter of request queue during system resume Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 05/26] i2c: altera: Fix race between xfer_msg and isr thread Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 06/26] io_uring: initialize ctx->sqo_wait earlier Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 07/26] net sched: fix reporting the first-time use timestamp Sasha Levin
2020-05-31 21:19   ` Pavel Machek
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 08/26] x86/mmiotrace: Use cpumask_available() for cpumask_var_t variables Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 09/26] net: bmac: Fix read of MAC address from ROM Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 10/26] r8152: support additional Microsoft Surface Ethernet Adapter variant Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 11/26] drm/edid: Add Oculus Rift S to non-desktop list Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 12/26] s390/mm: fix set_huge_pte_at() for empty ptes Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 13/26] null_blk: return error for invalid zone size Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 14/26] net: mvpp2: fix RX hashing for non-10G ports Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 15/26] net/ethernet/freescale: rework quiesce/activate for ucc_geth Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 16/26] net: ethernet: stmmac: Enable interface clocks on probe for IPQ806x Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 17/26] selftests: mlxsw: qos_mc_aware: Specify arping timeout as an integer Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 18/26] net: sun: fix missing release regions in cas_init_one() Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 19/26] net/mlx5: Add command entry handling completion Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 20/26] net/mlx5e: Fix inner tirs handling Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 21/26] net/mlx5: Fix memory leak in mlx5_events_init Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 22/26] net/mlx5e: Update netdev txq on completions during closure Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 23/26] net/mlx5: Fix error flow in case of function_setup failure Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 24/26] net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 25/26] net/mlx4_core: fix a memory leak bug Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.4 26/26] net: smsc911x: Fix runtime PM imbalance on error Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).