diff options
Diffstat (limited to 'arch/h8300')
-rw-r--r-- | arch/h8300/defconfig | 333 | ||||
-rw-r--r-- | arch/h8300/include/asm/atomic.h | 15 | ||||
-rw-r--r-- | arch/h8300/include/asm/ioctls.h | 81 | ||||
-rw-r--r-- | arch/h8300/include/asm/irqflags.h | 43 | ||||
-rw-r--r-- | arch/h8300/include/asm/system.h | 28 | ||||
-rw-r--r-- | arch/h8300/kernel/module.c | 3 | ||||
-rw-r--r-- | arch/h8300/kernel/process.c | 5 | ||||
-rw-r--r-- | arch/h8300/kernel/sys_h8300.c | 8 | ||||
-rw-r--r-- | arch/h8300/kernel/traps.c | 2 |
9 files changed, 70 insertions, 448 deletions
diff --git a/arch/h8300/defconfig b/arch/h8300/defconfig index 8901cdb5e75b..342f77765f02 100644 --- a/arch/h8300/defconfig +++ b/arch/h8300/defconfig | |||
@@ -1,61 +1,11 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.25-rc1 | ||
4 | # Fri Feb 15 17:13:14 2008 | ||
5 | # | ||
6 | CONFIG_H8300=y | ||
7 | # CONFIG_MMU is not set | ||
8 | # CONFIG_SWAP is not set | ||
9 | CONFIG_ZONE_DMA=y | ||
10 | # CONFIG_FPU is not set | ||
11 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
12 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
13 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
14 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
15 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
16 | CONFIG_GENERIC_HWEIGHT=y | ||
17 | CONFIG_GENERIC_HARDIRQS=y | ||
18 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
19 | CONFIG_GENERIC_TIME=y | ||
20 | CONFIG_TIME_LOW_RES=y | ||
21 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
22 | CONFIG_NO_IOPORT=y | ||
23 | CONFIG_NO_DMA=y | ||
24 | CONFIG_ISA=y | ||
25 | # CONFIG_PCI is not set | ||
26 | CONFIG_HZ=100 | ||
27 | CONFIG_C_SYMBOL_PREFIX=y | ||
28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
29 | |||
30 | # | ||
31 | # General setup | ||
32 | # | ||
33 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
34 | CONFIG_BROKEN_ON_SMP=y | ||
35 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
36 | CONFIG_LOCALVERSION="" | ||
37 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
38 | # CONFIG_SYSVIPC is not set | ||
39 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
40 | # CONFIG_IKCONFIG is not set | ||
41 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
42 | # CONFIG_CGROUPS is not set | ||
43 | # CONFIG_FAIR_GROUP_SCHED is not set | ||
44 | # CONFIG_SYSFS_DEPRECATED is not set | ||
45 | # CONFIG_RELAY is not set | ||
46 | # CONFIG_NAMESPACES is not set | ||
47 | # CONFIG_BLK_DEV_INITRD is not set | ||
48 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
49 | CONFIG_SYSCTL=y | ||
50 | CONFIG_EMBEDDED=y | 4 | CONFIG_EMBEDDED=y |
51 | # CONFIG_UID16 is not set | 5 | # CONFIG_UID16 is not set |
52 | # CONFIG_SYSCTL_SYSCALL is not set | 6 | # CONFIG_SYSCTL_SYSCALL is not set |
53 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
54 | # CONFIG_HOTPLUG is not set | 8 | # CONFIG_HOTPLUG is not set |
55 | CONFIG_PRINTK=y | ||
56 | CONFIG_BUG=y | ||
57 | CONFIG_ELF_CORE=y | ||
58 | # CONFIG_COMPAT_BRK is not set | ||
59 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
60 | # CONFIG_FUTEX is not set | 10 | # CONFIG_FUTEX is not set |
61 | # CONFIG_EPOLL is not set | 11 | # CONFIG_EPOLL is not set |
@@ -63,311 +13,30 @@ CONFIG_ELF_CORE=y | |||
63 | # CONFIG_TIMERFD is not set | 13 | # CONFIG_TIMERFD is not set |
64 | # CONFIG_EVENTFD is not set | 14 | # CONFIG_EVENTFD is not set |
65 | # CONFIG_VM_EVENT_COUNTERS is not set | 15 | # CONFIG_VM_EVENT_COUNTERS is not set |
66 | # CONFIG_SLAB is not set | 16 | # CONFIG_COMPAT_BRK is not set |
67 | # CONFIG_SLUB is not set | ||
68 | CONFIG_SLOB=y | 17 | CONFIG_SLOB=y |
69 | # CONFIG_PROFILING is not set | ||
70 | # CONFIG_MARKERS is not set | ||
71 | # CONFIG_HAVE_OPROFILE is not set | ||
72 | # CONFIG_HAVE_KPROBES is not set | ||
73 | CONFIG_TINY_SHMEM=y | ||
74 | CONFIG_BASE_SMALL=1 | ||
75 | # CONFIG_MODULES is not set | ||
76 | CONFIG_BLOCK=y | ||
77 | # CONFIG_LBD is not set | ||
78 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
79 | # CONFIG_LSF is not set | ||
80 | # CONFIG_BLK_DEV_BSG is not set | 18 | # CONFIG_BLK_DEV_BSG is not set |
81 | |||
82 | # | ||
83 | # IO Schedulers | ||
84 | # | ||
85 | CONFIG_IOSCHED_NOOP=y | ||
86 | # CONFIG_IOSCHED_AS is not set | ||
87 | # CONFIG_IOSCHED_DEADLINE is not set | 19 | # CONFIG_IOSCHED_DEADLINE is not set |
88 | # CONFIG_IOSCHED_CFQ is not set | 20 | # CONFIG_IOSCHED_CFQ is not set |
89 | # CONFIG_DEFAULT_AS is not set | ||
90 | # CONFIG_DEFAULT_DEADLINE is not set | ||
91 | # CONFIG_DEFAULT_CFQ is not set | ||
92 | CONFIG_DEFAULT_NOOP=y | ||
93 | CONFIG_DEFAULT_IOSCHED="noop" | ||
94 | CONFIG_CLASSIC_RCU=y | ||
95 | # CONFIG_PREEMPT_RCU is not set | ||
96 | |||
97 | # | ||
98 | # Processor type and features | ||
99 | # | ||
100 | CONFIG_H8300H_GENERIC=y | ||
101 | # CONFIG_H8300H_AKI3068NET is not set | ||
102 | # CONFIG_H8300H_H8MAX is not set | ||
103 | # CONFIG_H8300H_SIM is not set | ||
104 | # CONFIG_H8S_GENERIC is not set | ||
105 | # CONFIG_H8S_EDOSK2674 is not set | ||
106 | # CONFIG_H8S_SIM is not set | ||
107 | |||
108 | # | ||
109 | # Detail Selection | ||
110 | # | ||
111 | # CONFIG_H83002 is not set | ||
112 | CONFIG_H83007=y | 21 | CONFIG_H83007=y |
113 | # CONFIG_H83048 is not set | ||
114 | # CONFIG_H83068 is not set | ||
115 | CONFIG_CPU_CLOCK=20000 | ||
116 | CONFIG_RAMKERNEL=y | ||
117 | # CONFIG_ROMKERNEL is not set | ||
118 | CONFIG_CPU_H8300H=y | ||
119 | # CONFIG_PREEMPT is not set | ||
120 | CONFIG_SELECT_MEMORY_MODEL=y | ||
121 | CONFIG_FLATMEM_MANUAL=y | ||
122 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
123 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
124 | CONFIG_FLATMEM=y | ||
125 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
126 | # CONFIG_SPARSEMEM_STATIC is not set | ||
127 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
128 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
129 | # CONFIG_RESOURCES_64BIT is not set | ||
130 | CONFIG_ZONE_DMA_FLAG=1 | ||
131 | CONFIG_VIRT_TO_BUS=y | ||
132 | |||
133 | # | ||
134 | # Executable file formats | ||
135 | # | ||
136 | CONFIG_BINFMT_FLAT=y | 22 | CONFIG_BINFMT_FLAT=y |
137 | CONFIG_BINFMT_ZFLAT=y | 23 | CONFIG_BINFMT_ZFLAT=y |
138 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
139 | CONFIG_BINFMT_MISC=y | 24 | CONFIG_BINFMT_MISC=y |
140 | |||
141 | # | ||
142 | # Networking | ||
143 | # | ||
144 | # CONFIG_NET is not set | ||
145 | |||
146 | # | ||
147 | # Generic Driver Options | ||
148 | # | ||
149 | CONFIG_STANDALONE=y | ||
150 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 25 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
151 | # CONFIG_SYS_HYPERVISOR is not set | ||
152 | CONFIG_MTD=y | 26 | CONFIG_MTD=y |
153 | # CONFIG_MTD_DEBUG is not set | ||
154 | # CONFIG_MTD_CONCAT is not set | ||
155 | CONFIG_MTD_PARTITIONS=y | 27 | CONFIG_MTD_PARTITIONS=y |
156 | CONFIG_MTD_REDBOOT_PARTS=y | 28 | CONFIG_MTD_REDBOOT_PARTS=y |
157 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
158 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
159 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
160 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
161 | |||
162 | # | ||
163 | # User Modules And Translation Layers | ||
164 | # | ||
165 | CONFIG_MTD_CHAR=y | 29 | CONFIG_MTD_CHAR=y |
166 | # CONFIG_MTD_BLKDEVS is not set | ||
167 | # CONFIG_MTD_BLOCK is not set | ||
168 | # CONFIG_MTD_BLOCK_RO is not set | ||
169 | # CONFIG_FTL is not set | ||
170 | # CONFIG_NFTL is not set | ||
171 | # CONFIG_INFTL is not set | ||
172 | # CONFIG_RFD_FTL is not set | ||
173 | # CONFIG_SSFDC is not set | ||
174 | # CONFIG_MTD_OOPS is not set | ||
175 | |||
176 | # | ||
177 | # RAM/ROM/Flash chip drivers | ||
178 | # | ||
179 | # CONFIG_MTD_CFI is not set | ||
180 | # CONFIG_MTD_JEDECPROBE is not set | ||
181 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
182 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
183 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
184 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
185 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
186 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
187 | CONFIG_MTD_CFI_I1=y | ||
188 | CONFIG_MTD_CFI_I2=y | ||
189 | # CONFIG_MTD_CFI_I4 is not set | ||
190 | # CONFIG_MTD_CFI_I8 is not set | ||
191 | CONFIG_MTD_RAM=y | 30 | CONFIG_MTD_RAM=y |
192 | CONFIG_MTD_ROM=y | 31 | CONFIG_MTD_ROM=y |
193 | # CONFIG_MTD_ABSENT is not set | ||
194 | |||
195 | # | ||
196 | # Mapping drivers for chip access | ||
197 | # | ||
198 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
199 | # CONFIG_MTD_PHYSMAP is not set | ||
200 | CONFIG_MTD_UCLINUX=y | 32 | CONFIG_MTD_UCLINUX=y |
201 | # CONFIG_MTD_PLATRAM is not set | ||
202 | |||
203 | # | ||
204 | # Self-contained MTD device drivers | ||
205 | # | ||
206 | # CONFIG_MTD_SLRAM is not set | ||
207 | # CONFIG_MTD_PHRAM is not set | ||
208 | # CONFIG_MTD_MTDRAM is not set | ||
209 | # CONFIG_MTD_BLOCK2MTD is not set | ||
210 | |||
211 | # | ||
212 | # Disk-On-Chip Device Drivers | ||
213 | # | ||
214 | # CONFIG_MTD_DOC2000 is not set | ||
215 | # CONFIG_MTD_DOC2001 is not set | ||
216 | # CONFIG_MTD_DOC2001PLUS is not set | ||
217 | # CONFIG_MTD_NAND is not set | ||
218 | # CONFIG_MTD_ONENAND is not set | ||
219 | |||
220 | # | ||
221 | # UBI - Unsorted block images | ||
222 | # | ||
223 | # CONFIG_MTD_UBI is not set | ||
224 | # CONFIG_BLK_DEV is not set | 33 | # CONFIG_BLK_DEV is not set |
225 | CONFIG_HAVE_IDE=y | ||
226 | # CONFIG_IDE is not set | ||
227 | |||
228 | # | ||
229 | # Input device support | ||
230 | # | ||
231 | # CONFIG_INPUT is not set | 34 | # CONFIG_INPUT is not set |
232 | |||
233 | # | ||
234 | # Hardware I/O ports | ||
235 | # | ||
236 | # CONFIG_SERIO is not set | 35 | # CONFIG_SERIO is not set |
237 | # CONFIG_GAMEPORT is not set | ||
238 | |||
239 | # | ||
240 | # Character devices | ||
241 | # | ||
242 | # CONFIG_VT is not set | ||
243 | |||
244 | # | ||
245 | # Unix98 PTY support | ||
246 | # | ||
247 | # CONFIG_UNIX98_PTYS is not set | ||
248 | |||
249 | # | ||
250 | # Serial drivers | ||
251 | # | ||
252 | # CONFIG_SERIAL_8250 is not set | ||
253 | |||
254 | # | ||
255 | # Non-8250 serial port support | ||
256 | # | ||
257 | CONFIG_SERIAL_SH_SCI=y | ||
258 | CONFIG_SERIAL_SH_SCI_NR_UARTS=2 | ||
259 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
260 | CONFIG_SERIAL_CORE=y | ||
261 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
262 | # CONFIG_I2C is not set | ||
263 | # CONFIG_HWMON is not set | 36 | # CONFIG_HWMON is not set |
264 | # CONFIG_USB_SUPPORT is not set | 37 | # CONFIG_USB_SUPPORT is not set |
265 | |||
266 | # | ||
267 | # File systems | ||
268 | # | ||
269 | # CONFIG_EXT2_FS is not set | ||
270 | # CONFIG_EXT3_FS is not set | ||
271 | # CONFIG_EXT4DEV_FS is not set | ||
272 | # CONFIG_REISERFS_FS is not set | ||
273 | # CONFIG_JFS_FS is not set | ||
274 | # CONFIG_FS_POSIX_ACL is not set | ||
275 | # CONFIG_XFS_FS is not set | ||
276 | # CONFIG_GFS2_FS is not set | ||
277 | # CONFIG_DNOTIFY is not set | 38 | # CONFIG_DNOTIFY is not set |
278 | # CONFIG_INOTIFY is not set | ||
279 | # CONFIG_QUOTA is not set | ||
280 | # CONFIG_AUTOFS_FS is not set | ||
281 | # CONFIG_AUTOFS4_FS is not set | ||
282 | # CONFIG_FUSE_FS is not set | ||
283 | |||
284 | # | ||
285 | # CD-ROM/DVD Filesystems | ||
286 | # | ||
287 | # CONFIG_ISO9660_FS is not set | ||
288 | # CONFIG_UDF_FS is not set | ||
289 | |||
290 | # | ||
291 | # DOS/FAT/NT Filesystems | ||
292 | # | ||
293 | # CONFIG_MSDOS_FS is not set | ||
294 | # CONFIG_VFAT_FS is not set | ||
295 | # CONFIG_NTFS_FS is not set | ||
296 | |||
297 | # | ||
298 | # Pseudo filesystems | ||
299 | # | ||
300 | CONFIG_PROC_FS=y | ||
301 | CONFIG_PROC_SYSCTL=y | ||
302 | CONFIG_SYSFS=y | ||
303 | # CONFIG_TMPFS is not set | ||
304 | # CONFIG_HUGETLB_PAGE is not set | ||
305 | # CONFIG_CONFIGFS_FS is not set | ||
306 | |||
307 | # | ||
308 | # Miscellaneous filesystems | ||
309 | # | ||
310 | # CONFIG_ADFS_FS is not set | ||
311 | # CONFIG_AFFS_FS is not set | ||
312 | # CONFIG_HFS_FS is not set | ||
313 | # CONFIG_HFSPLUS_FS is not set | ||
314 | # CONFIG_BEFS_FS is not set | ||
315 | # CONFIG_BFS_FS is not set | ||
316 | # CONFIG_EFS_FS is not set | ||
317 | # CONFIG_JFFS2_FS is not set | ||
318 | # CONFIG_CRAMFS is not set | ||
319 | # CONFIG_VXFS_FS is not set | ||
320 | # CONFIG_MINIX_FS is not set | ||
321 | # CONFIG_HPFS_FS is not set | ||
322 | # CONFIG_QNX4FS_FS is not set | ||
323 | CONFIG_ROMFS_FS=y | 39 | CONFIG_ROMFS_FS=y |
324 | # CONFIG_SYSV_FS is not set | ||
325 | # CONFIG_UFS_FS is not set | ||
326 | |||
327 | # | ||
328 | # Partition Types | ||
329 | # | ||
330 | # CONFIG_PARTITION_ADVANCED is not set | ||
331 | CONFIG_MSDOS_PARTITION=y | ||
332 | # CONFIG_NLS is not set | ||
333 | |||
334 | # | ||
335 | # Kernel hacking | ||
336 | # | ||
337 | # CONFIG_PRINTK_TIME is not set | ||
338 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | 40 | # CONFIG_ENABLE_WARN_DEPRECATED is not set |
339 | # CONFIG_ENABLE_MUST_CHECK is not set | 41 | # CONFIG_ENABLE_MUST_CHECK is not set |
340 | # CONFIG_MAGIC_SYSRQ is not set | ||
341 | # CONFIG_UNUSED_SYMBOLS is not set | ||
342 | # CONFIG_DEBUG_FS is not set | ||
343 | # CONFIG_HEADERS_CHECK is not set | ||
344 | # CONFIG_DEBUG_KERNEL is not set | ||
345 | # CONFIG_SAMPLES is not set | ||
346 | # CONFIG_FULLDEBUG is not set | ||
347 | # CONFIG_HIGHPROFILE is not set | ||
348 | # CONFIG_NO_KERNEL_MSG is not set | ||
349 | # CONFIG_SYSCALL_PRINT is not set | ||
350 | # CONFIG_GDB_DEBUG is not set | ||
351 | # CONFIG_SH_STANDARD_BIOS is not set | ||
352 | # CONFIG_DEFAULT_CMDLINE is not set | ||
353 | # CONFIG_BLKDEV_RESERVE is not set | ||
354 | |||
355 | # | ||
356 | # Security options | ||
357 | # | ||
358 | # CONFIG_KEYS is not set | ||
359 | # CONFIG_SECURITY is not set | ||
360 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
361 | # CONFIG_CRYPTO is not set | ||
362 | |||
363 | # | ||
364 | # Library routines | ||
365 | # | ||
366 | # CONFIG_CRC_CCITT is not set | ||
367 | # CONFIG_CRC16 is not set | ||
368 | # CONFIG_CRC_ITU_T is not set | ||
369 | # CONFIG_CRC32 is not set | 42 | # CONFIG_CRC32 is not set |
370 | # CONFIG_CRC7 is not set | ||
371 | # CONFIG_LIBCRC32C is not set | ||
372 | CONFIG_ZLIB_INFLATE=y | ||
373 | CONFIG_HAS_IOMEM=y | ||
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h index e936804b7508..984221abb66d 100644 --- a/arch/h8300/include/asm/atomic.h +++ b/arch/h8300/include/asm/atomic.h | |||
@@ -18,7 +18,8 @@ | |||
18 | 18 | ||
19 | static __inline__ int atomic_add_return(int i, atomic_t *v) | 19 | static __inline__ int atomic_add_return(int i, atomic_t *v) |
20 | { | 20 | { |
21 | int ret,flags; | 21 | unsigned long flags; |
22 | int ret; | ||
22 | local_irq_save(flags); | 23 | local_irq_save(flags); |
23 | ret = v->counter += i; | 24 | ret = v->counter += i; |
24 | local_irq_restore(flags); | 25 | local_irq_restore(flags); |
@@ -30,7 +31,8 @@ static __inline__ int atomic_add_return(int i, atomic_t *v) | |||
30 | 31 | ||
31 | static __inline__ int atomic_sub_return(int i, atomic_t *v) | 32 | static __inline__ int atomic_sub_return(int i, atomic_t *v) |
32 | { | 33 | { |
33 | int ret,flags; | 34 | unsigned long flags; |
35 | int ret; | ||
34 | local_irq_save(flags); | 36 | local_irq_save(flags); |
35 | ret = v->counter -= i; | 37 | ret = v->counter -= i; |
36 | local_irq_restore(flags); | 38 | local_irq_restore(flags); |
@@ -42,7 +44,8 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v) | |||
42 | 44 | ||
43 | static __inline__ int atomic_inc_return(atomic_t *v) | 45 | static __inline__ int atomic_inc_return(atomic_t *v) |
44 | { | 46 | { |
45 | int ret,flags; | 47 | unsigned long flags; |
48 | int ret; | ||
46 | local_irq_save(flags); | 49 | local_irq_save(flags); |
47 | v->counter++; | 50 | v->counter++; |
48 | ret = v->counter; | 51 | ret = v->counter; |
@@ -64,7 +67,8 @@ static __inline__ int atomic_inc_return(atomic_t *v) | |||
64 | 67 | ||
65 | static __inline__ int atomic_dec_return(atomic_t *v) | 68 | static __inline__ int atomic_dec_return(atomic_t *v) |
66 | { | 69 | { |
67 | int ret,flags; | 70 | unsigned long flags; |
71 | int ret; | ||
68 | local_irq_save(flags); | 72 | local_irq_save(flags); |
69 | --v->counter; | 73 | --v->counter; |
70 | ret = v->counter; | 74 | ret = v->counter; |
@@ -76,7 +80,8 @@ static __inline__ int atomic_dec_return(atomic_t *v) | |||
76 | 80 | ||
77 | static __inline__ int atomic_dec_and_test(atomic_t *v) | 81 | static __inline__ int atomic_dec_and_test(atomic_t *v) |
78 | { | 82 | { |
79 | int ret,flags; | 83 | unsigned long flags; |
84 | int ret; | ||
80 | local_irq_save(flags); | 85 | local_irq_save(flags); |
81 | --v->counter; | 86 | --v->counter; |
82 | ret = v->counter; | 87 | ret = v->counter; |
diff --git a/arch/h8300/include/asm/ioctls.h b/arch/h8300/include/asm/ioctls.h index b6b249f9f308..30eaed2facdb 100644 --- a/arch/h8300/include/asm/ioctls.h +++ b/arch/h8300/include/asm/ioctls.h | |||
@@ -1,87 +1,8 @@ | |||
1 | #ifndef __ARCH_H8300_IOCTLS_H__ | 1 | #ifndef __ARCH_H8300_IOCTLS_H__ |
2 | #define __ARCH_H8300_IOCTLS_H__ | 2 | #define __ARCH_H8300_IOCTLS_H__ |
3 | 3 | ||
4 | #include <asm/ioctl.h> | ||
5 | |||
6 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
7 | |||
8 | #define TCGETS 0x5401 | ||
9 | #define TCSETS 0x5402 | ||
10 | #define TCSETSW 0x5403 | ||
11 | #define TCSETSF 0x5404 | ||
12 | #define TCGETA 0x5405 | ||
13 | #define TCSETA 0x5406 | ||
14 | #define TCSETAW 0x5407 | ||
15 | #define TCSETAF 0x5408 | ||
16 | #define TCSBRK 0x5409 | ||
17 | #define TCXONC 0x540A | ||
18 | #define TCFLSH 0x540B | ||
19 | #define TIOCEXCL 0x540C | ||
20 | #define TIOCNXCL 0x540D | ||
21 | #define TIOCSCTTY 0x540E | ||
22 | #define TIOCGPGRP 0x540F | ||
23 | #define TIOCSPGRP 0x5410 | ||
24 | #define TIOCOUTQ 0x5411 | ||
25 | #define TIOCSTI 0x5412 | ||
26 | #define TIOCGWINSZ 0x5413 | ||
27 | #define TIOCSWINSZ 0x5414 | ||
28 | #define TIOCMGET 0x5415 | ||
29 | #define TIOCMBIS 0x5416 | ||
30 | #define TIOCMBIC 0x5417 | ||
31 | #define TIOCMSET 0x5418 | ||
32 | #define TIOCGSOFTCAR 0x5419 | ||
33 | #define TIOCSSOFTCAR 0x541A | ||
34 | #define FIONREAD 0x541B | ||
35 | #define TIOCINQ FIONREAD | ||
36 | #define TIOCLINUX 0x541C | ||
37 | #define TIOCCONS 0x541D | ||
38 | #define TIOCGSERIAL 0x541E | ||
39 | #define TIOCSSERIAL 0x541F | ||
40 | #define TIOCPKT 0x5420 | ||
41 | #define FIONBIO 0x5421 | ||
42 | #define TIOCNOTTY 0x5422 | ||
43 | #define TIOCSETD 0x5423 | ||
44 | #define TIOCGETD 0x5424 | ||
45 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
46 | #define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ | ||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
50 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
51 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
52 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | ||
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | ||
56 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
57 | |||
58 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | ||
59 | #define FIOCLEX 0x5451 | ||
60 | #define FIOASYNC 0x5452 | ||
61 | #define TIOCSERCONFIG 0x5453 | ||
62 | #define TIOCSERGWILD 0x5454 | ||
63 | #define TIOCSERSWILD 0x5455 | ||
64 | #define TIOCGLCKTRMIOS 0x5456 | ||
65 | #define TIOCSLCKTRMIOS 0x5457 | ||
66 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
67 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
68 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
69 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
70 | |||
71 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
72 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
73 | #define FIOQSIZE 0x545E | 4 | #define FIOQSIZE 0x545E |
74 | 5 | ||
75 | /* Used for packet mode */ | 6 | #include <asm-generic/ioctls.h> |
76 | #define TIOCPKT_DATA 0 | ||
77 | #define TIOCPKT_FLUSHREAD 1 | ||
78 | #define TIOCPKT_FLUSHWRITE 2 | ||
79 | #define TIOCPKT_STOP 4 | ||
80 | #define TIOCPKT_START 8 | ||
81 | #define TIOCPKT_NOSTOP 16 | ||
82 | #define TIOCPKT_DOSTOP 32 | ||
83 | #define TIOCPKT_IOCTL 64 | ||
84 | |||
85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
86 | 7 | ||
87 | #endif /* __ARCH_H8300_IOCTLS_H__ */ | 8 | #endif /* __ARCH_H8300_IOCTLS_H__ */ |
diff --git a/arch/h8300/include/asm/irqflags.h b/arch/h8300/include/asm/irqflags.h new file mode 100644 index 000000000000..9617cd57aebd --- /dev/null +++ b/arch/h8300/include/asm/irqflags.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef _H8300_IRQFLAGS_H | ||
2 | #define _H8300_IRQFLAGS_H | ||
3 | |||
4 | static inline unsigned long arch_local_save_flags(void) | ||
5 | { | ||
6 | unsigned long flags; | ||
7 | asm volatile ("stc ccr,%w0" : "=r" (flags)); | ||
8 | return flags; | ||
9 | } | ||
10 | |||
11 | static inline void arch_local_irq_disable(void) | ||
12 | { | ||
13 | asm volatile ("orc #0x80,ccr" : : : "memory"); | ||
14 | } | ||
15 | |||
16 | static inline void arch_local_irq_enable(void) | ||
17 | { | ||
18 | asm volatile ("andc #0x7f,ccr" : : : "memory"); | ||
19 | } | ||
20 | |||
21 | static inline unsigned long arch_local_irq_save(void) | ||
22 | { | ||
23 | unsigned long flags = arch_local_save_flags(); | ||
24 | arch_local_irq_disable(); | ||
25 | return flags; | ||
26 | } | ||
27 | |||
28 | static inline void arch_local_irq_restore(unsigned long flags) | ||
29 | { | ||
30 | asm volatile ("ldc %w0,ccr" : : "r" (flags) : "memory"); | ||
31 | } | ||
32 | |||
33 | static inline bool arch_irqs_disabled_flags(unsigned long flags) | ||
34 | { | ||
35 | return (flags & 0x80) == 0x80; | ||
36 | } | ||
37 | |||
38 | static inline bool arch_irqs_disabled(void) | ||
39 | { | ||
40 | return arch_irqs_disabled_flags(arch_local_save_flags()); | ||
41 | } | ||
42 | |||
43 | #endif /* _H8300_IRQFLAGS_H */ | ||
diff --git a/arch/h8300/include/asm/system.h b/arch/h8300/include/asm/system.h index d98d97685f06..2c2382e50d93 100644 --- a/arch/h8300/include/asm/system.h +++ b/arch/h8300/include/asm/system.h | |||
@@ -2,6 +2,9 @@ | |||
2 | #define _H8300_SYSTEM_H | 2 | #define _H8300_SYSTEM_H |
3 | 3 | ||
4 | #include <linux/linkage.h> | 4 | #include <linux/linkage.h> |
5 | #include <linux/irqflags.h> | ||
6 | |||
7 | struct pt_regs; | ||
5 | 8 | ||
6 | /* | 9 | /* |
7 | * switch_to(n) should switch tasks to task ptr, first checking that | 10 | * switch_to(n) should switch tasks to task ptr, first checking that |
@@ -49,31 +52,8 @@ asmlinkage void resume(void); | |||
49 | (last) = _last; \ | 52 | (last) = _last; \ |
50 | } | 53 | } |
51 | 54 | ||
52 | #define __sti() asm volatile ("andc #0x7f,ccr") | ||
53 | #define __cli() asm volatile ("orc #0x80,ccr") | ||
54 | |||
55 | #define __save_flags(x) \ | ||
56 | asm volatile ("stc ccr,%w0":"=r" (x)) | ||
57 | |||
58 | #define __restore_flags(x) \ | ||
59 | asm volatile ("ldc %w0,ccr": :"r" (x)) | ||
60 | |||
61 | #define irqs_disabled() \ | ||
62 | ({ \ | ||
63 | unsigned char flags; \ | ||
64 | __save_flags(flags); \ | ||
65 | ((flags & 0x80) == 0x80); \ | ||
66 | }) | ||
67 | |||
68 | #define iret() __asm__ __volatile__ ("rte": : :"memory", "sp", "cc") | 55 | #define iret() __asm__ __volatile__ ("rte": : :"memory", "sp", "cc") |
69 | 56 | ||
70 | /* For spinlocks etc */ | ||
71 | #define local_irq_disable() __cli() | ||
72 | #define local_irq_enable() __sti() | ||
73 | #define local_irq_save(x) ({ __save_flags(x); local_irq_disable(); }) | ||
74 | #define local_irq_restore(x) __restore_flags(x) | ||
75 | #define local_save_flags(x) __save_flags(x) | ||
76 | |||
77 | /* | 57 | /* |
78 | * Force strict CPU ordering. | 58 | * Force strict CPU ordering. |
79 | * Not really required on H8... | 59 | * Not really required on H8... |
@@ -155,6 +135,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
155 | 135 | ||
156 | #define arch_align_stack(x) (x) | 136 | #define arch_align_stack(x) (x) |
157 | 137 | ||
158 | void die(char *str, struct pt_regs *fp, unsigned long err); | 138 | extern void die(const char *str, struct pt_regs *fp, unsigned long err); |
159 | 139 | ||
160 | #endif /* _H8300_SYSTEM_H */ | 140 | #endif /* _H8300_SYSTEM_H */ |
diff --git a/arch/h8300/kernel/module.c b/arch/h8300/kernel/module.c index 0865e291c20d..db4953dc4e1b 100644 --- a/arch/h8300/kernel/module.c +++ b/arch/h8300/kernel/module.c | |||
@@ -112,10 +112,9 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
112 | const Elf_Shdr *sechdrs, | 112 | const Elf_Shdr *sechdrs, |
113 | struct module *me) | 113 | struct module *me) |
114 | { | 114 | { |
115 | return module_bug_finalize(hdr, sechdrs, me); | 115 | return 0; |
116 | } | 116 | } |
117 | 117 | ||
118 | void module_arch_cleanup(struct module *mod) | 118 | void module_arch_cleanup(struct module *mod) |
119 | { | 119 | { |
120 | module_bug_cleanup(mod); | ||
121 | } | 120 | } |
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index 8c8b0ffa6ad7..97478138e361 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -212,7 +212,10 @@ int copy_thread(unsigned long clone_flags, | |||
212 | /* | 212 | /* |
213 | * sys_execve() executes a new program. | 213 | * sys_execve() executes a new program. |
214 | */ | 214 | */ |
215 | asmlinkage int sys_execve(char *name, char **argv, char **envp,int dummy,...) | 215 | asmlinkage int sys_execve(const char *name, |
216 | const char *const *argv, | ||
217 | const char *const *envp, | ||
218 | int dummy, ...) | ||
216 | { | 219 | { |
217 | int error; | 220 | int error; |
218 | char * filename; | 221 | char * filename; |
diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c index f9b3f44da69f..aaf5e5a48f93 100644 --- a/arch/h8300/kernel/sys_h8300.c +++ b/arch/h8300/kernel/sys_h8300.c | |||
@@ -51,11 +51,13 @@ asmlinkage void syscall_print(void *dummy,...) | |||
51 | * Do a system call from kernel instead of calling sys_execve so we | 51 | * Do a system call from kernel instead of calling sys_execve so we |
52 | * end up with proper pt_regs. | 52 | * end up with proper pt_regs. |
53 | */ | 53 | */ |
54 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | 54 | int kernel_execve(const char *filename, |
55 | const char *const argv[], | ||
56 | const char *const envp[]) | ||
55 | { | 57 | { |
56 | register long res __asm__("er0"); | 58 | register long res __asm__("er0"); |
57 | register char *const *_c __asm__("er3") = envp; | 59 | register const char *const *_c __asm__("er3") = envp; |
58 | register char *const *_b __asm__("er2") = argv; | 60 | register const char *const *_b __asm__("er2") = argv; |
59 | register const char * _a __asm__("er1") = filename; | 61 | register const char * _a __asm__("er1") = filename; |
60 | __asm__ __volatile__ ("mov.l %1,er0\n\t" | 62 | __asm__ __volatile__ ("mov.l %1,er0\n\t" |
61 | "trapa #0\n\t" | 63 | "trapa #0\n\t" |
diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index 3c0b66bc669e..dfa05bd908b6 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c | |||
@@ -96,7 +96,7 @@ static void dump(struct pt_regs *fp) | |||
96 | printk("\n\n"); | 96 | printk("\n\n"); |
97 | } | 97 | } |
98 | 98 | ||
99 | void die(char *str, struct pt_regs *fp, unsigned long err) | 99 | void die(const char *str, struct pt_regs *fp, unsigned long err) |
100 | { | 100 | { |
101 | static int diecount; | 101 | static int diecount; |
102 | 102 | ||