]>
Commit | Line | Data |
---|---|---|
8f69975d BS |
1 | From: Dean Nelson <dcn@sgi.com> |
2 | Subject: [PATCH] Add support for getting the address of a partition's reserved page. | |
3 | References: bnc#442461 | |
4 | ||
5 | Add support for getting the address of a partition's reserved page. | |
6 | ||
7 | Signed-off-by: Dean Nelson <dcn@sgi.com> | |
8 | Acked-by: Bernhard Walle <bwalle@suse.de> | |
9 | ||
10 | --- | |
11 | ||
12 | drivers/misc/sgi-xp/xpc_uv.c | 31 ++++++++++++++++++++++++++++--- | |
13 | 1 file changed, 28 insertions(+), 3 deletions(-) | |
14 | ||
15 | Index: linux/drivers/misc/sgi-xp/xpc_uv.c | |
16 | =================================================================== | |
17 | --- linux.orig/drivers/misc/sgi-xp/xpc_uv.c 2008-10-21 12:50:18.000000000 -0500 | |
18 | +++ linux/drivers/misc/sgi-xp/xpc_uv.c 2008-10-21 14:00:13.000000000 -0500 | |
19 | @@ -642,7 +642,7 @@ xpc_send_local_activate_IRQ_uv(struct xp | |
20 | struct xpc_partition_uv *part_uv = &part->sn.uv; | |
21 | ||
22 | /* | |
23 | - * !!! Make our side think that the remote parition sent an activate | |
24 | + * !!! Make our side think that the remote partition sent an activate | |
25 | * !!! message our way by doing what the activate IRQ handler would | |
26 | * !!! do had one really been sent. | |
27 | */ | |
28 | @@ -660,8 +660,33 @@ static enum xp_retval | |
29 | xpc_get_partition_rsvd_page_pa_uv(void *buf, u64 *cookie, unsigned long *rp_pa, | |
30 | size_t *len) | |
31 | { | |
32 | - /* !!! call the UV version of sn_partition_reserved_page_pa() */ | |
33 | - return xpUnsupported; | |
34 | + s64 status; | |
35 | + enum xp_retval ret; | |
36 | + | |
37 | +#if defined CONFIG_X86_64 | |
38 | + status = uv_bios_reserved_page_pa((u64)buf, cookie, (u64 *)rp_pa, | |
39 | + (u64 *)len); | |
40 | + if (status == BIOS_STATUS_SUCCESS) | |
41 | + ret = xpSuccess; | |
42 | + else if (status == BIOS_STATUS_MORE_PASSES) | |
43 | + ret = xpNeedMoreInfo; | |
44 | + else | |
45 | + ret = xpBiosError; | |
46 | + | |
47 | +#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV | |
48 | + status = sn_partition_reserved_page_pa((u64)buf, cookie, rp_pa, len); | |
49 | + if (status == SALRET_OK) | |
50 | + ret = xpSuccess; | |
51 | + else if (status == SALRET_MORE_PASSES) | |
52 | + ret = xpNeedMoreInfo; | |
53 | + else | |
54 | + ret = xpSalError; | |
55 | + | |
56 | +#else | |
57 | + #error not a supported configuration | |
58 | +#endif | |
59 | + | |
60 | + return ret; | |
61 | } | |
62 | ||
63 | static int |