aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/arch-v10/drivers/pcf8563.c4
-rw-r--r--arch/cris/arch-v10/kernel/ptrace.c21
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c4
-rw-r--r--arch/cris/arch-v32/drivers/pci/dma.c6
-rw-r--r--arch/cris/arch-v32/kernel/ptrace.c7
-rw-r--r--arch/cris/arch-v32/vmlinux.lds.S5
-rw-r--r--arch/cris/mm/fault.c23
7 files changed, 21 insertions, 49 deletions
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c
index d47cfbf98d6e..1de0026bb94e 100644
--- a/arch/cris/arch-v10/drivers/pcf8563.c
+++ b/arch/cris/arch-v10/drivers/pcf8563.c
@@ -180,9 +180,7 @@ err:
180void __exit 180void __exit
181pcf8563_exit(void) 181pcf8563_exit(void)
182{ 182{
183 if (unregister_chrdev(PCF8563_MAJOR, DEVICE_NAME) < 0) { 183 unregister_chrdev(PCF8563_MAJOR, DEVICE_NAME);
184 printk(KERN_INFO "%s: Unable to unregister device.\n", PCF8563_NAME);
185 }
186} 184}
187 185
188/* 186/*
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c
index fd2129a04586..f4f9db698b44 100644
--- a/arch/cris/arch-v10/kernel/ptrace.c
+++ b/arch/cris/arch-v10/kernel/ptrace.c
@@ -83,19 +83,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
83 switch (request) { 83 switch (request) {
84 /* Read word at location address. */ 84 /* Read word at location address. */
85 case PTRACE_PEEKTEXT: 85 case PTRACE_PEEKTEXT:
86 case PTRACE_PEEKDATA: { 86 case PTRACE_PEEKDATA:
87 unsigned long tmp; 87 ret = generic_ptrace_peekdata(child, addr, data);
88 int copied;
89
90 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
91 ret = -EIO;
92
93 if (copied != sizeof(tmp))
94 break;
95
96 ret = put_user(tmp,datap);
97 break; 88 break;
98 }
99 89
100 /* Read the word at location address in the USER area. */ 90 /* Read the word at location address in the USER area. */
101 case PTRACE_PEEKUSR: { 91 case PTRACE_PEEKUSR: {
@@ -113,12 +103,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
113 /* Write the word at location address. */ 103 /* Write the word at location address. */
114 case PTRACE_POKETEXT: 104 case PTRACE_POKETEXT:
115 case PTRACE_POKEDATA: 105 case PTRACE_POKEDATA:
116 ret = 0; 106 ret = generic_ptrace_pokedata(child, addr, data);
117
118 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
119 break;
120
121 ret = -EIO;
122 break; 107 break;
123 108
124 /* Write the word at location address in the USER area. */ 109 /* Write the word at location address in the USER area. */
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index fa8d50007e4c..da479a14f836 100644
--- a/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/arch/cris/arch-v32/drivers/pcf8563.c
@@ -193,9 +193,7 @@ err:
193void __exit 193void __exit
194pcf8563_exit(void) 194pcf8563_exit(void)
195{ 195{
196 if (unregister_chrdev(PCF8563_MAJOR, DEVICE_NAME) < 0) { 196 unregister_chrdev(PCF8563_MAJOR, DEVICE_NAME);
197 printk(KERN_INFO "%s: Unable to unregister device.\n", PCF8563_NAME);
198 }
199} 197}
200 198
201/* 199/*
diff --git a/arch/cris/arch-v32/drivers/pci/dma.c b/arch/cris/arch-v32/drivers/pci/dma.c
index 832fc63504d4..66f9500fbc02 100644
--- a/arch/cris/arch-v32/drivers/pci/dma.c
+++ b/arch/cris/arch-v32/drivers/pci/dma.c
@@ -91,14 +91,12 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
91 if (!mem_base) 91 if (!mem_base)
92 goto out; 92 goto out;
93 93
94 dev->dma_mem = kmalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); 94 dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
95 if (!dev->dma_mem) 95 if (!dev->dma_mem)
96 goto out; 96 goto out;
97 memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem)); 97 dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
98 dev->dma_mem->bitmap = kmalloc(bitmap_size, GFP_KERNEL);
99 if (!dev->dma_mem->bitmap) 98 if (!dev->dma_mem->bitmap)
100 goto free1_out; 99 goto free1_out;
101 memset(dev->dma_mem->bitmap, 0, bitmap_size);
102 100
103 dev->dma_mem->virt_base = mem_base; 101 dev->dma_mem->virt_base = mem_base;
104 dev->dma_mem->device_base = device_addr; 102 dev->dma_mem->device_base = device_addr;
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c
index d4d57b741334..38ece0cd47cb 100644
--- a/arch/cris/arch-v32/kernel/ptrace.c
+++ b/arch/cris/arch-v32/kernel/ptrace.c
@@ -146,12 +146,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
146 /* Write the word at location address. */ 146 /* Write the word at location address. */
147 case PTRACE_POKETEXT: 147 case PTRACE_POKETEXT:
148 case PTRACE_POKEDATA: 148 case PTRACE_POKEDATA:
149 ret = 0; 149 ret = generic_ptrace_pokedata(child, addr, data);
150
151 if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
152 break;
153
154 ret = -EIO;
155 break; 150 break;
156 151
157 /* Write the word at location address in the USER area. */ 152 /* Write the word at location address in the USER area. */
diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S
index e3a32ac17ab2..b076c134c0bb 100644
--- a/arch/cris/arch-v32/vmlinux.lds.S
+++ b/arch/cris/arch-v32/vmlinux.lds.S
@@ -91,10 +91,7 @@ SECTIONS
91 } 91 }
92 SECURITY_INIT 92 SECURITY_INIT
93 93
94 . = ALIGN (8192); 94 PERCPU(8192)
95 __per_cpu_start = .;
96 .data.percpu : { *(.data.percpu) }
97 __per_cpu_end = .;
98 95
99#ifdef CONFIG_BLK_DEV_INITRD 96#ifdef CONFIG_BLK_DEV_INITRD
100 .init.ramfs : { 97 .init.ramfs : {
diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c
index c73e91f1299a..8672ab7d7978 100644
--- a/arch/cris/mm/fault.c
+++ b/arch/cris/mm/fault.c
@@ -179,6 +179,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
179 struct mm_struct *mm; 179 struct mm_struct *mm;
180 struct vm_area_struct * vma; 180 struct vm_area_struct * vma;
181 siginfo_t info; 181 siginfo_t info;
182 int fault;
182 183
183 D(printk("Page fault for %lX on %X at %lX, prot %d write %d\n", 184 D(printk("Page fault for %lX on %X at %lX, prot %d write %d\n",
184 address, smp_processor_id(), instruction_pointer(regs), 185 address, smp_processor_id(), instruction_pointer(regs),
@@ -283,18 +284,18 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
283 * the fault. 284 * the fault.
284 */ 285 */
285 286
286 switch (handle_mm_fault(mm, vma, address, writeaccess & 1)) { 287 fault = handle_mm_fault(mm, vma, address, writeaccess & 1);
287 case VM_FAULT_MINOR: 288 if (unlikely(fault & VM_FAULT_ERROR)) {
288 tsk->min_flt++; 289 if (fault & VM_FAULT_OOM)
289 break; 290 goto out_of_memory;
290 case VM_FAULT_MAJOR: 291 else if (fault & VM_FAULT_SIGBUS)
291 tsk->maj_flt++; 292 goto do_sigbus;
292 break; 293 BUG();
293 case VM_FAULT_SIGBUS:
294 goto do_sigbus;
295 default:
296 goto out_of_memory;
297 } 294 }
295 if (fault & VM_FAULT_MAJOR)
296 tsk->maj_flt++;
297 else
298 tsk->min_flt++;
298 299
299 up_read(&mm->mmap_sem); 300 up_read(&mm->mmap_sem);
300 return; 301 return;