From: Dean Nelson <dcn@sgi.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] sgi-xp: support getting the address of a partition's reserved page
Date: Tue, 21 Oct 2008 16:25:35 -0500 [thread overview]
Message-ID: <20081021212535.GF14386@sgi.com> (raw)
In-Reply-To: <20081021212054.GB14386@sgi.com>
Add support for getting the address of a partition's reserved page.
Signed-off-by: Dean Nelson <dcn@sgi.com>
---
drivers/misc/sgi-xp/xpc_uv.c | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
Index: linux/drivers/misc/sgi-xp/xpc_uv.c
===================================================================
--- linux.orig/drivers/misc/sgi-xp/xpc_uv.c 2008-10-21 12:50:18.000000000 -0500
+++ linux/drivers/misc/sgi-xp/xpc_uv.c 2008-10-21 14:00:13.000000000 -0500
@@ -642,7 +642,7 @@ xpc_send_local_activate_IRQ_uv(struct xp
struct xpc_partition_uv *part_uv = &part->sn.uv;
/*
- * !!! Make our side think that the remote parition sent an activate
+ * !!! Make our side think that the remote partition sent an activate
* !!! message our way by doing what the activate IRQ handler would
* !!! do had one really been sent.
*/
@@ -660,8 +660,33 @@ static enum xp_retval
xpc_get_partition_rsvd_page_pa_uv(void *buf, u64 *cookie, unsigned long *rp_pa,
size_t *len)
{
- /* !!! call the UV version of sn_partition_reserved_page_pa() */
- return xpUnsupported;
+ s64 status;
+ enum xp_retval ret;
+
+#if defined CONFIG_X86_64
+ status = uv_bios_reserved_page_pa((u64)buf, cookie, (u64 *)rp_pa,
+ (u64 *)len);
+ if (status == BIOS_STATUS_SUCCESS)
+ ret = xpSuccess;
+ else if (status == BIOS_STATUS_MORE_PASSES)
+ ret = xpNeedMoreInfo;
+ else
+ ret = xpBiosError;
+
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+ status = sn_partition_reserved_page_pa((u64)buf, cookie, rp_pa, len);
+ if (status == SALRET_OK)
+ ret = xpSuccess;
+ else if (status == SALRET_MORE_PASSES)
+ ret = xpNeedMoreInfo;
+ else
+ ret = xpSalError;
+
+#else
+ #error not a supported configuration
+#endif
+
+ return ret;
}
static int
next prev parent reply other threads:[~2008-10-21 21:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 21:20 [PATCH 0/4] sgi-xp: add low-level hardware specific functionality Dean Nelson
2008-10-21 21:22 ` [PATCH 1/4] sgi-xp: define xp_expand_memprotect() and xp_restrict_memprotect() Dean Nelson
2008-10-21 21:23 ` [PATCH 2/4] sgi-xp: create activate and notify gru message queues Dean Nelson
2008-10-21 21:24 ` [PATCH 3/4] sgi-xp: define xp_partition_id and xp_region_size Dean Nelson
2008-10-21 21:25 ` Dean Nelson [this message]
2008-10-21 22:45 ` [PATCH 0/4] sgi-xp: add low-level hardware specific functionality Andrew Morton
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=20081021212535.GF14386@sgi.com \
--to=dcn@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.