diff options
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 7 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_sabre.c | 2 | ||||
-rw-r--r-- | include/asm-sparc/elf.h | 41 |
3 files changed, 27 insertions, 23 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index d822c7c18e1f..d3dfb2a36d47 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -131,8 +131,13 @@ static int of_device_resume(struct device * dev) | |||
131 | void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) | 131 | void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) |
132 | { | 132 | { |
133 | unsigned long ret = res->start + offset; | 133 | unsigned long ret = res->start + offset; |
134 | struct resource *r; | ||
134 | 135 | ||
135 | if (!request_region(ret, size, name)) | 136 | if (res->flags & IORESOURCE_MEM) |
137 | r = request_mem_region(ret, size, name); | ||
138 | else | ||
139 | r = request_region(ret, size, name); | ||
140 | if (!r) | ||
136 | ret = 0; | 141 | ret = 0; |
137 | 142 | ||
138 | return (void __iomem *) ret; | 143 | return (void __iomem *) ret; |
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index de7f7850a844..94bb681f2323 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c | |||
@@ -1465,5 +1465,5 @@ void sabre_init(struct device_node *dp, char *model_name) | |||
1465 | /* | 1465 | /* |
1466 | * Look for APB underneath. | 1466 | * Look for APB underneath. |
1467 | */ | 1467 | */ |
1468 | sabre_pbm_init(p, dp, vdma[0], vdma[1]); | 1468 | sabre_pbm_init(p, dp, vdma[0], vdma[0] + vdma[1]); |
1469 | } | 1469 | } |
diff --git a/include/asm-sparc/elf.h b/include/asm-sparc/elf.h index 83a3dd15a6ed..aaf6ef40ee2f 100644 --- a/include/asm-sparc/elf.h +++ b/include/asm-sparc/elf.h | |||
@@ -8,11 +8,6 @@ | |||
8 | 8 | ||
9 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
10 | 10 | ||
11 | #ifdef __KERNEL__ | ||
12 | #include <asm/mbus.h> | ||
13 | #include <asm/uaccess.h> | ||
14 | #endif | ||
15 | |||
16 | /* | 11 | /* |
17 | * Sparc section types | 12 | * Sparc section types |
18 | */ | 13 | */ |
@@ -77,6 +72,23 @@ typedef unsigned long elf_greg_t; | |||
77 | #define ELF_NGREG 38 | 72 | #define ELF_NGREG 38 |
78 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 73 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
79 | 74 | ||
75 | typedef struct { | ||
76 | union { | ||
77 | unsigned long pr_regs[32]; | ||
78 | double pr_dregs[16]; | ||
79 | } pr_fr; | ||
80 | unsigned long __unused; | ||
81 | unsigned long pr_fsr; | ||
82 | unsigned char pr_qcnt; | ||
83 | unsigned char pr_q_entrysize; | ||
84 | unsigned char pr_en; | ||
85 | unsigned int pr_q[64]; | ||
86 | } elf_fpregset_t; | ||
87 | |||
88 | #ifdef __KERNEL__ | ||
89 | #include <asm/mbus.h> | ||
90 | #include <asm/uaccess.h> | ||
91 | |||
80 | /* Format is: | 92 | /* Format is: |
81 | * G0 --> G7 | 93 | * G0 --> G7 |
82 | * O0 --> O7 | 94 | * O0 --> O7 |
@@ -99,20 +111,7 @@ do { unsigned long *dest = &(__elf_regs[0]); \ | |||
99 | dest[34] = src->npc; \ | 111 | dest[34] = src->npc; \ |
100 | dest[35] = src->y; \ | 112 | dest[35] = src->y; \ |
101 | dest[36] = dest[37] = 0; /* XXX */ \ | 113 | dest[36] = dest[37] = 0; /* XXX */ \ |
102 | } while(0); /* Janitors: Don't touch this colon. */ | 114 | } while(0); /* Janitors: Don't touch this semicolon. */ |
103 | |||
104 | typedef struct { | ||
105 | union { | ||
106 | unsigned long pr_regs[32]; | ||
107 | double pr_dregs[16]; | ||
108 | } pr_fr; | ||
109 | unsigned long __unused; | ||
110 | unsigned long pr_fsr; | ||
111 | unsigned char pr_qcnt; | ||
112 | unsigned char pr_q_entrysize; | ||
113 | unsigned char pr_en; | ||
114 | unsigned int pr_q[64]; | ||
115 | } elf_fpregset_t; | ||
116 | 115 | ||
117 | #define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \ | 116 | #define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \ |
118 | ({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread.kregs); 1; }) | 117 | ({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread.kregs); 1; }) |
@@ -165,8 +164,8 @@ typedef struct { | |||
165 | 164 | ||
166 | #define ELF_PLATFORM (NULL) | 165 | #define ELF_PLATFORM (NULL) |
167 | 166 | ||
168 | #ifdef __KERNEL__ | ||
169 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) | 167 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) |
170 | #endif | 168 | |
169 | #endif /* __KERNEL__ */ | ||
171 | 170 | ||
172 | #endif /* !(__ASMSPARC_ELF_H) */ | 171 | #endif /* !(__ASMSPARC_ELF_H) */ |