diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/Kconfig | 6 | ||||
-rw-r--r-- | arch/ia64/include/asm/cputime.h | 71 | ||||
-rw-r--r-- | arch/ia64/include/asm/iommu.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/ipcbuf.h | 29 | ||||
-rw-r--r-- | arch/ia64/include/asm/socket.h | 3 | ||||
-rw-r--r-- | arch/ia64/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/types.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/xen/interface.h | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/err_inject.c | 52 | ||||
-rw-r--r-- | arch/ia64/kernel/pci-dma.c | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/setup.c | 19 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 10 | ||||
-rw-r--r-- | arch/ia64/kvm/kvm-ia64.c | 12 | ||||
-rw-r--r-- | arch/ia64/mm/contig.c | 3 | ||||
-rw-r--r-- | arch/ia64/mm/init.c | 4 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/irq.c | 5 | ||||
-rw-r--r-- | arch/ia64/sn/pci/pcibr/pcibr_provider.c | 3 | ||||
-rw-r--r-- | arch/ia64/sn/pci/tioca_provider.c | 4 |
19 files changed, 110 insertions, 122 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 2732e1b0aa3d..bd7266903bf8 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -23,6 +23,9 @@ config IA64 | |||
23 | select HAVE_ARCH_TRACEHOOK | 23 | select HAVE_ARCH_TRACEHOOK |
24 | select HAVE_DMA_API_DEBUG | 24 | select HAVE_DMA_API_DEBUG |
25 | select HAVE_GENERIC_HARDIRQS | 25 | select HAVE_GENERIC_HARDIRQS |
26 | select HAVE_MEMBLOCK | ||
27 | select HAVE_MEMBLOCK_NODE_MAP | ||
28 | select ARCH_DISCARD_MEMBLOCK | ||
26 | select GENERIC_IRQ_PROBE | 29 | select GENERIC_IRQ_PROBE |
27 | select GENERIC_PENDING_IRQ if SMP | 30 | select GENERIC_PENDING_IRQ if SMP |
28 | select IRQ_PER_CPU | 31 | select IRQ_PER_CPU |
@@ -471,9 +474,6 @@ config NODES_SHIFT | |||
471 | MAX_NUMNODES will be 2^(This value). | 474 | MAX_NUMNODES will be 2^(This value). |
472 | If in doubt, use the default. | 475 | If in doubt, use the default. |
473 | 476 | ||
474 | config ARCH_POPULATES_NODE_MAP | ||
475 | def_bool y | ||
476 | |||
477 | # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. | 477 | # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. |
478 | # VIRTUAL_MEM_MAP has been retained for historical reasons. | 478 | # VIRTUAL_MEM_MAP has been retained for historical reasons. |
479 | config VIRTUAL_MEM_MAP | 479 | config VIRTUAL_MEM_MAP |
diff --git a/arch/ia64/include/asm/cputime.h b/arch/ia64/include/asm/cputime.h index 6073b187528a..3deac956d325 100644 --- a/arch/ia64/include/asm/cputime.h +++ b/arch/ia64/include/asm/cputime.h | |||
@@ -26,59 +26,53 @@ | |||
26 | #include <linux/jiffies.h> | 26 | #include <linux/jiffies.h> |
27 | #include <asm/processor.h> | 27 | #include <asm/processor.h> |
28 | 28 | ||
29 | typedef u64 cputime_t; | 29 | typedef u64 __nocast cputime_t; |
30 | typedef u64 cputime64_t; | 30 | typedef u64 __nocast cputime64_t; |
31 | 31 | ||
32 | #define cputime_zero ((cputime_t)0) | ||
33 | #define cputime_one_jiffy jiffies_to_cputime(1) | 32 | #define cputime_one_jiffy jiffies_to_cputime(1) |
34 | #define cputime_max ((~((cputime_t)0) >> 1) - 1) | ||
35 | #define cputime_add(__a, __b) ((__a) + (__b)) | ||
36 | #define cputime_sub(__a, __b) ((__a) - (__b)) | ||
37 | #define cputime_div(__a, __n) ((__a) / (__n)) | ||
38 | #define cputime_halve(__a) ((__a) >> 1) | ||
39 | #define cputime_eq(__a, __b) ((__a) == (__b)) | ||
40 | #define cputime_gt(__a, __b) ((__a) > (__b)) | ||
41 | #define cputime_ge(__a, __b) ((__a) >= (__b)) | ||
42 | #define cputime_lt(__a, __b) ((__a) < (__b)) | ||
43 | #define cputime_le(__a, __b) ((__a) <= (__b)) | ||
44 | |||
45 | #define cputime64_zero ((cputime64_t)0) | ||
46 | #define cputime64_add(__a, __b) ((__a) + (__b)) | ||
47 | #define cputime64_sub(__a, __b) ((__a) - (__b)) | ||
48 | #define cputime_to_cputime64(__ct) (__ct) | ||
49 | 33 | ||
50 | /* | 34 | /* |
51 | * Convert cputime <-> jiffies (HZ) | 35 | * Convert cputime <-> jiffies (HZ) |
52 | */ | 36 | */ |
53 | #define cputime_to_jiffies(__ct) ((__ct) / (NSEC_PER_SEC / HZ)) | 37 | #define cputime_to_jiffies(__ct) \ |
54 | #define jiffies_to_cputime(__jif) ((__jif) * (NSEC_PER_SEC / HZ)) | 38 | ((__force u64)(__ct) / (NSEC_PER_SEC / HZ)) |
55 | #define cputime64_to_jiffies64(__ct) ((__ct) / (NSEC_PER_SEC / HZ)) | 39 | #define jiffies_to_cputime(__jif) \ |
56 | #define jiffies64_to_cputime64(__jif) ((__jif) * (NSEC_PER_SEC / HZ)) | 40 | (__force cputime_t)((__jif) * (NSEC_PER_SEC / HZ)) |
41 | #define cputime64_to_jiffies64(__ct) \ | ||
42 | ((__force u64)(__ct) / (NSEC_PER_SEC / HZ)) | ||
43 | #define jiffies64_to_cputime64(__jif) \ | ||
44 | (__force cputime64_t)((__jif) * (NSEC_PER_SEC / HZ)) | ||
57 | 45 | ||
58 | /* | 46 | /* |
59 | * Convert cputime <-> microseconds | 47 | * Convert cputime <-> microseconds |
60 | */ | 48 | */ |
61 | #define cputime_to_usecs(__ct) ((__ct) / NSEC_PER_USEC) | 49 | #define cputime_to_usecs(__ct) \ |
62 | #define usecs_to_cputime(__usecs) ((__usecs) * NSEC_PER_USEC) | 50 | ((__force u64)(__ct) / NSEC_PER_USEC) |
51 | #define usecs_to_cputime(__usecs) \ | ||
52 | (__force cputime_t)((__usecs) * NSEC_PER_USEC) | ||
53 | #define usecs_to_cputime64(__usecs) \ | ||
54 | (__force cputime64_t)((__usecs) * NSEC_PER_USEC) | ||
63 | 55 | ||
64 | /* | 56 | /* |
65 | * Convert cputime <-> seconds | 57 | * Convert cputime <-> seconds |
66 | */ | 58 | */ |
67 | #define cputime_to_secs(__ct) ((__ct) / NSEC_PER_SEC) | 59 | #define cputime_to_secs(__ct) \ |
68 | #define secs_to_cputime(__secs) ((__secs) * NSEC_PER_SEC) | 60 | ((__force u64)(__ct) / NSEC_PER_SEC) |
61 | #define secs_to_cputime(__secs) \ | ||
62 | (__force cputime_t)((__secs) * NSEC_PER_SEC) | ||
69 | 63 | ||
70 | /* | 64 | /* |
71 | * Convert cputime <-> timespec (nsec) | 65 | * Convert cputime <-> timespec (nsec) |
72 | */ | 66 | */ |
73 | static inline cputime_t timespec_to_cputime(const struct timespec *val) | 67 | static inline cputime_t timespec_to_cputime(const struct timespec *val) |
74 | { | 68 | { |
75 | cputime_t ret = val->tv_sec * NSEC_PER_SEC; | 69 | u64 ret = val->tv_sec * NSEC_PER_SEC + val->tv_nsec; |
76 | return (ret + val->tv_nsec); | 70 | return (__force cputime_t) ret; |
77 | } | 71 | } |
78 | static inline void cputime_to_timespec(const cputime_t ct, struct timespec *val) | 72 | static inline void cputime_to_timespec(const cputime_t ct, struct timespec *val) |
79 | { | 73 | { |
80 | val->tv_sec = ct / NSEC_PER_SEC; | 74 | val->tv_sec = (__force u64) ct / NSEC_PER_SEC; |
81 | val->tv_nsec = ct % NSEC_PER_SEC; | 75 | val->tv_nsec = (__force u64) ct % NSEC_PER_SEC; |
82 | } | 76 | } |
83 | 77 | ||
84 | /* | 78 | /* |
@@ -86,25 +80,28 @@ static inline void cputime_to_timespec(const cputime_t ct, struct timespec *val) | |||
86 | */ | 80 | */ |
87 | static inline cputime_t timeval_to_cputime(struct timeval *val) | 81 | static inline cputime_t timeval_to_cputime(struct timeval *val) |
88 | { | 82 | { |
89 | cputime_t ret = val->tv_sec * NSEC_PER_SEC; | 83 | u64 ret = val->tv_sec * NSEC_PER_SEC + val->tv_usec * NSEC_PER_USEC; |
90 | return (ret + val->tv_usec * NSEC_PER_USEC); | 84 | return (__force cputime_t) ret; |
91 | } | 85 | } |
92 | static inline void cputime_to_timeval(const cputime_t ct, struct timeval *val) | 86 | static inline void cputime_to_timeval(const cputime_t ct, struct timeval *val) |
93 | { | 87 | { |
94 | val->tv_sec = ct / NSEC_PER_SEC; | 88 | val->tv_sec = (__force u64) ct / NSEC_PER_SEC; |
95 | val->tv_usec = (ct % NSEC_PER_SEC) / NSEC_PER_USEC; | 89 | val->tv_usec = ((__force u64) ct % NSEC_PER_SEC) / NSEC_PER_USEC; |
96 | } | 90 | } |
97 | 91 | ||
98 | /* | 92 | /* |
99 | * Convert cputime <-> clock (USER_HZ) | 93 | * Convert cputime <-> clock (USER_HZ) |
100 | */ | 94 | */ |
101 | #define cputime_to_clock_t(__ct) ((__ct) / (NSEC_PER_SEC / USER_HZ)) | 95 | #define cputime_to_clock_t(__ct) \ |
102 | #define clock_t_to_cputime(__x) ((__x) * (NSEC_PER_SEC / USER_HZ)) | 96 | ((__force u64)(__ct) / (NSEC_PER_SEC / USER_HZ)) |
97 | #define clock_t_to_cputime(__x) \ | ||
98 | (__force cputime_t)((__x) * (NSEC_PER_SEC / USER_HZ)) | ||
103 | 99 | ||
104 | /* | 100 | /* |
105 | * Convert cputime64 to clock. | 101 | * Convert cputime64 to clock. |
106 | */ | 102 | */ |
107 | #define cputime64_to_clock_t(__ct) cputime_to_clock_t((cputime_t)__ct) | 103 | #define cputime64_to_clock_t(__ct) \ |
104 | cputime_to_clock_t((__force cputime_t)__ct) | ||
108 | 105 | ||
109 | #endif /* CONFIG_VIRT_CPU_ACCOUNTING */ | 106 | #endif /* CONFIG_VIRT_CPU_ACCOUNTING */ |
110 | #endif /* __IA64_CPUTIME_H */ | 107 | #endif /* __IA64_CPUTIME_H */ |
diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h index 105c93b00b1b..b6a809fa2995 100644 --- a/arch/ia64/include/asm/iommu.h +++ b/arch/ia64/include/asm/iommu.h | |||
@@ -11,10 +11,12 @@ extern void no_iommu_init(void); | |||
11 | extern int force_iommu, no_iommu; | 11 | extern int force_iommu, no_iommu; |
12 | extern int iommu_pass_through; | 12 | extern int iommu_pass_through; |
13 | extern int iommu_detected; | 13 | extern int iommu_detected; |
14 | extern int iommu_group_mf; | ||
14 | #else | 15 | #else |
15 | #define iommu_pass_through (0) | 16 | #define iommu_pass_through (0) |
16 | #define no_iommu (1) | 17 | #define no_iommu (1) |
17 | #define iommu_detected (0) | 18 | #define iommu_detected (0) |
19 | #define iommu_group_mf (0) | ||
18 | #endif | 20 | #endif |
19 | extern void iommu_dma_init(void); | 21 | extern void iommu_dma_init(void); |
20 | extern void machvec_init(const char *name); | 22 | extern void machvec_init(const char *name); |
diff --git a/arch/ia64/include/asm/ipcbuf.h b/arch/ia64/include/asm/ipcbuf.h index 079899ae7d32..84c7e51cb6d0 100644 --- a/arch/ia64/include/asm/ipcbuf.h +++ b/arch/ia64/include/asm/ipcbuf.h | |||
@@ -1,28 +1 @@ | |||
1 | #ifndef _ASM_IA64_IPCBUF_H | #include <asm-generic/ipcbuf.h> | |
2 | #define _ASM_IA64_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The ipc64_perm structure for IA-64 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit seq | ||
11 | * - 2 miscellaneous 64-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid_t uid; | ||
18 | __kernel_gid_t gid; | ||
19 | __kernel_uid_t cuid; | ||
20 | __kernel_gid_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short seq; | ||
23 | unsigned short __pad1; | ||
24 | unsigned long __unused1; | ||
25 | unsigned long __unused2; | ||
26 | }; | ||
27 | |||
28 | #endif /* _ASM_IA64_IPCBUF_H */ | ||
diff --git a/arch/ia64/include/asm/socket.h b/arch/ia64/include/asm/socket.h index 51427eaa51ba..4b03664e3fb5 100644 --- a/arch/ia64/include/asm/socket.h +++ b/arch/ia64/include/asm/socket.h | |||
@@ -71,4 +71,7 @@ | |||
71 | 71 | ||
72 | #define SO_RXQ_OVFL 40 | 72 | #define SO_RXQ_OVFL 40 |
73 | 73 | ||
74 | #define SO_WIFI_STATUS 41 | ||
75 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
76 | |||
74 | #endif /* _ASM_IA64_SOCKET_H */ | 77 | #endif /* _ASM_IA64_SOCKET_H */ |
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index ff0cc84e7bcc..e054bcc4273c 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -113,7 +113,6 @@ struct thread_info { | |||
113 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ | 113 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
114 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ | 114 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ |
115 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ | 115 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ |
116 | #define TIF_FREEZE 20 /* is freezing for suspend */ | ||
117 | #define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */ | 116 | #define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */ |
118 | 117 | ||
119 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 118 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
@@ -126,7 +125,6 @@ struct thread_info { | |||
126 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 125 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
127 | #define _TIF_MCA_INIT (1 << TIF_MCA_INIT) | 126 | #define _TIF_MCA_INIT (1 << TIF_MCA_INIT) |
128 | #define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) | 127 | #define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) |
129 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
130 | #define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE) | 128 | #define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE) |
131 | 129 | ||
132 | /* "work to do on user-return" bits */ | 130 | /* "work to do on user-return" bits */ |
diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h index 82b3939d2718..3f5b122d9975 100644 --- a/arch/ia64/include/asm/types.h +++ b/arch/ia64/include/asm/types.h | |||
@@ -28,8 +28,6 @@ | |||
28 | # define __IA64_UL(x) ((unsigned long)(x)) | 28 | # define __IA64_UL(x) ((unsigned long)(x)) |
29 | # define __IA64_UL_CONST(x) x##UL | 29 | # define __IA64_UL_CONST(x) x##UL |
30 | 30 | ||
31 | typedef unsigned int umode_t; | ||
32 | |||
33 | /* | 31 | /* |
34 | * These aren't exported outside the kernel to avoid name space clashes | 32 | * These aren't exported outside the kernel to avoid name space clashes |
35 | */ | 33 | */ |
diff --git a/arch/ia64/include/asm/xen/interface.h b/arch/ia64/include/asm/xen/interface.h index 1d2427d116e3..fbb519828aa1 100644 --- a/arch/ia64/include/asm/xen/interface.h +++ b/arch/ia64/include/asm/xen/interface.h | |||
@@ -71,7 +71,7 @@ | |||
71 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | 71 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); |
72 | __DEFINE_GUEST_HANDLE(uint, unsigned int); | 72 | __DEFINE_GUEST_HANDLE(uint, unsigned int); |
73 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); | 73 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); |
74 | __DEFINE_GUEST_HANDLE(u64, unsigned long); | 74 | |
75 | DEFINE_GUEST_HANDLE(char); | 75 | DEFINE_GUEST_HANDLE(char); |
76 | DEFINE_GUEST_HANDLE(int); | 76 | DEFINE_GUEST_HANDLE(int); |
77 | DEFINE_GUEST_HANDLE(long); | 77 | DEFINE_GUEST_HANDLE(long); |
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) \ |
38 | static SYSDEV_ATTR(name, 0444, show_##name, NULL) | 38 | static DEVICE_ATTR(name, 0444, show_##name, NULL) |
39 | 39 | ||
40 | #define define_one_rw(name) \ | 40 | #define define_one_rw(name) \ |
41 | static SYSDEV_ATTR(name, 0644, show_##name, store_##name) | 41 | static DEVICE_ATTR(name, 0644, show_##name, store_##name) |
42 | 42 | ||
43 | static u64 call_start[NR_CPUS]; | 43 | static u64 call_start[NR_CPUS]; |
44 | static u64 phys_addr[NR_CPUS]; | 44 | static u64 phys_addr[NR_CPUS]; |
@@ -55,7 +55,7 @@ static u64 resources[NR_CPUS]; | |||
55 | 55 | ||
56 | #define show(name) \ | 56 | #define show(name) \ |
57 | static ssize_t \ | 57 | static ssize_t \ |
58 | show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ | 58 | show_##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) \ |
66 | static ssize_t \ | 66 | static ssize_t \ |
67 | store_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ | 67 | store_##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 | */ |
80 | static ssize_t | 80 | static ssize_t |
81 | store_call_start(struct sys_device *dev, struct sysdev_attribute *attr, | 81 | store_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) | |||
127 | store(err_type_info) | 127 | store(err_type_info) |
128 | 128 | ||
129 | static ssize_t | 129 | static ssize_t |
130 | show_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr, | 130 | show_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 | ||
137 | static ssize_t | 137 | static ssize_t |
138 | store_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr, | 138 | store_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) | |||
159 | store(err_struct_info) | 159 | store(err_struct_info) |
160 | 160 | ||
161 | static ssize_t | 161 | static ssize_t |
162 | show_err_data_buffer(struct sys_device *dev, | 162 | show_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 | ||
173 | static ssize_t | 173 | static ssize_t |
174 | store_err_data_buffer(struct sys_device *dev, | 174 | store_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); | |||
209 | define_one_ro(resources); | 209 | define_one_ro(resources); |
210 | 210 | ||
211 | static struct attribute *default_attrs[] = { | 211 | static 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 */ |
228 | static int __cpuinit err_inject_add_dev(struct sys_device * sys_dev) | 228 | static 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 | ||
233 | static int __cpuinit err_inject_remove_dev(struct sys_device * sys_dev) | 233 | static 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 | |||
283 | err_inject_exit(void) | 283 | err_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/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 | ||
35 | int iommu_pass_through; | 35 | int iommu_pass_through; |
36 | int 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 */ | ||
224 | static int __init | ||
225 | merge_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 */ |
353 | static int __cpuinit cache_add_dev(struct sys_device * sys_dev) | 353 | static 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 */ |
403 | static int __cpuinit cache_remove_dev(struct sys_device * sys_dev) | 403 | static 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 | ||
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 43f4c92816ef..405052002493 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -774,13 +774,13 @@ struct kvm *kvm_arch_alloc_vm(void) | |||
774 | return kvm; | 774 | return kvm; |
775 | } | 775 | } |
776 | 776 | ||
777 | struct kvm_io_range { | 777 | struct kvm_ia64_io_range { |
778 | unsigned long start; | 778 | unsigned long start; |
779 | unsigned long size; | 779 | unsigned long size; |
780 | unsigned long type; | 780 | unsigned long type; |
781 | }; | 781 | }; |
782 | 782 | ||
783 | static const struct kvm_io_range io_ranges[] = { | 783 | static const struct kvm_ia64_io_range io_ranges[] = { |
784 | {VGA_IO_START, VGA_IO_SIZE, GPFN_FRAME_BUFFER}, | 784 | {VGA_IO_START, VGA_IO_SIZE, GPFN_FRAME_BUFFER}, |
785 | {MMIO_START, MMIO_SIZE, GPFN_LOW_MMIO}, | 785 | {MMIO_START, MMIO_SIZE, GPFN_LOW_MMIO}, |
786 | {LEGACY_IO_START, LEGACY_IO_SIZE, GPFN_LEGACY_IO}, | 786 | {LEGACY_IO_START, LEGACY_IO_SIZE, GPFN_LEGACY_IO}, |
@@ -1366,14 +1366,12 @@ static void kvm_release_vm_pages(struct kvm *kvm) | |||
1366 | { | 1366 | { |
1367 | struct kvm_memslots *slots; | 1367 | struct kvm_memslots *slots; |
1368 | struct kvm_memory_slot *memslot; | 1368 | struct kvm_memory_slot *memslot; |
1369 | int i, j; | 1369 | int j; |
1370 | unsigned long base_gfn; | 1370 | unsigned long base_gfn; |
1371 | 1371 | ||
1372 | slots = kvm_memslots(kvm); | 1372 | slots = kvm_memslots(kvm); |
1373 | for (i = 0; i < slots->nmemslots; i++) { | 1373 | kvm_for_each_memslot(memslot, slots) { |
1374 | memslot = &slots->memslots[i]; | ||
1375 | base_gfn = memslot->base_gfn; | 1374 | base_gfn = memslot->base_gfn; |
1376 | |||
1377 | for (j = 0; j < memslot->npages; j++) { | 1375 | for (j = 0; j < memslot->npages; j++) { |
1378 | if (memslot->rmap[j]) | 1376 | if (memslot->rmap[j]) |
1379 | put_page((struct page *)memslot->rmap[j]); | 1377 | put_page((struct page *)memslot->rmap[j]); |
@@ -1820,7 +1818,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
1820 | if (log->slot >= KVM_MEMORY_SLOTS) | 1818 | if (log->slot >= KVM_MEMORY_SLOTS) |
1821 | goto out; | 1819 | goto out; |
1822 | 1820 | ||
1823 | memslot = &kvm->memslots->memslots[log->slot]; | 1821 | memslot = id_to_memslot(kvm->memslots, log->slot); |
1824 | r = -ENOENT; | 1822 | r = -ENOENT; |
1825 | if (!memslot->dirty_bitmap) | 1823 | if (!memslot->dirty_bitmap) |
1826 | goto out; | 1824 | goto out; |
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index f114a3b14c6a..1516d1dc11fd 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | #include <linux/bootmem.h> | 17 | #include <linux/bootmem.h> |
18 | #include <linux/efi.h> | 18 | #include <linux/efi.h> |
19 | #include <linux/memblock.h> | ||
19 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
20 | #include <linux/nmi.h> | 21 | #include <linux/nmi.h> |
21 | #include <linux/swap.h> | 22 | #include <linux/swap.h> |
@@ -348,7 +349,7 @@ paging_init (void) | |||
348 | printk("Virtual mem_map starts at 0x%p\n", mem_map); | 349 | printk("Virtual mem_map starts at 0x%p\n", mem_map); |
349 | } | 350 | } |
350 | #else /* !CONFIG_VIRTUAL_MEM_MAP */ | 351 | #else /* !CONFIG_VIRTUAL_MEM_MAP */ |
351 | add_active_range(0, 0, max_low_pfn); | 352 | memblock_add_node(0, PFN_PHYS(max_low_pfn), 0); |
352 | free_area_init_nodes(max_zone_pfns); | 353 | free_area_init_nodes(max_zone_pfns); |
353 | #endif /* !CONFIG_VIRTUAL_MEM_MAP */ | 354 | #endif /* !CONFIG_VIRTUAL_MEM_MAP */ |
354 | zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page)); | 355 | zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page)); |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 00cb0e26c64e..13df239dbed1 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/bootmem.h> | 10 | #include <linux/bootmem.h> |
11 | #include <linux/efi.h> | 11 | #include <linux/efi.h> |
12 | #include <linux/elf.h> | 12 | #include <linux/elf.h> |
13 | #include <linux/memblock.h> | ||
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
14 | #include <linux/mmzone.h> | 15 | #include <linux/mmzone.h> |
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
@@ -557,8 +558,7 @@ int __init register_active_ranges(u64 start, u64 len, int nid) | |||
557 | #endif | 558 | #endif |
558 | 559 | ||
559 | if (start < end) | 560 | if (start < end) |
560 | add_active_range(nid, __pa(start) >> PAGE_SHIFT, | 561 | memblock_add_node(__pa(start), end - start, nid); |
561 | __pa(end) >> PAGE_SHIFT); | ||
562 | return 0; | 562 | return 0; |
563 | } | 563 | } |
564 | 564 | ||
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 485c42d97e83..dfac09ab027a 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -150,12 +150,11 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info, | |||
150 | * PROM does not support SAL_INTR_REDIRECT, or it failed. | 150 | * PROM does not support SAL_INTR_REDIRECT, or it failed. |
151 | * Revert to old method. | 151 | * Revert to old method. |
152 | */ | 152 | */ |
153 | new_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_ATOMIC); | 153 | new_irq_info = kmemdup(sn_irq_info, sizeof(struct sn_irq_info), |
154 | GFP_ATOMIC); | ||
154 | if (new_irq_info == NULL) | 155 | if (new_irq_info == NULL) |
155 | return NULL; | 156 | return NULL; |
156 | 157 | ||
157 | memcpy(new_irq_info, sn_irq_info, sizeof(struct sn_irq_info)); | ||
158 | |||
159 | /* Free the old PROM new_irq_info structure */ | 158 | /* Free the old PROM new_irq_info structure */ |
160 | sn_intr_free(local_nasid, local_widget, new_irq_info); | 159 | sn_intr_free(local_nasid, local_widget, new_irq_info); |
161 | unregister_intr_pda(new_irq_info); | 160 | unregister_intr_pda(new_irq_info); |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index 5698f29d5add..8886a0bc4a11 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -127,12 +127,11 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
127 | * Allocate kernel bus soft and copy from prom. | 127 | * Allocate kernel bus soft and copy from prom. |
128 | */ | 128 | */ |
129 | 129 | ||
130 | soft = kmalloc(sizeof(struct pcibus_info), GFP_KERNEL); | 130 | soft = kmemdup(prom_bussoft, sizeof(struct pcibus_info), GFP_KERNEL); |
131 | if (!soft) { | 131 | if (!soft) { |
132 | return NULL; | 132 | return NULL; |
133 | } | 133 | } |
134 | 134 | ||
135 | memcpy(soft, prom_bussoft, sizeof(struct pcibus_info)); | ||
136 | soft->pbi_buscommon.bs_base = (unsigned long) | 135 | soft->pbi_buscommon.bs_base = (unsigned long) |
137 | ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base), | 136 | ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base), |
138 | sizeof(struct pic)); | 137 | sizeof(struct pic)); |
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c index 642451e770ea..e77c477245fd 100644 --- a/arch/ia64/sn/pci/tioca_provider.c +++ b/arch/ia64/sn/pci/tioca_provider.c | |||
@@ -600,11 +600,11 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
600 | * Allocate kernel bus soft and copy from prom. | 600 | * Allocate kernel bus soft and copy from prom. |
601 | */ | 601 | */ |
602 | 602 | ||
603 | tioca_common = kzalloc(sizeof(struct tioca_common), GFP_KERNEL); | 603 | tioca_common = kmemdup(prom_bussoft, sizeof(struct tioca_common), |
604 | GFP_KERNEL); | ||
604 | if (!tioca_common) | 605 | if (!tioca_common) |
605 | return NULL; | 606 | return NULL; |
606 | 607 | ||
607 | memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common)); | ||
608 | tioca_common->ca_common.bs_base = (unsigned long) | 608 | tioca_common->ca_common.bs_base = (unsigned long) |
609 | ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base), | 609 | ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base), |
610 | sizeof(struct tioca_common)); | 610 | sizeof(struct tioca_common)); |