diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/amiga/Makefile | 2 | ||||
-rw-r--r-- | arch/m68k/amiga/platform.c | 83 | ||||
-rw-r--r-- | arch/m68k/bvme6000/rtc.c | 29 | ||||
-rw-r--r-- | arch/m68k/hp300/time.h | 4 | ||||
-rw-r--r-- | arch/m68k/include/asm/atomic_mm.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/atomic_no.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/bitops_mm.h | 14 | ||||
-rw-r--r-- | arch/m68k/include/asm/param.h | 16 | ||||
-rw-r--r-- | arch/m68k/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/m68k/mac/config.c | 10 | ||||
-rw-r--r-- | arch/m68k/mm/fault.c | 14 | ||||
-rw-r--r-- | arch/m68k/mvme16x/rtc.c | 19 | ||||
-rw-r--r-- | arch/m68k/q40/config.c | 2 |
13 files changed, 121 insertions, 78 deletions
diff --git a/arch/m68k/amiga/Makefile b/arch/m68k/amiga/Makefile index 6a0d7650f980..11dd30b16b3b 100644 --- a/arch/m68k/amiga/Makefile +++ b/arch/m68k/amiga/Makefile | |||
@@ -2,6 +2,6 @@ | |||
2 | # Makefile for Linux arch/m68k/amiga source directory | 2 | # Makefile for Linux arch/m68k/amiga source directory |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := config.o amiints.o cia.o chipram.o amisound.o | 5 | obj-y := config.o amiints.o cia.o chipram.o amisound.o platform.o |
6 | 6 | ||
7 | obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o | 7 | obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o |
diff --git a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c new file mode 100644 index 000000000000..38f18bf14737 --- /dev/null +++ b/arch/m68k/amiga/platform.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2009 Geert Uytterhoeven | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file COPYING in the main directory of this archive | ||
6 | * for more details. | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/zorro.h> | ||
12 | |||
13 | #include <asm/amigahw.h> | ||
14 | |||
15 | |||
16 | #ifdef CONFIG_ZORRO | ||
17 | |||
18 | static const struct resource zorro_resources[] __initconst = { | ||
19 | /* Zorro II regions (on Zorro II/III) */ | ||
20 | { | ||
21 | .name = "Zorro II exp", | ||
22 | .start = 0x00e80000, | ||
23 | .end = 0x00efffff, | ||
24 | .flags = IORESOURCE_MEM, | ||
25 | }, { | ||
26 | .name = "Zorro II mem", | ||
27 | .start = 0x00200000, | ||
28 | .end = 0x009fffff, | ||
29 | .flags = IORESOURCE_MEM, | ||
30 | }, | ||
31 | /* Zorro III regions (on Zorro III only) */ | ||
32 | { | ||
33 | .name = "Zorro III exp", | ||
34 | .start = 0xff000000, | ||
35 | .end = 0xffffffff, | ||
36 | .flags = IORESOURCE_MEM, | ||
37 | }, { | ||
38 | .name = "Zorro III cfg", | ||
39 | .start = 0x40000000, | ||
40 | .end = 0x7fffffff, | ||
41 | .flags = IORESOURCE_MEM, | ||
42 | } | ||
43 | }; | ||
44 | |||
45 | |||
46 | static int __init amiga_init_bus(void) | ||
47 | { | ||
48 | if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO)) | ||
49 | return -ENODEV; | ||
50 | |||
51 | platform_device_register_simple("amiga-zorro", -1, zorro_resources, | ||
52 | AMIGAHW_PRESENT(ZORRO3) ? 4 : 2); | ||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | subsys_initcall(amiga_init_bus); | ||
57 | |||
58 | #endif /* CONFIG_ZORRO */ | ||
59 | |||
60 | |||
61 | static int __init amiga_init_devices(void) | ||
62 | { | ||
63 | if (!MACH_IS_AMIGA) | ||
64 | return -ENODEV; | ||
65 | |||
66 | /* video hardware */ | ||
67 | if (AMIGAHW_PRESENT(AMI_VIDEO)) | ||
68 | platform_device_register_simple("amiga-video", -1, NULL, 0); | ||
69 | |||
70 | |||
71 | /* sound hardware */ | ||
72 | if (AMIGAHW_PRESENT(AMI_AUDIO)) | ||
73 | platform_device_register_simple("amiga-audio", -1, NULL, 0); | ||
74 | |||
75 | |||
76 | /* storage interfaces */ | ||
77 | if (AMIGAHW_PRESENT(AMI_FLOPPY)) | ||
78 | platform_device_register_simple("amiga-floppy", -1, NULL, 0); | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | device_initcall(amiga_init_devices); | ||
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index b46ea1714a89..cb8617bb194b 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/miscdevice.h> | 11 | #include <linux/miscdevice.h> |
12 | #include <linux/smp_lock.h> | ||
13 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
14 | #include <linux/capability.h> | 13 | #include <linux/capability.h> |
15 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
@@ -35,10 +34,9 @@ | |||
35 | static unsigned char days_in_mo[] = | 34 | static unsigned char days_in_mo[] = |
36 | {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; | 35 | {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; |
37 | 36 | ||
38 | static char rtc_status; | 37 | static atomic_t rtc_status = ATOMIC_INIT(1); |
39 | 38 | ||
40 | static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 39 | static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
41 | unsigned long arg) | ||
42 | { | 40 | { |
43 | volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; | 41 | volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; |
44 | unsigned char msr; | 42 | unsigned char msr; |
@@ -132,29 +130,20 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
132 | } | 130 | } |
133 | 131 | ||
134 | /* | 132 | /* |
135 | * We enforce only one user at a time here with the open/close. | 133 | * We enforce only one user at a time here with the open/close. |
136 | * Also clear the previous interrupt data on an open, and clean | ||
137 | * up things on a close. | ||
138 | */ | 134 | */ |
139 | |||
140 | static int rtc_open(struct inode *inode, struct file *file) | 135 | static int rtc_open(struct inode *inode, struct file *file) |
141 | { | 136 | { |
142 | lock_kernel(); | 137 | if (!atomic_dec_and_test(&rtc_status)) { |
143 | if(rtc_status) { | 138 | atomic_inc(&rtc_status); |
144 | unlock_kernel(); | ||
145 | return -EBUSY; | 139 | return -EBUSY; |
146 | } | 140 | } |
147 | |||
148 | rtc_status = 1; | ||
149 | unlock_kernel(); | ||
150 | return 0; | 141 | return 0; |
151 | } | 142 | } |
152 | 143 | ||
153 | static int rtc_release(struct inode *inode, struct file *file) | 144 | static int rtc_release(struct inode *inode, struct file *file) |
154 | { | 145 | { |
155 | lock_kernel(); | 146 | atomic_inc(&rtc_status); |
156 | rtc_status = 0; | ||
157 | unlock_kernel(); | ||
158 | return 0; | 147 | return 0; |
159 | } | 148 | } |
160 | 149 | ||
@@ -163,9 +152,9 @@ static int rtc_release(struct inode *inode, struct file *file) | |||
163 | */ | 152 | */ |
164 | 153 | ||
165 | static const struct file_operations rtc_fops = { | 154 | static const struct file_operations rtc_fops = { |
166 | .ioctl = rtc_ioctl, | 155 | .unlocked_ioctl = rtc_ioctl, |
167 | .open = rtc_open, | 156 | .open = rtc_open, |
168 | .release = rtc_release, | 157 | .release = rtc_release, |
169 | }; | 158 | }; |
170 | 159 | ||
171 | static struct miscdevice rtc_dev = { | 160 | static struct miscdevice rtc_dev = { |
diff --git a/arch/m68k/hp300/time.h b/arch/m68k/hp300/time.h index f5b3d098b0f5..7b98242960de 100644 --- a/arch/m68k/hp300/time.h +++ b/arch/m68k/hp300/time.h | |||
@@ -1,4 +1,2 @@ | |||
1 | extern void hp300_sched_init(irq_handler_t vector); | 1 | extern void hp300_sched_init(irq_handler_t vector); |
2 | extern unsigned long hp300_gettimeoffset (void); | 2 | extern unsigned long hp300_gettimeoffset(void); |
3 | |||
4 | |||
diff --git a/arch/m68k/include/asm/atomic_mm.h b/arch/m68k/include/asm/atomic_mm.h index d9d2ed647435..6a223b3f7e74 100644 --- a/arch/m68k/include/asm/atomic_mm.h +++ b/arch/m68k/include/asm/atomic_mm.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #define ATOMIC_INIT(i) { (i) } | 16 | #define ATOMIC_INIT(i) { (i) } |
17 | 17 | ||
18 | #define atomic_read(v) ((v)->counter) | 18 | #define atomic_read(v) (*(volatile int *)&(v)->counter) |
19 | #define atomic_set(v, i) (((v)->counter) = i) | 19 | #define atomic_set(v, i) (((v)->counter) = i) |
20 | 20 | ||
21 | static inline void atomic_add(int i, atomic_t *v) | 21 | static inline void atomic_add(int i, atomic_t *v) |
diff --git a/arch/m68k/include/asm/atomic_no.h b/arch/m68k/include/asm/atomic_no.h index 5674cb9449bd..289310c63a8a 100644 --- a/arch/m68k/include/asm/atomic_no.h +++ b/arch/m68k/include/asm/atomic_no.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #define ATOMIC_INIT(i) { (i) } | 16 | #define ATOMIC_INIT(i) { (i) } |
17 | 17 | ||
18 | #define atomic_read(v) ((v)->counter) | 18 | #define atomic_read(v) (*(volatile int *)&(v)->counter) |
19 | #define atomic_set(v, i) (((v)->counter) = i) | 19 | #define atomic_set(v, i) (((v)->counter) = i) |
20 | 20 | ||
21 | static __inline__ void atomic_add(int i, atomic_t *v) | 21 | static __inline__ void atomic_add(int i, atomic_t *v) |
diff --git a/arch/m68k/include/asm/bitops_mm.h b/arch/m68k/include/asm/bitops_mm.h index 9bde784e7bad..b4ecdaada520 100644 --- a/arch/m68k/include/asm/bitops_mm.h +++ b/arch/m68k/include/asm/bitops_mm.h | |||
@@ -365,6 +365,10 @@ static inline int minix_test_bit(int nr, const void *vaddr) | |||
365 | #define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) | 365 | #define ext2_set_bit_atomic(lock, nr, addr) test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) |
366 | #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) | 366 | #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) |
367 | #define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) | 367 | #define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) |
368 | #define ext2_find_next_zero_bit(addr, size, offset) \ | ||
369 | generic_find_next_zero_le_bit((unsigned long *)addr, size, offset) | ||
370 | #define ext2_find_next_bit(addr, size, offset) \ | ||
371 | generic_find_next_le_bit((unsigned long *)addr, size, offset) | ||
368 | 372 | ||
369 | static inline int ext2_test_bit(int nr, const void *vaddr) | 373 | static inline int ext2_test_bit(int nr, const void *vaddr) |
370 | { | 374 | { |
@@ -394,10 +398,9 @@ static inline int ext2_find_first_zero_bit(const void *vaddr, unsigned size) | |||
394 | return (p - addr) * 32 + res; | 398 | return (p - addr) * 32 + res; |
395 | } | 399 | } |
396 | 400 | ||
397 | static inline int ext2_find_next_zero_bit(const void *vaddr, unsigned size, | 401 | static inline unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, |
398 | unsigned offset) | 402 | unsigned long size, unsigned long offset) |
399 | { | 403 | { |
400 | const unsigned long *addr = vaddr; | ||
401 | const unsigned long *p = addr + (offset >> 5); | 404 | const unsigned long *p = addr + (offset >> 5); |
402 | int bit = offset & 31UL, res; | 405 | int bit = offset & 31UL, res; |
403 | 406 | ||
@@ -437,10 +440,9 @@ static inline int ext2_find_first_bit(const void *vaddr, unsigned size) | |||
437 | return (p - addr) * 32 + res; | 440 | return (p - addr) * 32 + res; |
438 | } | 441 | } |
439 | 442 | ||
440 | static inline int ext2_find_next_bit(const void *vaddr, unsigned size, | 443 | static inline unsigned long generic_find_next_le_bit(const unsigned long *addr, |
441 | unsigned offset) | 444 | unsigned long size, unsigned long offset) |
442 | { | 445 | { |
443 | const unsigned long *addr = vaddr; | ||
444 | const unsigned long *p = addr + (offset >> 5); | 446 | const unsigned long *p = addr + (offset >> 5); |
445 | int bit = offset & 31UL, res; | 447 | int bit = offset & 31UL, res; |
446 | 448 | ||
diff --git a/arch/m68k/include/asm/param.h b/arch/m68k/include/asm/param.h index 85c41b75aa78..36265ccf5c7b 100644 --- a/arch/m68k/include/asm/param.h +++ b/arch/m68k/include/asm/param.h | |||
@@ -1,26 +1,12 @@ | |||
1 | #ifndef _M68K_PARAM_H | 1 | #ifndef _M68K_PARAM_H |
2 | #define _M68K_PARAM_H | 2 | #define _M68K_PARAM_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ | ||
6 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | ||
7 | # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | ||
8 | #endif | ||
9 | |||
10 | #ifndef HZ | ||
11 | #define HZ 100 | ||
12 | #endif | ||
13 | |||
14 | #ifdef __uClinux__ | 4 | #ifdef __uClinux__ |
15 | #define EXEC_PAGESIZE 4096 | 5 | #define EXEC_PAGESIZE 4096 |
16 | #else | 6 | #else |
17 | #define EXEC_PAGESIZE 8192 | 7 | #define EXEC_PAGESIZE 8192 |
18 | #endif | 8 | #endif |
19 | 9 | ||
20 | #ifndef NOGROUP | 10 | #include <asm-generic/param.h> |
21 | #define NOGROUP (-1) | ||
22 | #endif | ||
23 | |||
24 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
25 | 11 | ||
26 | #endif /* _M68K_PARAM_H */ | 12 | #endif /* _M68K_PARAM_H */ |
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index aacd6d17b833..ada4f4cca811 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c | |||
@@ -455,7 +455,7 @@ static inline void access_error040(struct frame *fp) | |||
455 | 455 | ||
456 | if (do_page_fault(&fp->ptregs, addr, errorcode)) { | 456 | if (do_page_fault(&fp->ptregs, addr, errorcode)) { |
457 | #ifdef DEBUG | 457 | #ifdef DEBUG |
458 | printk("do_page_fault() !=0 \n"); | 458 | printk("do_page_fault() !=0\n"); |
459 | #endif | 459 | #endif |
460 | if (user_mode(&fp->ptregs)){ | 460 | if (user_mode(&fp->ptregs)){ |
461 | /* delay writebacks after signal delivery */ | 461 | /* delay writebacks after signal delivery */ |
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 0356da9bf763..1c16b1baf8db 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c | |||
@@ -148,7 +148,7 @@ static void mac_cache_card_flush(int writeback) | |||
148 | void __init config_mac(void) | 148 | void __init config_mac(void) |
149 | { | 149 | { |
150 | if (!MACH_IS_MAC) | 150 | if (!MACH_IS_MAC) |
151 | printk(KERN_ERR "ERROR: no Mac, but config_mac() called!! \n"); | 151 | printk(KERN_ERR "ERROR: no Mac, but config_mac() called!!\n"); |
152 | 152 | ||
153 | mach_sched_init = mac_sched_init; | 153 | mach_sched_init = mac_sched_init; |
154 | mach_init_IRQ = mac_init_IRQ; | 154 | mach_init_IRQ = mac_init_IRQ; |
@@ -867,7 +867,7 @@ static void __init mac_identify(void) | |||
867 | */ | 867 | */ |
868 | iop_preinit(); | 868 | iop_preinit(); |
869 | 869 | ||
870 | printk(KERN_INFO "Detected Macintosh model: %d \n", model); | 870 | printk(KERN_INFO "Detected Macintosh model: %d\n", model); |
871 | 871 | ||
872 | /* | 872 | /* |
873 | * Report booter data: | 873 | * Report booter data: |
@@ -878,12 +878,12 @@ static void __init mac_identify(void) | |||
878 | mac_bi_data.videoaddr, mac_bi_data.videorow, | 878 | mac_bi_data.videoaddr, mac_bi_data.videorow, |
879 | mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF, | 879 | mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF, |
880 | mac_bi_data.dimensions >> 16); | 880 | mac_bi_data.dimensions >> 16); |
881 | printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n", | 881 | printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx\n", |
882 | mac_bi_data.videological, mac_orig_videoaddr, | 882 | mac_bi_data.videological, mac_orig_videoaddr, |
883 | mac_bi_data.sccbase); | 883 | mac_bi_data.sccbase); |
884 | printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx \n", | 884 | printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx\n", |
885 | mac_bi_data.boottime, mac_bi_data.gmtbias); | 885 | mac_bi_data.boottime, mac_bi_data.gmtbias); |
886 | printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n", | 886 | printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx\n", |
887 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); | 887 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); |
888 | 888 | ||
889 | iop_init(); | 889 | iop_init(); |
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index d0e35cf99fc6..a96394a0333d 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c | |||
@@ -154,7 +154,6 @@ good_area: | |||
154 | * the fault. | 154 | * the fault. |
155 | */ | 155 | */ |
156 | 156 | ||
157 | survive: | ||
158 | fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); | 157 | fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); |
159 | #ifdef DEBUG | 158 | #ifdef DEBUG |
160 | printk("handle_mm_fault returns %d\n",fault); | 159 | printk("handle_mm_fault returns %d\n",fault); |
@@ -180,15 +179,10 @@ good_area: | |||
180 | */ | 179 | */ |
181 | out_of_memory: | 180 | out_of_memory: |
182 | up_read(&mm->mmap_sem); | 181 | up_read(&mm->mmap_sem); |
183 | if (is_global_init(current)) { | 182 | if (!user_mode(regs)) |
184 | yield(); | 183 | goto no_context; |
185 | down_read(&mm->mmap_sem); | 184 | pagefault_out_of_memory(); |
186 | goto survive; | 185 | return 0; |
187 | } | ||
188 | |||
189 | printk("VM: killing process %s\n", current->comm); | ||
190 | if (user_mode(regs)) | ||
191 | do_group_exit(SIGKILL); | ||
192 | 186 | ||
193 | no_context: | 187 | no_context: |
194 | current->thread.signo = SIGBUS; | 188 | current->thread.signo = SIGBUS; |
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index 8da9c250d3e1..11ac6f63967a 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/rtc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/miscdevice.h> | 11 | #include <linux/miscdevice.h> |
12 | #include <linux/smp_lock.h> | ||
13 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
14 | #include <linux/capability.h> | 13 | #include <linux/capability.h> |
15 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
@@ -36,8 +35,7 @@ static const unsigned char days_in_mo[] = | |||
36 | 35 | ||
37 | static atomic_t rtc_ready = ATOMIC_INIT(1); | 36 | static atomic_t rtc_ready = ATOMIC_INIT(1); |
38 | 37 | ||
39 | static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 38 | static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
40 | unsigned long arg) | ||
41 | { | 39 | { |
42 | volatile MK48T08ptr_t rtc = (MK48T08ptr_t)MVME_RTC_BASE; | 40 | volatile MK48T08ptr_t rtc = (MK48T08ptr_t)MVME_RTC_BASE; |
43 | unsigned long flags; | 41 | unsigned long flags; |
@@ -120,22 +118,15 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
120 | } | 118 | } |
121 | 119 | ||
122 | /* | 120 | /* |
123 | * We enforce only one user at a time here with the open/close. | 121 | * We enforce only one user at a time here with the open/close. |
124 | * Also clear the previous interrupt data on an open, and clean | ||
125 | * up things on a close. | ||
126 | */ | 122 | */ |
127 | |||
128 | static int rtc_open(struct inode *inode, struct file *file) | 123 | static int rtc_open(struct inode *inode, struct file *file) |
129 | { | 124 | { |
130 | lock_kernel(); | ||
131 | if( !atomic_dec_and_test(&rtc_ready) ) | 125 | if( !atomic_dec_and_test(&rtc_ready) ) |
132 | { | 126 | { |
133 | atomic_inc( &rtc_ready ); | 127 | atomic_inc( &rtc_ready ); |
134 | unlock_kernel(); | ||
135 | return -EBUSY; | 128 | return -EBUSY; |
136 | } | 129 | } |
137 | unlock_kernel(); | ||
138 | |||
139 | return 0; | 130 | return 0; |
140 | } | 131 | } |
141 | 132 | ||
@@ -150,9 +141,9 @@ static int rtc_release(struct inode *inode, struct file *file) | |||
150 | */ | 141 | */ |
151 | 142 | ||
152 | static const struct file_operations rtc_fops = { | 143 | static const struct file_operations rtc_fops = { |
153 | .ioctl = rtc_ioctl, | 144 | .unlocked_ioctl = rtc_ioctl, |
154 | .open = rtc_open, | 145 | .open = rtc_open, |
155 | .release = rtc_release, | 146 | .release = rtc_release, |
156 | }; | 147 | }; |
157 | 148 | ||
158 | static struct miscdevice rtc_dev= | 149 | static struct miscdevice rtc_dev= |
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index 31ab3f08bbda..ad10fecec2fe 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c | |||
@@ -126,7 +126,7 @@ static void q40_reset(void) | |||
126 | { | 126 | { |
127 | halted = 1; | 127 | halted = 1; |
128 | printk("\n\n*******************************************\n" | 128 | printk("\n\n*******************************************\n" |
129 | "Called q40_reset : press the RESET button!! \n" | 129 | "Called q40_reset : press the RESET button!!\n" |
130 | "*******************************************\n"); | 130 | "*******************************************\n"); |
131 | Q40_LED_ON(); | 131 | Q40_LED_ON(); |
132 | while (1) | 132 | while (1) |