diff options
Diffstat (limited to 'arch/ia64')
33 files changed, 291 insertions, 256 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 170042b420d4..6851e52ed5a2 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -89,6 +89,9 @@ config GENERIC_TIME_VSYSCALL | |||
89 | bool | 89 | bool |
90 | default y | 90 | default y |
91 | 91 | ||
92 | config HAVE_LEGACY_PER_CPU_AREA | ||
93 | def_bool y | ||
94 | |||
92 | config HAVE_SETUP_PER_CPU_AREA | 95 | config HAVE_SETUP_PER_CPU_AREA |
93 | def_bool y | 96 | def_bool y |
94 | 97 | ||
@@ -112,6 +115,10 @@ config IA64_UNCACHED_ALLOCATOR | |||
112 | bool | 115 | bool |
113 | select GENERIC_ALLOCATOR | 116 | select GENERIC_ALLOCATOR |
114 | 117 | ||
118 | config ARCH_USES_PG_UNCACHED | ||
119 | def_bool y | ||
120 | depends on IA64_UNCACHED_ALLOCATOR | ||
121 | |||
115 | config AUDIT_ARCH | 122 | config AUDIT_ARCH |
116 | bool | 123 | bool |
117 | default y | 124 | default y |
@@ -493,6 +500,10 @@ config HAVE_ARCH_NODEDATA_EXTENSION | |||
493 | def_bool y | 500 | def_bool y |
494 | depends on NUMA | 501 | depends on NUMA |
495 | 502 | ||
503 | config ARCH_PROC_KCORE_TEXT | ||
504 | def_bool y | ||
505 | depends on PROC_KCORE | ||
506 | |||
496 | config IA32_SUPPORT | 507 | config IA32_SUPPORT |
497 | bool "Support for Linux/x86 binaries" | 508 | bool "Support for Linux/x86 binaries" |
498 | help | 509 | help |
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 8cfb001092ab..674a8374c6d9 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
@@ -2026,24 +2026,21 @@ acpi_sba_ioc_add(struct acpi_device *device) | |||
2026 | struct ioc *ioc; | 2026 | struct ioc *ioc; |
2027 | acpi_status status; | 2027 | acpi_status status; |
2028 | u64 hpa, length; | 2028 | u64 hpa, length; |
2029 | struct acpi_buffer buffer; | ||
2030 | struct acpi_device_info *dev_info; | 2029 | struct acpi_device_info *dev_info; |
2031 | 2030 | ||
2032 | status = hp_acpi_csr_space(device->handle, &hpa, &length); | 2031 | status = hp_acpi_csr_space(device->handle, &hpa, &length); |
2033 | if (ACPI_FAILURE(status)) | 2032 | if (ACPI_FAILURE(status)) |
2034 | return 1; | 2033 | return 1; |
2035 | 2034 | ||
2036 | buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; | 2035 | status = acpi_get_object_info(device->handle, &dev_info); |
2037 | status = acpi_get_object_info(device->handle, &buffer); | ||
2038 | if (ACPI_FAILURE(status)) | 2036 | if (ACPI_FAILURE(status)) |
2039 | return 1; | 2037 | return 1; |
2040 | dev_info = buffer.pointer; | ||
2041 | 2038 | ||
2042 | /* | 2039 | /* |
2043 | * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI | 2040 | * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI |
2044 | * root bridges, and its CSR space includes the IOC function. | 2041 | * root bridges, and its CSR space includes the IOC function. |
2045 | */ | 2042 | */ |
2046 | if (strncmp("HWP0001", dev_info->hardware_id.value, 7) == 0) { | 2043 | if (strncmp("HWP0001", dev_info->hardware_id.string, 7) == 0) { |
2047 | hpa += ZX1_IOC_OFFSET; | 2044 | hpa += ZX1_IOC_OFFSET; |
2048 | /* zx1 based systems default to kernel page size iommu pages */ | 2045 | /* zx1 based systems default to kernel page size iommu pages */ |
2049 | if (!iovp_shift) | 2046 | if (!iovp_shift) |
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c index e4d8fde68103..7e81966ce481 100644 --- a/arch/ia64/hp/sim/simeth.c +++ b/arch/ia64/hp/sim/simeth.c | |||
@@ -412,7 +412,7 @@ simeth_tx(struct sk_buff *skb, struct net_device *dev) | |||
412 | */ | 412 | */ |
413 | 413 | ||
414 | dev_kfree_skb(skb); | 414 | dev_kfree_skb(skb); |
415 | return 0; | 415 | return NETDEV_TX_OK; |
416 | } | 416 | } |
417 | 417 | ||
418 | static inline struct sk_buff * | 418 | static inline struct sk_buff * |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 16ef61a91d95..625ed8f76fce 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -1270,7 +1270,7 @@ putreg (struct task_struct *child, int regno, unsigned int value) | |||
1270 | case PT_CS: | 1270 | case PT_CS: |
1271 | if (value != __USER_CS) | 1271 | if (value != __USER_CS) |
1272 | printk(KERN_ERR | 1272 | printk(KERN_ERR |
1273 | "ia32.putreg: attempt to to set invalid segment register %d = %x\n", | 1273 | "ia32.putreg: attempt to set invalid segment register %d = %x\n", |
1274 | regno, value); | 1274 | regno, value); |
1275 | break; | 1275 | break; |
1276 | default: | 1276 | default: |
diff --git a/arch/ia64/include/asm/agp.h b/arch/ia64/include/asm/agp.h index c11fdd8ab4d7..01d09c401c5c 100644 --- a/arch/ia64/include/asm/agp.h +++ b/arch/ia64/include/asm/agp.h | |||
@@ -17,10 +17,6 @@ | |||
17 | #define unmap_page_from_agp(page) /* nothing */ | 17 | #define unmap_page_from_agp(page) /* nothing */ |
18 | #define flush_agp_cache() mb() | 18 | #define flush_agp_cache() mb() |
19 | 19 | ||
20 | /* Convert a physical address to an address suitable for the GART. */ | ||
21 | #define phys_to_gart(x) (x) | ||
22 | #define gart_to_phys(x) (x) | ||
23 | |||
24 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | 20 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ |
25 | #define alloc_gatt_pages(order) \ | 21 | #define alloc_gatt_pages(order) \ |
26 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | 22 | ((char *)__get_free_pages(GFP_KERNEL, (order))) |
diff --git a/arch/ia64/include/asm/device.h b/arch/ia64/include/asm/device.h index 41ab85d66f33..d66d446b127c 100644 --- a/arch/ia64/include/asm/device.h +++ b/arch/ia64/include/asm/device.h | |||
@@ -15,4 +15,7 @@ struct dev_archdata { | |||
15 | #endif | 15 | #endif |
16 | }; | 16 | }; |
17 | 17 | ||
18 | struct pdev_archdata { | ||
19 | }; | ||
20 | |||
18 | #endif /* _ASM_IA64_DEVICE_H */ | 21 | #endif /* _ASM_IA64_DEVICE_H */ |
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index 5a61b5c2e18f..8d3c79cd81e7 100644 --- a/arch/ia64/include/asm/dma-mapping.h +++ b/arch/ia64/include/asm/dma-mapping.h | |||
@@ -44,7 +44,6 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
44 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 44 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
45 | 45 | ||
46 | #define get_dma_ops(dev) platform_dma_get_ops(dev) | 46 | #define get_dma_ops(dev) platform_dma_get_ops(dev) |
47 | #define flush_write_buffers() | ||
48 | 47 | ||
49 | #include <asm-generic/dma-mapping-common.h> | 48 | #include <asm-generic/dma-mapping-common.h> |
50 | 49 | ||
@@ -69,6 +68,24 @@ dma_set_mask (struct device *dev, u64 mask) | |||
69 | return 0; | 68 | return 0; |
70 | } | 69 | } |
71 | 70 | ||
71 | static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) | ||
72 | { | ||
73 | if (!dev->dma_mask) | ||
74 | return 0; | ||
75 | |||
76 | return addr + size <= *dev->dma_mask; | ||
77 | } | ||
78 | |||
79 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | ||
80 | { | ||
81 | return paddr; | ||
82 | } | ||
83 | |||
84 | static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) | ||
85 | { | ||
86 | return daddr; | ||
87 | } | ||
88 | |||
72 | extern int dma_get_cache_alignment(void); | 89 | extern int dma_get_cache_alignment(void); |
73 | 90 | ||
74 | static inline void | 91 | static inline void |
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index 5f43697aed30..d9b6325a9328 100644 --- a/arch/ia64/include/asm/kvm_host.h +++ b/arch/ia64/include/asm/kvm_host.h | |||
@@ -235,7 +235,8 @@ struct kvm_vm_data { | |||
235 | #define KVM_REQ_PTC_G 32 | 235 | #define KVM_REQ_PTC_G 32 |
236 | #define KVM_REQ_RESUME 33 | 236 | #define KVM_REQ_RESUME 33 |
237 | 237 | ||
238 | #define KVM_PAGES_PER_HPAGE 1 | 238 | #define KVM_NR_PAGE_SIZES 1 |
239 | #define KVM_PAGES_PER_HPAGE(x) 1 | ||
239 | 240 | ||
240 | struct kvm; | 241 | struct kvm; |
241 | struct kvm_vcpu; | 242 | struct kvm_vcpu; |
@@ -465,7 +466,6 @@ struct kvm_arch { | |||
465 | unsigned long metaphysical_rr4; | 466 | unsigned long metaphysical_rr4; |
466 | unsigned long vmm_init_rr; | 467 | unsigned long vmm_init_rr; |
467 | 468 | ||
468 | int online_vcpus; | ||
469 | int is_sn2; | 469 | int is_sn2; |
470 | 470 | ||
471 | struct kvm_ioapic *vioapic; | 471 | struct kvm_ioapic *vioapic; |
diff --git a/arch/ia64/include/asm/kvm_para.h b/arch/ia64/include/asm/kvm_para.h index 0d6d8ca07b8c..1588aee781a2 100644 --- a/arch/ia64/include/asm/kvm_para.h +++ b/arch/ia64/include/asm/kvm_para.h | |||
@@ -19,9 +19,13 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifdef __KERNEL__ | ||
23 | |||
22 | static inline unsigned int kvm_arch_para_features(void) | 24 | static inline unsigned int kvm_arch_para_features(void) |
23 | { | 25 | { |
24 | return 0; | 26 | return 0; |
25 | } | 27 | } |
26 | 28 | ||
27 | #endif | 29 | #endif |
30 | |||
31 | #endif | ||
diff --git a/arch/ia64/include/asm/mca.h b/arch/ia64/include/asm/mca.h index 44a0b53df900..c171cdf0a789 100644 --- a/arch/ia64/include/asm/mca.h +++ b/arch/ia64/include/asm/mca.h | |||
@@ -145,12 +145,14 @@ extern void ia64_mca_ucmc_handler(struct pt_regs *, struct ia64_sal_os_state *); | |||
145 | extern void ia64_init_handler(struct pt_regs *, | 145 | extern void ia64_init_handler(struct pt_regs *, |
146 | struct switch_stack *, | 146 | struct switch_stack *, |
147 | struct ia64_sal_os_state *); | 147 | struct ia64_sal_os_state *); |
148 | extern void ia64_os_init_on_kdump(void); | ||
148 | extern void ia64_monarch_init_handler(void); | 149 | extern void ia64_monarch_init_handler(void); |
149 | extern void ia64_slave_init_handler(void); | 150 | extern void ia64_slave_init_handler(void); |
150 | extern void ia64_mca_cmc_vector_setup(void); | 151 | extern void ia64_mca_cmc_vector_setup(void); |
151 | extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *)); | 152 | extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *)); |
152 | extern void ia64_unreg_MCA_extension(void); | 153 | extern void ia64_unreg_MCA_extension(void); |
153 | extern unsigned long ia64_get_rnat(unsigned long *); | 154 | extern unsigned long ia64_get_rnat(unsigned long *); |
155 | extern void ia64_set_psr_mc(void); | ||
154 | extern void ia64_mca_printk(const char * fmt, ...) | 156 | extern void ia64_mca_printk(const char * fmt, ...) |
155 | __attribute__ ((format (printf, 1, 2))); | 157 | __attribute__ ((format (printf, 1, 2))); |
156 | 158 | ||
diff --git a/arch/ia64/include/asm/mman.h b/arch/ia64/include/asm/mman.h index 48cf8b98a0b4..4459028e5aa8 100644 --- a/arch/ia64/include/asm/mman.h +++ b/arch/ia64/include/asm/mman.h | |||
@@ -8,19 +8,9 @@ | |||
8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm-generic/mman-common.h> | 11 | #include <asm-generic/mman.h> |
12 | 12 | ||
13 | #define MAP_GROWSDOWN 0x00100 /* stack-like segment */ | 13 | #define MAP_GROWSUP 0x0200 /* register stack-like segment */ |
14 | #define MAP_GROWSUP 0x00200 /* register stack-like segment */ | ||
15 | #define MAP_DENYWRITE 0x00800 /* ETXTBSY */ | ||
16 | #define MAP_EXECUTABLE 0x01000 /* mark it as an executable */ | ||
17 | #define MAP_LOCKED 0x02000 /* pages are locked */ | ||
18 | #define MAP_NORESERVE 0x04000 /* don't check for reservations */ | ||
19 | #define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */ | ||
20 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
21 | |||
22 | #define MCL_CURRENT 1 /* lock all current mappings */ | ||
23 | #define MCL_FUTURE 2 /* lock all future mappings */ | ||
24 | 14 | ||
25 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
26 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h index fcfca56bb850..55281aabe5f2 100644 --- a/arch/ia64/include/asm/pci.h +++ b/arch/ia64/include/asm/pci.h | |||
@@ -17,7 +17,6 @@ | |||
17 | * loader. | 17 | * loader. |
18 | */ | 18 | */ |
19 | #define pcibios_assign_all_busses() 0 | 19 | #define pcibios_assign_all_busses() 0 |
20 | #define pcibios_scan_all_fns(a, b) 0 | ||
21 | 20 | ||
22 | #define PCIBIOS_MIN_IO 0x1000 | 21 | #define PCIBIOS_MIN_IO 0x1000 |
23 | #define PCIBIOS_MIN_MEM 0x10000000 | 22 | #define PCIBIOS_MIN_MEM 0x10000000 |
@@ -135,7 +134,18 @@ extern void pcibios_resource_to_bus(struct pci_dev *dev, | |||
135 | extern void pcibios_bus_to_resource(struct pci_dev *dev, | 134 | extern void pcibios_bus_to_resource(struct pci_dev *dev, |
136 | struct resource *res, struct pci_bus_region *region); | 135 | struct resource *res, struct pci_bus_region *region); |
137 | 136 | ||
138 | #define pcibios_scan_all_fns(a, b) 0 | 137 | static inline struct resource * |
138 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
139 | { | ||
140 | struct resource *root = NULL; | ||
141 | |||
142 | if (res->flags & IORESOURCE_IO) | ||
143 | root = &ioport_resource; | ||
144 | if (res->flags & IORESOURCE_MEM) | ||
145 | root = &iomem_resource; | ||
146 | |||
147 | return root; | ||
148 | } | ||
139 | 149 | ||
140 | #define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ | 150 | #define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ |
141 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 151 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
diff --git a/arch/ia64/include/asm/socket.h b/arch/ia64/include/asm/socket.h index 745421225ec6..0b0d5ff062e5 100644 --- a/arch/ia64/include/asm/socket.h +++ b/arch/ia64/include/asm/socket.h | |||
@@ -66,4 +66,7 @@ | |||
66 | #define SO_TIMESTAMPING 37 | 66 | #define SO_TIMESTAMPING 37 |
67 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | 67 | #define SCM_TIMESTAMPING SO_TIMESTAMPING |
68 | 68 | ||
69 | #define SO_PROTOCOL 38 | ||
70 | #define SO_DOMAIN 39 | ||
71 | |||
69 | #endif /* _ASM_IA64_SOCKET_H */ | 72 | #endif /* _ASM_IA64_SOCKET_H */ |
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h index 7b4c8c70b2d1..d0141fbf51d0 100644 --- a/arch/ia64/include/asm/topology.h +++ b/arch/ia64/include/asm/topology.h | |||
@@ -61,12 +61,13 @@ void build_cpu_to_node_map(void); | |||
61 | .cache_nice_tries = 2, \ | 61 | .cache_nice_tries = 2, \ |
62 | .busy_idx = 2, \ | 62 | .busy_idx = 2, \ |
63 | .idle_idx = 1, \ | 63 | .idle_idx = 1, \ |
64 | .newidle_idx = 2, \ | 64 | .newidle_idx = 0, \ |
65 | .wake_idx = 1, \ | 65 | .wake_idx = 0, \ |
66 | .forkexec_idx = 1, \ | 66 | .forkexec_idx = 0, \ |
67 | .flags = SD_LOAD_BALANCE \ | 67 | .flags = SD_LOAD_BALANCE \ |
68 | | SD_BALANCE_NEWIDLE \ | 68 | | SD_BALANCE_NEWIDLE \ |
69 | | SD_BALANCE_EXEC \ | 69 | | SD_BALANCE_EXEC \ |
70 | | SD_BALANCE_FORK \ | ||
70 | | SD_WAKE_AFFINE, \ | 71 | | SD_WAKE_AFFINE, \ |
71 | .last_balance = jiffies, \ | 72 | .last_balance = jiffies, \ |
72 | .balance_interval = 1, \ | 73 | .balance_interval = 1, \ |
@@ -85,14 +86,14 @@ void build_cpu_to_node_map(void); | |||
85 | .cache_nice_tries = 2, \ | 86 | .cache_nice_tries = 2, \ |
86 | .busy_idx = 3, \ | 87 | .busy_idx = 3, \ |
87 | .idle_idx = 2, \ | 88 | .idle_idx = 2, \ |
88 | .newidle_idx = 2, \ | 89 | .newidle_idx = 0, \ |
89 | .wake_idx = 1, \ | 90 | .wake_idx = 0, \ |
90 | .forkexec_idx = 1, \ | 91 | .forkexec_idx = 0, \ |
91 | .flags = SD_LOAD_BALANCE \ | 92 | .flags = SD_LOAD_BALANCE \ |
93 | | SD_BALANCE_NEWIDLE \ | ||
92 | | SD_BALANCE_EXEC \ | 94 | | SD_BALANCE_EXEC \ |
93 | | SD_BALANCE_FORK \ | 95 | | SD_BALANCE_FORK \ |
94 | | SD_SERIALIZE \ | 96 | | SD_SERIALIZE, \ |
95 | | SD_WAKE_BALANCE, \ | ||
96 | .last_balance = jiffies, \ | 97 | .last_balance = jiffies, \ |
97 | .balance_interval = 64, \ | 98 | .balance_interval = 64, \ |
98 | .nr_balance_failed = 0, \ | 99 | .nr_balance_failed = 0, \ |
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index f065093f8e9b..6631a9dfafdc 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c | |||
@@ -23,6 +23,7 @@ | |||
23 | int kdump_status[NR_CPUS]; | 23 | int kdump_status[NR_CPUS]; |
24 | static atomic_t kdump_cpu_frozen; | 24 | static atomic_t kdump_cpu_frozen; |
25 | atomic_t kdump_in_progress; | 25 | atomic_t kdump_in_progress; |
26 | static int kdump_freeze_monarch; | ||
26 | static int kdump_on_init = 1; | 27 | static int kdump_on_init = 1; |
27 | static int kdump_on_fatal_mca = 1; | 28 | static int kdump_on_fatal_mca = 1; |
28 | 29 | ||
@@ -108,10 +109,38 @@ machine_crash_shutdown(struct pt_regs *pt) | |||
108 | */ | 109 | */ |
109 | kexec_disable_iosapic(); | 110 | kexec_disable_iosapic(); |
110 | #ifdef CONFIG_SMP | 111 | #ifdef CONFIG_SMP |
112 | /* | ||
113 | * If kdump_on_init is set and an INIT is asserted here, kdump will | ||
114 | * be started again via INIT monarch. | ||
115 | */ | ||
116 | local_irq_disable(); | ||
117 | ia64_set_psr_mc(); /* mask MCA/INIT */ | ||
118 | if (atomic_inc_return(&kdump_in_progress) != 1) | ||
119 | unw_init_running(kdump_cpu_freeze, NULL); | ||
120 | |||
121 | /* | ||
122 | * Now this cpu is ready for kdump. | ||
123 | * Stop all others by IPI or INIT. They could receive INIT from | ||
124 | * outside and might be INIT monarch, but only thing they have to | ||
125 | * do is falling into kdump_cpu_freeze(). | ||
126 | * | ||
127 | * If an INIT is asserted here: | ||
128 | * - All receivers might be slaves, since some of cpus could already | ||
129 | * be frozen and INIT might be masked on monarch. In this case, | ||
130 | * all slaves will be frozen soon since kdump_in_progress will let | ||
131 | * them into DIE_INIT_SLAVE_LEAVE. | ||
132 | * - One might be a monarch, but INIT rendezvous will fail since | ||
133 | * at least this cpu already have INIT masked so it never join | ||
134 | * to the rendezvous. In this case, all slaves and monarch will | ||
135 | * be frozen soon with no wait since the INIT rendezvous is skipped | ||
136 | * by kdump_in_progress. | ||
137 | */ | ||
111 | kdump_smp_send_stop(); | 138 | kdump_smp_send_stop(); |
112 | /* not all cpu response to IPI, send INIT to freeze them */ | 139 | /* not all cpu response to IPI, send INIT to freeze them */ |
113 | if (kdump_wait_cpu_freeze() && kdump_on_init) { | 140 | if (kdump_wait_cpu_freeze()) { |
114 | kdump_smp_send_init(); | 141 | kdump_smp_send_init(); |
142 | /* wait again, don't go ahead if possible */ | ||
143 | kdump_wait_cpu_freeze(); | ||
115 | } | 144 | } |
116 | #endif | 145 | #endif |
117 | } | 146 | } |
@@ -129,17 +158,17 @@ void | |||
129 | kdump_cpu_freeze(struct unw_frame_info *info, void *arg) | 158 | kdump_cpu_freeze(struct unw_frame_info *info, void *arg) |
130 | { | 159 | { |
131 | int cpuid; | 160 | int cpuid; |
161 | |||
132 | local_irq_disable(); | 162 | local_irq_disable(); |
133 | cpuid = smp_processor_id(); | 163 | cpuid = smp_processor_id(); |
134 | crash_save_this_cpu(); | 164 | crash_save_this_cpu(); |
135 | current->thread.ksp = (__u64)info->sw - 16; | 165 | current->thread.ksp = (__u64)info->sw - 16; |
166 | |||
167 | ia64_set_psr_mc(); /* mask MCA/INIT and stop reentrance */ | ||
168 | |||
136 | atomic_inc(&kdump_cpu_frozen); | 169 | atomic_inc(&kdump_cpu_frozen); |
137 | kdump_status[cpuid] = 1; | 170 | kdump_status[cpuid] = 1; |
138 | mb(); | 171 | mb(); |
139 | #ifdef CONFIG_HOTPLUG_CPU | ||
140 | if (cpuid != 0) | ||
141 | ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]); | ||
142 | #endif | ||
143 | for (;;) | 172 | for (;;) |
144 | cpu_relax(); | 173 | cpu_relax(); |
145 | } | 174 | } |
@@ -150,6 +179,20 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data) | |||
150 | struct ia64_mca_notify_die *nd; | 179 | struct ia64_mca_notify_die *nd; |
151 | struct die_args *args = data; | 180 | struct die_args *args = data; |
152 | 181 | ||
182 | if (atomic_read(&kdump_in_progress)) { | ||
183 | switch (val) { | ||
184 | case DIE_INIT_MONARCH_LEAVE: | ||
185 | if (!kdump_freeze_monarch) | ||
186 | break; | ||
187 | /* fall through */ | ||
188 | case DIE_INIT_SLAVE_LEAVE: | ||
189 | case DIE_INIT_MONARCH_ENTER: | ||
190 | case DIE_MCA_RENDZVOUS_LEAVE: | ||
191 | unw_init_running(kdump_cpu_freeze, NULL); | ||
192 | break; | ||
193 | } | ||
194 | } | ||
195 | |||
153 | if (!kdump_on_init && !kdump_on_fatal_mca) | 196 | if (!kdump_on_init && !kdump_on_fatal_mca) |
154 | return NOTIFY_DONE; | 197 | return NOTIFY_DONE; |
155 | 198 | ||
@@ -162,43 +205,31 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data) | |||
162 | } | 205 | } |
163 | 206 | ||
164 | if (val != DIE_INIT_MONARCH_LEAVE && | 207 | if (val != DIE_INIT_MONARCH_LEAVE && |
165 | val != DIE_INIT_SLAVE_LEAVE && | ||
166 | val != DIE_INIT_MONARCH_PROCESS && | 208 | val != DIE_INIT_MONARCH_PROCESS && |
167 | val != DIE_MCA_RENDZVOUS_LEAVE && | ||
168 | val != DIE_MCA_MONARCH_LEAVE) | 209 | val != DIE_MCA_MONARCH_LEAVE) |
169 | return NOTIFY_DONE; | 210 | return NOTIFY_DONE; |
170 | 211 | ||
171 | nd = (struct ia64_mca_notify_die *)args->err; | 212 | nd = (struct ia64_mca_notify_die *)args->err; |
172 | /* Reason code 1 means machine check rendezvous*/ | ||
173 | if ((val == DIE_INIT_MONARCH_LEAVE || val == DIE_INIT_SLAVE_LEAVE | ||
174 | || val == DIE_INIT_MONARCH_PROCESS) && nd->sos->rv_rc == 1) | ||
175 | return NOTIFY_DONE; | ||
176 | 213 | ||
177 | switch (val) { | 214 | switch (val) { |
178 | case DIE_INIT_MONARCH_PROCESS: | 215 | case DIE_INIT_MONARCH_PROCESS: |
179 | if (kdump_on_init) { | 216 | /* Reason code 1 means machine check rendezvous*/ |
180 | atomic_set(&kdump_in_progress, 1); | 217 | if (kdump_on_init && (nd->sos->rv_rc != 1)) { |
181 | *(nd->monarch_cpu) = -1; | 218 | if (atomic_inc_return(&kdump_in_progress) != 1) |
219 | kdump_freeze_monarch = 1; | ||
182 | } | 220 | } |
183 | break; | 221 | break; |
184 | case DIE_INIT_MONARCH_LEAVE: | 222 | case DIE_INIT_MONARCH_LEAVE: |
185 | if (kdump_on_init) | 223 | /* Reason code 1 means machine check rendezvous*/ |
224 | if (kdump_on_init && (nd->sos->rv_rc != 1)) | ||
186 | machine_kdump_on_init(); | 225 | machine_kdump_on_init(); |
187 | break; | 226 | break; |
188 | case DIE_INIT_SLAVE_LEAVE: | ||
189 | if (atomic_read(&kdump_in_progress)) | ||
190 | unw_init_running(kdump_cpu_freeze, NULL); | ||
191 | break; | ||
192 | case DIE_MCA_RENDZVOUS_LEAVE: | ||
193 | if (atomic_read(&kdump_in_progress)) | ||
194 | unw_init_running(kdump_cpu_freeze, NULL); | ||
195 | break; | ||
196 | case DIE_MCA_MONARCH_LEAVE: | 227 | case DIE_MCA_MONARCH_LEAVE: |
197 | /* *(nd->data) indicate if MCA is recoverable */ | 228 | /* *(nd->data) indicate if MCA is recoverable */ |
198 | if (kdump_on_fatal_mca && !(*(nd->data))) { | 229 | if (kdump_on_fatal_mca && !(*(nd->data))) { |
199 | atomic_set(&kdump_in_progress, 1); | 230 | if (atomic_inc_return(&kdump_in_progress) == 1) |
200 | *(nd->monarch_cpu) = -1; | 231 | machine_kdump_on_init(); |
201 | machine_kdump_on_init(); | 232 | /* We got fatal MCA while kdump!? No way!! */ |
202 | } | 233 | } |
203 | break; | 234 | break; |
204 | } | 235 | } |
diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c index 39a3cd0a4173..f2c1600da097 100644 --- a/arch/ia64/kernel/dma-mapping.c +++ b/arch/ia64/kernel/dma-mapping.c | |||
@@ -10,7 +10,9 @@ EXPORT_SYMBOL(dma_ops); | |||
10 | 10 | ||
11 | static int __init dma_init(void) | 11 | static int __init dma_init(void) |
12 | { | 12 | { |
13 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); | 13 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); |
14 | |||
15 | return 0; | ||
14 | } | 16 | } |
15 | fs_initcall(dma_init); | 17 | fs_initcall(dma_init); |
16 | 18 | ||
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index 23f846de62d5..1a6e44515eb4 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -167,7 +167,7 @@ RestRR: \ | |||
167 | mov _tmp2=((ia64_rid(IA64_REGION_ID_KERNEL, (num<<61)) << 8) | (pgsize << 2) | vhpt);; \ | 167 | mov _tmp2=((ia64_rid(IA64_REGION_ID_KERNEL, (num<<61)) << 8) | (pgsize << 2) | vhpt);; \ |
168 | mov rr[_tmp1]=_tmp2 | 168 | mov rr[_tmp1]=_tmp2 |
169 | 169 | ||
170 | .section __special_page_section,"ax" | 170 | __PAGE_ALIGNED_DATA |
171 | 171 | ||
172 | .global empty_zero_page | 172 | .global empty_zero_page |
173 | empty_zero_page: | 173 | empty_zero_page: |
@@ -181,7 +181,7 @@ swapper_pg_dir: | |||
181 | halt_msg: | 181 | halt_msg: |
182 | stringz "Halting kernel\n" | 182 | stringz "Halting kernel\n" |
183 | 183 | ||
184 | .section .text.head,"ax" | 184 | __REF |
185 | 185 | ||
186 | .global start_ap | 186 | .global start_ap |
187 | 187 | ||
@@ -1242,7 +1242,7 @@ GLOBAL_ENTRY(ia64_jump_to_sal) | |||
1242 | movl r16=SAL_PSR_BITS_TO_SET;; | 1242 | movl r16=SAL_PSR_BITS_TO_SET;; |
1243 | mov cr.ipsr=r16 | 1243 | mov cr.ipsr=r16 |
1244 | mov cr.ifs=r0;; | 1244 | mov cr.ifs=r0;; |
1245 | rfi;; | 1245 | rfi;; // note: this unmask MCA/INIT (psr.mc) |
1246 | 1: | 1246 | 1: |
1247 | /* | 1247 | /* |
1248 | * Invalidate all TLB data/inst | 1248 | * Invalidate all TLB data/inst |
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c index 0823de1f6ebe..3d3aeef46947 100644 --- a/arch/ia64/kernel/machine_kexec.c +++ b/arch/ia64/kernel/machine_kexec.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <asm/delay.h> | 24 | #include <asm/delay.h> |
25 | #include <asm/meminit.h> | 25 | #include <asm/meminit.h> |
26 | #include <asm/processor.h> | 26 | #include <asm/processor.h> |
27 | #include <asm/sal.h> | ||
28 | #include <asm/mca.h> | ||
27 | 29 | ||
28 | typedef NORET_TYPE void (*relocate_new_kernel_t)( | 30 | typedef NORET_TYPE void (*relocate_new_kernel_t)( |
29 | unsigned long indirection_page, | 31 | unsigned long indirection_page, |
@@ -85,13 +87,26 @@ static void ia64_machine_kexec(struct unw_frame_info *info, void *arg) | |||
85 | void *pal_addr = efi_get_pal_addr(); | 87 | void *pal_addr = efi_get_pal_addr(); |
86 | unsigned long code_addr = (unsigned long)page_address(image->control_code_page); | 88 | unsigned long code_addr = (unsigned long)page_address(image->control_code_page); |
87 | int ii; | 89 | int ii; |
90 | u64 fp, gp; | ||
91 | ia64_fptr_t *init_handler = (ia64_fptr_t *)ia64_os_init_on_kdump; | ||
88 | 92 | ||
89 | BUG_ON(!image); | 93 | BUG_ON(!image); |
90 | if (image->type == KEXEC_TYPE_CRASH) { | 94 | if (image->type == KEXEC_TYPE_CRASH) { |
91 | crash_save_this_cpu(); | 95 | crash_save_this_cpu(); |
92 | current->thread.ksp = (__u64)info->sw - 16; | 96 | current->thread.ksp = (__u64)info->sw - 16; |
97 | |||
98 | /* Register noop init handler */ | ||
99 | fp = ia64_tpa(init_handler->fp); | ||
100 | gp = ia64_tpa(ia64_getreg(_IA64_REG_GP)); | ||
101 | ia64_sal_set_vectors(SAL_VECTOR_OS_INIT, fp, gp, 0, fp, gp, 0); | ||
102 | } else { | ||
103 | /* Unregister init handlers of current kernel */ | ||
104 | ia64_sal_set_vectors(SAL_VECTOR_OS_INIT, 0, 0, 0, 0, 0, 0); | ||
93 | } | 105 | } |
94 | 106 | ||
107 | /* Unregister mca handler - No more recovery on current kernel */ | ||
108 | ia64_sal_set_vectors(SAL_VECTOR_OS_MCA, 0, 0, 0, 0, 0, 0); | ||
109 | |||
95 | /* Interrupts aren't acceptable while we reboot */ | 110 | /* Interrupts aren't acceptable while we reboot */ |
96 | local_irq_disable(); | 111 | local_irq_disable(); |
97 | 112 | ||
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 7b30d21c5190..d2877a7bfe2e 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -1682,14 +1682,25 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw, | |||
1682 | 1682 | ||
1683 | if (!sos->monarch) { | 1683 | if (!sos->monarch) { |
1684 | ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT; | 1684 | ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT; |
1685 | |||
1686 | #ifdef CONFIG_KEXEC | ||
1687 | while (monarch_cpu == -1 && !atomic_read(&kdump_in_progress)) | ||
1688 | udelay(1000); | ||
1689 | #else | ||
1685 | while (monarch_cpu == -1) | 1690 | while (monarch_cpu == -1) |
1686 | cpu_relax(); /* spin until monarch enters */ | 1691 | cpu_relax(); /* spin until monarch enters */ |
1692 | #endif | ||
1687 | 1693 | ||
1688 | NOTIFY_INIT(DIE_INIT_SLAVE_ENTER, regs, (long)&nd, 1); | 1694 | NOTIFY_INIT(DIE_INIT_SLAVE_ENTER, regs, (long)&nd, 1); |
1689 | NOTIFY_INIT(DIE_INIT_SLAVE_PROCESS, regs, (long)&nd, 1); | 1695 | NOTIFY_INIT(DIE_INIT_SLAVE_PROCESS, regs, (long)&nd, 1); |
1690 | 1696 | ||
1697 | #ifdef CONFIG_KEXEC | ||
1698 | while (monarch_cpu != -1 && !atomic_read(&kdump_in_progress)) | ||
1699 | udelay(1000); | ||
1700 | #else | ||
1691 | while (monarch_cpu != -1) | 1701 | while (monarch_cpu != -1) |
1692 | cpu_relax(); /* spin until monarch leaves */ | 1702 | cpu_relax(); /* spin until monarch leaves */ |
1703 | #endif | ||
1693 | 1704 | ||
1694 | NOTIFY_INIT(DIE_INIT_SLAVE_LEAVE, regs, (long)&nd, 1); | 1705 | NOTIFY_INIT(DIE_INIT_SLAVE_LEAVE, regs, (long)&nd, 1); |
1695 | 1706 | ||
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S index a06d46548ff9..7461d2573d41 100644 --- a/arch/ia64/kernel/mca_asm.S +++ b/arch/ia64/kernel/mca_asm.S | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | .global ia64_do_tlb_purge | 41 | .global ia64_do_tlb_purge |
42 | .global ia64_os_mca_dispatch | 42 | .global ia64_os_mca_dispatch |
43 | .global ia64_os_init_on_kdump | ||
43 | .global ia64_os_init_dispatch_monarch | 44 | .global ia64_os_init_dispatch_monarch |
44 | .global ia64_os_init_dispatch_slave | 45 | .global ia64_os_init_dispatch_slave |
45 | 46 | ||
@@ -299,6 +300,25 @@ END(ia64_os_mca_virtual_begin) | |||
299 | //StartMain//////////////////////////////////////////////////////////////////// | 300 | //StartMain//////////////////////////////////////////////////////////////////// |
300 | 301 | ||
301 | // | 302 | // |
303 | // NOP init handler for kdump. In panic situation, we may receive INIT | ||
304 | // while kernel transition. Since we initialize registers on leave from | ||
305 | // current kernel, no longer monarch/slave handlers of current kernel in | ||
306 | // virtual mode are called safely. | ||
307 | // We can unregister these init handlers from SAL, however then the INIT | ||
308 | // will result in warmboot by SAL and we cannot retrieve the crashdump. | ||
309 | // Therefore register this NOP function to SAL, to prevent entering virtual | ||
310 | // mode and resulting warmboot by SAL. | ||
311 | // | ||
312 | ia64_os_init_on_kdump: | ||
313 | mov r8=r0 // IA64_INIT_RESUME | ||
314 | mov r9=r10 // SAL_GP | ||
315 | mov r22=r17 // *minstate | ||
316 | ;; | ||
317 | mov r10=r0 // return to same context | ||
318 | mov b0=r12 // SAL_CHECK return address | ||
319 | br b0 | ||
320 | |||
321 | // | ||
302 | // SAL to OS entry point for INIT on all processors. This has been defined for | 322 | // SAL to OS entry point for INIT on all processors. This has been defined for |
303 | // registration purposes with SAL as a part of ia64_mca_init. Monarch and | 323 | // registration purposes with SAL as a part of ia64_mca_init. Monarch and |
304 | // slave INIT have identical processing, except for the value of the | 324 | // slave INIT have identical processing, except for the value of the |
@@ -1073,3 +1093,30 @@ GLOBAL_ENTRY(ia64_get_rnat) | |||
1073 | mov ar.rsc=3 | 1093 | mov ar.rsc=3 |
1074 | br.ret.sptk.many rp | 1094 | br.ret.sptk.many rp |
1075 | END(ia64_get_rnat) | 1095 | END(ia64_get_rnat) |
1096 | |||
1097 | |||
1098 | // void ia64_set_psr_mc(void) | ||
1099 | // | ||
1100 | // Set psr.mc bit to mask MCA/INIT. | ||
1101 | GLOBAL_ENTRY(ia64_set_psr_mc) | ||
1102 | rsm psr.i | psr.ic // disable interrupts | ||
1103 | ;; | ||
1104 | srlz.d | ||
1105 | ;; | ||
1106 | mov r14 = psr // get psr{36:35,31:0} | ||
1107 | movl r15 = 1f | ||
1108 | ;; | ||
1109 | dep r14 = -1, r14, PSR_MC, 1 // set psr.mc | ||
1110 | ;; | ||
1111 | dep r14 = -1, r14, PSR_IC, 1 // set psr.ic | ||
1112 | ;; | ||
1113 | dep r14 = -1, r14, PSR_BN, 1 // keep bank1 in use | ||
1114 | ;; | ||
1115 | mov cr.ipsr = r14 | ||
1116 | mov cr.ifs = r0 | ||
1117 | mov cr.iip = r15 | ||
1118 | ;; | ||
1119 | rfi | ||
1120 | 1: | ||
1121 | br.ret.sptk.many rp | ||
1122 | END(ia64_set_psr_mc) | ||
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 5d7c0e5b9e76..9bcec9945c12 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -161,6 +161,13 @@ show_regs (struct pt_regs *regs) | |||
161 | show_stack(NULL, NULL); | 161 | show_stack(NULL, NULL); |
162 | } | 162 | } |
163 | 163 | ||
164 | /* local support for deprecated console_print */ | ||
165 | void | ||
166 | console_print(const char *s) | ||
167 | { | ||
168 | printk(KERN_EMERG "%s", s); | ||
169 | } | ||
170 | |||
164 | void | 171 | void |
165 | do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall) | 172 | do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall) |
166 | { | 173 | { |
@@ -192,6 +199,8 @@ do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall) | |||
192 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { | 199 | if (test_thread_flag(TIF_NOTIFY_RESUME)) { |
193 | clear_thread_flag(TIF_NOTIFY_RESUME); | 200 | clear_thread_flag(TIF_NOTIFY_RESUME); |
194 | tracehook_notify_resume(&scr->pt); | 201 | tracehook_notify_resume(&scr->pt); |
202 | if (current->replacement_session_keyring) | ||
203 | key_replace_session_keyring(); | ||
195 | } | 204 | } |
196 | 205 | ||
197 | /* copy user rbs to kernel rbs */ | 206 | /* copy user rbs to kernel rbs */ |
diff --git a/arch/ia64/kernel/relocate_kernel.S b/arch/ia64/kernel/relocate_kernel.S index 903babd22d62..32f6fc131fbe 100644 --- a/arch/ia64/kernel/relocate_kernel.S +++ b/arch/ia64/kernel/relocate_kernel.S | |||
@@ -52,7 +52,7 @@ GLOBAL_ENTRY(relocate_new_kernel) | |||
52 | srlz.i | 52 | srlz.i |
53 | ;; | 53 | ;; |
54 | mov ar.rnat=r18 | 54 | mov ar.rnat=r18 |
55 | rfi | 55 | rfi // note: this unmask MCA/INIT (psr.mc) |
56 | ;; | 56 | ;; |
57 | 1: | 57 | 1: |
58 | //physical mode code begin | 58 | //physical mode code begin |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 1b23ec126b63..1de86c96801d 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -855,11 +855,17 @@ identify_cpu (struct cpuinfo_ia64 *c) | |||
855 | c->unimpl_pa_mask = ~((1L<<63) | ((1L << phys_addr_size) - 1)); | 855 | c->unimpl_pa_mask = ~((1L<<63) | ((1L << phys_addr_size) - 1)); |
856 | } | 856 | } |
857 | 857 | ||
858 | /* | ||
859 | * In UP configuration, setup_per_cpu_areas() is defined in | ||
860 | * include/linux/percpu.h | ||
861 | */ | ||
862 | #ifdef CONFIG_SMP | ||
858 | void __init | 863 | void __init |
859 | setup_per_cpu_areas (void) | 864 | setup_per_cpu_areas (void) |
860 | { | 865 | { |
861 | /* start_kernel() requires this... */ | 866 | /* start_kernel() requires this... */ |
862 | } | 867 | } |
868 | #endif | ||
863 | 869 | ||
864 | /* | 870 | /* |
865 | * Do the following calculations: | 871 | * Do the following calculations: |
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c index f0c521b0ba4c..93ebfea43c6c 100644 --- a/arch/ia64/kernel/smp.c +++ b/arch/ia64/kernel/smp.c | |||
@@ -58,7 +58,8 @@ static struct local_tlb_flush_counts { | |||
58 | unsigned int count; | 58 | unsigned int count; |
59 | } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS]; | 59 | } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS]; |
60 | 60 | ||
61 | static DEFINE_PER_CPU(unsigned short, shadow_flush_counts[NR_CPUS]) ____cacheline_aligned; | 61 | static DEFINE_PER_CPU_SHARED_ALIGNED(unsigned short [NR_CPUS], |
62 | shadow_flush_counts); | ||
62 | 63 | ||
63 | #define IPI_CALL_FUNC 0 | 64 | #define IPI_CALL_FUNC 0 |
64 | #define IPI_CPU_STOP 1 | 65 | #define IPI_CPU_STOP 1 |
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 4a95e86b9ac2..0a0c77b2c988 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
@@ -24,14 +24,14 @@ PHDRS { | |||
24 | } | 24 | } |
25 | SECTIONS | 25 | SECTIONS |
26 | { | 26 | { |
27 | /* Sections to be discarded */ | 27 | /* unwind exit sections must be discarded before the rest of the |
28 | sections get included. */ | ||
28 | /DISCARD/ : { | 29 | /DISCARD/ : { |
29 | EXIT_TEXT | ||
30 | EXIT_DATA | ||
31 | *(.exitcall.exit) | ||
32 | *(.IA_64.unwind.exit.text) | 30 | *(.IA_64.unwind.exit.text) |
33 | *(.IA_64.unwind_info.exit.text) | 31 | *(.IA_64.unwind_info.exit.text) |
34 | } | 32 | *(.comment) |
33 | *(.note) | ||
34 | } | ||
35 | 35 | ||
36 | v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */ | 36 | v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */ |
37 | phys_start = _start - LOAD_OFFSET; | 37 | phys_start = _start - LOAD_OFFSET; |
@@ -51,8 +51,6 @@ SECTIONS | |||
51 | KPROBES_TEXT | 51 | KPROBES_TEXT |
52 | *(.gnu.linkonce.t*) | 52 | *(.gnu.linkonce.t*) |
53 | } | 53 | } |
54 | .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) | ||
55 | { *(.text.head) } | ||
56 | .text2 : AT(ADDR(.text2) - LOAD_OFFSET) | 54 | .text2 : AT(ADDR(.text2) - LOAD_OFFSET) |
57 | { *(.text2) } | 55 | { *(.text2) } |
58 | #ifdef CONFIG_SMP | 56 | #ifdef CONFIG_SMP |
@@ -66,14 +64,7 @@ SECTIONS | |||
66 | NOTES :code :note /* put .notes in text and mark in PT_NOTE */ | 64 | NOTES :code :note /* put .notes in text and mark in PT_NOTE */ |
67 | code_continues : {} :code /* switch back to regular program... */ | 65 | code_continues : {} :code /* switch back to regular program... */ |
68 | 66 | ||
69 | /* Exception table */ | 67 | EXCEPTION_TABLE(16) |
70 | . = ALIGN(16); | ||
71 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) | ||
72 | { | ||
73 | __start___ex_table = .; | ||
74 | *(__ex_table) | ||
75 | __stop___ex_table = .; | ||
76 | } | ||
77 | 68 | ||
78 | /* MCA table */ | 69 | /* MCA table */ |
79 | . = ALIGN(16); | 70 | . = ALIGN(16); |
@@ -115,38 +106,9 @@ SECTIONS | |||
115 | 106 | ||
116 | . = ALIGN(PAGE_SIZE); | 107 | . = ALIGN(PAGE_SIZE); |
117 | __init_begin = .; | 108 | __init_begin = .; |
118 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) | ||
119 | { | ||
120 | _sinittext = .; | ||
121 | INIT_TEXT | ||
122 | _einittext = .; | ||
123 | } | ||
124 | 109 | ||
125 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) | 110 | INIT_TEXT_SECTION(PAGE_SIZE) |
126 | { INIT_DATA } | 111 | INIT_DATA_SECTION(16) |
127 | |||
128 | #ifdef CONFIG_BLK_DEV_INITRD | ||
129 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) | ||
130 | { | ||
131 | __initramfs_start = .; | ||
132 | *(.init.ramfs) | ||
133 | __initramfs_end = .; | ||
134 | } | ||
135 | #endif | ||
136 | |||
137 | . = ALIGN(16); | ||
138 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) | ||
139 | { | ||
140 | __setup_start = .; | ||
141 | *(.init.setup) | ||
142 | __setup_end = .; | ||
143 | } | ||
144 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) | ||
145 | { | ||
146 | __initcall_start = .; | ||
147 | INITCALLS | ||
148 | __initcall_end = .; | ||
149 | } | ||
150 | 112 | ||
151 | .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) | 113 | .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) |
152 | { | 114 | { |
@@ -204,24 +166,13 @@ SECTIONS | |||
204 | } | 166 | } |
205 | #endif | 167 | #endif |
206 | 168 | ||
207 | . = ALIGN(8); | ||
208 | __con_initcall_start = .; | ||
209 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) | ||
210 | { *(.con_initcall.init) } | ||
211 | __con_initcall_end = .; | ||
212 | __security_initcall_start = .; | ||
213 | .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) | ||
214 | { *(.security_initcall.init) } | ||
215 | __security_initcall_end = .; | ||
216 | . = ALIGN(PAGE_SIZE); | 169 | . = ALIGN(PAGE_SIZE); |
217 | __init_end = .; | 170 | __init_end = .; |
218 | 171 | ||
219 | /* The initial task and kernel stack */ | ||
220 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) | ||
221 | { *(.data.init_task) } | ||
222 | |||
223 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) | 172 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) |
224 | { *(__special_page_section) | 173 | { |
174 | PAGE_ALIGNED_DATA(PAGE_SIZE) | ||
175 | . = ALIGN(PAGE_SIZE); | ||
225 | __start_gate_section = .; | 176 | __start_gate_section = .; |
226 | *(.data.gate) | 177 | *(.data.gate) |
227 | __stop_gate_section = .; | 178 | __stop_gate_section = .; |
@@ -236,12 +187,6 @@ SECTIONS | |||
236 | * kernel data | 187 | * kernel data |
237 | */ | 188 | */ |
238 | 189 | ||
239 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) | ||
240 | { *(.data.read_mostly) } | ||
241 | |||
242 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) | ||
243 | { *(.data.cacheline_aligned) } | ||
244 | |||
245 | /* Per-cpu data: */ | 190 | /* Per-cpu data: */ |
246 | . = ALIGN(PERCPU_PAGE_SIZE); | 191 | . = ALIGN(PERCPU_PAGE_SIZE); |
247 | PERCPU_VADDR(PERCPU_ADDR, :percpu) | 192 | PERCPU_VADDR(PERCPU_ADDR, :percpu) |
@@ -258,6 +203,9 @@ SECTIONS | |||
258 | __cpu0_per_cpu = .; | 203 | __cpu0_per_cpu = .; |
259 | . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ | 204 | . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ |
260 | #endif | 205 | #endif |
206 | INIT_TASK_DATA(PAGE_SIZE) | ||
207 | CACHELINE_ALIGNED_DATA(SMP_CACHE_BYTES) | ||
208 | READ_MOSTLY_DATA(SMP_CACHE_BYTES) | ||
261 | DATA_DATA | 209 | DATA_DATA |
262 | *(.data1) | 210 | *(.data1) |
263 | *(.gnu.linkonce.d*) | 211 | *(.gnu.linkonce.d*) |
@@ -274,49 +222,16 @@ SECTIONS | |||
274 | .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) | 222 | .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) |
275 | { *(.sdata) *(.sdata1) *(.srdata) } | 223 | { *(.sdata) *(.sdata1) *(.srdata) } |
276 | _edata = .; | 224 | _edata = .; |
277 | __bss_start = .; | 225 | |
278 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) | 226 | BSS_SECTION(0, 0, 0) |
279 | { *(.sbss) *(.scommon) } | ||
280 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) | ||
281 | { *(.bss) *(COMMON) } | ||
282 | __bss_stop = .; | ||
283 | 227 | ||
284 | _end = .; | 228 | _end = .; |
285 | 229 | ||
286 | code : { } :code | 230 | code : { } :code |
287 | /* Stabs debugging sections. */ | 231 | |
288 | .stab 0 : { *(.stab) } | 232 | STABS_DEBUG |
289 | .stabstr 0 : { *(.stabstr) } | 233 | DWARF_DEBUG |
290 | .stab.excl 0 : { *(.stab.excl) } | 234 | |
291 | .stab.exclstr 0 : { *(.stab.exclstr) } | 235 | /* Default discards */ |
292 | .stab.index 0 : { *(.stab.index) } | 236 | DISCARDS |
293 | .stab.indexstr 0 : { *(.stab.indexstr) } | ||
294 | /* DWARF debug sections. | ||
295 | Symbols in the DWARF debugging sections are relative to the beginning | ||
296 | of the section so we begin them at 0. */ | ||
297 | /* DWARF 1 */ | ||
298 | .debug 0 : { *(.debug) } | ||
299 | .line 0 : { *(.line) } | ||
300 | /* GNU DWARF 1 extensions */ | ||
301 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | ||
302 | .debug_sfnames 0 : { *(.debug_sfnames) } | ||
303 | /* DWARF 1.1 and DWARF 2 */ | ||
304 | .debug_aranges 0 : { *(.debug_aranges) } | ||
305 | .debug_pubnames 0 : { *(.debug_pubnames) } | ||
306 | /* DWARF 2 */ | ||
307 | .debug_info 0 : { *(.debug_info) } | ||
308 | .debug_abbrev 0 : { *(.debug_abbrev) } | ||
309 | .debug_line 0 : { *(.debug_line) } | ||
310 | .debug_frame 0 : { *(.debug_frame) } | ||
311 | .debug_str 0 : { *(.debug_str) } | ||
312 | .debug_loc 0 : { *(.debug_loc) } | ||
313 | .debug_macinfo 0 : { *(.debug_macinfo) } | ||
314 | /* SGI/MIPS DWARF 2 extensions */ | ||
315 | .debug_weaknames 0 : { *(.debug_weaknames) } | ||
316 | .debug_funcnames 0 : { *(.debug_funcnames) } | ||
317 | .debug_typenames 0 : { *(.debug_typenames) } | ||
318 | .debug_varnames 0 : { *(.debug_varnames) } | ||
319 | /* These must appear regardless of . */ | ||
320 | /DISCARD/ : { *(.comment) } | ||
321 | /DISCARD/ : { *(.note) } | ||
322 | } | 237 | } |
diff --git a/arch/ia64/kvm/Kconfig b/arch/ia64/kvm/Kconfig index 64d520937874..ef3e7be29caf 100644 --- a/arch/ia64/kvm/Kconfig +++ b/arch/ia64/kvm/Kconfig | |||
@@ -1,12 +1,8 @@ | |||
1 | # | 1 | # |
2 | # KVM configuration | 2 | # KVM configuration |
3 | # | 3 | # |
4 | config HAVE_KVM | ||
5 | bool | ||
6 | 4 | ||
7 | config HAVE_KVM_IRQCHIP | 5 | source "virt/kvm/Kconfig" |
8 | bool | ||
9 | default y | ||
10 | 6 | ||
11 | menuconfig VIRTUALIZATION | 7 | menuconfig VIRTUALIZATION |
12 | bool "Virtualization" | 8 | bool "Virtualization" |
@@ -28,6 +24,8 @@ config KVM | |||
28 | depends on PCI | 24 | depends on PCI |
29 | select PREEMPT_NOTIFIERS | 25 | select PREEMPT_NOTIFIERS |
30 | select ANON_INODES | 26 | select ANON_INODES |
27 | select HAVE_KVM_IRQCHIP | ||
28 | select KVM_APIC_ARCHITECTURE | ||
31 | ---help--- | 29 | ---help--- |
32 | Support hosting fully virtualized guest machines using hardware | 30 | Support hosting fully virtualized guest machines using hardware |
33 | virtualization extensions. You will need a fairly recent | 31 | virtualization extensions. You will need a fairly recent |
@@ -49,9 +47,6 @@ config KVM_INTEL | |||
49 | Provides support for KVM on Itanium 2 processors equipped with the VT | 47 | Provides support for KVM on Itanium 2 processors equipped with the VT |
50 | extensions. | 48 | extensions. |
51 | 49 | ||
52 | config KVM_TRACE | ||
53 | bool | ||
54 | |||
55 | source drivers/virtio/Kconfig | 50 | source drivers/virtio/Kconfig |
56 | 51 | ||
57 | endif # VIRTUALIZATION | 52 | endif # VIRTUALIZATION |
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 80c57b0a21c4..0ad09f05efa9 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -210,16 +210,6 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
210 | 210 | ||
211 | } | 211 | } |
212 | 212 | ||
213 | static struct kvm_io_device *vcpu_find_mmio_dev(struct kvm_vcpu *vcpu, | ||
214 | gpa_t addr, int len, int is_write) | ||
215 | { | ||
216 | struct kvm_io_device *dev; | ||
217 | |||
218 | dev = kvm_io_bus_find_dev(&vcpu->kvm->mmio_bus, addr, len, is_write); | ||
219 | |||
220 | return dev; | ||
221 | } | ||
222 | |||
223 | static int handle_vm_error(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | 213 | static int handle_vm_error(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) |
224 | { | 214 | { |
225 | kvm_run->exit_reason = KVM_EXIT_UNKNOWN; | 215 | kvm_run->exit_reason = KVM_EXIT_UNKNOWN; |
@@ -231,6 +221,7 @@ static int handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
231 | { | 221 | { |
232 | struct kvm_mmio_req *p; | 222 | struct kvm_mmio_req *p; |
233 | struct kvm_io_device *mmio_dev; | 223 | struct kvm_io_device *mmio_dev; |
224 | int r; | ||
234 | 225 | ||
235 | p = kvm_get_vcpu_ioreq(vcpu); | 226 | p = kvm_get_vcpu_ioreq(vcpu); |
236 | 227 | ||
@@ -247,16 +238,13 @@ static int handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
247 | kvm_run->exit_reason = KVM_EXIT_MMIO; | 238 | kvm_run->exit_reason = KVM_EXIT_MMIO; |
248 | return 0; | 239 | return 0; |
249 | mmio: | 240 | mmio: |
250 | mmio_dev = vcpu_find_mmio_dev(vcpu, p->addr, p->size, !p->dir); | 241 | if (p->dir) |
251 | if (mmio_dev) { | 242 | r = kvm_io_bus_read(&vcpu->kvm->mmio_bus, p->addr, |
252 | if (!p->dir) | 243 | p->size, &p->data); |
253 | kvm_iodevice_write(mmio_dev, p->addr, p->size, | 244 | else |
254 | &p->data); | 245 | r = kvm_io_bus_write(&vcpu->kvm->mmio_bus, p->addr, |
255 | else | 246 | p->size, &p->data); |
256 | kvm_iodevice_read(mmio_dev, p->addr, p->size, | 247 | if (r) |
257 | &p->data); | ||
258 | |||
259 | } else | ||
260 | printk(KERN_ERR"kvm: No iodevice found! addr:%lx\n", p->addr); | 248 | printk(KERN_ERR"kvm: No iodevice found! addr:%lx\n", p->addr); |
261 | p->state = STATE_IORESP_READY; | 249 | p->state = STATE_IORESP_READY; |
262 | 250 | ||
@@ -337,13 +325,12 @@ static struct kvm_vcpu *lid_to_vcpu(struct kvm *kvm, unsigned long id, | |||
337 | { | 325 | { |
338 | union ia64_lid lid; | 326 | union ia64_lid lid; |
339 | int i; | 327 | int i; |
328 | struct kvm_vcpu *vcpu; | ||
340 | 329 | ||
341 | for (i = 0; i < kvm->arch.online_vcpus; i++) { | 330 | kvm_for_each_vcpu(i, vcpu, kvm) { |
342 | if (kvm->vcpus[i]) { | 331 | lid.val = VCPU_LID(vcpu); |
343 | lid.val = VCPU_LID(kvm->vcpus[i]); | 332 | if (lid.id == id && lid.eid == eid) |
344 | if (lid.id == id && lid.eid == eid) | 333 | return vcpu; |
345 | return kvm->vcpus[i]; | ||
346 | } | ||
347 | } | 334 | } |
348 | 335 | ||
349 | return NULL; | 336 | return NULL; |
@@ -409,21 +396,21 @@ static int handle_global_purge(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
409 | struct kvm *kvm = vcpu->kvm; | 396 | struct kvm *kvm = vcpu->kvm; |
410 | struct call_data call_data; | 397 | struct call_data call_data; |
411 | int i; | 398 | int i; |
399 | struct kvm_vcpu *vcpui; | ||
412 | 400 | ||
413 | call_data.ptc_g_data = p->u.ptc_g_data; | 401 | call_data.ptc_g_data = p->u.ptc_g_data; |
414 | 402 | ||
415 | for (i = 0; i < kvm->arch.online_vcpus; i++) { | 403 | kvm_for_each_vcpu(i, vcpui, kvm) { |
416 | if (!kvm->vcpus[i] || kvm->vcpus[i]->arch.mp_state == | 404 | if (vcpui->arch.mp_state == KVM_MP_STATE_UNINITIALIZED || |
417 | KVM_MP_STATE_UNINITIALIZED || | 405 | vcpu == vcpui) |
418 | vcpu == kvm->vcpus[i]) | ||
419 | continue; | 406 | continue; |
420 | 407 | ||
421 | if (waitqueue_active(&kvm->vcpus[i]->wq)) | 408 | if (waitqueue_active(&vcpui->wq)) |
422 | wake_up_interruptible(&kvm->vcpus[i]->wq); | 409 | wake_up_interruptible(&vcpui->wq); |
423 | 410 | ||
424 | if (kvm->vcpus[i]->cpu != -1) { | 411 | if (vcpui->cpu != -1) { |
425 | call_data.vcpu = kvm->vcpus[i]; | 412 | call_data.vcpu = vcpui; |
426 | smp_call_function_single(kvm->vcpus[i]->cpu, | 413 | smp_call_function_single(vcpui->cpu, |
427 | vcpu_global_purge, &call_data, 1); | 414 | vcpu_global_purge, &call_data, 1); |
428 | } else | 415 | } else |
429 | printk(KERN_WARNING"kvm: Uninit vcpu received ipi!\n"); | 416 | printk(KERN_WARNING"kvm: Uninit vcpu received ipi!\n"); |
@@ -852,8 +839,6 @@ struct kvm *kvm_arch_create_vm(void) | |||
852 | 839 | ||
853 | kvm_init_vm(kvm); | 840 | kvm_init_vm(kvm); |
854 | 841 | ||
855 | kvm->arch.online_vcpus = 0; | ||
856 | |||
857 | return kvm; | 842 | return kvm; |
858 | 843 | ||
859 | } | 844 | } |
@@ -1000,10 +985,10 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
1000 | goto out; | 985 | goto out; |
1001 | if (irqchip_in_kernel(kvm)) { | 986 | if (irqchip_in_kernel(kvm)) { |
1002 | __s32 status; | 987 | __s32 status; |
1003 | mutex_lock(&kvm->lock); | 988 | mutex_lock(&kvm->irq_lock); |
1004 | status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, | 989 | status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, |
1005 | irq_event.irq, irq_event.level); | 990 | irq_event.irq, irq_event.level); |
1006 | mutex_unlock(&kvm->lock); | 991 | mutex_unlock(&kvm->irq_lock); |
1007 | if (ioctl == KVM_IRQ_LINE_STATUS) { | 992 | if (ioctl == KVM_IRQ_LINE_STATUS) { |
1008 | irq_event.status = status; | 993 | irq_event.status = status; |
1009 | if (copy_to_user(argp, &irq_event, | 994 | if (copy_to_user(argp, &irq_event, |
@@ -1216,7 +1201,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) | |||
1216 | if (IS_ERR(vmm_vcpu)) | 1201 | if (IS_ERR(vmm_vcpu)) |
1217 | return PTR_ERR(vmm_vcpu); | 1202 | return PTR_ERR(vmm_vcpu); |
1218 | 1203 | ||
1219 | if (vcpu->vcpu_id == 0) { | 1204 | if (kvm_vcpu_is_bsp(vcpu)) { |
1220 | vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; | 1205 | vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; |
1221 | 1206 | ||
1222 | /*Set entry address for first run.*/ | 1207 | /*Set entry address for first run.*/ |
@@ -1224,7 +1209,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) | |||
1224 | 1209 | ||
1225 | /*Initialize itc offset for vcpus*/ | 1210 | /*Initialize itc offset for vcpus*/ |
1226 | itc_offset = 0UL - kvm_get_itc(vcpu); | 1211 | itc_offset = 0UL - kvm_get_itc(vcpu); |
1227 | for (i = 0; i < kvm->arch.online_vcpus; i++) { | 1212 | for (i = 0; i < KVM_MAX_VCPUS; i++) { |
1228 | v = (struct kvm_vcpu *)((char *)vcpu + | 1213 | v = (struct kvm_vcpu *)((char *)vcpu + |
1229 | sizeof(struct kvm_vcpu_data) * i); | 1214 | sizeof(struct kvm_vcpu_data) * i); |
1230 | v->arch.itc_offset = itc_offset; | 1215 | v->arch.itc_offset = itc_offset; |
@@ -1356,8 +1341,6 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, | |||
1356 | goto fail; | 1341 | goto fail; |
1357 | } | 1342 | } |
1358 | 1343 | ||
1359 | kvm->arch.online_vcpus++; | ||
1360 | |||
1361 | return vcpu; | 1344 | return vcpu; |
1362 | fail: | 1345 | fail: |
1363 | return ERR_PTR(r); | 1346 | return ERR_PTR(r); |
@@ -1952,19 +1935,6 @@ int kvm_highest_pending_irq(struct kvm_vcpu *vcpu) | |||
1952 | return find_highest_bits((int *)&vpd->irr[0]); | 1935 | return find_highest_bits((int *)&vpd->irr[0]); |
1953 | } | 1936 | } |
1954 | 1937 | ||
1955 | int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu) | ||
1956 | { | ||
1957 | if (kvm_highest_pending_irq(vcpu) != -1) | ||
1958 | return 1; | ||
1959 | return 0; | ||
1960 | } | ||
1961 | |||
1962 | int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu) | ||
1963 | { | ||
1964 | /* do real check here */ | ||
1965 | return 1; | ||
1966 | } | ||
1967 | |||
1968 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu) | 1938 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu) |
1969 | { | 1939 | { |
1970 | return vcpu->arch.timer_fired; | 1940 | return vcpu->arch.timer_fired; |
@@ -1977,7 +1947,8 @@ gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn) | |||
1977 | 1947 | ||
1978 | int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) | 1948 | int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) |
1979 | { | 1949 | { |
1980 | return vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE; | 1950 | return (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE) || |
1951 | (kvm_highest_pending_irq(vcpu) != -1); | ||
1981 | } | 1952 | } |
1982 | 1953 | ||
1983 | int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu, | 1954 | int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu, |
diff --git a/arch/ia64/kvm/vcpu.c b/arch/ia64/kvm/vcpu.c index cc406d064a09..dce75b70cdd5 100644 --- a/arch/ia64/kvm/vcpu.c +++ b/arch/ia64/kvm/vcpu.c | |||
@@ -830,8 +830,8 @@ static void vcpu_set_itc(struct kvm_vcpu *vcpu, u64 val) | |||
830 | 830 | ||
831 | kvm = (struct kvm *)KVM_VM_BASE; | 831 | kvm = (struct kvm *)KVM_VM_BASE; |
832 | 832 | ||
833 | if (vcpu->vcpu_id == 0) { | 833 | if (kvm_vcpu_is_bsp(vcpu)) { |
834 | for (i = 0; i < kvm->arch.online_vcpus; i++) { | 834 | for (i = 0; i < atomic_read(&kvm->online_vcpus); i++) { |
835 | v = (struct kvm_vcpu *)((char *)vcpu + | 835 | v = (struct kvm_vcpu *)((char *)vcpu + |
836 | sizeof(struct kvm_vcpu_data) * i); | 836 | sizeof(struct kvm_vcpu_data) * i); |
837 | VMX(v, itc_offset) = itc_offset; | 837 | VMX(v, itc_offset) = itc_offset; |
diff --git a/arch/ia64/lib/ip_fast_csum.S b/arch/ia64/lib/ip_fast_csum.S index 1f86aeb2c948..620d9dc5220f 100644 --- a/arch/ia64/lib/ip_fast_csum.S +++ b/arch/ia64/lib/ip_fast_csum.S | |||
@@ -96,20 +96,22 @@ END(ip_fast_csum) | |||
96 | GLOBAL_ENTRY(csum_ipv6_magic) | 96 | GLOBAL_ENTRY(csum_ipv6_magic) |
97 | ld4 r20=[in0],4 | 97 | ld4 r20=[in0],4 |
98 | ld4 r21=[in1],4 | 98 | ld4 r21=[in1],4 |
99 | dep r15=in3,in2,32,16 | 99 | zxt4 in2=in2 |
100 | ;; | 100 | ;; |
101 | ld4 r22=[in0],4 | 101 | ld4 r22=[in0],4 |
102 | ld4 r23=[in1],4 | 102 | ld4 r23=[in1],4 |
103 | mux1 r15=r15,@rev | 103 | dep r15=in3,in2,32,16 |
104 | ;; | 104 | ;; |
105 | ld4 r24=[in0],4 | 105 | ld4 r24=[in0],4 |
106 | ld4 r25=[in1],4 | 106 | ld4 r25=[in1],4 |
107 | shr.u r15=r15,16 | 107 | mux1 r15=r15,@rev |
108 | add r16=r20,r21 | 108 | add r16=r20,r21 |
109 | add r17=r22,r23 | 109 | add r17=r22,r23 |
110 | zxt4 in4=in4 | ||
110 | ;; | 111 | ;; |
111 | ld4 r26=[in0],4 | 112 | ld4 r26=[in0],4 |
112 | ld4 r27=[in1],4 | 113 | ld4 r27=[in1],4 |
114 | shr.u r15=r15,16 | ||
113 | add r18=r24,r25 | 115 | add r18=r24,r25 |
114 | add r8=r16,r17 | 116 | add r8=r16,r17 |
115 | ;; | 117 | ;; |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index b115b3bbf04a..1857766a63c1 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -617,7 +617,6 @@ mem_init (void) | |||
617 | long reserved_pages, codesize, datasize, initsize; | 617 | long reserved_pages, codesize, datasize, initsize; |
618 | pg_data_t *pgdat; | 618 | pg_data_t *pgdat; |
619 | int i; | 619 | int i; |
620 | static struct kcore_list kcore_mem, kcore_vmem, kcore_kernel; | ||
621 | 620 | ||
622 | BUG_ON(PTRS_PER_PGD * sizeof(pgd_t) != PAGE_SIZE); | 621 | BUG_ON(PTRS_PER_PGD * sizeof(pgd_t) != PAGE_SIZE); |
623 | BUG_ON(PTRS_PER_PMD * sizeof(pmd_t) != PAGE_SIZE); | 622 | BUG_ON(PTRS_PER_PMD * sizeof(pmd_t) != PAGE_SIZE); |
@@ -639,10 +638,6 @@ mem_init (void) | |||
639 | 638 | ||
640 | high_memory = __va(max_low_pfn * PAGE_SIZE); | 639 | high_memory = __va(max_low_pfn * PAGE_SIZE); |
641 | 640 | ||
642 | kclist_add(&kcore_mem, __va(0), max_low_pfn * PAGE_SIZE); | ||
643 | kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START); | ||
644 | kclist_add(&kcore_kernel, _stext, _end - _stext); | ||
645 | |||
646 | for_each_online_pgdat(pgdat) | 641 | for_each_online_pgdat(pgdat) |
647 | if (pgdat->bdata->node_bootmem_map) | 642 | if (pgdat->bdata->node_bootmem_map) |
648 | totalram_pages += free_all_bootmem_node(pgdat); | 643 | totalram_pages += free_all_bootmem_node(pgdat); |
@@ -655,7 +650,7 @@ mem_init (void) | |||
655 | initsize = (unsigned long) __init_end - (unsigned long) __init_begin; | 650 | initsize = (unsigned long) __init_end - (unsigned long) __init_begin; |
656 | 651 | ||
657 | printk(KERN_INFO "Memory: %luk/%luk available (%luk code, %luk reserved, " | 652 | printk(KERN_INFO "Memory: %luk/%luk available (%luk code, %luk reserved, " |
658 | "%luk data, %luk init)\n", (unsigned long) nr_free_pages() << (PAGE_SHIFT - 10), | 653 | "%luk data, %luk init)\n", nr_free_pages() << (PAGE_SHIFT - 10), |
659 | num_physpages << (PAGE_SHIFT - 10), codesize >> 10, | 654 | num_physpages << (PAGE_SHIFT - 10), codesize >> 10, |
660 | reserved_pages << (PAGE_SHIFT - 10), datasize >> 10, initsize >> 10); | 655 | reserved_pages << (PAGE_SHIFT - 10), datasize >> 10, initsize >> 10); |
661 | 656 | ||
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index e456f062f241..ece1bf994499 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -71,7 +71,7 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second); | |||
71 | DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); | 71 | DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); |
72 | EXPORT_PER_CPU_SYMBOL(__sn_hub_info); | 72 | EXPORT_PER_CPU_SYMBOL(__sn_hub_info); |
73 | 73 | ||
74 | DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]); | 74 | DEFINE_PER_CPU(short [MAX_COMPACT_NODES], __sn_cnodeid_to_nasid); |
75 | EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid); | 75 | EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid); |
76 | 76 | ||
77 | DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda); | 77 | DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda); |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_ate.c b/arch/ia64/sn/pci/pcibr/pcibr_ate.c index 239b3cedcf2b..5bc34eac9e01 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_ate.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_ate.c | |||
@@ -54,6 +54,8 @@ static int find_free_ate(struct ate_resource *ate_resource, int start, | |||
54 | break; | 54 | break; |
55 | } | 55 | } |
56 | } | 56 | } |
57 | if (i >= ate_resource->num_ate) | ||
58 | return -1; | ||
57 | } else | 59 | } else |
58 | index++; /* Try next ate */ | 60 | index++; /* Try next ate */ |
59 | } | 61 | } |
diff --git a/arch/ia64/xen/time.c b/arch/ia64/xen/time.c index fb8332690179..dbeadb9c8e20 100644 --- a/arch/ia64/xen/time.c +++ b/arch/ia64/xen/time.c | |||
@@ -133,8 +133,7 @@ consider_steal_time(unsigned long new_itm) | |||
133 | account_idle_ticks(blocked); | 133 | account_idle_ticks(blocked); |
134 | run_local_timers(); | 134 | run_local_timers(); |
135 | 135 | ||
136 | if (rcu_pending(cpu)) | 136 | rcu_check_callbacks(cpu, user_mode(get_irq_regs())); |
137 | rcu_check_callbacks(cpu, user_mode(get_irq_regs())); | ||
138 | 137 | ||
139 | scheduler_tick(); | 138 | scheduler_tick(); |
140 | run_posix_cpu_timers(p); | 139 | run_posix_cpu_timers(p); |