h8300 update
Use generic headers.
Signed-off-by Yoshinori Sato <[email protected]>
--- arch/h8300/include/asm/bootinfo.h | 2 - arch/h8300/include/asm/bugs.h | 17 +--- arch/h8300/include/asm/cachectl.h | 14 --- arch/h8300/include/asm/cacheflush.h | 41 +------- arch/h8300/include/asm/current.h | 26 +---- arch/h8300/include/asm/dbg.h | 2 - arch/h8300/include/asm/dma.h | 16 +--- arch/h8300/include/asm/fb.h | 12 -- arch/h8300/include/asm/fpu.h | 1 - arch/h8300/include/asm/io.h | 5 +- arch/h8300/include/asm/ioctls.h | 86 +-------------- arch/h8300/include/asm/ipcbuf.h | 30 +----- arch/h8300/include/asm/md.h | 13 -- arch/h8300/include/asm/mmu.h | 11 +-- arch/h8300/include/asm/mmu_context.h | 33 +------ arch/h8300/include/asm/msgbuf.h | 32 +----- arch/h8300/include/asm/page.h | 77 +------------- arch/h8300/include/asm/pgalloc.h | 9 +-- arch/h8300/include/asm/pgtable.h | 62 +---------- arch/h8300/include/asm/posix_types.h | 61 +---------- arch/h8300/include/asm/processor.h | 1 - arch/h8300/include/asm/scatterlist.h | 19 +--- arch/h8300/include/asm/sembuf.h | 26 +---- arch/h8300/include/asm/shm.h | 31 ----- arch/h8300/include/asm/shmbuf.h | 42 +------- arch/h8300/include/asm/shmparam.h | 7 +- arch/h8300/include/asm/socket.h | 66 +----------- arch/h8300/include/asm/sockios.h | 14 +-- arch/h8300/include/asm/stat.h | 62 +---------- arch/h8300/include/asm/swab.h | 11 +-- arch/h8300/include/asm/termbits.h | 201 +--------------------------------- arch/h8300/include/asm/termios.h | 93 +---------------- arch/h8300/include/asm/tlb.h | 11 -- arch/h8300/include/asm/tlbflush.h | 56 +--------- arch/h8300/include/asm/types.h | 34 +------ arch/h8300/include/asm/uaccess.h | 24 ++++- arch/h8300/include/asm/ucontext.h | 13 +-- arch/h8300/include/asm/virtconvert.h | 20 ---- arch/h8300/kernel/asm-offsets.c | 1 - arch/h8300/kernel/sys_h8300.c | 1 - 40 files changed, 58 insertions(+), 1225 deletions(-) delete mode 100644 arch/h8300/include/asm/bootinfo.h delete mode 100644 arch/h8300/include/asm/cachectl.h delete mode 100644 arch/h8300/include/asm/dbg.h delete mode 100644 arch/h8300/include/asm/fb.h delete mode 100644 arch/h8300/include/asm/fpu.h delete mode 100644 arch/h8300/include/asm/md.h delete mode 100644 arch/h8300/include/asm/shm.h delete mode 100644 arch/h8300/include/asm/virtconvert.h
arch/h8300/include/asm/bootinfo.h deleted +0 -2
@@ -1,2 +0,0 @@ - -/* Nothing for h8300 */
arch/h8300/include/asm/bugs.h +1 -16
@@ -1,16 +1 @@ -/* -* include/asm-h8300/bugs.h -* -* Copyright (C) 1994 Linus Torvalds -*/ - -/* -* This is included by init/main.c to check for architecture-dependent bugs. -* -* Needs: -* void check_bugs(void); -*/ - -static void check_bugs (void ) -{ -} +#include <asm-generic/bugs.h>
arch/h8300/include/asm/cachectl.h deleted +0 -14
@@ -1,14 +0,0 @@ -#ifndef _H8300_CACHECTL_H -#define _H8300_CACHECTL_H - -/* Definitions for the cacheflush system call. */ - -#define FLUSH_SCOPE_LINE 0/* Flush a cache line */ -#define FLUSH_SCOPE_PAGE 0/* Flush a page */ -#define FLUSH_SCOPE_ALL 0/* Flush the whole cache -- superuser only */ - -#define FLUSH_CACHE_DATA 0/* Writeback and flush data cache */ -#define FLUSH_CACHE_INSN 0/* Flush instruction cache */ -#define FLUSH_CACHE_BOTH 0/* Flush both caches */ - -#endif /* _H8300_CACHECTL_H */
arch/h8300/include/asm/cacheflush.h +1 -40
41 lines not on this page · raw message
arch/h8300/include/asm/current.h +1 -25
@@ -1,25 +1 @@ -#ifndef _H8300_CURRENT_H -#define _H8300_CURRENT_H -/* -* current.h -* (C) Copyright 2000, Lineo, David McCullough <[email protected]> -* (C) Copyright 2002, Greg Ungerer ([email protected]) -* -* rather than dedicate a register (as the m68k source does), we -* just keep a global, we should probably just change it all to be -* current and lose _current_task. -*/ - -#include <linux/thread_info.h> -#include <asm/thread_info.h> - -struct task_struct ; - -static inline struct task_struct *get_current (void ) -{ -return (current_thread_info ()->task); -} - -#define current get_current() - -#endif /* _H8300_CURRENT_H */ +#include <asm-generic/current.h>
arch/h8300/include/asm/dbg.h deleted +0 -2
@@ -1,2 +0,0 @@ -#define DEBUG 1 -#define BREAK asm volatile ("trap #3")
arch/h8300/include/asm/dma.h +1 -15
@@ -1,15 +1 @@ -#ifndef _H8300_DMA_H -#define _H8300_DMA_H - - -/* -* Set number of channels of DMA on ColdFire for different implementations. -*/ -#define MAX_DMA_CHANNELS 0 -#define MAX_DMA_ADDRESS PAGE_OFFSET - -/* These are in kernel/dma.c: */ -extern int request_dma (unsigned int dmanr,const char *device_id);/* reserve a DMA channel */ -extern void free_dma (unsigned int dmanr);/* release it again */ - -#endif /* _H8300_DMA_H */ +#include <asm-generic/dma.h>
arch/h8300/include/asm/fb.h deleted +0 -12
@@ -1,12 +0,0 @@ -#ifndef _ASM_FB_H_ -#define _ASM_FB_H_ -#include <linux/fb.h> - -#define fb_pgprotect (...) do {} while (0) - -static inline int fb_is_primary_device (struct fb_info *info) -{ -return 0 ; -} - -#endif /* _ASM_FB_H_ */
arch/h8300/include/asm/fpu.h deleted +0 -1
@@ -1 +0,0 @@ -/* Nothing do */
arch/h8300/include/asm/io.h +2 -3
@@ -3,8 +3,6 @@#ifdef __KERNEL__ -#include <asm/virtconvert.h> -#if defined(CONFIG_H83007 ) || defined(CONFIG_H83068 )#include <asm/regs306x.h> #elif defined(CONFIG_H8S2678 )
@@ -336,9 +334,11 @@ static __inline__ void ctrl_bset(int b, unsigned long addr) __asm__("bset %w0,@%1" ::"r" (b),"r" (addr)); } +#if 0 /* Pages to physical address... */ #define page_to_phys (page) ((page - mem_map) << PAGE_SHIFT)#define page_to_bus (page) ((page - mem_map) << PAGE_SHIFT) +#endif /* * Macros used for converting between virtual and physical mappings.
@@ -348,7 +348,6 @@ static __inline__ void ctrl_bset(int b, unsigned long addr)#define virt_to_bus virt_to_phys#define bus_to_virt phys_to_virt -/* * Convert a physical pointer to a virtual kernel pointer for /dev/mem * access
arch/h8300/include/asm/ioctls.h +1 -85
86 lines not on this page · raw message
arch/h8300/include/asm/ipcbuf.h +1 -29
@@ -1,29 +1 @@ -#ifndef __H8300_IPCBUF_H__ -#define __H8300_IPCBUF_H__ - -/* -* The user_ipc_perm structure for H8/300 architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 32-bit mode_t and seq -* - 2 miscellaneous 32-bit values -*/ - -struct ipc64_perm -{ -__kernel_key_t key; -__kernel_uid32_t uid; -__kernel_gid32_t gid; -__kernel_uid32_t cuid; -__kernel_gid32_t cgid; -__kernel_mode_t mode; -unsigned short __pad1; -unsigned short seq; -unsigned short __pad2; -unsigned long __unused1; -unsigned long __unused2; -}; - -#endif /* __H8300_IPCBUF_H__ */ +#include <asm-generic/ipcbuf.h>
arch/h8300/include/asm/md.h deleted +0 -13
@@ -1,13 +0,0 @@ -/* -* md.h: High speed xor_block operation for RAID4/5 -* -*/ - -#ifndef __ASM_MD_H -#define __ASM_MD_H - -/* #define HAVE_ARCH_XORBLOCK */ - -#define MD_XORBLOCK_ALIGNMENT sizeof(long) - -#endif /* __ASM_MD_H */
arch/h8300/include/asm/mmu.h +1 -10
@@ -1,10 +1 @@ -#ifndef __MMU_H -#define __MMU_H - -/* Copyright (C) 2002, David McCullough <[email protected]> */ - -typedef struct { -unsigned long end_brk; -}mm_context_t ; - -#endif +#include <asm-generic/mmu.h>
arch/h8300/include/asm/mmu_context.h +1 -32
@@ -1,32 +1 @@ -#ifndef __H8300_MMU_CONTEXT_H -#define __H8300_MMU_CONTEXT_H - -#include <asm/setup.h> -#include <asm/page.h> -#include <asm/pgalloc.h> -#include <asm-generic/mm_hooks.h> - -static inline void enter_lazy_tlb (struct mm_struct *mm,struct task_struct *tsk) -{ -} - -static inline int -init_new_context (struct task_struct *tsk,struct mm_struct *mm) -{ -// mm->context = virt_to_phys(mm->pgd); -return (0 ); -} - -#define destroy_context (mm) do { } while(0) -#define deactivate_mm (tsk,mm) do { } while(0) - -static inline void switch_mm (struct mm_struct *prev,struct mm_struct *next,struct task_struct *tsk) -{ -} - -static inline void activate_mm (struct mm_struct *prev_mm, -struct mm_struct *next_mm) -{ -} - -#endif +#include <asm-generic/mmu_context.h>
arch/h8300/include/asm/msgbuf.h +1 -31
@@ -1,31 +1 @@ -#ifndef _H8300_MSGBUF_H -#define _H8300_MSGBUF_H - -/* -* The msqid64_ds structure for H8/300 architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 64-bit time_t to solve y2038 problem -* - 2 miscellaneous 32-bit values -*/ - -struct msqid64_ds { -struct ipc64_perm msg_perm; -__kernel_time_t msg_stime;/* last msgsnd time */ -unsigned long __unused1; -__kernel_time_t msg_rtime;/* last msgrcv time */ -unsigned long __unused2; -__kernel_time_t msg_ctime;/* last change time */ -unsigned long __unused3; -unsigned long msg_cbytes;/* current number of bytes on queue */ -unsigned long msg_qnum;/* number of messages in queue */ -unsigned long msg_qbytes;/* max number of bytes on queue */ -__kernel_pid_t msg_lspid;/* pid of last msgsnd */ -__kernel_pid_t msg_lrpid;/* last receive pid */ -unsigned long __unused4; -unsigned long __unused5; -}; - -#endif /* _H8300_MSGBUF_H */ +#include <asm-generic/msgbuf.h>
arch/h8300/include/asm/page.h +2 -75
80 lines not on this page · raw message
arch/h8300/include/asm/pgalloc.h +1 -8
@@ -1,8 +1 @@ -#ifndef _H8300_PGALLOC_H -#define _H8300_PGALLOC_H - -#include <asm/setup.h> - -#define check_pgt_cache () do { } while (0) - -#endif /* _H8300_PGALLOC_H */ +#include <asm-generic/pgalloc.h>
arch/h8300/include/asm/pgtable.h +6 -56
80 lines not on this page · raw message
arch/h8300/include/asm/posix_types.h +1 -60
61 lines not on this page · raw message
arch/h8300/include/asm/processor.h +0 -1
@@ -19,7 +19,6 @@#include <linux/compiler.h> #include <asm/segment.h> -#include <asm/fpu.h> #include <asm/ptrace.h> #include <asm/current.h>
arch/h8300/include/asm/scatterlist.h +1 -18
@@ -1,18 +1 @@ -#ifndef _H8300_SCATTERLIST_H -#define _H8300_SCATTERLIST_H - -#include <asm/types.h> - -struct scatterlist { -#ifdef CONFIG_DEBUG_SG -unsigned long sg_magic; -#endif -unsigned long page_link; -unsigned int offset; -dma_addr_t dma_address; -unsigned int length; -}; - -#define ISA_DMA_THRESHOLD (0xffffffff) - -#endif /* !(_H8300_SCATTERLIST_H) */ +#include <asm-generic/scatterlist.h>
arch/h8300/include/asm/sembuf.h +1 -25
@@ -1,25 +1 @@ -#ifndef _H8300_SEMBUF_H -#define _H8300_SEMBUF_H - -/* -* The semid64_ds structure for m68k architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 64-bit time_t to solve y2038 problem -* - 2 miscellaneous 32-bit values -*/ - -struct semid64_ds { -struct ipc64_perm sem_perm;/* permissions .. see ipc.h */ -__kernel_time_t sem_otime;/* last semop time */ -unsigned long __unused1; -__kernel_time_t sem_ctime;/* last change time */ -unsigned long __unused2; -unsigned long sem_nsems;/* no. of semaphores in array */ -unsigned long __unused3; -unsigned long __unused4; -}; - -#endif /* _H8300_SEMBUF_H */ +#include <asm-generic/sembuf.h>
arch/h8300/include/asm/shm.h deleted +0 -31
@@ -1,31 +0,0 @@ -#ifndef _H8300_SHM_H -#define _H8300_SHM_H - - -/* format of page table entries that correspond to shared memory pages -currently out in swap space (see also mm/swap.c): -bits 0-1 (PAGE_PRESENT) is = 0 -bits 8..2 (SWP_TYPE) are = SHM_SWP_TYPE -bits 31..9 are used like this: -bits 15..9 (SHM_ID) the id of the shared memory segment -bits 30..16 (SHM_IDX) the index of the page within the shared memory segment -(actually only bits 25..16 get used since SHMMAX is so low) -bit 31 (SHM_READ_ONLY) flag whether the page belongs to a read-only attach -*/ -/* on the m68k both bits 0 and 1 must be zero */ -/* format on the sun3 is similar, but bits 30, 31 are set to zero and all -others are reduced by 2. --m */ - -#ifndef CONFIG_SUN3 -#define SHM_ID_SHIFT 9 -#else -#define SHM_ID_SHIFT 7 -#endif -#define _SHM_ID_BITS 7 -#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1) - -#define SHM_IDX_SHIFT (SHM_ID_SHIFT+_SHM_ID_BITS) -#define _SHM_IDX_BITS 15 -#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1) - -#endif /* _H8300_SHM_H */
arch/h8300/include/asm/shmbuf.h +1 -41
43 lines not on this page · raw message
arch/h8300/include/asm/shmparam.h +1 -6
@@ -1,6 +1 @@ -#ifndef _H8300_SHMPARAM_H -#define _H8300_SHMPARAM_H - -#define SHMLBA PAGE_SIZE/* attach addr a multiple of this */ - -#endif /* _H8300_SHMPARAM_H */ +#include <asm-generic/shmparam.h>
arch/h8300/include/asm/socket.h +1 -65
66 lines not on this page · raw message
arch/h8300/include/asm/sockios.h +1 -13
@@ -1,13 +1 @@ -#ifndef __ARCH_H8300_SOCKIOS__ -#define __ARCH_H8300_SOCKIOS__ - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906/* Get stamp (timeval) */ -#define SIOCGSTAMPNS 0x8907/* Get stamp (timespec) */ - -#endif /* __ARCH_H8300_SOCKIOS__ */ +#include <asm-generic/sockios.h>
arch/h8300/include/asm/stat.h +2 -60
72 lines not on this page · raw message
arch/h8300/include/asm/swab.h +1 -10
@@ -1,10 +1 @@ -#ifndef _H8300_SWAB_H -#define _H8300_SWAB_H - -#include <linux/types.h> - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) -# define __SWAB_64_THRU_32__ -#endif - -#endif /* _H8300_SWAB_H */ +#include <asm-generic/swab.h>
arch/h8300/include/asm/termbits.h +1 -200
201 lines not on this page · raw message
arch/h8300/include/asm/termios.h +1 -92
93 lines not on this page · raw message
arch/h8300/include/asm/tlb.h +0 -11
@@ -7,17 +7,6 @@#define tlb_flush (tlb) do { } while(0) -/* -include/asm-h8300/tlb.h -*/ - -#ifndef __H8300_TLB_H__ -#define __H8300_TLB_H__ - -#define tlb_flush (tlb) do { } while(0) -#include <asm-generic/tlb.h> #endif - -#endif
arch/h8300/include/asm/tlbflush.h +1 -55
56 lines not on this page · raw message
arch/h8300/include/asm/types.h +1 -33
@@ -1,33 +1 @@ -#ifndef _H8300_TYPES_H -#define _H8300_TYPES_H - -#include <asm-generic/int-ll64.h> - -#if !defined(__ASSEMBLY__) - -/* -* This file is never included by application software unless -* explicitly requested (e.g., via linux/types.h) in which case the -* application is Linux specific so (user-) name space pollution is -* not a major issue. However, for interoperability, libraries still -* need to be careful to avoid a name clashes. -*/ - -typedef unsigned short umode_t ; - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -#ifdef __KERNEL__ - -#define BITS_PER_LONG 32 - -/* Dma addresses are 32-bits wide. */ - -typedef u32 dma_addr_t ; - -#endif /* __KERNEL__ */ - -#endif /* __ASSEMBLY__ */ - -#endif /* _H8300_TYPES_H */ +#include <asm-generic/types.h>
arch/h8300/include/asm/uaccess.h +23 -1
@@ -91,7 +91,28 @@ extern int __put_user_bad(void);#define get_user (x, ptr) \ ({ \ int __gu_err = 0; \ - typeof(*(ptr)) __gu_val = *ptr; \ + typeof(*(ptr)) *__gu_addr = (ptr); \ + switch (sizeof(*(ptr))) { \ + case 1: \ + case 2: \ + case 4: \ + case 8: \ + break; \ + default: \ + __gu_err = __get_user_bad(); \ + __gu_addr = NULL; \ + break; \ + } \ + if(__gu_addr) \ + (x) = *__gu_addr; \ + __gu_err; \ +}) +#define __get_user (x, ptr) get_user(x, ptr) +#if 0 +#define get_user (x, ptr) \ +({ \ + int __gu_err = 0; \ + typeof(*(ptr)) __gu_val = *(ptr); \ switch (sizeof(*(ptr))) { \ case 1: \ case 2: \
@@ -107,6 +128,7 @@ extern int __put_user_bad(void); __gu_err; \ })#define __get_user (x, ptr) get_user(x, ptr) +#endif extern int __get_user_bad (void );
arch/h8300/include/asm/ucontext.h +1 -12
@@ -1,12 +1 @@ -#ifndef _H8300_UCONTEXT_H -#define _H8300_UCONTEXT_H - -struct ucontext { -unsigned long uc_flags; -struct ucontext *uc_link; -stack_t uc_stack; -struct sigcontext uc_mcontext; -sigset_t uc_sigmask;/* mask last for extensibility */ -}; - -#endif +#include <asm-generic/ucontext.h>
arch/h8300/include/asm/virtconvert.h deleted +0 -20
@@ -1,20 +0,0 @@ -#ifndef __H8300_VIRT_CONVERT__ -#define __H8300_VIRT_CONVERT__ - -/* -* Macros used for converting between virtual and physical mappings. -*/ - -#ifdef __KERNEL__ - -#include <asm/setup.h> -#include <asm/page.h> - -#define phys_to_virt (vaddr) ((void *) (vaddr)) -#define virt_to_phys (vaddr) ((unsigned long) (vaddr)) - -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt - -#endif -#endif
arch/h8300/kernel/asm-offsets.c +0 -1
@@ -14,7 +14,6 @@#include <linux/ptrace.h> #include <linux/hardirq.h> #include <linux/kbuild.h> -#include <asm/bootinfo.h> #include <asm/irq.h> #include <asm/ptrace.h>
arch/h8300/kernel/sys_h8300.c +0 -1
@@ -22,7 +22,6 @@#include <asm/setup.h> #include <asm/uaccess.h> -#include <asm/cachectl.h> #include <asm/traps.h> #include <asm/unistd.h>
Signature · 1 line
1.6.5.3