Unverified Commit 830c644d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5800 firmware: arm_sdei: Move sdei_cpuhp_up/down() before lockup_detector_online_cpu()

parents 28b1e846 3f1e2f73
Loading
Loading
Loading
Loading
+7 −14
Original line number Diff line number Diff line
@@ -43,8 +43,6 @@ static asmlinkage void (*sdei_firmware_call)(unsigned long function_id,
/* entry point from firmware to arch asm code */
static unsigned long sdei_entry_point;

static int sdei_hp_state;

struct sdei_event {
	/* These three are protected by the sdei_list_lock */
	struct list_head	list;
@@ -785,7 +783,7 @@ static int sdei_device_freeze(struct device *dev)
	int err;

	/* unregister private events */
	cpuhp_remove_state(sdei_entry_point);
	cpuhp_remove_state(CPUHP_AP_ARM_SDEI_ONLINE);

	err = sdei_unregister_shared();
	if (err)
@@ -806,15 +804,12 @@ static int sdei_device_thaw(struct device *dev)
		return err;
	}

	err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "SDEI",
	err = cpuhp_setup_state(CPUHP_AP_ARM_SDEI_ONLINE, "SDEI",
				&sdei_cpuhp_up, &sdei_cpuhp_down);
	if (err < 0) {
	if (err)
		pr_warn("Failed to re-register CPU hotplug notifier...\n");
		return err;
	}

	sdei_hp_state = err;
	return 0;
	return err;
}

static int sdei_device_restore(struct device *dev)
@@ -846,7 +841,7 @@ static int sdei_reboot_notifier(struct notifier_block *nb, unsigned long action,
	 * We are going to reset the interface, after this there is no point
	 * doing work when we take CPUs offline.
	 */
	cpuhp_remove_state(sdei_hp_state);
	cpuhp_remove_state(CPUHP_AP_ARM_SDEI_ONLINE);

	sdei_platform_reset();

@@ -1026,15 +1021,13 @@ static int sdei_probe(struct platform_device *pdev)
		goto remove_cpupm;
	}

	err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "SDEI",
	err = cpuhp_setup_state(CPUHP_AP_ARM_SDEI_ONLINE, "SDEI",
				&sdei_cpuhp_up, &sdei_cpuhp_down);
	if (err < 0) {
	if (err) {
		pr_warn("Failed to register CPU hotplug notifier...\n");
		goto remove_reboot;
	}

	sdei_hp_state = err;

	return 0;

remove_reboot:
+1 −0
Original line number Diff line number Diff line
@@ -246,6 +246,7 @@ enum cpuhp_state {
	CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE,
	CPUHP_AP_PERF_POWERPC_HV_GPCI_ONLINE,
	CPUHP_AP_PERF_CSKY_ONLINE,
	CPUHP_AP_ARM_SDEI_ONLINE,
	CPUHP_AP_WATCHDOG_ONLINE,
	CPUHP_AP_WORKQUEUE_ONLINE,
	CPUHP_AP_RANDOM_ONLINE,