[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/86] hw:aspeed: drop warning and bogus ram_size fixup
From: |
Igor Mammedov |
Subject: |
[PATCH 11/86] hw:aspeed: drop warning and bogus ram_size fixup |
Date: |
Tue, 31 Dec 2019 14:02:55 +0100 |
It was useless to try fixup ram_size and print warning
on guest access to config register to begin with.
Now previous patch made sure that SDMC can not be realized
with invalid RAM size, so there is no case where warning
and not used ram_size fixup could be triggered.
So remove now dead code.
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/misc/aspeed_sdmc.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c
index b398e36..942b27a 100644
--- a/hw/misc/aspeed_sdmc.c
+++ b/hw/misc/aspeed_sdmc.c
@@ -219,17 +219,8 @@ static int aspeed_get_ram_feat(AspeedSDMCState *s)
{
AspeedSDMCClass *asc = ASPEED_SDMC_GET_CLASS(s);
int ram_mb = s->ram_size >> 20;
- gpointer val;
+ gpointer val = g_hash_table_lookup(asc->ram2feat, GINT_TO_POINTER(ram_mb));
- if (g_hash_table_contains(asc->ram2feat, GINT_TO_POINTER(ram_mb))) {
- val = g_hash_table_lookup(asc->ram2feat, GINT_TO_POINTER(ram_mb));
- return GPOINTER_TO_INT(val);
- }
-
- warn_report("Invalid RAM size 0x%" PRIx64 ". Using default %dM",
- s->ram_size, asc->fallback_ram_size);
- s->ram_size = asc->fallback_ram_size << 20;
- val = g_hash_table_lookup(asc->ram2feat, &asc->fallback_ram_size);
return GPOINTER_TO_INT(val);
}
--
2.7.4
- [PATCH 00/86] refactor main RAM allocation to use hostmem backend, Igor Mammedov, 2019/12/31
- [PATCH 02/86] numa: properly check if numa is supported, Igor Mammedov, 2019/12/31
- [PATCH 03/86] numa: remove deprecated -mem-path fallback to anonymous RAM, Igor Mammedov, 2019/12/31
- [PATCH 04/86] machine: introduce ram-memdev property, Igor Mammedov, 2019/12/31
- [PATCH 01/86] numa: remove not needed check, Igor Mammedov, 2019/12/31
- [PATCH 05/86] machine: alias -mem-path and -mem-prealloc into memory-foo backend, Igor Mammedov, 2019/12/31
- [PATCH 06/86] machine: introduce convenience MachineState::ram, Igor Mammedov, 2019/12/31
- [PATCH 07/86] initialize MachineState::ram in NUMA case, Igor Mammedov, 2019/12/31
- [PATCH 11/86] hw:aspeed: drop warning and bogus ram_size fixup,
Igor Mammedov <=
- [PATCH 08/86] alpha:dp264: use memdev for RAM, Igor Mammedov, 2019/12/31
- [PATCH 09/86] arm:aspeed: convert valid RAM sizes to data, Igor Mammedov, 2019/12/31
- [PATCH 10/86] arm:aspeed: actually check RAM size, Igor Mammedov, 2019/12/31
- [PATCH 12/86] arm:aspeed: use memdev for RAM, Igor Mammedov, 2019/12/31
- [PATCH 15/86] arm:digic_boards: use memdev for RAM, Igor Mammedov, 2019/12/31
- [PATCH 16/86] arm:highbank: use memdev for RAM, Igor Mammedov, 2019/12/31
- [PATCH 18/86] arm:imx25_pdk: use memdev for RAM, Igor Mammedov, 2019/12/31
- [PATCH 22/86] arm:mcimx6ul-evk: use memdev for RAM, Igor Mammedov, 2019/12/31
- [PATCH 24/86] arm:mps2-tz: use memdev for RAM, Igor Mammedov, 2019/12/31