Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98c94f32 authored by Sudarshan Rajagopalan's avatar Sudarshan Rajagopalan
Browse files

soc: qcom: mem-offline: BUG_ON when hw online request fails



Provide a config option to BUG_ON when the hardware memory online
fails. This helps to catch such issues much quicker and avoids the
later side effects of such online failures.

Change-Id: Ifa39962593e0d2e75bdb164d91755aff47d39058
Signed-off-by: default avatarSudarshan Rajagopalan <sudaraja@codeaurora.org>
parent 178142fa
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -24,6 +24,16 @@ config QCOM_MEM_OFFLINE
	  helps reduce power consumption during idle mode of the system.
	  If unsure, say N

config BUG_ON_HW_MEM_ONLINE_FAIL
	bool "Trigger a BUG when HW memory online fails"
	depends on QCOM_MEM_OFFLINE
	help
	  Select this option if kernel should BUG when the hardware
	  onlining of memory hotplug blocks fails. This helps to catch
	  online failures much quicker and avoids the later side effects
	  of such memory online failures.
	  If unsure, say N

config QCOM_GENI_SE
	tristate "QCOM GENI Serial Engine Driver"
	depends on ARCH_QCOM || COMPILE_TEST
+4 −1
Original line number Diff line number Diff line
@@ -152,8 +152,11 @@ static int mem_change_refresh_state(struct memory_notify *mn,
		return 0;
	}
	ret = aop_send_msg(__pfn_to_phys(start), online);
	if (ret)
	if (ret) {
		if (state == MEMORY_ONLINE)
			BUG_ON(IS_ENABLED(CONFIG_BUG_ON_HW_MEM_ONLINE_FAIL));
		return -EINVAL;
	}
	mem_hw_state[idx] = state;

	return 0;