aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-19 17:29:23 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-19 17:29:23 -0500
commit4486c5f510463673d2ea57b46137086f5b21ef36 (patch)
treed0ce078604b5eb148754f4d02029c862cdc6c35f /arch
parentf941b168a4d7281bf49e166f2febc49470c0149f (diff)
parented5d4026ae6f51bec25e03a891a7d59c492577ab (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Adjust CMCI mask on CPU hotplug [IA64] make flush_tlb_kernel_range() an inline function [IA64] Guard elfcorehdr_addr with #if CONFIG_PROC_FS [IA64] Fix Altix BTE error return status [IA64] Remove assembler warnings on head.S [IA64] Remove compiler warinings about uninitialized variable in irq_ia64.c [IA64] set_thread_area fails in IA32 chroot [IA64] print kernel release in OOPS to make kerneloops.org happy [IA64] Two trivial spelling fixes [IA64] Avoid unnecessary TLB flushes when allocating memory [IA64] ia32 nopage [IA64] signal: remove redundant code in setup_sigcontext() IA64: Slim down __clear_bit_unlock
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/hp/common/sba_iommu.c3
-rw-r--r--arch/ia64/ia32/binfmt_elf32.c28
-rw-r--r--arch/ia64/kernel/head.S1
-rw-r--r--arch/ia64/kernel/irq_ia64.c4
-rw-r--r--arch/ia64/kernel/mca.c33
-rw-r--r--arch/ia64/kernel/process.c7
-rw-r--r--arch/ia64/kernel/signal.c10
-rw-r--r--arch/ia64/kernel/uncached.c2
-rw-r--r--arch/ia64/mm/tlb.c18
-rw-r--r--arch/ia64/sn/kernel/bte.c4
-rw-r--r--arch/ia64/sn/kernel/bte_error.c8
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c2
12 files changed, 81 insertions, 39 deletions
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index bc859a311eaf..45bf04eb7d70 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -2034,7 +2034,8 @@ sba_init(void)
2034 if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb")) 2034 if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb"))
2035 return 0; 2035 return 0;
2036 2036
2037#if defined(CONFIG_IA64_GENERIC) && defined(CONFIG_CRASH_DUMP) 2037#if defined(CONFIG_IA64_GENERIC) && defined(CONFIG_CRASH_DUMP) && \
2038 defined(CONFIG_PROC_FS)
2038 /* If we are booting a kdump kernel, the sba_iommu will 2039 /* If we are booting a kdump kernel, the sba_iommu will
2039 * cause devices that were not shutdown properly to MCA 2040 * cause devices that were not shutdown properly to MCA
2040 * as soon as they are turned back on. Our only option for 2041 * as soon as they are turned back on. Our only option for
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
index f6ae3ec93810..3e35987af458 100644
--- a/arch/ia64/ia32/binfmt_elf32.c
+++ b/arch/ia64/ia32/binfmt_elf32.c
@@ -52,33 +52,29 @@ extern struct page *ia32_shared_page[];
52extern unsigned long *ia32_gdt; 52extern unsigned long *ia32_gdt;
53extern struct page *ia32_gate_page; 53extern struct page *ia32_gate_page;
54 54
55struct page * 55int
56ia32_install_shared_page (struct vm_area_struct *vma, unsigned long address, int *type) 56ia32_install_shared_page (struct vm_area_struct *vma, struct vm_fault *vmf)
57{ 57{
58 struct page *pg = ia32_shared_page[smp_processor_id()]; 58 vmf->page = ia32_shared_page[smp_processor_id()];
59 get_page(pg); 59 get_page(vmf->page);
60 if (type) 60 return 0;
61 *type = VM_FAULT_MINOR;
62 return pg;
63} 61}
64 62
65struct page * 63int
66ia32_install_gate_page (struct vm_area_struct *vma, unsigned long address, int *type) 64ia32_install_gate_page (struct vm_area_struct *vma, struct vm_fault *vmf)
67{ 65{
68 struct page *pg = ia32_gate_page; 66 vmf->page = ia32_gate_page;
69 get_page(pg); 67 get_page(vmf->page);
70 if (type) 68 return 0;
71 *type = VM_FAULT_MINOR;
72 return pg;
73} 69}
74 70
75 71
76static struct vm_operations_struct ia32_shared_page_vm_ops = { 72static struct vm_operations_struct ia32_shared_page_vm_ops = {
77 .nopage = ia32_install_shared_page 73 .fault = ia32_install_shared_page
78}; 74};
79 75
80static struct vm_operations_struct ia32_gate_page_vm_ops = { 76static struct vm_operations_struct ia32_gate_page_vm_ops = {
81 .nopage = ia32_install_gate_page 77 .fault = ia32_install_gate_page
82}; 78};
83 79
84void 80void
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index 4e5e27540e27..d3a41d5f8d12 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -1176,6 +1176,7 @@ tlb_purge_done:
1176 RESTORE_REG(cr.dcr, r25, r17);; 1176 RESTORE_REG(cr.dcr, r25, r17);;
1177 RESTORE_REG(cr.iva, r25, r17);; 1177 RESTORE_REG(cr.iva, r25, r17);;
1178 RESTORE_REG(cr.pta, r25, r17);; 1178 RESTORE_REG(cr.pta, r25, r17);;
1179 srlz.d;; // required not to violate RAW dependency
1179 RESTORE_REG(cr.itv, r25, r17);; 1180 RESTORE_REG(cr.itv, r25, r17);;
1180 RESTORE_REG(cr.pmv, r25, r17);; 1181 RESTORE_REG(cr.pmv, r25, r17);;
1181 RESTORE_REG(cr.cmcv, r25, r17);; 1182 RESTORE_REG(cr.cmcv, r25, r17);;
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 00a4599e5f47..0b52f19ed046 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -200,7 +200,7 @@ assign_irq_vector (int irq)
200{ 200{
201 unsigned long flags; 201 unsigned long flags;
202 int vector, cpu; 202 int vector, cpu;
203 cpumask_t domain; 203 cpumask_t domain = CPU_MASK_NONE;
204 204
205 vector = -ENOSPC; 205 vector = -ENOSPC;
206 206
@@ -340,7 +340,7 @@ int create_irq(void)
340{ 340{
341 unsigned long flags; 341 unsigned long flags;
342 int irq, vector, cpu; 342 int irq, vector, cpu;
343 cpumask_t domain; 343 cpumask_t domain = CPU_MASK_NONE;
344 344
345 irq = vector = -ENOSPC; 345 irq = vector = -ENOSPC;
346 spin_lock_irqsave(&vector_lock, flags); 346 spin_lock_irqsave(&vector_lock, flags);
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 10b48cd15a87..6dbf5919d2d0 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -75,6 +75,7 @@
75#include <linux/workqueue.h> 75#include <linux/workqueue.h>
76#include <linux/cpumask.h> 76#include <linux/cpumask.h>
77#include <linux/kdebug.h> 77#include <linux/kdebug.h>
78#include <linux/cpu.h>
78 79
79#include <asm/delay.h> 80#include <asm/delay.h>
80#include <asm/machvec.h> 81#include <asm/machvec.h>
@@ -1813,6 +1814,36 @@ ia64_mca_cpu_init(void *cpu_data)
1813 PAGE_KERNEL)); 1814 PAGE_KERNEL));
1814} 1815}
1815 1816
1817static void __cpuinit ia64_mca_cmc_vector_adjust(void *dummy)
1818{
1819 unsigned long flags;
1820
1821 local_irq_save(flags);
1822 if (!cmc_polling_enabled)
1823 ia64_mca_cmc_vector_enable(NULL);
1824 local_irq_restore(flags);
1825}
1826
1827static int __cpuinit mca_cpu_callback(struct notifier_block *nfb,
1828 unsigned long action,
1829 void *hcpu)
1830{
1831 int hotcpu = (unsigned long) hcpu;
1832
1833 switch (action) {
1834 case CPU_ONLINE:
1835 case CPU_ONLINE_FROZEN:
1836 smp_call_function_single(hotcpu, ia64_mca_cmc_vector_adjust,
1837 NULL, 1, 0);
1838 break;
1839 }
1840 return NOTIFY_OK;
1841}
1842
1843static struct notifier_block mca_cpu_notifier __cpuinitdata = {
1844 .notifier_call = mca_cpu_callback
1845};
1846
1816/* 1847/*
1817 * ia64_mca_init 1848 * ia64_mca_init
1818 * 1849 *
@@ -1996,6 +2027,8 @@ ia64_mca_late_init(void)
1996 if (!mca_init) 2027 if (!mca_init)
1997 return 0; 2028 return 0;
1998 2029
2030 register_hotcpu_notifier(&mca_cpu_notifier);
2031
1999 /* Setup the CMCI/P vector and handler */ 2032 /* Setup the CMCI/P vector and handler */
2000 init_timer(&cmc_poll_timer); 2033 init_timer(&cmc_poll_timer);
2001 cmc_poll_timer.function = ia64_mca_cmc_poll; 2034 cmc_poll_timer.function = ia64_mca_cmc_poll;
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 2418289ee5ca..7377d323131d 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -27,6 +27,7 @@
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <linux/kdebug.h> 29#include <linux/kdebug.h>
30#include <linux/utsname.h>
30 31
31#include <asm/cpu.h> 32#include <asm/cpu.h>
32#include <asm/delay.h> 33#include <asm/delay.h>
@@ -107,8 +108,9 @@ show_regs (struct pt_regs *regs)
107 print_modules(); 108 print_modules();
108 printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current), 109 printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current),
109 smp_processor_id(), current->comm); 110 smp_processor_id(), current->comm);
110 printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s\n", 111 printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n",
111 regs->cr_ipsr, regs->cr_ifs, ip, print_tainted()); 112 regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(),
113 init_utsname()->release);
112 print_symbol("ip is at %s\n", ip); 114 print_symbol("ip is at %s\n", ip);
113 printk("unat: %016lx pfs : %016lx rsc : %016lx\n", 115 printk("unat: %016lx pfs : %016lx rsc : %016lx\n",
114 regs->ar_unat, regs->ar_pfs, regs->ar_rsc); 116 regs->ar_unat, regs->ar_pfs, regs->ar_rsc);
@@ -737,6 +739,7 @@ flush_thread (void)
737 ia32_drop_ia64_partial_page_list(current); 739 ia32_drop_ia64_partial_page_list(current);
738 current->thread.task_size = IA32_PAGE_OFFSET; 740 current->thread.task_size = IA32_PAGE_OFFSET;
739 set_fs(USER_DS); 741 set_fs(USER_DS);
742 memset(current->thread.tls_array, 0, sizeof(current->thread.tls_array));
740 } 743 }
741#endif 744#endif
742} 745}
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 4c730099d58f..309da3567bc8 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -280,15 +280,7 @@ setup_sigcontext (struct sigcontext __user *sc, sigset_t *mask, struct sigscratc
280 err |= __copy_to_user(&sc->sc_gr[15], &scr->pt.r15, 8); /* r15 */ 280 err |= __copy_to_user(&sc->sc_gr[15], &scr->pt.r15, 8); /* r15 */
281 err |= __put_user(scr->pt.cr_iip + ia64_psr(&scr->pt)->ri, &sc->sc_ip); 281 err |= __put_user(scr->pt.cr_iip + ia64_psr(&scr->pt)->ri, &sc->sc_ip);
282 282
283 if (flags & IA64_SC_FLAG_IN_SYSCALL) { 283 if (!(flags & IA64_SC_FLAG_IN_SYSCALL)) {
284 /* Clear scratch registers if the signal interrupted a system call. */
285 err |= __put_user(0, &sc->sc_ar_ccv); /* ar.ccv */
286 err |= __put_user(0, &sc->sc_br[7]); /* b7 */
287 err |= __put_user(0, &sc->sc_gr[14]); /* r14 */
288 err |= __clear_user(&sc->sc_ar25, 2*8); /* ar.csd & ar.ssd */
289 err |= __clear_user(&sc->sc_gr[2], 2*8); /* r2-r3 */
290 err |= __clear_user(&sc->sc_gr[16], 16*8); /* r16-r31 */
291 } else {
292 /* Copy scratch regs to sigcontext if the signal didn't interrupt a syscall. */ 284 /* Copy scratch regs to sigcontext if the signal didn't interrupt a syscall. */
293 err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); /* ar.ccv */ 285 err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); /* ar.ccv */
294 err |= __put_user(scr->pt.b7, &sc->sc_br[7]); /* b7 */ 286 err |= __put_user(scr->pt.b7, &sc->sc_br[7]); /* b7 */
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c
index a7be4f203420..2a90c32024f4 100644
--- a/arch/ia64/kernel/uncached.c
+++ b/arch/ia64/kernel/uncached.c
@@ -118,7 +118,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
118 for (i = 0; i < (IA64_GRANULE_SIZE / PAGE_SIZE); i++) 118 for (i = 0; i < (IA64_GRANULE_SIZE / PAGE_SIZE); i++)
119 SetPageUncached(&page[i]); 119 SetPageUncached(&page[i]);
120 120
121 flush_tlb_kernel_range(uc_addr, uc_adddr + IA64_GRANULE_SIZE); 121 flush_tlb_kernel_range(uc_addr, uc_addr + IA64_GRANULE_SIZE);
122 122
123 status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); 123 status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);
124 if (status == PAL_VISIBILITY_OK_REMOTE_NEEDED) { 124 if (status == PAL_VISIBILITY_OK_REMOTE_NEEDED) {
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index cef164729db7..655da240d13c 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -10,6 +10,7 @@
10 * IPI based ptc implementation and A-step IPI implementation. 10 * IPI based ptc implementation and A-step IPI implementation.
11 * Rohit Seth <rohit.seth@intel.com> 11 * Rohit Seth <rohit.seth@intel.com>
12 * Ken Chen <kenneth.w.chen@intel.com> 12 * Ken Chen <kenneth.w.chen@intel.com>
13 * Christophe de Dinechin <ddd@hp.com>: Avoid ptc.e on memory allocation
13 */ 14 */
14#include <linux/module.h> 15#include <linux/module.h>
15#include <linux/init.h> 16#include <linux/init.h>
@@ -89,9 +90,16 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start,
89{ 90{
90 static DEFINE_SPINLOCK(ptcg_lock); 91 static DEFINE_SPINLOCK(ptcg_lock);
91 92
92 if (mm != current->active_mm || !current->mm) { 93 struct mm_struct *active_mm = current->active_mm;
93 flush_tlb_all(); 94
94 return; 95 if (mm != active_mm) {
96 /* Restore region IDs for mm */
97 if (mm && active_mm) {
98 activate_context(mm);
99 } else {
100 flush_tlb_all();
101 return;
102 }
95 } 103 }
96 104
97 /* HW requires global serialization of ptc.ga. */ 105 /* HW requires global serialization of ptc.ga. */
@@ -107,6 +115,10 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start,
107 } while (start < end); 115 } while (start < end);
108 } 116 }
109 spin_unlock(&ptcg_lock); 117 spin_unlock(&ptcg_lock);
118
119 if (mm != active_mm) {
120 activate_context(active_mm);
121 }
110} 122}
111 123
112void 124void
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c
index b362d6d6a8c8..9456d4034024 100644
--- a/arch/ia64/sn/kernel/bte.c
+++ b/arch/ia64/sn/kernel/bte.c
@@ -3,7 +3,7 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. 6 * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved.
7 */ 7 */
8 8
9#include <linux/module.h> 9#include <linux/module.h>
@@ -227,7 +227,7 @@ retry_bteop:
227 BTE_LNSTAT_LOAD(bte), *bte->most_rcnt_na)); 227 BTE_LNSTAT_LOAD(bte), *bte->most_rcnt_na));
228 228
229 if (transfer_stat & IBLS_ERROR) { 229 if (transfer_stat & IBLS_ERROR) {
230 bte_status = transfer_stat & ~IBLS_ERROR; 230 bte_status = BTE_GET_ERROR_STATUS(transfer_stat);
231 } else { 231 } else {
232 bte_status = BTE_SUCCESS; 232 bte_status = BTE_SUCCESS;
233 } 233 }
diff --git a/arch/ia64/sn/kernel/bte_error.c b/arch/ia64/sn/kernel/bte_error.c
index 27c5936ccfe9..4cb09f3f1efc 100644
--- a/arch/ia64/sn/kernel/bte_error.c
+++ b/arch/ia64/sn/kernel/bte_error.c
@@ -3,7 +3,7 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. 6 * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved.
7 */ 7 */
8 8
9#include <linux/types.h> 9#include <linux/types.h>
@@ -148,7 +148,11 @@ int shub2_bte_error_handler(unsigned long _nodepda)
148 for (i = 0; i < BTES_PER_NODE; i++) { 148 for (i = 0; i < BTES_PER_NODE; i++) {
149 bte = &err_nodepda->bte_if[i]; 149 bte = &err_nodepda->bte_if[i];
150 status = BTE_LNSTAT_LOAD(bte); 150 status = BTE_LNSTAT_LOAD(bte);
151 if ((status & IBLS_ERROR) || !(status & IBLS_BUSY)) 151 if (status & IBLS_ERROR) {
152 bte->bh_error = BTE_SHUB2_ERROR(status);
153 continue;
154 }
155 if (!(status & IBLS_BUSY))
152 continue; 156 continue;
153 mod_timer(recovery_timer, jiffies + (HZ * 5)); 157 mod_timer(recovery_timer, jiffies + (HZ * 5));
154 BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda, 158 BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda,
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index cee9379d44e0..e1a3e19d3d9c 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -41,7 +41,7 @@
41 * } else 41 * } else
42 * do desired mmr access 42 * do desired mmr access
43 * 43 *
44 * According to hw, we can use reads instead of writes to the above addres 44 * According to hw, we can use reads instead of writes to the above address
45 * 45 *
46 * Note this WAR can only to be used for accessing internal MMR's in the 46 * Note this WAR can only to be used for accessing internal MMR's in the
47 * TIOCE Coretalk Address Range 0x0 - 0x07ff_ffff. This includes the 47 * TIOCE Coretalk Address Range 0x0 - 0x07ff_ffff. This includes the