aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/err_inject.c52
-rw-r--r--arch/ia64/kernel/machine_kexec.c4
-rw-r--r--arch/ia64/kernel/pci-dma.c1
-rw-r--r--arch/ia64/kernel/perfmon.c2
-rw-r--r--arch/ia64/kernel/setup.c19
-rw-r--r--arch/ia64/kernel/topology.c10
6 files changed, 54 insertions, 34 deletions
diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c
index c539c689493b..2d67317a1ec2 100644
--- a/arch/ia64/kernel/err_inject.c
+++ b/arch/ia64/kernel/err_inject.c
@@ -24,7 +24,7 @@
24 * Copyright (C) 2006, Intel Corp. All rights reserved. 24 * Copyright (C) 2006, Intel Corp. All rights reserved.
25 * 25 *
26 */ 26 */
27#include <linux/sysdev.h> 27#include <linux/device.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/mm.h> 29#include <linux/mm.h>
30#include <linux/cpu.h> 30#include <linux/cpu.h>
@@ -35,10 +35,10 @@
35#define ERR_DATA_BUFFER_SIZE 3 // Three 8-byte; 35#define ERR_DATA_BUFFER_SIZE 3 // Three 8-byte;
36 36
37#define define_one_ro(name) \ 37#define define_one_ro(name) \
38static SYSDEV_ATTR(name, 0444, show_##name, NULL) 38static DEVICE_ATTR(name, 0444, show_##name, NULL)
39 39
40#define define_one_rw(name) \ 40#define define_one_rw(name) \
41static SYSDEV_ATTR(name, 0644, show_##name, store_##name) 41static DEVICE_ATTR(name, 0644, show_##name, store_##name)
42 42
43static u64 call_start[NR_CPUS]; 43static u64 call_start[NR_CPUS];
44static u64 phys_addr[NR_CPUS]; 44static u64 phys_addr[NR_CPUS];
@@ -55,7 +55,7 @@ static u64 resources[NR_CPUS];
55 55
56#define show(name) \ 56#define show(name) \
57static ssize_t \ 57static ssize_t \
58show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ 58show_##name(struct device *dev, struct device_attribute *attr, \
59 char *buf) \ 59 char *buf) \
60{ \ 60{ \
61 u32 cpu=dev->id; \ 61 u32 cpu=dev->id; \
@@ -64,7 +64,7 @@ show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \
64 64
65#define store(name) \ 65#define store(name) \
66static ssize_t \ 66static ssize_t \
67store_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ 67store_##name(struct device *dev, struct device_attribute *attr, \
68 const char *buf, size_t size) \ 68 const char *buf, size_t size) \
69{ \ 69{ \
70 unsigned int cpu=dev->id; \ 70 unsigned int cpu=dev->id; \
@@ -78,7 +78,7 @@ show(call_start)
78 * processor. The cpu number in driver is only used for storing data. 78 * processor. The cpu number in driver is only used for storing data.
79 */ 79 */
80static ssize_t 80static ssize_t
81store_call_start(struct sys_device *dev, struct sysdev_attribute *attr, 81store_call_start(struct device *dev, struct device_attribute *attr,
82 const char *buf, size_t size) 82 const char *buf, size_t size)
83{ 83{
84 unsigned int cpu=dev->id; 84 unsigned int cpu=dev->id;
@@ -127,7 +127,7 @@ show(err_type_info)
127store(err_type_info) 127store(err_type_info)
128 128
129static ssize_t 129static ssize_t
130show_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr, 130show_virtual_to_phys(struct device *dev, struct device_attribute *attr,
131 char *buf) 131 char *buf)
132{ 132{
133 unsigned int cpu=dev->id; 133 unsigned int cpu=dev->id;
@@ -135,7 +135,7 @@ show_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr,
135} 135}
136 136
137static ssize_t 137static ssize_t
138store_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr, 138store_virtual_to_phys(struct device *dev, struct device_attribute *attr,
139 const char *buf, size_t size) 139 const char *buf, size_t size)
140{ 140{
141 unsigned int cpu=dev->id; 141 unsigned int cpu=dev->id;
@@ -159,8 +159,8 @@ show(err_struct_info)
159store(err_struct_info) 159store(err_struct_info)
160 160
161static ssize_t 161static ssize_t
162show_err_data_buffer(struct sys_device *dev, 162show_err_data_buffer(struct device *dev,
163 struct sysdev_attribute *attr, char *buf) 163 struct device_attribute *attr, char *buf)
164{ 164{
165 unsigned int cpu=dev->id; 165 unsigned int cpu=dev->id;
166 166
@@ -171,8 +171,8 @@ show_err_data_buffer(struct sys_device *dev,
171} 171}
172 172
173static ssize_t 173static ssize_t
174store_err_data_buffer(struct sys_device *dev, 174store_err_data_buffer(struct device *dev,
175 struct sysdev_attribute *attr, 175 struct device_attribute *attr,
176 const char *buf, size_t size) 176 const char *buf, size_t size)
177{ 177{
178 unsigned int cpu=dev->id; 178 unsigned int cpu=dev->id;
@@ -209,14 +209,14 @@ define_one_ro(capabilities);
209define_one_ro(resources); 209define_one_ro(resources);
210 210
211static struct attribute *default_attrs[] = { 211static struct attribute *default_attrs[] = {
212 &attr_call_start.attr, 212 &dev_attr_call_start.attr,
213 &attr_virtual_to_phys.attr, 213 &dev_attr_virtual_to_phys.attr,
214 &attr_err_type_info.attr, 214 &dev_attr_err_type_info.attr,
215 &attr_err_struct_info.attr, 215 &dev_attr_err_struct_info.attr,
216 &attr_err_data_buffer.attr, 216 &dev_attr_err_data_buffer.attr,
217 &attr_status.attr, 217 &dev_attr_status.attr,
218 &attr_capabilities.attr, 218 &dev_attr_capabilities.attr,
219 &attr_resources.attr, 219 &dev_attr_resources.attr,
220 NULL 220 NULL
221}; 221};
222 222
@@ -225,12 +225,12 @@ static struct attribute_group err_inject_attr_group = {
225 .name = "err_inject" 225 .name = "err_inject"
226}; 226};
227/* Add/Remove err_inject interface for CPU device */ 227/* Add/Remove err_inject interface for CPU device */
228static int __cpuinit err_inject_add_dev(struct sys_device * sys_dev) 228static int __cpuinit err_inject_add_dev(struct device * sys_dev)
229{ 229{
230 return sysfs_create_group(&sys_dev->kobj, &err_inject_attr_group); 230 return sysfs_create_group(&sys_dev->kobj, &err_inject_attr_group);
231} 231}
232 232
233static int __cpuinit err_inject_remove_dev(struct sys_device * sys_dev) 233static int __cpuinit err_inject_remove_dev(struct device * sys_dev)
234{ 234{
235 sysfs_remove_group(&sys_dev->kobj, &err_inject_attr_group); 235 sysfs_remove_group(&sys_dev->kobj, &err_inject_attr_group);
236 return 0; 236 return 0;
@@ -239,9 +239,9 @@ static int __cpuinit err_inject_cpu_callback(struct notifier_block *nfb,
239 unsigned long action, void *hcpu) 239 unsigned long action, void *hcpu)
240{ 240{
241 unsigned int cpu = (unsigned long)hcpu; 241 unsigned int cpu = (unsigned long)hcpu;
242 struct sys_device *sys_dev; 242 struct device *sys_dev;
243 243
244 sys_dev = get_cpu_sysdev(cpu); 244 sys_dev = get_cpu_device(cpu);
245 switch (action) { 245 switch (action) {
246 case CPU_ONLINE: 246 case CPU_ONLINE:
247 case CPU_ONLINE_FROZEN: 247 case CPU_ONLINE_FROZEN:
@@ -283,13 +283,13 @@ static void __exit
283err_inject_exit(void) 283err_inject_exit(void)
284{ 284{
285 int i; 285 int i;
286 struct sys_device *sys_dev; 286 struct device *sys_dev;
287 287
288#ifdef ERR_INJ_DEBUG 288#ifdef ERR_INJ_DEBUG
289 printk(KERN_INFO "Exit error injection driver.\n"); 289 printk(KERN_INFO "Exit error injection driver.\n");
290#endif 290#endif
291 for_each_online_cpu(i) { 291 for_each_online_cpu(i) {
292 sys_dev = get_cpu_sysdev(i); 292 sys_dev = get_cpu_device(i);
293 sysfs_remove_group(&sys_dev->kobj, &err_inject_attr_group); 293 sysfs_remove_group(&sys_dev->kobj, &err_inject_attr_group);
294 } 294 }
295 unregister_hotcpu_notifier(&err_inject_cpu_notifier); 295 unregister_hotcpu_notifier(&err_inject_cpu_notifier);
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
index 3d3aeef46947..4eed35814994 100644
--- a/arch/ia64/kernel/machine_kexec.c
+++ b/arch/ia64/kernel/machine_kexec.c
@@ -27,11 +27,11 @@
27#include <asm/sal.h> 27#include <asm/sal.h>
28#include <asm/mca.h> 28#include <asm/mca.h>
29 29
30typedef NORET_TYPE void (*relocate_new_kernel_t)( 30typedef void (*relocate_new_kernel_t)(
31 unsigned long indirection_page, 31 unsigned long indirection_page,
32 unsigned long start_address, 32 unsigned long start_address,
33 struct ia64_boot_param *boot_param, 33 struct ia64_boot_param *boot_param,
34 unsigned long pal_addr) ATTRIB_NORET; 34 unsigned long pal_addr) __noreturn;
35 35
36struct kimage *ia64_kimage; 36struct kimage *ia64_kimage;
37 37
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index c16162c70860..eb1175720050 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -33,6 +33,7 @@ int force_iommu __read_mostly;
33#endif 33#endif
34 34
35int iommu_pass_through; 35int iommu_pass_through;
36int iommu_group_mf;
36 37
37/* Dummy device used for NULL arguments (normally ISA). Better would 38/* Dummy device used for NULL arguments (normally ISA). Better would
38 be probably a smaller DMA mask, but this is bug-to-bug compatible 39 be probably a smaller DMA mask, but this is bug-to-bug compatible
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 89accc626b86..b2c65e034f5d 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2228,7 +2228,7 @@ pfm_alloc_file(pfm_context_t *ctx)
2228 /* 2228 /*
2229 * allocate a new dcache entry 2229 * allocate a new dcache entry
2230 */ 2230 */
2231 path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); 2231 path.dentry = d_alloc(pfmfs_mnt->mnt_root, &this);
2232 if (!path.dentry) { 2232 if (!path.dentry) {
2233 iput(inode); 2233 iput(inode);
2234 return ERR_PTR(-ENOMEM); 2234 return ERR_PTR(-ENOMEM);
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 5e2c72498c51..cd57d7312de0 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -220,6 +220,23 @@ sort_regions (struct rsvd_region *rsvd_region, int max)
220 } 220 }
221} 221}
222 222
223/* merge overlaps */
224static int __init
225merge_regions (struct rsvd_region *rsvd_region, int max)
226{
227 int i;
228 for (i = 1; i < max; ++i) {
229 if (rsvd_region[i].start >= rsvd_region[i-1].end)
230 continue;
231 if (rsvd_region[i].end > rsvd_region[i-1].end)
232 rsvd_region[i-1].end = rsvd_region[i].end;
233 --max;
234 memmove(&rsvd_region[i], &rsvd_region[i+1],
235 (max - i) * sizeof(struct rsvd_region));
236 }
237 return max;
238}
239
223/* 240/*
224 * Request address space for all standard resources 241 * Request address space for all standard resources
225 */ 242 */
@@ -270,6 +287,7 @@ static void __init setup_crashkernel(unsigned long total, int *n)
270 if (ret == 0 && size > 0) { 287 if (ret == 0 && size > 0) {
271 if (!base) { 288 if (!base) {
272 sort_regions(rsvd_region, *n); 289 sort_regions(rsvd_region, *n);
290 *n = merge_regions(rsvd_region, *n);
273 base = kdump_find_rsvd_region(size, 291 base = kdump_find_rsvd_region(size,
274 rsvd_region, *n); 292 rsvd_region, *n);
275 } 293 }
@@ -373,6 +391,7 @@ reserve_memory (void)
373 BUG_ON(IA64_MAX_RSVD_REGIONS + 1 < n); 391 BUG_ON(IA64_MAX_RSVD_REGIONS + 1 < n);
374 392
375 sort_regions(rsvd_region, num_rsvd_regions); 393 sort_regions(rsvd_region, num_rsvd_regions);
394 num_rsvd_regions = merge_regions(rsvd_region, num_rsvd_regions);
376} 395}
377 396
378 397
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index 9be1f11a01d9..9deb21dbf629 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -350,7 +350,7 @@ static int __cpuinit cpu_cache_sysfs_init(unsigned int cpu)
350} 350}
351 351
352/* Add cache interface for CPU device */ 352/* Add cache interface for CPU device */
353static int __cpuinit cache_add_dev(struct sys_device * sys_dev) 353static int __cpuinit cache_add_dev(struct device * sys_dev)
354{ 354{
355 unsigned int cpu = sys_dev->id; 355 unsigned int cpu = sys_dev->id;
356 unsigned long i, j; 356 unsigned long i, j;
@@ -400,7 +400,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
400} 400}
401 401
402/* Remove cache interface for CPU device */ 402/* Remove cache interface for CPU device */
403static int __cpuinit cache_remove_dev(struct sys_device * sys_dev) 403static int __cpuinit cache_remove_dev(struct device * sys_dev)
404{ 404{
405 unsigned int cpu = sys_dev->id; 405 unsigned int cpu = sys_dev->id;
406 unsigned long i; 406 unsigned long i;
@@ -428,9 +428,9 @@ static int __cpuinit cache_cpu_callback(struct notifier_block *nfb,
428 unsigned long action, void *hcpu) 428 unsigned long action, void *hcpu)
429{ 429{
430 unsigned int cpu = (unsigned long)hcpu; 430 unsigned int cpu = (unsigned long)hcpu;
431 struct sys_device *sys_dev; 431 struct device *sys_dev;
432 432
433 sys_dev = get_cpu_sysdev(cpu); 433 sys_dev = get_cpu_device(cpu);
434 switch (action) { 434 switch (action) {
435 case CPU_ONLINE: 435 case CPU_ONLINE:
436 case CPU_ONLINE_FROZEN: 436 case CPU_ONLINE_FROZEN:
@@ -454,7 +454,7 @@ static int __init cache_sysfs_init(void)
454 int i; 454 int i;
455 455
456 for_each_online_cpu(i) { 456 for_each_online_cpu(i) {
457 struct sys_device *sys_dev = get_cpu_sysdev((unsigned int)i); 457 struct device *sys_dev = get_cpu_device((unsigned int)i);
458 cache_add_dev(sys_dev); 458 cache_add_dev(sys_dev);
459 } 459 }
460 460