diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/cris/arch-v10 | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/cris/arch-v10')
-rw-r--r-- | arch/cris/arch-v10/README.mm | 2 | ||||
-rw-r--r-- | arch/cris/arch-v10/drivers/axisflashmap.c | 16 | ||||
-rw-r--r-- | arch/cris/arch-v10/drivers/ds1302.c | 8 | ||||
-rw-r--r-- | arch/cris/arch-v10/drivers/gpio.c | 1 | ||||
-rw-r--r-- | arch/cris/arch-v10/drivers/i2c.c | 1 | ||||
-rw-r--r-- | arch/cris/arch-v10/drivers/pcf8563.c | 9 | ||||
-rw-r--r-- | arch/cris/arch-v10/drivers/sync_serial.c | 16 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/entry.S | 1 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/irq.c | 41 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/ptrace.c | 20 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/time.c | 4 | ||||
-rw-r--r-- | arch/cris/arch-v10/mm/init.c | 2 |
13 files changed, 53 insertions, 70 deletions
diff --git a/arch/cris/arch-v10/README.mm b/arch/cris/arch-v10/README.mm index 517d1f027fe8..67731d75cb51 100644 --- a/arch/cris/arch-v10/README.mm +++ b/arch/cris/arch-v10/README.mm | |||
@@ -38,7 +38,7 @@ space. We also use it to keep the user-mode virtual mapping in the same | |||
38 | map during kernel-mode, so that the kernel easily can access the corresponding | 38 | map during kernel-mode, so that the kernel easily can access the corresponding |
39 | user-mode process' data. | 39 | user-mode process' data. |
40 | 40 | ||
41 | As a comparision, the Linux/i386 2.0 puts the kernel and physical RAM at | 41 | As a comparison, the Linux/i386 2.0 puts the kernel and physical RAM at |
42 | address 0, overlapping with the user-mode virtual space, so that descriptor | 42 | address 0, overlapping with the user-mode virtual space, so that descriptor |
43 | registers are needed for each memory access to specify which MMU space to | 43 | registers are needed for each memory access to specify which MMU space to |
44 | map through. That changed in 2.2, putting the kernel/physical RAM at | 44 | map through. That changed in 2.2, putting the kernel/physical RAM at |
diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c index b2079703af7e..a4bbdfd37bd8 100644 --- a/arch/cris/arch-v10/drivers/axisflashmap.c +++ b/arch/cris/arch-v10/drivers/axisflashmap.c | |||
@@ -234,7 +234,6 @@ static struct mtd_info *flash_probe(void) | |||
234 | } | 234 | } |
235 | 235 | ||
236 | if (mtd_cse0 && mtd_cse1) { | 236 | if (mtd_cse0 && mtd_cse1) { |
237 | #ifdef CONFIG_MTD_CONCAT | ||
238 | struct mtd_info *mtds[] = { mtd_cse0, mtd_cse1 }; | 237 | struct mtd_info *mtds[] = { mtd_cse0, mtd_cse1 }; |
239 | 238 | ||
240 | /* Since the concatenation layer adds a small overhead we | 239 | /* Since the concatenation layer adds a small overhead we |
@@ -246,11 +245,6 @@ static struct mtd_info *flash_probe(void) | |||
246 | */ | 245 | */ |
247 | mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds), | 246 | mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds), |
248 | "cse0+cse1"); | 247 | "cse0+cse1"); |
249 | #else | ||
250 | printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel " | ||
251 | "(mis)configuration!\n", map_cse0.name, map_cse1.name); | ||
252 | mtd_cse = NULL; | ||
253 | #endif | ||
254 | if (!mtd_cse) { | 248 | if (!mtd_cse) { |
255 | printk(KERN_ERR "%s and %s: Concatenation failed!\n", | 249 | printk(KERN_ERR "%s and %s: Concatenation failed!\n", |
256 | map_cse0.name, map_cse1.name); | 250 | map_cse0.name, map_cse1.name); |
@@ -378,7 +372,7 @@ static int __init init_axis_flash(void) | |||
378 | #ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE | 372 | #ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE |
379 | if (mymtd) { | 373 | if (mymtd) { |
380 | main_partition.size = mymtd->size; | 374 | main_partition.size = mymtd->size; |
381 | err = add_mtd_partitions(mymtd, &main_partition, 1); | 375 | err = mtd_device_register(mymtd, &main_partition, 1); |
382 | if (err) | 376 | if (err) |
383 | panic("axisflashmap: Could not initialize " | 377 | panic("axisflashmap: Could not initialize " |
384 | "partition for whole main mtd device!\n"); | 378 | "partition for whole main mtd device!\n"); |
@@ -388,10 +382,12 @@ static int __init init_axis_flash(void) | |||
388 | if (mymtd) { | 382 | if (mymtd) { |
389 | if (use_default_ptable) { | 383 | if (use_default_ptable) { |
390 | printk(KERN_INFO " Using default partition table.\n"); | 384 | printk(KERN_INFO " Using default partition table.\n"); |
391 | err = add_mtd_partitions(mymtd, axis_default_partitions, | 385 | err = mtd_device_register(mymtd, |
392 | NUM_DEFAULT_PARTITIONS); | 386 | axis_default_partitions, |
387 | NUM_DEFAULT_PARTITIONS); | ||
393 | } else { | 388 | } else { |
394 | err = add_mtd_partitions(mymtd, axis_partitions, pidx); | 389 | err = mtd_device_register(mymtd, axis_partitions, |
390 | pidx); | ||
395 | } | 391 | } |
396 | 392 | ||
397 | if (err) | 393 | if (err) |
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c index 884275629ef7..3d655dcc65da 100644 --- a/arch/cris/arch-v10/drivers/ds1302.c +++ b/arch/cris/arch-v10/drivers/ds1302.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/miscdevice.h> | 20 | #include <linux/miscdevice.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/smp_lock.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/bcd.h> | 23 | #include <linux/bcd.h> |
24 | #include <linux/capability.h> | 24 | #include <linux/capability.h> |
25 | 25 | ||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #define RTC_MAJOR_NR 121 /* local major, change later */ | 35 | #define RTC_MAJOR_NR 121 /* local major, change later */ |
36 | 36 | ||
37 | static DEFINE_MUTEX(ds1302_mutex); | ||
37 | static const char ds1302_name[] = "ds1302"; | 38 | static const char ds1302_name[] = "ds1302"; |
38 | 39 | ||
39 | /* The DS1302 might be connected to different bits on different products. | 40 | /* The DS1302 might be connected to different bits on different products. |
@@ -357,9 +358,9 @@ static long rtc_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned lon | |||
357 | { | 358 | { |
358 | int ret; | 359 | int ret; |
359 | 360 | ||
360 | lock_kernel(); | 361 | mutex_lock(&ds1302_mutex); |
361 | ret = rtc_ioctl(file, cmd, arg); | 362 | ret = rtc_ioctl(file, cmd, arg); |
362 | unlock_kernel(); | 363 | mutex_unlock(&ds1302_mutex); |
363 | 364 | ||
364 | return ret; | 365 | return ret; |
365 | } | 366 | } |
@@ -387,6 +388,7 @@ print_rtc_status(void) | |||
387 | static const struct file_operations rtc_fops = { | 388 | static const struct file_operations rtc_fops = { |
388 | .owner = THIS_MODULE, | 389 | .owner = THIS_MODULE, |
389 | .unlocked_ioctl = rtc_unlocked_ioctl, | 390 | .unlocked_ioctl = rtc_unlocked_ioctl, |
391 | .llseek = noop_llseek, | ||
390 | }; | 392 | }; |
391 | 393 | ||
392 | /* Probe for the chip by writing something to its RAM and try reading it back. */ | 394 | /* Probe for the chip by writing something to its RAM and try reading it back. */ |
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c index a07b6d25b0c7..a276f0811731 100644 --- a/arch/cris/arch-v10/drivers/gpio.c +++ b/arch/cris/arch-v10/drivers/gpio.c | |||
@@ -745,6 +745,7 @@ static const struct file_operations gpio_fops = { | |||
745 | .write = gpio_write, | 745 | .write = gpio_write, |
746 | .open = gpio_open, | 746 | .open = gpio_open, |
747 | .release = gpio_release, | 747 | .release = gpio_release, |
748 | .llseek = noop_llseek, | ||
748 | }; | 749 | }; |
749 | 750 | ||
750 | static void ioif_watcher(const unsigned int gpio_in_available, | 751 | static void ioif_watcher(const unsigned int gpio_in_available, |
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c index 77a941813819..c413539d4205 100644 --- a/arch/cris/arch-v10/drivers/i2c.c +++ b/arch/cris/arch-v10/drivers/i2c.c | |||
@@ -617,6 +617,7 @@ static const struct file_operations i2c_fops = { | |||
617 | .unlocked_ioctl = i2c_ioctl, | 617 | .unlocked_ioctl = i2c_ioctl, |
618 | .open = i2c_open, | 618 | .open = i2c_open, |
619 | .release = i2c_release, | 619 | .release = i2c_release, |
620 | .llseek = noop_llseek, | ||
620 | }; | 621 | }; |
621 | 622 | ||
622 | int __init | 623 | int __init |
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index 7dcb1f85f42b..1391b731ad1c 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/bcd.h> | 28 | #include <linux/bcd.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/smp_lock.h> | ||
31 | 30 | ||
32 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
33 | #include <asm/system.h> | 32 | #include <asm/system.h> |
@@ -49,6 +48,7 @@ | |||
49 | #define rtc_read(x) i2c_readreg(RTC_I2C_READ, x) | 48 | #define rtc_read(x) i2c_readreg(RTC_I2C_READ, x) |
50 | #define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y) | 49 | #define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y) |
51 | 50 | ||
51 | static DEFINE_MUTEX(pcf8563_mutex); | ||
52 | static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ | 52 | static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ |
53 | 53 | ||
54 | static const unsigned char days_in_month[] = | 54 | static const unsigned char days_in_month[] = |
@@ -64,6 +64,7 @@ static int voltage_low; | |||
64 | static const struct file_operations pcf8563_fops = { | 64 | static const struct file_operations pcf8563_fops = { |
65 | .owner = THIS_MODULE, | 65 | .owner = THIS_MODULE, |
66 | .unlocked_ioctl = pcf8563_unlocked_ioctl, | 66 | .unlocked_ioctl = pcf8563_unlocked_ioctl, |
67 | .llseek = noop_llseek, | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | unsigned char | 70 | unsigned char |
@@ -343,9 +344,9 @@ static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned | |||
343 | { | 344 | { |
344 | int ret; | 345 | int ret; |
345 | 346 | ||
346 | lock_kernel(); | 347 | mutex_lock(&pcf8563_mutex); |
347 | return pcf8563_ioctl(filp, cmd, arg); | 348 | ret = pcf8563_ioctl(filp, cmd, arg); |
348 | unlock_kernel(); | 349 | mutex_unlock(&pcf8563_mutex); |
349 | 350 | ||
350 | return ret; | 351 | return ret; |
351 | } | 352 | } |
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c index ee2dd4323daf..850265373611 100644 --- a/arch/cris/arch-v10/drivers/sync_serial.c +++ b/arch/cris/arch-v10/drivers/sync_serial.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/smp_lock.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/dma.h> | 26 | #include <asm/dma.h> |
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/sync_serial.h> | 31 | #include <asm/sync_serial.h> |
32 | #include <arch/io_interface_mux.h> | 32 | #include <arch/io_interface_mux.h> |
33 | 33 | ||
34 | /* The receiver is a bit tricky beacuse of the continuous stream of data.*/ | 34 | /* The receiver is a bit tricky because of the continuous stream of data.*/ |
35 | /* */ | 35 | /* */ |
36 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ | 36 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ |
37 | /* responsible for port->bufchunk of a common buffer. */ | 37 | /* responsible for port->bufchunk of a common buffer. */ |
@@ -149,6 +149,7 @@ struct sync_port { | |||
149 | }; | 149 | }; |
150 | 150 | ||
151 | 151 | ||
152 | static DEFINE_MUTEX(sync_serial_mutex); | ||
152 | static int etrax_sync_serial_init(void); | 153 | static int etrax_sync_serial_init(void); |
153 | static void initialize_port(int portnbr); | 154 | static void initialize_port(int portnbr); |
154 | static inline int sync_data_avail(struct sync_port *port); | 155 | static inline int sync_data_avail(struct sync_port *port); |
@@ -250,7 +251,8 @@ static const struct file_operations sync_serial_fops = { | |||
250 | .poll = sync_serial_poll, | 251 | .poll = sync_serial_poll, |
251 | .unlocked_ioctl = sync_serial_ioctl, | 252 | .unlocked_ioctl = sync_serial_ioctl, |
252 | .open = sync_serial_open, | 253 | .open = sync_serial_open, |
253 | .release = sync_serial_release | 254 | .release = sync_serial_release, |
255 | .llseek = noop_llseek, | ||
254 | }; | 256 | }; |
255 | 257 | ||
256 | static int __init etrax_sync_serial_init(void) | 258 | static int __init etrax_sync_serial_init(void) |
@@ -445,7 +447,7 @@ static int sync_serial_open(struct inode *inode, struct file *file) | |||
445 | int mode; | 447 | int mode; |
446 | int err = -EBUSY; | 448 | int err = -EBUSY; |
447 | 449 | ||
448 | lock_kernel(); | 450 | mutex_lock(&sync_serial_mutex); |
449 | DEBUG(printk(KERN_DEBUG "Open sync serial port %d\n", dev)); | 451 | DEBUG(printk(KERN_DEBUG "Open sync serial port %d\n", dev)); |
450 | 452 | ||
451 | if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) { | 453 | if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) { |
@@ -626,7 +628,7 @@ static int sync_serial_open(struct inode *inode, struct file *file) | |||
626 | ret = 0; | 628 | ret = 0; |
627 | 629 | ||
628 | out: | 630 | out: |
629 | unlock_kernel(); | 631 | mutex_unlock(&sync_serial_mutex); |
630 | return ret; | 632 | return ret; |
631 | } | 633 | } |
632 | 634 | ||
@@ -961,9 +963,9 @@ static long sync_serial_ioctl(struct file *file, | |||
961 | { | 963 | { |
962 | long ret; | 964 | long ret; |
963 | 965 | ||
964 | lock_kernel(); | 966 | mutex_lock(&sync_serial_mutex); |
965 | ret = sync_serial_ioctl_unlocked(file, cmd, arg); | 967 | ret = sync_serial_ioctl_unlocked(file, cmd, arg); |
966 | unlock_kernel(); | 968 | mutex_unlock(&sync_serial_mutex); |
967 | 969 | ||
968 | return ret; | 970 | return ret; |
969 | } | 971 | } |
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index 0d6420d087fd..1161883eb582 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S | |||
@@ -937,6 +937,7 @@ sys_call_table: | |||
937 | .long sys_inotify_init1 | 937 | .long sys_inotify_init1 |
938 | .long sys_preadv | 938 | .long sys_preadv |
939 | .long sys_pwritev | 939 | .long sys_pwritev |
940 | .long sys_setns /* 335 */ | ||
940 | 941 | ||
941 | /* | 942 | /* |
942 | * NOTE!! This doesn't have to be exact - we just have | 943 | * NOTE!! This doesn't have to be exact - we just have |
diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c index a0c0df8be9c8..907cfb5a873d 100644 --- a/arch/cris/arch-v10/kernel/irq.c +++ b/arch/cris/arch-v10/kernel/irq.c | |||
@@ -104,43 +104,21 @@ static void (*interrupt[NR_IRQS])(void) = { | |||
104 | IRQ31_interrupt | 104 | IRQ31_interrupt |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static void enable_crisv10_irq(unsigned int irq); | 107 | static void enable_crisv10_irq(struct irq_data *data) |
108 | |||
109 | static unsigned int startup_crisv10_irq(unsigned int irq) | ||
110 | { | ||
111 | enable_crisv10_irq(irq); | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | #define shutdown_crisv10_irq disable_crisv10_irq | ||
116 | |||
117 | static void enable_crisv10_irq(unsigned int irq) | ||
118 | { | ||
119 | crisv10_unmask_irq(irq); | ||
120 | } | ||
121 | |||
122 | static void disable_crisv10_irq(unsigned int irq) | ||
123 | { | ||
124 | crisv10_mask_irq(irq); | ||
125 | } | ||
126 | |||
127 | static void ack_crisv10_irq(unsigned int irq) | ||
128 | { | 108 | { |
109 | crisv10_unmask_irq(data->irq); | ||
129 | } | 110 | } |
130 | 111 | ||
131 | static void end_crisv10_irq(unsigned int irq) | 112 | static void disable_crisv10_irq(struct irq_data *data) |
132 | { | 113 | { |
114 | crisv10_mask_irq(data->irq); | ||
133 | } | 115 | } |
134 | 116 | ||
135 | static struct irq_chip crisv10_irq_type = { | 117 | static struct irq_chip crisv10_irq_type = { |
136 | .name = "CRISv10", | 118 | .name = "CRISv10", |
137 | .startup = startup_crisv10_irq, | 119 | .irq_shutdown = disable_crisv10_irq, |
138 | .shutdown = shutdown_crisv10_irq, | 120 | .irq_enable = enable_crisv10_irq, |
139 | .enable = enable_crisv10_irq, | 121 | .irq_disable = disable_crisv10_irq, |
140 | .disable = disable_crisv10_irq, | ||
141 | .ack = ack_crisv10_irq, | ||
142 | .end = end_crisv10_irq, | ||
143 | .set_affinity = NULL | ||
144 | }; | 122 | }; |
145 | 123 | ||
146 | void weird_irq(void); | 124 | void weird_irq(void); |
@@ -221,7 +199,8 @@ init_IRQ(void) | |||
221 | 199 | ||
222 | /* Initialize IRQ handler descriptors. */ | 200 | /* Initialize IRQ handler descriptors. */ |
223 | for(i = 2; i < NR_IRQS; i++) { | 201 | for(i = 2; i < NR_IRQS; i++) { |
224 | irq_desc[i].chip = &crisv10_irq_type; | 202 | irq_set_chip_and_handler(i, &crisv10_irq_type, |
203 | handle_simple_irq); | ||
225 | set_int_vector(i, interrupt[i]); | 204 | set_int_vector(i, interrupt[i]); |
226 | } | 205 | } |
227 | 206 | ||
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index e70c804e9377..320065f3cbe5 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c | |||
@@ -76,9 +76,11 @@ ptrace_disable(struct task_struct *child) | |||
76 | * (in user space) where the result of the ptrace call is written (instead of | 76 | * (in user space) where the result of the ptrace call is written (instead of |
77 | * being returned). | 77 | * being returned). |
78 | */ | 78 | */ |
79 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 79 | long arch_ptrace(struct task_struct *child, long request, |
80 | unsigned long addr, unsigned long data) | ||
80 | { | 81 | { |
81 | int ret; | 82 | int ret; |
83 | unsigned int regno = addr >> 2; | ||
82 | unsigned long __user *datap = (unsigned long __user *)data; | 84 | unsigned long __user *datap = (unsigned long __user *)data; |
83 | 85 | ||
84 | switch (request) { | 86 | switch (request) { |
@@ -93,10 +95,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
93 | unsigned long tmp; | 95 | unsigned long tmp; |
94 | 96 | ||
95 | ret = -EIO; | 97 | ret = -EIO; |
96 | if ((addr & 3) || addr < 0 || addr > PT_MAX << 2) | 98 | if ((addr & 3) || regno > PT_MAX) |
97 | break; | 99 | break; |
98 | 100 | ||
99 | tmp = get_reg(child, addr >> 2); | 101 | tmp = get_reg(child, regno); |
100 | ret = put_user(tmp, datap); | 102 | ret = put_user(tmp, datap); |
101 | break; | 103 | break; |
102 | } | 104 | } |
@@ -110,19 +112,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
110 | /* Write the word at location address in the USER area. */ | 112 | /* Write the word at location address in the USER area. */ |
111 | case PTRACE_POKEUSR: | 113 | case PTRACE_POKEUSR: |
112 | ret = -EIO; | 114 | ret = -EIO; |
113 | if ((addr & 3) || addr < 0 || addr > PT_MAX << 2) | 115 | if ((addr & 3) || regno > PT_MAX) |
114 | break; | 116 | break; |
115 | 117 | ||
116 | addr >>= 2; | 118 | if (regno == PT_DCCR) { |
117 | |||
118 | if (addr == PT_DCCR) { | ||
119 | /* don't allow the tracing process to change stuff like | 119 | /* don't allow the tracing process to change stuff like |
120 | * interrupt enable, kernel/user bit, dma enables etc. | 120 | * interrupt enable, kernel/user bit, dma enables etc. |
121 | */ | 121 | */ |
122 | data &= DCCR_MASK; | 122 | data &= DCCR_MASK; |
123 | data |= get_reg(child, PT_DCCR) & ~DCCR_MASK; | 123 | data |= get_reg(child, PT_DCCR) & ~DCCR_MASK; |
124 | } | 124 | } |
125 | if (put_reg(child, addr, data)) | 125 | if (put_reg(child, regno, data)) |
126 | break; | 126 | break; |
127 | ret = 0; | 127 | ret = 0; |
128 | break; | 128 | break; |
@@ -141,7 +141,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
141 | break; | 141 | break; |
142 | } | 142 | } |
143 | 143 | ||
144 | data += sizeof(long); | 144 | datap++; |
145 | } | 145 | } |
146 | 146 | ||
147 | break; | 147 | break; |
@@ -165,7 +165,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
165 | } | 165 | } |
166 | 166 | ||
167 | put_reg(child, i, tmp); | 167 | put_reg(child, i, tmp); |
168 | data += sizeof(long); | 168 | datap++; |
169 | } | 169 | } |
170 | 170 | ||
171 | break; | 171 | break; |
diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c index b6be705c2a3e..e78fe49a9849 100644 --- a/arch/cris/arch-v10/kernel/signal.c +++ b/arch/cris/arch-v10/kernel/signal.c | |||
@@ -537,7 +537,7 @@ void do_signal(int canrestart, struct pt_regs *regs) | |||
537 | RESTART_CRIS_SYS(regs); | 537 | RESTART_CRIS_SYS(regs); |
538 | } | 538 | } |
539 | if (regs->r10 == -ERESTART_RESTARTBLOCK) { | 539 | if (regs->r10 == -ERESTART_RESTARTBLOCK) { |
540 | regs->r10 = __NR_restart_syscall; | 540 | regs->r9 = __NR_restart_syscall; |
541 | regs->irp -= 2; | 541 | regs->irp -= 2; |
542 | } | 542 | } |
543 | } | 543 | } |
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index 00eb36f8debf..20c85b5dc7d0 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c | |||
@@ -140,7 +140,7 @@ stop_watchdog(void) | |||
140 | 140 | ||
141 | /* | 141 | /* |
142 | * timer_interrupt() needs to keep up the real-time clock, | 142 | * timer_interrupt() needs to keep up the real-time clock, |
143 | * as well as call the "do_timer()" routine every clocktick | 143 | * as well as call the "xtime_update()" routine every clocktick |
144 | */ | 144 | */ |
145 | 145 | ||
146 | //static unsigned short myjiff; /* used by our debug routine print_timestamp */ | 146 | //static unsigned short myjiff; /* used by our debug routine print_timestamp */ |
@@ -176,7 +176,7 @@ timer_interrupt(int irq, void *dev_id) | |||
176 | 176 | ||
177 | /* call the real timer interrupt handler */ | 177 | /* call the real timer interrupt handler */ |
178 | 178 | ||
179 | do_timer(1); | 179 | xtime_update(1); |
180 | 180 | ||
181 | cris_do_profile(regs); /* Save profiling information */ | 181 | cris_do_profile(regs); /* Save profiling information */ |
182 | return IRQ_HANDLED; | 182 | return IRQ_HANDLED; |
diff --git a/arch/cris/arch-v10/mm/init.c b/arch/cris/arch-v10/mm/init.c index baa746ce4e74..e7f8066105aa 100644 --- a/arch/cris/arch-v10/mm/init.c +++ b/arch/cris/arch-v10/mm/init.c | |||
@@ -241,7 +241,7 @@ flush_etrax_cacherange(void *startadr, int length) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | /* Due to a bug in Etrax100(LX) all versions, receiving DMA buffers | 243 | /* Due to a bug in Etrax100(LX) all versions, receiving DMA buffers |
244 | * will occationally corrupt certain CPU writes if the DMA buffers | 244 | * will occasionally corrupt certain CPU writes if the DMA buffers |
245 | * happen to be hot in the cache. | 245 | * happen to be hot in the cache. |
246 | * | 246 | * |
247 | * As a workaround, we have to flush the relevant parts of the cache | 247 | * As a workaround, we have to flush the relevant parts of the cache |