linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Lynch <nathanl@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: tyreld@linux.ibm.com, ajd@linux.ibm.com, mmc@linux.vnet.ibm.com,
	cforno12@linux.vnet.ibm.com, drt@linux.vnet.ibm.com,
	brking@linux.ibm.com
Subject: [PATCH v2 16/28] powerpc/rtas: remove rtas_ibm_suspend_me_unsafe()
Date: Mon,  7 Dec 2020 15:51:48 -0600	[thread overview]
Message-ID: <20201207215200.1785968-17-nathanl@linux.ibm.com> (raw)
In-Reply-To: <20201207215200.1785968-1-nathanl@linux.ibm.com>

rtas_ibm_suspend_me_unsafe() is now unused; remove it and
rtas_percpu_suspend_me() which becomes unused as a result.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
---
 arch/powerpc/include/asm/rtas.h |  1 -
 arch/powerpc/kernel/rtas.c      | 67 +--------------------------------
 2 files changed, 1 insertion(+), 67 deletions(-)

diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 3b52d8574fcc..9a6107ffe378 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -258,7 +258,6 @@ extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
 extern void rtas_progress(char *s, unsigned short hex);
 extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data);
 extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data);
-int rtas_ibm_suspend_me_unsafe(u64 handle);
 int rtas_ibm_suspend_me(int *fw_status);
 
 struct rtc_time;
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index d4b048571728..7e6024f570da 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -925,66 +925,6 @@ int rtas_suspend_cpu(struct rtas_suspend_me_data *data)
 	return __rtas_suspend_cpu(data, 0);
 }
 
-static void rtas_percpu_suspend_me(void *info)
-{
-	__rtas_suspend_cpu((struct rtas_suspend_me_data *)info, 1);
-}
-
-int rtas_ibm_suspend_me_unsafe(u64 handle)
-{
-	long state;
-	long rc;
-	unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
-	struct rtas_suspend_me_data data;
-	DECLARE_COMPLETION_ONSTACK(done);
-
-	if (!rtas_service_present("ibm,suspend-me"))
-		return -ENOSYS;
-
-	/* Make sure the state is valid */
-	rc = plpar_hcall(H_VASI_STATE, retbuf, handle);
-
-	state = retbuf[0];
-
-	if (rc) {
-		printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned %ld\n",rc);
-		return rc;
-	} else if (state == H_VASI_ENABLED) {
-		return -EAGAIN;
-	} else if (state != H_VASI_SUSPENDING) {
-		printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned state %ld\n",
-		       state);
-		return -EIO;
-	}
-
-	atomic_set(&data.working, 0);
-	atomic_set(&data.done, 0);
-	atomic_set(&data.error, 0);
-	data.token = rtas_token("ibm,suspend-me");
-	data.complete = &done;
-
-	lock_device_hotplug();
-
-	cpu_hotplug_disable();
-
-	/* Call function on all CPUs.  One of us will make the
-	 * rtas call
-	 */
-	on_each_cpu(rtas_percpu_suspend_me, &data, 0);
-
-	wait_for_completion(&done);
-
-	if (atomic_read(&data.error) != 0)
-		printk(KERN_ERR "Error doing global join\n");
-
-
-	cpu_hotplug_enable();
-
-	unlock_device_hotplug();
-
-	return atomic_read(&data.error);
-}
-
 /**
  * rtas_call_reentrant() - Used for reentrant rtas calls
  * @token:	Token for desired reentrant RTAS call
@@ -1035,12 +975,7 @@ int rtas_call_reentrant(int token, int nargs, int nret, int *outputs, ...)
 	return ret;
 }
 
-#else /* CONFIG_PPC_PSERIES */
-int rtas_ibm_suspend_me_unsafe(u64 handle)
-{
-	return -ENOSYS;
-}
-#endif
+#endif /* CONFIG_PPC_PSERIES */
 
 /**
  * Find a specific pseries error log in an RTAS extended event log.
-- 
2.28.0


  parent reply	other threads:[~2020-12-07 22:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 21:51 [PATCH v2 00/28] partition suspend updates Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 01/28] powerpc/rtas: prevent suspend-related sys_rtas use on LE Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 02/28] powerpc/rtas: complete ibm,suspend-me status codes Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 03/28] powerpc/rtas: rtas_ibm_suspend_me -> rtas_ibm_suspend_me_unsafe Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 04/28] powerpc/rtas: add rtas_ibm_suspend_me() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 05/28] powerpc/rtas: add rtas_activate_firmware() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 06/28] powerpc/hvcall: add token and codes for H_VASI_SIGNAL Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 07/28] powerpc/pseries/mobility: don't error on absence of ibm, update-nodes Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 08/28] powerpc/pseries/mobility: add missing break to default case Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 09/28] powerpc/pseries/mobility: error message improvements Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 10/28] powerpc/pseries/mobility: use rtas_activate_firmware() on resume Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 11/28] powerpc/pseries/mobility: extract VASI session polling logic Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 12/28] powerpc/pseries/mobility: use stop_machine for join/suspend Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 13/28] powerpc/pseries/mobility: signal suspend cancellation to platform Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 14/28] powerpc/pseries/mobility: retry partition suspend after error Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 15/28] powerpc/rtas: dispatch partition migration requests to pseries Nathan Lynch
2020-12-07 21:51 ` Nathan Lynch [this message]
2020-12-07 21:51 ` [PATCH v2 17/28] powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend ops Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 18/28] powerpc/pseries/hibernation: pass stream id via function arguments Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 19/28] powerpc/pseries/hibernation: remove pseries_suspend_cpu() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 20/28] powerpc/machdep: remove suspend_disable_cpu() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 21/28] powerpc/rtas: remove rtas_suspend_cpu() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 22/28] powerpc/pseries/hibernation: switch to rtas_ibm_suspend_me() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 23/28] powerpc/rtas: remove unused rtas_suspend_last_cpu() Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 24/28] powerpc/pseries/hibernation: remove redundant cacheinfo update Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 25/28] powerpc/pseries/hibernation: perform post-suspend fixups later Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 26/28] powerpc/pseries/hibernation: remove prepare_late() callback Nathan Lynch
2020-12-07 21:51 ` [PATCH v2 27/28] powerpc/rtas: remove unused rtas_suspend_me_data Nathan Lynch
2020-12-07 21:52 ` [PATCH v2 28/28] powerpc/pseries/mobility: refactor node lookup during DT update Nathan Lynch
2020-12-15 10:49 ` [PATCH v2 00/28] partition suspend updates Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201207215200.1785968-17-nathanl@linux.ibm.com \
    --to=nathanl@linux.ibm.com \
    --cc=ajd@linux.ibm.com \
    --cc=brking@linux.ibm.com \
    --cc=cforno12@linux.vnet.ibm.com \
    --cc=drt@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mmc@linux.vnet.ibm.com \
    --cc=tyreld@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).