]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Russ Anderson <rja@sgi.com> |
2 | Subject: sgi-xpc: need to pass the physical address, not virtual. | |
3 | Patch-mainline: c8182f0016fb65a721c4fbe487909a2d56178135 | |
4 | References: bnc#458811 | |
5 | ||
6 | xpc needs to pass the physical address, not virtual. | |
7 | ||
8 | Signed-off-by: Russ Anderson <rja@sgi.com> | |
9 | Acked-by: Dean Nelson <dcn@sgi.com> | |
10 | Acked-by: Raymund Will <rw@suse.de> | |
11 | ||
12 | --- | |
13 | Testing uncovered this problem. The virtual address happens to work | |
14 | most of the time due to the way bios was masking off the node bits. | |
15 | Passing the physical address makes it work all of the time. | |
16 | ||
17 | --- | |
18 | The only difference between the community patch and the sles11 patch is the | |
19 | path to bios.h is different. In the community it is | |
20 | arch/x86/include/asm/uv/bios.h and in sles11 it is include/asm-x86/uv/bios.h. | |
21 | ||
22 | ||
23 | include/asm-x86/uv/bios.h | 2 +- | |
24 | arch/x86/kernel/bios_uv.c | 4 +--- | |
25 | drivers/misc/sgi-xp/xpc_uv.c | 8 ++++---- | |
26 | 3 files changed, 6 insertions(+), 8 deletions(-) | |
27 | ||
28 | Index: linux/drivers/misc/sgi-xp/xpc_uv.c | |
29 | =================================================================== | |
30 | --- linux.orig/drivers/misc/sgi-xp/xpc_uv.c 2008-12-12 10:26:21.000000000 -0800 | |
31 | +++ linux/drivers/misc/sgi-xp/xpc_uv.c 2008-12-12 11:30:46.207944444 -0800 | |
32 | @@ -119,16 +119,16 @@ | |
33 | int ret; | |
34 | ||
35 | #if defined CONFIG_X86_64 | |
36 | - ret = uv_bios_mq_watchlist_alloc(mq->mmr_blade, mq->address, mq->order, | |
37 | - &mq->mmr_offset); | |
38 | + ret = uv_bios_mq_watchlist_alloc(mq->mmr_blade, uv_gpa(mq->address), | |
39 | + mq->order, &mq->mmr_offset); | |
40 | if (ret < 0) { | |
41 | dev_err(xpc_part, "uv_bios_mq_watchlist_alloc() failed, " | |
42 | "ret=%d\n", ret); | |
43 | return ret; | |
44 | } | |
45 | #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV | |
46 | - ret = sn_mq_watchlist_alloc(mq->mmr_blade, mq->address, mq->order, | |
47 | - &mq->mmr_offset); | |
48 | + ret = sn_mq_watchlist_alloc(mq->mmr_blade, uv_gpa(mq->address), | |
49 | + mq->order, &mq->mmr_offset); | |
50 | if (ret < 0) { | |
51 | dev_err(xpc_part, "sn_mq_watchlist_alloc() failed, ret=%d\n", | |
52 | ret); | |
53 | Index: linux/include/asm-x86/uv/bios.h | |
54 | =================================================================== | |
55 | --- linux.orig/include/asm-x86/uv/bios.h 2008-12-12 10:26:21.788299688 -0800 | |
56 | +++ linux/include/asm-x86/uv/bios.h 2008-12-12 11:30:46.219945188 -0800 | |
57 | @@ -100,7 +100,7 @@ | |
58 | ||
59 | extern s64 uv_bios_get_sn_info(int, int *, long *, long *, long *); | |
60 | extern s64 uv_bios_freq_base(u64, u64 *); | |
61 | -extern int uv_bios_mq_watchlist_alloc(int, void *, unsigned int, | |
62 | +extern int uv_bios_mq_watchlist_alloc(int, unsigned long, unsigned int, | |
63 | unsigned long *); | |
64 | extern int uv_bios_mq_watchlist_free(int, int); | |
65 | extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect); | |
66 | Index: linux/arch/x86/kernel/bios_uv.c | |
67 | =================================================================== | |
68 | --- linux.orig/arch/x86/kernel/bios_uv.c 2008-12-12 10:26:21.000000000 -0800 | |
69 | +++ linux/arch/x86/kernel/bios_uv.c 2008-12-12 11:30:46.231945933 -0800 | |
70 | @@ -101,15 +101,13 @@ | |
71 | } | |
72 | ||
73 | int | |
74 | -uv_bios_mq_watchlist_alloc(int blade, void *mq, unsigned int mq_size, | |
75 | +uv_bios_mq_watchlist_alloc(int blade, unsigned long addr, unsigned int mq_size, | |
76 | unsigned long *intr_mmr_offset) | |
77 | { | |
78 | union uv_watchlist_u size_blade; | |
79 | - unsigned long addr; | |
80 | u64 watchlist; | |
81 | s64 ret; | |
82 | ||
83 | - addr = (unsigned long)mq; | |
84 | size_blade.size = mq_size; | |
85 | size_blade.blade = blade; | |
86 |