linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.6 01/47] ARC: Fix ICCM & DCCM runtime size checks
@ 2020-05-28 11:55 Sasha Levin
  2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 02/47] ARC: [plat-eznps]: Restrict to CONFIG_ISA_ARCOMPACT Sasha Levin
                   ` (45 more replies)
  0 siblings, 46 replies; 47+ messages in thread
From: Sasha Levin @ 2020-05-28 11:55 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 aa41af6ef4ac..efdedf83b954 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -11,6 +11,7 @@
 #include <linux/clocksource.h>
 #include <linux/console.h>
 #include <linux/module.h>
+#include <linux/sizes.h>
 #include <linux/cpu.h>
 #include <linux/of_clk.h>
 #include <linux/of_fdt.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] 47+ messages in thread

end of thread, other threads:[~2020-05-28 12:11 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 11:55 [PATCH AUTOSEL 5.6 01/47] ARC: Fix ICCM & DCCM runtime size checks Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 02/47] ARC: [plat-eznps]: Restrict to CONFIG_ISA_ARCOMPACT Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 03/47] efi/libstub: Avoid returning uninitialized data from setup_graphics() Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 04/47] evm: Fix RCU list related warnings Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 05/47] scsi: pm: Balance pm_only counter of request queue during system resume Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 06/47] efi/earlycon: Fix early printk for wider fonts Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 07/47] x86/hyperv: Properly suspend/resume reenlightenment notifications Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 08/47] dmaengine: ti: k3-udma: Fix TR mode flags for slave_sg and memcpy Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 09/47] i2c: altera: Fix race between xfer_msg and isr thread Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 10/47] io_uring: initialize ctx->sqo_wait earlier Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 11/47] io_uring: don't prepare DRAIN reqs twice Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 12/47] io_uring: fix FORCE_ASYNC req preparation Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 13/47] net: phy: propagate an error back to the callers of phy_sfp_probe Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 14/47] net sched: fix reporting the first-time use timestamp Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 15/47] x86/mmiotrace: Use cpumask_available() for cpumask_var_t variables Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 16/47] net: bmac: Fix read of MAC address from ROM Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 17/47] r8152: support additional Microsoft Surface Ethernet Adapter variant Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 18/47] drm/edid: Add Oculus Rift S to non-desktop list Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 19/47] s390/mm: fix set_huge_pte_at() for empty ptes Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 20/47] io_uring: reset -EBUSY error when io sq thread is waken up Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 21/47] drm/amd/display: DP training to set properly SCRAMBLING_DISABLE Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 22/47] riscv: Fix print_vm_layout build error if NOMMU Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 23/47] wireguard: selftests: use newer iproute2 for gcc-10 Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 24/47] wireguard: queueing: preserve flow hash across packet scrubbing Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 25/47] null_blk: return error for invalid zone size Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 26/47] net: ethernet: ti: fix some return value check of cpsw_ale_create() Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 27/47] net: sgi: ioc3-eth: Fix return value check in ioc3eth_probe() Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 28/47] felix: Fix initialization of ioremap resources Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 29/47] net: mvpp2: fix RX hashing for non-10G ports Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 30/47] net/ethernet/freescale: rework quiesce/activate for ucc_geth Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 31/47] net: ethernet: stmmac: Enable interface clocks on probe for IPQ806x Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 32/47] mlxsw: spectrum: Fix use-after-free of split/unsplit/type_set in case reload fails Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 33/47] selftests: mlxsw: qos_mc_aware: Specify arping timeout as an integer Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 34/47] r8169: fix OCP access on RTL8117 Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 35/47] net: mscc: ocelot: fix address ageing time (again) Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 36/47] net: sun: fix missing release regions in cas_init_one() Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 37/47] net/mlx5: Add command entry handling completion Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 38/47] net/mlx5: Fix a race when moving command interface to events mode Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 39/47] net/mlx5e: Fix inner tirs handling Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 40/47] net/mlx5: Fix memory leak in mlx5_events_init Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 41/47] net/mlx5: Fix cleaning unmanaged flow tables Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 42/47] net/mlx5e: Update netdev txq on completions during closure Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 43/47] net/mlx5: Fix error flow in case of function_setup failure Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 44/47] net: Fix return value about devm_platform_ioremap_resource() Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 45/47] net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend Sasha Levin
2020-05-28 11:55 ` [PATCH AUTOSEL 5.6 46/47] net/mlx4_core: fix a memory leak bug Sasha Levin
2020-05-28 11:56 ` [PATCH AUTOSEL 5.6 47/47] 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).