--- ./asm/a.out.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/a.out.h 2007-05-24 15:40:41.000000000 +0200 @@ -27,10 +27,6 @@ #define M_ARM 103 -#ifdef __KERNEL__ -#define __STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \ - TASK_SIZE : TASK_SIZE_26) -#endif #ifndef LIBRARY_START_TEXT #define LIBRARY_START_TEXT (0x00c00000) --- ./asm/byteorder.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/byteorder.h 2007-05-24 15:40:41.000000000 +0200 @@ -15,10 +15,9 @@ #ifndef __ASM_ARM_BYTEORDER_H #define __ASM_ARM_BYTEORDER_H -#include #include -static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) +static __inline__ __u32 ___arch__swab32(__u32 x) { __u32 t; --- ./asm/elf.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/elf.h 2007-05-24 15:40:41.000000000 +0200 @@ -39,109 +39,5 @@ #endif #define ELF_ARCH EM_ARM -#ifdef __KERNEL__ -#include - -/* - * This is used to ensure we don't load something for the wrong architecture. - */ -#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) ) - -#define USE_ELF_CORE_DUMP -#define ELF_EXEC_PAGESIZE 4096 - -/* This is the location that an ET_DYN program is loaded if exec'ed. Typical - use of this is to invoke "./ld.so someprog" to test out a new version of - the loader. We need to make sure that it is out of the way of the program - that it will "exec", and that there is sufficient room for the brk. */ - -#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) - -#ifdef CONFIG_PAX_ASLR -#define PAX_ELF_ET_DYN_BASE(tsk) 0x00008000UL - -#define PAX_DELTA_MMAP_LSB(tsk) PAGE_SHIFT -#define PAX_DELTA_MMAP_LEN(tsk) ((tsk->personality == PER_LINUX_32BIT) ? 16 : 10) -#define PAX_DELTA_EXEC_LSB(tsk) PAGE_SHIFT -#define PAX_DELTA_EXEC_LEN(tsk) ((tsk->personality == PER_LINUX_32BIT) ? 16 : 10) -#define PAX_DELTA_STACK_LSB(tsk) PAGE_SHIFT -#define PAX_DELTA_STACK_LEN(tsk) ((tsk->personality == PER_LINUX_32BIT) ? 16 : 10) -#endif - -/* When the program starts, a1 contains a pointer to a function to be - registered with atexit, as per the SVR4 ABI. A value of 0 means we - have no such handler. */ -#define ELF_PLAT_INIT(_r, load_addr) (_r)->ARM_r0 = 0 - -/* This yields a mask that user programs can use to figure out what - instruction set this cpu supports. */ - -#define ELF_HWCAP (elf_hwcap) - -/* This yields a string that ld.so will use to load implementation - specific libraries for optimization. This is more specific in - intent than poking at uname or /proc/cpuinfo. */ - -/* For now we just provide a fairly general string that describes the - processor family. This could be made more specific later if someone - implemented optimisations that require it. 26-bit CPUs give you - "v1l" for ARM2 (no SWP) and "v2l" for anything else (ARM1 isn't - supported). 32-bit CPUs give you "v3[lb]" for anything based on an - ARM6 or ARM7 core and "armv4[lb]" for anything based on a StrongARM-1 - core. */ - -#define ELF_PLATFORM_SIZE 8 -extern char elf_platform[]; -#define ELF_PLATFORM (elf_platform) - -/* - * 32-bit code is always OK. Some cpus can do 26-bit, some can't. - */ -#define ELF_PROC_OK(x) (ELF_THUMB_OK(x) && ELF_26BIT_OK(x)) - -#define ELF_THUMB_OK(x) \ - (( (elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 1) == 1) || \ - ((x)->e_entry & 3) == 0) - -#define ELF_26BIT_OK(x) \ - (( (elf_hwcap & HWCAP_26BIT) && (x)->e_flags & EF_ARM_APCS26) || \ - ((x)->e_flags & EF_ARM_APCS26) == 0) - -#ifndef CONFIG_IWMMXT - -/* Old NetWinder binaries were compiled in such a way that the iBCS - heuristic always trips on them. Until these binaries become uncommon - enough not to care, don't trust the `ibcs' flag here. In any case - there is no other ELF system currently supported by iBCS. - @@ Could print a warning message to encourage users to upgrade. */ -#define SET_PERSONALITY(ex,ibcs2) \ - set_personality(((ex).e_flags&EF_ARM_APCS26 ?PER_LINUX :PER_LINUX_32BIT)) - -#else - -/* - * All iWMMXt capable CPUs don't support 26-bit mode. Yet they can run - * legacy binaries which used to contain FPA11 floating point instructions - * that have always been emulated by the kernel. PFA11 and iWMMXt overlap - * on coprocessor 1 space though. We therefore must decide if given task - * is allowed to use CP 0 and 1 for iWMMXt, or if they should be blocked - * at all times for the prefetch exception handler to catch FPA11 opcodes - * and emulate them. The best indication to discriminate those two cases - * is the SOFT_FLOAT flag in the ELF header. - */ - -#define SET_PERSONALITY(ex,ibcs2) \ -do { \ - set_personality(PER_LINUX_32BIT); \ - if (((ex).e_flags & EF_ARM_EABI_MASK) || \ - ((ex).e_flags & EF_ARM_SOFT_FLOAT)) \ - set_thread_flag(TIF_USING_IWMMXT); \ - else \ - clear_thread_flag(TIF_USING_IWMMXT); \ -} while (0) - -#endif - -#endif #endif --- ./asm/ioctls.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/ioctls.h 2007-05-24 15:40:41.000000000 +0200 @@ -63,7 +63,7 @@ #define TIOCSERSETMULTI 0x545B /* Set multiport config */ #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ +#define TIOCGICOUNT 0x545D /* read serial port __inline__ interrupt counts */ #define FIOQSIZE 0x545E /* Used for packet mode */ --- ./asm/page.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/page.h 2007-05-24 15:40:41.000000000 +0200 @@ -11,187 +11,5 @@ #define _ASMARM_PAGE_H -#ifdef __KERNEL__ - -/* PAGE_SHIFT determines the page size */ -#define PAGE_SHIFT 12 -#define PAGE_SIZE (1UL << PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE-1)) - -/* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) - -#ifndef __ASSEMBLY__ - -#ifndef CONFIG_MMU - -#include "page-nommu.h" - -#else - -#include - -/* - * User Space Model - * ================ - * - * This section selects the correct set of functions for dealing with - * page-based copying and clearing for user space for the particular - * processor(s) we're building for. - * - * We have the following to choose from: - * v3 - ARMv3 - * v4wt - ARMv4 with writethrough cache, without minicache - * v4wb - ARMv4 with writeback cache, without minicache - * v4_mc - ARMv4 with minicache - * xscale - Xscale - * xsc3 - XScalev3 - */ -#undef _USER -#undef MULTI_USER - -#ifdef CONFIG_CPU_COPY_V3 -# ifdef _USER -# define MULTI_USER 1 -# else -# define _USER v3 -# endif -#endif - -#ifdef CONFIG_CPU_COPY_V4WT -# ifdef _USER -# define MULTI_USER 1 -# else -# define _USER v4wt -# endif -#endif - -#ifdef CONFIG_CPU_COPY_V4WB -# ifdef _USER -# define MULTI_USER 1 -# else -# define _USER v4wb -# endif -#endif - -#ifdef CONFIG_CPU_SA1100 -# ifdef _USER -# define MULTI_USER 1 -# else -# define _USER v4_mc -# endif -#endif - -#ifdef CONFIG_CPU_XSCALE -# ifdef _USER -# define MULTI_USER 1 -# else -# define _USER xscale_mc -# endif -#endif - -#ifdef CONFIG_CPU_XSC3 -# ifdef _USER -# define MULTI_USER 1 -# else -# define _USER xsc3_mc -# endif -#endif - -#ifdef CONFIG_CPU_COPY_V6 -# define MULTI_USER 1 -#endif - -#if !defined(_USER) && !defined(MULTI_USER) -#error Unknown user operations model -#endif - -struct cpu_user_fns { - void (*cpu_clear_user_page)(void *p, unsigned long user); - void (*cpu_copy_user_page)(void *to, const void *from, - unsigned long user); -}; - -#ifdef MULTI_USER -extern struct cpu_user_fns cpu_user; - -#define __cpu_clear_user_page cpu_user.cpu_clear_user_page -#define __cpu_copy_user_page cpu_user.cpu_copy_user_page - -#else - -#define __cpu_clear_user_page __glue(_USER,_clear_user_page) -#define __cpu_copy_user_page __glue(_USER,_copy_user_page) - -extern void __cpu_clear_user_page(void *p, unsigned long user); -extern void __cpu_copy_user_page(void *to, const void *from, - unsigned long user); -#endif - -#define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) -#define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) - -#define clear_page(page) memzero((void *)(page), PAGE_SIZE) -extern void copy_page(void *to, const void *from); - -#undef STRICT_MM_TYPECHECKS - -#ifdef STRICT_MM_TYPECHECKS -/* - * These are used to make use of C type-checking.. - */ -typedef struct { unsigned long pte; } pte_t; -typedef struct { unsigned long pmd; } pmd_t; -typedef struct { unsigned long pgd[2]; } pgd_t; -typedef struct { unsigned long pgprot; } pgprot_t; - -#define pte_val(x) ((x).pte) -#define pmd_val(x) ((x).pmd) -#define pgd_val(x) ((x).pgd[0]) -#define pgprot_val(x) ((x).pgprot) - -#define __pte(x) ((pte_t) { (x) } ) -#define __pmd(x) ((pmd_t) { (x) } ) -#define __pgprot(x) ((pgprot_t) { (x) } ) - -#else -/* - * .. while these make it easier on the compiler - */ -typedef unsigned long pte_t; -typedef unsigned long pmd_t; -typedef unsigned long pgd_t[2]; -typedef unsigned long pgprot_t; - -#define pte_val(x) (x) -#define pmd_val(x) (x) -#define pgd_val(x) ((x)[0]) -#define pgprot_val(x) (x) - -#define __pte(x) (x) -#define __pmd(x) (x) -#define __pgprot(x) (x) - -#endif /* STRICT_MM_TYPECHECKS */ - -#endif /* CONFIG_MMU */ - -#include - -#endif /* !__ASSEMBLY__ */ - -#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ - VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) - -/* - * With EABI on ARMv5 and above we must have 64-bit aligned slab pointers. - */ -#if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5) -#define ARCH_SLAB_MINALIGN 8 -#endif - -#include - -#endif /* __KERNEL__ */ #endif --- ./asm/param.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/param.h 2007-05-24 15:40:41.000000000 +0200 @@ -10,13 +10,7 @@ #ifndef __ASM_PARAM_H #define __ASM_PARAM_H -#ifdef __KERNEL__ -# define HZ CONFIG_HZ /* Internal kernel timer frequency */ -# define USER_HZ 100 /* User interfaces are in "ticks" */ -# define CLOCKS_PER_SEC (USER_HZ) /* like times() */ -#else # define HZ 100 -#endif #define EXEC_PAGESIZE 4096 --- ./asm/ptrace.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/ptrace.h 2007-05-24 15:40:41.000000000 +0200 @@ -95,48 +95,6 @@ #define ARM_r0 uregs[0] #define ARM_ORIG_r0 uregs[17] -#ifdef __KERNEL__ - -#define user_mode(regs) \ - (((regs)->ARM_cpsr & 0xf) == 0) - -#ifdef CONFIG_ARM_THUMB -#define thumb_mode(regs) \ - (((regs)->ARM_cpsr & PSR_T_BIT)) -#else -#define thumb_mode(regs) (0) -#endif - -#define processor_mode(regs) \ - ((regs)->ARM_cpsr & MODE_MASK) - -#define interrupts_enabled(regs) \ - (!((regs)->ARM_cpsr & PSR_I_BIT)) - -#define fast_interrupts_enabled(regs) \ - (!((regs)->ARM_cpsr & PSR_F_BIT)) - -#define condition_codes(regs) \ - ((regs)->ARM_cpsr & (PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT)) - -/* Are the current registers suitable for user mode? - * (used to maintain security in signal handlers) - */ -static inline int valid_user_regs(struct pt_regs *regs) -{ - if (user_mode(regs) && - (regs->ARM_cpsr & (PSR_F_BIT|PSR_I_BIT)) == 0) - return 1; - - /* - * Force CPSR to something logical... - */ - regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT; - - return 0; -} - -#endif /* __KERNEL__ */ #define pc_pointer(v) \ ((v) & ~PCMASK) @@ -150,10 +108,6 @@ #define profile_pc(regs) instruction_pointer(regs) #endif -#ifdef __KERNEL__ -#define predicate(x) ((x) & 0xf0000000) -#define PREDICATE_ALWAYS 0xe0000000 -#endif #endif /* __ASSEMBLY__ */ --- ./asm/signal.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/signal.h 2007-05-24 15:40:41.000000000 +0200 @@ -6,27 +6,11 @@ /* Avoid too many header ordering problems. */ struct siginfo; -#ifdef __KERNEL__ -/* Most things should be clean enough to redefine this at will, if care - is taken to make libc match. */ - -#define _NSIG 64 -#define _NSIG_BPW 32 -#define _NSIG_WORDS (_NSIG / _NSIG_BPW) - -typedef unsigned long old_sigset_t; /* at least 32 bits */ - -typedef struct { - unsigned long sig[_NSIG_WORDS]; -} sigset_t; - -#else /* Here we must cater to libcs that poke about in kernel headers. */ #define NSIG 32 typedef unsigned long sigset_t; -#endif /* __KERNEL__ */ #define SIGHUP 1 #define SIGINT 2 @@ -113,26 +97,6 @@ #include -#ifdef __KERNEL__ -struct old_sigaction { - __sighandler_t sa_handler; - old_sigset_t sa_mask; - unsigned long sa_flags; - __sigrestore_t sa_restorer; -}; - -struct sigaction { - __sighandler_t sa_handler; - unsigned long sa_flags; - __sigrestore_t sa_restorer; - sigset_t sa_mask; /* mask last for extensibility */ -}; - -struct k_sigaction { - struct sigaction sa; -}; - -#else /* Here we must cater to libcs that poke about in kernel headers. */ struct sigaction { @@ -148,17 +112,12 @@ #define sa_handler _u._sa_handler #define sa_sigaction _u._sa_sigaction -#endif /* __KERNEL__ */ typedef struct sigaltstack { - void __user *ss_sp; + void *ss_sp; int ss_flags; size_t ss_size; } stack_t; -#ifdef __KERNEL__ -#include -#define ptrace_signal_deliver(regs, cookie) do { } while (0) -#endif #endif --- ./asm/termios.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/termios.h 2007-05-24 15:40:41.000000000 +0200 @@ -21,15 +21,6 @@ unsigned char c_cc[NCC]; /* control characters */ }; -#ifdef __KERNEL__ -/* intr=^C quit=^| erase=del kill=^U - eof=^D vtime=\0 vmin=\1 sxtc=\0 - start=^Q stop=^S susp=^Z eol=\0 - reprint=^R discard=^U werase=^W lnext=^V - eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" -#endif /* modem lines */ #define TIOCM_LE 0x001 @@ -67,42 +58,5 @@ #define N_SYNC_PPP 14 #define N_HCI 15 /* Bluetooth HCI UART */ -#ifdef __KERNEL__ - -/* - * Translate a "termio" structure into a "termios". Ugh. - */ -#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ - unsigned short __tmp; \ - get_user(__tmp,&(termio)->x); \ - *(unsigned short *) &(termios)->x = __tmp; \ -} - -#define user_termio_to_kernel_termios(termios, termio) \ -({ \ - SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ - copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ -}) - -/* - * Translate a "termios" structure into a "termio". Ugh. - */ -#define kernel_termios_to_user_termio(termio, termios) \ -({ \ - put_user((termios)->c_iflag, &(termio)->c_iflag); \ - put_user((termios)->c_oflag, &(termio)->c_oflag); \ - put_user((termios)->c_cflag, &(termio)->c_cflag); \ - put_user((termios)->c_lflag, &(termio)->c_lflag); \ - put_user((termios)->c_line, &(termio)->c_line); \ - copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ -}) - -#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) -#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) - -#endif /* __KERNEL__ */ #endif /* __ASM_ARM_TERMIOS_H */ --- ./asm/types.h 2007-05-08 14:40:11.000000000 +0200 +++ ./asm/types.h 2007-05-24 15:40:41.000000000 +0200 @@ -29,32 +29,6 @@ /* * These aren't exported outside the kernel to avoid name space clashes */ -#ifdef __KERNEL__ - -#define BITS_PER_LONG 32 - -#ifndef __ASSEMBLY__ - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - -/* Dma addresses are 32-bits wide. */ - -typedef u32 dma_addr_t; -typedef u32 dma64_addr_t; - -#endif /* __ASSEMBLY__ */ - -#endif /* __KERNEL__ */ #endif --- ./asm/unistd.h 2007-06-21 10:40:17.000000000 +0200 +++ ./asm/unistd.h 2007-05-24 15:40:41.000000000 +0200 @@ -389,186 +389,4 @@ #undef __NR_ipc #endif -#ifdef __KERNEL__ -#include -#include - -#define __sys2(x) #x -#define __sys1(x) __sys2(x) - -#ifndef __syscall -#if defined(__thumb__) || defined(__ARM_EABI__) -#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; -#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs -#define __syscall(name) "swi\t0" -#else -#define __SYS_REG(name) -#define __SYS_REG_LIST(regs...) regs -#define __syscall(name) "swi\t" __sys1(__NR_##name) "" -#endif -#endif - -#define __syscall_return(type, res) \ -do { \ - if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ - errno = -(res); \ - res = -1; \ - } \ - return (type) (res); \ -} while (0) - -#define _syscall0(type,name) \ -type name(void) { \ - __SYS_REG(name) \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST() \ - : "memory" ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - -#define _syscall1(type,name,type1,arg1) \ -type name(type1 arg1) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0) ) \ - : "memory" ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - -#define _syscall2(type,name,type1,arg1,type2,arg2) \ -type name(type1 arg1,type2 arg2) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ - : "memory" ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - - -#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type name(type1 arg1,type2 arg2,type3 arg3) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ - : "memory" ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - - -#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ -type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __r3 __asm__("r3") = (long)arg4; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ - : "memory" ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - - -#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ -type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __r3 __asm__("r3") = (long)arg4; \ - register long __r4 __asm__("r4") = (long)arg5; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ - "r" (__r3), "r" (__r4) ) \ - : "memory" ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - -#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ -type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) { \ - __SYS_REG(name) \ - register long __r0 __asm__("r0") = (long)arg1; \ - register long __r1 __asm__("r1") = (long)arg2; \ - register long __r2 __asm__("r2") = (long)arg3; \ - register long __r3 __asm__("r3") = (long)arg4; \ - register long __r4 __asm__("r4") = (long)arg5; \ - register long __r5 __asm__("r5") = (long)arg6; \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ( \ - __syscall(name) \ - : "=r" (__res_r0) \ - : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ - "r" (__r3), "r" (__r4), "r" (__r5) ) \ - : "memory" ); \ - __res = __res_r0; \ - __syscall_return(type,__res); \ -} - -#define __ARCH_WANT_IPC_PARSE_VERSION -#define __ARCH_WANT_STAT64 -#define __ARCH_WANT_SYS_GETHOSTNAME -#define __ARCH_WANT_SYS_PAUSE -#define __ARCH_WANT_SYS_GETPGRP -#define __ARCH_WANT_SYS_LLSEEK -#define __ARCH_WANT_SYS_NICE -#define __ARCH_WANT_SYS_SIGPENDING -#define __ARCH_WANT_SYS_SIGPROCMASK -#define __ARCH_WANT_SYS_RT_SIGACTION - -#if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT) -#define __ARCH_WANT_SYS_TIME -#define __ARCH_WANT_SYS_OLDUMOUNT -#define __ARCH_WANT_SYS_ALARM -#define __ARCH_WANT_SYS_UTIME -#define __ARCH_WANT_SYS_OLD_GETRLIMIT -#define __ARCH_WANT_OLD_READDIR -#define __ARCH_WANT_SYS_SOCKETCALL -#endif - -/* - * "Conditional" syscalls - * - * What we want is __attribute__((weak,alias("sys_ni_syscall"))), - * but it doesn't work on all toolchains, so we just do it by hand - */ -#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") - -#endif /* __KERNEL__ */ #endif /* __ASM_ARM_UNISTD_H */ --- ./asm-generic/atomic.h 2007-05-08 14:40:05.000000000 +0200 +++ ./asm-generic/atomic.h 2007-05-24 15:40:41.000000000 +0200 @@ -24,42 +24,42 @@ #define ATOMIC_LONG_INIT(i) ATOMIC64_INIT(i) -static inline long atomic_long_read(atomic_long_t *l) +static __inline__ long atomic_long_read(atomic_long_t *l) { atomic64_t *v = (atomic64_t *)l; return (long)atomic64_read(v); } -static inline void atomic_long_set(atomic_long_t *l, long i) +static __inline__ void atomic_long_set(atomic_long_t *l, long i) { atomic64_t *v = (atomic64_t *)l; atomic64_set(v, i); } -static inline void atomic_long_inc(atomic_long_t *l) +static __inline__ void atomic_long_inc(atomic_long_t *l) { atomic64_t *v = (atomic64_t *)l; atomic64_inc(v); } -static inline void atomic_long_dec(atomic_long_t *l) +static __inline__ void atomic_long_dec(atomic_long_t *l) { atomic64_t *v = (atomic64_t *)l; atomic64_dec(v); } -static inline void atomic_long_add(long i, atomic_long_t *l) +static __inline__ void atomic_long_add(long i, atomic_long_t *l) { atomic64_t *v = (atomic64_t *)l; atomic64_add(i, v); } -static inline void atomic_long_sub(long i, atomic_long_t *l) +static __inline__ void atomic_long_sub(long i, atomic_long_t *l) { atomic64_t *v = (atomic64_t *)l; @@ -71,42 +71,42 @@ typedef atomic_t atomic_long_t; #define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i) -static inline long atomic_long_read(atomic_long_t *l) +static __inline__ long atomic_long_read(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_read(v); } -static inline void atomic_long_set(atomic_long_t *l, long i) +static __inline__ void atomic_long_set(atomic_long_t *l, long i) { atomic_t *v = (atomic_t *)l; atomic_set(v, i); } -static inline void atomic_long_inc(atomic_long_t *l) +static __inline__ void atomic_long_inc(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_inc(v); } -static inline void atomic_long_dec(atomic_long_t *l) +static __inline__ void atomic_long_dec(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_dec(v); } -static inline void atomic_long_add(long i, atomic_long_t *l) +static __inline__ void atomic_long_add(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_add(i, v); } -static inline void atomic_long_sub(long i, atomic_long_t *l) +static __inline__ void atomic_long_sub(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; --- ./asm-generic/ipc.h 2007-05-08 14:40:05.000000000 +0200 +++ ./asm-generic/ipc.h 2007-05-24 15:40:41.000000000 +0200 @@ -6,7 +6,7 @@ * See architecture code for ugly details.. */ struct ipc_kludge { - struct msgbuf __user *msgp; + struct msgbuf *msgp; long msgtyp; }; --- ./asm-generic/signal.h 2007-05-08 14:40:05.000000000 +0200 +++ ./asm-generic/signal.h 2007-05-24 15:40:41.000000000 +0200 @@ -1,7 +1,6 @@ #ifndef __ASM_GENERIC_SIGNAL_H #define __ASM_GENERIC_SIGNAL_H -#include #ifndef SIG_BLOCK #define SIG_BLOCK 0 /* for blocking signals */ @@ -15,14 +14,14 @@ #ifndef __ASSEMBLY__ typedef void __signalfn_t(int); -typedef __signalfn_t __user *__sighandler_t; +typedef __signalfn_t *__sighandler_t; typedef void __restorefn_t(void); -typedef __restorefn_t __user *__sigrestore_t; +typedef __restorefn_t *__sigrestore_t; -#define SIG_DFL ((__force __sighandler_t)0) /* default signal handling */ -#define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */ -#define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */ +#define SIG_DFL ( (__sighandler_t)0) /* default signal handling */ +#define SIG_IGN ( (__sighandler_t)1) /* ignore signal */ +#define SIG_ERR ( (__sighandler_t)-1) /* error return from signal */ #endif #endif /* __ASM_GENERIC_SIGNAL_H */ --- ./asm-generic/resource.h 2007-05-08 14:40:05.000000000 +0200 +++ ./asm-generic/resource.h 2007-05-24 15:40:41.000000000 +0200 @@ -64,30 +64,5 @@ # define _STK_LIM_MAX RLIM_INFINITY #endif -#ifdef __KERNEL__ - -/* - * boot-time rlimit defaults for the init task: - */ -#define INIT_RLIMITS \ -{ \ - [RLIMIT_CPU] = { RLIM_INFINITY, RLIM_INFINITY }, \ - [RLIMIT_FSIZE] = { RLIM_INFINITY, RLIM_INFINITY }, \ - [RLIMIT_DATA] = { RLIM_INFINITY, RLIM_INFINITY }, \ - [RLIMIT_STACK] = { _STK_LIM, _STK_LIM_MAX }, \ - [RLIMIT_CORE] = { 0, RLIM_INFINITY }, \ - [RLIMIT_RSS] = { RLIM_INFINITY, RLIM_INFINITY }, \ - [RLIMIT_NPROC] = { 0, 0 }, \ - [RLIMIT_NOFILE] = { INR_OPEN, INR_OPEN }, \ - [RLIMIT_MEMLOCK] = { MLOCK_LIMIT, MLOCK_LIMIT }, \ - [RLIMIT_AS] = { RLIM_INFINITY, RLIM_INFINITY }, \ - [RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, \ - [RLIMIT_SIGPENDING] = { 0, 0 }, \ - [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \ - [RLIMIT_NICE] = { 0, 0 }, \ - [RLIMIT_RTPRIO] = { 0, 0 }, \ -} - -#endif /* __KERNEL__ */ #endif --- ./asm-generic/siginfo.h 2007-05-08 14:40:05.000000000 +0200 +++ ./asm-generic/siginfo.h 2007-05-24 15:40:41.000000000 +0200 @@ -1,12 +1,11 @@ #ifndef _ASM_GENERIC_SIGINFO_H #define _ASM_GENERIC_SIGINFO_H -#include #include typedef union sigval { int sival_int; - void __user *sival_ptr; + void *sival_ptr; } sigval_t; /* @@ -78,7 +77,7 @@ /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ struct { - void __user *_addr; /* faulting insn/memory ref. */ + void *_addr; /* faulting insn/memory ref. */ #ifdef __ARCH_SI_TRAPNO int _trapno; /* TRAP # which caused the signal */ #endif @@ -115,17 +114,6 @@ #define si_band _sifields._sigpoll._band #define si_fd _sifields._sigpoll._fd -#ifdef __KERNEL__ -#define __SI_MASK 0xffff0000u -#define __SI_KILL (0 << 16) -#define __SI_TIMER (1 << 16) -#define __SI_POLL (2 << 16) -#define __SI_FAULT (3 << 16) -#define __SI_CHLD (4 << 16) -#define __SI_RT (5 << 16) -#define __SI_MESGQ (6 << 16) -#define __SI_CODE(T,N) ((T) | ((N) & 0xffff)) -#else #define __SI_KILL 0 #define __SI_TIMER 0 #define __SI_POLL 0 @@ -134,7 +122,6 @@ #define __SI_RT 0 #define __SI_MESGQ 0 #define __SI_CODE(T,N) (N) -#endif /* * si_code values @@ -267,28 +254,5 @@ #define sigev_notify_attributes _sigev_un._sigev_thread._attribute #define sigev_notify_thread_id _sigev_un._tid -#ifdef __KERNEL__ - -struct siginfo; -void do_schedule_next_timer(struct siginfo *info); - -#ifndef HAVE_ARCH_COPY_SIGINFO - -#include - -static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) -{ - if (from->si_code < 0) - memcpy(to, from, sizeof(*to)); - else - /* _sigchld is currently the largest know union member */ - memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld)); -} - -#endif - -extern int copy_siginfo_to_user(struct siginfo __user *to, struct siginfo *from); - -#endif /* __KERNEL__ */ #endif --- ./linux/byteorder/big_endian.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/byteorder/big_endian.h 2007-05-24 15:40:41.000000000 +0200 @@ -11,82 +11,82 @@ #include #include -#define __constant_htonl(x) ((__force __be32)(__u32)(x)) -#define __constant_ntohl(x) ((__force __u32)(__be32)(x)) -#define __constant_htons(x) ((__force __be16)(__u16)(x)) -#define __constant_ntohs(x) ((__force __u16)(__be16)(x)) -#define __constant_cpu_to_le64(x) ((__force __le64)___constant_swab64((x))) -#define __constant_le64_to_cpu(x) ___constant_swab64((__force __u64)(__le64)(x)) -#define __constant_cpu_to_le32(x) ((__force __le32)___constant_swab32((x))) -#define __constant_le32_to_cpu(x) ___constant_swab32((__force __u32)(__le32)(x)) -#define __constant_cpu_to_le16(x) ((__force __le16)___constant_swab16((x))) -#define __constant_le16_to_cpu(x) ___constant_swab16((__force __u16)(__le16)(x)) -#define __constant_cpu_to_be64(x) ((__force __be64)(__u64)(x)) -#define __constant_be64_to_cpu(x) ((__force __u64)(__be64)(x)) -#define __constant_cpu_to_be32(x) ((__force __be32)(__u32)(x)) -#define __constant_be32_to_cpu(x) ((__force __u32)(__be32)(x)) -#define __constant_cpu_to_be16(x) ((__force __be16)(__u16)(x)) -#define __constant_be16_to_cpu(x) ((__force __u16)(__be16)(x)) -#define __cpu_to_le64(x) ((__force __le64)__swab64((x))) -#define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x)) -#define __cpu_to_le32(x) ((__force __le32)__swab32((x))) -#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) -#define __cpu_to_le16(x) ((__force __le16)__swab16((x))) -#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) -#define __cpu_to_be64(x) ((__force __be64)(__u64)(x)) -#define __be64_to_cpu(x) ((__force __u64)(__be64)(x)) -#define __cpu_to_be32(x) ((__force __be32)(__u32)(x)) -#define __be32_to_cpu(x) ((__force __u32)(__be32)(x)) -#define __cpu_to_be16(x) ((__force __be16)(__u16)(x)) -#define __be16_to_cpu(x) ((__force __u16)(__be16)(x)) +#define __constant_htonl(x) ( (__be32)(__u32)(x)) +#define __constant_ntohl(x) ( (__u32)(__be32)(x)) +#define __constant_htons(x) ( (__be16)(__u16)(x)) +#define __constant_ntohs(x) ( (__u16)(__be16)(x)) +#define __constant_cpu_to_le64(x) ( (__le64)___constant_swab64((x))) +#define __constant_le64_to_cpu(x) ___constant_swab64( (__u64)(__le64)(x)) +#define __constant_cpu_to_le32(x) ( (__le32)___constant_swab32((x))) +#define __constant_le32_to_cpu(x) ___constant_swab32( (__u32)(__le32)(x)) +#define __constant_cpu_to_le16(x) ( (__le16)___constant_swab16((x))) +#define __constant_le16_to_cpu(x) ___constant_swab16( (__u16)(__le16)(x)) +#define __constant_cpu_to_be64(x) ( (__be64)(__u64)(x)) +#define __constant_be64_to_cpu(x) ( (__u64)(__be64)(x)) +#define __constant_cpu_to_be32(x) ( (__be32)(__u32)(x)) +#define __constant_be32_to_cpu(x) ( (__u32)(__be32)(x)) +#define __constant_cpu_to_be16(x) ( (__be16)(__u16)(x)) +#define __constant_be16_to_cpu(x) ( (__u16)(__be16)(x)) +#define __cpu_to_le64(x) ( (__le64)__swab64((x))) +#define __le64_to_cpu(x) __swab64( (__u64)(__le64)(x)) +#define __cpu_to_le32(x) ( (__le32)__swab32((x))) +#define __le32_to_cpu(x) __swab32( (__u32)(__le32)(x)) +#define __cpu_to_le16(x) ( (__le16)__swab16((x))) +#define __le16_to_cpu(x) __swab16( (__u16)(__le16)(x)) +#define __cpu_to_be64(x) ( (__be64)(__u64)(x)) +#define __be64_to_cpu(x) ( (__u64)(__be64)(x)) +#define __cpu_to_be32(x) ( (__be32)(__u32)(x)) +#define __be32_to_cpu(x) ( (__u32)(__be32)(x)) +#define __cpu_to_be16(x) ( (__be16)(__u16)(x)) +#define __be16_to_cpu(x) ( (__u16)(__be16)(x)) -static inline __le64 __cpu_to_le64p(const __u64 *p) +static __inline__ __le64 __cpu_to_le64p(const __u64 *p) { - return (__force __le64)__swab64p(p); + return (__le64)__swab64p(p); } -static inline __u64 __le64_to_cpup(const __le64 *p) +static __inline__ __u64 __le64_to_cpup(const __le64 *p) { return __swab64p((__u64 *)p); } -static inline __le32 __cpu_to_le32p(const __u32 *p) +static __inline__ __le32 __cpu_to_le32p(const __u32 *p) { - return (__force __le32)__swab32p(p); + return (__le32)__swab32p(p); } -static inline __u32 __le32_to_cpup(const __le32 *p) +static __inline__ __u32 __le32_to_cpup(const __le32 *p) { return __swab32p((__u32 *)p); } -static inline __le16 __cpu_to_le16p(const __u16 *p) +static __inline__ __le16 __cpu_to_le16p(const __u16 *p) { - return (__force __le16)__swab16p(p); + return (__le16)__swab16p(p); } -static inline __u16 __le16_to_cpup(const __le16 *p) +static __inline__ __u16 __le16_to_cpup(const __le16 *p) { return __swab16p((__u16 *)p); } -static inline __be64 __cpu_to_be64p(const __u64 *p) +static __inline__ __be64 __cpu_to_be64p(const __u64 *p) { - return (__force __be64)*p; + return (__be64)*p; } -static inline __u64 __be64_to_cpup(const __be64 *p) +static __inline__ __u64 __be64_to_cpup(const __be64 *p) { - return (__force __u64)*p; + return (__u64)*p; } -static inline __be32 __cpu_to_be32p(const __u32 *p) +static __inline__ __be32 __cpu_to_be32p(const __u32 *p) { - return (__force __be32)*p; + return (__be32)*p; } -static inline __u32 __be32_to_cpup(const __be32 *p) +static __inline__ __u32 __be32_to_cpup(const __be32 *p) { - return (__force __u32)*p; + return (__u32)*p; } -static inline __be16 __cpu_to_be16p(const __u16 *p) +static __inline__ __be16 __cpu_to_be16p(const __u16 *p) { - return (__force __be16)*p; + return (__be16)*p; } -static inline __u16 __be16_to_cpup(const __be16 *p) +static __inline__ __u16 __be16_to_cpup(const __be16 *p) { - return (__force __u16)*p; + return (__u16)*p; } #define __cpu_to_le64s(x) __swab64s((x)) #define __le64_to_cpus(x) __swab64s((x)) --- ./linux/byteorder/little_endian.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/byteorder/little_endian.h 2007-05-24 15:40:41.000000000 +0200 @@ -11,80 +11,80 @@ #include #include -#define __constant_htonl(x) ((__force __be32)___constant_swab32((x))) -#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x)) -#define __constant_htons(x) ((__force __be16)___constant_swab16((x))) -#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x)) -#define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x)) -#define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x)) -#define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x)) -#define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x)) -#define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x)) -#define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x)) -#define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x))) -#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x)) -#define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x))) -#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x)) -#define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x))) -#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x)) -#define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) -#define __le64_to_cpu(x) ((__force __u64)(__le64)(x)) -#define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) -#define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) -#define __cpu_to_le16(x) ((__force __le16)(__u16)(x)) -#define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) -#define __cpu_to_be64(x) ((__force __be64)__swab64((x))) -#define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) -#define __cpu_to_be32(x) ((__force __be32)__swab32((x))) -#define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) -#define __cpu_to_be16(x) ((__force __be16)__swab16((x))) -#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x)) +#define __constant_htonl(x) ( (__be32)___constant_swab32((x))) +#define __constant_ntohl(x) ___constant_swab32( (__be32)(x)) +#define __constant_htons(x) ( (__be16)___constant_swab16((x))) +#define __constant_ntohs(x) ___constant_swab16( (__be16)(x)) +#define __constant_cpu_to_le64(x) ( (__le64)(__u64)(x)) +#define __constant_le64_to_cpu(x) ( (__u64)(__le64)(x)) +#define __constant_cpu_to_le32(x) ( (__le32)(__u32)(x)) +#define __constant_le32_to_cpu(x) ( (__u32)(__le32)(x)) +#define __constant_cpu_to_le16(x) ( (__le16)(__u16)(x)) +#define __constant_le16_to_cpu(x) ( (__u16)(__le16)(x)) +#define __constant_cpu_to_be64(x) ( (__be64)___constant_swab64((x))) +#define __constant_be64_to_cpu(x) ___constant_swab64( (__u64)(__be64)(x)) +#define __constant_cpu_to_be32(x) ( (__be32)___constant_swab32((x))) +#define __constant_be32_to_cpu(x) ___constant_swab32( (__u32)(__be32)(x)) +#define __constant_cpu_to_be16(x) ( (__be16)___constant_swab16((x))) +#define __constant_be16_to_cpu(x) ___constant_swab16( (__u16)(__be16)(x)) +#define __cpu_to_le64(x) ( (__le64)(__u64)(x)) +#define __le64_to_cpu(x) ( (__u64)(__le64)(x)) +#define __cpu_to_le32(x) ( (__le32)(__u32)(x)) +#define __le32_to_cpu(x) ( (__u32)(__le32)(x)) +#define __cpu_to_le16(x) ( (__le16)(__u16)(x)) +#define __le16_to_cpu(x) ( (__u16)(__le16)(x)) +#define __cpu_to_be64(x) ( (__be64)__swab64((x))) +#define __be64_to_cpu(x) __swab64( (__u64)(__be64)(x)) +#define __cpu_to_be32(x) ( (__be32)__swab32((x))) +#define __be32_to_cpu(x) __swab32( (__u32)(__be32)(x)) +#define __cpu_to_be16(x) ( (__be16)__swab16((x))) +#define __be16_to_cpu(x) __swab16( (__u16)(__be16)(x)) -static inline __le64 __cpu_to_le64p(const __u64 *p) +static __inline__ __le64 __cpu_to_le64p(const __u64 *p) { - return (__force __le64)*p; + return (__le64)*p; } -static inline __u64 __le64_to_cpup(const __le64 *p) +static __inline__ __u64 __le64_to_cpup(const __le64 *p) { - return (__force __u64)*p; + return (__u64)*p; } -static inline __le32 __cpu_to_le32p(const __u32 *p) +static __inline__ __le32 __cpu_to_le32p(const __u32 *p) { - return (__force __le32)*p; + return (__le32)*p; } -static inline __u32 __le32_to_cpup(const __le32 *p) +static __inline__ __u32 __le32_to_cpup(const __le32 *p) { - return (__force __u32)*p; + return (__u32)*p; } -static inline __le16 __cpu_to_le16p(const __u16 *p) +static __inline__ __le16 __cpu_to_le16p(const __u16 *p) { - return (__force __le16)*p; + return (__le16)*p; } -static inline __u16 __le16_to_cpup(const __le16 *p) +static __inline__ __u16 __le16_to_cpup(const __le16 *p) { - return (__force __u16)*p; + return (__u16)*p; } -static inline __be64 __cpu_to_be64p(const __u64 *p) +static __inline__ __be64 __cpu_to_be64p(const __u64 *p) { - return (__force __be64)__swab64p(p); + return (__be64)__swab64p(p); } -static inline __u64 __be64_to_cpup(const __be64 *p) +static __inline__ __u64 __be64_to_cpup(const __be64 *p) { return __swab64p((__u64 *)p); } -static inline __be32 __cpu_to_be32p(const __u32 *p) +static __inline__ __be32 __cpu_to_be32p(const __u32 *p) { - return (__force __be32)__swab32p(p); + return (__be32)__swab32p(p); } -static inline __u32 __be32_to_cpup(const __be32 *p) +static __inline__ __u32 __be32_to_cpup(const __be32 *p) { return __swab32p((__u32 *)p); } -static inline __be16 __cpu_to_be16p(const __u16 *p) +static __inline__ __be16 __cpu_to_be16p(const __u16 *p) { - return (__force __be16)__swab16p(p); + return (__be16)__swab16p(p); } -static inline __u16 __be16_to_cpup(const __be16 *p) +static __inline__ __u16 __be16_to_cpup(const __be16 *p) { return __swab16p((__u16 *)p); } --- ./linux/byteorder/generic.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/byteorder/generic.h 2007-05-24 15:40:41.000000000 +0200 @@ -55,7 +55,7 @@ * if that's true, then detect them, and take measures. * Anyway, the measure is: define only ___ntohl as a macro instead, * and in a separate file, have - * unsigned long inline ntohl(x){return ___ntohl(x);} + * unsigned long __inline__ ntohl(x){return ___ntohl(x);} * * The same for constant arguments * __constant_ntohl(__u32 x) @@ -83,94 +83,8 @@ */ -#if defined(__KERNEL__) -/* - * inside the kernel, we can use nicknames; - * outside of it, we must avoid POSIX namespace pollution... - */ -#define cpu_to_le64 __cpu_to_le64 -#define le64_to_cpu __le64_to_cpu -#define cpu_to_le32 __cpu_to_le32 -#define le32_to_cpu __le32_to_cpu -#define cpu_to_le16 __cpu_to_le16 -#define le16_to_cpu __le16_to_cpu -#define cpu_to_be64 __cpu_to_be64 -#define be64_to_cpu __be64_to_cpu -#define cpu_to_be32 __cpu_to_be32 -#define be32_to_cpu __be32_to_cpu -#define cpu_to_be16 __cpu_to_be16 -#define be16_to_cpu __be16_to_cpu -#define cpu_to_le64p __cpu_to_le64p -#define le64_to_cpup __le64_to_cpup -#define cpu_to_le32p __cpu_to_le32p -#define le32_to_cpup __le32_to_cpup -#define cpu_to_le16p __cpu_to_le16p -#define le16_to_cpup __le16_to_cpup -#define cpu_to_be64p __cpu_to_be64p -#define be64_to_cpup __be64_to_cpup -#define cpu_to_be32p __cpu_to_be32p -#define be32_to_cpup __be32_to_cpup -#define cpu_to_be16p __cpu_to_be16p -#define be16_to_cpup __be16_to_cpup -#define cpu_to_le64s __cpu_to_le64s -#define le64_to_cpus __le64_to_cpus -#define cpu_to_le32s __cpu_to_le32s -#define le32_to_cpus __le32_to_cpus -#define cpu_to_le16s __cpu_to_le16s -#define le16_to_cpus __le16_to_cpus -#define cpu_to_be64s __cpu_to_be64s -#define be64_to_cpus __be64_to_cpus -#define cpu_to_be32s __cpu_to_be32s -#define be32_to_cpus __be32_to_cpus -#define cpu_to_be16s __cpu_to_be16s -#define be16_to_cpus __be16_to_cpus -#endif - - -#if defined(__KERNEL__) -/* - * Handle ntohl and suches. These have various compatibility - * issues - like we want to give the prototype even though we - * also have a macro for them in case some strange program - * wants to take the address of the thing or something.. - * - * Note that these used to return a "long" in libc5, even though - * long is often 64-bit these days.. Thus the casts. - * - * They have to be macros in order to do the constant folding - * correctly - if the argument passed into a inline function - * it is no longer constant according to gcc.. - */ - -#undef ntohl -#undef ntohs -#undef htonl -#undef htons - -/* - * Do the prototypes. Somebody might want to take the - * address or some such sick thing.. - */ -extern __u32 ntohl(__be32); -extern __be32 htonl(__u32); -extern __u16 ntohs(__be16); -extern __be16 htons(__u16); - -#if defined(__GNUC__) && defined(__OPTIMIZE__) - -#define ___htonl(x) __cpu_to_be32(x) -#define ___htons(x) __cpu_to_be16(x) -#define ___ntohl(x) __be32_to_cpu(x) -#define ___ntohs(x) __be16_to_cpu(x) - -#define htonl(x) ___htonl(x) -#define ntohl(x) ___ntohl(x) -#define htons(x) ___htons(x) -#define ntohs(x) ___ntohs(x) -#endif /* OPTIMIZE */ -#endif /* KERNEL */ #endif /* _LINUX_BYTEORDER_GENERIC_H */ --- ./linux/byteorder/swab.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/byteorder/swab.h 2007-05-24 15:40:41.000000000 +0200 @@ -15,7 +15,6 @@ * */ -#include /* casts are necessary for constants, because we never know how for sure * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. @@ -130,7 +129,7 @@ #endif /* OPTIMIZE */ -static __inline__ __attribute_const__ __u16 __fswab16(__u16 x) +static __inline__ __u16 __fswab16(__u16 x) { return __arch__swab16(x); } @@ -143,7 +142,7 @@ __arch__swab16s(addr); } -static __inline__ __attribute_const__ __u32 __fswab32(__u32 x) +static __inline__ __u32 __fswab32(__u32 x) { return __arch__swab32(x); } @@ -157,7 +156,7 @@ } #ifdef __BYTEORDER_HAS_U64__ -static __inline__ __attribute_const__ __u64 __fswab64(__u64 x) +static __inline__ __u64 __fswab64(__u64 x) { # ifdef __SWAB_64_THRU_32__ __u32 h = x >> 32; @@ -177,16 +176,5 @@ } #endif /* __BYTEORDER_HAS_U64__ */ -#if defined(__KERNEL__) -#define swab16 __swab16 -#define swab32 __swab32 -#define swab64 __swab64 -#define swab16p __swab16p -#define swab32p __swab32p -#define swab64p __swab64p -#define swab16s __swab16s -#define swab32s __swab32s -#define swab64s __swab64s -#endif #endif /* _LINUX_BYTEORDER_SWAB_H */ --- ./linux/byteorder/swabb.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/byteorder/swabb.h 2007-05-24 15:40:41.000000000 +0200 @@ -92,32 +92,32 @@ #endif /* OPTIMIZE */ -static inline __u32 __fswahw32(__u32 x) +static __inline__ __u32 __fswahw32(__u32 x) { return __arch__swahw32(x); } -static inline __u32 __swahw32p(__u32 *x) +static __inline__ __u32 __swahw32p(__u32 *x) { return __arch__swahw32p(x); } -static inline void __swahw32s(__u32 *addr) +static __inline__ void __swahw32s(__u32 *addr) { __arch__swahw32s(addr); } -static inline __u32 __fswahb32(__u32 x) +static __inline__ __u32 __fswahb32(__u32 x) { return __arch__swahb32(x); } -static inline __u32 __swahb32p(__u32 *x) +static __inline__ __u32 __swahb32p(__u32 *x) { return __arch__swahb32p(x); } -static inline void __swahb32s(__u32 *addr) +static __inline__ void __swahb32s(__u32 *addr) { __arch__swahb32s(addr); } @@ -128,13 +128,5 @@ */ #endif /* __BYTEORDER_HAS_U64__ */ -#if defined(__KERNEL__) -#define swahw32 __swahw32 -#define swahb32 __swahb32 -#define swahw32p __swahw32p -#define swahb32p __swahb32p -#define swahw32s __swahw32s -#define swahb32s __swahb32s -#endif #endif /* _LINUX_BYTEORDER_SWABB_H */ --- ./linux/dvb/osd.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/dvb/osd.h 2007-05-24 15:40:41.000000000 +0200 @@ -24,7 +24,6 @@ #ifndef _DVBOSD_H_ #define _DVBOSD_H_ -#include typedef enum { // All functions return -2 on "not open" @@ -104,7 +103,7 @@ int x1; int y1; int color; - void __user *data; + void *data; } osd_cmd_t; /* OSD_OpenRaw: set 'color' to desired window type */ --- ./linux/dvb/audio.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/dvb/audio.h 2007-05-24 15:40:41.000000000 +0200 @@ -24,11 +24,7 @@ #ifndef _DVBAUDIO_H_ #define _DVBAUDIO_H_ -#ifdef __KERNEL__ -#include -#else #include -#endif typedef enum { --- ./linux/dvb/dmx.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/dvb/dmx.h 2007-05-24 15:40:41.000000000 +0200 @@ -25,11 +25,7 @@ #define _DVBDMX_H_ #include -#ifdef __KERNEL__ -#include -#else #include -#endif #define DMX_FILTER_SIZE 16 --- ./linux/dvb/video.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/dvb/video.h 2007-05-24 15:40:41.000000000 +0200 @@ -24,14 +24,9 @@ #ifndef _DVBVIDEO_H_ #define _DVBVIDEO_H_ -#include -#ifdef __KERNEL__ -#include -#else #include #include -#endif typedef enum { @@ -102,7 +97,7 @@ struct video_still_picture { - char __user *iFrame; /* pointer to a single iframe in memory */ + char *iFrame; /* pointer to a single iframe in memory */ int32_t size; }; @@ -135,7 +130,7 @@ typedef struct video_spu_palette { /* SPU Palette information */ int length; - uint8_t __user *palette; + uint8_t *palette; } video_spu_palette_t; --- ./linux/netfilter/nf_conntrack_common.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter/nf_conntrack_common.h 2007-05-24 15:40:41.000000000 +0200 @@ -136,35 +136,5 @@ IPEXP_NEW = (1 << IPEXP_NEW_BIT), }; -#ifdef __KERNEL__ -struct ip_conntrack_counter -{ - u_int32_t packets; - u_int32_t bytes; -}; - -struct ip_conntrack_stat -{ - unsigned int searched; - unsigned int found; - unsigned int new; - unsigned int invalid; - unsigned int ignore; - unsigned int delete; - unsigned int delete_list; - unsigned int insert; - unsigned int insert_failed; - unsigned int drop; - unsigned int early_drop; - unsigned int error; - unsigned int expect_new; - unsigned int expect_create; - unsigned int expect_delete; -}; - -/* call to create an explicit dependency on nf_conntrack. */ -extern void need_conntrack(void); - -#endif /* __KERNEL__ */ #endif /* _NF_CONNTRACK_COMMON_H */ --- ./linux/netfilter/nf_conntrack_ftp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter/nf_conntrack_ftp.h 2007-05-24 15:40:41.000000000 +0200 @@ -15,30 +15,5 @@ IP_CT_FTP_EPSV, }; -#ifdef __KERNEL__ - -#define FTP_PORT 21 - -#define NUM_SEQ_TO_REMEMBER 2 -/* This structure exists only once per master */ -struct ip_ct_ftp_master { - /* Valid seq positions for cmd matching after newline */ - u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER]; - /* 0 means seq_match_aft_nl not set */ - int seq_aft_nl_num[IP_CT_DIR_MAX]; -}; - -struct ip_conntrack_expect; - -/* For NAT to hook in when we find a packet which describes what other - * connection we should expect. */ -extern unsigned int (*ip_nat_ftp_hook)(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - enum ip_ct_ftp_type type, - unsigned int matchoff, - unsigned int matchlen, - struct ip_conntrack_expect *exp, - u32 *seq); -#endif /* __KERNEL__ */ #endif /* _NF_CONNTRACK_FTP_H */ --- ./linux/netfilter/nf_conntrack_tcp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter/nf_conntrack_tcp.h 2007-05-24 15:40:41.000000000 +0200 @@ -27,31 +27,5 @@ /* This sender sent FIN first */ #define IP_CT_TCP_FLAG_CLOSE_INIT 0x03 -#ifdef __KERNEL__ - -struct ip_ct_tcp_state { - u_int32_t td_end; /* max of seq + len */ - u_int32_t td_maxend; /* max of ack + max(win, 1) */ - u_int32_t td_maxwin; /* max(win) */ - u_int8_t td_scale; /* window scale factor */ - u_int8_t loose; /* used when connection picked up from the middle */ - u_int8_t flags; /* per direction options */ -}; - -struct ip_ct_tcp -{ - struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */ - u_int8_t state; /* state of the connection (enum tcp_conntrack) */ - /* For detecting stale connections */ - u_int8_t last_dir; /* Direction of the last packet (enum ip_conntrack_dir) */ - u_int8_t retrans; /* Number of retransmitted packets */ - u_int8_t last_index; /* Index of the last packet */ - u_int32_t last_seq; /* Last sequence number seen in dir */ - u_int32_t last_ack; /* Last sequence number seen in opposite dir */ - u_int32_t last_end; /* Last seq + len */ - u_int16_t last_win; /* Last window advertisement seen in dir */ -}; - -#endif /* __KERNEL__ */ #endif /* _NF_CONNTRACK_TCP_H */ --- ./linux/netfilter/nfnetlink.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter/nfnetlink.h 2007-05-24 15:40:41.000000000 +0200 @@ -2,7 +2,6 @@ #define _NFNETLINK_H #include -#ifndef __KERNEL__ /* nfnetlink groups: Up to 32 maximum - backwards compatibility for userspace */ #define NF_NETLINK_CONNTRACK_NEW 0x00000001 #define NF_NETLINK_CONNTRACK_UPDATE 0x00000002 @@ -10,7 +9,6 @@ #define NF_NETLINK_CONNTRACK_EXP_NEW 0x00000008 #define NF_NETLINK_CONNTRACK_EXP_UPDATE 0x00000010 #define NF_NETLINK_CONNTRACK_EXP_DESTROY 0x00000020 -#endif enum nfnetlink_groups { NFNLGRP_NONE, @@ -103,74 +101,4 @@ #define NFNL_SUBSYS_ULOG 4 #define NFNL_SUBSYS_COUNT 5 -#ifdef __KERNEL__ - -#include -#include - -struct nfnl_callback -{ - int (*call)(struct sock *nl, struct sk_buff *skb, - struct nlmsghdr *nlh, struct nfattr *cda[], int *errp); - u_int16_t attr_count; /* number of nfattr's */ -}; - -struct nfnetlink_subsystem -{ - const char *name; - __u8 subsys_id; /* nfnetlink subsystem ID */ - __u8 cb_count; /* number of callbacks */ - struct nfnl_callback *cb; /* callback for individual types */ -}; - -extern void __nfa_fill(struct sk_buff *skb, int attrtype, - int attrlen, const void *data); -#define NFA_PUT(skb, attrtype, attrlen, data) \ -({ if (skb_tailroom(skb) < (int)NFA_SPACE(attrlen)) goto nfattr_failure; \ - __nfa_fill(skb, attrtype, attrlen, data); }) - -extern struct semaphore nfnl_sem; - -#define nfnl_shlock() down(&nfnl_sem) -#define nfnl_shlock_nowait() down_trylock(&nfnl_sem) - -#define nfnl_shunlock() do { up(&nfnl_sem); \ - if(nfnl && nfnl->sk_receive_queue.qlen) \ - nfnl->sk_data_ready(nfnl, 0); \ - } while(0) - -extern void nfnl_lock(void); -extern void nfnl_unlock(void); - -extern int nfnetlink_subsys_register(struct nfnetlink_subsystem *n); -extern int nfnetlink_subsys_unregister(struct nfnetlink_subsystem *n); - -extern void nfattr_parse(struct nfattr *tb[], int maxattr, - struct nfattr *nfa, int len); - -#define nfattr_parse_nested(tb, max, nfa) \ - nfattr_parse((tb), (max), NFA_DATA((nfa)), NFA_PAYLOAD((nfa))) - -#define nfattr_bad_size(tb, max, cta_min) \ -({ int __i, __res = 0; \ - for (__i=0; __i - -struct xt_match -{ - struct list_head list; - - const char name[XT_FUNCTION_MAXNAMELEN-1]; - - /* Return true or false: return FALSE and set *hotdrop = 1 to - force immediate packet drop. */ - /* Arguments changed since 2.6.9, as this must now handle - non-linear skb, using skb_header_pointer and - skb_ip_make_writable. */ - int (*match)(const struct sk_buff *skb, - const struct net_device *in, - const struct net_device *out, - const struct xt_match *match, - const void *matchinfo, - int offset, - unsigned int protoff, - int *hotdrop); - - /* Called when user tries to insert an entry of this type. */ - /* Should return true or false. */ - int (*checkentry)(const char *tablename, - const void *ip, - const struct xt_match *match, - void *matchinfo, - unsigned int hook_mask); - - /* Called when entry of this type deleted. */ - void (*destroy)(const struct xt_match *match, void *matchinfo); - - /* Called when userspace align differs from kernel space one */ - void (*compat_from_user)(void *dst, void *src); - int (*compat_to_user)(void __user *dst, void *src); - - /* Set this to THIS_MODULE if you are a module, otherwise NULL */ - struct module *me; - - /* Free to use by each match */ - unsigned long data; - - char *table; - unsigned int matchsize; - unsigned int compatsize; - unsigned int hooks; - unsigned short proto; - - unsigned short family; - u_int8_t revision; -}; - -/* Registration hooks for targets. */ -struct xt_target -{ - struct list_head list; - - const char name[XT_FUNCTION_MAXNAMELEN-1]; - - /* Returns verdict. Argument order changed since 2.6.9, as this - must now handle non-linear skbs, using skb_copy_bits and - skb_ip_make_writable. */ - unsigned int (*target)(struct sk_buff **pskb, - const struct net_device *in, - const struct net_device *out, - unsigned int hooknum, - const struct xt_target *target, - const void *targinfo); - - /* Called when user tries to insert an entry of this type: - hook_mask is a bitmask of hooks from which it can be - called. */ - /* Should return true or false. */ - int (*checkentry)(const char *tablename, - const void *entry, - const struct xt_target *target, - void *targinfo, - unsigned int hook_mask); - - /* Called when entry of this type deleted. */ - void (*destroy)(const struct xt_target *target, void *targinfo); - - /* Called when userspace align differs from kernel space one */ - void (*compat_from_user)(void *dst, void *src); - int (*compat_to_user)(void __user *dst, void *src); - - /* Set this to THIS_MODULE if you are a module, otherwise NULL */ - struct module *me; - - char *table; - unsigned int targetsize; - unsigned int compatsize; - unsigned int hooks; - unsigned short proto; - - unsigned short family; - u_int8_t revision; -}; - -/* Furniture shopping... */ -struct xt_table -{ - struct list_head list; - - /* A unique name... */ - char name[XT_TABLE_MAXNAMELEN]; - - /* What hooks you will enter on */ - unsigned int valid_hooks; - - /* Lock for the curtain */ - rwlock_t lock; - - /* Man behind the curtain... */ - //struct ip6t_table_info *private; - void *private; - - /* Set this to THIS_MODULE if you are a module, otherwise NULL */ - struct module *me; - - int af; /* address/protocol family */ -}; - -#include - -/* The table itself */ -struct xt_table_info -{ - /* Size per table */ - unsigned int size; - /* Number of entries: FIXME. --RR */ - unsigned int number; - /* Initial number of entries. Needed for module usage count */ - unsigned int initial_entries; - - /* Entry points and underflows */ - unsigned int hook_entry[NF_IP_NUMHOOKS]; - unsigned int underflow[NF_IP_NUMHOOKS]; - - /* ipt_entry tables: one per CPU */ - char *entries[NR_CPUS]; -}; - -extern int xt_register_target(struct xt_target *target); -extern void xt_unregister_target(struct xt_target *target); -extern int xt_register_targets(struct xt_target *target, unsigned int n); -extern void xt_unregister_targets(struct xt_target *target, unsigned int n); - -extern int xt_register_match(struct xt_match *target); -extern void xt_unregister_match(struct xt_match *target); -extern int xt_register_matches(struct xt_match *match, unsigned int n); -extern void xt_unregister_matches(struct xt_match *match, unsigned int n); - -extern int xt_check_match(const struct xt_match *match, unsigned short family, - unsigned int size, const char *table, unsigned int hook, - unsigned short proto, int inv_proto); -extern int xt_check_target(const struct xt_target *target, unsigned short family, - unsigned int size, const char *table, unsigned int hook, - unsigned short proto, int inv_proto); - -extern int xt_register_table(struct xt_table *table, - struct xt_table_info *bootstrap, - struct xt_table_info *newinfo); -extern void *xt_unregister_table(struct xt_table *table); - -extern struct xt_table_info *xt_replace_table(struct xt_table *table, - unsigned int num_counters, - struct xt_table_info *newinfo, - int *error); - -extern struct xt_match *xt_find_match(int af, const char *name, u8 revision); -extern struct xt_target *xt_find_target(int af, const char *name, u8 revision); -extern struct xt_target *xt_request_find_target(int af, const char *name, - u8 revision); -extern int xt_find_revision(int af, const char *name, u8 revision, int target, - int *err); - -extern struct xt_table *xt_find_table_lock(int af, const char *name); -extern void xt_table_unlock(struct xt_table *t); - -extern int xt_proto_init(int af); -extern void xt_proto_fini(int af); - -extern struct xt_table_info *xt_alloc_table_info(unsigned int size); -extern void xt_free_table_info(struct xt_table_info *info); - -#ifdef CONFIG_COMPAT -#include - -struct compat_xt_entry_match -{ - union { - struct { - u_int16_t match_size; - char name[XT_FUNCTION_MAXNAMELEN - 1]; - u_int8_t revision; - } user; - struct { - u_int16_t match_size; - compat_uptr_t match; - } kernel; - u_int16_t match_size; - } u; - unsigned char data[0]; -}; - -struct compat_xt_entry_target -{ - union { - struct { - u_int16_t target_size; - char name[XT_FUNCTION_MAXNAMELEN - 1]; - u_int8_t revision; - } user; - struct { - u_int16_t target_size; - compat_uptr_t target; - } kernel; - u_int16_t target_size; - } u; - unsigned char data[0]; -}; - -/* FIXME: this works only on 32 bit tasks - * need to change whole approach in order to calculate align as function of - * current task alignment */ - -struct compat_xt_counters -{ -#if defined(CONFIG_X86_64) || defined(CONFIG_IA64) - u_int32_t cnt[4]; -#else - u_int64_t cnt[2]; -#endif -}; - -struct compat_xt_counters_info -{ - char name[XT_TABLE_MAXNAMELEN]; - compat_uint_t num_counters; - struct compat_xt_counters counters[0]; -}; - -#define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \ - & ~(__alignof__(struct compat_xt_counters)-1)) - -extern void xt_compat_lock(int af); -extern void xt_compat_unlock(int af); - -extern int xt_compat_match_offset(struct xt_match *match); -extern void xt_compat_match_from_user(struct xt_entry_match *m, - void **dstptr, int *size); -extern int xt_compat_match_to_user(struct xt_entry_match *m, - void __user **dstptr, int *size); - -extern int xt_compat_target_offset(struct xt_target *target); -extern void xt_compat_target_from_user(struct xt_entry_target *t, - void **dstptr, int *size); -extern int xt_compat_target_to_user(struct xt_entry_target *t, - void __user **dstptr, int *size); - -#endif /* CONFIG_COMPAT */ -#endif /* __KERNEL__ */ #endif /* _X_TABLES_H */ --- ./linux/netfilter/xt_physdev.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter/xt_physdev.h 2007-05-24 15:40:41.000000000 +0200 @@ -1,9 +1,6 @@ #ifndef _XT_PHYSDEV_H #define _XT_PHYSDEV_H -#ifdef __KERNEL__ -#include -#endif #define XT_PHYSDEV_OP_IN 0x01 #define XT_PHYSDEV_OP_OUT 0x02 --- ./linux/netfilter_arp/arp_tables.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/netfilter_arp/arp_tables.h 2007-05-24 15:40:41.000000000 +0200 @@ -9,14 +9,6 @@ #ifndef _ARPTABLES_H #define _ARPTABLES_H -#ifdef __KERNEL__ -#include -#include -#include -#include -#include -#endif -#include #include #include @@ -181,7 +173,7 @@ /* Number of counters (must be equal to current number of entries). */ unsigned int num_counters; /* The old entries' counters. */ - struct xt_counters __user *counters; + struct xt_counters *counters; /* The entries (hang off end: not really an array). */ struct arpt_entry entries[0]; @@ -234,22 +226,4 @@ /* * Main firewall chains definitions and global var's definitions. */ -#ifdef __KERNEL__ - -#define arpt_register_target(tgt) \ -({ (tgt)->family = NF_ARP; \ - xt_register_target(tgt); }) -#define arpt_unregister_target(tgt) xt_unregister_target(tgt) - -extern int arpt_register_table(struct arpt_table *table, - const struct arpt_replace *repl); -extern void arpt_unregister_table(struct arpt_table *table); -extern unsigned int arpt_do_table(struct sk_buff **pskb, - unsigned int hook, - const struct net_device *in, - const struct net_device *out, - struct arpt_table *table); - -#define ARPT_ALIGN(s) (((s) + (__alignof__(struct arpt_entry)-1)) & ~(__alignof__(struct arpt_entry)-1)) -#endif /*__KERNEL__*/ #endif /* _ARPTABLES_H */ --- ./linux/netfilter_bridge/ebt_802_3.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/netfilter_bridge/ebt_802_3.h 2007-05-24 15:40:41.000000000 +0200 @@ -49,14 +49,6 @@ } llc; }; -#ifdef __KERNEL__ -#include - -static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb) -{ - return (struct ebt_802_3_hdr *)skb->mac.raw; -} -#endif struct ebt_802_3_info { --- ./linux/netfilter_bridge/ebtables.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/netfilter_bridge/ebtables.h 2007-05-24 15:40:41.000000000 +0200 @@ -176,118 +176,6 @@ #define EBT_SO_GET_INIT_ENTRIES (EBT_SO_GET_INIT_INFO+1) #define EBT_SO_GET_MAX (EBT_SO_GET_INIT_ENTRIES+1) -#ifdef __KERNEL__ - -/* return values for match() functions */ -#define EBT_MATCH 0 -#define EBT_NOMATCH 1 - -struct ebt_match -{ - struct list_head list; - const char name[EBT_FUNCTION_MAXNAMELEN]; - /* 0 == it matches */ - int (*match)(const struct sk_buff *skb, const struct net_device *in, - const struct net_device *out, const void *matchdata, - unsigned int datalen); - /* 0 == let it in */ - int (*check)(const char *tablename, unsigned int hookmask, - const struct ebt_entry *e, void *matchdata, unsigned int datalen); - void (*destroy)(void *matchdata, unsigned int datalen); - struct module *me; -}; - -struct ebt_watcher -{ - struct list_head list; - const char name[EBT_FUNCTION_MAXNAMELEN]; - void (*watcher)(const struct sk_buff *skb, unsigned int hooknr, - const struct net_device *in, const struct net_device *out, - const void *watcherdata, unsigned int datalen); - /* 0 == let it in */ - int (*check)(const char *tablename, unsigned int hookmask, - const struct ebt_entry *e, void *watcherdata, unsigned int datalen); - void (*destroy)(void *watcherdata, unsigned int datalen); - struct module *me; -}; - -struct ebt_target -{ - struct list_head list; - const char name[EBT_FUNCTION_MAXNAMELEN]; - /* returns one of the standard verdicts */ - int (*target)(struct sk_buff **pskb, unsigned int hooknr, - const struct net_device *in, const struct net_device *out, - const void *targetdata, unsigned int datalen); - /* 0 == let it in */ - int (*check)(const char *tablename, unsigned int hookmask, - const struct ebt_entry *e, void *targetdata, unsigned int datalen); - void (*destroy)(void *targetdata, unsigned int datalen); - struct module *me; -}; - -/* used for jumping from and into user defined chains (udc) */ -struct ebt_chainstack -{ - struct ebt_entries *chaininfo; /* pointer to chain data */ - struct ebt_entry *e; /* pointer to entry data */ - unsigned int n; /* n'th entry */ -}; - -struct ebt_table_info -{ - /* total size of the entries */ - unsigned int entries_size; - unsigned int nentries; - /* pointers to the start of the chains */ - struct ebt_entries *hook_entry[NF_BR_NUMHOOKS]; - /* room to maintain the stack used for jumping from and into udc */ - struct ebt_chainstack **chainstack; - char *entries; - struct ebt_counter counters[0] ____cacheline_aligned; -}; - -struct ebt_table -{ - struct list_head list; - char name[EBT_TABLE_MAXNAMELEN]; - struct ebt_replace *table; - unsigned int valid_hooks; - rwlock_t lock; - /* e.g. could be the table explicitly only allows certain - * matches, targets, ... 0 == let it in */ - int (*check)(const struct ebt_table_info *info, - unsigned int valid_hooks); - /* the data used by the kernel */ - struct ebt_table_info *private; - struct module *me; -}; - -#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \ - ~(__alignof__(struct ebt_replace)-1)) -extern int ebt_register_table(struct ebt_table *table); -extern void ebt_unregister_table(struct ebt_table *table); -extern int ebt_register_match(struct ebt_match *match); -extern void ebt_unregister_match(struct ebt_match *match); -extern int ebt_register_watcher(struct ebt_watcher *watcher); -extern void ebt_unregister_watcher(struct ebt_watcher *watcher); -extern int ebt_register_target(struct ebt_target *target); -extern void ebt_unregister_target(struct ebt_target *target); -extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff **pskb, - const struct net_device *in, const struct net_device *out, - struct ebt_table *table); - -/* Used in the kernel match() functions */ -#define FWINV(bool,invflg) ((bool) ^ !!(info->invflags & invflg)) -/* True if the hook mask denotes that the rule is in a base chain, - * used in the check() functions */ -#define BASE_CHAIN (hookmask & (1 << NF_BR_NUMHOOKS)) -/* Clear the bit in the hook mask that tells if the rule is on a base chain */ -#define CLEAR_BASE_CHAIN_BIT (hookmask &= ~(1 << NF_BR_NUMHOOKS)) -/* True if the target is not a standard target */ -#define INVALID_TARGET (info->target < -NUM_STANDARD_TARGETS || info->target >= 0) - -#endif /* __KERNEL__ */ /* blatently stolen from ip_tables.h * fn returns 0 to continue iteration */ --- ./linux/netfilter_ipv4/ip_conntrack.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_conntrack.h 2007-05-24 15:40:42.000000000 +0200 @@ -3,393 +3,4 @@ #include -#ifdef __KERNEL__ -#include -#include -#include -#include - -#include -#include -#include -#include - -/* per conntrack: protocol private data */ -union ip_conntrack_proto { - /* insert conntrack proto private data here */ - struct ip_ct_gre gre; - struct ip_ct_sctp sctp; - struct ip_ct_tcp tcp; - struct ip_ct_icmp icmp; -}; - -union ip_conntrack_expect_proto { - /* insert expect proto private data here */ -}; - -/* Add protocol helper include file here */ -#include -#include -#include -#include -#include - -/* per conntrack: application helper private data */ -union ip_conntrack_help { - /* insert conntrack helper private data (master) here */ - struct ip_ct_h323_master ct_h323_info; - struct ip_ct_pptp_master ct_pptp_info; - struct ip_ct_ftp_master ct_ftp_info; - struct ip_ct_irc_master ct_irc_info; -}; - -#ifdef CONFIG_IP_NF_NAT_NEEDED -#include -#include - -/* per conntrack: nat application helper private data */ -union ip_conntrack_nat_help { - /* insert nat helper private data here */ - struct ip_nat_pptp nat_pptp_info; -}; -#endif - -#include -#include - -#ifdef CONFIG_NETFILTER_DEBUG -#define IP_NF_ASSERT(x) \ -do { \ - if (!(x)) \ - /* Wooah! I'm tripping my conntrack in a frenzy of \ - netplay... */ \ - printk("NF_IP_ASSERT: %s:%i(%s)\n", \ - __FILE__, __LINE__, __FUNCTION__); \ -} while(0) -#else -#define IP_NF_ASSERT(x) -#endif - -struct ip_conntrack_helper; - -struct ip_conntrack -{ - /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, - plus 1 for any connection(s) we are `master' for */ - struct nf_conntrack ct_general; - - /* Have we seen traffic both ways yet? (bitset) */ - unsigned long status; - - /* Timer function; drops refcnt when it goes off. */ - struct timer_list timeout; - -#ifdef CONFIG_IP_NF_CT_ACCT - /* Accounting Information (same cache line as other written members) */ - struct ip_conntrack_counter counters[IP_CT_DIR_MAX]; -#endif - /* If we were expected by an expectation, this will be it */ - struct ip_conntrack *master; - - /* Current number of expected connections */ - unsigned int expecting; - - /* Unique ID that identifies this conntrack*/ - unsigned int id; - - /* Helper, if any. */ - struct ip_conntrack_helper *helper; - - /* Storage reserved for other modules: */ - union ip_conntrack_proto proto; - - union ip_conntrack_help help; - -#ifdef CONFIG_IP_NF_NAT_NEEDED - struct { - struct ip_nat_info info; - union ip_conntrack_nat_help help; -#if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ - defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) - int masq_index; -#endif - } nat; -#endif /* CONFIG_IP_NF_NAT_NEEDED */ - -#if defined(CONFIG_IP_NF_CONNTRACK_MARK) - u_int32_t mark; -#endif - -#ifdef CONFIG_IP_NF_CONNTRACK_SECMARK - u_int32_t secmark; -#endif - - /* Traversed often, so hopefully in different cacheline to top */ - /* These are my tuples; original and reply */ - struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; -}; - -struct ip_conntrack_expect -{ - /* Internal linked list (global expectation list) */ - struct list_head list; - - /* We expect this tuple, with the following mask */ - struct ip_conntrack_tuple tuple, mask; - - /* Function to call after setup and insertion */ - void (*expectfn)(struct ip_conntrack *new, - struct ip_conntrack_expect *this); - - /* The conntrack of the master connection */ - struct ip_conntrack *master; - - /* Timer function; deletes the expectation. */ - struct timer_list timeout; - - /* Usage count. */ - atomic_t use; - - /* Unique ID */ - unsigned int id; - - /* Flags */ - unsigned int flags; - -#ifdef CONFIG_IP_NF_NAT_NEEDED - __be32 saved_ip; - /* This is the original per-proto part, used to map the - * expected connection the way the recipient expects. */ - union ip_conntrack_manip_proto saved_proto; - /* Direction relative to the master connection. */ - enum ip_conntrack_dir dir; -#endif -}; - -#define IP_CT_EXPECT_PERMANENT 0x1 - -static inline struct ip_conntrack * -tuplehash_to_ctrack(const struct ip_conntrack_tuple_hash *hash) -{ - return container_of(hash, struct ip_conntrack, - tuplehash[hash->tuple.dst.dir]); -} - -/* get master conntrack via master expectation */ -#define master_ct(conntr) (conntr->master) - -/* Alter reply tuple (maybe alter helper). */ -extern void -ip_conntrack_alter_reply(struct ip_conntrack *conntrack, - const struct ip_conntrack_tuple *newreply); - -/* Is this tuple taken? (ignoring any belonging to the given - conntrack). */ -extern int -ip_conntrack_tuple_taken(const struct ip_conntrack_tuple *tuple, - const struct ip_conntrack *ignored_conntrack); - -/* Return conntrack_info and tuple hash for given skb. */ -static inline struct ip_conntrack * -ip_conntrack_get(const struct sk_buff *skb, enum ip_conntrack_info *ctinfo) -{ - *ctinfo = skb->nfctinfo; - return (struct ip_conntrack *)skb->nfct; -} - -/* decrement reference count on a conntrack */ -static inline void -ip_conntrack_put(struct ip_conntrack *ct) -{ - IP_NF_ASSERT(ct); - nf_conntrack_put(&ct->ct_general); -} - -extern int invert_tuplepr(struct ip_conntrack_tuple *inverse, - const struct ip_conntrack_tuple *orig); - -extern void __ip_ct_refresh_acct(struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo, - const struct sk_buff *skb, - unsigned long extra_jiffies, - int do_acct); - -/* Refresh conntrack for this many jiffies and do accounting */ -static inline void ip_ct_refresh_acct(struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo, - const struct sk_buff *skb, - unsigned long extra_jiffies) -{ - __ip_ct_refresh_acct(ct, ctinfo, skb, extra_jiffies, 1); -} - -/* Refresh conntrack for this many jiffies */ -static inline void ip_ct_refresh(struct ip_conntrack *ct, - const struct sk_buff *skb, - unsigned long extra_jiffies) -{ - __ip_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0); -} - -/* These are for NAT. Icky. */ -/* Update TCP window tracking data when NAT mangles the packet */ -extern void ip_conntrack_tcp_update(struct sk_buff *skb, - struct ip_conntrack *conntrack, - enum ip_conntrack_dir dir); - -/* Call me when a conntrack is destroyed. */ -extern void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack); - -/* Fake conntrack entry for untracked connections */ -extern struct ip_conntrack ip_conntrack_untracked; - -/* Returns new sk_buff, or NULL */ -struct sk_buff * -ip_ct_gather_frags(struct sk_buff *skb, u_int32_t user); - -/* Iterate over all conntracks: if iter returns true, it's deleted. */ -extern void -ip_ct_iterate_cleanup(int (*iter)(struct ip_conntrack *i, void *data), - void *data); - -extern struct ip_conntrack_helper * -__ip_conntrack_helper_find_byname(const char *); -extern struct ip_conntrack_helper * -ip_conntrack_helper_find_get(const struct ip_conntrack_tuple *tuple); -extern void ip_conntrack_helper_put(struct ip_conntrack_helper *helper); - -extern struct ip_conntrack_protocol * -__ip_conntrack_proto_find(u_int8_t protocol); -extern struct ip_conntrack_protocol * -ip_conntrack_proto_find_get(u_int8_t protocol); -extern void ip_conntrack_proto_put(struct ip_conntrack_protocol *proto); - -extern void ip_ct_remove_expectations(struct ip_conntrack *ct); - -extern struct ip_conntrack *ip_conntrack_alloc(struct ip_conntrack_tuple *, - struct ip_conntrack_tuple *); - -extern void ip_conntrack_free(struct ip_conntrack *ct); - -extern void ip_conntrack_hash_insert(struct ip_conntrack *ct); - -extern struct ip_conntrack_expect * -__ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); - -extern struct ip_conntrack_expect * -ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple); - -extern struct ip_conntrack_tuple_hash * -__ip_conntrack_find(const struct ip_conntrack_tuple *tuple, - const struct ip_conntrack *ignored_conntrack); - -extern void ip_conntrack_flush(void); - -/* It's confirmed if it is, or has been in the hash table. */ -static inline int is_confirmed(struct ip_conntrack *ct) -{ - return test_bit(IPS_CONFIRMED_BIT, &ct->status); -} - -static inline int is_dying(struct ip_conntrack *ct) -{ - return test_bit(IPS_DYING_BIT, &ct->status); -} - -extern unsigned int ip_conntrack_htable_size; -extern int ip_conntrack_checksum; - -#define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) - -#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS -#include -#include - -struct ip_conntrack_ecache { - struct ip_conntrack *ct; - unsigned int events; -}; -DECLARE_PER_CPU(struct ip_conntrack_ecache, ip_conntrack_ecache); - -#define CONNTRACK_ECACHE(x) (__get_cpu_var(ip_conntrack_ecache).x) - -extern struct atomic_notifier_head ip_conntrack_chain; -extern struct atomic_notifier_head ip_conntrack_expect_chain; - -static inline int ip_conntrack_register_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&ip_conntrack_chain, nb); -} - -static inline int ip_conntrack_unregister_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&ip_conntrack_chain, nb); -} - -static inline int -ip_conntrack_expect_register_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&ip_conntrack_expect_chain, nb); -} - -static inline int -ip_conntrack_expect_unregister_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&ip_conntrack_expect_chain, - nb); -} - -extern void ip_ct_deliver_cached_events(const struct ip_conntrack *ct); -extern void __ip_ct_event_cache_init(struct ip_conntrack *ct); - -static inline void -ip_conntrack_event_cache(enum ip_conntrack_events event, - const struct sk_buff *skb) -{ - struct ip_conntrack *ct = (struct ip_conntrack *)skb->nfct; - struct ip_conntrack_ecache *ecache; - - local_bh_disable(); - ecache = &__get_cpu_var(ip_conntrack_ecache); - if (ct != ecache->ct) - __ip_ct_event_cache_init(ct); - ecache->events |= event; - local_bh_enable(); -} - -static inline void ip_conntrack_event(enum ip_conntrack_events event, - struct ip_conntrack *ct) -{ - if (is_confirmed(ct) && !is_dying(ct)) - atomic_notifier_call_chain(&ip_conntrack_chain, event, ct); -} - -static inline void -ip_conntrack_expect_event(enum ip_conntrack_expect_events event, - struct ip_conntrack_expect *exp) -{ - atomic_notifier_call_chain(&ip_conntrack_expect_chain, event, exp); -} -#else /* CONFIG_IP_NF_CONNTRACK_EVENTS */ -static inline void ip_conntrack_event_cache(enum ip_conntrack_events event, - const struct sk_buff *skb) {} -static inline void ip_conntrack_event(enum ip_conntrack_events event, - struct ip_conntrack *ct) {} -static inline void ip_ct_deliver_cached_events(const struct ip_conntrack *ct) {} -static inline void -ip_conntrack_expect_event(enum ip_conntrack_expect_events event, - struct ip_conntrack_expect *exp) {} -#endif /* CONFIG_IP_NF_CONNTRACK_EVENTS */ - -#ifdef CONFIG_IP_NF_NAT_NEEDED -static inline int ip_nat_initialized(struct ip_conntrack *conntrack, - enum ip_nat_manip_type manip) -{ - if (manip == IP_NAT_MANIP_SRC) - return test_bit(IPS_SRC_NAT_DONE_BIT, &conntrack->status); - return test_bit(IPS_DST_NAT_DONE_BIT, &conntrack->status); -} -#endif /* CONFIG_IP_NF_NAT_NEEDED */ - -#endif /* __KERNEL__ */ #endif /* _IP_CONNTRACK_H */ --- ./linux/netfilter_ipv4/ip_conntrack_h323.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_conntrack_h323.h 2007-05-24 15:40:42.000000000 +0200 @@ -1,89 +1,5 @@ #ifndef _IP_CONNTRACK_H323_H #define _IP_CONNTRACK_H323_H -#ifdef __KERNEL__ - -#include - -#define RAS_PORT 1719 -#define Q931_PORT 1720 -#define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ - -/* This structure exists only once per master */ -struct ip_ct_h323_master { - - /* Original and NATed Q.931 or H.245 signal ports */ - u_int16_t sig_port[IP_CT_DIR_MAX]; - - /* Original and NATed RTP ports */ - u_int16_t rtp_port[H323_RTP_CHANNEL_MAX][IP_CT_DIR_MAX]; - - union { - /* RAS connection timeout */ - u_int32_t timeout; - - /* Next TPKT length (for separate TPKT header and data) */ - u_int16_t tpkt_len[IP_CT_DIR_MAX]; - }; -}; - -struct ip_conntrack_expect; - -extern int get_h225_addr(unsigned char *data, TransportAddress * addr, - __be32 * ip, u_int16_t * port); -extern void ip_conntrack_h245_expect(struct ip_conntrack *new, - struct ip_conntrack_expect *this); -extern void ip_conntrack_q931_expect(struct ip_conntrack *new, - struct ip_conntrack_expect *this); -extern int (*set_h245_addr_hook) (struct sk_buff ** pskb, - unsigned char **data, int dataoff, - H245_TransportAddress * addr, - __be32 ip, u_int16_t port); -extern int (*set_h225_addr_hook) (struct sk_buff ** pskb, - unsigned char **data, int dataoff, - TransportAddress * addr, - __be32 ip, u_int16_t port); -extern int (*set_sig_addr_hook) (struct sk_buff ** pskb, - struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, - TransportAddress * addr, int count); -extern int (*set_ras_addr_hook) (struct sk_buff ** pskb, - struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, - TransportAddress * addr, int count); -extern int (*nat_rtp_rtcp_hook) (struct sk_buff ** pskb, - struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, int dataoff, - H245_TransportAddress * addr, - u_int16_t port, u_int16_t rtp_port, - struct ip_conntrack_expect * rtp_exp, - struct ip_conntrack_expect * rtcp_exp); -extern int (*nat_t120_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, int dataoff, - H245_TransportAddress * addr, u_int16_t port, - struct ip_conntrack_expect * exp); -extern int (*nat_h245_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, int dataoff, - TransportAddress * addr, u_int16_t port, - struct ip_conntrack_expect * exp); -extern int (*nat_callforwarding_hook) (struct sk_buff ** pskb, - struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, int dataoff, - TransportAddress * addr, - u_int16_t port, - struct ip_conntrack_expect * exp); -extern int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, TransportAddress * addr, - int idx, u_int16_t port, - struct ip_conntrack_expect * exp); - -#endif #endif --- ./linux/netfilter_ipv4/ip_conntrack_irc.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_conntrack_irc.h 2007-05-24 15:40:42.000000000 +0200 @@ -18,15 +18,5 @@ struct ip_ct_irc_master { }; -#ifdef __KERNEL__ -extern unsigned int (*ip_nat_irc_hook)(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - unsigned int matchoff, - unsigned int matchlen, - struct ip_conntrack_expect *exp); - -#define IRC_PORT 6667 - -#endif /* __KERNEL__ */ #endif /* _IP_CONNTRACK_IRC_H */ --- ./linux/netfilter_ipv4/ip_conntrack_pptp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_conntrack_pptp.h 2007-05-24 15:40:42.000000000 +0200 @@ -47,280 +47,4 @@ }; -#ifdef __KERNEL__ - -#define IP_CONNTR_PPTP PPTP_CONTROL_PORT - -#define PPTP_CONTROL_PORT 1723 - -#define PPTP_PACKET_CONTROL 1 -#define PPTP_PACKET_MGMT 2 - -#define PPTP_MAGIC_COOKIE 0x1a2b3c4d - -struct pptp_pkt_hdr { - __u16 packetLength; - __be16 packetType; - __be32 magicCookie; -}; - -/* PptpControlMessageType values */ -#define PPTP_START_SESSION_REQUEST 1 -#define PPTP_START_SESSION_REPLY 2 -#define PPTP_STOP_SESSION_REQUEST 3 -#define PPTP_STOP_SESSION_REPLY 4 -#define PPTP_ECHO_REQUEST 5 -#define PPTP_ECHO_REPLY 6 -#define PPTP_OUT_CALL_REQUEST 7 -#define PPTP_OUT_CALL_REPLY 8 -#define PPTP_IN_CALL_REQUEST 9 -#define PPTP_IN_CALL_REPLY 10 -#define PPTP_IN_CALL_CONNECT 11 -#define PPTP_CALL_CLEAR_REQUEST 12 -#define PPTP_CALL_DISCONNECT_NOTIFY 13 -#define PPTP_WAN_ERROR_NOTIFY 14 -#define PPTP_SET_LINK_INFO 15 - -#define PPTP_MSG_MAX 15 - -/* PptpGeneralError values */ -#define PPTP_ERROR_CODE_NONE 0 -#define PPTP_NOT_CONNECTED 1 -#define PPTP_BAD_FORMAT 2 -#define PPTP_BAD_VALUE 3 -#define PPTP_NO_RESOURCE 4 -#define PPTP_BAD_CALLID 5 -#define PPTP_REMOVE_DEVICE_ERROR 6 - -struct PptpControlHeader { - __be16 messageType; - __u16 reserved; -}; - -/* FramingCapability Bitmap Values */ -#define PPTP_FRAME_CAP_ASYNC 0x1 -#define PPTP_FRAME_CAP_SYNC 0x2 - -/* BearerCapability Bitmap Values */ -#define PPTP_BEARER_CAP_ANALOG 0x1 -#define PPTP_BEARER_CAP_DIGITAL 0x2 - -struct PptpStartSessionRequest { - __be16 protocolVersion; - __u16 reserved1; - __be32 framingCapability; - __be32 bearerCapability; - __be16 maxChannels; - __be16 firmwareRevision; - __u8 hostName[64]; - __u8 vendorString[64]; -}; - -/* PptpStartSessionResultCode Values */ -#define PPTP_START_OK 1 -#define PPTP_START_GENERAL_ERROR 2 -#define PPTP_START_ALREADY_CONNECTED 3 -#define PPTP_START_NOT_AUTHORIZED 4 -#define PPTP_START_UNKNOWN_PROTOCOL 5 - -struct PptpStartSessionReply { - __be16 protocolVersion; - __u8 resultCode; - __u8 generalErrorCode; - __be32 framingCapability; - __be32 bearerCapability; - __be16 maxChannels; - __be16 firmwareRevision; - __u8 hostName[64]; - __u8 vendorString[64]; -}; - -/* PptpStopReasons */ -#define PPTP_STOP_NONE 1 -#define PPTP_STOP_PROTOCOL 2 -#define PPTP_STOP_LOCAL_SHUTDOWN 3 - -struct PptpStopSessionRequest { - __u8 reason; - __u8 reserved1; - __u16 reserved2; -}; - -/* PptpStopSessionResultCode */ -#define PPTP_STOP_OK 1 -#define PPTP_STOP_GENERAL_ERROR 2 - -struct PptpStopSessionReply { - __u8 resultCode; - __u8 generalErrorCode; - __u16 reserved1; -}; - -struct PptpEchoRequest { - __be32 identNumber; -}; - -/* PptpEchoReplyResultCode */ -#define PPTP_ECHO_OK 1 -#define PPTP_ECHO_GENERAL_ERROR 2 - -struct PptpEchoReply { - __be32 identNumber; - __u8 resultCode; - __u8 generalErrorCode; - __u16 reserved; -}; - -/* PptpFramingType */ -#define PPTP_ASYNC_FRAMING 1 -#define PPTP_SYNC_FRAMING 2 -#define PPTP_DONT_CARE_FRAMING 3 - -/* PptpCallBearerType */ -#define PPTP_ANALOG_TYPE 1 -#define PPTP_DIGITAL_TYPE 2 -#define PPTP_DONT_CARE_BEARER_TYPE 3 - -struct PptpOutCallRequest { - __be16 callID; - __be16 callSerialNumber; - __be32 minBPS; - __be32 maxBPS; - __be32 bearerType; - __be32 framingType; - __be16 packetWindow; - __be16 packetProcDelay; - __be16 phoneNumberLength; - __u16 reserved1; - __u8 phoneNumber[64]; - __u8 subAddress[64]; -}; - -/* PptpCallResultCode */ -#define PPTP_OUTCALL_CONNECT 1 -#define PPTP_OUTCALL_GENERAL_ERROR 2 -#define PPTP_OUTCALL_NO_CARRIER 3 -#define PPTP_OUTCALL_BUSY 4 -#define PPTP_OUTCALL_NO_DIAL_TONE 5 -#define PPTP_OUTCALL_TIMEOUT 6 -#define PPTP_OUTCALL_DONT_ACCEPT 7 - -struct PptpOutCallReply { - __be16 callID; - __be16 peersCallID; - __u8 resultCode; - __u8 generalErrorCode; - __be16 causeCode; - __be32 connectSpeed; - __be16 packetWindow; - __be16 packetProcDelay; - __be32 physChannelID; -}; - -struct PptpInCallRequest { - __be16 callID; - __be16 callSerialNumber; - __be32 callBearerType; - __be32 physChannelID; - __be16 dialedNumberLength; - __be16 dialingNumberLength; - __u8 dialedNumber[64]; - __u8 dialingNumber[64]; - __u8 subAddress[64]; -}; - -/* PptpInCallResultCode */ -#define PPTP_INCALL_ACCEPT 1 -#define PPTP_INCALL_GENERAL_ERROR 2 -#define PPTP_INCALL_DONT_ACCEPT 3 - -struct PptpInCallReply { - __be16 callID; - __be16 peersCallID; - __u8 resultCode; - __u8 generalErrorCode; - __be16 packetWindow; - __be16 packetProcDelay; - __u16 reserved; -}; - -struct PptpInCallConnected { - __be16 peersCallID; - __u16 reserved; - __be32 connectSpeed; - __be16 packetWindow; - __be16 packetProcDelay; - __be32 callFramingType; -}; - -struct PptpClearCallRequest { - __be16 callID; - __u16 reserved; -}; - -struct PptpCallDisconnectNotify { - __be16 callID; - __u8 resultCode; - __u8 generalErrorCode; - __be16 causeCode; - __u16 reserved; - __u8 callStatistics[128]; -}; - -struct PptpWanErrorNotify { - __be16 peersCallID; - __u16 reserved; - __be32 crcErrors; - __be32 framingErrors; - __be32 hardwareOverRuns; - __be32 bufferOverRuns; - __be32 timeoutErrors; - __be32 alignmentErrors; -}; - -struct PptpSetLinkInfo { - __be16 peersCallID; - __u16 reserved; - __be32 sendAccm; - __be32 recvAccm; -}; - -union pptp_ctrl_union { - struct PptpStartSessionRequest sreq; - struct PptpStartSessionReply srep; - struct PptpStopSessionRequest streq; - struct PptpStopSessionReply strep; - struct PptpOutCallRequest ocreq; - struct PptpOutCallReply ocack; - struct PptpInCallRequest icreq; - struct PptpInCallReply icack; - struct PptpInCallConnected iccon; - struct PptpClearCallRequest clrreq; - struct PptpCallDisconnectNotify disc; - struct PptpWanErrorNotify wanerr; - struct PptpSetLinkInfo setlink; -}; - -extern int -(*ip_nat_pptp_hook_outbound)(struct sk_buff **pskb, - struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo, - struct PptpControlHeader *ctlh, - union pptp_ctrl_union *pptpReq); - -extern int -(*ip_nat_pptp_hook_inbound)(struct sk_buff **pskb, - struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo, - struct PptpControlHeader *ctlh, - union pptp_ctrl_union *pptpReq); - -extern void -(*ip_nat_pptp_hook_exp_gre)(struct ip_conntrack_expect *exp_orig, - struct ip_conntrack_expect *exp_reply); - -extern void -(*ip_nat_pptp_hook_expectfn)(struct ip_conntrack *ct, - struct ip_conntrack_expect *exp); -#endif /* __KERNEL__ */ #endif /* _CONNTRACK_PPTP_H */ --- ./linux/netfilter_ipv4/ip_conntrack_proto_gre.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_conntrack_proto_gre.h 2007-05-24 15:40:42.000000000 +0200 @@ -71,44 +71,5 @@ unsigned int timeout; }; -#ifdef __KERNEL__ -struct ip_conntrack_expect; -struct ip_conntrack; - -/* structure for original <-> reply keymap */ -struct ip_ct_gre_keymap { - struct list_head list; - - struct ip_conntrack_tuple tuple; -}; - -/* add new tuple->key_reply pair to keymap */ -int ip_ct_gre_keymap_add(struct ip_conntrack *ct, - struct ip_conntrack_tuple *t, - int reply); - -/* delete keymap entries */ -void ip_ct_gre_keymap_destroy(struct ip_conntrack *ct); - - -/* get pointer to gre key, if present */ -static inline __be32 *gre_key(struct gre_hdr *greh) -{ - if (!greh->key) - return NULL; - if (greh->csum || greh->routing) - return (__be32 *) (greh+sizeof(*greh)+4); - return (__be32 *) (greh+sizeof(*greh)); -} - -/* get pointer ot gre csum, if present */ -static inline u_int16_t *gre_csum(struct gre_hdr *greh) -{ - if (!greh->csum) - return NULL; - return (u_int16_t *) (greh+sizeof(*greh)); -} - -#endif /* __KERNEL__ */ #endif /* _CONNTRACK_PROTO_GRE_H */ --- ./linux/netfilter_ipv4/ip_conntrack_tuple.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_conntrack_tuple.h 2007-05-24 15:40:42.000000000 +0200 @@ -89,35 +89,15 @@ (tuple)->dst.u.all = 0; \ } while (0) -#ifdef __KERNEL__ -#define DUMP_TUPLE(tp) \ -DEBUGP("tuple %p: %u %u.%u.%u.%u:%hu -> %u.%u.%u.%u:%hu\n", \ - (tp), (tp)->dst.protonum, \ - NIPQUAD((tp)->src.ip), ntohs((tp)->src.u.all), \ - NIPQUAD((tp)->dst.ip), ntohs((tp)->dst.u.all)) - -/* If we're the first tuple, it's the original dir. */ -#define DIRECTION(h) ((enum ip_conntrack_dir)(h)->tuple.dst.dir) - -/* Connections have two entries in the hash table: one for each way */ -struct ip_conntrack_tuple_hash -{ - struct list_head list; - - struct ip_conntrack_tuple tuple; -}; - -#endif /* __KERNEL__ */ - -static inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1, +static __inline__ int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return t1->src.ip == t2->src.ip && t1->src.u.all == t2->src.u.all; } -static inline int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1, +static __inline__ int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return t1->dst.ip == t2->dst.ip @@ -125,13 +105,13 @@ && t1->dst.protonum == t2->dst.protonum; } -static inline int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1, +static __inline__ int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return ip_ct_tuple_src_equal(t1, t2) && ip_ct_tuple_dst_equal(t1, t2); } -static inline int ip_ct_tuple_mask_cmp(const struct ip_conntrack_tuple *t, +static __inline__ int ip_ct_tuple_mask_cmp(const struct ip_conntrack_tuple *t, const struct ip_conntrack_tuple *tuple, const struct ip_conntrack_tuple *mask) { --- ./linux/netfilter_ipv4/ip_nat.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_nat.h 2007-05-24 15:40:42.000000000 +0200 @@ -48,31 +48,5 @@ struct ip_nat_range range[1]; }; -#ifdef __KERNEL__ -#include - -/* Protects NAT hash tables, and NAT-private part of conntracks. */ -extern rwlock_t ip_nat_lock; - -/* The structure embedded in the conntrack structure. */ -struct ip_nat_info -{ - struct list_head bysource; - struct ip_nat_seq seq[IP_CT_DIR_MAX]; -}; - -struct ip_conntrack; - -/* Set up the info structure to map into this range. */ -extern unsigned int ip_nat_setup_info(struct ip_conntrack *conntrack, - const struct ip_nat_range *range, - unsigned int hooknum); - -/* Is this tuple already taken? (not by us)*/ -extern int ip_nat_used_tuple(const struct ip_conntrack_tuple *tuple, - const struct ip_conntrack *ignored_conntrack); - -#else /* !__KERNEL__: iptables wants this to compile. */ #define ip_nat_multi_range ip_nat_multi_range_compat -#endif /*__KERNEL__*/ #endif --- ./linux/netfilter_ipv4/ip_nat_rule.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_nat_rule.h 2007-05-24 15:40:42.000000000 +0200 @@ -4,25 +4,4 @@ #include #include -#ifdef __KERNEL__ - -extern int ip_nat_rule_init(void) __init; -extern void ip_nat_rule_cleanup(void); -extern int ip_nat_rule_find(struct sk_buff **pskb, - unsigned int hooknum, - const struct net_device *in, - const struct net_device *out, - struct ip_conntrack *ct, - struct ip_nat_info *info); - -extern unsigned int -alloc_null_binding(struct ip_conntrack *conntrack, - struct ip_nat_info *info, - unsigned int hooknum); - -extern unsigned int -alloc_null_binding_confirmed(struct ip_conntrack *conntrack, - struct ip_nat_info *info, - unsigned int hooknum); -#endif #endif /* _IP_NAT_RULE_H */ --- ./linux/netfilter_ipv4/ip_queue.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_queue.h 2007-05-24 15:40:42.000000000 +0200 @@ -7,15 +7,7 @@ #ifndef _IP_QUEUE_H #define _IP_QUEUE_H -#ifdef __KERNEL__ -#ifdef DEBUG_IPQ -#define QDEBUG(x...) printk(KERN_DEBUG ## x) -#else -#define QDEBUG(x...) -#endif /* DEBUG_IPQ */ -#else #include -#endif /* ! __KERNEL__ */ /* Messages sent from kernel */ typedef struct ipq_packet_msg { --- ./linux/netfilter_ipv4/ip_tables.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4/ip_tables.h 2007-05-24 15:40:42.000000000 +0200 @@ -15,14 +15,6 @@ #ifndef _IPTABLES_H #define _IPTABLES_H -#ifdef __KERNEL__ -#include -#include -#include -#include -#include -#endif -#include #include #include @@ -191,7 +183,7 @@ /* Number of counters (must be equal to current number of entries). */ unsigned int num_counters; /* The old entries' counters. */ - struct xt_counters __user *counters; + struct xt_counters *counters; /* The entries (hang off end: not really an array). */ struct ipt_entry entries[0]; @@ -264,74 +256,4 @@ /* * Main firewall chains definitions and global var's definitions. */ -#ifdef __KERNEL__ - -#include -extern void ipt_init(void) __init; - -#define ipt_register_target(tgt) \ -({ (tgt)->family = AF_INET; \ - xt_register_target(tgt); }) -#define ipt_unregister_target(tgt) xt_unregister_target(tgt) - -#define ipt_register_match(mtch) \ -({ (mtch)->family = AF_INET; \ - xt_register_match(mtch); }) -#define ipt_unregister_match(mtch) xt_unregister_match(mtch) - -//#define ipt_register_table(tbl, repl) xt_register_table(AF_INET, tbl, repl) -//#define ipt_unregister_table(tbl) xt_unregister_table(AF_INET, tbl) - -extern int ipt_register_table(struct ipt_table *table, - const struct ipt_replace *repl); -extern void ipt_unregister_table(struct ipt_table *table); - -/* net/sched/ipt.c: Gimme access to your targets! Gets target->me. */ -extern struct ipt_target *ipt_find_target(const char *name, u8 revision); - -/* Standard entry. */ -struct ipt_standard -{ - struct ipt_entry entry; - struct ipt_standard_target target; -}; - -struct ipt_error_target -{ - struct ipt_entry_target target; - char errorname[IPT_FUNCTION_MAXNAMELEN]; -}; - -struct ipt_error -{ - struct ipt_entry entry; - struct ipt_error_target target; -}; - -extern unsigned int ipt_do_table(struct sk_buff **pskb, - unsigned int hook, - const struct net_device *in, - const struct net_device *out, - struct ipt_table *table); - -#define IPT_ALIGN(s) XT_ALIGN(s) - -#ifdef CONFIG_COMPAT -#include - -struct compat_ipt_entry -{ - struct ipt_ip ip; - compat_uint_t nfcache; - u_int16_t target_offset; - u_int16_t next_offset; - compat_uint_t comefrom; - struct compat_xt_counters counters; - unsigned char elems[0]; -}; - -#define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s) - -#endif /* CONFIG_COMPAT */ -#endif /*__KERNEL__*/ #endif /* _IPTABLES_H */ --- ./linux/netfilter_ipv6/ip6_tables.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv6/ip6_tables.h 2007-05-24 15:40:42.000000000 +0200 @@ -15,14 +15,6 @@ #ifndef _IP6_TABLES_H #define _IP6_TABLES_H -#ifdef __KERNEL__ -#include -#include -#include -#include -#include -#endif -#include #include #include @@ -204,7 +196,7 @@ /* Number of counters (must be equal to current number of entries). */ unsigned int num_counters; /* The old entries' counters. */ - struct xt_counters __user *counters; + struct xt_counters *counters; /* The entries (hang off end: not really an array). */ struct ip6t_entry entries[0]; @@ -278,41 +270,4 @@ * Main firewall chains definitions and global var's definitions. */ -#ifdef __KERNEL__ - -#include -extern void ip6t_init(void) __init; - -#define ip6t_register_target(tgt) \ -({ (tgt)->family = AF_INET6; \ - xt_register_target(tgt); }) -#define ip6t_unregister_target(tgt) xt_unregister_target(tgt) - -#define ip6t_register_match(match) \ -({ (match)->family = AF_INET6; \ - xt_register_match(match); }) -#define ip6t_unregister_match(match) xt_unregister_match(match) - -extern int ip6t_register_table(struct ip6t_table *table, - const struct ip6t_replace *repl); -extern void ip6t_unregister_table(struct ip6t_table *table); -extern unsigned int ip6t_do_table(struct sk_buff **pskb, - unsigned int hook, - const struct net_device *in, - const struct net_device *out, - struct ip6t_table *table); - -/* Check for an extension */ -extern int ip6t_ext_hdr(u8 nexthdr); -/* find specified header and get offset to it */ -extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, - int target, unsigned short *fragoff); - -extern int ip6_masked_addrcmp(const struct in6_addr *addr1, - const struct in6_addr *mask, - const struct in6_addr *addr2); - -#define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1)) - -#endif /*__KERNEL__*/ #endif /* _IP6_TABLES_H */ --- ./linux/nfsd/auth.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/nfsd/auth.h 2007-05-24 15:40:42.000000000 +0200 @@ -10,18 +10,4 @@ #ifndef LINUX_NFSD_AUTH_H #define LINUX_NFSD_AUTH_H -#ifdef __KERNEL__ - -#define nfsd_luid(rq, uid) ((u32)(uid)) -#define nfsd_lgid(rq, gid) ((u32)(gid)) -#define nfsd_ruid(rq, uid) ((u32)(uid)) -#define nfsd_rgid(rq, gid) ((u32)(gid)) - -/* - * Set the current process's fsuid/fsgid etc to those of the NFS - * client user - */ -int nfsd_setuser(struct svc_rqst *, struct svc_export *); - -#endif /* __KERNEL__ */ #endif /* LINUX_NFSD_AUTH_H */ --- ./linux/nfsd/const.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/nfsd/const.h 2007-05-24 15:40:42.000000000 +0200 @@ -26,34 +26,5 @@ /* NFSv2 is limited by the protocol specification, see RFC 1094 */ #define NFSSVC_MAXBLKSIZE_V2 (8*1024) -#ifdef __KERNEL__ - -#include - -#ifndef NFS_SUPER_MAGIC -# define NFS_SUPER_MAGIC 0x6969 -#endif - -/* - * Largest number of bytes we need to allocate for an NFS - * call or reply. Used to control buffer sizes. We use - * the length of v3 WRITE, READDIR and READDIR replies - * which are an RPC header, up to 26 XDR units of reply - * data, and some page data. - * - * Note that accuracy here doesn't matter too much as the - * size is rounded up to a page size when allocating space. - */ -#define NFSD_BUFSIZE ((RPC_MAX_HEADER_WITH_AUTH+26)*XDR_UNIT + NFSSVC_MAXBLKSIZE) - -#ifdef CONFIG_NFSD_V4 -# define NFSSVC_XDRSIZE NFS4_SVC_XDRSIZE -#elif defined(CONFIG_NFSD_V3) -# define NFSSVC_XDRSIZE NFS3_SVC_XDRSIZE -#else -# define NFSSVC_XDRSIZE NFS2_SVC_XDRSIZE -#endif - -#endif /* __KERNEL__ */ #endif /* _LINUX_NFSD_CONST_H */ --- ./linux/nfsd/debug.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/nfsd/debug.h 2007-05-24 15:40:42.000000000 +0200 @@ -36,13 +36,5 @@ #define NFSDDBG_NOCHANGE 0xFFFF -#ifdef __KERNEL__ -# undef ifdebug -# ifdef NFSD_DEBUG -# define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag) -# else -# define ifdebug(flag) if (0) -# endif -#endif /* __KERNEL__ */ #endif /* LINUX_NFSD_DEBUG_H */ --- ./linux/nfsd/export.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/nfsd/export.h 2007-05-24 15:40:42.000000000 +0200 @@ -11,10 +11,6 @@ #define NFSD_EXPORT_H #include -#ifdef __KERNEL__ -# include -# include -#endif /* * Important limits for the exports stuff. @@ -43,99 +39,6 @@ #define NFSEXP_ALLFLAGS 0xFE3F -#ifdef __KERNEL__ - -/* - * FS Locations - */ - -#define MAX_FS_LOCATIONS 128 - -struct nfsd4_fs_location { - char *hosts; /* colon separated list of hosts */ - char *path; /* slash separated list of path components */ -}; - -struct nfsd4_fs_locations { - uint32_t locations_count; - struct nfsd4_fs_location *locations; -/* If we're not actually serving this data ourselves (only providing a - * list of replicas that do serve it) then we set "migrated": */ - int migrated; -}; - -struct svc_export { - struct cache_head h; - struct auth_domain * ex_client; - int ex_flags; - struct vfsmount * ex_mnt; - struct dentry * ex_dentry; - char * ex_path; - uid_t ex_anon_uid; - gid_t ex_anon_gid; - int ex_fsid; - struct nfsd4_fs_locations ex_fslocs; -}; - -/* an "export key" (expkey) maps a filehandlefragement to an - * svc_export for a given client. There can be two per export, one - * for type 0 (dev/ino), one for type 1 (fsid) - */ -struct svc_expkey { - struct cache_head h; - - struct auth_domain * ek_client; - int ek_fsidtype; - u32 ek_fsid[3]; - - struct vfsmount * ek_mnt; - struct dentry * ek_dentry; -}; - -#define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) -#define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC)) -#define EX_RDONLY(exp) ((exp)->ex_flags & NFSEXP_READONLY) -#define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE) -#define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES) - - -/* - * Function declarations - */ -void nfsd_export_init(void); -void nfsd_export_shutdown(void); -void nfsd_export_flush(void); -void exp_readlock(void); -void exp_readunlock(void); -struct svc_export * exp_get_by_name(struct auth_domain *clp, - struct vfsmount *mnt, - struct dentry *dentry, - struct cache_req *reqp); -struct svc_export * exp_parent(struct auth_domain *clp, - struct vfsmount *mnt, - struct dentry *dentry, - struct cache_req *reqp); -int exp_rootfh(struct auth_domain *, - char *path, struct knfsd_fh *, int maxsize); -__be32 exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); -__be32 nfserrno(int errno); - -extern struct cache_detail svc_export_cache; - -static inline void exp_put(struct svc_export *exp) -{ - cache_put(&exp->h, &svc_export_cache); -} - -static inline void exp_get(struct svc_export *exp) -{ - cache_get(&exp->h); -} -extern struct svc_export * -exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, - struct cache_req *reqp); - -#endif /* __KERNEL__ */ #endif /* NFSD_EXPORT_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nfsd/nfsfh.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/nfsd/nfsfh.h 2007-05-24 15:40:42.000000000 +0200 @@ -15,11 +15,6 @@ #define _LINUX_NFSD_FH_H #include -#ifdef __KERNEL__ -# include -# include -# include -#endif #include #include @@ -116,228 +111,6 @@ #define fh_auth fh_base.fh_new.fb_auth #define fh_fsid fh_base.fh_new.fb_auth -#ifdef __KERNEL__ - -static inline __u32 ino_t_to_u32(ino_t ino) -{ - return (__u32) ino; -} - -static inline ino_t u32_to_ino_t(__u32 uino) -{ - return (ino_t) uino; -} - -/* - * This is the internal representation of an NFS handle used in knfsd. - * pre_mtime/post_version will be used to support wcc_attr's in NFSv3. - */ -typedef struct svc_fh { - struct knfsd_fh fh_handle; /* FH data */ - struct dentry * fh_dentry; /* validated dentry */ - struct svc_export * fh_export; /* export pointer */ - int fh_maxsize; /* max size for fh_handle */ - - unsigned char fh_locked; /* inode locked by us */ - -#ifdef CONFIG_NFSD_V3 - unsigned char fh_post_saved; /* post-op attrs saved */ - unsigned char fh_pre_saved; /* pre-op attrs saved */ - - /* Pre-op attributes saved during fh_lock */ - __u64 fh_pre_size; /* size before operation */ - struct timespec fh_pre_mtime; /* mtime before oper */ - struct timespec fh_pre_ctime; /* ctime before oper */ - - /* Post-op attributes saved in fh_unlock */ - umode_t fh_post_mode; /* i_mode */ - nlink_t fh_post_nlink; /* i_nlink */ - uid_t fh_post_uid; /* i_uid */ - gid_t fh_post_gid; /* i_gid */ - __u64 fh_post_size; /* i_size */ - unsigned long fh_post_blocks; /* i_blocks */ - unsigned long fh_post_blksize;/* i_blksize */ - __be32 fh_post_rdev[2];/* i_rdev */ - struct timespec fh_post_atime; /* i_atime */ - struct timespec fh_post_mtime; /* i_mtime */ - struct timespec fh_post_ctime; /* i_ctime */ -#endif /* CONFIG_NFSD_V3 */ - -} svc_fh; - -static inline void mk_fsid_v0(u32 *fsidv, dev_t dev, ino_t ino) -{ - fsidv[0] = htonl((MAJOR(dev)<<16) | - MINOR(dev)); - fsidv[1] = ino_t_to_u32(ino); -} - -static inline void mk_fsid_v1(u32 *fsidv, u32 fsid) -{ - fsidv[0] = fsid; -} - -static inline void mk_fsid_v2(u32 *fsidv, dev_t dev, ino_t ino) -{ - fsidv[0] = htonl(MAJOR(dev)); - fsidv[1] = htonl(MINOR(dev)); - fsidv[2] = ino_t_to_u32(ino); -} - -static inline void mk_fsid_v3(u32 *fsidv, dev_t dev, ino_t ino) -{ - fsidv[0] = new_encode_dev(dev); - fsidv[1] = ino_t_to_u32(ino); -} - -static inline int key_len(int type) -{ - switch(type) { - case 0: return 8; - case 1: return 4; - case 2: return 12; - case 3: return 8; - default: return 0; - } -} - -/* - * Shorthand for dprintk()'s - */ -extern char * SVCFH_fmt(struct svc_fh *fhp); - -/* - * Function prototypes - */ -__be32 fh_verify(struct svc_rqst *, struct svc_fh *, int, int); -__be32 fh_compose(struct svc_fh *, struct svc_export *, struct dentry *, struct svc_fh *); -__be32 fh_update(struct svc_fh *); -void fh_put(struct svc_fh *); - -static __inline__ struct svc_fh * -fh_copy(struct svc_fh *dst, struct svc_fh *src) -{ - if (src->fh_dentry || src->fh_locked) { - struct dentry *dentry = src->fh_dentry; - printk(KERN_ERR "fh_copy: copying %s/%s, already verified!\n", - dentry->d_parent->d_name.name, dentry->d_name.name); - } - - *dst = *src; - return dst; -} - -static __inline__ struct svc_fh * -fh_init(struct svc_fh *fhp, int maxsize) -{ - memset(fhp, 0, sizeof(*fhp)); - fhp->fh_maxsize = maxsize; - return fhp; -} - -#ifdef CONFIG_NFSD_V3 -/* - * Fill in the pre_op attr for the wcc data - */ -static inline void -fill_pre_wcc(struct svc_fh *fhp) -{ - struct inode *inode; - - inode = fhp->fh_dentry->d_inode; - if (!fhp->fh_pre_saved) { - fhp->fh_pre_mtime = inode->i_mtime; - fhp->fh_pre_ctime = inode->i_ctime; - fhp->fh_pre_size = inode->i_size; - fhp->fh_pre_saved = 1; - } -} - -/* - * Fill in the post_op attr for the wcc data - */ -static inline void -fill_post_wcc(struct svc_fh *fhp) -{ - struct inode *inode = fhp->fh_dentry->d_inode; - - if (fhp->fh_post_saved) - printk("nfsd: inode locked twice during operation.\n"); - - fhp->fh_post_mode = inode->i_mode; - fhp->fh_post_nlink = inode->i_nlink; - fhp->fh_post_uid = inode->i_uid; - fhp->fh_post_gid = inode->i_gid; - fhp->fh_post_size = inode->i_size; - fhp->fh_post_blksize = BLOCK_SIZE; - fhp->fh_post_blocks = inode->i_blocks; - fhp->fh_post_rdev[0] = htonl((u32)imajor(inode)); - fhp->fh_post_rdev[1] = htonl((u32)iminor(inode)); - fhp->fh_post_atime = inode->i_atime; - fhp->fh_post_mtime = inode->i_mtime; - fhp->fh_post_ctime = inode->i_ctime; - fhp->fh_post_saved = 1; -} -#else -#define fill_pre_wcc(ignored) -#define fill_post_wcc(notused) -#endif /* CONFIG_NFSD_V3 */ - - -/* - * Lock a file handle/inode - * NOTE: both fh_lock and fh_unlock are done "by hand" in - * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once - * so, any changes here should be reflected there. - */ - -static inline void -fh_lock_nested(struct svc_fh *fhp, unsigned int subclass) -{ - struct dentry *dentry = fhp->fh_dentry; - struct inode *inode; - - dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n", - SVCFH_fmt(fhp), fhp->fh_locked); - - if (!fhp->fh_dentry) { - printk(KERN_ERR "fh_lock: fh not verified!\n"); - return; - } - if (fhp->fh_locked) { - printk(KERN_WARNING "fh_lock: %s/%s already locked!\n", - dentry->d_parent->d_name.name, dentry->d_name.name); - return; - } - - inode = dentry->d_inode; - mutex_lock_nested(&inode->i_mutex, subclass); - fill_pre_wcc(fhp); - fhp->fh_locked = 1; -} - -static inline void -fh_lock(struct svc_fh *fhp) -{ - fh_lock_nested(fhp, I_MUTEX_NORMAL); -} - -/* - * Unlock a file handle/inode - */ -static inline void -fh_unlock(struct svc_fh *fhp) -{ - if (!fhp->fh_dentry) - printk(KERN_ERR "fh_unlock: fh not verified!\n"); - - if (fhp->fh_locked) { - fill_post_wcc(fhp); - mutex_unlock(&fhp->fh_dentry->d_inode->i_mutex); - fhp->fh_locked = 0; - } -} -#endif /* __KERNEL__ */ #endif /* _LINUX_NFSD_FH_H */ --- ./linux/nfsd/stats.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/nfsd/stats.h 2007-05-24 15:40:42.000000000 +0200 @@ -38,13 +38,4 @@ /* thread usage wraps very million seconds (approx one fortnight) */ #define NFSD_USAGE_WRAP (HZ*1000000) -#ifdef __KERNEL__ - -extern struct nfsd_stats nfsdstats; -extern struct svc_stat nfsd_svcstats; - -void nfsd_stat_init(void); -void nfsd_stat_shutdown(void); - -#endif /* __KERNEL__ */ #endif /* LINUX_NFSD_STATS_H */ --- ./linux/nfsd/syscall.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/nfsd/syscall.h 2007-05-24 15:40:42.000000000 +0200 @@ -10,10 +10,6 @@ #define NFSD_SYSCALL_H #include -#ifdef __KERNEL__ -# include -# include -#endif #include #include #include @@ -110,15 +106,5 @@ struct knfsd_fh cr_getfs; }; -#ifdef __KERNEL__ -/* - * Kernel syscall implementation. - */ -extern int exp_addclient(struct nfsctl_client *ncp); -extern int exp_delclient(struct nfsctl_client *ncp); -extern int exp_export(struct nfsctl_export *nxp); -extern int exp_unexport(struct nfsctl_export *nxp); - -#endif /* __KERNEL__ */ #endif /* NFSD_SYSCALL_H */ --- ./linux/raid/md_p.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/raid/md_p.h 2007-05-24 15:40:42.000000000 +0200 @@ -192,7 +192,7 @@ } mdp_super_t; -static inline __u64 md_event(mdp_super_t *sb) { +static __inline__ __u64 md_event(mdp_super_t *sb) { __u64 ev = sb->events_hi; return (ev<<32)| sb->events_lo; } --- ./linux/sunrpc/debug.h 2007-05-08 14:40:12.000000000 +0200 +++ ./linux/sunrpc/debug.h 2007-05-24 15:40:42.000000000 +0200 @@ -26,57 +26,6 @@ #define RPCDBG_CACHE 0x0800 #define RPCDBG_ALL 0x7fff -#ifdef __KERNEL__ - -#include -#include - -/* - * Enable RPC debugging/profiling. - */ -#ifdef CONFIG_SYSCTL -#define RPC_DEBUG -#endif -/* #define RPC_PROFILE */ - -/* - * Debugging macros etc - */ -#ifdef RPC_DEBUG -extern unsigned int rpc_debug; -extern unsigned int nfs_debug; -extern unsigned int nfsd_debug; -extern unsigned int nlm_debug; -#endif - -#define dprintk(args...) dfprintk(FACILITY, ## args) - -#undef ifdebug -#ifdef RPC_DEBUG -# define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) -# define dfprintk(fac, args...) do { ifdebug(fac) printk(args); } while(0) -# define RPC_IFDEBUG(x) x -#else -# define ifdebug(fac) if (0) -# define dfprintk(fac, args...) do ; while (0) -# define RPC_IFDEBUG(x) -#endif - -#ifdef RPC_PROFILE -# define pprintk(args...) printk(## args) -#else -# define pprintk(args...) do ; while (0) -#endif - -/* - * Sysctl interface for RPC debugging - */ -#ifdef RPC_DEBUG -void rpc_register_sysctl(void); -void rpc_unregister_sysctl(void); -#endif - -#endif /* __KERNEL__ */ /* * Declarations for the sysctl debug interface, which allows to read or --- ./linux/blkpg.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/blkpg.h 2007-05-24 15:40:42.000000000 +0200 @@ -24,7 +24,6 @@ * * For today, only the partition stuff - aeb, 990515 */ -#include #include #define BLKPG _IO(0x12,105) @@ -34,7 +33,7 @@ int op; int flags; int datalen; - void __user *data; + void *data; }; /* The subfunctions (for the op field) */ --- ./linux/chio.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/chio.h 2007-05-24 15:40:42.000000000 +0200 @@ -96,7 +96,7 @@ */ struct changer_element_status { int ces_type; - unsigned char __user *ces_data; + unsigned char *ces_data; }; #define CESTATUS_FULL 0x01 /* full */ #define CESTATUS_IMPEXP 0x02 /* media was imported (inserted by sysop) */ --- ./linux/coda_psdev.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/coda_psdev.h 2007-05-24 15:40:42.000000000 +0200 @@ -24,7 +24,7 @@ }; -static inline struct coda_sb_info *coda_sbp(struct super_block *sb) +static __inline__ struct coda_sb_info *coda_sbp(struct super_block *sb) { return ((struct coda_sb_info *)((sb)->s_fs_info)); } --- ./linux/dlm_device.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/dlm_device.h 2007-05-24 15:40:42.000000000 +0200 @@ -29,11 +29,11 @@ __u16 flags; __u32 lkid; __u32 parent; - void __user *castparam; - void __user *castaddr; - void __user *bastparam; - void __user *bastaddr; - struct dlm_lksb __user *lksb; + void *castparam; + void *castaddr; + void *bastparam; + void *bastaddr; + struct dlm_lksb *lksb; char lvb[DLM_USER_LVB_LEN]; char name[0]; }; @@ -60,9 +60,9 @@ consists mainly of userspace pointers for the library to use */ struct dlm_lock_result { __u32 length; - void __user * user_astaddr; - void __user * user_astparam; - struct dlm_lksb __user * user_lksb; + void * user_astaddr; + void * user_astparam; + struct dlm_lksb * user_lksb; struct dlm_lksb lksb; __u8 bast_mode; __u8 unused[3]; --- ./linux/fd.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/fd.h 2007-05-24 15:40:42.000000000 +0200 @@ -2,7 +2,6 @@ #define _LINUX_FD_H #include -#include /* New file layout: Now the ioctl definitions immediately follow the * definitions of the structures that they use */ @@ -340,7 +339,7 @@ #define FD_RAW_FAILURE 0x10000 /* command sent to fdc, fdc returned error */ #define FD_RAW_HARDFAILURE 0x20000 /* fdc had to be reset, or timed out */ - void __user *data; + void *data; char *kernel_data; /* location of data buffer in the kernel */ struct floppy_raw_cmd *next; /* used for chaining of raw cmd's * within the kernel */ --- ./linux/futex.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/futex.h 2007-05-24 15:40:42.000000000 +0200 @@ -31,7 +31,7 @@ * changed. */ struct robust_list { - struct robust_list __user *next; + struct robust_list *next; }; /* @@ -66,7 +66,7 @@ * _might_ have taken. We check the owner TID in any case, * so only truly owned locks will be handled. */ - struct robust_list __user *list_op_pending; + struct robust_list *list_op_pending; }; /* @@ -93,20 +93,20 @@ */ #define ROBUST_LIST_LIMIT 2048 -long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, - u32 __user *uaddr2, u32 val2, u32 val3); +long do_futex(u32 *uaddr, int op, u32 val, unsigned long timeout, + u32 *uaddr2, u32 val2, u32 val3); extern int -handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); +handle_futex_death(u32 *uaddr, struct task_struct *curr, int pi); #ifdef CONFIG_FUTEX extern void exit_robust_list(struct task_struct *curr); extern void exit_pi_state_list(struct task_struct *curr); #else -static inline void exit_robust_list(struct task_struct *curr) +static __inline__ void exit_robust_list(struct task_struct *curr) { } -static inline void exit_pi_state_list(struct task_struct *curr) +static __inline__ void exit_pi_state_list(struct task_struct *curr) { } #endif --- ./linux/i2c-dev.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/i2c-dev.h 2007-05-24 15:40:42.000000000 +0200 @@ -23,7 +23,6 @@ #define _LINUX_I2C_DEV_H #include -#include /* Some IOCTL commands are defined in */ /* Note: 10-bit addresses are NOT supported! */ @@ -33,12 +32,12 @@ __u8 read_write; __u8 command; __u32 size; - union i2c_smbus_data __user *data; + union i2c_smbus_data *data; }; /* This is the structure as used in the I2C_RDWR ioctl call */ struct i2c_rdwr_ioctl_data { - struct i2c_msg __user *msgs; /* pointers to i2c_msgs */ + struct i2c_msg *msgs; /* pointers to i2c_msgs */ __u32 nmsgs; /* number of i2c_msgs */ }; --- ./linux/if.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if.h 2007-05-24 15:40:42.000000000 +0200 @@ -21,7 +21,6 @@ #include /* for "__kernel_caddr_t" et al */ #include /* for "struct sockaddr" et al */ -#include /* for "__user" et al */ #define IFNAMSIZ 16 #include @@ -133,15 +132,15 @@ unsigned int size; /* Size of the data allocated by the caller */ union { /* {atm/eth/dsl}_settings anyone ? */ - raw_hdlc_proto __user *raw_hdlc; - cisco_proto __user *cisco; - fr_proto __user *fr; - fr_proto_pvc __user *fr_pvc; - fr_proto_pvc_info __user *fr_pvc_info; + raw_hdlc_proto *raw_hdlc; + cisco_proto *cisco; + fr_proto *fr; + fr_proto_pvc *fr_pvc; + fr_proto_pvc_info *fr_pvc_info; /* interface settings */ - sync_serial_settings __user *sync; - te1_settings __user *te1; + sync_serial_settings *sync; + te1_settings *te1; } ifs_ifsu; }; @@ -172,7 +171,7 @@ struct ifmap ifru_map; char ifru_slave[IFNAMSIZ]; /* Just fits the size */ char ifru_newname[IFNAMSIZ]; - void __user * ifru_data; + void * ifru_data; struct if_settings ifru_settings; } ifr_ifru; }; @@ -207,8 +206,8 @@ int ifc_len; /* size of buffer */ union { - char __user *ifcu_buf; - struct ifreq __user *ifcu_req; + char *ifcu_buf; + struct ifreq *ifcu_req; } ifc_ifcu; }; #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ --- ./linux/if_ppp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_ppp.h 2007-05-24 15:40:42.000000000 +0200 @@ -35,7 +35,6 @@ #ifndef _IF_PPP_H_ #define _IF_PPP_H_ -#include /* * Packet sizes @@ -95,7 +94,7 @@ /* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */ struct ppp_option_data { - __u8 __user *ptr; + __u8 *ptr; __u32 length; int transmit; }; --- ./linux/ixjuser.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ixjuser.h 2007-05-24 15:40:42.000000000 +0200 @@ -348,7 +348,7 @@ typedef struct { int elements_used; IXJ_CADENCE_TERM termination; - IXJ_CADENCE_ELEMENT __user *ce; + IXJ_CADENCE_ELEMENT *ce; } IXJ_CADENCE; #define IXJCTL_TONE_CADENCE _IOW ('q', 0xCA, IXJ_CADENCE *) --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/mtio.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/mtio.h 2007-05-24 15:40:43.000000000 +0200 @@ -176,7 +176,7 @@ unsigned mt_segno; /* the segment to read or write */ unsigned mt_mode; /* modes for read/write (sync/async etc.) */ int mt_result; /* result of r/w request, not of the ioctl */ - void __user *mt_data; /* User space buffer: must be 29kb */ + void *mt_data; /* User space buffer: must be 29kb */ }; /* get tape capacity (ftape/zftape) --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nfs4_mount.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nfs4_mount.h 2007-05-24 15:40:43.000000000 +0200 @@ -20,7 +20,7 @@ struct nfs_string { unsigned int len; - const char __user * data; + const char * data; }; struct nfs4_mount_data { @@ -45,14 +45,14 @@ struct nfs_string hostname; /* 1 */ /* Server IP address */ unsigned int host_addrlen; /* 1 */ - struct sockaddr __user * host_addr; /* 1 */ + struct sockaddr * host_addr; /* 1 */ /* Transport protocol to use */ int proto; /* 1 */ /* Pseudo-flavours to use for authentication. See RFC2623 */ int auth_flavourlen; /* 1 */ - int __user *auth_flavours; /* 1 */ + int *auth_flavours; /* 1 */ }; /* bits in the flags field */ --- ./linux/resource.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/resource.h 2007-05-24 15:40:43.000000000 +0200 @@ -69,6 +69,6 @@ */ #include -int getrusage(struct task_struct *p, int who, struct rusage __user *ru); +int getrusage(struct task_struct *p, int who, struct rusage *ru); #endif --- ./linux/tipc.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/tipc.h 2007-05-24 15:40:43.000000000 +0200 @@ -59,24 +59,24 @@ __u32 upper; }; -static inline __u32 tipc_addr(unsigned int zone, +static __inline__ __u32 tipc_addr(unsigned int zone, unsigned int cluster, unsigned int node) { return (zone << 24) | (cluster << 12) | node; } -static inline unsigned int tipc_zone(__u32 addr) +static __inline__ unsigned int tipc_zone(__u32 addr) { return addr >> 24; } -static inline unsigned int tipc_cluster(__u32 addr) +static __inline__ unsigned int tipc_cluster(__u32 addr) { return (addr >> 12) & 0xfff; } -static inline unsigned int tipc_node(__u32 addr) +static __inline__ unsigned int tipc_node(__u32 addr) { return addr & 0xfff; } --- ./linux/videotext.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/videotext.h 2007-05-24 15:40:43.000000000 +0200 @@ -90,7 +90,7 @@ int pgbuf; /* buffer where page will be stored */ int start; /* start of requested part of page */ int end; /* end of requested part of page */ - void __user *buffer; /* pointer to beginning of destination buffer */ + void *buffer; /* pointer to beginning of destination buffer */ } vtx_pagereq_t; --- ./linux/wireless.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/wireless.h 2007-05-24 15:40:43.000000000 +0200 @@ -658,7 +658,7 @@ */ struct iw_point { - void __user *pointer; /* Pointer to the data (in user space) */ + void *pointer; /* Pointer to the data (in user space) */ __u16 length; /* number of fields or size in bytes */ __u16 flags; /* Optional params */ }; --- ./linux/acct.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/acct.h 2007-05-24 15:40:43.000000000 +0200 @@ -81,11 +81,7 @@ __u32 ac_pid; /* Process ID */ __u32 ac_ppid; /* Parent Process ID */ __u32 ac_btime; /* Process Creation Time */ -#ifdef __KERNEL__ - __u32 ac_etime; /* Elapsed Time */ -#else float ac_etime; /* Elapsed Time */ -#endif comp_t ac_utime; /* User Time */ comp_t ac_stime; /* System Time */ comp_t ac_mem; /* Average Memory Usage */ @@ -113,93 +109,8 @@ #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ #endif -#ifdef __KERNEL__ - - -#ifdef CONFIG_BSD_PROCESS_ACCT -struct vfsmount; -struct super_block; -extern void acct_auto_close_mnt(struct vfsmount *m); -extern void acct_auto_close(struct super_block *sb); -extern void acct_init_pacct(struct pacct_struct *pacct); -extern void acct_collect(long exitcode, int group_dead); -extern void acct_process(void); -#else -#define acct_auto_close_mnt(x) do { } while (0) -#define acct_auto_close(x) do { } while (0) -#define acct_init_pacct(x) do { } while (0) -#define acct_collect(x,y) do { } while (0) -#define acct_process() do { } while (0) -#endif - -/* - * ACCT_VERSION numbers as yet defined: - * 0: old format (until 2.6.7) with 16 bit uid/gid - * 1: extended variant (binary compatible on M68K) - * 2: extended variant (binary compatible on everything except M68K) - * 3: new binary incompatible format (64 bytes) - * 4: new binary incompatible format (128 bytes) - * 5: new binary incompatible format (128 bytes, second half) - * - */ - -#ifdef CONFIG_BSD_PROCESS_ACCT_V3 -#define ACCT_VERSION 3 -#define AHZ 100 -typedef struct acct_v3 acct_t; -#else -#ifdef CONFIG_M68K -#define ACCT_VERSION 1 -#else -#define ACCT_VERSION 2 -#endif -#define AHZ (USER_HZ) -typedef struct acct acct_t; -#endif - -#else #define ACCT_VERSION 2 #define AHZ (HZ) -#endif /* __KERNEL */ - -#ifdef __KERNEL__ -#include -/* - * Yet another set of HZ to *HZ helper functions. - * See for the original. - */ - -static inline u32 jiffies_to_AHZ(unsigned long x) -{ -#if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 - return x / (HZ / AHZ); -#else - u64 tmp = (u64)x * TICK_NSEC; - do_div(tmp, (NSEC_PER_SEC / AHZ)); - return (long)tmp; -#endif -} - -static inline u64 nsec_to_AHZ(u64 x) -{ -#if (NSEC_PER_SEC % AHZ) == 0 - do_div(x, (NSEC_PER_SEC / AHZ)); -#elif (AHZ % 512) == 0 - x *= AHZ/512; - do_div(x, (NSEC_PER_SEC / 512)); -#else - /* - * max relative error 5.7e-8 (1.8s per year) for AHZ <= 1024, - * overflow after 64.99 years. - * exact for AHZ=60, 72, 90, 120, 144, 180, 300, 600, 900, ... - */ - x *= 9; - do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (AHZ/2)) - / AHZ)); -#endif - return x; -} -#endif /* __KERNEL */ #endif /* _LINUX_ACCT_H */ --- ./linux/adb.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/adb.h 2007-05-24 15:40:43.000000000 +0200 @@ -40,65 +40,5 @@ */ #define ADB_QUERY_GETDEVINFO 1 -#ifdef __KERNEL__ - -struct adb_request { - unsigned char data[32]; - int nbytes; - unsigned char reply[32]; - int reply_len; - unsigned char reply_expected; - unsigned char sent; - unsigned char complete; - void (*done)(struct adb_request *); - void *arg; - struct adb_request *next; -}; - -struct adb_ids { - int nids; - unsigned char id[16]; -}; - -/* Structure which encapsulates a low-level ADB driver */ - -struct adb_driver { - char name[16]; - int (*probe)(void); - int (*init)(void); - int (*send_request)(struct adb_request *req, int sync); - int (*autopoll)(int devs); - void (*poll)(void); - int (*reset_bus)(void); -}; - -/* Values for adb_request flags */ -#define ADBREQ_REPLY 1 /* expect reply */ -#define ADBREQ_SYNC 2 /* poll until done */ -#define ADBREQ_NOSEND 4 /* build the request, but don't send it */ - -/* Messages sent thru the client_list notifier. You should NOT stop - the operation, at least not with this version */ -enum adb_message { - ADB_MSG_POWERDOWN, /* Currently called before sleep only */ - ADB_MSG_PRE_RESET, /* Called before resetting the bus */ - ADB_MSG_POST_RESET /* Called after resetting the bus (re-do init & register) */ -}; -extern struct adb_driver *adb_controller; -extern struct blocking_notifier_head adb_client_list; - -int adb_request(struct adb_request *req, void (*done)(struct adb_request *), - int flags, int nbytes, ...); -int adb_register(int default_id,int handler_id,struct adb_ids *ids, - void (*handler)(unsigned char *, int, int)); -int adb_unregister(int index); -void adb_poll(void); -void adb_input(unsigned char *, int, int); -int adb_reset_bus(void); - -int adb_try_handler_change(int address, int new_id); -int adb_get_infos(int address, int *original_address, int *handler_id); - -#endif /* __KERNEL__ */ #endif /* __ADB_H */ --- ./linux/adfs_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/adfs_fs.h 2007-05-24 15:40:43.000000000 +0200 @@ -40,37 +40,5 @@ #define ADFS_DR_SIZE 60 #define ADFS_DR_SIZE_BITS (ADFS_DR_SIZE << 3) -#ifdef __KERNEL__ -#include -#include -/* - * Calculate the boot block checksum on an ADFS drive. Note that this will - * appear to be correct if the sector contains all zeros, so also check that - * the disk size is non-zero!!! - */ -static inline int adfs_checkbblk(unsigned char *ptr) -{ - unsigned int result = 0; - unsigned char *p = ptr + 511; - - do { - result = (result & 0xff) + (result >> 8); - result = result + *--p; - } while (p != ptr); - - return (result & 0xff) != ptr[511]; -} - -static inline struct adfs_sb_info *ADFS_SB(struct super_block *sb) -{ - return sb->s_fs_info; -} - -static inline struct adfs_inode_info *ADFS_I(struct inode *inode) -{ - return container_of(inode, struct adfs_inode_info, vfs_inode); -} - -#endif #endif --- ./linux/agpgart.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/agpgart.h 2007-05-24 15:40:43.000000000 +0200 @@ -49,7 +49,6 @@ #define FALSE 0 #endif -#ifndef __KERNEL__ #include #include @@ -108,107 +107,5 @@ __u32 priority; /* priority for paging out */ } agp_unbind; -#else /* __KERNEL__ */ -#include -#include - -#define AGPGART_MINOR 175 - -struct agp_info { - struct agp_version version; /* version of the driver */ - u32 bridge_id; /* bridge vendor/device */ - u32 agp_mode; /* mode info of bridge */ - unsigned long aper_base;/* base of aperture */ - size_t aper_size; /* size of aperture */ - size_t pg_total; /* max pages (swap + system) */ - size_t pg_system; /* max pages (system) */ - size_t pg_used; /* current pages used */ -}; - -struct agp_setup { - u32 agp_mode; /* mode info of bridge */ -}; - -/* - * The "prot" down below needs still a "sleep" flag somehow ... - */ -struct agp_segment { - off_t pg_start; /* starting page to populate */ - size_t pg_count; /* number of pages */ - int prot; /* prot flags for mmap */ -}; - -struct agp_segment_priv { - off_t pg_start; - size_t pg_count; - pgprot_t prot; -}; - -struct agp_region { - pid_t pid; /* pid of process */ - size_t seg_count; /* number of segments */ - struct agp_segment *seg_list; -}; - -struct agp_allocate { - int key; /* tag of allocation */ - size_t pg_count; /* number of pages */ - u32 type; /* 0 == normal, other devspec */ - u32 physical; /* device specific (some devices - * need a phys address of the - * actual page behind the gatt - * table) */ -}; - -struct agp_bind { - int key; /* tag of allocation */ - off_t pg_start; /* starting page to populate */ -}; - -struct agp_unbind { - int key; /* tag of allocation */ - u32 priority; /* priority for paging out */ -}; - -struct agp_client { - struct agp_client *next; - struct agp_client *prev; - pid_t pid; - int num_segments; - struct agp_segment_priv **segments; -}; - -struct agp_controller { - struct agp_controller *next; - struct agp_controller *prev; - pid_t pid; - int num_clients; - struct agp_memory *pool; - struct agp_client *clients; -}; - -#define AGP_FF_ALLOW_CLIENT 0 -#define AGP_FF_ALLOW_CONTROLLER 1 -#define AGP_FF_IS_CLIENT 2 -#define AGP_FF_IS_CONTROLLER 3 -#define AGP_FF_IS_VALID 4 - -struct agp_file_private { - struct agp_file_private *next; - struct agp_file_private *prev; - pid_t my_pid; - long access_flags; /* long req'd for set_bit --RR */ -}; - -struct agp_front_data { - struct mutex agp_mutex; - struct agp_controller *current_controller; - struct agp_controller *controllers; - struct agp_file_private *file_priv_list; - u8 used_by_controller; - u8 backend_acquired; -}; - -#endif /* __KERNEL__ */ #endif /* _AGP_H */ --- ./linux/apm_bios.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/apm_bios.h 2007-05-24 15:40:43.000000000 +0200 @@ -19,96 +19,6 @@ typedef unsigned short apm_event_t; typedef unsigned short apm_eventinfo_t; -#ifdef __KERNEL__ - -#define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8) -#define APM_CS_16 (APM_CS + 8) -#define APM_DS (APM_CS_16 + 8) - -struct apm_bios_info { - unsigned short version; - unsigned short cseg; - unsigned long offset; - unsigned short cseg_16; - unsigned short dseg; - unsigned short flags; - unsigned short cseg_len; - unsigned short cseg_16_len; - unsigned short dseg_len; -}; - -/* Results of APM Installation Check */ -#define APM_16_BIT_SUPPORT 0x0001 -#define APM_32_BIT_SUPPORT 0x0002 -#define APM_IDLE_SLOWS_CLOCK 0x0004 -#define APM_BIOS_DISABLED 0x0008 -#define APM_BIOS_DISENGAGED 0x0010 - -/* - * Data for APM that is persistent across module unload/load - */ -struct apm_info { - struct apm_bios_info bios; - unsigned short connection_version; - int get_power_status_broken; - int get_power_status_swabinminutes; - int allow_ints; - int forbid_idle; - int realmode_power_off; - int disabled; -}; - -/* - * The APM function codes - */ -#define APM_FUNC_INST_CHECK 0x5300 -#define APM_FUNC_REAL_CONN 0x5301 -#define APM_FUNC_16BIT_CONN 0x5302 -#define APM_FUNC_32BIT_CONN 0x5303 -#define APM_FUNC_DISCONN 0x5304 -#define APM_FUNC_IDLE 0x5305 -#define APM_FUNC_BUSY 0x5306 -#define APM_FUNC_SET_STATE 0x5307 -#define APM_FUNC_ENABLE_PM 0x5308 -#define APM_FUNC_RESTORE_BIOS 0x5309 -#define APM_FUNC_GET_STATUS 0x530a -#define APM_FUNC_GET_EVENT 0x530b -#define APM_FUNC_GET_STATE 0x530c -#define APM_FUNC_ENABLE_DEV_PM 0x530d -#define APM_FUNC_VERSION 0x530e -#define APM_FUNC_ENGAGE_PM 0x530f -#define APM_FUNC_GET_CAP 0x5310 -#define APM_FUNC_RESUME_TIMER 0x5311 -#define APM_FUNC_RESUME_ON_RING 0x5312 -#define APM_FUNC_TIMER 0x5313 - -/* - * Function code for APM_FUNC_RESUME_TIMER - */ -#define APM_FUNC_DISABLE_TIMER 0 -#define APM_FUNC_GET_TIMER 1 -#define APM_FUNC_SET_TIMER 2 - -/* - * Function code for APM_FUNC_RESUME_ON_RING - */ -#define APM_FUNC_DISABLE_RING 0 -#define APM_FUNC_ENABLE_RING 1 -#define APM_FUNC_GET_RING 2 - -/* - * Function code for APM_FUNC_TIMER_STATUS - */ -#define APM_FUNC_TIMER_DISABLE 0 -#define APM_FUNC_TIMER_ENABLE 1 -#define APM_FUNC_TIMER_GET 2 - -/* - * in arch/i386/kernel/setup.c - */ -extern struct apm_info apm_info; - -#endif /* __KERNEL__ */ /* * Power states @@ -182,13 +92,6 @@ #define APM_DEVICE_CLASS 0x00ff #define APM_DEVICE_MASK 0xff00 -#ifdef __KERNEL__ -/* - * This is the "All Devices" ID communicated to the BIOS - */ -#define APM_DEVICE_BALL ((apm_info.connection_version > 0x0100) ? \ - APM_DEVICE_ALL : APM_DEVICE_OLD_ALL) -#endif /* * Battery status --- ./linux/atalk.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/atalk.h 2007-05-24 15:40:43.000000000 +0200 @@ -39,171 +39,4 @@ __be16 nr_lastnet; }; -#ifdef __KERNEL__ - -#include - -struct atalk_route { - struct net_device *dev; - struct atalk_addr target; - struct atalk_addr gateway; - int flags; - struct atalk_route *next; -}; - -/** - * struct atalk_iface - AppleTalk Interface - * @dev - Network device associated with this interface - * @address - Our address - * @status - What are we doing? - * @nets - Associated direct netrange - * @next - next element in the list of interfaces - */ -struct atalk_iface { - struct net_device *dev; - struct atalk_addr address; - int status; -#define ATIF_PROBE 1 /* Probing for an address */ -#define ATIF_PROBE_FAIL 2 /* Probe collided */ - struct atalk_netrange nets; - struct atalk_iface *next; -}; - -struct atalk_sock { - /* struct sock has to be the first member of atalk_sock */ - struct sock sk; - __be16 dest_net; - __be16 src_net; - unsigned char dest_node; - unsigned char src_node; - unsigned char dest_port; - unsigned char src_port; -}; - -static inline struct atalk_sock *at_sk(struct sock *sk) -{ - return (struct atalk_sock *)sk; -} - -#include - -struct ddpehdr { - __be16 deh_len_hops; /* lower 10 bits are length, next 4 - hops */ - __be16 deh_sum; - __be16 deh_dnet; - __be16 deh_snet; - __u8 deh_dnode; - __u8 deh_snode; - __u8 deh_dport; - __u8 deh_sport; - /* And netatalk apps expect to stick the type in themselves */ -}; - -static __inline__ struct ddpehdr *ddp_hdr(struct sk_buff *skb) -{ - return (struct ddpehdr *)skb->h.raw; -} - -/* AppleTalk AARP headers */ -struct elapaarp { - __be16 hw_type; -#define AARP_HW_TYPE_ETHERNET 1 -#define AARP_HW_TYPE_TOKENRING 2 - __be16 pa_type; - __u8 hw_len; - __u8 pa_len; -#define AARP_PA_ALEN 4 - __be16 function; -#define AARP_REQUEST 1 -#define AARP_REPLY 2 -#define AARP_PROBE 3 - __u8 hw_src[ETH_ALEN]; - __u8 pa_src_zero; - __be16 pa_src_net; - __u8 pa_src_node; - __u8 hw_dst[ETH_ALEN]; - __u8 pa_dst_zero; - __be16 pa_dst_net; - __u8 pa_dst_node; -} __attribute__ ((packed)); - -static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb) -{ - return (struct elapaarp *)skb->h.raw; -} - -/* Not specified - how long till we drop a resolved entry */ -#define AARP_EXPIRY_TIME (5 * 60 * HZ) -/* Size of hash table */ -#define AARP_HASH_SIZE 16 -/* Fast retransmission timer when resolving */ -#define AARP_TICK_TIME (HZ / 5) -/* Send 10 requests then give up (2 seconds) */ -#define AARP_RETRANSMIT_LIMIT 10 -/* - * Some value bigger than total retransmit time + a bit for last reply to - * appear and to stop continual requests - */ -#define AARP_RESOLVE_TIME (10 * HZ) - -extern struct datalink_proto *ddp_dl, *aarp_dl; -extern void aarp_proto_init(void); - -/* Inter module exports */ - -/* Give a device find its atif control structure */ -static inline struct atalk_iface *atalk_find_dev(struct net_device *dev) -{ - return dev->atalk_ptr; -} - -extern struct atalk_addr *atalk_find_dev_addr(struct net_device *dev); -extern struct net_device *atrtr_get_dev(struct atalk_addr *sa); -extern int aarp_send_ddp(struct net_device *dev, - struct sk_buff *skb, - struct atalk_addr *sa, void *hwaddr); -extern void aarp_device_down(struct net_device *dev); -extern void aarp_probe_network(struct atalk_iface *atif); -extern int aarp_proxy_probe_network(struct atalk_iface *atif, - struct atalk_addr *sa); -extern void aarp_proxy_remove(struct net_device *dev, - struct atalk_addr *sa); - -extern void aarp_cleanup_module(void); - -extern struct hlist_head atalk_sockets; -extern rwlock_t atalk_sockets_lock; - -extern struct atalk_route *atalk_routes; -extern rwlock_t atalk_routes_lock; - -extern struct atalk_iface *atalk_interfaces; -extern rwlock_t atalk_interfaces_lock; - -extern struct atalk_route atrtr_default; - -extern struct file_operations atalk_seq_arp_fops; - -extern int sysctl_aarp_expiry_time; -extern int sysctl_aarp_tick_time; -extern int sysctl_aarp_retransmit_limit; -extern int sysctl_aarp_resolve_time; - -#ifdef CONFIG_SYSCTL -extern void atalk_register_sysctl(void); -extern void atalk_unregister_sysctl(void); -#else -#define atalk_register_sysctl() do { } while(0) -#define atalk_unregister_sysctl() do { } while(0) -#endif - -#ifdef CONFIG_PROC_FS -extern int atalk_proc_init(void); -extern void atalk_proc_exit(void); -#else -#define atalk_proc_init() ({ 0; }) -#define atalk_proc_exit() do { } while(0) -#endif /* CONFIG_PROC_FS */ - -#endif /* __KERNEL__ */ #endif /* __LINUX_ATALK_H__ */ --- ./linux/atm.h 2007-05-14 16:10:32.000000000 +0200 +++ ./linux/atm.h 2007-05-24 15:40:43.000000000 +0200 @@ -16,11 +16,6 @@ * documentation. Do not change them. */ -#ifdef __KERNEL__ -#include -#include -#endif -#include #include #include #include @@ -256,7 +251,7 @@ struct atmif_sioc { int number; int length; - void __user *arg; + void *arg; }; typedef unsigned short atm_backend_t; --- ./linux/atm_tcp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/atm_tcp.h 2007-05-24 15:40:43.000000000 +0200 @@ -9,9 +9,6 @@ #include -#ifdef __KERNEL__ -#include -#endif #include @@ -59,17 +56,5 @@ interface */ -#ifdef __KERNEL__ - -struct atm_tcp_ops { - int (*attach)(struct atm_vcc *vcc,int itf); - int (*create_persistent)(int itf); - int (*remove_persistent)(int itf); - struct module *owner; -}; - -extern struct atm_tcp_ops atm_tcp_ops; - -#endif #endif --- ./linux/atmarp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/atmarp.h 2007-05-24 15:40:43.000000000 +0200 @@ -6,9 +6,6 @@ #ifndef _LINUX_ATMARP_H #define _LINUX_ATMARP_H -#ifdef __KERNEL__ -#include -#endif #include #include --- ./linux/atmdev.h 2007-05-14 16:10:32.000000000 +0200 +++ ./linux/atmdev.h 2007-05-24 15:40:43.000000000 +0200 @@ -166,7 +166,7 @@ struct atm_iobuf { int length; - void __user *buffer; + void *buffer; }; /* for ATM_GETCIRANGE / ATM_SETCIRANGE */ @@ -219,294 +219,5 @@ "SESSION", "HASSAP", "BOUND", "CLOSE" -#ifdef __KERNEL__ - -#include -#include /* wait_queue_head_t */ -#include /* struct timeval */ -#include -#include /* struct sk_buff */ -#include -#include -#include - -#ifdef CONFIG_PROC_FS -#include - -extern struct proc_dir_entry *atm_proc_root; -#endif - - -struct k_atm_aal_stats { -#define __HANDLE_ITEM(i) atomic_t i - __AAL_STAT_ITEMS -#undef __HANDLE_ITEM -}; - - -struct k_atm_dev_stats { - struct k_atm_aal_stats aal0; - struct k_atm_aal_stats aal34; - struct k_atm_aal_stats aal5; -}; - - -enum { - ATM_VF_ADDR, /* Address is in use. Set by anybody, cleared - by device driver. */ - ATM_VF_READY, /* VC is ready to transfer data. Set by device - driver, cleared by anybody. */ - ATM_VF_PARTIAL, /* resources are bound to PVC (partial PVC - setup), controlled by socket layer */ - ATM_VF_REGIS, /* registered with demon, controlled by SVC - socket layer */ - ATM_VF_BOUND, /* local SAP is set, controlled by SVC socket - layer */ - ATM_VF_RELEASED, /* demon has indicated/requested release, - controlled by SVC socket layer */ - ATM_VF_HASQOS, /* QOS parameters have been set */ - ATM_VF_LISTEN, /* socket is used for listening */ - ATM_VF_META, /* SVC socket isn't used for normal data - traffic and doesn't depend on signaling - to be available */ - ATM_VF_SESSION, /* VCC is p2mp session control descriptor */ - ATM_VF_HASSAP, /* SAP has been set */ - ATM_VF_CLOSE, /* asynchronous close - treat like VF_RELEASED*/ - ATM_VF_WAITING, /* waiting for reply from sigd */ - ATM_VF_IS_CLIP, /* in use by CLIP protocol */ -}; - - -#define ATM_VF2VS(flags) \ - (test_bit(ATM_VF_READY,&(flags)) ? ATM_VS_CONNECTED : \ - test_bit(ATM_VF_RELEASED,&(flags)) ? ATM_VS_CLOSING : \ - test_bit(ATM_VF_LISTEN,&(flags)) ? ATM_VS_LISTEN : \ - test_bit(ATM_VF_REGIS,&(flags)) ? ATM_VS_INUSE : \ - test_bit(ATM_VF_BOUND,&(flags)) ? ATM_VS_BOUND : ATM_VS_IDLE) - - -enum { - ATM_DF_REMOVED, /* device was removed from atm_devs list */ -}; - - -#define ATM_PHY_SIG_LOST 0 /* no carrier/light */ -#define ATM_PHY_SIG_UNKNOWN 1 /* carrier/light status is unknown */ -#define ATM_PHY_SIG_FOUND 2 /* carrier/light okay */ - -#define ATM_ATMOPT_CLP 1 /* set CLP bit */ - -struct atm_vcc { - /* struct sock has to be the first member of atm_vcc */ - struct sock sk; - unsigned long flags; /* VCC flags (ATM_VF_*) */ - short vpi; /* VPI and VCI (types must be equal */ - /* with sockaddr) */ - int vci; - unsigned long aal_options; /* AAL layer options */ - unsigned long atm_options; /* ATM layer options */ - struct atm_dev *dev; /* device back pointer */ - struct atm_qos qos; /* QOS */ - struct atm_sap sap; /* SAP */ - void (*push)(struct atm_vcc *vcc,struct sk_buff *skb); - void (*pop)(struct atm_vcc *vcc,struct sk_buff *skb); /* optional */ - int (*push_oam)(struct atm_vcc *vcc,void *cell); - int (*send)(struct atm_vcc *vcc,struct sk_buff *skb); - void *dev_data; /* per-device data */ - void *proto_data; /* per-protocol data */ - struct k_atm_aal_stats *stats; /* pointer to AAL stats group */ - /* SVC part --- may move later ------------------------------------- */ - short itf; /* interface number */ - struct sockaddr_atmsvc local; - struct sockaddr_atmsvc remote; - /* Multipoint part ------------------------------------------------- */ - struct atm_vcc *session; /* session VCC descriptor */ - /* Other stuff ----------------------------------------------------- */ - void *user_back; /* user backlink - not touched by */ - /* native ATM stack. Currently used */ - /* by CLIP and sch_atm. */ -}; - -static inline struct atm_vcc *atm_sk(struct sock *sk) -{ - return (struct atm_vcc *)sk; -} - -static inline struct atm_vcc *ATM_SD(struct socket *sock) -{ - return atm_sk(sock->sk); -} - -static inline struct sock *sk_atm(struct atm_vcc *vcc) -{ - return (struct sock *)vcc; -} - -struct atm_dev_addr { - struct sockaddr_atmsvc addr; /* ATM address */ - struct list_head entry; /* next address */ -}; - -enum atm_addr_type_t { ATM_ADDR_LOCAL, ATM_ADDR_LECS }; - -struct atm_dev { - const struct atmdev_ops *ops; /* device operations; NULL if unused */ - const struct atmphy_ops *phy; /* PHY operations, may be undefined */ - /* (NULL) */ - const char *type; /* device type name */ - int number; /* device index */ - void *dev_data; /* per-device data */ - void *phy_data; /* private PHY date */ - unsigned long flags; /* device flags (ATM_DF_*) */ - struct list_head local; /* local ATM addresses */ - struct list_head lecs; /* LECS ATM addresses learned via ILMI */ - unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */ - struct atm_cirange ci_range; /* VPI/VCI range */ - struct k_atm_dev_stats stats; /* statistics */ - char signal; /* signal status (ATM_PHY_SIG_*) */ - int link_rate; /* link rate (default: OC3) */ - atomic_t refcnt; /* reference count */ - spinlock_t lock; /* protect internal members */ -#ifdef CONFIG_PROC_FS - struct proc_dir_entry *proc_entry; /* proc entry */ - char *proc_name; /* proc entry name */ -#endif - struct class_device class_dev; /* sysfs class device */ - struct list_head dev_list; /* linkage */ -}; - - -/* OF: send_Oam Flags */ - -#define ATM_OF_IMMED 1 /* Attempt immediate delivery */ -#define ATM_OF_INRATE 2 /* Attempt in-rate delivery */ - - -/* - * ioctl, getsockopt, and setsockopt are optional and can be set to NULL. - */ - -struct atmdev_ops { /* only send is required */ - void (*dev_close)(struct atm_dev *dev); - int (*open)(struct atm_vcc *vcc); - void (*close)(struct atm_vcc *vcc); - int (*ioctl)(struct atm_dev *dev,unsigned int cmd,void __user *arg); - int (*getsockopt)(struct atm_vcc *vcc,int level,int optname, - void __user *optval,int optlen); - int (*setsockopt)(struct atm_vcc *vcc,int level,int optname, - void __user *optval,int optlen); - int (*send)(struct atm_vcc *vcc,struct sk_buff *skb); - int (*send_oam)(struct atm_vcc *vcc,void *cell,int flags); - void (*phy_put)(struct atm_dev *dev,unsigned char value, - unsigned long addr); - unsigned char (*phy_get)(struct atm_dev *dev,unsigned long addr); - int (*change_qos)(struct atm_vcc *vcc,struct atm_qos *qos,int flags); - int (*proc_read)(struct atm_dev *dev,loff_t *pos,char *page); - struct module *owner; -}; - -struct atmphy_ops { - int (*start)(struct atm_dev *dev); - int (*ioctl)(struct atm_dev *dev,unsigned int cmd,void __user *arg); - void (*interrupt)(struct atm_dev *dev); - int (*stop)(struct atm_dev *dev); -}; - -struct atm_skb_data { - struct atm_vcc *vcc; /* ATM VCC */ - unsigned long atm_options; /* ATM layer options */ -}; - -#define VCC_HTABLE_SIZE 32 - -extern struct hlist_head vcc_hash[VCC_HTABLE_SIZE]; -extern rwlock_t vcc_sklist_lock; - -#define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) - -struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops, - int number,unsigned long *flags); /* number == -1: pick first available */ -struct atm_dev *atm_dev_lookup(int number); -void atm_dev_deregister(struct atm_dev *dev); -void vcc_insert_socket(struct sock *sk); - - -/* - * This is approximately the algorithm used by alloc_skb. - * - */ - -static inline int atm_guess_pdu2truesize(int size) -{ - return (SKB_DATA_ALIGN(size) + sizeof(struct skb_shared_info)); -} - - -static inline void atm_force_charge(struct atm_vcc *vcc,int truesize) -{ - atomic_add(truesize, &sk_atm(vcc)->sk_rmem_alloc); -} - - -static inline void atm_return(struct atm_vcc *vcc,int truesize) -{ - atomic_sub(truesize, &sk_atm(vcc)->sk_rmem_alloc); -} - - -static inline int atm_may_send(struct atm_vcc *vcc,unsigned int size) -{ - return (size + atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) < - sk_atm(vcc)->sk_sndbuf; -} - - -static inline void atm_dev_hold(struct atm_dev *dev) -{ - atomic_inc(&dev->refcnt); -} - - -static inline void atm_dev_put(struct atm_dev *dev) -{ - if (atomic_dec_and_test(&dev->refcnt)) { - BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags)); - if (dev->ops->dev_close) - dev->ops->dev_close(dev); - class_device_put(&dev->class_dev); - } -} - - -int atm_charge(struct atm_vcc *vcc,int truesize); -struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, - gfp_t gfp_flags); -int atm_pcr_goal(const struct atm_trafprm *tp); - -void vcc_release_async(struct atm_vcc *vcc, int reply); - -struct atm_ioctl { - struct module *owner; - /* A module reference is kept if appropriate over this call. - * Return -ENOIOCTLCMD if you don't handle it. */ - int (*ioctl)(struct socket *, unsigned int cmd, unsigned long arg); - struct list_head list; -}; - -/** - * register_atm_ioctl - register handler for ioctl operations - * - * Special (non-device) handlers of ioctl's should - * register here. If you're a normal device, you should - * set .ioctl in your atmdev_ops instead. - */ -void register_atm_ioctl(struct atm_ioctl *); - -/** - * deregister_atm_ioctl - remove the ioctl handler - */ -void deregister_atm_ioctl(struct atm_ioctl *); - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/audit.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/audit.h 2007-05-24 15:40:43.000000000 +0200 @@ -308,201 +308,4 @@ __u32 values[AUDIT_MAX_FIELDS]; }; -#ifdef __KERNEL__ -#include - -struct audit_sig_info { - uid_t uid; - pid_t pid; - char ctx[0]; -}; - -struct audit_buffer; -struct audit_context; -struct inode; -struct netlink_skb_parms; -struct linux_binprm; -struct mq_attr; -struct mqstat; - -#define AUDITSC_INVALID 0 -#define AUDITSC_SUCCESS 1 -#define AUDITSC_FAILURE 2 -#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) -extern int __init audit_register_class(int class, unsigned *list); -extern int audit_classify_syscall(int abi, unsigned syscall); -#ifdef CONFIG_AUDITSYSCALL -/* These are defined in auditsc.c */ - /* Public API */ -extern int audit_alloc(struct task_struct *task); -extern void audit_free(struct task_struct *task); -extern void audit_syscall_entry(int arch, - int major, unsigned long a0, unsigned long a1, - unsigned long a2, unsigned long a3); -extern void audit_syscall_exit(int failed, long return_code); -extern void __audit_getname(const char *name); -extern void audit_putname(const char *name); -extern void __audit_inode(const char *name, const struct inode *inode); -extern void __audit_inode_child(const char *dname, const struct inode *inode, - const struct inode *parent); -extern void __audit_inode_update(const struct inode *inode); -static inline int audit_dummy_context(void) -{ - void *p = current->audit_context; - return !p || *(int *)p; -} -static inline void audit_getname(const char *name) -{ - if (unlikely(!audit_dummy_context())) - __audit_getname(name); -} -static inline void audit_inode(const char *name, const struct inode *inode) { - if (unlikely(!audit_dummy_context())) - __audit_inode(name, inode); -} -static inline void audit_inode_child(const char *dname, - const struct inode *inode, - const struct inode *parent) { - if (unlikely(!audit_dummy_context())) - __audit_inode_child(dname, inode, parent); -} -static inline void audit_inode_update(const struct inode *inode) { - if (unlikely(!audit_dummy_context())) - __audit_inode_update(inode); -} - - /* Private API (for audit.c only) */ -extern unsigned int audit_serial(void); -extern void auditsc_get_stamp(struct audit_context *ctx, - struct timespec *t, unsigned int *serial); -extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); -extern uid_t audit_get_loginuid(struct audit_context *ctx); -extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp); -extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); -extern int audit_bprm(struct linux_binprm *bprm); -extern int audit_socketcall(int nargs, unsigned long *args); -extern int audit_sockaddr(int len, void *addr); -extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); -extern int audit_set_macxattr(const char *name); -extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); -extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); -extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout); -extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification); -extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); - -static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) -{ - if (unlikely(!audit_dummy_context())) - return __audit_ipc_obj(ipcp); - return 0; -} -static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) -{ - if (unlikely(!audit_dummy_context())) - return __audit_ipc_set_perm(qbytes, uid, gid, mode); - return 0; -} -static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_open(oflag, mode, u_attr); - return 0; -} -static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); - return 0; -} -static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); - return 0; -} -static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_notify(mqdes, u_notification); - return 0; -} -static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_getsetattr(mqdes, mqstat); - return 0; -} -extern int audit_n_rules; -#else -#define audit_alloc(t) ({ 0; }) -#define audit_free(t) do { ; } while (0) -#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) -#define audit_syscall_exit(f,r) do { ; } while (0) -#define audit_dummy_context() 1 -#define audit_getname(n) do { ; } while (0) -#define audit_putname(n) do { ; } while (0) -#define __audit_inode(n,i) do { ; } while (0) -#define __audit_inode_child(d,i,p) do { ; } while (0) -#define __audit_inode_update(i) do { ; } while (0) -#define audit_inode(n,i) do { ; } while (0) -#define audit_inode_child(d,i,p) do { ; } while (0) -#define audit_inode_update(i) do { ; } while (0) -#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) -#define audit_get_loginuid(c) ({ -1; }) -#define audit_ipc_obj(i) ({ 0; }) -#define audit_ipc_set_perm(q,u,g,m) ({ 0; }) -#define audit_bprm(p) ({ 0; }) -#define audit_socketcall(n,a) ({ 0; }) -#define audit_sockaddr(len, addr) ({ 0; }) -#define audit_avc_path(dentry, mnt) ({ 0; }) -#define audit_set_macxattr(n) do { ; } while (0) -#define audit_mq_open(o,m,a) ({ 0; }) -#define audit_mq_timedsend(d,l,p,t) ({ 0; }) -#define audit_mq_timedreceive(d,l,p,t) ({ 0; }) -#define audit_mq_notify(d,n) ({ 0; }) -#define audit_mq_getsetattr(d,s) ({ 0; }) -#define audit_n_rules 0 -#endif - -#ifdef CONFIG_AUDIT -/* These are defined in audit.c */ - /* Public API */ -extern void audit_log(struct audit_context *ctx, gfp_t gfp_mask, - int type, const char *fmt, ...) - __attribute__((format(printf,4,5))); - -extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type); -extern void audit_log_format(struct audit_buffer *ab, - const char *fmt, ...) - __attribute__((format(printf,2,3))); -extern void audit_log_end(struct audit_buffer *ab); -extern void audit_log_hex(struct audit_buffer *ab, - const unsigned char *buf, - size_t len); -extern const char * audit_log_untrustedstring(struct audit_buffer *ab, - const char *string); -extern const char * audit_log_n_untrustedstring(struct audit_buffer *ab, - size_t n, - const char *string); -extern void audit_log_d_path(struct audit_buffer *ab, - const char *prefix, - struct dentry *dentry, - struct vfsmount *vfsmnt); - /* Private API (for audit.c only) */ -extern int audit_filter_user(struct netlink_skb_parms *cb, int type); -extern int audit_filter_type(int type); -extern int audit_receive_filter(int type, int pid, int uid, int seq, - void *data, size_t datasz, uid_t loginuid, u32 sid); -#else -#define audit_log(c,g,t,f,...) do { ; } while (0) -#define audit_log_start(c,g,t) ({ NULL; }) -#define audit_log_vformat(b,f,a) do { ; } while (0) -#define audit_log_format(b,f,...) do { ; } while (0) -#define audit_log_end(b) do { ; } while (0) -#define audit_log_hex(a,b,l) do { ; } while (0) -#define audit_log_untrustedstring(a,s) do { ; } while (0) -#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) -#define audit_log_d_path(b,p,d,v) do { ; } while (0) -#endif -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/auto_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/auto_fs.h 2007-05-24 15:40:43.000000000 +0200 @@ -14,11 +14,6 @@ #ifndef _LINUX_AUTO_FS_H #define _LINUX_AUTO_FS_H -#ifdef __KERNEL__ -#include -#include -#include -#endif /* __KERNEL__ */ #include --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/binfmts.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/binfmts.h 2007-05-24 15:40:43.000000000 +0200 @@ -15,81 +15,4 @@ /* sizeof(linux_binprm->buf) */ #define BINPRM_BUF_SIZE 128 -#ifdef __KERNEL__ - -/* - * This structure is used to hold the arguments that are used when loading binaries. - */ -struct linux_binprm{ - char buf[BINPRM_BUF_SIZE]; - struct page *page[MAX_ARG_PAGES]; - struct mm_struct *mm; - unsigned long p; /* current top of mem */ - int sh_bang; - struct file * file; - int e_uid, e_gid; - kernel_cap_t cap_inheritable, cap_permitted, cap_effective; - void *security; - int argc, envc; - char * filename; /* Name of binary as seen by procps */ - char * interp; /* Name of the binary really executed. Most - of the time same as filename, but could be - different for binfmt_{misc,script} */ - unsigned interp_flags; - unsigned interp_data; - unsigned long loader, exec; - int misc; -}; - -#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 -#define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) - -/* fd of the binary should be passed to the interpreter */ -#define BINPRM_FLAGS_EXECFD_BIT 1 -#define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT) - - -/* - * This structure defines the functions that are used to load the binary formats that - * linux accepts. - */ -struct linux_binfmt { - struct linux_binfmt * next; - struct module *module; - int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); - int (*load_shlib)(struct file *); - int (*core_dump)(long signr, struct pt_regs * regs, struct file * file); - unsigned long min_coredump; /* minimal dump size */ -}; - -extern int register_binfmt(struct linux_binfmt *); -extern int unregister_binfmt(struct linux_binfmt *); - -extern int prepare_binprm(struct linux_binprm *); -extern void remove_arg_zero(struct linux_binprm *); -extern int search_binary_handler(struct linux_binprm *,struct pt_regs *); -extern int flush_old_exec(struct linux_binprm * bprm); - -extern int suid_dumpable; -#define SUID_DUMP_DISABLE 0 /* No setuid dumping */ -#define SUID_DUMP_USER 1 /* Dump as user of process */ -#define SUID_DUMP_ROOT 2 /* Dump as root */ - -/* Stack area protections */ -#define EXSTACK_DEFAULT 0 /* Whatever the arch defaults to */ -#define EXSTACK_DISABLE_X 1 /* Disable executable stacks */ -#define EXSTACK_ENABLE_X 2 /* Enable executable stacks */ - -extern int setup_arg_pages(struct linux_binprm * bprm, - unsigned long stack_top, - int executable_stack); -extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); -extern void compute_creds(struct linux_binprm *binprm); -extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); -extern int set_binfmt(struct linux_binfmt *new); - -void pax_report_fault(struct pt_regs *regs, void *pc, void *sp); -void pax_report_insns(void *pc, void *sp); - -#endif /* __KERNEL__ */ #endif /* _LINUX_BINFMTS_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/capability.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/capability.h 2007-05-24 15:40:43.000000000 +0200 @@ -14,7 +14,6 @@ #define _LINUX_CAPABILITY_H #include -#include /* User-level do most of the mapping between kernel and user capabilities based on the version tag given by the kernel. The @@ -32,37 +31,14 @@ typedef struct __user_cap_header_struct { __u32 version; int pid; -} __user *cap_user_header_t; +} *cap_user_header_t; typedef struct __user_cap_data_struct { __u32 effective; __u32 permitted; __u32 inheritable; -} __user *cap_user_data_t; +} *cap_user_data_t; -#ifdef __KERNEL__ - -#include -#include - -/* #define STRICT_CAP_T_TYPECHECKS */ - -#ifdef STRICT_CAP_T_TYPECHECKS - -typedef struct kernel_cap_struct { - __u32 cap; -} kernel_cap_t; - -#else - -typedef __u32 kernel_cap_t; - -#endif - -#define _USER_CAP_HEADER_SIZE (2*sizeof(__u32)) -#define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t)) - -#endif /** @@ -288,79 +264,5 @@ #define CAP_AUDIT_CONTROL 30 -#ifdef __KERNEL__ -/* - * Bounding set - */ -extern kernel_cap_t cap_bset; - -/* - * Internal kernel functions only - */ - -#ifdef STRICT_CAP_T_TYPECHECKS - -#define to_cap_t(x) { x } -#define cap_t(x) (x).cap - -#else - -#define to_cap_t(x) (x) -#define cap_t(x) (x) - -#endif - -#define CAP_EMPTY_SET to_cap_t(0) -#define CAP_FULL_SET to_cap_t(~0) -#define CAP_INIT_EFF_SET to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP)) -#define CAP_INIT_INH_SET to_cap_t(0) - -#define CAP_TO_MASK(x) (1 << (x)) -#define cap_raise(c, flag) (cap_t(c) |= CAP_TO_MASK(flag)) -#define cap_lower(c, flag) (cap_t(c) &= ~CAP_TO_MASK(flag)) -#define cap_raised(c, flag) (cap_t(c) & CAP_TO_MASK(flag)) - -static inline kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b) -{ - kernel_cap_t dest; - cap_t(dest) = cap_t(a) | cap_t(b); - return dest; -} - -static inline kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b) -{ - kernel_cap_t dest; - cap_t(dest) = cap_t(a) & cap_t(b); - return dest; -} - -static inline kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop) -{ - kernel_cap_t dest; - cap_t(dest) = cap_t(a) & ~cap_t(drop); - return dest; -} - -static inline kernel_cap_t cap_invert(kernel_cap_t c) -{ - kernel_cap_t dest; - cap_t(dest) = ~cap_t(c); - return dest; -} - -#define cap_isclear(c) (!cap_t(c)) -#define cap_issubset(a,set) (!(cap_t(a) & ~cap_t(set))) - -#define cap_clear(c) do { cap_t(c) = 0; } while(0) -#define cap_set_full(c) do { cap_t(c) = ~0; } while(0) -#define cap_mask(c,mask) do { cap_t(c) &= cap_t(mask); } while(0) - -#define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK) - -int capable(int cap); -int capable_nolog(int cap); -int __capable(struct task_struct *t, int cap); - -#endif /* __KERNEL__ */ #endif /* !_LINUX_CAPABILITY_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/capi.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/capi.h 2007-05-24 15:40:43.000000000 +0200 @@ -14,9 +14,7 @@ #include #include -#ifndef __KERNEL__ #include -#endif /* * CAPI_REGISTER @@ -77,7 +75,7 @@ typedef struct capi_manufacturer_cmd { unsigned long cmd; - void __user *data; + void *data; } capi_manufacturer_cmd; /* --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/cciss_ioctl.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/cciss_ioctl.h 2007-05-24 15:40:43.000000000 +0200 @@ -168,7 +168,7 @@ RequestBlock_struct Request; ErrorInfo_struct error_info; WORD buf_size; /* size in bytes of the buf */ - BYTE __user *buf; + BYTE *buf; } IOCTL_Command_struct; typedef struct _BIG_IOCTL_Command_struct { @@ -178,7 +178,7 @@ DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */ DWORD buf_size; /* size in bytes of the buf */ /* < malloc_size * MAXSGENTRIES */ - BYTE __user *buf; + BYTE *buf; } BIG_IOCTL_Command_struct; typedef struct _LogvolInfo_struct{ @@ -211,31 +211,4 @@ #define CCISS_GETLUNINFO _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct) #define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct) -#ifdef __KERNEL__ -#ifdef CONFIG_COMPAT - -/* 32 bit compatible ioctl structs */ -typedef struct _IOCTL32_Command_struct { - LUNAddr_struct LUN_info; - RequestBlock_struct Request; - ErrorInfo_struct error_info; - WORD buf_size; /* size in bytes of the buf */ - __u32 buf; /* 32 bit pointer to data buffer */ -} IOCTL32_Command_struct; - -typedef struct _BIG_IOCTL32_Command_struct { - LUNAddr_struct LUN_info; - RequestBlock_struct Request; - ErrorInfo_struct error_info; - DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */ - DWORD buf_size; /* size in bytes of the buf */ - /* < malloc_size * MAXSGENTRIES */ - __u32 buf; /* 32 bit pointer to data buffer */ -} BIG_IOCTL32_Command_struct; - -#define CCISS_PASSTHRU32 _IOWR(CCISS_IOC_MAGIC, 11, IOCTL32_Command_struct) -#define CCISS_BIG_PASSTHRU32 _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL32_Command_struct) - -#endif /* CONFIG_COMPAT */ -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/cdrom.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/cdrom.h 2007-05-24 15:40:43.000000000 +0200 @@ -239,7 +239,7 @@ union cdrom_addr addr; /* frame address */ __u8 addr_format; /* CDROM_LBA or CDROM_MSF */ int nframes; /* number of 2352-byte-frames to read at once */ - __u8 __user *buf; /* frame buffer (size: nframes*2352 bytes) */ + __u8 *buf; /* frame buffer (size: nframes*2352 bytes) */ }; /* This struct is used with the CDROMMULTISESSION ioctl */ @@ -280,14 +280,14 @@ struct cdrom_generic_command { unsigned char cmd[CDROM_PACKET_SIZE]; - unsigned char __user *buffer; + unsigned char *buffer; unsigned int buflen; int stat; - struct request_sense __user *sense; + struct request_sense *sense; unsigned char data_direction; int quiet; int timeout; - void __user *reserved[1]; /* unused, actually */ + void *reserved[1]; /* unused, actually */ }; /* @@ -904,286 +904,5 @@ __be16 desc_length; }; -#ifdef __KERNEL__ -#include /* not really needed, later.. */ -#include - -struct packet_command -{ - unsigned char cmd[CDROM_PACKET_SIZE]; - unsigned char *buffer; - unsigned int buflen; - int stat; - struct request_sense *sense; - unsigned char data_direction; - int quiet; - int timeout; - void *reserved[1]; -}; - -/* - * _OLD will use PIO transfer on atapi devices, _BPC_* will use DMA - */ -#define CDDA_OLD 0 /* old style */ -#define CDDA_BPC_SINGLE 1 /* single frame block pc */ -#define CDDA_BPC_FULL 2 /* multi frame block pc */ - -/* Uniform cdrom data structures for cdrom.c */ -struct cdrom_device_info { - struct cdrom_device_ops *ops; /* link to device_ops */ - struct cdrom_device_info *next; /* next device_info for this major */ - struct gendisk *disk; /* matching block layer disk */ - void *handle; /* driver-dependent data */ -/* specifications */ - int mask; /* mask of capability: disables them */ - int speed; /* maximum speed for reading data */ - int capacity; /* number of discs in jukebox */ -/* device-related storage */ - int options : 30; /* options flags */ - unsigned mc_flags : 2; /* media change buffer flags */ - int use_count; /* number of times device opened */ - char name[20]; /* name of the device type */ -/* per-device flags */ - __u8 sanyo_slot : 2; /* Sanyo 3 CD changer support */ - __u8 reserved : 6; /* not used yet */ - int cdda_method; /* see flags */ - __u8 last_sense; - __u8 media_written; /* dirty flag, DVD+RW bookkeeping */ - unsigned short mmc3_profile; /* current MMC3 profile */ - int for_data; - int (*exit)(struct cdrom_device_info *); - int mrw_mode_page; -}; - -struct cdrom_device_ops { -/* routines */ - int (*open) (struct cdrom_device_info *, int); - void (*release) (struct cdrom_device_info *); - int (*drive_status) (struct cdrom_device_info *, int); - int (*media_changed) (struct cdrom_device_info *, int); - int (*tray_move) (struct cdrom_device_info *, int); - int (*lock_door) (struct cdrom_device_info *, int); - int (*select_speed) (struct cdrom_device_info *, int); - int (*select_disc) (struct cdrom_device_info *, int); - int (*get_last_session) (struct cdrom_device_info *, - struct cdrom_multisession *); - int (*get_mcn) (struct cdrom_device_info *, - struct cdrom_mcn *); - /* hard reset device */ - int (*reset) (struct cdrom_device_info *); - /* play stuff */ - int (*audio_ioctl) (struct cdrom_device_info *,unsigned int, void *); - -/* driver specifications */ - const int capability; /* capability flags */ - int n_minors; /* number of active minor devices */ - /* handle uniform packets for scsi type devices (scsi,atapi) */ - int (*generic_packet) (struct cdrom_device_info *, - struct packet_command *); -}; - -/* the general block_device operations structure: */ -extern int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, - struct file *fp); -extern int cdrom_release(struct cdrom_device_info *cdi, struct file *fp); -extern int cdrom_ioctl(struct file *file, struct cdrom_device_info *cdi, - struct inode *ip, unsigned int cmd, unsigned long arg); -extern int cdrom_media_changed(struct cdrom_device_info *); - -extern int register_cdrom(struct cdrom_device_info *cdi); -extern int unregister_cdrom(struct cdrom_device_info *cdi); - -typedef struct { - int data; - int audio; - int cdi; - int xa; - long error; -} tracktype; - -extern int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written); -extern int cdrom_number_of_slots(struct cdrom_device_info *cdi); -extern int cdrom_mode_select(struct cdrom_device_info *cdi, - struct packet_command *cgc); -extern int cdrom_mode_sense(struct cdrom_device_info *cdi, - struct packet_command *cgc, - int page_code, int page_control); -extern void init_cdrom_command(struct packet_command *cgc, - void *buffer, int len, int type); - -/* The SCSI spec says there could be 256 slots. */ -#define CDROM_MAX_SLOTS 256 - -struct cdrom_mechstat_header { -#if defined(__BIG_ENDIAN_BITFIELD) - __u8 fault : 1; - __u8 changer_state : 2; - __u8 curslot : 5; - __u8 mech_state : 3; - __u8 door_open : 1; - __u8 reserved1 : 4; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - __u8 curslot : 5; - __u8 changer_state : 2; - __u8 fault : 1; - __u8 reserved1 : 4; - __u8 door_open : 1; - __u8 mech_state : 3; -#endif - __u8 curlba[3]; - __u8 nslots; - __u16 slot_tablelen; -}; - -struct cdrom_slot { -#if defined(__BIG_ENDIAN_BITFIELD) - __u8 disc_present : 1; - __u8 reserved1 : 6; - __u8 change : 1; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - __u8 change : 1; - __u8 reserved1 : 6; - __u8 disc_present : 1; -#endif - __u8 reserved2[3]; -}; - -struct cdrom_changer_info { - struct cdrom_mechstat_header hdr; - struct cdrom_slot slots[CDROM_MAX_SLOTS]; -}; - -typedef enum { - mechtype_caddy = 0, - mechtype_tray = 1, - mechtype_popup = 2, - mechtype_individual_changer = 4, - mechtype_cartridge_changer = 5 -} mechtype_t; - -typedef struct { -#if defined(__BIG_ENDIAN_BITFIELD) - __u8 ps : 1; - __u8 reserved1 : 1; - __u8 page_code : 6; - __u8 page_length; - __u8 reserved2 : 1; - __u8 bufe : 1; - __u8 ls_v : 1; - __u8 test_write : 1; - __u8 write_type : 4; - __u8 multi_session : 2; /* or border, DVD */ - __u8 fp : 1; - __u8 copy : 1; - __u8 track_mode : 4; - __u8 reserved3 : 4; - __u8 data_block_type : 4; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - __u8 page_code : 6; - __u8 reserved1 : 1; - __u8 ps : 1; - __u8 page_length; - __u8 write_type : 4; - __u8 test_write : 1; - __u8 ls_v : 1; - __u8 bufe : 1; - __u8 reserved2 : 1; - __u8 track_mode : 4; - __u8 copy : 1; - __u8 fp : 1; - __u8 multi_session : 2; /* or border, DVD */ - __u8 data_block_type : 4; - __u8 reserved3 : 4; -#endif - __u8 link_size; - __u8 reserved4; -#if defined(__BIG_ENDIAN_BITFIELD) - __u8 reserved5 : 2; - __u8 app_code : 6; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - __u8 app_code : 6; - __u8 reserved5 : 2; -#endif - __u8 session_format; - __u8 reserved6; - __be32 packet_size; - __u16 audio_pause; - __u8 mcn[16]; - __u8 isrc[16]; - __u8 subhdr0; - __u8 subhdr1; - __u8 subhdr2; - __u8 subhdr3; -} __attribute__((packed)) write_param_page; - -struct modesel_head -{ - __u8 reserved1; - __u8 medium; - __u8 reserved2; - __u8 block_desc_length; - __u8 density; - __u8 number_of_blocks_hi; - __u8 number_of_blocks_med; - __u8 number_of_blocks_lo; - __u8 reserved3; - __u8 block_length_hi; - __u8 block_length_med; - __u8 block_length_lo; -}; - -typedef struct { - __u16 report_key_length; - __u8 reserved1; - __u8 reserved2; -#if defined(__BIG_ENDIAN_BITFIELD) - __u8 type_code : 2; - __u8 vra : 3; - __u8 ucca : 3; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - __u8 ucca : 3; - __u8 vra : 3; - __u8 type_code : 2; -#endif - __u8 region_mask; - __u8 rpc_scheme; - __u8 reserved3; -} rpc_state_t; - -struct event_header { - __be16 data_len; -#if defined(__BIG_ENDIAN_BITFIELD) - __u8 nea : 1; - __u8 reserved1 : 4; - __u8 notification_class : 3; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - __u8 notification_class : 3; - __u8 reserved1 : 4; - __u8 nea : 1; -#endif - __u8 supp_event_class; -}; - -struct media_event_desc { -#if defined(__BIG_ENDIAN_BITFIELD) - __u8 reserved1 : 4; - __u8 media_event_code : 4; - __u8 reserved2 : 6; - __u8 media_present : 1; - __u8 door_open : 1; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - __u8 media_event_code : 4; - __u8 reserved1 : 4; - __u8 door_open : 1; - __u8 media_present : 1; - __u8 reserved2 : 6; -#endif - __u8 start_slot; - __u8 end_slot; -}; - -extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med); - -#endif /* End of kernel only stuff */ #endif /* _LINUX_CDROM_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/cm4000_cs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/cm4000_cs.h 2007-05-24 15:40:43.000000000 +0200 @@ -57,10 +57,4 @@ #define CM_BAD_CARD 0x20 -#ifdef __KERNEL__ - -#define DEVICE_NAME "cmm" -#define MODULE_NAME "cm4000_cs" - -#endif /* __KERNEL__ */ #endif /* _CM4000_H_ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/cn_proc.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/cn_proc.h 2007-05-24 15:40:43.000000000 +0200 @@ -97,25 +97,4 @@ } event_data; }; -#ifdef __KERNEL__ -#ifdef CONFIG_PROC_EVENTS -void proc_fork_connector(struct task_struct *task); -void proc_exec_connector(struct task_struct *task); -void proc_id_connector(struct task_struct *task, int which_id); -void proc_exit_connector(struct task_struct *task); -#else -static inline void proc_fork_connector(struct task_struct *task) -{} - -static inline void proc_exec_connector(struct task_struct *task) -{} - -static inline void proc_id_connector(struct task_struct *task, - int which_id) -{} - -static inline void proc_exit_connector(struct task_struct *task) -{} -#endif /* CONFIG_PROC_EVENTS */ -#endif /* __KERNEL__ */ #endif /* CN_PROC_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/coda.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/coda.h 2007-05-24 15:40:43.000000000 +0200 @@ -100,14 +100,10 @@ #if defined(__linux__) #include #define cdev_t u_quad_t -#ifndef __KERNEL__ #if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2) #define _UQUAD_T_ 1 typedef unsigned long long u_quad_t; #endif -#else /*__KERNEL__ */ -typedef unsigned long long u_quad_t; -#endif /* __KERNEL__ */ #else #define cdev_t dev_t #endif @@ -660,9 +656,6 @@ struct coda_out_hdr oh; int fd; -#ifdef __KERNEL__ - struct file *fh; /* not passed from userspace but used in-kernel only */ -#endif }; /* coda_open_by_path: */ @@ -758,14 +751,14 @@ #define PIOCPARM_MASK 0x0000ffff struct ViceIoctl { - void __user *in; /* Data to be transferred in */ - void __user *out; /* Data to be transferred out */ + void *in; /* Data to be transferred in */ + void *out; /* Data to be transferred out */ u_short in_size; /* Size of input buffer <= 2K */ u_short out_size; /* Maximum size of output buffer, <= 2K */ }; struct PioctlData { - const char __user *path; + const char *path; int follow; struct ViceIoctl vi; }; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/connector.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/connector.h 2007-05-24 15:40:43.000000000 +0200 @@ -91,88 +91,4 @@ __u8 data[0]; }; -#ifdef __KERNEL__ - -#include - -#include -#include - -#include - -#define CN_CBQ_NAMELEN 32 - -struct cn_queue_dev { - atomic_t refcnt; - unsigned char name[CN_CBQ_NAMELEN]; - - struct workqueue_struct *cn_queue; - - struct list_head queue_list; - spinlock_t queue_lock; - - int netlink_groups; - struct sock *nls; -}; - -struct cn_callback_id { - unsigned char name[CN_CBQ_NAMELEN]; - struct cb_id id; -}; - -struct cn_callback_data { - void (*destruct_data) (void *); - void *ddata; - - void *callback_priv; - void (*callback) (void *); - - void *free; -}; - -struct cn_callback_entry { - struct list_head callback_entry; - struct cn_callback *cb; - struct work_struct work; - struct cn_queue_dev *pdev; - - struct cn_callback_id id; - struct cn_callback_data data; - - int seq, group; - struct sock *nls; -}; - -struct cn_ctl_entry { - struct list_head notify_entry; - struct cn_ctl_msg *msg; -}; - -struct cn_dev { - struct cb_id id; - - u32 seq, groups; - struct sock *nls; - void (*input) (struct sock * sk, int len); - - struct cn_queue_dev *cbdev; -}; - -int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); -void cn_del_callback(struct cb_id *); -int cn_netlink_send(struct cn_msg *, u32, gfp_t); - -int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); -void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); - -struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); -void cn_queue_free_dev(struct cn_queue_dev *dev); - -int cn_cb_equal(struct cb_id *, struct cb_id *); - -void cn_queue_wrapper(void *data); - -extern int cn_already_initialized; - -#endif /* __KERNEL__ */ #endif /* __CONNECTOR_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/cuda.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/cuda.h 2007-05-24 15:40:43.000000000 +0200 @@ -26,11 +26,3 @@ #define CUDA_GET_DEVICE_LIST 0x1a #define CUDA_GET_SET_IIC 0x22 -#ifdef __KERNEL__ - -extern int find_via_cuda(void); -extern int cuda_request(struct adb_request *req, - void (*done)(struct adb_request *), int nbytes, ...); -extern void cuda_poll(void); - -#endif /* __KERNEL */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/cyclades.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/cyclades.h 2007-05-24 15:40:43.000000000 +0200 @@ -511,8 +511,8 @@ struct cyclades_card { unsigned long base_phys; unsigned long ctl_phys; - void __iomem *base_addr; - void __iomem *ctl_addr; + void *base_addr; + void *ctl_addr; int irq; int num_chips; /* 0 if card absent, -1 if Z/PCI, else Y */ int first_line; /* minor number of first channel on card */ @@ -520,11 +520,7 @@ int bus_index; /* address shift - 0 for ISA, 1 for PCI */ int intr_enabled; /* FW Interrupt flag - 0 disabled, 1 enabled */ struct pci_dev *pdev; -#ifdef __KERNEL__ - spinlock_t card_lock; -#else unsigned long filler; -#endif }; struct cyclades_chip { @@ -532,296 +528,4 @@ }; -#ifdef __KERNEL__ - -/*************************************** - * Memory access functions/macros * - * (required to support Alpha systems) * - ***************************************/ - -#define cy_writeb(port,val) {writeb((val),(port)); mb();} -#define cy_writew(port,val) {writew((val),(port)); mb();} -#define cy_writel(port,val) {writel((val),(port)); mb();} - -#define cy_readb(port) readb(port) -#define cy_readw(port) readw(port) -#define cy_readl(port) readl(port) - -/* - * Statistics counters - */ -struct cyclades_icount { - __u32 cts, dsr, rng, dcd, tx, rx; - __u32 frame, parity, overrun, brk; - __u32 buf_overrun; -}; - -/* - * This is our internal structure for each serial port's state. - * - * Many fields are paralleled by the structure used by the serial_struct - * structure. - * - * For definitions of the flags field, see tty.h - */ - -struct cyclades_port { - int magic; - int card; - int line; - int flags; /* defined in tty.h */ - int type; /* UART type */ - struct tty_struct *tty; - int read_status_mask; - int ignore_status_mask; - int timeout; - int xmit_fifo_size; - int cor1,cor2,cor3,cor4,cor5; - int tbpr,tco,rbpr,rco; - int baud; - int rflow; - int rtsdtr_inv; - int chip_rev; - int custom_divisor; - int x_char; /* to be pushed out ASAP */ - int close_delay; - unsigned short closing_wait; - unsigned long event; - unsigned long last_active; - int count; /* # of fd on device */ - int breakon; - int breakoff; - int blocked_open; /* # of blocked opens */ - unsigned char *xmit_buf; - int xmit_head; - int xmit_tail; - int xmit_cnt; - int default_threshold; - int default_timeout; - unsigned long jiffies[3]; - unsigned long rflush_count; - struct cyclades_monitor mon; - struct cyclades_idle_stats idle_stats; - struct cyclades_icount icount; - struct work_struct tqueue; - wait_queue_head_t open_wait; - wait_queue_head_t close_wait; - wait_queue_head_t shutdown_wait; - wait_queue_head_t delta_msr_wait; - int throttle; -}; - -/* - * Events are used to schedule things to happen at timer-interrupt - * time, instead of at cy interrupt time. - */ -#define Cy_EVENT_READ_PROCESS 0 -#define Cy_EVENT_WRITE_WAKEUP 1 -#define Cy_EVENT_HANGUP 2 -#define Cy_EVENT_BREAK 3 -#define Cy_EVENT_OPEN_WAKEUP 4 -#define Cy_EVENT_SHUTDOWN_WAKEUP 5 -#define Cy_EVENT_DELTA_WAKEUP 6 -#define Cy_EVENT_Z_RX_FULL 7 - -#define CLOSING_WAIT_DELAY 30*HZ -#define CY_CLOSING_WAIT_NONE 65535 -#define CY_CLOSING_WAIT_INF 0 - - -#define CyMAX_CHIPS_PER_CARD 8 -#define CyMAX_CHAR_FIFO 12 -#define CyPORTS_PER_CHIP 4 -#define CD1400_MAX_SPEED 115200 - -#define CyISA_Ywin 0x2000 - -#define CyPCI_Ywin 0x4000 -#define CyPCI_Yctl 0x80 -#define CyPCI_Zctl CTRL_WINDOW_SIZE -#define CyPCI_Zwin 0x80000 -#define CyPCI_Ze_win (2 * CyPCI_Zwin) - -#define PCI_DEVICE_ID_MASK 0x06 - -/**** CD1400 registers ****/ - -#define CD1400_REV_G 0x46 -#define CD1400_REV_J 0x48 - -#define CyRegSize 0x0400 -#define Cy_HwReset 0x1400 -#define Cy_ClrIntr 0x1800 -#define Cy_EpldRev 0x1e00 - -/* Global Registers */ - -#define CyGFRCR (0x40*2) -#define CyRevE (44) -#define CyCAR (0x68*2) -#define CyCHAN_0 (0x00) -#define CyCHAN_1 (0x01) -#define CyCHAN_2 (0x02) -#define CyCHAN_3 (0x03) -#define CyGCR (0x4B*2) -#define CyCH0_SERIAL (0x00) -#define CyCH0_PARALLEL (0x80) -#define CySVRR (0x67*2) -#define CySRModem (0x04) -#define CySRTransmit (0x02) -#define CySRReceive (0x01) -#define CyRICR (0x44*2) -#define CyTICR (0x45*2) -#define CyMICR (0x46*2) -#define CyICR0 (0x00) -#define CyICR1 (0x01) -#define CyICR2 (0x02) -#define CyICR3 (0x03) -#define CyRIR (0x6B*2) -#define CyTIR (0x6A*2) -#define CyMIR (0x69*2) -#define CyIRDirEq (0x80) -#define CyIRBusy (0x40) -#define CyIRUnfair (0x20) -#define CyIRContext (0x1C) -#define CyIRChannel (0x03) -#define CyPPR (0x7E*2) -#define CyCLOCK_20_1MS (0x27) -#define CyCLOCK_25_1MS (0x31) -#define CyCLOCK_25_5MS (0xf4) -#define CyCLOCK_60_1MS (0x75) -#define CyCLOCK_60_2MS (0xea) - -/* Virtual Registers */ - -#define CyRIVR (0x43*2) -#define CyTIVR (0x42*2) -#define CyMIVR (0x41*2) -#define CyIVRMask (0x07) -#define CyIVRRxEx (0x07) -#define CyIVRRxOK (0x03) -#define CyIVRTxOK (0x02) -#define CyIVRMdmOK (0x01) -#define CyTDR (0x63*2) -#define CyRDSR (0x62*2) -#define CyTIMEOUT (0x80) -#define CySPECHAR (0x70) -#define CyBREAK (0x08) -#define CyPARITY (0x04) -#define CyFRAME (0x02) -#define CyOVERRUN (0x01) -#define CyMISR (0x4C*2) -/* see CyMCOR_ and CyMSVR_ for bits*/ -#define CyEOSRR (0x60*2) - -/* Channel Registers */ - -#define CyLIVR (0x18*2) -#define CyMscsr (0x01) -#define CyTdsr (0x02) -#define CyRgdsr (0x03) -#define CyRedsr (0x07) -#define CyCCR (0x05*2) -/* Format 1 */ -#define CyCHAN_RESET (0x80) -#define CyCHIP_RESET (0x81) -#define CyFlushTransFIFO (0x82) -/* Format 2 */ -#define CyCOR_CHANGE (0x40) -#define CyCOR1ch (0x02) -#define CyCOR2ch (0x04) -#define CyCOR3ch (0x08) -/* Format 3 */ -#define CySEND_SPEC_1 (0x21) -#define CySEND_SPEC_2 (0x22) -#define CySEND_SPEC_3 (0x23) -#define CySEND_SPEC_4 (0x24) -/* Format 4 */ -#define CyCHAN_CTL (0x10) -#define CyDIS_RCVR (0x01) -#define CyENB_RCVR (0x02) -#define CyDIS_XMTR (0x04) -#define CyENB_XMTR (0x08) -#define CySRER (0x06*2) -#define CyMdmCh (0x80) -#define CyRxData (0x10) -#define CyTxRdy (0x04) -#define CyTxMpty (0x02) -#define CyNNDT (0x01) -#define CyCOR1 (0x08*2) -#define CyPARITY_NONE (0x00) -#define CyPARITY_0 (0x20) -#define CyPARITY_1 (0xA0) -#define CyPARITY_E (0x40) -#define CyPARITY_O (0xC0) -#define Cy_1_STOP (0x00) -#define Cy_1_5_STOP (0x04) -#define Cy_2_STOP (0x08) -#define Cy_5_BITS (0x00) -#define Cy_6_BITS (0x01) -#define Cy_7_BITS (0x02) -#define Cy_8_BITS (0x03) -#define CyCOR2 (0x09*2) -#define CyIXM (0x80) -#define CyTxIBE (0x40) -#define CyETC (0x20) -#define CyAUTO_TXFL (0x60) -#define CyLLM (0x10) -#define CyRLM (0x08) -#define CyRtsAO (0x04) -#define CyCtsAE (0x02) -#define CyDsrAE (0x01) -#define CyCOR3 (0x0A*2) -#define CySPL_CH_DRANGE (0x80) /* special character detect range */ -#define CySPL_CH_DET1 (0x40) /* enable special character detection - on SCHR4-SCHR3 */ -#define CyFL_CTRL_TRNSP (0x20) /* Flow Control Transparency */ -#define CySPL_CH_DET2 (0x10) /* Enable special character detection - on SCHR2-SCHR1 */ -#define CyREC_FIFO (0x0F) /* Receive FIFO threshold */ -#define CyCOR4 (0x1E*2) -#define CyCOR5 (0x1F*2) -#define CyCCSR (0x0B*2) -#define CyRxEN (0x80) -#define CyRxFloff (0x40) -#define CyRxFlon (0x20) -#define CyTxEN (0x08) -#define CyTxFloff (0x04) -#define CyTxFlon (0x02) -#define CyRDCR (0x0E*2) -#define CySCHR1 (0x1A*2) -#define CySCHR2 (0x1B*2) -#define CySCHR3 (0x1C*2) -#define CySCHR4 (0x1D*2) -#define CySCRL (0x22*2) -#define CySCRH (0x23*2) -#define CyLNC (0x24*2) -#define CyMCOR1 (0x15*2) -#define CyMCOR2 (0x16*2) -#define CyRTPR (0x21*2) -#define CyMSVR1 (0x6C*2) -#define CyMSVR2 (0x6D*2) -#define CyANY_DELTA (0xF0) -#define CyDSR (0x80) -#define CyCTS (0x40) -#define CyRI (0x20) -#define CyDCD (0x10) -#define CyDTR (0x02) -#define CyRTS (0x01) -#define CyPVSR (0x6F*2) -#define CyRBPR (0x78*2) -#define CyRCOR (0x7C*2) -#define CyTBPR (0x72*2) -#define CyTCOR (0x76*2) - -/* Custom Registers */ - -#define CyPLX_VER (0x3400) -#define PLX_9050 0x0b -#define PLX_9060 0x0c -#define PLX_9080 0x0d - -/***************************************************************************/ - -#endif /* __KERNEL__ */ #endif /* _LINUX_CYCLADES_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/dccp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/dccp.h 2007-05-24 15:40:43.000000000 +0200 @@ -116,7 +116,7 @@ #define DCCP_NR_PKT_TYPES DCCP_PKT_INVALID -static inline unsigned int dccp_packet_hdr_len(const __u8 type) +static __inline__ unsigned int dccp_packet_hdr_len(const __u8 type) { if (type == DCCP_PKT_DATA) return 0; @@ -191,7 +191,7 @@ /* this structure is argument to DCCP_SOCKOPT_CHANGE_X */ struct dccp_so_feat { __u8 dccpsf_feat; - __u8 __user *dccpsf_val; + __u8 *dccpsf_val; __u8 dccpsf_len; }; @@ -205,303 +205,5 @@ #define DCCP_SERVICE_LIST_MAX_LEN 32 -#ifdef __KERNEL__ - -#include -#include -#include -#include - -#include -#include -#include -#include - -enum dccp_state { - DCCP_OPEN = TCP_ESTABLISHED, - DCCP_REQUESTING = TCP_SYN_SENT, - DCCP_PARTOPEN = TCP_FIN_WAIT1, /* FIXME: - This mapping is horrible, but TCP has - no matching state for DCCP_PARTOPEN, - as TCP_SYN_RECV is already used by - DCCP_RESPOND, why don't stop using TCP - mapping of states? OK, now we don't use - sk_stream_sendmsg anymore, so doesn't - seem to exist any reason for us to - do the TCP mapping here */ - DCCP_LISTEN = TCP_LISTEN, - DCCP_RESPOND = TCP_SYN_RECV, - DCCP_CLOSING = TCP_CLOSING, - DCCP_TIME_WAIT = TCP_TIME_WAIT, - DCCP_CLOSED = TCP_CLOSE, - DCCP_MAX_STATES = TCP_MAX_STATES, -}; - -#define DCCP_STATE_MASK 0xf -#define DCCP_ACTION_FIN (1<<7) - -enum { - DCCPF_OPEN = TCPF_ESTABLISHED, - DCCPF_REQUESTING = TCPF_SYN_SENT, - DCCPF_PARTOPEN = TCPF_FIN_WAIT1, - DCCPF_LISTEN = TCPF_LISTEN, - DCCPF_RESPOND = TCPF_SYN_RECV, - DCCPF_CLOSING = TCPF_CLOSING, - DCCPF_TIME_WAIT = TCPF_TIME_WAIT, - DCCPF_CLOSED = TCPF_CLOSE, -}; - -static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb) -{ - return (struct dccp_hdr *)skb->h.raw; -} - -static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) -{ - return (struct dccp_hdr_ext *)(skb->h.raw + sizeof(struct dccp_hdr)); -} - -static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh) -{ - return sizeof(*dh) + (dh->dccph_x ? sizeof(struct dccp_hdr_ext) : 0); -} - -static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb) -{ - const struct dccp_hdr *dh = dccp_hdr(skb); - return __dccp_basic_hdr_len(dh); -} - -static inline __u64 dccp_hdr_seq(const struct sk_buff *skb) -{ - const struct dccp_hdr *dh = dccp_hdr(skb); - __u64 seq_nr = ntohs(dh->dccph_seq); - - if (dh->dccph_x != 0) - seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(skb)->dccph_seq_low); - else - seq_nr += (u32)dh->dccph_seq2 << 16; - - return seq_nr; -} - -static inline struct dccp_hdr_request *dccp_hdr_request(struct sk_buff *skb) -{ - return (struct dccp_hdr_request *)(skb->h.raw + dccp_basic_hdr_len(skb)); -} - -static inline struct dccp_hdr_ack_bits *dccp_hdr_ack_bits(const struct sk_buff *skb) -{ - return (struct dccp_hdr_ack_bits *)(skb->h.raw + dccp_basic_hdr_len(skb)); -} - -static inline u64 dccp_hdr_ack_seq(const struct sk_buff *skb) -{ - const struct dccp_hdr_ack_bits *dhack = dccp_hdr_ack_bits(skb); - return ((u64)ntohs(dhack->dccph_ack_nr_high) << 32) + ntohl(dhack->dccph_ack_nr_low); -} - -static inline struct dccp_hdr_response *dccp_hdr_response(struct sk_buff *skb) -{ - return (struct dccp_hdr_response *)(skb->h.raw + dccp_basic_hdr_len(skb)); -} - -static inline struct dccp_hdr_reset *dccp_hdr_reset(struct sk_buff *skb) -{ - return (struct dccp_hdr_reset *)(skb->h.raw + dccp_basic_hdr_len(skb)); -} - -static inline unsigned int __dccp_hdr_len(const struct dccp_hdr *dh) -{ - return __dccp_basic_hdr_len(dh) + - dccp_packet_hdr_len(dh->dccph_type); -} - -static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) -{ - return __dccp_hdr_len(dccp_hdr(skb)); -} - - -/* initial values for each feature */ -#define DCCPF_INITIAL_SEQUENCE_WINDOW 100 -#define DCCPF_INITIAL_ACK_RATIO 2 -#define DCCPF_INITIAL_CCID DCCPC_CCID2 -#define DCCPF_INITIAL_SEND_ACK_VECTOR 1 -/* FIXME: for now we're default to 1 but it should really be 0 */ -#define DCCPF_INITIAL_SEND_NDP_COUNT 1 - -#define DCCP_NDP_LIMIT 0xFFFFFF - -/** - * struct dccp_minisock - Minimal DCCP connection representation - * - * Will be used to pass the state from dccp_request_sock to dccp_sock. - * - * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2) - * @dccpms_ccid - Congestion Control Id (CCID) (section 10) - * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5) - * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2) - */ -struct dccp_minisock { - __u64 dccpms_sequence_window; - __u8 dccpms_rx_ccid; - __u8 dccpms_tx_ccid; - __u8 dccpms_send_ack_vector; - __u8 dccpms_send_ndp_count; - __u8 dccpms_ack_ratio; - struct list_head dccpms_pending; - struct list_head dccpms_conf; -}; - -struct dccp_opt_conf { - __u8 *dccpoc_val; - __u8 dccpoc_len; -}; - -struct dccp_opt_pend { - struct list_head dccpop_node; - __u8 dccpop_type; - __u8 dccpop_feat; - __u8 *dccpop_val; - __u8 dccpop_len; - int dccpop_conf; - struct dccp_opt_conf *dccpop_sc; -}; - -extern void __dccp_minisock_init(struct dccp_minisock *dmsk); -extern void dccp_minisock_init(struct dccp_minisock *dmsk); - -extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb); - -struct dccp_request_sock { - struct inet_request_sock dreq_inet_rsk; - __u64 dreq_iss; - __u64 dreq_isr; - __be32 dreq_service; -}; - -static inline struct dccp_request_sock *dccp_rsk(const struct request_sock *req) -{ - return (struct dccp_request_sock *)req; -} - -extern struct inet_timewait_death_row dccp_death_row; - -struct dccp_options_received { - u32 dccpor_ndp; /* only 24 bits */ - u32 dccpor_timestamp; - u32 dccpor_timestamp_echo; - u32 dccpor_elapsed_time; -}; - -struct ccid; - -enum dccp_role { - DCCP_ROLE_UNDEFINED, - DCCP_ROLE_LISTEN, - DCCP_ROLE_CLIENT, - DCCP_ROLE_SERVER, -}; - -struct dccp_service_list { - __u32 dccpsl_nr; - __be32 dccpsl_list[0]; -}; - -#define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1) -#define DCCP_SERVICE_CODE_IS_ABSENT 0 - -static inline int dccp_list_has_service(const struct dccp_service_list *sl, - const __be32 service) -{ - if (likely(sl != NULL)) { - u32 i = sl->dccpsl_nr; - while (i--) - if (sl->dccpsl_list[i] == service) - return 1; - } - return 0; -} - -struct dccp_ackvec; - -/** - * struct dccp_sock - DCCP socket state - * - * @dccps_swl - sequence number window low - * @dccps_swh - sequence number window high - * @dccps_awl - acknowledgement number window low - * @dccps_awh - acknowledgement number window high - * @dccps_iss - initial sequence number sent - * @dccps_isr - initial sequence number received - * @dccps_osr - first OPEN sequence number received - * @dccps_gss - greatest sequence number sent - * @dccps_gsr - greatest valid sequence number received - * @dccps_gar - greatest valid ack number received on a non-Sync; initialized to %dccps_iss - * @dccps_timestamp_time - time of latest TIMESTAMP option - * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option - * @dccps_packet_size - Set thru setsockopt - * @dccps_role - Role of this sock, one of %dccp_role - * @dccps_ndp_count - number of Non Data Packets since last data packet - * @dccps_hc_rx_ackvec - rx half connection ack vector - * @dccps_xmit_timer - timer for when CCID is not ready to send - */ -struct dccp_sock { - /* inet_connection_sock has to be the first member of dccp_sock */ - struct inet_connection_sock dccps_inet_connection; - __u64 dccps_swl; - __u64 dccps_swh; - __u64 dccps_awl; - __u64 dccps_awh; - __u64 dccps_iss; - __u64 dccps_isr; - __u64 dccps_osr; - __u64 dccps_gss; - __u64 dccps_gsr; - __u64 dccps_gar; - __be32 dccps_service; - struct dccp_service_list *dccps_service_list; - struct timeval dccps_timestamp_time; - __u32 dccps_timestamp_echo; - __u32 dccps_packet_size; - __u16 dccps_l_ack_ratio; - __u16 dccps_r_ack_ratio; - unsigned long dccps_ndp_count; - __u32 dccps_mss_cache; - struct dccp_minisock dccps_minisock; - struct dccp_ackvec *dccps_hc_rx_ackvec; - struct ccid *dccps_hc_rx_ccid; - struct ccid *dccps_hc_tx_ccid; - struct dccp_options_received dccps_options_received; - struct timeval dccps_epoch; - enum dccp_role dccps_role:2; - __u8 dccps_hc_rx_insert_options:1; - __u8 dccps_hc_tx_insert_options:1; - struct timer_list dccps_xmit_timer; -}; - -static inline struct dccp_sock *dccp_sk(const struct sock *sk) -{ - return (struct dccp_sock *)sk; -} - -static inline struct dccp_minisock *dccp_msk(const struct sock *sk) -{ - return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock; -} - -static inline const char *dccp_role(const struct sock *sk) -{ - switch (dccp_sk(sk)->dccps_role) { - case DCCP_ROLE_UNDEFINED: return "undefined"; - case DCCP_ROLE_LISTEN: return "listen"; - case DCCP_ROLE_SERVER: return "server"; - case DCCP_ROLE_CLIENT: return "client"; - } - return NULL; -} - -#endif /* __KERNEL__ */ #endif /* _LINUX_DCCP_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/dirent.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/dirent.h 2007-05-24 15:40:43.000000000 +0200 @@ -16,17 +16,6 @@ char d_name[256]; }; -#ifdef __KERNEL__ - -struct linux_dirent64 { - u64 d_ino; - s64 d_off; - unsigned short d_reclen; - unsigned char d_type; - char d_name[0]; -}; - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/divert.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/divert.h 2007-05-24 15:40:43.000000000 +0200 @@ -46,7 +46,7 @@ __u32 uint32; __s64 int64; __u64 uint64; - void __user *ptr; + void *ptr; } divert_cf_arg; @@ -103,30 +103,4 @@ #define DIVARG1_REMOVE 3 /* REMOVE something */ -#ifdef __KERNEL__ - -/* diverter functions */ -#include - -#ifdef CONFIG_NET_DIVERT -#include - -int alloc_divert_blk(struct net_device *); -void free_divert_blk(struct net_device *); -int divert_ioctl(unsigned int cmd, struct divert_cf __user *arg); -void divert_frame(struct sk_buff *skb); -static inline void handle_diverter(struct sk_buff *skb) -{ - /* if diversion is supported on device, then divert */ - if (skb->dev->divert && skb->dev->divert->divert) - divert_frame(skb); -} - -#else -# define alloc_divert_blk(dev) (0) -# define free_divert_blk(dev) do {} while (0) -# define divert_ioctl(cmd, arg) (-ENOPKG) -# define handle_diverter(skb) do {} while (0) -#endif -#endif #endif /* _LINUX_DIVERT_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/dlm.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/dlm.h 2007-05-24 15:40:43.000000000 +0200 @@ -200,103 +200,6 @@ }; -#ifdef __KERNEL__ - -#define DLM_LSFL_NODIR 0x00000001 - -/* - * dlm_new_lockspace - * - * Starts a lockspace with the given name. If the named lockspace exists in - * the cluster, the calling node joins it. - */ - -int dlm_new_lockspace(char *name, int namelen, dlm_lockspace_t **lockspace, - uint32_t flags, int lvblen); - -/* - * dlm_release_lockspace - * - * Stop a lockspace. - */ - -int dlm_release_lockspace(dlm_lockspace_t *lockspace, int force); - -/* - * dlm_lock - * - * Make an asyncronous request to acquire or convert a lock on a named - * resource. - * - * lockspace: context for the request - * mode: the requested mode of the lock (DLM_LOCK_) - * lksb: lock status block for input and async return values - * flags: input flags (DLM_LKF_) - * name: name of the resource to lock, can be binary - * namelen: the length in bytes of the resource name (MAX_RESNAME_LEN) - * parent: the lock ID of a parent lock or 0 if none - * lockast: function DLM executes when it completes processing the request - * astarg: argument passed to lockast and bast functions - * bast: function DLM executes when this lock later blocks another request - * - * Returns: - * 0 if request is successfully queued for processing - * -EINVAL if any input parameters are invalid - * -EAGAIN if request would block and is flagged DLM_LKF_NOQUEUE - * -ENOMEM if there is no memory to process request - * -ENOTCONN if there is a communication error - * - * If the call to dlm_lock returns an error then the operation has failed and - * the AST routine will not be called. If dlm_lock returns 0 it is still - * possible that the lock operation will fail. The AST routine will be called - * when the locking is complete and the status is returned in the lksb. - * - * If the AST routines or parameter are passed to a conversion operation then - * they will overwrite those values that were passed to a previous dlm_lock - * call. - * - * AST routines should not block (at least not for long), but may make - * any locking calls they please. - */ - -int dlm_lock(dlm_lockspace_t *lockspace, - int mode, - struct dlm_lksb *lksb, - uint32_t flags, - void *name, - unsigned int namelen, - uint32_t parent_lkid, - void (*lockast) (void *astarg), - void *astarg, - void (*bast) (void *astarg, int mode)); - -/* - * dlm_unlock - * - * Asynchronously release a lock on a resource. The AST routine is called - * when the resource is successfully unlocked. - * - * lockspace: context for the request - * lkid: the lock ID as returned in the lksb - * flags: input flags (DLM_LKF_) - * lksb: if NULL the lksb parameter passed to last lock request is used - * astarg: the arg used with the completion ast for the unlock - * - * Returns: - * 0 if request is successfully queued for processing - * -EINVAL if any input parameters are invalid - * -ENOTEMPTY if the lock still has sublocks - * -EBUSY if the lock is waiting for a remote lock operation - * -ENOTCONN if there is a communication error - */ - -int dlm_unlock(dlm_lockspace_t *lockspace, - uint32_t lkid, - uint32_t flags, - struct dlm_lksb *lksb, - void *astarg); - -#endif /* __KERNEL__ */ #endif /* __DLM_DOT_H__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/elfcore.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/elfcore.h 2007-05-24 15:40:43.000000000 +0200 @@ -16,13 +16,11 @@ #include -#ifndef __KERNEL__ typedef elf_greg_t greg_t; typedef elf_gregset_t gregset_t; typedef elf_fpregset_t fpregset_t; typedef elf_fpxregset_t fpxregset_t; #define NGREG ELF_NGREG -#endif /* * Definitions to generate Intel SVR4-like core files. @@ -90,51 +88,10 @@ char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ }; -#ifndef __KERNEL__ typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; #define PRARGSZ ELF_PRARGSZ -#endif - -#ifdef __KERNEL__ -static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *regs) -{ -#ifdef ELF_CORE_COPY_REGS - ELF_CORE_COPY_REGS((*elfregs), regs) -#else - BUG_ON(sizeof(*elfregs) != sizeof(*regs)); - *(struct pt_regs *)elfregs = *regs; -#endif -} - -static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) -{ -#ifdef ELF_CORE_COPY_TASK_REGS - - return ELF_CORE_COPY_TASK_REGS(t, elfregs); -#endif - return 0; -} - -extern int dump_fpu (struct pt_regs *, elf_fpregset_t *); - -static inline int elf_core_copy_task_fpregs(struct task_struct *t, struct pt_regs *regs, elf_fpregset_t *fpu) -{ -#ifdef ELF_CORE_COPY_FPREGS - return ELF_CORE_COPY_FPREGS(t, fpu); -#else - return dump_fpu(regs, fpu); -#endif -} - -#ifdef ELF_CORE_COPY_XFPREGS -static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) -{ - return ELF_CORE_COPY_XFPREGS(t, xfpu); -} -#endif -#endif /* __KERNEL__ */ #endif /* _LINUX_ELFCORE_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/errno.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/errno.h 2007-05-24 15:40:43.000000000 +0200 @@ -3,27 +3,5 @@ #include -#ifdef __KERNEL__ - -/* Should never be seen by user programs */ -#define ERESTARTSYS 512 -#define ERESTARTNOINTR 513 -#define ERESTARTNOHAND 514 /* restart if no handler.. */ -#define ENOIOCTLCMD 515 /* No ioctl command */ -#define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ - -/* Defined for the NFSv3 protocol */ -#define EBADHANDLE 521 /* Illegal NFS file handle */ -#define ENOTSYNC 522 /* Update synchronization mismatch */ -#define EBADCOOKIE 523 /* Cookie is stale */ -#define ENOTSUPP 524 /* Operation is not supported */ -#define ETOOSMALL 525 /* Buffer or request is too small */ -#define ESERVERFAULT 526 /* An untranslatable error occurred */ -#define EBADTYPE 527 /* Type not supported by server */ -#define EJUKEBOX 528 /* Request initiated, but will not complete before timeout */ -#define EIOCBQUEUED 529 /* iocb queued, will get completion event */ -#define EIOCBRETRY 530 /* iocb queued, will trigger a retry */ - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/errqueue.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/errqueue.h 2007-05-24 15:40:43.000000000 +0200 @@ -19,28 +19,5 @@ #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) -#ifdef __KERNEL__ - -#include -#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) -#include -#endif - -#define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb)) - -struct sock_exterr_skb -{ - union { - struct inet_skb_parm h4; -#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) - struct inet6_skb_parm h6; -#endif - } header; - struct sock_extended_err ee; - u16 addr_offset; - __be16 port; -}; - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ethtool.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ethtool.h 2007-05-24 15:40:43.000000000 +0200 @@ -256,124 +256,6 @@ __u8 data[0]; }; -#ifdef __KERNEL__ - -struct net_device; - -/* Some generic methods drivers may use in their ethtool_ops */ -u32 ethtool_op_get_link(struct net_device *dev); -u32 ethtool_op_get_tx_csum(struct net_device *dev); -int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); -int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); -u32 ethtool_op_get_sg(struct net_device *dev); -int ethtool_op_set_sg(struct net_device *dev, u32 data); -u32 ethtool_op_get_tso(struct net_device *dev); -int ethtool_op_set_tso(struct net_device *dev, u32 data); -int ethtool_op_get_perm_addr(struct net_device *dev, - struct ethtool_perm_addr *addr, u8 *data); -u32 ethtool_op_get_ufo(struct net_device *dev); -int ethtool_op_set_ufo(struct net_device *dev, u32 data); - -/** - * ðtool_ops - Alter and report network device settings - * get_settings: Get device-specific settings - * set_settings: Set device-specific settings - * get_drvinfo: Report driver information - * get_regs: Get device registers - * get_wol: Report whether Wake-on-Lan is enabled - * set_wol: Turn Wake-on-Lan on or off - * get_msglevel: Report driver message level - * set_msglevel: Set driver message level - * nway_reset: Restart autonegotiation - * get_link: Get link status - * get_eeprom: Read data from the device EEPROM - * set_eeprom: Write data to the device EEPROM - * get_coalesce: Get interrupt coalescing parameters - * set_coalesce: Set interrupt coalescing parameters - * get_ringparam: Report ring sizes - * set_ringparam: Set ring sizes - * get_pauseparam: Report pause parameters - * set_pauseparam: Set pause paramters - * get_rx_csum: Report whether receive checksums are turned on or off - * set_rx_csum: Turn receive checksum on or off - * get_tx_csum: Report whether transmit checksums are turned on or off - * set_tx_csum: Turn transmit checksums on or off - * get_sg: Report whether scatter-gather is enabled - * set_sg: Turn scatter-gather on or off - * get_tso: Report whether TCP segmentation offload is enabled - * set_tso: Turn TCP segmentation offload on or off - * get_ufo: Report whether UDP fragmentation offload is enabled - * set_ufo: Turn UDP fragmentation offload on or off - * self_test: Run specified self-tests - * get_strings: Return a set of strings that describe the requested objects - * phys_id: Identify the device - * get_stats: Return statistics about the device - * get_perm_addr: Gets the permanent hardware address - * - * Description: - * - * get_settings: - * @get_settings is passed an ðtool_cmd to fill in. It returns - * an negative errno or zero. - * - * set_settings: - * @set_settings is passed an ðtool_cmd and should attempt to set - * all the settings this device supports. It may return an error value - * if something goes wrong (otherwise 0). - * - * get_eeprom: - * Should fill in the magic field. Don't need to check len for zero - * or wraparound. Fill in the data argument with the eeprom values - * from offset to offset + len. Update len to the amount read. - * Returns an error or zero. - * - * set_eeprom: - * Should validate the magic field. Don't need to check len for zero - * or wraparound. Update len to the amount written. Returns an error - * or zero. - */ -struct ethtool_ops { - int (*get_settings)(struct net_device *, struct ethtool_cmd *); - int (*set_settings)(struct net_device *, struct ethtool_cmd *); - void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *); - int (*get_regs_len)(struct net_device *); - void (*get_regs)(struct net_device *, struct ethtool_regs *, void *); - void (*get_wol)(struct net_device *, struct ethtool_wolinfo *); - int (*set_wol)(struct net_device *, struct ethtool_wolinfo *); - u32 (*get_msglevel)(struct net_device *); - void (*set_msglevel)(struct net_device *, u32); - int (*nway_reset)(struct net_device *); - u32 (*get_link)(struct net_device *); - int (*get_eeprom_len)(struct net_device *); - int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); - int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); - int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); - int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); - void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *); - int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *); - void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*); - int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*); - u32 (*get_rx_csum)(struct net_device *); - int (*set_rx_csum)(struct net_device *, u32); - u32 (*get_tx_csum)(struct net_device *); - int (*set_tx_csum)(struct net_device *, u32); - u32 (*get_sg)(struct net_device *); - int (*set_sg)(struct net_device *, u32); - u32 (*get_tso)(struct net_device *); - int (*set_tso)(struct net_device *, u32); - int (*self_test_count)(struct net_device *); - void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); - void (*get_strings)(struct net_device *, u32 stringset, u8 *); - int (*phys_id)(struct net_device *, u32); - int (*get_stats_count)(struct net_device *); - void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); - int (*get_perm_addr)(struct net_device *, struct ethtool_perm_addr *, u8 *); - int (*begin)(struct net_device *); - void (*complete)(struct net_device *); - u32 (*get_ufo)(struct net_device *); - int (*set_ufo)(struct net_device *, u32); -}; -#endif /* __KERNEL__ */ /* CMDs currently supported */ #define ETHTOOL_GSET 0x00000001 /* Get settings. */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/eventpoll.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/eventpoll.h 2007-05-24 15:40:43.000000000 +0200 @@ -43,61 +43,6 @@ __u64 data; } EPOLL_PACKED; -#ifdef __KERNEL__ - -/* Forward declarations to avoid compiler errors */ -struct file; - - -#ifdef CONFIG_EPOLL - -/* Used to initialize the epoll bits inside the "struct file" */ -static inline void eventpoll_init_file(struct file *file) -{ - INIT_LIST_HEAD(&file->f_ep_links); - spin_lock_init(&file->f_ep_lock); -} - - -/* Used to release the epoll bits inside the "struct file" */ -void eventpoll_release_file(struct file *file); - -/* - * This is called from inside fs/file_table.c:__fput() to unlink files - * from the eventpoll interface. We need to have this facility to cleanup - * correctly files that are closed without being removed from the eventpoll - * interface. - */ -static inline void eventpoll_release(struct file *file) -{ - - /* - * Fast check to avoid the get/release of the semaphore. Since - * we're doing this outside the semaphore lock, it might return - * false negatives, but we don't care. It'll help in 99.99% of cases - * to avoid the semaphore lock. False positives simply cannot happen - * because the file in on the way to be removed and nobody ( but - * eventpoll ) has still a reference to this file. - */ - if (likely(list_empty(&file->f_ep_links))) - return; - - /* - * The file is being closed while it is still linked to an epoll - * descriptor. We need to handle this by correctly unlinking it - * from its containers. - */ - eventpoll_release_file(file); -} - -#else - -static inline void eventpoll_init_file(struct file *file) {} -static inline void eventpoll_release(struct file *file) {} - -#endif - -#endif /* #ifdef __KERNEL__ */ #endif /* #ifndef _LINUX_EVENTPOLL_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ext2_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ext2_fs.h 2007-05-24 15:40:43.000000000 +0200 @@ -64,18 +64,10 @@ /* First non-reserved inode for old ext2 filesystems */ #define EXT2_GOOD_OLD_FIRST_INO 11 -#ifdef __KERNEL__ -#include -static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb) -{ - return sb->s_fs_info; -} -#else /* Assume that user mode programs are passing in an ext2fs superblock, not * a kernel struct super_block. This will allow us to call the feature-test * macros from user land. */ #define EXT2_SB(sb) (sb) -#endif /* * Maximal count of links to a file @@ -88,29 +80,15 @@ #define EXT2_MIN_BLOCK_SIZE 1024 #define EXT2_MAX_BLOCK_SIZE 4096 #define EXT2_MIN_BLOCK_LOG_SIZE 10 -#ifdef __KERNEL__ -# define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize) -#else # define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size) -#endif #define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32)) -#ifdef __KERNEL__ -# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits) -#else # define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10) -#endif -#ifdef __KERNEL__ -#define EXT2_ADDR_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_addr_per_block_bits) -#define EXT2_INODE_SIZE(s) (EXT2_SB(s)->s_inode_size) -#define EXT2_FIRST_INO(s) (EXT2_SB(s)->s_first_ino) -#else #define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \ EXT2_GOOD_OLD_INODE_SIZE : \ (s)->s_inode_size) #define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \ EXT2_GOOD_OLD_FIRST_INO : \ (s)->s_first_ino) -#endif /* * Macro-instructions used to manage fragments @@ -118,13 +96,8 @@ #define EXT2_MIN_FRAG_SIZE 1024 #define EXT2_MAX_FRAG_SIZE 4096 #define EXT2_MIN_FRAG_LOG_SIZE 10 -#ifdef __KERNEL__ -# define EXT2_FRAG_SIZE(s) (EXT2_SB(s)->s_frag_size) -# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_SB(s)->s_frags_per_block) -#else # define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size) # define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s)) -#endif /* * Structure of a blocks group descriptor @@ -144,16 +117,9 @@ /* * Macro-instructions used to manage group descriptors */ -#ifdef __KERNEL__ -# define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group) -# define EXT2_DESC_PER_BLOCK(s) (EXT2_SB(s)->s_desc_per_block) -# define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group) -# define EXT2_DESC_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_desc_per_block_bits) -#else # define EXT2_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group) # define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc)) # define EXT2_INODES_PER_GROUP(s) ((s)->s_inodes_per_group) -#endif /* * Constants relative to the data blocks --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ext3_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ext3_fs.h 2007-05-24 15:40:43.000000000 +0200 @@ -78,29 +78,15 @@ #define EXT3_MIN_BLOCK_SIZE 1024 #define EXT3_MAX_BLOCK_SIZE 4096 #define EXT3_MIN_BLOCK_LOG_SIZE 10 -#ifdef __KERNEL__ -# define EXT3_BLOCK_SIZE(s) ((s)->s_blocksize) -#else # define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size) -#endif #define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32)) -#ifdef __KERNEL__ -# define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits) -#else # define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10) -#endif -#ifdef __KERNEL__ -#define EXT3_ADDR_PER_BLOCK_BITS(s) (EXT3_SB(s)->s_addr_per_block_bits) -#define EXT3_INODE_SIZE(s) (EXT3_SB(s)->s_inode_size) -#define EXT3_FIRST_INO(s) (EXT3_SB(s)->s_first_ino) -#else #define EXT3_INODE_SIZE(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \ EXT3_GOOD_OLD_INODE_SIZE : \ (s)->s_inode_size) #define EXT3_FIRST_INO(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \ EXT3_GOOD_OLD_FIRST_INO : \ (s)->s_first_ino) -#endif /* * Macro-instructions used to manage fragments @@ -108,13 +94,8 @@ #define EXT3_MIN_FRAG_SIZE 1024 #define EXT3_MAX_FRAG_SIZE 4096 #define EXT3_MIN_FRAG_LOG_SIZE 10 -#ifdef __KERNEL__ -# define EXT3_FRAG_SIZE(s) (EXT3_SB(s)->s_frag_size) -# define EXT3_FRAGS_PER_BLOCK(s) (EXT3_SB(s)->s_frags_per_block) -#else # define EXT3_FRAG_SIZE(s) (EXT3_MIN_FRAG_SIZE << (s)->s_log_frag_size) # define EXT3_FRAGS_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / EXT3_FRAG_SIZE(s)) -#endif /* * Structure of a blocks group descriptor @@ -134,16 +115,9 @@ /* * Macro-instructions used to manage group descriptors */ -#ifdef __KERNEL__ -# define EXT3_BLOCKS_PER_GROUP(s) (EXT3_SB(s)->s_blocks_per_group) -# define EXT3_DESC_PER_BLOCK(s) (EXT3_SB(s)->s_desc_per_block) -# define EXT3_INODES_PER_GROUP(s) (EXT3_SB(s)->s_inodes_per_group) -# define EXT3_DESC_PER_BLOCK_BITS(s) (EXT3_SB(s)->s_desc_per_block_bits) -#else # define EXT3_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group) # define EXT3_DESC_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_group_desc)) # define EXT3_INODES_PER_GROUP(s) ((s)->s_inodes_per_group) -#endif /* * Constants relative to the data blocks @@ -494,32 +468,10 @@ __u32 s_reserved[190]; /* Padding to the end of the block */ }; -#ifdef __KERNEL__ -#include -#include -static inline struct ext3_sb_info * EXT3_SB(struct super_block *sb) -{ - return sb->s_fs_info; -} -static inline struct ext3_inode_info *EXT3_I(struct inode *inode) -{ - return container_of(inode, struct ext3_inode_info, vfs_inode); -} - -static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino) -{ - return ino == EXT3_ROOT_INO || - ino == EXT3_JOURNAL_INO || - ino == EXT3_RESIZE_INO || - (ino >= EXT3_FIRST_INO(sb) && - ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)); -} -#else /* Assume that user mode programs are passing in an ext3fs superblock, not * a kernel struct super_block. This will allow us to call the feature-test * macros from user land. */ #define EXT3_SB(sb) (sb) -#endif #define NEXT_ORPHAN(inode) EXT3_I(inode)->i_dtime @@ -683,203 +635,5 @@ #define DX_HASH_HALF_MD4 1 #define DX_HASH_TEA 2 -#ifdef __KERNEL__ - -/* hash info structure used by the directory hash */ -struct dx_hash_info -{ - u32 hash; - u32 minor_hash; - int hash_version; - u32 *seed; -}; - -#define EXT3_HTREE_EOF 0x7fffffff - -/* - * Control parameters used by ext3_htree_next_block - */ -#define HASH_NB_ALWAYS 1 - - -/* - * Describe an inode's exact location on disk and in memory - */ -struct ext3_iloc -{ - struct buffer_head *bh; - unsigned long offset; - unsigned long block_group; -}; - -static inline struct ext3_inode *ext3_raw_inode(struct ext3_iloc *iloc) -{ - return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset); -} - -/* - * This structure is stuffed into the struct file's private_data field - * for directories. It is where we put information so that we can do - * readdir operations in hash tree order. - */ -struct dir_private_info { - struct rb_root root; - struct rb_node *curr_node; - struct fname *extra_fname; - loff_t last_pos; - __u32 curr_hash; - __u32 curr_minor_hash; - __u32 next_hash; -}; - -/* calculate the first block number of the group */ -static inline ext3_fsblk_t -ext3_group_first_block_no(struct super_block *sb, unsigned long group_no) -{ - return group_no * (ext3_fsblk_t)EXT3_BLOCKS_PER_GROUP(sb) + - le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block); -} - -/* - * Special error return code only used by dx_probe() and its callers. - */ -#define ERR_BAD_DX_DIR -75000 - -/* - * Function prototypes - */ - -/* - * Ok, these declarations are also in but none of the - * ext3 source programs needs to include it so they are duplicated here. - */ -# define NORET_TYPE /**/ -# define ATTRIB_NORET __attribute__((noreturn)) -# define NORET_AND noreturn, - -/* balloc.c */ -extern int ext3_bg_has_super(struct super_block *sb, int group); -extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group); -extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, int *errp); -extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, unsigned long *count, int *errp); -extern void ext3_free_blocks (handle_t *handle, struct inode *inode, - ext3_fsblk_t block, unsigned long count); -extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb, - ext3_fsblk_t block, unsigned long count, - unsigned long *pdquot_freed_blocks); -extern ext3_fsblk_t ext3_count_free_blocks (struct super_block *); -extern void ext3_check_blocks_bitmap (struct super_block *); -extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb, - unsigned int block_group, - struct buffer_head ** bh); -extern int ext3_should_retry_alloc(struct super_block *sb, int *retries); -extern void ext3_init_block_alloc_info(struct inode *); -extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv); - -/* dir.c */ -extern int ext3_check_dir_entry(const char *, struct inode *, - struct ext3_dir_entry_2 *, - struct buffer_head *, unsigned long); -extern int ext3_htree_store_dirent(struct file *dir_file, __u32 hash, - __u32 minor_hash, - struct ext3_dir_entry_2 *dirent); -extern void ext3_htree_free_dir_info(struct dir_private_info *p); - -/* fsync.c */ -extern int ext3_sync_file (struct file *, struct dentry *, int); - -/* hash.c */ -extern int ext3fs_dirhash(const char *name, int len, struct - dx_hash_info *hinfo); - -/* ialloc.c */ -extern struct inode * ext3_new_inode (handle_t *, struct inode *, int); -extern void ext3_free_inode (handle_t *, struct inode *); -extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); -extern unsigned long ext3_count_free_inodes (struct super_block *); -extern unsigned long ext3_count_dirs (struct super_block *); -extern void ext3_check_inodes_bitmap (struct super_block *); -extern unsigned long ext3_count_free (struct buffer_head *, unsigned); - - -/* inode.c */ -int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, - struct buffer_head *bh, ext3_fsblk_t blocknr); -struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); -struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); -int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, - sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result, - int create, int extend_disksize); - -extern void ext3_read_inode (struct inode *); -extern int ext3_write_inode (struct inode *, int); -extern int ext3_setattr (struct dentry *, struct iattr *); -extern void ext3_delete_inode (struct inode *); -extern int ext3_sync_inode (handle_t *, struct inode *); -extern void ext3_discard_reservation (struct inode *); -extern void ext3_dirty_inode(struct inode *); -extern int ext3_change_inode_journal_flag(struct inode *, int); -extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); -extern void ext3_truncate (struct inode *); -extern void ext3_set_inode_flags(struct inode *); -extern void ext3_set_aops(struct inode *inode); - -/* ioctl.c */ -extern int ext3_ioctl (struct inode *, struct file *, unsigned int, - unsigned long); -extern long ext3_compat_ioctl (struct file *, unsigned int, unsigned long); - -/* namei.c */ -extern int ext3_orphan_add(handle_t *, struct inode *); -extern int ext3_orphan_del(handle_t *, struct inode *); -extern int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash, - __u32 start_minor_hash, __u32 *next_hash); - -/* resize.c */ -extern int ext3_group_add(struct super_block *sb, - struct ext3_new_group_data *input); -extern int ext3_group_extend(struct super_block *sb, - struct ext3_super_block *es, - ext3_fsblk_t n_blocks_count); - -/* super.c */ -extern void ext3_error (struct super_block *, const char *, const char *, ...) - __attribute__ ((format (printf, 3, 4))); -extern void __ext3_std_error (struct super_block *, const char *, int); -extern void ext3_abort (struct super_block *, const char *, const char *, ...) - __attribute__ ((format (printf, 3, 4))); -extern void ext3_warning (struct super_block *, const char *, const char *, ...) - __attribute__ ((format (printf, 3, 4))); -extern void ext3_update_dynamic_rev (struct super_block *sb); - -#define ext3_std_error(sb, errno) \ -do { \ - if ((errno)) \ - __ext3_std_error((sb), __FUNCTION__, (errno)); \ -} while (0) - -/* - * Inodes and files operations - */ - -/* dir.c */ -extern const struct file_operations ext3_dir_operations; - -/* file.c */ -extern struct inode_operations ext3_file_inode_operations; -extern const struct file_operations ext3_file_operations; - -/* namei.c */ -extern struct inode_operations ext3_dir_inode_operations; -extern struct inode_operations ext3_special_inode_operations; - -/* symlink.c */ -extern struct inode_operations ext3_symlink_inode_operations; -extern struct inode_operations ext3_fast_symlink_inode_operations; - - -#endif /* __KERNEL__ */ #endif /* _LINUX_EXT3_FS_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/fb.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/fb.h 2007-05-24 15:40:43.000000000 +0200 @@ -17,11 +17,7 @@ #define FBIOGETCMAP 0x4604 #define FBIOPUTCMAP 0x4605 #define FBIOPAN_DISPLAY 0x4606 -#ifdef __KERNEL__ -#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor_user) -#else #define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor) -#endif /* 0x4607-0x460B are defined below */ /* #define FBIOGET_MONITORSPEC 0x460C */ /* #define FBIOPUT_MONITORSPEC 0x460D */ @@ -374,641 +370,5 @@ #define FB_BACKLIGHT_MAX 0xFF #endif -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include -#include -#include - -struct vm_area_struct; -struct fb_info; -struct device; -struct file; - -/* Definitions below are used in the parsed monitor specs */ -#define FB_DPMS_ACTIVE_OFF 1 -#define FB_DPMS_SUSPEND 2 -#define FB_DPMS_STANDBY 4 - -#define FB_DISP_DDI 1 -#define FB_DISP_ANA_700_300 2 -#define FB_DISP_ANA_714_286 4 -#define FB_DISP_ANA_1000_400 8 -#define FB_DISP_ANA_700_000 16 - -#define FB_DISP_MONO 32 -#define FB_DISP_RGB 64 -#define FB_DISP_MULTI 128 -#define FB_DISP_UNKNOWN 256 - -#define FB_SIGNAL_NONE 0 -#define FB_SIGNAL_BLANK_BLANK 1 -#define FB_SIGNAL_SEPARATE 2 -#define FB_SIGNAL_COMPOSITE 4 -#define FB_SIGNAL_SYNC_ON_GREEN 8 -#define FB_SIGNAL_SERRATION_ON 16 - -#define FB_MISC_PRIM_COLOR 1 -#define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */ -struct fb_chroma { - __u32 redx; /* in fraction of 1024 */ - __u32 greenx; - __u32 bluex; - __u32 whitex; - __u32 redy; - __u32 greeny; - __u32 bluey; - __u32 whitey; -}; - -struct fb_monspecs { - struct fb_chroma chroma; - struct fb_videomode *modedb; /* mode database */ - __u8 manufacturer[4]; /* Manufacturer */ - __u8 monitor[14]; /* Monitor String */ - __u8 serial_no[14]; /* Serial Number */ - __u8 ascii[14]; /* ? */ - __u32 modedb_len; /* mode database length */ - __u32 model; /* Monitor Model */ - __u32 serial; /* Serial Number - Integer */ - __u32 year; /* Year manufactured */ - __u32 week; /* Week Manufactured */ - __u32 hfmin; /* hfreq lower limit (Hz) */ - __u32 hfmax; /* hfreq upper limit (Hz) */ - __u32 dclkmin; /* pixelclock lower limit (Hz) */ - __u32 dclkmax; /* pixelclock upper limit (Hz) */ - __u16 input; /* display type - see FB_DISP_* */ - __u16 dpms; /* DPMS support - see FB_DPMS_ */ - __u16 signal; /* Signal Type - see FB_SIGNAL_* */ - __u16 vfmin; /* vfreq lower limit (Hz) */ - __u16 vfmax; /* vfreq upper limit (Hz) */ - __u16 gamma; /* Gamma - in fractions of 100 */ - __u16 gtf : 1; /* supports GTF */ - __u16 misc; /* Misc flags - see FB_MISC_* */ - __u8 version; /* EDID version... */ - __u8 revision; /* ...and revision */ - __u8 max_x; /* Maximum horizontal size (cm) */ - __u8 max_y; /* Maximum vertical size (cm) */ -}; - -struct fb_cmap_user { - __u32 start; /* First entry */ - __u32 len; /* Number of entries */ - __u16 __user *red; /* Red values */ - __u16 __user *green; - __u16 __user *blue; - __u16 __user *transp; /* transparency, can be NULL */ -}; - -struct fb_image_user { - __u32 dx; /* Where to place image */ - __u32 dy; - __u32 width; /* Size of image */ - __u32 height; - __u32 fg_color; /* Only used when a mono bitmap */ - __u32 bg_color; - __u8 depth; /* Depth of the image */ - const char __user *data; /* Pointer to image data */ - struct fb_cmap_user cmap; /* color map info */ -}; - -struct fb_cursor_user { - __u16 set; /* what to set */ - __u16 enable; /* cursor on/off */ - __u16 rop; /* bitop operation */ - const char __user *mask; /* cursor mask bits */ - struct fbcurpos hot; /* cursor hot spot */ - struct fb_image_user image; /* Cursor image */ -}; - -/* - * Register/unregister for framebuffer events - */ - -/* The resolution of the passed in fb_info about to change */ -#define FB_EVENT_MODE_CHANGE 0x01 -/* The display on this fb_info is beeing suspended, no access to the - * framebuffer is allowed any more after that call returns - */ -#define FB_EVENT_SUSPEND 0x02 -/* The display on this fb_info was resumed, you can restore the display - * if you own it - */ -#define FB_EVENT_RESUME 0x03 -/* An entry from the modelist was removed */ -#define FB_EVENT_MODE_DELETE 0x04 -/* A driver registered itself */ -#define FB_EVENT_FB_REGISTERED 0x05 -/* A driver unregistered itself */ -#define FB_EVENT_FB_UNREGISTERED 0x06 -/* CONSOLE-SPECIFIC: get console to framebuffer mapping */ -#define FB_EVENT_GET_CONSOLE_MAP 0x07 -/* CONSOLE-SPECIFIC: set console to framebuffer mapping */ -#define FB_EVENT_SET_CONSOLE_MAP 0x08 -/* A display blank is requested */ -#define FB_EVENT_BLANK 0x09 -/* Private modelist is to be replaced */ -#define FB_EVENT_NEW_MODELIST 0x0A -/* The resolution of the passed in fb_info about to change and - all vc's should be changed */ -#define FB_EVENT_MODE_CHANGE_ALL 0x0B - -struct fb_event { - struct fb_info *info; - void *data; -}; - - -extern int fb_register_client(struct notifier_block *nb); -extern int fb_unregister_client(struct notifier_block *nb); -extern int fb_notifier_call_chain(unsigned long val, void *v); -/* - * Pixmap structure definition - * - * The purpose of this structure is to translate data - * from the hardware independent format of fbdev to what - * format the hardware needs. - */ - -#define FB_PIXMAP_DEFAULT 1 /* used internally by fbcon */ -#define FB_PIXMAP_SYSTEM 2 /* memory is in system RAM */ -#define FB_PIXMAP_IO 4 /* memory is iomapped */ -#define FB_PIXMAP_SYNC 256 /* set if GPU can DMA */ - -struct fb_pixmap { - u8 *addr; /* pointer to memory */ - u32 size; /* size of buffer in bytes */ - u32 offset; /* current offset to buffer */ - u32 buf_align; /* byte alignment of each bitmap */ - u32 scan_align; /* alignment per scanline */ - u32 access_align; /* alignment per read/write (bits) */ - u32 flags; /* see FB_PIXMAP_* */ - /* access methods */ - void (*writeio)(struct fb_info *info, void __iomem *dst, void *src, unsigned int size); - void (*readio) (struct fb_info *info, void *dst, void __iomem *src, unsigned int size); -}; - - -/* - * Frame buffer operations - * - * LOCKING NOTE: those functions must _ALL_ be called with the console - * semaphore held, this is the only suitable locking mechanism we have - * in 2.6. Some may be called at interrupt time at this point though. - */ - -struct fb_ops { - /* open/release and usage marking */ - struct module *owner; - int (*fb_open)(struct fb_info *info, int user); - int (*fb_release)(struct fb_info *info, int user); - - /* For framebuffers with strange non linear layouts or that do not - * work with normal memory mapped access - */ - ssize_t (*fb_read)(struct file *file, char __user *buf, size_t count, loff_t *ppos); - ssize_t (*fb_write)(struct file *file, const char __user *buf, size_t count, loff_t *ppos); - - /* checks var and eventually tweaks it to something supported, - * DO NOT MODIFY PAR */ - int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info); - - /* set the video mode according to info->var */ - int (*fb_set_par)(struct fb_info *info); - - /* set color register */ - int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, - unsigned blue, unsigned transp, struct fb_info *info); - - /* set color registers in batch */ - int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info); - - /* blank display */ - int (*fb_blank)(int blank, struct fb_info *info); - - /* pan display */ - int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info); - - /* Draws a rectangle */ - void (*fb_fillrect) (struct fb_info *info, const struct fb_fillrect *rect); - /* Copy data from area to another */ - void (*fb_copyarea) (struct fb_info *info, const struct fb_copyarea *region); - /* Draws a image to the display */ - void (*fb_imageblit) (struct fb_info *info, const struct fb_image *image); - - /* Draws cursor */ - int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor); - - /* Rotates the display */ - void (*fb_rotate)(struct fb_info *info, int angle); - - /* wait for blit idle, optional */ - int (*fb_sync)(struct fb_info *info); - - /* perform fb specific ioctl (optional) */ - int (*fb_ioctl)(struct fb_info *info, unsigned int cmd, - unsigned long arg); - - /* Handle 32bit compat ioctl (optional) */ - int (*fb_compat_ioctl)(struct fb_info *info, unsigned cmd, - unsigned long arg); - - /* perform fb specific mmap */ - int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma); - - /* save current hardware state */ - void (*fb_save_state)(struct fb_info *info); - - /* restore saved state */ - void (*fb_restore_state)(struct fb_info *info); -}; - -#ifdef CONFIG_FB_TILEBLITTING - -#define FB_TILE_CURSOR_NONE 0 -#define FB_TILE_CURSOR_UNDERLINE 1 -#define FB_TILE_CURSOR_LOWER_THIRD 2 -#define FB_TILE_CURSOR_LOWER_HALF 3 -#define FB_TILE_CURSOR_TWO_THIRDS 4 -#define FB_TILE_CURSOR_BLOCK 5 - -struct fb_tilemap { - __u32 width; /* width of each tile in pixels */ - __u32 height; /* height of each tile in scanlines */ - __u32 depth; /* color depth of each tile */ - __u32 length; /* number of tiles in the map */ - const __u8 *data; /* actual tile map: a bitmap array, packed - to the nearest byte */ -}; - -struct fb_tilerect { - __u32 sx; /* origin in the x-axis */ - __u32 sy; /* origin in the y-axis */ - __u32 width; /* number of tiles in the x-axis */ - __u32 height; /* number of tiles in the y-axis */ - __u32 index; /* what tile to use: index to tile map */ - __u32 fg; /* foreground color */ - __u32 bg; /* background color */ - __u32 rop; /* raster operation */ -}; - -struct fb_tilearea { - __u32 sx; /* source origin in the x-axis */ - __u32 sy; /* source origin in the y-axis */ - __u32 dx; /* destination origin in the x-axis */ - __u32 dy; /* destination origin in the y-axis */ - __u32 width; /* number of tiles in the x-axis */ - __u32 height; /* number of tiles in the y-axis */ -}; - -struct fb_tileblit { - __u32 sx; /* origin in the x-axis */ - __u32 sy; /* origin in the y-axis */ - __u32 width; /* number of tiles in the x-axis */ - __u32 height; /* number of tiles in the y-axis */ - __u32 fg; /* foreground color */ - __u32 bg; /* background color */ - __u32 length; /* number of tiles to draw */ - __u32 *indices; /* array of indices to tile map */ -}; - -struct fb_tilecursor { - __u32 sx; /* cursor position in the x-axis */ - __u32 sy; /* cursor position in the y-axis */ - __u32 mode; /* 0 = erase, 1 = draw */ - __u32 shape; /* see FB_TILE_CURSOR_* */ - __u32 fg; /* foreground color */ - __u32 bg; /* background color */ -}; - -struct fb_tile_ops { - /* set tile characteristics */ - void (*fb_settile)(struct fb_info *info, struct fb_tilemap *map); - - /* all dimensions from hereon are in terms of tiles */ - - /* move a rectangular region of tiles from one area to another*/ - void (*fb_tilecopy)(struct fb_info *info, struct fb_tilearea *area); - /* fill a rectangular region with a tile */ - void (*fb_tilefill)(struct fb_info *info, struct fb_tilerect *rect); - /* copy an array of tiles */ - void (*fb_tileblit)(struct fb_info *info, struct fb_tileblit *blit); - /* cursor */ - void (*fb_tilecursor)(struct fb_info *info, - struct fb_tilecursor *cursor); -}; -#endif /* CONFIG_FB_TILEBLITTING */ - -/* FBINFO_* = fb_info.flags bit flags */ -#define FBINFO_MODULE 0x0001 /* Low-level driver is a module */ -#define FBINFO_HWACCEL_DISABLED 0x0002 - /* When FBINFO_HWACCEL_DISABLED is set: - * Hardware acceleration is turned off. Software implementations - * of required functions (copyarea(), fillrect(), and imageblit()) - * takes over; acceleration engine should be in a quiescent state */ - -/* hints */ -#define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */ -#define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */ - -/* hardware supported ops */ -/* semantics: when a bit is set, it indicates that the operation is - * accelerated by hardware. - * required functions will still work even if the bit is not set. - * optional functions may not even exist if the flag bit is not set. - */ -#define FBINFO_HWACCEL_NONE 0x0000 -#define FBINFO_HWACCEL_COPYAREA 0x0100 /* required */ -#define FBINFO_HWACCEL_FILLRECT 0x0200 /* required */ -#define FBINFO_HWACCEL_IMAGEBLIT 0x0400 /* required */ -#define FBINFO_HWACCEL_ROTATE 0x0800 /* optional */ -#define FBINFO_HWACCEL_XPAN 0x1000 /* optional */ -#define FBINFO_HWACCEL_YPAN 0x2000 /* optional */ -#define FBINFO_HWACCEL_YWRAP 0x4000 /* optional */ - -#define FBINFO_MISC_USEREVENT 0x10000 /* event request - from userspace */ -#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ - -/* A driver may set this flag to indicate that it does want a set_par to be - * called every time when fbcon_switch is executed. The advantage is that with - * this flag set you can really be sure that set_par is always called before - * any of the functions dependant on the correct hardware state or altering - * that state, even if you are using some broken X releases. The disadvantage - * is that it introduces unwanted delays to every console switch if set_par - * is slow. It is a good idea to try this flag in the drivers initialization - * code whenever there is a bug report related to switching between X and the - * framebuffer console. - */ -#define FBINFO_MISC_ALWAYS_SETPAR 0x40000 - -struct fb_info { - int node; - int flags; - struct fb_var_screeninfo var; /* Current var */ - struct fb_fix_screeninfo fix; /* Current fix */ - struct fb_monspecs monspecs; /* Current Monitor specs */ - struct work_struct queue; /* Framebuffer event queue */ - struct fb_pixmap pixmap; /* Image hardware mapper */ - struct fb_pixmap sprite; /* Cursor hardware mapper */ - struct fb_cmap cmap; /* Current cmap */ - struct list_head modelist; /* mode list */ - struct fb_videomode *mode; /* current mode */ - -#ifdef CONFIG_FB_BACKLIGHT - /* Lock ordering: - * bl_mutex (protects bl_dev and bl_curve) - * bl_dev->sem (backlight class) - */ - struct mutex bl_mutex; - - /* assigned backlight device */ - struct backlight_device *bl_dev; - - /* Backlight level curve */ - u8 bl_curve[FB_BACKLIGHT_LEVELS]; -#endif - - struct fb_ops *fbops; - struct device *device; - struct class_device *class_device; /* sysfs per device attrs */ - int class_flag; /* private sysfs flags */ -#ifdef CONFIG_FB_TILEBLITTING - struct fb_tile_ops *tileops; /* Tile Blitting */ -#endif - char __iomem *screen_base; /* Virtual address */ - unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */ - void *pseudo_palette; /* Fake palette of 16 colors */ -#define FBINFO_STATE_RUNNING 0 -#define FBINFO_STATE_SUSPENDED 1 - u32 state; /* Hardware state i.e suspend */ - void *fbcon_par; /* fbcon use-only private area */ - /* From here on everything is device dependent */ - void *par; -}; - -#ifdef MODULE -#define FBINFO_DEFAULT FBINFO_MODULE -#else -#define FBINFO_DEFAULT 0 -#endif - -// This will go away -#define FBINFO_FLAG_MODULE FBINFO_MODULE -#define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT - -/* This will go away - * fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags - * when it wants to turn the acceleration engine on. This is - * really a separate operation, and should be modified via sysfs. - * But for now, we leave it broken with the following define - */ -#define STUPID_ACCELF_TEXT_SHIT - -// This will go away -#if defined(__sparc__) - -/* We map all of our framebuffers such that big-endian accesses - * are what we want, so the following is sufficient. - */ - -// This will go away -#define fb_readb sbus_readb -#define fb_readw sbus_readw -#define fb_readl sbus_readl -#define fb_readq sbus_readq -#define fb_writeb sbus_writeb -#define fb_writew sbus_writew -#define fb_writel sbus_writel -#define fb_writeq sbus_writeq -#define fb_memset sbus_memset_io - -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) - -#define fb_readb __raw_readb -#define fb_readw __raw_readw -#define fb_readl __raw_readl -#define fb_readq __raw_readq -#define fb_writeb __raw_writeb -#define fb_writew __raw_writew -#define fb_writel __raw_writel -#define fb_writeq __raw_writeq -#define fb_memset memset_io - -#else - -#define fb_readb(addr) (*(volatile u8 *) (addr)) -#define fb_readw(addr) (*(volatile u16 *) (addr)) -#define fb_readl(addr) (*(volatile u32 *) (addr)) -#define fb_readq(addr) (*(volatile u64 *) (addr)) -#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b)) -#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b)) -#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b)) -#define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b)) -#define fb_memset memset - -#endif - -#if defined (__BIG_ENDIAN) -#define FB_LEFT_POS(bpp) (32 - bpp) -#define FB_SHIFT_HIGH(val, bits) ((val) >> (bits)) -#define FB_SHIFT_LOW(val, bits) ((val) << (bits)) -#else -#define FB_LEFT_POS(bpp) (0) -#define FB_SHIFT_HIGH(val, bits) ((val) << (bits)) -#define FB_SHIFT_LOW(val, bits) ((val) >> (bits)) -#endif - - /* - * `Generic' versions of the frame buffer device operations - */ - -extern int fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var); -extern int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var); -extern int fb_blank(struct fb_info *info, int blank); -extern void cfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); -extern void cfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); -extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image); - -/* drivers/video/fbmem.c */ -extern int register_framebuffer(struct fb_info *fb_info); -extern int unregister_framebuffer(struct fb_info *fb_info); -extern int fb_prepare_logo(struct fb_info *fb_info, int rotate); -extern int fb_show_logo(struct fb_info *fb_info, int rotate); -extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size); -extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx, - u32 height, u32 shift_high, u32 shift_low, u32 mod); -extern void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height); -extern void fb_set_suspend(struct fb_info *info, int state); -extern int fb_get_color_depth(struct fb_var_screeninfo *var, - struct fb_fix_screeninfo *fix); -extern int fb_get_options(char *name, char **option); -extern int fb_new_modelist(struct fb_info *info); - -extern struct fb_info *registered_fb[FB_MAX]; -extern int num_registered_fb; - -static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, - u8 *src, u32 s_pitch, u32 height) -{ - int i, j; - - d_pitch -= s_pitch; - - for (i = height; i--; ) { - /* s_pitch is a few bytes at the most, memcpy is suboptimal */ - for (j = 0; j < s_pitch; j++) - *dst++ = *src++; - dst += d_pitch; - } -} - -/* drivers/video/fbsysfs.c */ -extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); -extern void framebuffer_release(struct fb_info *info); -extern int fb_init_class_device(struct fb_info *fb_info); -extern void fb_cleanup_class_device(struct fb_info *head); -extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max); - -/* drivers/video/fbmon.c */ -#define FB_MAXTIMINGS 0 -#define FB_VSYNCTIMINGS 1 -#define FB_HSYNCTIMINGS 2 -#define FB_DCLKTIMINGS 3 -#define FB_IGNOREMON 0x100 - -#define FB_MODE_IS_UNKNOWN 0 -#define FB_MODE_IS_DETAILED 1 -#define FB_MODE_IS_STANDARD 2 -#define FB_MODE_IS_VESA 4 -#define FB_MODE_IS_CALCULATED 8 -#define FB_MODE_IS_FIRST 16 -#define FB_MODE_IS_FROM_VAR 32 - -extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal, - const struct fb_info *fb_info); -extern int fbmon_dpms(const struct fb_info *fb_info); -extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, - struct fb_info *info); -extern int fb_validate_mode(const struct fb_var_screeninfo *var, - struct fb_info *info); -extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var); -extern const unsigned char *fb_firmware_edid(struct device *device); -extern void fb_edid_to_monspecs(unsigned char *edid, - struct fb_monspecs *specs); -extern void fb_destroy_modedb(struct fb_videomode *modedb); -extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb); -extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); - -/* drivers/video/modedb.c */ -#define VESA_MODEDB_SIZE 34 -extern void fb_var_to_videomode(struct fb_videomode *mode, - struct fb_var_screeninfo *var); -extern void fb_videomode_to_var(struct fb_var_screeninfo *var, - struct fb_videomode *mode); -extern int fb_mode_is_equal(struct fb_videomode *mode1, - struct fb_videomode *mode2); -extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head); -extern void fb_delete_videomode(struct fb_videomode *mode, - struct list_head *head); -extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, - struct list_head *head); -extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, - struct list_head *head); -extern struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode, - struct list_head *head); -extern void fb_destroy_modelist(struct list_head *head); -extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, - struct list_head *head); -extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, - struct list_head *head); - -/* drivers/video/fbcmap.c */ -extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); -extern void fb_dealloc_cmap(struct fb_cmap *cmap); -extern int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to); -extern int fb_cmap_to_user(struct fb_cmap *from, struct fb_cmap_user *to); -extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info); -extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info); -extern struct fb_cmap *fb_default_cmap(int len); -extern void fb_invert_cmaps(void); - -struct fb_videomode { - const char *name; /* optional */ - u32 refresh; /* optional */ - u32 xres; - u32 yres; - u32 pixclock; - u32 left_margin; - u32 right_margin; - u32 upper_margin; - u32 lower_margin; - u32 hsync_len; - u32 vsync_len; - u32 sync; - u32 vmode; - u32 flag; -}; - -extern const struct fb_videomode vesa_modes[]; - -struct fb_modelist { - struct list_head list; - struct fb_videomode mode; -}; - -extern int fb_find_mode(struct fb_var_screeninfo *var, - struct fb_info *info, const char *mode_option, - const struct fb_videomode *db, - unsigned int dbsize, - const struct fb_videomode *default_mode, - unsigned int default_bpp); - -#endif /* __KERNEL__ */ #endif /* _LINUX_FB_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/fcntl.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/fcntl.h 2007-05-24 15:40:43.000000000 +0200 @@ -31,32 +31,5 @@ unlinking file. */ #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ -#ifdef __KERNEL__ - -#ifndef force_o_largefile -#define force_o_largefile() (BITS_PER_LONG != 32) -#endif - -#if BITS_PER_LONG == 32 -#define IS_GETLK32(cmd) ((cmd) == F_GETLK) -#define IS_SETLK32(cmd) ((cmd) == F_SETLK) -#define IS_SETLKW32(cmd) ((cmd) == F_SETLKW) -#define IS_GETLK64(cmd) ((cmd) == F_GETLK64) -#define IS_SETLK64(cmd) ((cmd) == F_SETLK64) -#define IS_SETLKW64(cmd) ((cmd) == F_SETLKW64) -#else -#define IS_GETLK32(cmd) (0) -#define IS_SETLK32(cmd) (0) -#define IS_SETLKW32(cmd) (0) -#define IS_GETLK64(cmd) ((cmd) == F_GETLK) -#define IS_SETLK64(cmd) ((cmd) == F_SETLK) -#define IS_SETLKW64(cmd) ((cmd) == F_SETLKW) -#endif /* BITS_PER_LONG == 32 */ - -#define IS_GETLK(cmd) (IS_GETLK32(cmd) || IS_GETLK64(cmd)) -#define IS_SETLK(cmd) (IS_SETLK32(cmd) || IS_SETLK64(cmd)) -#define IS_SETLKW(cmd) (IS_SETLKW32(cmd) || IS_SETLKW64(cmd)) - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/filter.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/filter.h 2007-05-24 15:40:43.000000000 +0200 @@ -5,12 +5,8 @@ #ifndef __LINUX_FILTER_H__ #define __LINUX_FILTER_H__ -#include #include -#ifdef __KERNEL__ -#include -#endif /* * Current version of the filter code architecture. @@ -34,23 +30,9 @@ struct sock_fprog /* Required for SO_ATTACH_FILTER. */ { unsigned short len; /* Number of filter blocks */ - struct sock_filter __user *filter; -}; - -#ifdef __KERNEL__ -struct sk_filter -{ - atomic_t refcnt; - unsigned int len; /* Number of filter blocks */ - struct rcu_head rcu; - struct sock_filter insns[0]; + struct sock_filter *filter; }; -static inline unsigned int sk_filter_len(struct sk_filter *fp) -{ - return fp->len*sizeof(struct sock_filter) + sizeof(*fp); -} -#endif /* * Instruction classes @@ -140,13 +122,5 @@ #define SKF_NET_OFF (-0x100000) #define SKF_LL_OFF (-0x200000) -#ifdef __KERNEL__ -struct sk_buff; -struct sock; - -extern unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen); -extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); -extern int sk_chk_filter(struct sock_filter *filter, int flen); -#endif /* __KERNEL__ */ #endif /* __LINUX_FILTER_H__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/flat.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/flat.h 2007-05-24 15:40:43.000000000 +0200 @@ -10,9 +10,6 @@ #ifndef _LINUX_FLAT_H #define _LINUX_FLAT_H -#ifdef __KERNEL__ -#include -#endif #define FLAT_VERSION 0x00000004L @@ -57,44 +54,5 @@ #define FLAT_FLAG_KTRACE 0x0010 /* output useful kernel trace for debugging */ -#ifdef __KERNEL__ /* so systems without linux headers can compile the apps */ -/* - * While it would be nice to keep this header clean, users of older - * tools still need this support in the kernel. So this section is - * purely for compatibility with old tool chains. - * - * DO NOT make changes or enhancements to the old format please, just work - * with the format above, except to fix bugs with old format support. - */ - -#include - -#define OLD_FLAT_VERSION 0x00000002L -#define OLD_FLAT_RELOC_TYPE_TEXT 0 -#define OLD_FLAT_RELOC_TYPE_DATA 1 -#define OLD_FLAT_RELOC_TYPE_BSS 2 - -typedef union { - unsigned long value; - struct { -# if defined(mc68000) && !defined(CONFIG_COLDFIRE) - signed long offset : 30; - unsigned long type : 2; -# define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */ -# elif defined(__BIG_ENDIAN_BITFIELD) - unsigned long type : 2; - signed long offset : 30; -# define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */ -# elif defined(__LITTLE_ENDIAN_BITFIELD) - signed long offset : 30; - unsigned long type : 2; -# define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */ -# else -# error "Unknown bitfield order for flat files." -# endif - } reloc; -} flat_v2_reloc_t; - -#endif /* __KERNEL__ */ #endif /* _LINUX_FLAT_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/fs.h 2007-05-24 15:40:43.000000000 +0200 @@ -262,1777 +262,4 @@ #define SYNC_FILE_RANGE_WRITE 2 #define SYNC_FILE_RANGE_WAIT_AFTER 4 -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -struct hd_geometry; -struct iovec; -struct nameidata; -struct kiocb; -struct pipe_inode_info; -struct poll_table_struct; -struct kstatfs; -struct vm_area_struct; -struct vfsmount; - -extern void __init inode_init(unsigned long); -extern void __init inode_init_early(void); -extern void __init mnt_init(unsigned long); -extern void __init files_init(unsigned long); - -struct buffer_head; -typedef int (get_block_t)(struct inode *inode, sector_t iblock, - struct buffer_head *bh_result, int create); -typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, - ssize_t bytes, void *private); - -/* - * Attribute flags. These should be or-ed together to figure out what - * has been changed! - */ -#define ATTR_MODE 1 -#define ATTR_UID 2 -#define ATTR_GID 4 -#define ATTR_SIZE 8 -#define ATTR_ATIME 16 -#define ATTR_MTIME 32 -#define ATTR_CTIME 64 -#define ATTR_ATIME_SET 128 -#define ATTR_MTIME_SET 256 -#define ATTR_FORCE 512 /* Not a change, but a change it */ -#define ATTR_ATTR_FLAG 1024 -#define ATTR_KILL_SUID 2048 -#define ATTR_KILL_SGID 4096 -#define ATTR_FILE 8192 - -/* - * This is the Inode Attributes structure, used for notify_change(). It - * uses the above definitions as flags, to know which values have changed. - * Also, in this manner, a Filesystem can look at only the values it cares - * about. Basically, these are the attributes that the VFS layer can - * request to change from the FS layer. - * - * Derek Atkins 94-10-20 - */ -struct iattr { - unsigned int ia_valid; - umode_t ia_mode; - uid_t ia_uid; - gid_t ia_gid; - loff_t ia_size; - struct timespec ia_atime; - struct timespec ia_mtime; - struct timespec ia_ctime; - - /* - * Not an attribute, but an auxilary info for filesystems wanting to - * implement an ftruncate() like method. NOTE: filesystem should - * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL). - */ - struct file *ia_file; -}; - -/* - * Includes for diskquotas. - */ -#include - -/** - * enum positive_aop_returns - aop return codes with specific semantics - * - * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has - * completed, that the page is still locked, and - * should be considered active. The VM uses this hint - * to return the page to the active list -- it won't - * be a candidate for writeback again in the near - * future. Other callers must be careful to unlock - * the page if they get this return. Returned by - * writepage(); - * - * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has - * unlocked it and the page might have been truncated. - * The caller should back up to acquiring a new page and - * trying again. The aop will be taking reasonable - * precautions not to livelock. If the caller held a page - * reference, it should drop it before retrying. Returned - * by readpage(), prepare_write(), and commit_write(). - * - * address_space_operation functions return these large constants to indicate - * special semantics to the caller. These are much larger than the bytes in a - * page to allow for functions that return the number of bytes operated on in a - * given page. - */ - -enum positive_aop_returns { - AOP_WRITEPAGE_ACTIVATE = 0x80000, - AOP_TRUNCATED_PAGE = 0x80001, -}; - -/* - * oh the beauties of C type declarations. - */ -struct page; -struct address_space; -struct writeback_control; - -struct address_space_operations { - int (*writepage)(struct page *page, struct writeback_control *wbc); - int (*readpage)(struct file *, struct page *); - void (*sync_page)(struct page *); - - /* Write back some dirty pages from this mapping. */ - int (*writepages)(struct address_space *, struct writeback_control *); - - /* Set a page dirty. Return true if this dirtied it */ - int (*set_page_dirty)(struct page *page); - - int (*readpages)(struct file *filp, struct address_space *mapping, - struct list_head *pages, unsigned nr_pages); - - /* - * ext3 requires that a successful prepare_write() call be followed - * by a commit_write() call - they must be balanced - */ - int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); - int (*commit_write)(struct file *, struct page *, unsigned, unsigned); - /* Unfortunately this kludge is needed for FIBMAP. Don't use it */ - sector_t (*bmap)(struct address_space *, sector_t); - void (*invalidatepage) (struct page *, unsigned long); - int (*releasepage) (struct page *, gfp_t); - ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, - loff_t offset, unsigned long nr_segs); - struct page* (*get_xip_page)(struct address_space *, sector_t, - int); - /* migrate the contents of a page to the specified target */ - int (*migratepage) (struct address_space *, - struct page *, struct page *); -}; - -struct backing_dev_info; -struct address_space { - struct inode *host; /* owner: inode, block_device */ - struct radix_tree_root page_tree; /* radix tree of all pages */ - rwlock_t tree_lock; /* and rwlock protecting it */ - unsigned int i_mmap_writable;/* count VM_SHARED mappings */ - struct prio_tree_root i_mmap; /* tree of private and shared mappings */ - struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */ - spinlock_t i_mmap_lock; /* protect tree, count, list */ - unsigned int truncate_count; /* Cover race condition with truncate */ - unsigned long nrpages; /* number of total pages */ - pgoff_t writeback_index;/* writeback starts here */ - const struct address_space_operations *a_ops; /* methods */ - unsigned long flags; /* error bits/gfp mask */ - struct backing_dev_info *backing_dev_info; /* device readahead, etc */ - spinlock_t private_lock; /* for use by the address_space */ - struct list_head private_list; /* ditto */ - struct address_space *assoc_mapping; /* ditto */ -} __attribute__((aligned(sizeof(long)))); - /* - * On most architectures that alignment is already the case; but - * must be enforced here for CRIS, to let the least signficant bit - * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON. - */ - -struct block_device { - dev_t bd_dev; /* not a kdev_t - it's a search key */ - struct inode * bd_inode; /* will die */ - int bd_openers; - struct mutex bd_mutex; /* open/close mutex */ - struct mutex bd_mount_mutex; /* mount mutex */ - struct list_head bd_inodes; - void * bd_holder; - int bd_holders; -#ifdef CONFIG_SYSFS - struct list_head bd_holder_list; -#endif - struct block_device * bd_contains; - unsigned bd_block_size; - struct hd_struct * bd_part; - /* number of times partitions within this device have been opened. */ - unsigned bd_part_count; - int bd_invalidated; - struct gendisk * bd_disk; - struct list_head bd_list; - struct backing_dev_info *bd_inode_backing_dev_info; - /* - * Private data. You must have bd_claim'ed the block_device - * to use this. NOTE: bd_claim allows an owner to claim - * the same device multiple times, the owner must take special - * care to not mess up bd_private for that case. - */ - unsigned long bd_private; -}; - -/* - * bdev->bd_mutex nesting subclasses for the lock validator: - * - * 0: normal - * 1: 'whole' - * 2: 'partition' - */ -enum bdev_bd_mutex_lock_class -{ - BD_MUTEX_NORMAL, - BD_MUTEX_WHOLE, - BD_MUTEX_PARTITION -}; - - -/* - * Radix-tree tags, for tagging dirty and writeback pages within the pagecache - * radix trees - */ -#define PAGECACHE_TAG_DIRTY 0 -#define PAGECACHE_TAG_WRITEBACK 1 - -int mapping_tagged(struct address_space *mapping, int tag); - -/* - * Might pages of this file be mapped into userspace? - */ -static inline int mapping_mapped(struct address_space *mapping) -{ - return !prio_tree_empty(&mapping->i_mmap) || - !list_empty(&mapping->i_mmap_nonlinear); -} - -/* - * Might pages of this file have been modified in userspace? - * Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff - * marks vma as VM_SHARED if it is shared, and the file was opened for - * writing i.e. vma may be mprotected writable even if now readonly. - */ -static inline int mapping_writably_mapped(struct address_space *mapping) -{ - return mapping->i_mmap_writable != 0; -} - -/* - * Use sequence counter to get consistent i_size on 32-bit processors. - */ -#if BITS_PER_LONG==32 && defined(CONFIG_SMP) -#include -#define __NEED_I_SIZE_ORDERED -#define i_size_ordered_init(inode) seqcount_init(&inode->i_size_seqcount) -#else -#define i_size_ordered_init(inode) do { } while (0) -#endif - -struct inode { - struct hlist_node i_hash; - struct list_head i_list; - struct list_head i_sb_list; - struct list_head i_dentry; - unsigned long i_ino; - atomic_t i_count; - umode_t i_mode; - unsigned int i_nlink; - uid_t i_uid; - gid_t i_gid; - dev_t i_rdev; - loff_t i_size; - struct timespec i_atime; - struct timespec i_mtime; - struct timespec i_ctime; - unsigned int i_blkbits; - unsigned long i_version; - blkcnt_t i_blocks; - unsigned short i_bytes; - spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ - struct mutex i_mutex; - struct rw_semaphore i_alloc_sem; - struct inode_operations *i_op; - const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ - struct super_block *i_sb; - struct file_lock *i_flock; - struct address_space *i_mapping; - struct address_space i_data; -#ifdef CONFIG_QUOTA - struct dquot *i_dquot[MAXQUOTAS]; -#endif - struct list_head i_devices; - union { - struct pipe_inode_info *i_pipe; - struct block_device *i_bdev; - struct cdev *i_cdev; - }; - int i_cindex; - - __u32 i_generation; - -#ifdef CONFIG_DNOTIFY - unsigned long i_dnotify_mask; /* Directory notify events */ - struct dnotify_struct *i_dnotify; /* for directory notifications */ -#endif - -#ifdef CONFIG_INOTIFY - struct list_head inotify_watches; /* watches on this inode */ - struct mutex inotify_mutex; /* protects the watches list */ -#endif - - unsigned long i_state; - unsigned long dirtied_when; /* jiffies of first dirtying */ - - unsigned int i_flags; - - atomic_t i_writecount; -#ifdef CONFIG_SECURITY - void *i_security; -#endif - void *i_private; /* fs or device private pointer */ -#ifdef __NEED_I_SIZE_ORDERED - seqcount_t i_size_seqcount; -#endif -}; - -/* - * inode->i_mutex nesting subclasses for the lock validator: - * - * 0: the object of the current VFS operation - * 1: parent - * 2: child/target - * 3: quota file - * - * The locking order between these classes is - * parent -> child -> normal -> xattr -> quota - */ -enum inode_i_mutex_lock_class -{ - I_MUTEX_NORMAL, - I_MUTEX_PARENT, - I_MUTEX_CHILD, - I_MUTEX_XATTR, - I_MUTEX_QUOTA -}; - -extern void inode_double_lock(struct inode *inode1, struct inode *inode2); -extern void inode_double_unlock(struct inode *inode1, struct inode *inode2); - -/* - * NOTE: in a 32bit arch with a preemptable kernel and - * an UP compile the i_size_read/write must be atomic - * with respect to the local cpu (unlike with preempt disabled), - * but they don't need to be atomic with respect to other cpus like in - * true SMP (so they need either to either locally disable irq around - * the read or for example on x86 they can be still implemented as a - * cmpxchg8b without the need of the lock prefix). For SMP compiles - * and 64bit archs it makes no difference if preempt is enabled or not. - */ -static inline loff_t i_size_read(struct inode *inode) -{ -#if BITS_PER_LONG==32 && defined(CONFIG_SMP) - loff_t i_size; - unsigned int seq; - - do { - seq = read_seqcount_begin(&inode->i_size_seqcount); - i_size = inode->i_size; - } while (read_seqcount_retry(&inode->i_size_seqcount, seq)); - return i_size; -#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT) - loff_t i_size; - - preempt_disable(); - i_size = inode->i_size; - preempt_enable(); - return i_size; -#else - return inode->i_size; -#endif -} - -/* - * NOTE: unlike i_size_read(), i_size_write() does need locking around it - * (normally i_mutex), otherwise on 32bit/SMP an update of i_size_seqcount - * can be lost, resulting in subsequent i_size_read() calls spinning forever. - */ -static inline void i_size_write(struct inode *inode, loff_t i_size) -{ -#if BITS_PER_LONG==32 && defined(CONFIG_SMP) - write_seqcount_begin(&inode->i_size_seqcount); - inode->i_size = i_size; - write_seqcount_end(&inode->i_size_seqcount); -#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT) - preempt_disable(); - inode->i_size = i_size; - preempt_enable(); -#else - inode->i_size = i_size; -#endif -} - -static inline unsigned iminor(struct inode *inode) -{ - return MINOR(inode->i_rdev); -} - -static inline unsigned imajor(struct inode *inode) -{ - return MAJOR(inode->i_rdev); -} - -extern struct block_device *I_BDEV(struct inode *inode); - -struct fown_struct { - rwlock_t lock; /* protects pid, uid, euid fields */ - struct pid *pid; /* pid or -pgrp where SIGIO should be sent */ - enum pid_type pid_type; /* Kind of process group SIGIO should be sent to */ - uid_t uid, euid; /* uid/euid of process setting the owner */ - int signum; /* posix.1b rt signal to be delivered on IO */ -}; - -/* - * Track a single file's readahead state - */ -struct file_ra_state { - unsigned long start; /* Current window */ - unsigned long size; - unsigned long flags; /* ra flags RA_FLAG_xxx*/ - unsigned long cache_hit; /* cache hit count*/ - unsigned long prev_page; /* Cache last read() position */ - unsigned long ahead_start; /* Ahead window */ - unsigned long ahead_size; - unsigned long ra_pages; /* Maximum readahead window */ - unsigned long mmap_hit; /* Cache hit stat for mmap accesses */ - unsigned long mmap_miss; /* Cache miss stat for mmap accesses */ -}; -#define RA_FLAG_MISS 0x01 /* a cache miss occured against this file */ -#define RA_FLAG_INCACHE 0x02 /* file is already in cache */ - -struct file { - /* - * fu_list becomes invalid after file_free is called and queued via - * fu_rcuhead for RCU freeing - */ - union { - struct list_head fu_list; - struct rcu_head fu_rcuhead; - } f_u; - struct dentry *f_dentry; - struct vfsmount *f_vfsmnt; - const struct file_operations *f_op; - atomic_t f_count; - unsigned int f_flags; - mode_t f_mode; - loff_t f_pos; - struct fown_struct f_owner; - unsigned int f_uid, f_gid; - struct file_ra_state f_ra; - - unsigned long f_version; -#ifdef CONFIG_SECURITY - void *f_security; -#endif - /* needed for tty driver, and maybe others */ - void *private_data; - -#ifdef CONFIG_EPOLL - /* Used by fs/eventpoll.c to link all the hooks to this file */ - struct list_head f_ep_links; - spinlock_t f_ep_lock; -#endif /* #ifdef CONFIG_EPOLL */ - struct address_space *f_mapping; -}; -extern spinlock_t files_lock; -#define file_list_lock() spin_lock(&files_lock); -#define file_list_unlock() spin_unlock(&files_lock); - -#define get_file(x) atomic_inc(&(x)->f_count) -#define file_count(x) atomic_read(&(x)->f_count) - -#define MAX_NON_LFS ((1UL<<31) - 1) - -/* Page cache limit. The filesystems should put that into their s_maxbytes - limits, otherwise bad things can happen in VM. */ -#if BITS_PER_LONG==32 -#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) -#elif BITS_PER_LONG==64 -#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL -#endif - -#define FL_POSIX 1 -#define FL_FLOCK 2 -#define FL_ACCESS 8 /* not trying to lock, just looking */ -#define FL_EXISTS 16 /* when unlocking, test for existence */ -#define FL_LEASE 32 /* lease held on this file */ -#define FL_CLOSE 64 /* unlock on close */ -#define FL_SLEEP 128 /* A blocking lock */ - -/* - * The POSIX file lock owner is determined by - * the "struct files_struct" in the thread group - * (or NULL for no owner - BSD locks). - * - * Lockd stuffs a "host" pointer into this. - */ -typedef struct files_struct *fl_owner_t; - -struct file_lock_operations { - void (*fl_insert)(struct file_lock *); /* lock insertion callback */ - void (*fl_remove)(struct file_lock *); /* lock removal callback */ - void (*fl_copy_lock)(struct file_lock *, struct file_lock *); - void (*fl_release_private)(struct file_lock *); -}; - -struct lock_manager_operations { - int (*fl_compare_owner)(struct file_lock *, struct file_lock *); - void (*fl_notify)(struct file_lock *); /* unblock callback */ - void (*fl_copy_lock)(struct file_lock *, struct file_lock *); - void (*fl_release_private)(struct file_lock *); - void (*fl_break)(struct file_lock *); - int (*fl_mylease)(struct file_lock *, struct file_lock *); - int (*fl_change)(struct file_lock **, int); -}; - -/* that will die - we need it for nfs_lock_info */ -#include - -struct file_lock { - struct file_lock *fl_next; /* singly linked list for this inode */ - struct list_head fl_link; /* doubly linked list of all locks */ - struct list_head fl_block; /* circular list of blocked processes */ - fl_owner_t fl_owner; - unsigned int fl_pid; - wait_queue_head_t fl_wait; - struct file *fl_file; - unsigned char fl_flags; - unsigned char fl_type; - loff_t fl_start; - loff_t fl_end; - - struct fasync_struct * fl_fasync; /* for lease break notifications */ - unsigned long fl_break_time; /* for nonblocking lease breaks */ - - struct file_lock_operations *fl_ops; /* Callbacks for filesystems */ - struct lock_manager_operations *fl_lmops; /* Callbacks for lockmanagers */ - union { - struct nfs_lock_info nfs_fl; - struct nfs4_lock_info nfs4_fl; - } fl_u; -}; - -/* The following constant reflects the upper bound of the file/locking space */ -#ifndef OFFSET_MAX -#define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1))) -#define OFFSET_MAX INT_LIMIT(loff_t) -#define OFFT_OFFSET_MAX INT_LIMIT(off_t) -#endif - -#include - -extern int fcntl_getlk(struct file *, struct flock __user *); -extern int fcntl_setlk(unsigned int, struct file *, unsigned int, - struct flock __user *); - -#if BITS_PER_LONG == 32 -extern int fcntl_getlk64(struct file *, struct flock64 __user *); -extern int fcntl_setlk64(unsigned int, struct file *, unsigned int, - struct flock64 __user *); -#endif - -extern void send_sigio(struct fown_struct *fown, int fd, int band); -extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); -extern int fcntl_getlease(struct file *filp); - -/* fs/sync.c */ -extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, - unsigned int flags); - -/* fs/locks.c */ -extern void locks_init_lock(struct file_lock *); -extern void locks_copy_lock(struct file_lock *, struct file_lock *); -extern void locks_remove_posix(struct file *, fl_owner_t); -extern void locks_remove_flock(struct file *); -extern int posix_test_lock(struct file *, struct file_lock *, struct file_lock *); -extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_lock *); -extern int posix_lock_file(struct file *, struct file_lock *); -extern int posix_lock_file_wait(struct file *, struct file_lock *); -extern int posix_unblock_lock(struct file *, struct file_lock *); -extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); -extern int __break_lease(struct inode *inode, unsigned int flags); -extern void lease_get_mtime(struct inode *, struct timespec *time); -extern int setlease(struct file *, long, struct file_lock **); -extern int lease_modify(struct file_lock **, int); -extern int lock_may_read(struct inode *, loff_t start, unsigned long count); -extern int lock_may_write(struct inode *, loff_t start, unsigned long count); - -struct fasync_struct { - int magic; - int fa_fd; - struct fasync_struct *fa_next; /* singly linked list */ - struct file *fa_file; -}; - -#define FASYNC_MAGIC 0x4601 - -/* SMP safe fasync helpers: */ -extern int fasync_helper(int, struct file *, int, struct fasync_struct **); -/* can be called from interrupts */ -extern void kill_fasync(struct fasync_struct **, int, int); -/* only for net: no internal synchronization */ -extern void __kill_fasync(struct fasync_struct *, int, int); - -extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); -extern int f_setown(struct file *filp, unsigned long arg, int force); -extern void f_delown(struct file *filp); -extern pid_t f_getown(struct file *filp); -extern int send_sigurg(struct fown_struct *fown); - -/* - * Umount options - */ - -#define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ -#define MNT_DETACH 0x00000002 /* Just detach from the tree */ -#define MNT_EXPIRE 0x00000004 /* Mark for expiry */ - -extern struct list_head super_blocks; -extern spinlock_t sb_lock; - -#define sb_entry(list) list_entry((list), struct super_block, s_list) -#define S_BIAS (1<<30) -struct super_block { - struct list_head s_list; /* Keep this first */ - dev_t s_dev; /* search index; _not_ kdev_t */ - unsigned long s_blocksize; - unsigned char s_blocksize_bits; - unsigned char s_dirt; - unsigned long long s_maxbytes; /* Max file size */ - struct file_system_type *s_type; - struct super_operations *s_op; - struct dquot_operations *dq_op; - struct quotactl_ops *s_qcop; - struct export_operations *s_export_op; - unsigned long s_flags; - unsigned long s_magic; - struct dentry *s_root; - struct rw_semaphore s_umount; - struct mutex s_lock; - int s_count; - int s_syncing; - int s_need_sync_fs; - atomic_t s_active; -#ifdef CONFIG_SECURITY - void *s_security; -#endif - struct xattr_handler **s_xattr; - - struct list_head s_inodes; /* all inodes */ - struct list_head s_dirty; /* dirty inodes */ - struct list_head s_io; /* parked for writeback */ - struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ - struct list_head s_files; - - struct block_device *s_bdev; - struct list_head s_instances; - struct quota_info s_dquot; /* Diskquota specific options */ - - int s_frozen; - wait_queue_head_t s_wait_unfrozen; - - char s_id[32]; /* Informational name */ - - void *s_fs_info; /* Filesystem private info */ - - /* - * The next field is for VFS *only*. No filesystems have any business - * even looking at it. You had been warned. - */ - struct mutex s_vfs_rename_mutex; /* Kludge */ - - /* Granularity of c/m/atime in ns. - Cannot be worse than a second */ - u32 s_time_gran; -}; - -extern struct timespec current_fs_time(struct super_block *sb); - -/* - * Snapshotting support. - */ -enum { - SB_UNFROZEN = 0, - SB_FREEZE_WRITE = 1, - SB_FREEZE_TRANS = 2, -}; - -#define vfs_check_frozen(sb, level) \ - wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) - -static inline void get_fs_excl(void) -{ - atomic_inc(¤t->fs_excl); -} - -static inline void put_fs_excl(void) -{ - atomic_dec(¤t->fs_excl); -} - -static inline int has_fs_excl(void) -{ - return atomic_read(¤t->fs_excl); -} - - -/* - * Superblock locking. - */ -static inline void lock_super(struct super_block * sb) -{ - get_fs_excl(); - mutex_lock(&sb->s_lock); -} - -static inline void unlock_super(struct super_block * sb) -{ - put_fs_excl(); - mutex_unlock(&sb->s_lock); -} - -/* - * VFS helper functions.. - */ -extern int vfs_permission(struct nameidata *, int); -extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); -extern int vfs_mkdir(struct inode *, struct dentry *, int); -extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); -extern int vfs_symlink(struct inode *, struct dentry *, const char *, int); -extern int vfs_link(struct dentry *, struct inode *, struct dentry *); -extern int vfs_rmdir(struct inode *, struct dentry *); -extern int vfs_unlink(struct inode *, struct dentry *); -extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); - -/* - * VFS dentry helper functions. - */ -extern void dentry_unhash(struct dentry *dentry); - -/* - * VFS file helper functions. - */ -extern int file_permission(struct file *, int); - -/* - * File types - * - * NOTE! These match bits 12..15 of stat.st_mode - * (ie "(i_mode >> 12) & 15"). - */ -#define DT_UNKNOWN 0 -#define DT_FIFO 1 -#define DT_CHR 2 -#define DT_DIR 4 -#define DT_BLK 6 -#define DT_REG 8 -#define DT_LNK 10 -#define DT_SOCK 12 -#define DT_WHT 14 - -#define OSYNC_METADATA (1<<0) -#define OSYNC_DATA (1<<1) -#define OSYNC_INODE (1<<2) -int generic_osync_inode(struct inode *, struct address_space *, int); - -/* - * This is the "filldir" function type, used by readdir() to let - * the kernel specify what kind of dirent layout it wants to have. - * This allows the kernel to read directories into kernel space or - * to have different dirent layouts depending on the binary type. - */ -typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); - -struct block_device_operations { - int (*open) (struct inode *, struct file *); - int (*release) (struct inode *, struct file *); - int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); - long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); - long (*compat_ioctl) (struct file *, unsigned, unsigned long); - int (*direct_access) (struct block_device *, sector_t, unsigned long *); - int (*media_changed) (struct gendisk *); - int (*revalidate_disk) (struct gendisk *); - int (*getgeo)(struct block_device *, struct hd_geometry *); - struct module *owner; -}; - -/* - * "descriptor" for what we're up to with a read for sendfile(). - * This allows us to use the same read code yet - * have multiple different users of the data that - * we read from a file. - * - * The simplest case just copies the data to user - * mode. - */ -typedef struct { - size_t written; - size_t count; - union { - char __user * buf; - void *data; - } arg; - int error; -} read_descriptor_t; - -typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long); - -/* These macros are for out of kernel modules to test that - * the kernel supports the unlocked_ioctl and compat_ioctl - * fields in struct file_operations. */ -#define HAVE_COMPAT_IOCTL 1 -#define HAVE_UNLOCKED_IOCTL 1 - -/* - * NOTE: - * read, write, poll, fsync, readv, writev, unlocked_ioctl and compat_ioctl - * can be called without the big kernel lock held in all filesystems. - */ -struct file_operations { - struct module *owner; - loff_t (*llseek) (struct file *, loff_t, int); - ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); - ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); - ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); - ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); - int (*readdir) (struct file *, void *, filldir_t); - unsigned int (*poll) (struct file *, struct poll_table_struct *); - int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); - long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); - long (*compat_ioctl) (struct file *, unsigned int, unsigned long); - int (*mmap) (struct file *, struct vm_area_struct *); - int (*open) (struct inode *, struct file *); - int (*flush) (struct file *, fl_owner_t id); - int (*release) (struct inode *, struct file *); - int (*fsync) (struct file *, struct dentry *, int datasync); - int (*aio_fsync) (struct kiocb *, int datasync); - int (*fasync) (int, struct file *, int); - int (*lock) (struct file *, int, struct file_lock *); - ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *); - ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); - unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); - int (*check_flags)(int); - int (*dir_notify)(struct file *filp, unsigned long arg); - int (*flock) (struct file *, int, struct file_lock *); - ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); - ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -}; - -struct inode_operations { - int (*create) (struct inode *,struct dentry *,int, struct nameidata *); - struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); - int (*link) (struct dentry *,struct inode *,struct dentry *); - int (*unlink) (struct inode *,struct dentry *); - int (*symlink) (struct inode *,struct dentry *,const char *); - int (*mkdir) (struct inode *,struct dentry *,int); - int (*rmdir) (struct inode *,struct dentry *); - int (*mknod) (struct inode *,struct dentry *,int,dev_t); - int (*rename) (struct inode *, struct dentry *, - struct inode *, struct dentry *); - int (*readlink) (struct dentry *, char __user *,int); - void * (*follow_link) (struct dentry *, struct nameidata *); - void (*put_link) (struct dentry *, struct nameidata *, void *); - void (*truncate) (struct inode *); - int (*permission) (struct inode *, int, struct nameidata *); - int (*setattr) (struct dentry *, struct iattr *); - int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); - int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); - ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); - ssize_t (*listxattr) (struct dentry *, char *, size_t); - int (*removexattr) (struct dentry *, const char *); - void (*truncate_range)(struct inode *, loff_t, loff_t); -}; - -struct seq_file; - -ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, - unsigned long nr_segs, unsigned long fast_segs, - struct iovec *fast_pointer, - struct iovec **ret_pointer); - -extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); -extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); -extern ssize_t vfs_readv(struct file *, const struct iovec __user *, - unsigned long, loff_t *); -extern ssize_t vfs_writev(struct file *, const struct iovec __user *, - unsigned long, loff_t *); - -/* - * NOTE: write_inode, delete_inode, clear_inode, put_inode can be called - * without the big kernel lock held in all filesystems. - */ -struct super_operations { - struct inode *(*alloc_inode)(struct super_block *sb); - void (*destroy_inode)(struct inode *); - - void (*read_inode) (struct inode *); - - void (*dirty_inode) (struct inode *); - int (*write_inode) (struct inode *, int); - void (*put_inode) (struct inode *); - void (*drop_inode) (struct inode *); - void (*delete_inode) (struct inode *); - void (*put_super) (struct super_block *); - void (*write_super) (struct super_block *); - int (*sync_fs)(struct super_block *sb, int wait); - void (*write_super_lockfs) (struct super_block *); - void (*unlockfs) (struct super_block *); - int (*statfs) (struct dentry *, struct kstatfs *); - int (*remount_fs) (struct super_block *, int *, char *); - void (*clear_inode) (struct inode *); - void (*umount_begin) (struct vfsmount *, int); - - int (*show_options)(struct seq_file *, struct vfsmount *); - int (*show_stats)(struct seq_file *, struct vfsmount *); -#ifdef CONFIG_QUOTA - ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); - ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); -#endif -}; - -/* Inode state bits. Protected by inode_lock. */ -#define I_DIRTY_SYNC 1 /* Not dirty enough for O_DATASYNC */ -#define I_DIRTY_DATASYNC 2 /* Data-related inode changes pending */ -#define I_DIRTY_PAGES 4 /* Data-related inode changes pending */ -#define __I_LOCK 3 -#define I_LOCK (1 << __I_LOCK) -#define I_FREEING 16 -#define I_CLEAR 32 -#define I_NEW 64 -#define I_WILL_FREE 128 - -#define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) - -extern void __mark_inode_dirty(struct inode *, int); -static inline void mark_inode_dirty(struct inode *inode) -{ - __mark_inode_dirty(inode, I_DIRTY); -} - -static inline void mark_inode_dirty_sync(struct inode *inode) -{ - __mark_inode_dirty(inode, I_DIRTY_SYNC); -} - -static inline void inc_nlink(struct inode *inode) -{ - inode->i_nlink++; -} - -static inline void inode_inc_link_count(struct inode *inode) -{ - inc_nlink(inode); - mark_inode_dirty(inode); -} - -static inline void drop_nlink(struct inode *inode) -{ - inode->i_nlink--; -} - -static inline void clear_nlink(struct inode *inode) -{ - inode->i_nlink = 0; -} - -static inline void inode_dec_link_count(struct inode *inode) -{ - drop_nlink(inode); - mark_inode_dirty(inode); -} - -extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); -static inline void file_accessed(struct file *file) -{ - if (!(file->f_flags & O_NOATIME)) - touch_atime(file->f_vfsmnt, file->f_dentry); -} - -int sync_inode(struct inode *inode, struct writeback_control *wbc); - -/** - * struct export_operations - for nfsd to communicate with file systems - * @decode_fh: decode a file handle fragment and return a &struct dentry - * @encode_fh: encode a file handle fragment from a dentry - * @get_name: find the name for a given inode in a given directory - * @get_parent: find the parent of a given directory - * @get_dentry: find a dentry for the inode given a file handle sub-fragment - * @find_exported_dentry: - * set by the exporting module to a standard helper function. - * - * Description: - * The export_operations structure provides a means for nfsd to communicate - * with a particular exported file system - particularly enabling nfsd and - * the filesystem to co-operate when dealing with file handles. - * - * export_operations contains two basic operation for dealing with file - * handles, decode_fh() and encode_fh(), and allows for some other - * operations to be defined which standard helper routines use to get - * specific information from the filesystem. - * - * nfsd encodes information use to determine which filesystem a filehandle - * applies to in the initial part of the file handle. The remainder, termed - * a file handle fragment, is controlled completely by the filesystem. The - * standard helper routines assume that this fragment will contain one or - * two sub-fragments, one which identifies the file, and one which may be - * used to identify the (a) directory containing the file. - * - * In some situations, nfsd needs to get a dentry which is connected into a - * specific part of the file tree. To allow for this, it passes the - * function acceptable() together with a @context which can be used to see - * if the dentry is acceptable. As there can be multiple dentrys for a - * given file, the filesystem should check each one for acceptability before - * looking for the next. As soon as an acceptable one is found, it should - * be returned. - * - * decode_fh: - * @decode_fh is given a &struct super_block (@sb), a file handle fragment - * (@fh, @fh_len) and an acceptability testing function (@acceptable, - * @context). It should return a &struct dentry which refers to the same - * file that the file handle fragment refers to, and which passes the - * acceptability test. If it cannot, it should return a %NULL pointer if - * the file was found but no acceptable &dentries were available, or a - * %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or - * %ENOMEM). - * - * encode_fh: - * @encode_fh should store in the file handle fragment @fh (using at most - * @max_len bytes) information that can be used by @decode_fh to recover the - * file refered to by the &struct dentry @de. If the @connectable flag is - * set, the encode_fh() should store sufficient information so that a good - * attempt can be made to find not only the file but also it's place in the - * filesystem. This typically means storing a reference to de->d_parent in - * the filehandle fragment. encode_fh() should return the number of bytes - * stored or a negative error code such as %-ENOSPC - * - * get_name: - * @get_name should find a name for the given @child in the given @parent - * directory. The name should be stored in the @name (with the - * understanding that it is already pointing to a a %NAME_MAX+1 sized - * buffer. get_name() should return %0 on success, a negative error code - * or error. @get_name will be called without @parent->i_mutex held. - * - * get_parent: - * @get_parent should find the parent directory for the given @child which - * is also a directory. In the event that it cannot be found, or storage - * space cannot be allocated, a %ERR_PTR should be returned. - * - * get_dentry: - * Given a &super_block (@sb) and a pointer to a file-system specific inode - * identifier, possibly an inode number, (@inump) get_dentry() should find - * the identified inode and return a dentry for that inode. Any suitable - * dentry can be returned including, if necessary, a new dentry created with - * d_alloc_root. The caller can then find any other extant dentrys by - * following the d_alias links. If a new dentry was created using - * d_alloc_root, DCACHE_NFSD_DISCONNECTED should be set, and the dentry - * should be d_rehash()ed. - * - * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code - * can be returned. The @inump will be whatever was passed to - * nfsd_find_fh_dentry() in either the @obj or @parent parameters. - * - * Locking rules: - * get_parent is called with child->d_inode->i_mutex down - * get_name is not (which is possibly inconsistent) - */ - -struct export_operations { - struct dentry *(*decode_fh)(struct super_block *sb, __u32 *fh, int fh_len, int fh_type, - int (*acceptable)(void *context, struct dentry *de), - void *context); - int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len, - int connectable); - - /* the following are only called from the filesystem itself */ - int (*get_name)(struct dentry *parent, char *name, - struct dentry *child); - struct dentry * (*get_parent)(struct dentry *child); - struct dentry * (*get_dentry)(struct super_block *sb, void *inump); - - /* This is set by the exporting module to a standard helper */ - struct dentry * (*find_exported_dentry)( - struct super_block *sb, void *obj, void *parent, - int (*acceptable)(void *context, struct dentry *de), - void *context); - - -}; - -extern struct dentry * -find_exported_dentry(struct super_block *sb, void *obj, void *parent, - int (*acceptable)(void *context, struct dentry *de), - void *context); - -struct file_system_type { - const char *name; - int fs_flags; - int (*get_sb) (struct file_system_type *, int, - const char *, void *, struct vfsmount *); - void (*kill_sb) (struct super_block *); - struct module *owner; - struct file_system_type * next; - struct list_head fs_supers; - struct lock_class_key s_lock_key; - struct lock_class_key s_umount_key; -}; - -extern int get_sb_bdev(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt); -extern int get_sb_single(struct file_system_type *fs_type, - int flags, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt); -extern int get_sb_nodev(struct file_system_type *fs_type, - int flags, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt); -void generic_shutdown_super(struct super_block *sb); -void kill_block_super(struct super_block *sb); -void kill_anon_super(struct super_block *sb); -void kill_litter_super(struct super_block *sb); -void deactivate_super(struct super_block *sb); -int set_anon_super(struct super_block *s, void *data); -struct super_block *sget(struct file_system_type *type, - int (*test)(struct super_block *,void *), - int (*set)(struct super_block *,void *), - void *data); -extern int get_sb_pseudo(struct file_system_type *, char *, - struct super_operations *ops, unsigned long, - struct vfsmount *mnt); -extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); -int __put_super(struct super_block *sb); -int __put_super_and_need_restart(struct super_block *sb); -void unnamed_dev_init(void); - -/* Alas, no aliases. Too much hassle with bringing module.h everywhere */ -#define fops_get(fops) \ - (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) -#define fops_put(fops) \ - do { if (fops) module_put((fops)->owner); } while(0) - -extern int register_filesystem(struct file_system_type *); -extern int unregister_filesystem(struct file_system_type *); -extern struct vfsmount *kern_mount(struct file_system_type *); -extern int may_umount_tree(struct vfsmount *); -extern int may_umount(struct vfsmount *); -extern void umount_tree(struct vfsmount *, int, struct list_head *); -extern void release_mounts(struct list_head *); -extern long do_mount(char *, char *, char *, unsigned long, void *); -extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); -extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, - struct vfsmount *); - -extern int vfs_statfs(struct dentry *, struct kstatfs *); - -/* /sys/fs */ -extern struct subsystem fs_subsys; - -#define FLOCK_VERIFY_READ 1 -#define FLOCK_VERIFY_WRITE 2 - -extern int locks_mandatory_locked(struct inode *); -extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); - -/* - * Candidates for mandatory locking have the setgid bit set - * but no group execute bit - an otherwise meaningless combination. - */ -#define MANDATORY_LOCK(inode) \ - (IS_MANDLOCK(inode) && ((inode)->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) - -static inline int locks_verify_locked(struct inode *inode) -{ - if (MANDATORY_LOCK(inode)) - return locks_mandatory_locked(inode); - return 0; -} - -extern int rw_verify_area(int, struct file *, loff_t *, size_t); - -static inline int locks_verify_truncate(struct inode *inode, - struct file *filp, - loff_t size) -{ - if (inode->i_flock && MANDATORY_LOCK(inode)) - return locks_mandatory_area( - FLOCK_VERIFY_WRITE, inode, filp, - size < inode->i_size ? size : inode->i_size, - (size < inode->i_size ? inode->i_size - size - : size - inode->i_size) - ); - return 0; -} - -static inline int break_lease(struct inode *inode, unsigned int mode) -{ - if (inode->i_flock) - return __break_lease(inode, mode); - return 0; -} - -/* fs/open.c */ - -extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, - struct file *filp); -extern long do_sys_open(int fdf, const char __user *filename, int flags, - int mode); -extern struct file *filp_open(const char *, int, int); -extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); -extern int filp_close(struct file *, fl_owner_t id); -extern char * getname(const char __user *); - -/* fs/dcache.c */ -extern void __init vfs_caches_init_early(void); -extern void __init vfs_caches_init(unsigned long); - -#define __getname() kmem_cache_alloc(names_cachep, SLAB_KERNEL) -#define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) -#ifndef CONFIG_AUDITSYSCALL -#define putname(name) __putname(name) -#else -extern void putname(const char *name); -#endif - -#ifdef CONFIG_BLOCK -extern int register_blkdev(unsigned int, const char *); -extern int unregister_blkdev(unsigned int, const char *); -extern struct block_device *bdget(dev_t); -extern void bd_set_size(struct block_device *, loff_t size); -extern void bd_forget(struct inode *inode); -extern void bdput(struct block_device *); -extern struct block_device *open_by_devnum(dev_t, unsigned); -extern struct block_device *open_partition_by_devnum(dev_t, unsigned); -extern const struct address_space_operations def_blk_aops; -#else -static inline void bd_forget(struct inode *inode) {} -#endif -extern const struct file_operations def_blk_fops; -extern const struct file_operations def_chr_fops; -extern const struct file_operations bad_sock_fops; -extern const struct file_operations def_fifo_fops; -#ifdef CONFIG_BLOCK -extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); -extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); -extern int blkdev_driver_ioctl(struct inode *inode, struct file *file, - struct gendisk *disk, unsigned cmd, - unsigned long arg); -extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); -extern int blkdev_get(struct block_device *, mode_t, unsigned); -extern int blkdev_put(struct block_device *); -extern int blkdev_put_partition(struct block_device *); -extern int bd_claim(struct block_device *, void *); -extern void bd_release(struct block_device *); -#ifdef CONFIG_SYSFS -extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *); -extern void bd_release_from_disk(struct block_device *, struct gendisk *); -#else -#define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder) -#define bd_release_from_disk(bdev, disk) bd_release(bdev) -#endif -#endif - -/* fs/char_dev.c */ -#define CHRDEV_MAJOR_HASH_SIZE 255 -extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); -extern int register_chrdev_region(dev_t, unsigned, const char *); -extern int register_chrdev(unsigned int, const char *, - const struct file_operations *); -extern int unregister_chrdev(unsigned int, const char *); -extern void unregister_chrdev_region(dev_t, unsigned); -extern int chrdev_open(struct inode *, struct file *); -extern void chrdev_show(struct seq_file *,off_t); - -/* fs/block_dev.c */ -#define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ - -#ifdef CONFIG_BLOCK -#define BLKDEV_MAJOR_HASH_SIZE 255 -extern const char *__bdevname(dev_t, char *buffer); -extern const char *bdevname(struct block_device *bdev, char *buffer); -extern struct block_device *lookup_bdev(const char *); -extern struct block_device *open_bdev_excl(const char *, int, void *); -extern void close_bdev_excl(struct block_device *); -extern void blkdev_show(struct seq_file *,off_t); -#else -#define BLKDEV_MAJOR_HASH_SIZE 0 -#endif - -extern void init_special_inode(struct inode *, umode_t, dev_t); - -/* Invalid inode operations -- fs/bad_inode.c */ -extern void make_bad_inode(struct inode *); -extern int is_bad_inode(struct inode *); - -extern const struct file_operations read_fifo_fops; -extern const struct file_operations write_fifo_fops; -extern const struct file_operations rdwr_fifo_fops; - -extern int fs_may_remount_ro(struct super_block *); - -#ifdef CONFIG_BLOCK -/* - * return READ, READA, or WRITE - */ -#define bio_rw(bio) ((bio)->bi_rw & (RW_MASK | RWA_MASK)) - -/* - * return data direction, READ or WRITE - */ -#define bio_data_dir(bio) ((bio)->bi_rw & 1) - -extern int check_disk_change(struct block_device *); -extern int __invalidate_device(struct block_device *); -extern int invalidate_partition(struct gendisk *, int); -#endif -extern int invalidate_inodes(struct super_block *); -unsigned long invalidate_mapping_pages(struct address_space *mapping, - pgoff_t start, pgoff_t end); -unsigned long invalidate_inode_pages(struct address_space *mapping); -static inline void invalidate_remote_inode(struct inode *inode) -{ - if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || - S_ISLNK(inode->i_mode)) - invalidate_inode_pages(inode->i_mapping); -} -extern int invalidate_inode_pages2(struct address_space *mapping); -extern int invalidate_inode_pages2_range(struct address_space *mapping, - pgoff_t start, pgoff_t end); -extern int write_inode_now(struct inode *, int); -extern int filemap_fdatawrite(struct address_space *); -extern int filemap_flush(struct address_space *); -extern int filemap_fdatawait(struct address_space *); -extern int filemap_write_and_wait(struct address_space *mapping); -extern int filemap_write_and_wait_range(struct address_space *mapping, - loff_t lstart, loff_t lend); -extern int wait_on_page_writeback_range(struct address_space *mapping, - pgoff_t start, pgoff_t end); -extern int __filemap_fdatawrite_range(struct address_space *mapping, - loff_t start, loff_t end, int sync_mode); - -extern long do_fsync(struct file *file, int datasync); -extern void sync_supers(void); -extern void sync_filesystems(int wait); -extern void __fsync_super(struct super_block *sb); -extern void emergency_sync(void); -extern void emergency_remount(void); -extern int do_remount_sb(struct super_block *sb, int flags, - void *data, int force); -#ifdef CONFIG_BLOCK -extern sector_t bmap(struct inode *, sector_t); -#endif -extern int notify_change(struct dentry *, struct iattr *); -extern int permission(struct inode *, int, struct nameidata *); -extern int generic_permission(struct inode *, int, - int (*check_acl)(struct inode *, int)); - -extern int get_write_access(struct inode *); -extern int deny_write_access(struct file *); -static inline void put_write_access(struct inode * inode) -{ - atomic_dec(&inode->i_writecount); -} -static inline void allow_write_access(struct file *file) -{ - if (file) - atomic_inc(&file->f_dentry->d_inode->i_writecount); -} -extern int do_pipe(int *); -extern struct file *create_read_pipe(struct file *f); -extern struct file *create_write_pipe(void); -extern void free_write_pipe(struct file *); - -extern int open_namei(int dfd, const char *, int, int, struct nameidata *); -extern int may_open(struct nameidata *, int, int); - -extern int kernel_read(struct file *, unsigned long, char *, unsigned long); -extern struct file * open_exec(const char *); - -/* fs/dcache.c -- generic fs support functions */ -extern int is_subdir(struct dentry *, struct dentry *); -extern ino_t find_inode_number(struct dentry *, struct qstr *); - -#include - -/* needed for stackable file system support */ -extern loff_t default_llseek(struct file *file, loff_t offset, int origin); - -extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); - -extern void inode_init_once(struct inode *); -extern void iput(struct inode *); -extern struct inode * igrab(struct inode *); -extern ino_t iunique(struct super_block *, ino_t); -extern int inode_needs_sync(struct inode *inode); -extern void generic_delete_inode(struct inode *inode); -extern void generic_drop_inode(struct inode *inode); - -extern struct inode *ilookup5_nowait(struct super_block *sb, - unsigned long hashval, int (*test)(struct inode *, void *), - void *data); -extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, - int (*test)(struct inode *, void *), void *data); -extern struct inode *ilookup(struct super_block *sb, unsigned long ino); - -extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); -extern struct inode * iget_locked(struct super_block *, unsigned long); -extern void unlock_new_inode(struct inode *); - -static inline struct inode *iget(struct super_block *sb, unsigned long ino) -{ - struct inode *inode = iget_locked(sb, ino); - - if (inode && (inode->i_state & I_NEW)) { - sb->s_op->read_inode(inode); - unlock_new_inode(inode); - } - - return inode; -} - -extern void __iget(struct inode * inode); -extern void clear_inode(struct inode *); -extern void destroy_inode(struct inode *); -extern struct inode *new_inode(struct super_block *); -extern int __remove_suid(struct dentry *, int); -extern int should_remove_suid(struct dentry *); -extern int remove_suid(struct dentry *); -extern void remove_dquot_ref(struct super_block *, int, struct list_head *); - -extern void __insert_inode_hash(struct inode *, unsigned long hashval); -extern void remove_inode_hash(struct inode *); -static inline void insert_inode_hash(struct inode *inode) { - __insert_inode_hash(inode, inode->i_ino); -} - -extern struct file * get_empty_filp(void); -extern void file_move(struct file *f, struct list_head *list); -extern void file_kill(struct file *f); -#ifdef CONFIG_BLOCK -struct bio; -extern void submit_bio(int, struct bio *); -extern int bdev_read_only(struct block_device *); -#endif -extern int set_blocksize(struct block_device *, int); -extern int sb_set_blocksize(struct super_block *, int); -extern int sb_min_blocksize(struct super_block *, int); - -extern int generic_file_mmap(struct file *, struct vm_area_struct *); -extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); -extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); -extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); -int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); -extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); -extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); -extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, - unsigned long, loff_t); -extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, - unsigned long *, loff_t, loff_t *, size_t, size_t); -extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, - unsigned long, loff_t, loff_t *, size_t, ssize_t); -extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); -extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); -extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); -extern void do_generic_mapping_read(struct address_space *mapping, - struct file_ra_state *, struct file *, - loff_t *, read_descriptor_t *, read_actor_t); - -/* fs/splice.c */ -extern ssize_t generic_file_splice_read(struct file *, loff_t *, - struct pipe_inode_info *, size_t, unsigned int); -extern ssize_t generic_file_splice_write(struct pipe_inode_info *, - struct file *, loff_t *, size_t, unsigned int); -extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *, - struct file *, loff_t *, size_t, unsigned int); -extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, - struct file *out, loff_t *, size_t len, unsigned int flags); -extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, - size_t len, unsigned int flags); - -extern void -file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); -extern loff_t no_llseek(struct file *file, loff_t offset, int origin); -extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); -extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); -extern int generic_file_open(struct inode * inode, struct file * filp); -extern int nonseekable_open(struct inode * inode, struct file * filp); - -#ifdef CONFIG_FS_XIP -extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len, - loff_t *ppos); -extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos, - size_t count, read_actor_t actor, - void *target); -extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); -extern ssize_t xip_file_write(struct file *filp, const char __user *buf, - size_t len, loff_t *ppos); -extern int xip_truncate_page(struct address_space *mapping, loff_t from); -#else -static inline int xip_truncate_page(struct address_space *mapping, loff_t from) -{ - return 0; -} -#endif - -static inline void do_generic_file_read(struct file * filp, loff_t *ppos, - read_descriptor_t * desc, - read_actor_t actor) -{ - do_generic_mapping_read(filp->f_mapping, - &filp->f_ra, - filp, - ppos, - desc, - actor); -} - -#ifdef CONFIG_BLOCK -ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, - struct block_device *bdev, const struct iovec *iov, loff_t offset, - unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, - int lock_type); - -enum { - DIO_LOCKING = 1, /* need locking between buffered and direct access */ - DIO_NO_LOCKING, /* bdev; no locking at all between buffered/direct */ - DIO_OWN_LOCKING, /* filesystem locks buffered and direct internally */ -}; - -static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, - struct inode *inode, struct block_device *bdev, const struct iovec *iov, - loff_t offset, unsigned long nr_segs, get_block_t get_block, - dio_iodone_t end_io) -{ - return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, - nr_segs, get_block, end_io, DIO_LOCKING); -} - -static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, - struct inode *inode, struct block_device *bdev, const struct iovec *iov, - loff_t offset, unsigned long nr_segs, get_block_t get_block, - dio_iodone_t end_io) -{ - return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, - nr_segs, get_block, end_io, DIO_NO_LOCKING); -} - -static inline ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, - struct inode *inode, struct block_device *bdev, const struct iovec *iov, - loff_t offset, unsigned long nr_segs, get_block_t get_block, - dio_iodone_t end_io) -{ - return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, - nr_segs, get_block, end_io, DIO_OWN_LOCKING); -} -#endif - -extern const struct file_operations generic_ro_fops; - -#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) - -extern int vfs_readlink(struct dentry *, char __user *, int, const char *); -extern int vfs_follow_link(struct nameidata *, const char *); -extern int page_readlink(struct dentry *, char __user *, int); -extern void *page_follow_link_light(struct dentry *, struct nameidata *); -extern void page_put_link(struct dentry *, struct nameidata *, void *); -extern int __page_symlink(struct inode *inode, const char *symname, int len, - gfp_t gfp_mask); -extern int page_symlink(struct inode *inode, const char *symname, int len); -extern struct inode_operations page_symlink_inode_operations; -extern int generic_readlink(struct dentry *, char __user *, int); -extern void generic_fillattr(struct inode *, struct kstat *); -extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); -void inode_add_bytes(struct inode *inode, loff_t bytes); -void inode_sub_bytes(struct inode *inode, loff_t bytes); -loff_t inode_get_bytes(struct inode *inode); -void inode_set_bytes(struct inode *inode, loff_t bytes); - -extern int vfs_readdir(struct file *, filldir_t, void *); - -extern int vfs_stat(char __user *, struct kstat *); -extern int vfs_lstat(char __user *, struct kstat *); -extern int vfs_stat_fd(int dfd, char __user *, struct kstat *); -extern int vfs_lstat_fd(int dfd, char __user *, struct kstat *); -extern int vfs_fstat(unsigned int, struct kstat *); - -extern int vfs_ioctl(struct file *, unsigned int, unsigned int, unsigned long); - -extern struct file_system_type *get_fs_type(const char *name); -extern struct super_block *get_super(struct block_device *); -extern struct super_block *user_get_super(dev_t); -extern void drop_super(struct super_block *sb); - -extern int dcache_dir_open(struct inode *, struct file *); -extern int dcache_dir_close(struct inode *, struct file *); -extern loff_t dcache_dir_lseek(struct file *, loff_t, int); -extern int dcache_readdir(struct file *, void *, filldir_t); -extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); -extern int simple_statfs(struct dentry *, struct kstatfs *); -extern int simple_link(struct dentry *, struct inode *, struct dentry *); -extern int simple_unlink(struct inode *, struct dentry *); -extern int simple_rmdir(struct inode *, struct dentry *); -extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); -extern int simple_sync_file(struct file *, struct dentry *, int); -extern int simple_empty(struct dentry *); -extern int simple_readpage(struct file *file, struct page *page); -extern int simple_prepare_write(struct file *file, struct page *page, - unsigned offset, unsigned to); -extern int simple_commit_write(struct file *file, struct page *page, - unsigned offset, unsigned to); - -extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); -extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); -extern const struct file_operations simple_dir_operations; -extern struct inode_operations simple_dir_inode_operations; -struct tree_descr { char *name; const struct file_operations *ops; int mode; }; -struct dentry *d_alloc_name(struct dentry *, const char *); -extern int simple_fill_super(struct super_block *, int, struct tree_descr *); -extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); -extern void simple_release_fs(struct vfsmount **mount, int *count); - -extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); - -#ifdef CONFIG_MIGRATION -extern int buffer_migrate_page(struct address_space *, - struct page *, struct page *); -#else -#define buffer_migrate_page NULL -#endif - -extern int inode_change_ok(struct inode *, struct iattr *); -extern int __must_check inode_setattr(struct inode *, struct iattr *); - -extern void file_update_time(struct file *file); - -static inline ino_t parent_ino(struct dentry *dentry) -{ - ino_t res; - - spin_lock(&dentry->d_lock); - res = dentry->d_parent->d_inode->i_ino; - spin_unlock(&dentry->d_lock); - return res; -} - -/* kernel/fork.c */ -extern int unshare_files(void); - -/* Transaction based IO helpers */ - -/* - * An argresp is stored in an allocated page and holds the - * size of the argument or response, along with its content - */ -struct simple_transaction_argresp { - ssize_t size; - char data[0]; -}; - -#define SIMPLE_TRANSACTION_LIMIT (PAGE_SIZE - sizeof(struct simple_transaction_argresp)) - -char *simple_transaction_get(struct file *file, const char __user *buf, - size_t size); -ssize_t simple_transaction_read(struct file *file, char __user *buf, - size_t size, loff_t *pos); -int simple_transaction_release(struct inode *inode, struct file *file); - -static inline void simple_transaction_set(struct file *file, size_t n) -{ - struct simple_transaction_argresp *ar = file->private_data; - - BUG_ON(n > SIMPLE_TRANSACTION_LIMIT); - - /* - * The barrier ensures that ar->size will really remain zero until - * ar->data is ready for reading. - */ - smp_mb(); - ar->size = n; -} - -/* - * simple attribute files - * - * These attributes behave similar to those in sysfs: - * - * Writing to an attribute immediately sets a value, an open file can be - * written to multiple times. - * - * Reading from an attribute creates a buffer from the value that might get - * read with multiple read calls. When the attribute has been read - * completely, no further read calls are possible until the file is opened - * again. - * - * All attributes contain a text representation of a numeric value - * that are accessed with the get() and set() functions. - */ -#define DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \ -static int __fops ## _open(struct inode *inode, struct file *file) \ -{ \ - __simple_attr_check_format(__fmt, 0ull); \ - return simple_attr_open(inode, file, __get, __set, __fmt); \ -} \ -static struct file_operations __fops = { \ - .owner = THIS_MODULE, \ - .open = __fops ## _open, \ - .release = simple_attr_close, \ - .read = simple_attr_read, \ - .write = simple_attr_write, \ -}; - -static inline void __attribute__((format(printf, 1, 2))) -__simple_attr_check_format(const char *fmt, ...) -{ - /* don't do anything, just let the compiler check the arguments; */ -} - -int simple_attr_open(struct inode *inode, struct file *file, - u64 (*get)(void *), void (*set)(void *, u64), - const char *fmt); -int simple_attr_close(struct inode *inode, struct file *file); -ssize_t simple_attr_read(struct file *file, char __user *buf, - size_t len, loff_t *ppos); -ssize_t simple_attr_write(struct file *file, const char __user *buf, - size_t len, loff_t *ppos); - - -#ifdef CONFIG_SECURITY -static inline char *alloc_secdata(void) -{ - return (char *)get_zeroed_page(GFP_KERNEL); -} - -static inline void free_secdata(void *secdata) -{ - free_page((unsigned long)secdata); -} -#else -static inline char *alloc_secdata(void) -{ - return (char *)1; -} - -static inline void free_secdata(void *secdata) -{ } -#endif /* CONFIG_SECURITY */ - -#endif /* __KERNEL__ */ #endif /* _LINUX_FS_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ftape.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ftape.h 2007-05-24 15:40:43.000000000 +0200 @@ -30,10 +30,6 @@ #define FTAPE_VERSION "ftape v3.04d 25/11/97" -#ifdef __KERNEL__ -#include -#include -#endif #include #include @@ -74,128 +70,5 @@ long space; } ft_drive_status; -#ifdef __KERNEL__ - -#define FT_RQM_DELAY 12 -#define FT_MILLISECOND 1 -#define FT_SECOND 1000 -#define FT_FOREVER -1 -#ifndef HZ -#error "HZ undefined." -#endif -#define FT_USPT (1000000/HZ) /* microseconds per tick */ - -/* This defines the number of retries that the driver will allow - * before giving up (and letting a higher level handle the error). - */ -#ifdef TESTING -#define FT_SOFT_RETRIES 1 /* number of low level retries */ -#define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */ -#else -#define FT_SOFT_RETRIES 6 /* number of low level retries (triple) */ -#define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */ -#endif - -#ifndef THE_FTAPE_MAINTAINER -#define THE_FTAPE_MAINTAINER "the ftape maintainer" -#endif - -/* Initialize missing configuration parameters. - */ -#ifndef CONFIG_FT_NR_BUFFERS -# define CONFIG_FT_NR_BUFFERS 3 -#endif -#ifndef CONFIG_FT_FDC_THR -# define CONFIG_FT_FDC_THR 8 -#endif -#ifndef CONFIG_FT_FDC_MAX_RATE -# define CONFIG_FT_FDC_MAX_RATE 2000 -#endif -#ifndef CONFIG_FT_FDC_BASE -# define CONFIG_FT_FDC_BASE 0 -#endif -#ifndef CONFIG_FT_FDC_IRQ -# define CONFIG_FT_FDC_IRQ 0 -#endif -#ifndef CONFIG_FT_FDC_DMA -# define CONFIG_FT_FDC_DMA 0 -#endif - -/* Turn some booleans into numbers. - */ -#ifdef CONFIG_FT_PROBE_FC10 -# undef CONFIG_FT_PROBE_FC10 -# define CONFIG_FT_PROBE_FC10 1 -#else -# define CONFIG_FT_PROBE_FC10 0 -#endif -#ifdef CONFIG_FT_MACH2 -# undef CONFIG_FT_MACH2 -# define CONFIG_FT_MACH2 1 -#else -# define CONFIG_FT_MACH2 0 -#endif - -/* Insert default settings - */ -#if CONFIG_FT_PROBE_FC10 == 1 -# if CONFIG_FT_FDC_BASE == 0 -# undef CONFIG_FT_FDC_BASE -# define CONFIG_FT_FDC_BASE 0x180 -# endif -# if CONFIG_FT_FDC_IRQ == 0 -# undef CONFIG_FT_FDC_IRQ -# define CONFIG_FT_FDC_IRQ 9 -# endif -# if CONFIG_FT_FDC_DMA == 0 -# undef CONFIG_FT_FDC_DMA -# define CONFIG_FT_FDC_DMA 3 -# endif -#elif CONFIG_FT_MACH2 == 1 /* CONFIG_FT_PROBE_FC10 == 1 */ -# if CONFIG_FT_FDC_BASE == 0 -# undef CONFIG_FT_FDC_BASE -# define CONFIG_FT_FDC_BASE 0x1E0 -# endif -# if CONFIG_FT_FDC_IRQ == 0 -# undef CONFIG_FT_FDC_IRQ -# define CONFIG_FT_FDC_IRQ 6 -# endif -# if CONFIG_FT_FDC_DMA == 0 -# undef CONFIG_FT_FDC_DMA -# define CONFIG_FT_FDC_DMA 2 -# endif -#elif defined(CONFIG_FT_ALT_FDC) /* CONFIG_FT_MACH2 */ -# if CONFIG_FT_FDC_BASE == 0 -# undef CONFIG_FT_FDC_BASE -# define CONFIG_FT_FDC_BASE 0x370 -# endif -# if CONFIG_FT_FDC_IRQ == 0 -# undef CONFIG_FT_FDC_IRQ -# define CONFIG_FT_FDC_IRQ 6 -# endif -# if CONFIG_FT_FDC_DMA == 0 -# undef CONFIG_FT_FDC_DMA -# define CONFIG_FT_FDC_DMA 2 -# endif -#else /* CONFIG_FT_ALT_FDC */ -# if CONFIG_FT_FDC_BASE == 0 -# undef CONFIG_FT_FDC_BASE -# define CONFIG_FT_FDC_BASE 0x3f0 -# endif -# if CONFIG_FT_FDC_IRQ == 0 -# undef CONFIG_FT_FDC_IRQ -# define CONFIG_FT_FDC_IRQ 6 -# endif -# if CONFIG_FT_FDC_DMA == 0 -# undef CONFIG_FT_FDC_DMA -# define CONFIG_FT_FDC_DMA 2 -# endif -#endif /* standard FDC */ - -/* some useful macro's - */ -#define NR_ITEMS(x) (int)(sizeof(x)/ sizeof(*x)) - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/gameport.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/gameport.h 2007-05-24 15:40:43.000000000 +0200 @@ -9,153 +9,6 @@ * the Free Software Foundation. */ -#ifdef __KERNEL__ -#include -#include -#include -#include -#include - -struct gameport { - - void *port_data; /* Private pointer for gameport drivers */ - char name[32]; - char phys[32]; - - int io; - int speed; - int fuzz; - - void (*trigger)(struct gameport *); - unsigned char (*read)(struct gameport *); - int (*cooked_read)(struct gameport *, int *, int *); - int (*calibrate)(struct gameport *, int *, int *); - int (*open)(struct gameport *, int); - void (*close)(struct gameport *); - - struct timer_list poll_timer; - unsigned int poll_interval; /* in msecs */ - spinlock_t timer_lock; - unsigned int poll_cnt; - void (*poll_handler)(struct gameport *); - - struct gameport *parent, *child; - - struct gameport_driver *drv; - struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ - - struct device dev; - unsigned int registered; /* port has been fully registered with driver core */ - - struct list_head node; -}; -#define to_gameport_port(d) container_of(d, struct gameport, dev) - -struct gameport_driver { - - void *private; - char *description; - - int (*connect)(struct gameport *, struct gameport_driver *drv); - int (*reconnect)(struct gameport *); - void (*disconnect)(struct gameport *); - - struct device_driver driver; - - unsigned int ignore; -}; -#define to_gameport_driver(d) container_of(d, struct gameport_driver, driver) - -int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode); -void gameport_close(struct gameport *gameport); -void gameport_rescan(struct gameport *gameport); - -#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) - -void __gameport_register_port(struct gameport *gameport, struct module *owner); -static inline void gameport_register_port(struct gameport *gameport) -{ - __gameport_register_port(gameport, THIS_MODULE); -} - -void gameport_unregister_port(struct gameport *gameport); - -void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) - __attribute__ ((format (printf, 2, 3))); - -#else - -static inline void gameport_register_port(struct gameport *gameport) -{ - return; -} - -static inline void gameport_unregister_port(struct gameport *gameport) -{ - return; -} - -static inline void gameport_set_phys(struct gameport *gameport, - const char *fmt, ...) -{ - return; -} - -#endif - -static inline struct gameport *gameport_allocate_port(void) -{ - struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); - - return gameport; -} - -static inline void gameport_free_port(struct gameport *gameport) -{ - kfree(gameport); -} - -static inline void gameport_set_name(struct gameport *gameport, const char *name) -{ - strlcpy(gameport->name, name, sizeof(gameport->name)); -} - -/* - * Use the following functions to manipulate gameport's per-port - * driver-specific data. - */ -static inline void *gameport_get_drvdata(struct gameport *gameport) -{ - return dev_get_drvdata(&gameport->dev); -} - -static inline void gameport_set_drvdata(struct gameport *gameport, void *data) -{ - dev_set_drvdata(&gameport->dev, data); -} - -/* - * Use the following functions to pin gameport's driver in process context - */ -static inline int gameport_pin_driver(struct gameport *gameport) -{ - return mutex_lock_interruptible(&gameport->drv_mutex); -} - -static inline void gameport_unpin_driver(struct gameport *gameport) -{ - mutex_unlock(&gameport->drv_mutex); -} - -void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); -static inline void gameport_register_driver(struct gameport_driver *drv) -{ - __gameport_register_driver(drv, THIS_MODULE); -} - -void gameport_unregister_driver(struct gameport_driver *drv); - -#endif /* __KERNEL__ */ #define GAMEPORT_MODE_DISABLED 0 #define GAMEPORT_MODE_RAW 1 @@ -172,57 +25,4 @@ #define GAMEPORT_ID_VENDOR_GRAVIS 0x0009 #define GAMEPORT_ID_VENDOR_GUILLEMOT 0x000a -#ifdef __KERNEL__ - -static inline void gameport_trigger(struct gameport *gameport) -{ - if (gameport->trigger) - gameport->trigger(gameport); - else - outb(0xff, gameport->io); -} - -static inline unsigned char gameport_read(struct gameport *gameport) -{ - if (gameport->read) - return gameport->read(gameport); - else - return inb(gameport->io); -} - -static inline int gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) -{ - if (gameport->cooked_read) - return gameport->cooked_read(gameport, axes, buttons); - else - return -1; -} - -static inline int gameport_calibrate(struct gameport *gameport, int *axes, int *max) -{ - if (gameport->calibrate) - return gameport->calibrate(gameport, axes, max); - else - return -1; -} - -static inline int gameport_time(struct gameport *gameport, int time) -{ - return (time * gameport->speed) / 1000; -} - -static inline void gameport_set_poll_handler(struct gameport *gameport, void (*handler)(struct gameport *)) -{ - gameport->poll_handler = handler; -} - -static inline void gameport_set_poll_interval(struct gameport *gameport, unsigned int msecs) -{ - gameport->poll_interval = msecs; -} - -void gameport_start_polling(struct gameport *gameport); -void gameport_stop_polling(struct gameport *gameport); - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/generic_serial.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/generic_serial.h 2007-05-24 15:40:43.000000000 +0200 @@ -12,50 +12,6 @@ #ifndef GENERIC_SERIAL_H #define GENERIC_SERIAL_H -#ifdef __KERNEL__ -#include - -struct real_driver { - void (*disable_tx_interrupts) (void *); - void (*enable_tx_interrupts) (void *); - void (*disable_rx_interrupts) (void *); - void (*enable_rx_interrupts) (void *); - int (*get_CD) (void *); - void (*shutdown_port) (void*); - int (*set_real_termios) (void*); - int (*chars_in_buffer) (void*); - void (*close) (void*); - void (*hungup) (void*); - void (*getserial) (void*, struct serial_struct *sp); -}; - - - -struct gs_port { - int magic; - unsigned char *xmit_buf; - int xmit_head; - int xmit_tail; - int xmit_cnt; - struct mutex port_write_mutex; - int flags; - wait_queue_head_t open_wait; - wait_queue_head_t close_wait; - int count; - int blocked_open; - struct tty_struct *tty; - unsigned long event; - unsigned short closing_wait; - int close_delay; - struct real_driver *rd; - int wakeup_chars; - int baud_base; - int baud; - int custom_divisor; - spinlock_t driver_lock; -}; - -#endif /* __KERNEL__ */ /* Flags */ /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" @@ -77,24 +33,4 @@ #define GS_DEBUG_FLOW 0x00000020 #define GS_DEBUG_WRITE 0x00000040 -#ifdef __KERNEL__ -void gs_put_char(struct tty_struct *tty, unsigned char ch); -int gs_write(struct tty_struct *tty, - const unsigned char *buf, int count); -int gs_write_room(struct tty_struct *tty); -int gs_chars_in_buffer(struct tty_struct *tty); -void gs_flush_buffer(struct tty_struct *tty); -void gs_flush_chars(struct tty_struct *tty); -void gs_stop(struct tty_struct *tty); -void gs_start(struct tty_struct *tty); -void gs_hangup(struct tty_struct *tty); -int gs_block_til_ready(void *port, struct file *filp); -void gs_close(struct tty_struct *tty, struct file *filp); -void gs_set_termios (struct tty_struct * tty, - struct termios * old_termios); -int gs_init_port(struct gs_port *port); -int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); -int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); -void gs_got_break(struct gs_port *port); -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/genhd.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/genhd.h 2007-05-24 15:40:43.000000000 +0200 @@ -39,7 +39,6 @@ UNIXWARE_PARTITION = 0x63, /* Same as GNU_HURD and SCO Unix */ }; -#ifndef __KERNEL__ struct partition { unsigned char boot_ind; /* 0x80 - active */ @@ -54,202 +53,7 @@ unsigned int nr_sects; /* nr of sectors in partition */ } __attribute__((packed)); -#endif -#ifdef __KERNEL__ -#include -#include -#include -#include -#include - -struct partition { - unsigned char boot_ind; /* 0x80 - active */ - unsigned char head; /* starting head */ - unsigned char sector; /* starting sector */ - unsigned char cyl; /* starting cylinder */ - unsigned char sys_ind; /* What partition type */ - unsigned char end_head; /* end head */ - unsigned char end_sector; /* end sector */ - unsigned char end_cyl; /* end cylinder */ - __le32 start_sect; /* starting sector counting from 0 */ - __le32 nr_sects; /* nr of sectors in partition */ -} __attribute__((packed)); - -struct hd_struct { - sector_t start_sect; - sector_t nr_sects; - struct kobject kobj; - struct kobject *holder_dir; - unsigned ios[2], sectors[2]; /* READs and WRITEs */ - int policy, partno; -}; - -#define GENHD_FL_REMOVABLE 1 -#define GENHD_FL_DRIVERFS 2 -#define GENHD_FL_CD 8 -#define GENHD_FL_UP 16 -#define GENHD_FL_SUPPRESS_PARTITION_INFO 32 - -struct disk_stats { - unsigned long sectors[2]; /* READs and WRITEs */ - unsigned long ios[2]; - unsigned long merges[2]; - unsigned long ticks[2]; - unsigned long io_ticks; - unsigned long time_in_queue; -}; - -struct gendisk { - int major; /* major number of driver */ - int first_minor; - int minors; /* maximum number of minors, =1 for - * disks that can't be partitioned. */ - char disk_name[32]; /* name of major driver */ - struct hd_struct **part; /* [indexed by minor] */ - int part_uevent_suppress; - struct block_device_operations *fops; - struct request_queue *queue; - void *private_data; - sector_t capacity; - - int flags; - struct device *driverfs_dev; - struct kobject kobj; - struct kobject *holder_dir; - struct kobject *slave_dir; - - struct timer_rand_state *random; - int policy; - - atomic_t sync_io; /* RAID */ - unsigned long stamp; - int in_flight; -#ifdef CONFIG_SMP - struct disk_stats *dkstats; -#else - struct disk_stats dkstats; -#endif -}; - -/* Structure for sysfs attributes on block devices */ -struct disk_attribute { - struct attribute attr; - ssize_t (*show)(struct gendisk *, char *); - ssize_t (*store)(struct gendisk *, const char *, size_t); -}; - -/* - * Macros to operate on percpu disk statistics: - * - * The __ variants should only be called in critical sections. The full - * variants disable/enable preemption. - */ -#ifdef CONFIG_SMP -#define __disk_stat_add(gendiskp, field, addnd) \ - (per_cpu_ptr(gendiskp->dkstats, smp_processor_id())->field += addnd) - -#define disk_stat_read(gendiskp, field) \ -({ \ - typeof(gendiskp->dkstats->field) res = 0; \ - int i; \ - for_each_possible_cpu(i) \ - res += per_cpu_ptr(gendiskp->dkstats, i)->field; \ - res; \ -}) - -static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { - int i; - for_each_possible_cpu(i) - memset(per_cpu_ptr(gendiskp->dkstats, i), value, - sizeof (struct disk_stats)); -} - -#else -#define __disk_stat_add(gendiskp, field, addnd) \ - (gendiskp->dkstats.field += addnd) -#define disk_stat_read(gendiskp, field) (gendiskp->dkstats.field) - -static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { - memset(&gendiskp->dkstats, value, sizeof (struct disk_stats)); -} -#endif - -#define disk_stat_add(gendiskp, field, addnd) \ - do { \ - preempt_disable(); \ - __disk_stat_add(gendiskp, field, addnd); \ - preempt_enable(); \ - } while (0) - -#define __disk_stat_dec(gendiskp, field) __disk_stat_add(gendiskp, field, -1) -#define disk_stat_dec(gendiskp, field) disk_stat_add(gendiskp, field, -1) - -#define __disk_stat_inc(gendiskp, field) __disk_stat_add(gendiskp, field, 1) -#define disk_stat_inc(gendiskp, field) disk_stat_add(gendiskp, field, 1) - -#define __disk_stat_sub(gendiskp, field, subnd) \ - __disk_stat_add(gendiskp, field, -subnd) -#define disk_stat_sub(gendiskp, field, subnd) \ - disk_stat_add(gendiskp, field, -subnd) - - -/* Inlines to alloc and free disk stats in struct gendisk */ -#ifdef CONFIG_SMP -static inline int init_disk_stats(struct gendisk *disk) -{ - disk->dkstats = alloc_percpu(struct disk_stats); - if (!disk->dkstats) - return 0; - return 1; -} - -static inline void free_disk_stats(struct gendisk *disk) -{ - free_percpu(disk->dkstats); -} -#else /* CONFIG_SMP */ -static inline int init_disk_stats(struct gendisk *disk) -{ - return 1; -} - -static inline void free_disk_stats(struct gendisk *disk) -{ -} -#endif /* CONFIG_SMP */ - -/* drivers/block/ll_rw_blk.c */ -extern void disk_round_stats(struct gendisk *disk); - -/* drivers/block/genhd.c */ -extern int get_blkdev_list(char *, int); -extern void add_disk(struct gendisk *disk); -extern void del_gendisk(struct gendisk *gp); -extern void unlink_gendisk(struct gendisk *gp); -extern struct gendisk *get_gendisk(dev_t dev, int *part); - -extern void set_device_ro(struct block_device *bdev, int flag); -extern void set_disk_ro(struct gendisk *disk, int flag); - -/* drivers/char/random.c */ -extern void add_disk_randomness(struct gendisk *disk); -extern void rand_initialize_disk(struct gendisk *disk); - -static inline sector_t get_start_sect(struct block_device *bdev) -{ - return bdev->bd_contains == bdev ? 0 : bdev->bd_part->start_sect; -} -static inline sector_t get_capacity(struct gendisk *disk) -{ - return disk->capacity; -} -static inline void set_capacity(struct gendisk *disk, sector_t size) -{ - disk->capacity = size; -} - -#endif /* __KERNEL__ */ #ifdef CONFIG_SOLARIS_X86_PARTITION @@ -394,32 +198,6 @@ # define MINIX_NR_SUBPARTITIONS 4 #endif /* CONFIG_MINIX_SUBPARTITION */ -#ifdef __KERNEL__ - -char *disk_name (struct gendisk *hd, int part, char *buf); - -extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); -extern void add_partition(struct gendisk *, int, sector_t, sector_t); -extern void delete_partition(struct gendisk *, int); - -extern struct gendisk *alloc_disk_node(int minors, int node_id); -extern struct gendisk *alloc_disk(int minors); -extern struct kobject *get_disk(struct gendisk *disk); -extern void put_disk(struct gendisk *disk); - -extern void blk_register_region(dev_t dev, unsigned long range, - struct module *module, - struct kobject *(*probe)(dev_t, int *, void *), - int (*lock)(dev_t, void *), - void *data); -extern void blk_unregister_region(dev_t dev, unsigned long range); - -static inline struct block_device *bdget_disk(struct gendisk *disk, int index) -{ - return bdget(MKDEV(disk->major, disk->first_minor) + index); -} - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/gfs2_ondisk.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/gfs2_ondisk.h 2007-05-24 15:40:43.000000000 +0200 @@ -54,7 +54,7 @@ __be64 no_addr; }; -static inline int gfs2_inum_equal(const struct gfs2_inum *ino1, +static __inline__ int gfs2_inum_equal(const struct gfs2_inum *ino1, const struct gfs2_inum *ino2) { return ino1->no_formal_ino == ino2->no_formal_ino && @@ -410,34 +410,5 @@ __be32 qc_id; }; -#ifdef __KERNEL__ -/* Translation functions */ - -extern void gfs2_inum_in(struct gfs2_inum *no, const void *buf); -extern void gfs2_inum_out(const struct gfs2_inum *no, void *buf); -extern void gfs2_sb_in(struct gfs2_sb *sb, const void *buf); -extern void gfs2_rindex_in(struct gfs2_rindex *ri, const void *buf); -extern void gfs2_rindex_out(const struct gfs2_rindex *ri, void *buf); -extern void gfs2_rgrp_in(struct gfs2_rgrp *rg, const void *buf); -extern void gfs2_rgrp_out(const struct gfs2_rgrp *rg, void *buf); -extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf); -extern void gfs2_quota_out(const struct gfs2_quota *qu, void *buf); -extern void gfs2_dinode_in(struct gfs2_dinode *di, const void *buf); -extern void gfs2_dinode_out(const struct gfs2_dinode *di, void *buf); -extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf); -extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf); -extern void gfs2_log_header_in(struct gfs2_log_header *lh, const void *buf); -extern void gfs2_inum_range_in(struct gfs2_inum_range *ir, const void *buf); -extern void gfs2_inum_range_out(const struct gfs2_inum_range *ir, void *buf); -extern void gfs2_statfs_change_in(struct gfs2_statfs_change *sc, const void *buf); -extern void gfs2_statfs_change_out(const struct gfs2_statfs_change *sc, void *buf); -extern void gfs2_quota_change_in(struct gfs2_quota_change *qc, const void *buf); - -/* Printing functions */ - -extern void gfs2_rindex_print(const struct gfs2_rindex *ri); -extern void gfs2_dinode_print(const struct gfs2_dinode *di); - -#endif /* __KERNEL__ */ #endif /* __GFS2_ONDISK_DOT_H__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/hayesesp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/hayesesp.h 2007-05-24 15:40:43.000000000 +0200 @@ -11,113 +11,6 @@ char dma_channel; }; -#ifdef __KERNEL__ - -#define ESP_DMA_CHANNEL 0 -#define ESP_RX_TRIGGER 768 -#define ESP_TX_TRIGGER 768 -#define ESP_FLOW_OFF 1016 -#define ESP_FLOW_ON 944 -#define ESP_RX_TMOUT 128 -#define ESP_PIO_THRESHOLD 32 - -#define ESP_IN_MAJOR 57 /* major dev # for dial in */ -#define ESP_OUT_MAJOR 58 /* major dev # for dial out */ -#define ESPC_SCALE 3 -#define UART_ESI_BASE 0x00 -#define UART_ESI_SID 0x01 -#define UART_ESI_RX 0x02 -#define UART_ESI_TX 0x02 -#define UART_ESI_CMD1 0x04 -#define UART_ESI_CMD2 0x05 -#define UART_ESI_STAT1 0x04 -#define UART_ESI_STAT2 0x05 -#define UART_ESI_RWS 0x07 - -#define UART_IER_DMA_TMOUT 0x80 -#define UART_IER_DMA_TC 0x08 - -#define ESI_SET_IRQ 0x04 -#define ESI_SET_DMA_TMOUT 0x05 -#define ESI_SET_SRV_MASK 0x06 -#define ESI_SET_ERR_MASK 0x07 -#define ESI_SET_FLOW_CNTL 0x08 -#define ESI_SET_FLOW_CHARS 0x09 -#define ESI_SET_FLOW_LVL 0x0a -#define ESI_SET_TRIGGER 0x0b -#define ESI_SET_RX_TIMEOUT 0x0c -#define ESI_SET_FLOW_TMOUT 0x0d -#define ESI_WRITE_UART 0x0e -#define ESI_READ_UART 0x0f -#define ESI_SET_MODE 0x10 -#define ESI_GET_ERR_STAT 0x12 -#define ESI_GET_UART_STAT 0x13 -#define ESI_GET_RX_AVAIL 0x14 -#define ESI_GET_TX_AVAIL 0x15 -#define ESI_START_DMA_RX 0x16 -#define ESI_START_DMA_TX 0x17 -#define ESI_ISSUE_BREAK 0x1a -#define ESI_FLUSH_RX 0x1b -#define ESI_FLUSH_TX 0x1c -#define ESI_SET_BAUD 0x1d -#define ESI_SET_ENH_IRQ 0x1f -#define ESI_SET_REINTR 0x20 -#define ESI_SET_PRESCALAR 0x23 -#define ESI_NO_COMMAND 0xff - -#define ESP_STAT_RX_TIMEOUT 0x01 -#define ESP_STAT_DMA_RX 0x02 -#define ESP_STAT_DMA_TX 0x04 -#define ESP_STAT_NEVER_DMA 0x08 -#define ESP_STAT_USE_PIO 0x10 - -#define ESP_EVENT_WRITE_WAKEUP 0 -#define ESP_MAGIC 0x53ee -#define ESP_XMIT_SIZE 4096 - -struct esp_struct { - int magic; - spinlock_t lock; - int port; - int irq; - int flags; /* defined in tty.h */ - struct tty_struct *tty; - int read_status_mask; - int ignore_status_mask; - int timeout; - int stat_flags; - int custom_divisor; - int close_delay; - unsigned short closing_wait; - unsigned short closing_wait2; - int IER; /* Interrupt Enable Register */ - int MCR; /* Modem control register */ - unsigned long event; - unsigned long last_active; - int line; - int count; /* # of fd on device */ - int blocked_open; /* # of blocked opens */ - unsigned char *xmit_buf; - int xmit_head; - int xmit_tail; - int xmit_cnt; - struct work_struct tqueue; - struct work_struct tqueue_hangup; - wait_queue_head_t open_wait; - wait_queue_head_t close_wait; - wait_queue_head_t delta_msr_wait; - wait_queue_head_t break_wait; - struct async_icount icount; /* kernel counters for the 4 input interrupts */ - struct hayes_esp_config config; /* port configuration */ - struct esp_struct *next_port; /* For the linked list */ -}; - -struct esp_pio_buffer { - unsigned char data[1024]; - struct esp_pio_buffer *next; -}; - -#endif /* __KERNEL__ */ #endif /* ESP_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/hdlc.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/hdlc.h 2007-05-24 15:40:43.000000000 +0200 @@ -20,126 +20,4 @@ #endif -#ifdef __KERNEL__ - -#include -#include -#include - - -/* Used by all network devices here, pointed to by netdev_priv(dev) */ -struct hdlc_device_desc { - int (*netif_rx)(struct sk_buff *skb); - struct net_device_stats stats; -}; - -/* This structure is a private property of HDLC protocols. - Hardware drivers have no interest here */ - -struct hdlc_proto { - int (*open)(struct net_device *dev); - void (*close)(struct net_device *dev); - void (*start)(struct net_device *dev); /* if open & DCD */ - void (*stop)(struct net_device *dev); /* if open & !DCD */ - void (*detach)(struct net_device *dev); - int (*ioctl)(struct net_device *dev, struct ifreq *ifr); - unsigned short (*type_trans)(struct sk_buff *skb, - struct net_device *dev); - struct module *module; - struct hdlc_proto *next; /* next protocol in the list */ -}; - - -typedef struct hdlc_device { - /* used by HDLC layer to take control over HDLC device from hw driver*/ - int (*attach)(struct net_device *dev, - unsigned short encoding, unsigned short parity); - - /* hardware driver must handle this instead of dev->hard_start_xmit */ - int (*xmit)(struct sk_buff *skb, struct net_device *dev); - - /* Things below are for HDLC layer internal use only */ - const struct hdlc_proto *proto; - int carrier; - int open; - spinlock_t state_lock; - void *state; - void *priv; -}hdlc_device; - - - -/* Exported from hdlc module */ - -/* Called by hardware driver when a user requests HDLC service */ -int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); - -/* Must be used by hardware driver on module startup/exit */ -#define register_hdlc_device(dev) register_netdev(dev) -void unregister_hdlc_device(struct net_device *dev); - - -void register_hdlc_protocol(struct hdlc_proto *proto); -void unregister_hdlc_protocol(struct hdlc_proto *proto); - -struct net_device *alloc_hdlcdev(void *priv); - - -static __inline__ struct hdlc_device_desc* dev_to_desc(struct net_device *dev) -{ - return netdev_priv(dev); -} - -static __inline__ hdlc_device* dev_to_hdlc(struct net_device *dev) -{ - return netdev_priv(dev) + sizeof(struct hdlc_device_desc); -} - - -static __inline__ void debug_frame(const struct sk_buff *skb) -{ - int i; - - for (i=0; i < skb->len; i++) { - if (i == 100) { - printk("...\n"); - return; - } - printk(" %02X", skb->data[i]); - } - printk("\n"); -} - - -/* Must be called by hardware driver when HDLC device is being opened */ -int hdlc_open(struct net_device *dev); -/* Must be called by hardware driver when HDLC device is being closed */ -void hdlc_close(struct net_device *dev); - -int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, - int (*rx)(struct sk_buff *skb), size_t size); -/* May be used by hardware driver to gain control over HDLC device */ -void detach_hdlc_protocol(struct net_device *dev); - -static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev) -{ - return &dev_to_desc(dev)->stats; -} - - -static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb, - struct net_device *dev) -{ - hdlc_device *hdlc = dev_to_hdlc(dev); - - skb->mac.raw = skb->data; - skb->dev = dev; - - if (hdlc->proto->type_trans) - return hdlc->proto->type_trans(skb, dev); - else - return htons(ETH_P_HDLC); -} - -#endif /* __KERNEL */ #endif /* __HDLC_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/hdlcdrv.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/hdlcdrv.h 2007-05-24 15:40:43.000000000 +0200 @@ -102,274 +102,6 @@ /* -------------------------------------------------------------------- */ -#ifdef __KERNEL__ - -#include -#include -#include - -#define HDLCDRV_MAGIC 0x5ac6e778 -#define HDLCDRV_HDLCBUFFER 32 /* should be a power of 2 for speed reasons */ -#define HDLCDRV_BITBUFFER 256 /* should be a power of 2 for speed reasons */ -#undef HDLCDRV_LOOPBACK /* define for HDLC debugging purposes */ -#define HDLCDRV_DEBUG - -/* maximum packet length, excluding CRC */ -#define HDLCDRV_MAXFLEN 400 - - -struct hdlcdrv_hdlcbuffer { - spinlock_t lock; - unsigned rd, wr; - unsigned short buf[HDLCDRV_HDLCBUFFER]; -}; - -#ifdef HDLCDRV_DEBUG -struct hdlcdrv_bitbuffer { - unsigned int rd; - unsigned int wr; - unsigned int shreg; - unsigned char buffer[HDLCDRV_BITBUFFER]; -}; - -static inline void hdlcdrv_add_bitbuffer(struct hdlcdrv_bitbuffer *buf, - unsigned int bit) -{ - unsigned char new; - - new = buf->shreg & 1; - buf->shreg >>= 1; - buf->shreg |= (!!bit) << 7; - if (new) { - buf->buffer[buf->wr] = buf->shreg; - buf->wr = (buf->wr+1) % sizeof(buf->buffer); - buf->shreg = 0x80; - } -} - -static inline void hdlcdrv_add_bitbuffer_word(struct hdlcdrv_bitbuffer *buf, - unsigned int bits) -{ - buf->buffer[buf->wr] = bits & 0xff; - buf->wr = (buf->wr+1) % sizeof(buf->buffer); - buf->buffer[buf->wr] = (bits >> 8) & 0xff; - buf->wr = (buf->wr+1) % sizeof(buf->buffer); - -} -#endif /* HDLCDRV_DEBUG */ - -/* -------------------------------------------------------------------- */ -/* - * Information that need to be kept for each driver. - */ - -struct hdlcdrv_ops { - /* - * first some informations needed by the hdlcdrv routines - */ - const char *drvname; - const char *drvinfo; - /* - * the routines called by the hdlcdrv routines - */ - int (*open)(struct net_device *); - int (*close)(struct net_device *); - int (*ioctl)(struct net_device *, struct ifreq *, - struct hdlcdrv_ioctl *, int); -}; - -struct hdlcdrv_state { - int magic; - int opened; - - const struct hdlcdrv_ops *ops; - - struct { - int bitrate; - } par; - - struct hdlcdrv_pttoutput { - int dma2; - int seriobase; - int pariobase; - int midiiobase; - unsigned int flags; - } ptt_out; - - struct hdlcdrv_channel_params ch_params; - - struct hdlcdrv_hdlcrx { - struct hdlcdrv_hdlcbuffer hbuf; - long in_hdlc_rx; - /* 0 = sync hunt, != 0 receiving */ - int rx_state; - unsigned int bitstream; - unsigned int bitbuf; - int numbits; - unsigned char dcd; - - int len; - unsigned char *bp; - unsigned char buffer[HDLCDRV_MAXFLEN+2]; - } hdlcrx; - - struct hdlcdrv_hdlctx { - struct hdlcdrv_hdlcbuffer hbuf; - long in_hdlc_tx; - /* - * 0 = send flags - * 1 = send txtail (flags) - * 2 = send packet - */ - int tx_state; - int numflags; - unsigned int bitstream; - unsigned char ptt; - int calibrate; - int slotcnt; - - unsigned int bitbuf; - int numbits; - - int len; - unsigned char *bp; - unsigned char buffer[HDLCDRV_MAXFLEN+2]; - } hdlctx; - -#ifdef HDLCDRV_DEBUG - struct hdlcdrv_bitbuffer bitbuf_channel; - struct hdlcdrv_bitbuffer bitbuf_hdlc; -#endif /* HDLCDRV_DEBUG */ - - struct net_device_stats stats; - int ptt_keyed; - - /* queued skb for transmission */ - struct sk_buff *skb; -}; - - -/* -------------------------------------------------------------------- */ - -static inline int hdlcdrv_hbuf_full(struct hdlcdrv_hdlcbuffer *hb) -{ - unsigned long flags; - int ret; - - spin_lock_irqsave(&hb->lock, flags); - ret = !((HDLCDRV_HDLCBUFFER - 1 + hb->rd - hb->wr) % HDLCDRV_HDLCBUFFER); - spin_unlock_irqrestore(&hb->lock, flags); - return ret; -} - -/* -------------------------------------------------------------------- */ - -static inline int hdlcdrv_hbuf_empty(struct hdlcdrv_hdlcbuffer *hb) -{ - unsigned long flags; - int ret; - - spin_lock_irqsave(&hb->lock, flags); - ret = (hb->rd == hb->wr); - spin_unlock_irqrestore(&hb->lock, flags); - return ret; -} - -/* -------------------------------------------------------------------- */ - -static inline unsigned short hdlcdrv_hbuf_get(struct hdlcdrv_hdlcbuffer *hb) -{ - unsigned long flags; - unsigned short val; - unsigned newr; - - spin_lock_irqsave(&hb->lock, flags); - if (hb->rd == hb->wr) - val = 0; - else { - newr = (hb->rd+1) % HDLCDRV_HDLCBUFFER; - val = hb->buf[hb->rd]; - hb->rd = newr; - } - spin_unlock_irqrestore(&hb->lock, flags); - return val; -} - -/* -------------------------------------------------------------------- */ - -static inline void hdlcdrv_hbuf_put(struct hdlcdrv_hdlcbuffer *hb, - unsigned short val) -{ - unsigned newp; - unsigned long flags; - - spin_lock_irqsave(&hb->lock, flags); - newp = (hb->wr+1) % HDLCDRV_HDLCBUFFER; - if (newp != hb->rd) { - hb->buf[hb->wr] = val & 0xffff; - hb->wr = newp; - } - spin_unlock_irqrestore(&hb->lock, flags); -} - -/* -------------------------------------------------------------------- */ - -static inline void hdlcdrv_putbits(struct hdlcdrv_state *s, unsigned int bits) -{ - hdlcdrv_hbuf_put(&s->hdlcrx.hbuf, bits); -} - -static inline unsigned int hdlcdrv_getbits(struct hdlcdrv_state *s) -{ - unsigned int ret; - - if (hdlcdrv_hbuf_empty(&s->hdlctx.hbuf)) { - if (s->hdlctx.calibrate > 0) - s->hdlctx.calibrate--; - else - s->hdlctx.ptt = 0; - ret = 0; - } else - ret = hdlcdrv_hbuf_get(&s->hdlctx.hbuf); -#ifdef HDLCDRV_LOOPBACK - hdlcdrv_hbuf_put(&s->hdlcrx.hbuf, ret); -#endif /* HDLCDRV_LOOPBACK */ - return ret; -} - -static inline void hdlcdrv_channelbit(struct hdlcdrv_state *s, unsigned int bit) -{ -#ifdef HDLCDRV_DEBUG - hdlcdrv_add_bitbuffer(&s->bitbuf_channel, bit); -#endif /* HDLCDRV_DEBUG */ -} - -static inline void hdlcdrv_setdcd(struct hdlcdrv_state *s, int dcd) -{ - s->hdlcrx.dcd = !!dcd; -} - -static inline int hdlcdrv_ptt(struct hdlcdrv_state *s) -{ - return s->hdlctx.ptt || (s->hdlctx.calibrate > 0); -} - -/* -------------------------------------------------------------------- */ - -void hdlcdrv_receiver(struct net_device *, struct hdlcdrv_state *); -void hdlcdrv_transmitter(struct net_device *, struct hdlcdrv_state *); -void hdlcdrv_arbitrate(struct net_device *, struct hdlcdrv_state *); -struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops, - unsigned int privsize, const char *ifname, - unsigned int baseaddr, unsigned int irq, - unsigned int dma); -void hdlcdrv_unregister(struct net_device *dev); - -/* -------------------------------------------------------------------- */ - - - -#endif /* __KERNEL__ */ /* -------------------------------------------------------------------- */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/hdreg.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/hdreg.h 2007-05-24 15:40:43.000000000 +0200 @@ -1,64 +1,6 @@ #ifndef _LINUX_HDREG_H #define _LINUX_HDREG_H -#ifdef __KERNEL__ -#include - -/* - * This file contains some defines for the AT-hd-controller. - * Various sources. - */ - -/* ide.c has its own port definitions in "ide.h" */ - -#define HD_IRQ 14 - -/* Hd controller regs. Ref: IBM AT Bios-listing */ -#define HD_DATA 0x1f0 /* _CTL when writing */ -#define HD_ERROR 0x1f1 /* see err-bits */ -#define HD_NSECTOR 0x1f2 /* nr of sectors to read/write */ -#define HD_SECTOR 0x1f3 /* starting sector */ -#define HD_LCYL 0x1f4 /* starting cylinder */ -#define HD_HCYL 0x1f5 /* high byte of starting cyl */ -#define HD_CURRENT 0x1f6 /* 101dhhhh , d=drive, hhhh=head */ -#define HD_STATUS 0x1f7 /* see status-bits */ -#define HD_FEATURE HD_ERROR /* same io address, read=error, write=feature */ -#define HD_PRECOMP HD_FEATURE /* obsolete use of this port - predates IDE */ -#define HD_COMMAND HD_STATUS /* same io address, read=status, write=cmd */ - -#define HD_CMD 0x3f6 /* used for resets */ -#define HD_ALTSTATUS 0x3f6 /* same as HD_STATUS but doesn't clear irq */ - -/* remainder is shared between hd.c, ide.c, ide-cd.c, and the hdparm utility */ - -/* Bits of HD_STATUS */ -#define ERR_STAT 0x01 -#define INDEX_STAT 0x02 -#define ECC_STAT 0x04 /* Corrected error */ -#define DRQ_STAT 0x08 -#define SEEK_STAT 0x10 -#define SRV_STAT 0x10 -#define WRERR_STAT 0x20 -#define READY_STAT 0x40 -#define BUSY_STAT 0x80 - -/* Bits for HD_ERROR */ -#define MARK_ERR 0x01 /* Bad address mark */ -#define TRK0_ERR 0x02 /* couldn't find track 0 */ -#define ABRT_ERR 0x04 /* Command aborted */ -#define MCR_ERR 0x08 /* media change request */ -#define ID_ERR 0x10 /* ID field not found */ -#define MC_ERR 0x20 /* media changed */ -#define ECC_ERR 0x40 /* Uncorrectable ECC error */ -#define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */ -#define ICRC_ERR 0x80 /* new meaning: CRC error during transfer */ - -/* Bits of HD_NSECTOR */ -#define CD 0x01 -#define IO 0x02 -#define REL 0x04 -#define TAG_MASK 0xf8 -#endif /* __KERNEL__ */ /* * Command Header sizes for IOCTL commands @@ -82,10 +24,8 @@ */ #define IDE_TASKFILE_STD_IN_FLAGS 0xFE #define IDE_HOB_STD_IN_FLAGS 0x3C -#ifndef __KERNEL__ #define IDE_TASKFILE_STD_OUT_FLAGS 0xFE #define IDE_HOB_STD_OUT_FLAGS 0x3C -#endif typedef unsigned char task_ioreg_t; typedef unsigned long sata_ioreg_t; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/hiddev.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/hiddev.h 2007-05-24 15:40:43.000000000 +0200 @@ -207,34 +207,4 @@ */ -#ifdef __KERNEL__ - -/* - * In-kernel definitions. - */ - -struct hid_device; -struct hid_usage; -struct hid_field; -struct hid_report; - -#ifdef CONFIG_USB_HIDDEV -int hiddev_connect(struct hid_device *); -void hiddev_disconnect(struct hid_device *); -void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, - struct hid_usage *usage, __s32 value); -void hiddev_report_event(struct hid_device *hid, struct hid_report *report); -int __init hiddev_init(void); -void hiddev_exit(void); -#else -static inline int hiddev_connect(struct hid_device *hid) { return -1; } -static inline void hiddev_disconnect(struct hid_device *hid) { } -static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, - struct hid_usage *usage, __s32 value) { } -static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { } -static inline int hiddev_init(void) { return 0; } -static inline void hiddev_exit(void) { } -#endif - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/hpet.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/hpet.h 2007-05-24 15:40:43.000000000 +0200 @@ -1,125 +1,7 @@ #ifndef __HPET__ #define __HPET__ 1 -#include -#ifdef __KERNEL__ - -/* - * Offsets into HPET Registers - */ - -struct hpet { - u64 hpet_cap; /* capabilities */ - u64 res0; /* reserved */ - u64 hpet_config; /* configuration */ - u64 res1; /* reserved */ - u64 hpet_isr; /* interrupt status reg */ - u64 res2[25]; /* reserved */ - union { /* main counter */ - u64 _hpet_mc64; - u32 _hpet_mc32; - unsigned long _hpet_mc; - } _u0; - u64 res3; /* reserved */ - struct hpet_timer { - u64 hpet_config; /* configuration/cap */ - union { /* timer compare register */ - u64 _hpet_hc64; - u32 _hpet_hc32; - unsigned long _hpet_compare; - } _u1; - u64 hpet_fsb[2]; /* FSB route */ - } hpet_timers[1]; -}; - -#define hpet_mc _u0._hpet_mc -#define hpet_compare _u1._hpet_compare - -#define HPET_MAX_TIMERS (32) - -/* - * HPET general capabilities register - */ - -#define HPET_COUNTER_CLK_PERIOD_MASK (0xffffffff00000000ULL) -#define HPET_COUNTER_CLK_PERIOD_SHIFT (32UL) -#define HPET_VENDOR_ID_MASK (0x00000000ffff0000ULL) -#define HPET_VENDOR_ID_SHIFT (16ULL) -#define HPET_LEG_RT_CAP_MASK (0x8000) -#define HPET_COUNTER_SIZE_MASK (0x2000) -#define HPET_NUM_TIM_CAP_MASK (0x1f00) -#define HPET_NUM_TIM_CAP_SHIFT (8ULL) - -/* - * HPET general configuration register - */ - -#define HPET_LEG_RT_CNF_MASK (2UL) -#define HPET_ENABLE_CNF_MASK (1UL) - - -/* - * Timer configuration register - */ - -#define Tn_INT_ROUTE_CAP_MASK (0xffffffff00000000ULL) -#define Tn_INI_ROUTE_CAP_SHIFT (32UL) -#define Tn_FSB_INT_DELCAP_MASK (0x8000UL) -#define Tn_FSB_INT_DELCAP_SHIFT (15) -#define Tn_FSB_EN_CNF_MASK (0x4000UL) -#define Tn_FSB_EN_CNF_SHIFT (14) -#define Tn_INT_ROUTE_CNF_MASK (0x3e00UL) -#define Tn_INT_ROUTE_CNF_SHIFT (9) -#define Tn_32MODE_CNF_MASK (0x0100UL) -#define Tn_VAL_SET_CNF_MASK (0x0040UL) -#define Tn_SIZE_CAP_MASK (0x0020UL) -#define Tn_PER_INT_CAP_MASK (0x0010UL) -#define Tn_TYPE_CNF_MASK (0x0008UL) -#define Tn_INT_ENB_CNF_MASK (0x0004UL) -#define Tn_INT_TYPE_CNF_MASK (0x0002UL) - -/* - * Timer FSB Interrupt Route Register - */ - -#define Tn_FSB_INT_ADDR_MASK (0xffffffff00000000ULL) -#define Tn_FSB_INT_ADDR_SHIFT (32UL) -#define Tn_FSB_INT_VAL_MASK (0x00000000ffffffffULL) - -/* - * exported interfaces - */ - -struct hpet_task { - void (*ht_func) (void *); - void *ht_data; - void *ht_opaque; -}; - -struct hpet_data { - unsigned long hd_phys_address; - void __iomem *hd_address; - unsigned short hd_nirqs; - unsigned short hd_flags; - unsigned int hd_state; /* timer allocated */ - unsigned int hd_irq[HPET_MAX_TIMERS]; -}; - -#define HPET_DATA_PLATFORM 0x0001 /* platform call to hpet_alloc */ - -static inline void hpet_reserve_timer(struct hpet_data *hd, int timer) -{ - hd->hd_state |= (1 << timer); - return; -} - -int hpet_alloc(struct hpet_data *); -int hpet_register(struct hpet_task *, int); -int hpet_unregister(struct hpet_task *); -int hpet_control(struct hpet_task *, unsigned int, unsigned long); - -#endif /* __KERNEL__ */ struct hpet_info { unsigned long hi_ireqfreq; /* Hz */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/i2c.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/i2c.h 2007-05-24 15:40:43.000000000 +0200 @@ -27,325 +27,6 @@ #define _LINUX_I2C_H #include -#ifdef __KERNEL__ -#include -#include -#include -#include /* for struct device */ -#include /* for completion */ -#include - -/* --- For i2c-isa ---------------------------------------------------- */ - -extern void i2c_adapter_dev_release(struct device *dev); -extern struct device_driver i2c_adapter_driver; -extern struct class i2c_adapter_class; -extern struct bus_type i2c_bus_type; - -/* --- General options ------------------------------------------------ */ - -struct i2c_msg; -struct i2c_algorithm; -struct i2c_adapter; -struct i2c_client; -struct i2c_driver; -union i2c_smbus_data; - -/* - * The master routines are the ones normally used to transmit data to devices - * on a bus (or read from them). Apart from two basic transfer functions to - * transmit one message at a time, a more complex version can be used to - * transmit an arbitrary number of messages without interruption. - */ -extern int i2c_master_send(struct i2c_client *,const char* ,int); -extern int i2c_master_recv(struct i2c_client *,char* ,int); - -/* Transfer num messages. - */ -extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num); - - -/* This is the very generalized SMBus access routine. You probably do not - want to use this, though; one of the functions below may be much easier, - and probably just as fast. - Note that we use i2c_adapter here, because you do not need a specific - smbus adapter to call this function. */ -extern s32 i2c_smbus_xfer (struct i2c_adapter * adapter, u16 addr, - unsigned short flags, - char read_write, u8 command, int size, - union i2c_smbus_data * data); - -/* Now follow the 'nice' access routines. These also document the calling - conventions of smbus_access. */ - -extern s32 i2c_smbus_write_quick(struct i2c_client * client, u8 value); -extern s32 i2c_smbus_read_byte(struct i2c_client * client); -extern s32 i2c_smbus_write_byte(struct i2c_client * client, u8 value); -extern s32 i2c_smbus_read_byte_data(struct i2c_client * client, u8 command); -extern s32 i2c_smbus_write_byte_data(struct i2c_client * client, - u8 command, u8 value); -extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command); -extern s32 i2c_smbus_write_word_data(struct i2c_client * client, - u8 command, u16 value); -extern s32 i2c_smbus_write_block_data(struct i2c_client * client, - u8 command, u8 length, - const u8 *values); -/* Returns the number of read bytes */ -extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, - u8 command, u8 *values); -extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, - u8 command, u8 length, - const u8 *values); - -/* - * A driver is capable of handling one or more physical devices present on - * I2C adapters. This information is used to inform the driver of adapter - * events. - * - * The driver.owner field should be set to the module owner of this driver. - * The driver.name field should be set to the name of this driver. - */ - -struct i2c_driver { - int id; - unsigned int class; - - /* Notifies the driver that a new bus has appeared. This routine - * can be used by the driver to test if the bus meets its conditions - * & seek for the presence of the chip(s) it supports. If found, it - * registers the client(s) that are on the bus to the i2c admin. via - * i2c_attach_client. - */ - int (*attach_adapter)(struct i2c_adapter *); - int (*detach_adapter)(struct i2c_adapter *); - - /* tells the driver that a client is about to be deleted & gives it - * the chance to remove its private data. Also, if the client struct - * has been dynamically allocated by the driver in the function above, - * it must be freed here. - */ - int (*detach_client)(struct i2c_client *); - - /* a ioctl like command that can be used to perform specific functions - * with the device. - */ - int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); - - struct device_driver driver; - struct list_head list; -}; -#define to_i2c_driver(d) container_of(d, struct i2c_driver, driver) - -#define I2C_NAME_SIZE 50 - -/* - * i2c_client identifies a single device (i.e. chip) that is connected to an - * i2c bus. The behaviour is defined by the routines of the driver. This - * function is mainly used for lookup & other admin. functions. - */ -struct i2c_client { - unsigned int flags; /* div., see below */ - unsigned short addr; /* chip address - NOTE: 7bit */ - /* addresses are stored in the */ - /* _LOWER_ 7 bits */ - struct i2c_adapter *adapter; /* the adapter we sit on */ - struct i2c_driver *driver; /* and our access routines */ - int usage_count; /* How many accesses currently */ - /* to the client */ - struct device dev; /* the device structure */ - struct list_head list; - char name[I2C_NAME_SIZE]; - struct completion released; -}; -#define to_i2c_client(d) container_of(d, struct i2c_client, dev) - -static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) -{ - return to_i2c_client(container_of(kobj, struct device, kobj)); -} - -static inline void *i2c_get_clientdata (struct i2c_client *dev) -{ - return dev_get_drvdata (&dev->dev); -} - -static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) -{ - dev_set_drvdata (&dev->dev, data); -} - -/* - * The following structs are for those who like to implement new bus drivers: - * i2c_algorithm is the interface to a class of hardware solutions which can - * be addressed using the same bus algorithms - i.e. bit-banging or the PCF8584 - * to name two of the most common. - */ -struct i2c_algorithm { - /* If an adapter algorithm can't do I2C-level access, set master_xfer - to NULL. If an adapter algorithm can do SMBus access, set - smbus_xfer. If set to NULL, the SMBus protocol is simulated - using common I2C messages */ - /* master_xfer should return the number of messages successfully - processed, or a negative value on error */ - int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, - int num); - int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, - unsigned short flags, char read_write, - u8 command, int size, union i2c_smbus_data * data); - - /* --- ioctl like call to set div. parameters. */ - int (*algo_control)(struct i2c_adapter *, unsigned int, unsigned long); - - /* To determine what the adapter supports */ - u32 (*functionality) (struct i2c_adapter *); -}; - -/* - * i2c_adapter is the structure used to identify a physical i2c bus along - * with the access algorithms necessary to access it. - */ -struct i2c_adapter { - struct module *owner; - unsigned int id; - unsigned int class; - const struct i2c_algorithm *algo; /* the algorithm to access the bus */ - void *algo_data; - - /* --- administration stuff. */ - int (*client_register)(struct i2c_client *); - int (*client_unregister)(struct i2c_client *); - - /* data fields that are valid for all devices */ - struct mutex bus_lock; - struct mutex clist_lock; - - int timeout; - int retries; - struct device dev; /* the adapter device */ - struct class_device class_dev; /* the class device */ - - int nr; - struct list_head clients; - struct list_head list; - char name[I2C_NAME_SIZE]; - struct completion dev_released; - struct completion class_dev_released; -}; -#define dev_to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) -#define class_dev_to_i2c_adapter(d) container_of(d, struct i2c_adapter, class_dev) - -static inline void *i2c_get_adapdata (struct i2c_adapter *dev) -{ - return dev_get_drvdata (&dev->dev); -} - -static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) -{ - dev_set_drvdata (&dev->dev, data); -} - -/*flags for the client struct: */ -#define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ -#define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ - /* Must equal I2C_M_TEN below */ - -/* i2c adapter classes (bitmask) */ -#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ -#define I2C_CLASS_TV_ANALOG (1<<1) /* bttv + friends */ -#define I2C_CLASS_TV_DIGITAL (1<<2) /* dvb cards */ -#define I2C_CLASS_DDC (1<<3) /* i2c-matroxfb ? */ -#define I2C_CLASS_CAM_ANALOG (1<<4) /* camera with analog CCD */ -#define I2C_CLASS_CAM_DIGITAL (1<<5) /* most webcams */ -#define I2C_CLASS_SOUND (1<<6) /* sound devices */ -#define I2C_CLASS_ALL (UINT_MAX) /* all of the above */ - -/* i2c_client_address_data is the struct for holding default client - * addresses for a driver and for the parameters supplied on the - * command line - */ -struct i2c_client_address_data { - unsigned short *normal_i2c; - unsigned short *probe; - unsigned short *ignore; - unsigned short **forces; -}; - -/* Internal numbers to terminate lists */ -#define I2C_CLIENT_END 0xfffeU - -/* The numbers to use to set I2C bus address */ -#define ANY_I2C_BUS 0xffff -#define ANY_I2C_ISA_BUS 9191 - - -/* ----- functions exported by i2c.o */ - -/* administration... - */ -extern int i2c_add_adapter(struct i2c_adapter *); -extern int i2c_del_adapter(struct i2c_adapter *); - -extern int i2c_register_driver(struct module *, struct i2c_driver *); -extern int i2c_del_driver(struct i2c_driver *); - -static inline int i2c_add_driver(struct i2c_driver *driver) -{ - return i2c_register_driver(THIS_MODULE, driver); -} - -extern int i2c_attach_client(struct i2c_client *); -extern int i2c_detach_client(struct i2c_client *); - -/* Should be used to make sure that client-struct is valid and that it - is okay to access the i2c-client. - returns -ENODEV if client has gone in the meantime */ -extern int i2c_use_client(struct i2c_client *); -extern int i2c_release_client(struct i2c_client *); - -/* call the i2c_client->command() of all attached clients with - * the given arguments */ -extern void i2c_clients_command(struct i2c_adapter *adap, - unsigned int cmd, void *arg); - -/* returns -EBUSY if address has been taken, 0 if not. Note that the only - other place at which this is called is within i2c_attach_client; so - you can cheat by simply not registering. Not recommended, of course! */ -extern int i2c_check_addr (struct i2c_adapter *adapter, int addr); - -/* Detect function. It iterates over all possible addresses itself. - * It will only call found_proc if some client is connected at the - * specific address (unless a 'force' matched); - */ -extern int i2c_probe(struct i2c_adapter *adapter, - struct i2c_client_address_data *address_data, - int (*found_proc) (struct i2c_adapter *, int, int)); - -/* An ioctl like call to set div. parameters of the adapter. - */ -extern int i2c_control(struct i2c_client *,unsigned int, unsigned long); - -extern struct i2c_adapter* i2c_get_adapter(int id); -extern void i2c_put_adapter(struct i2c_adapter *adap); - - -/* Return the functionality mask */ -static inline u32 i2c_get_functionality(struct i2c_adapter *adap) -{ - return adap->algo->functionality(adap); -} - -/* Return 1 if adapter supports everything we need, 0 if not. */ -static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func) -{ - return (func & i2c_get_functionality(adap)) == func; -} - -/* Return id number for a specific adapter */ -static inline int i2c_adapter_id(struct i2c_adapter *adap) -{ - return adap->nr; -} -#endif /* __KERNEL__ */ /* * I2C Message - used for pure i2c transaction, also from /dev interface @@ -461,183 +142,4 @@ #define I2C_SMBUS 0x0720 /* SMBus-level access */ /* ----- I2C-DEV: char device interface stuff ------------------------- */ -#ifdef __KERNEL__ - -#define I2C_MAJOR 89 /* Device major number */ - -/* These defines are used for probing i2c client addresses */ -/* The length of the option lists */ -#define I2C_CLIENT_MAX_OPTS 48 - -/* Default fill of many variables */ -#define I2C_CLIENT_DEFAULTS {I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ - I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END} - -/* I2C_CLIENT_MODULE_PARM creates a module parameter, and puts it in the - module header */ - -#define I2C_CLIENT_MODULE_PARM(var,desc) \ - static unsigned short var[I2C_CLIENT_MAX_OPTS] = I2C_CLIENT_DEFAULTS; \ - static unsigned int var##_num; \ - module_param_array(var, short, &var##_num, 0); \ - MODULE_PARM_DESC(var,desc) - -#define I2C_CLIENT_MODULE_PARM_FORCE(name) \ -I2C_CLIENT_MODULE_PARM(force_##name, \ - "List of adapter,address pairs which are " \ - "unquestionably assumed to contain a `" \ - # name "' chip") - - -#define I2C_CLIENT_INSMOD_COMMON \ -I2C_CLIENT_MODULE_PARM(probe, "List of adapter,address pairs to scan " \ - "additionally"); \ -I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \ - "scan"); \ -static struct i2c_client_address_data addr_data = { \ - .normal_i2c = normal_i2c, \ - .probe = probe, \ - .ignore = ignore, \ - .forces = forces, \ -} - -/* These are the ones you want to use in your own drivers. Pick the one - which matches the number of devices the driver differenciates between. */ -#define I2C_CLIENT_INSMOD \ - I2C_CLIENT_MODULE_PARM(force, \ - "List of adapter,address pairs to boldly assume " \ - "to be present"); \ - static unsigned short *forces[] = { \ - force, \ - NULL \ - }; \ -I2C_CLIENT_INSMOD_COMMON - -#define I2C_CLIENT_INSMOD_1(chip1) \ -enum chips { any_chip, chip1 }; \ -I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ - "boldly assume to be present"); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ -static unsigned short *forces[] = { force, force_##chip1, NULL }; \ -I2C_CLIENT_INSMOD_COMMON - -#define I2C_CLIENT_INSMOD_2(chip1, chip2) \ -enum chips { any_chip, chip1, chip2 }; \ -I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ - "boldly assume to be present"); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ -static unsigned short *forces[] = { force, force_##chip1, \ - force_##chip2, NULL }; \ -I2C_CLIENT_INSMOD_COMMON - -#define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3) \ -enum chips { any_chip, chip1, chip2, chip3 }; \ -I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ - "boldly assume to be present"); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ -static unsigned short *forces[] = { force, force_##chip1, \ - force_##chip2, force_##chip3, \ - NULL }; \ -I2C_CLIENT_INSMOD_COMMON - -#define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4) \ -enum chips { any_chip, chip1, chip2, chip3, chip4 }; \ -I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ - "boldly assume to be present"); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ -static unsigned short *forces[] = { force, force_##chip1, \ - force_##chip2, force_##chip3, \ - force_##chip4, NULL}; \ -I2C_CLIENT_INSMOD_COMMON - -#define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5) \ -enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \ -I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ - "boldly assume to be present"); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ -static unsigned short *forces[] = { force, force_##chip1, \ - force_##chip2, force_##chip3, \ - force_##chip4, force_##chip5, \ - NULL }; \ -I2C_CLIENT_INSMOD_COMMON - -#define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6) \ -enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \ -I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ - "boldly assume to be present"); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ -static unsigned short *forces[] = { force, force_##chip1, \ - force_##chip2, force_##chip3, \ - force_##chip4, force_##chip5, \ - force_##chip6, NULL }; \ -I2C_CLIENT_INSMOD_COMMON - -#define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7) \ -enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ - chip7 }; \ -I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ - "boldly assume to be present"); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ -static unsigned short *forces[] = { force, force_##chip1, \ - force_##chip2, force_##chip3, \ - force_##chip4, force_##chip5, \ - force_##chip6, force_##chip7, \ - NULL }; \ -I2C_CLIENT_INSMOD_COMMON - -#define I2C_CLIENT_INSMOD_8(chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8) \ -enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ - chip7, chip8 }; \ -I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ - "boldly assume to be present"); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ -I2C_CLIENT_MODULE_PARM_FORCE(chip8); \ -static unsigned short *forces[] = { force, force_##chip1, \ - force_##chip2, force_##chip3, \ - force_##chip4, force_##chip5, \ - force_##chip6, force_##chip7, \ - force_##chip8, NULL }; \ -I2C_CLIENT_INSMOD_COMMON -#endif /* __KERNEL__ */ #endif /* _LINUX_I2C_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/i2o-dev.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/i2o-dev.h 2007-05-24 15:40:43.000000000 +0200 @@ -51,22 +51,22 @@ struct i2o_cmd_passthru { unsigned int iop; /* IOP unit number */ - void __user *msg; /* message */ + void *msg; /* message */ }; struct i2o_cmd_hrtlct { unsigned int iop; /* IOP unit number */ - void __user *resbuf; /* Buffer for result */ - unsigned int __user *reslen; /* Buffer length in bytes */ + void *resbuf; /* Buffer for result */ + unsigned int *reslen; /* Buffer length in bytes */ }; struct i2o_cmd_psetget { unsigned int iop; /* IOP unit number */ unsigned int tid; /* Target device TID */ - void __user *opbuf; /* Operation List buffer */ + void *opbuf; /* Operation List buffer */ unsigned int oplen; /* Operation List buffer length in bytes */ - void __user *resbuf; /* Result List buffer */ - unsigned int __user *reslen; /* Result List buffer length in bytes */ + void *resbuf; /* Result List buffer */ + unsigned int *reslen; /* Result List buffer length in bytes */ }; struct i2o_sw_xfer { @@ -74,19 +74,19 @@ unsigned char flags; /* Flags field */ unsigned char sw_type; /* Software type */ unsigned int sw_id; /* Software ID */ - void __user *buf; /* Pointer to software buffer */ - unsigned int __user *swlen; /* Length of software data */ - unsigned int __user *maxfrag; /* Maximum fragment count */ - unsigned int __user *curfrag; /* Current fragment count */ + void *buf; /* Pointer to software buffer */ + unsigned int *swlen; /* Length of software data */ + unsigned int *maxfrag; /* Maximum fragment count */ + unsigned int *curfrag; /* Current fragment count */ }; struct i2o_html { unsigned int iop; /* IOP unit number */ unsigned int tid; /* Target device ID */ unsigned int page; /* HTML page */ - void __user *resbuf; /* Buffer for reply HTML page */ - unsigned int __user *reslen; /* Length in bytes of reply buffer */ - void __user *qbuf; /* Pointer to HTTP query string */ + void *resbuf; /* Buffer for reply HTML page */ + unsigned int *reslen; /* Length in bytes of reply buffer */ + void *qbuf; /* Pointer to HTTP query string */ unsigned int qlen; /* Length in bytes of query string buffer */ }; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/icmpv6.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/icmpv6.h 2007-05-24 15:40:43.000000000 +0200 @@ -156,23 +156,5 @@ #define MLD2_ALL_MCR_INIT { { { 0xff,0x02,0,0,0,0,0,0,0,0,0,0,0,0,0,0x16 } } } -#ifdef __KERNEL__ - -#include -#include - - -extern void icmpv6_send(struct sk_buff *skb, - int type, int code, - __u32 info, - struct net_device *dev); - -extern int icmpv6_init(struct net_proto_family *ops); -extern int icmpv6_err_convert(int type, int code, - int *err); -extern void icmpv6_cleanup(void); -extern void icmpv6_param_prob(struct sk_buff *skb, - int code, int pos); -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_bridge.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_bridge.h 2007-05-24 15:40:43.000000000 +0200 @@ -100,14 +100,5 @@ __u32 unused; }; -#ifdef __KERNEL__ - -#include - -extern void brioctl_set(int (*ioctl_hook)(unsigned int, void __user *)); -extern int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb); -extern int (*br_should_route_hook)(struct sk_buff **pskb); - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/in.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/in.h 2007-05-24 15:40:43.000000000 +0200 @@ -243,14 +243,5 @@ /* contains the htonl type stuff.. */ #include -#ifdef __KERNEL__ -/* Some random defines to make it easier in the kernel.. */ -#define LOOPBACK(x) (((x) & htonl(0xff000000)) == htonl(0x7f000000)) -#define MULTICAST(x) (((x) & htonl(0xf0000000)) == htonl(0xe0000000)) -#define BADCLASS(x) (((x) & htonl(0xf0000000)) == htonl(0xf0000000)) -#define ZERONET(x) (((x) & htonl(0xff000000)) == htonl(0x00000000)) -#define LOCAL_MCAST(x) (((x) & htonl(0xFFFFFF00)) == htonl(0xE0000000)) - -#endif #endif /* _LINUX_IN_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_ec.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_ec.h 2007-05-24 15:40:43.000000000 +0200 @@ -32,41 +32,5 @@ #define ECTYPE_TRANSMIT_LINE_JAMMED 5 #define ECTYPE_TRANSMIT_NOT_PRESENT 6 -#ifdef __KERNEL__ - -#define EC_HLEN 6 - -/* This is what an Econet frame looks like on the wire. */ -struct ec_framehdr -{ - unsigned char dst_stn; - unsigned char dst_net; - unsigned char src_stn; - unsigned char src_net; - unsigned char cb; - unsigned char port; -}; - -struct econet_sock { - /* struct sock has to be the first member of econet_sock */ - struct sock sk; - unsigned char cb; - unsigned char port; - unsigned char station; - unsigned char net; - unsigned short num; -}; - -static inline struct econet_sock *ec_sk(const struct sock *sk) -{ - return (struct econet_sock *)sk; -} - -struct ec_device -{ - unsigned char station, net; /* Econet protocol address */ -}; - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_eql.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_eql.h 2007-05-24 15:40:43.000000000 +0200 @@ -33,36 +33,6 @@ #define EQL_GETMASTRCFG (SIOCDEVPRIVATE + 4) #define EQL_SETMASTRCFG (SIOCDEVPRIVATE + 5) -#ifdef __KERNEL__ - -#include -#include - -typedef struct slave { - struct list_head list; - struct net_device *dev; - long priority; - long priority_bps; - long priority_Bps; - long bytes_queued; -} slave_t; - -typedef struct slave_queue { - spinlock_t lock; - struct list_head all_slaves; - int num_slaves; - struct net_device *master_dev; -} slave_queue_t; - -typedef struct equalizer { - slave_queue_t queue; - int min_slaves; - int max_slaves; - struct net_device_stats stats; - struct timer_list timer; -} equalizer_t; - -#endif /* __KERNEL__ */ typedef struct master_config { char master_name[16]; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_ether.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_ether.h 2007-05-24 15:40:43.000000000 +0200 @@ -107,17 +107,5 @@ __be16 h_proto; /* packet type ID field */ } __attribute__((packed)); -#ifdef __KERNEL__ -#include - -static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) -{ - return (struct ethhdr *)skb->mac.raw; -} - -#ifdef CONFIG_SYSCTL -extern struct ctl_table ether_table[]; -#endif -#endif #endif /* _LINUX_IF_ETHER_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_frad.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_frad.h 2007-05-24 15:40:43.000000000 +0200 @@ -125,77 +125,8 @@ #define FRAD_CLOCK_INT 0x0001 #define FRAD_CLOCK_EXT 0x0000 -#ifdef __KERNEL__ - -/* these are the fields of an RFC 1490 header */ -struct frhdr -{ - unsigned char control; - - /* for IP packets, this can be the NLPID */ - unsigned char pad; - - unsigned char NLPID; - unsigned char OUI[3]; - unsigned short PID; - -#define IP_NLPID pad -} __attribute__((packed)); - -/* see RFC 1490 for the definition of the following */ -#define FRAD_I_UI 0x03 - -#define FRAD_P_PADDING 0x00 -#define FRAD_P_Q933 0x08 -#define FRAD_P_SNAP 0x80 -#define FRAD_P_CLNP 0x81 -#define FRAD_P_IP 0xCC - -struct dlci_local -{ - struct net_device_stats stats; - struct net_device *master; - struct net_device *slave; - struct dlci_conf config; - int configured; - struct list_head list; - - /* callback function */ - void (*receive)(struct sk_buff *skb, struct net_device *); -}; - -struct frad_local -{ - struct net_device_stats stats; - - /* devices which this FRAD is slaved to */ - struct net_device *master[CONFIG_DLCI_MAX]; - short dlci[CONFIG_DLCI_MAX]; - - struct frad_conf config; - int configured; /* has this device been configured */ - int initialized; /* mem_start, port, irq set ? */ - - /* callback functions */ - int (*activate)(struct net_device *, struct net_device *); - int (*deactivate)(struct net_device *, struct net_device *); - int (*assoc)(struct net_device *, struct net_device *); - int (*deassoc)(struct net_device *, struct net_device *); - int (*dlci_conf)(struct net_device *, struct net_device *, int get); - - /* fields that are used by the Sangoma SDLA cards */ - struct timer_list timer; - int type; /* adapter type */ - int state; /* state of the S502/8 control latch */ - int buffer; /* current buffer for S508 firmware */ -}; - -#endif /* __KERNEL__ */ #endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */ -#ifdef __KERNEL__ -extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)); -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_ltalk.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_ltalk.h 2007-05-24 15:40:43.000000000 +0200 @@ -5,8 +5,5 @@ #define LTALK_MTU 600 #define LTALK_ALEN 1 -#ifdef __KERNEL__ -extern struct net_device *alloc_ltalkdev(int sizeof_priv); -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_pppox.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_pppox.h 2007-05-24 15:40:43.000000000 +0200 @@ -20,13 +20,6 @@ #include #include -#ifdef __KERNEL__ -#include -#include -#include -#include -#include -#endif /* __KERNEL__ */ /* For user-space programs to pick up these definitions * which they wouldn't get otherwise without defining __KERNEL__ @@ -111,64 +104,5 @@ struct pppoe_tag tag[0]; } __attribute__ ((packed)); -#ifdef __KERNEL__ -struct pppoe_opt { - struct net_device *dev; /* device associated with socket*/ - struct pppoe_addr pa; /* what this socket is bound to*/ - struct sockaddr_pppox relay; /* what socket data will be - relayed to (PPPoE relaying) */ -}; - -#include - -struct pppox_sock { - /* struct sock must be the first member of pppox_sock */ - struct sock sk; - struct ppp_channel chan; - struct pppox_sock *next; /* for hash table */ - union { - struct pppoe_opt pppoe; - } proto; - unsigned short num; -}; -#define pppoe_dev proto.pppoe.dev -#define pppoe_pa proto.pppoe.pa -#define pppoe_relay proto.pppoe.relay - -static inline struct pppox_sock *pppox_sk(struct sock *sk) -{ - return (struct pppox_sock *)sk; -} - -static inline struct sock *sk_pppox(struct pppox_sock *po) -{ - return (struct sock *)po; -} - -struct module; - -struct pppox_proto { - int (*create)(struct socket *sock); - int (*ioctl)(struct socket *sock, unsigned int cmd, - unsigned long arg); - struct module *owner; -}; - -extern int register_pppox_proto(int proto_num, struct pppox_proto *pp); -extern void unregister_pppox_proto(int proto_num); -extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */ -extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); - -/* PPPoX socket states */ -enum { - PPPOX_NONE = 0, /* initial state */ - PPPOX_CONNECTED = 1, /* connection established ==TCP_ESTABLISHED */ - PPPOX_BOUND = 2, /* bound to ppp device */ - PPPOX_RELAY = 4, /* forwarding is enabled */ - PPPOX_ZOMBIE = 8, /* dead, but still bound to ppp device */ - PPPOX_DEAD = 16 /* dead, useless, please clean me up!*/ -}; - -#endif /* __KERNEL__ */ #endif /* !(__LINUX_IF_PPPOX_H) */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_shaper.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_shaper.h 2007-05-24 15:40:43.000000000 +0200 @@ -1,47 +1,6 @@ #ifndef __LINUX_SHAPER_H #define __LINUX_SHAPER_H -#ifdef __KERNEL__ - -#define SHAPER_QLEN 10 -/* - * This is a bit speed dependent (read it shouldn't be a constant!) - * - * 5 is about right for 28.8 upwards. Below that double for every - * halving of speed or so. - ie about 20 for 9600 baud. - */ -#define SHAPER_LATENCY (5*HZ) -#define SHAPER_MAXSLIP 2 -#define SHAPER_BURST (HZ/50) /* Good for >128K then */ - -struct shaper -{ - struct sk_buff_head sendq; - __u32 bytespertick; - __u32 bitspersec; - __u32 shapelatency; - __u32 shapeclock; - unsigned long recovery; /* Time we can next clock a packet out on - an empty queue */ - spinlock_t lock; - struct net_device_stats stats; - struct net_device *dev; - int (*hard_start_xmit) (struct sk_buff *skb, - struct net_device *dev); - int (*hard_header) (struct sk_buff *skb, - struct net_device *dev, - unsigned short type, - void *daddr, - void *saddr, - unsigned len); - int (*rebuild_header)(struct sk_buff *skb); - int (*hard_header_cache)(struct neighbour *neigh, struct hh_cache *hh); - void (*header_cache_update)(struct hh_cache *hh, struct net_device *dev, unsigned char * haddr); - struct net_device_stats* (*get_stats)(struct net_device *dev); - struct timer_list timer; -}; - -#endif #define SHAPER_SET_DEV 0x0001 #define SHAPER_SET_SPEED 0x0002 --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_tr.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_tr.h 2007-05-24 15:40:43.000000000 +0200 @@ -42,17 +42,6 @@ __be16 rseg[8]; /* routing registers */ }; -#ifdef __KERNEL__ -#include - -static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb) -{ - return (struct trh_hdr *)skb->mac.raw; -} -#ifdef CONFIG_SYSCTL -extern struct ctl_table tr_table[]; -#endif -#endif /* This is an Token-Ring LLC structure */ struct trllc { --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_tun.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_tun.h 2007-05-24 15:40:43.000000000 +0200 @@ -21,41 +21,6 @@ /* Uncomment to enable debugging */ /* #define TUN_DEBUG 1 */ -#ifdef __KERNEL__ - -#ifdef TUN_DEBUG -#define DBG if(tun->debug)printk -#define DBG1 if(debug==2)printk -#else -#define DBG( a... ) -#define DBG1( a... ) -#endif - -struct tun_struct { - struct list_head list; - unsigned long flags; - int attached; - uid_t owner; - - wait_queue_head_t read_wait; - struct sk_buff_head readq; - - struct net_device *dev; - struct net_device_stats stats; - - struct fasync_struct *fasync; - - unsigned long if_flags; - u8 dev_addr[ETH_ALEN]; - u32 chr_filter[2]; - u32 net_filter[2]; - -#ifdef TUN_DEBUG - int debug; -#endif -}; - -#endif /* __KERNEL__ */ /* Read queue size */ #define TUN_READQ_SIZE 500 --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_vlan.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_vlan.h 2007-05-24 15:40:43.000000000 +0200 @@ -13,352 +13,6 @@ #ifndef _LINUX_IF_VLAN_H_ #define _LINUX_IF_VLAN_H_ -#ifdef __KERNEL__ - -/* externally defined structs */ -struct vlan_group; -struct net_device; -struct packet_type; -struct vlan_collection; -struct vlan_dev_info; -struct hlist_node; - -#include -#include - -#define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) - * that VLAN requires. - */ -#define VLAN_ETH_ALEN 6 /* Octets in one ethernet addr */ -#define VLAN_ETH_HLEN 18 /* Total octets in header. */ -#define VLAN_ETH_ZLEN 64 /* Min. octets in frame sans FCS */ - -/* - * According to 802.3ac, the packet can be 4 bytes longer. --Klika Jan - */ -#define VLAN_ETH_DATA_LEN 1500 /* Max. octets in payload */ -#define VLAN_ETH_FRAME_LEN 1518 /* Max. octets in frame sans FCS */ - -struct vlan_ethhdr { - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - __be16 h_vlan_proto; /* Should always be 0x8100 */ - __be16 h_vlan_TCI; /* Encapsulates priority and VLAN ID */ - __be16 h_vlan_encapsulated_proto; /* packet type ID field (or len) */ -}; - -#include - -static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) -{ - return (struct vlan_ethhdr *)skb->mac.raw; -} - -struct vlan_hdr { - __be16 h_vlan_TCI; /* Encapsulates priority and VLAN ID */ - __be16 h_vlan_encapsulated_proto; /* packet type ID field (or len) */ -}; - -#define VLAN_VID_MASK 0xfff - -/* found in socket.c */ -extern void vlan_ioctl_set(int (*hook)(void __user *)); - -#define VLAN_NAME "vlan" - -/* if this changes, algorithm will have to be reworked because this - * depends on completely exhausting the VLAN identifier space. Thus - * it gives constant time look-up, but in many cases it wastes memory. - */ -#define VLAN_GROUP_ARRAY_LEN 4096 - -struct vlan_group { - int real_dev_ifindex; /* The ifindex of the ethernet(like) device the vlan is attached to. */ - struct hlist_node hlist; /* linked list */ - struct net_device *vlan_devices[VLAN_GROUP_ARRAY_LEN]; - struct rcu_head rcu; -}; - -struct vlan_priority_tci_mapping { - unsigned long priority; - unsigned short vlan_qos; /* This should be shifted when first set, so we only do it - * at provisioning time. - * ((skb->priority << 13) & 0xE000) - */ - struct vlan_priority_tci_mapping *next; -}; - -/* Holds information that makes sense if this device is a VLAN device. */ -struct vlan_dev_info { - /** This will be the mapping that correlates skb->priority to - * 3 bits of VLAN QOS tags... - */ - unsigned long ingress_priority_map[8]; - struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */ - - unsigned short vlan_id; /* The VLAN Identifier for this interface. */ - unsigned short flags; /* (1 << 0) re_order_header This option will cause the - * VLAN code to move around the ethernet header on - * ingress to make the skb look **exactly** like it - * came in from an ethernet port. This destroys some of - * the VLAN information in the skb, but it fixes programs - * like DHCP that use packet-filtering and don't understand - * 802.1Q - */ - struct dev_mc_list *old_mc_list; /* old multi-cast list for the VLAN interface.. - * we save this so we can tell what changes were - * made, in order to feed the right changes down - * to the real hardware... - */ - int old_allmulti; /* similar to above. */ - int old_promiscuity; /* similar to above. */ - struct net_device *real_dev; /* the underlying device/interface */ - struct proc_dir_entry *dent; /* Holds the proc data */ - unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ - unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ - struct net_device_stats dev_stats; /* Device stats (rx-bytes, tx-pkts, etc...) */ -}; - -#define VLAN_DEV_INFO(x) ((struct vlan_dev_info *)(x->priv)) - -/* inline functions */ - -static inline struct net_device_stats *vlan_dev_get_stats(struct net_device *dev) -{ - return &(VLAN_DEV_INFO(dev)->dev_stats); -} - -static inline __u32 vlan_get_ingress_priority(struct net_device *dev, - unsigned short vlan_tag) -{ - struct vlan_dev_info *vip = VLAN_DEV_INFO(dev); - - return vip->ingress_priority_map[(vlan_tag >> 13) & 0x7]; -} - -/* VLAN tx hw acceleration helpers. */ -struct vlan_skb_tx_cookie { - u32 magic; - u32 vlan_tag; -}; - -#define VLAN_TX_COOKIE_MAGIC 0x564c414e /* "VLAN" in ascii. */ -#define VLAN_TX_SKB_CB(__skb) ((struct vlan_skb_tx_cookie *)&((__skb)->cb[0])) -#define vlan_tx_tag_present(__skb) \ - (VLAN_TX_SKB_CB(__skb)->magic == VLAN_TX_COOKIE_MAGIC) -#define vlan_tx_tag_get(__skb) (VLAN_TX_SKB_CB(__skb)->vlan_tag) - -/* VLAN rx hw acceleration helper. This acts like netif_{rx,receive_skb}(). */ -static inline int __vlan_hwaccel_rx(struct sk_buff *skb, - struct vlan_group *grp, - unsigned short vlan_tag, int polling) -{ - struct net_device_stats *stats; - - if (skb_bond_should_drop(skb)) { - dev_kfree_skb_any(skb); - return NET_RX_DROP; - } - - skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; - if (skb->dev == NULL) { - dev_kfree_skb_any(skb); - - /* Not NET_RX_DROP, this is not being dropped - * due to congestion. - */ - return 0; - } - - skb->dev->last_rx = jiffies; - - stats = vlan_dev_get_stats(skb->dev); - stats->rx_packets++; - stats->rx_bytes += skb->len; - - skb->priority = vlan_get_ingress_priority(skb->dev, vlan_tag); - switch (skb->pkt_type) { - case PACKET_BROADCAST: - break; - - case PACKET_MULTICAST: - stats->multicast++; - break; - - case PACKET_OTHERHOST: - /* Our lower layer thinks this is not local, let's make sure. - * This allows the VLAN to have a different MAC than the underlying - * device, and still route correctly. - */ - if (!compare_ether_addr(eth_hdr(skb)->h_dest, - skb->dev->dev_addr)) - skb->pkt_type = PACKET_HOST; - break; - }; - - return (polling ? netif_receive_skb(skb) : netif_rx(skb)); -} - -static inline int vlan_hwaccel_rx(struct sk_buff *skb, - struct vlan_group *grp, - unsigned short vlan_tag) -{ - return __vlan_hwaccel_rx(skb, grp, vlan_tag, 0); -} - -static inline int vlan_hwaccel_receive_skb(struct sk_buff *skb, - struct vlan_group *grp, - unsigned short vlan_tag) -{ - return __vlan_hwaccel_rx(skb, grp, vlan_tag, 1); -} - -/** - * __vlan_put_tag - regular VLAN tag inserting - * @skb: skbuff to tag - * @tag: VLAN tag to insert - * - * Inserts the VLAN tag into @skb as part of the payload - * Returns a VLAN tagged skb. If a new skb is created, @skb is freed. - * - * Following the skb_unshare() example, in case of error, the calling function - * doesn't have to worry about freeing the original skb. - */ -static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, unsigned short tag) -{ - struct vlan_ethhdr *veth; - - if (skb_headroom(skb) < VLAN_HLEN) { - struct sk_buff *sk_tmp = skb; - skb = skb_realloc_headroom(sk_tmp, VLAN_HLEN); - kfree_skb(sk_tmp); - if (!skb) { - printk(KERN_ERR "vlan: failed to realloc headroom\n"); - return NULL; - } - } else { - skb = skb_unshare(skb, GFP_ATOMIC); - if (!skb) { - printk(KERN_ERR "vlan: failed to unshare skbuff\n"); - return NULL; - } - } - - veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN); - - /* Move the mac addresses to the beginning of the new header. */ - memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); - - /* first, the ethernet type */ - veth->h_vlan_proto = __constant_htons(ETH_P_8021Q); - - /* now, the tag */ - veth->h_vlan_TCI = htons(tag); - - skb->protocol = __constant_htons(ETH_P_8021Q); - skb->mac.raw -= VLAN_HLEN; - skb->nh.raw -= VLAN_HLEN; - - return skb; -} - -/** - * __vlan_hwaccel_put_tag - hardware accelerated VLAN inserting - * @skb: skbuff to tag - * @tag: VLAN tag to insert - * - * Puts the VLAN tag in @skb->cb[] and lets the device do the rest - */ -static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, unsigned short tag) -{ - struct vlan_skb_tx_cookie *cookie; - - cookie = VLAN_TX_SKB_CB(skb); - cookie->magic = VLAN_TX_COOKIE_MAGIC; - cookie->vlan_tag = tag; - - return skb; -} - -#define HAVE_VLAN_PUT_TAG - -/** - * vlan_put_tag - inserts VLAN tag according to device features - * @skb: skbuff to tag - * @tag: VLAN tag to insert - * - * Assumes skb->dev is the target that will xmit this frame. - * Returns a VLAN tagged skb. - */ -static inline struct sk_buff *vlan_put_tag(struct sk_buff *skb, unsigned short tag) -{ - if (skb->dev->features & NETIF_F_HW_VLAN_TX) { - return __vlan_hwaccel_put_tag(skb, tag); - } else { - return __vlan_put_tag(skb, tag); - } -} - -/** - * __vlan_get_tag - get the VLAN ID that is part of the payload - * @skb: skbuff to query - * @tag: buffer to store vlaue - * - * Returns error if the skb is not of VLAN type - */ -static inline int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag) -{ - struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data; - - if (veth->h_vlan_proto != __constant_htons(ETH_P_8021Q)) { - return -EINVAL; - } - - *tag = ntohs(veth->h_vlan_TCI); - - return 0; -} - -/** - * __vlan_hwaccel_get_tag - get the VLAN ID that is in @skb->cb[] - * @skb: skbuff to query - * @tag: buffer to store vlaue - * - * Returns error if @skb->cb[] is not set correctly - */ -static inline int __vlan_hwaccel_get_tag(struct sk_buff *skb, unsigned short *tag) -{ - struct vlan_skb_tx_cookie *cookie; - - cookie = VLAN_TX_SKB_CB(skb); - if (cookie->magic == VLAN_TX_COOKIE_MAGIC) { - *tag = cookie->vlan_tag; - return 0; - } else { - *tag = 0; - return -EINVAL; - } -} - -#define HAVE_VLAN_GET_TAG - -/** - * vlan_get_tag - get the VLAN ID from the skb - * @skb: skbuff to query - * @tag: buffer to store vlaue - * - * Returns error if the skb is not VLAN tagged - */ -static inline int vlan_get_tag(struct sk_buff *skb, unsigned short *tag) -{ - if (skb->dev->features & NETIF_F_HW_VLAN_TX) { - return __vlan_hwaccel_get_tag(skb, tag); - } else { - return __vlan_get_tag(skb, tag); - } -} - -#endif /* __KERNEL__ */ /* VLAN IOCTLs are found in sockios.h */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/if_wanpipe.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/if_wanpipe.h 2007-05-24 15:40:43.000000000 +0200 @@ -99,26 +99,5 @@ #define WAN_PACKET_MR_PROMISC 1 #define WAN_PACKET_MR_ALLMULTI 2 -#ifdef __KERNEL__ - -/* Private wanpipe socket structures. */ -struct wanpipe_opt -{ - void *mbox; /* Mail box */ - void *card; /* Card bouded to */ - struct net_device *dev; /* Bounded device */ - unsigned short lcn; /* Binded LCN */ - unsigned char svc; /* 0=pvc, 1=svc */ - unsigned char timer; /* flag for delayed transmit*/ - struct timer_list tx_timer; - unsigned poll_cnt; - unsigned char force; /* Used to force sock release */ - atomic_t packet_sent; - unsigned short num; -}; - -#define wp_sk(__sk) ((struct wanpipe_opt *)(__sk)->sk_protinfo) - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/igmp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/igmp.h 2007-05-24 15:40:43.000000000 +0200 @@ -125,98 +125,5 @@ * struct for keeping the multicast list in */ -#ifdef __KERNEL__ -#include -#include -extern int sysctl_igmp_max_memberships; -extern int sysctl_igmp_max_msf; -extern int sysctl_igmp_tos; - -struct ip_sf_socklist -{ - unsigned int sl_max; - unsigned int sl_count; - __be32 sl_addr[0]; -}; - -#define IP_SFLSIZE(count) (sizeof(struct ip_sf_socklist) + \ - (count) * sizeof(__be32)) - -#define IP_SFBLOCK 10 /* allocate this many at once */ - -/* ip_mc_socklist is real list now. Speed is not argument; - this list never used in fast path code - */ - -struct ip_mc_socklist -{ - struct ip_mc_socklist *next; - struct ip_mreqn multi; - unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ - struct ip_sf_socklist *sflist; -}; - -struct ip_sf_list -{ - struct ip_sf_list *sf_next; - __be32 sf_inaddr; - unsigned long sf_count[2]; /* include/exclude counts */ - unsigned char sf_gsresp; /* include in g & s response? */ - unsigned char sf_oldin; /* change state */ - unsigned char sf_crcount; /* retrans. left to send */ -}; - -struct ip_mc_list -{ - struct in_device *interface; - __be32 multiaddr; - struct ip_sf_list *sources; - struct ip_sf_list *tomb; - unsigned int sfmode; - unsigned long sfcount[2]; - struct ip_mc_list *next; - struct timer_list timer; - int users; - atomic_t refcnt; - spinlock_t lock; - char tm_running; - char reporter; - char unsolicit_count; - char loaded; - unsigned char gsquery; /* check source marks? */ - unsigned char crcount; -}; - -/* V3 exponential field decoding */ -#define IGMPV3_MASK(value, nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value)) -#define IGMPV3_EXP(thresh, nbmant, nbexp, value) \ - ((value) < (thresh) ? (value) : \ - ((IGMPV3_MASK(value, nbmant) | (1<<(nbmant+nbexp))) << \ - (IGMPV3_MASK((value) >> (nbmant), nbexp) + (nbexp)))) - -#define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value) -#define IGMPV3_MRC(value) IGMPV3_EXP(0x80, 4, 3, value) - -extern int ip_check_mc(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u16 proto); -extern int igmp_rcv(struct sk_buff *); -extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr); -extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr); -extern void ip_mc_drop_socket(struct sock *sk); -extern int ip_mc_source(int add, int omode, struct sock *sk, - struct ip_mreq_source *mreqs, int ifindex); -extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex); -extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf, - struct ip_msfilter __user *optval, int __user *optlen); -extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, - struct group_filter __user *optval, int __user *optlen); -extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif); -extern void ip_mr_init(void); -extern void ip_mc_init_dev(struct in_device *); -extern void ip_mc_destroy_dev(struct in_device *); -extern void ip_mc_up(struct in_device *); -extern void ip_mc_down(struct in_device *); -extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); -extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/inet_diag.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/inet_diag.h 2007-05-24 15:40:43.000000000 +0200 @@ -118,21 +118,5 @@ __u32 tcpv_minrtt; }; -#ifdef __KERNEL__ -struct sock; -struct inet_hashinfo; - -struct inet_diag_handler { - struct inet_hashinfo *idiag_hashinfo; - void (*idiag_get_info)(struct sock *sk, - struct inet_diag_msg *r, - void *info); - __u16 idiag_info_size; - __u16 idiag_type; -}; - -extern int inet_diag_register(const struct inet_diag_handler *handler); -extern void inet_diag_unregister(const struct inet_diag_handler *handler); -#endif /* __KERNEL__ */ #endif /* _INET_DIAG_H_ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/inotify.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/inotify.h 2007-05-24 15:40:43.000000000 +0200 @@ -63,165 +63,5 @@ IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \ IN_MOVE_SELF) -#ifdef __KERNEL__ - -#include -#include - -/* - * struct inotify_watch - represents a watch request on a specific inode - * - * h_list is protected by ih->mutex of the associated inotify_handle. - * i_list, mask are protected by inode->inotify_mutex of the associated inode. - * ih, inode, and wd are never written to once the watch is created. - * - * Callers must use the established inotify interfaces to access inotify_watch - * contents. The content of this structure is private to the inotify - * implementation. - */ -struct inotify_watch { - struct list_head h_list; /* entry in inotify_handle's list */ - struct list_head i_list; /* entry in inode's list */ - atomic_t count; /* reference count */ - struct inotify_handle *ih; /* associated inotify handle */ - struct inode *inode; /* associated inode */ - __s32 wd; /* watch descriptor */ - __u32 mask; /* event mask for this watch */ -}; - -struct inotify_operations { - void (*handle_event)(struct inotify_watch *, u32, u32, u32, - const char *, struct inode *); - void (*destroy_watch)(struct inotify_watch *); -}; - -#ifdef CONFIG_INOTIFY - -/* Kernel API for producing events */ - -extern void inotify_d_instantiate(struct dentry *, struct inode *); -extern void inotify_d_move(struct dentry *); -extern void inotify_inode_queue_event(struct inode *, __u32, __u32, - const char *, struct inode *); -extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32, - const char *); -extern void inotify_unmount_inodes(struct list_head *); -extern void inotify_inode_is_dead(struct inode *); -extern u32 inotify_get_cookie(void); - -/* Kernel Consumer API */ - -extern struct inotify_handle *inotify_init(const struct inotify_operations *); -extern void inotify_init_watch(struct inotify_watch *); -extern void inotify_destroy(struct inotify_handle *); -extern __s32 inotify_find_watch(struct inotify_handle *, struct inode *, - struct inotify_watch **); -extern __s32 inotify_find_update_watch(struct inotify_handle *, struct inode *, - u32); -extern __s32 inotify_add_watch(struct inotify_handle *, struct inotify_watch *, - struct inode *, __u32); -extern int inotify_rm_watch(struct inotify_handle *, struct inotify_watch *); -extern int inotify_rm_wd(struct inotify_handle *, __u32); -extern void inotify_remove_watch_locked(struct inotify_handle *, - struct inotify_watch *); -extern void get_inotify_watch(struct inotify_watch *); -extern void put_inotify_watch(struct inotify_watch *); - -#else - -static inline void inotify_d_instantiate(struct dentry *dentry, - struct inode *inode) -{ -} - -static inline void inotify_d_move(struct dentry *dentry) -{ -} - -static inline void inotify_inode_queue_event(struct inode *inode, - __u32 mask, __u32 cookie, - const char *filename, - struct inode *n_inode) -{ -} - -static inline void inotify_dentry_parent_queue_event(struct dentry *dentry, - __u32 mask, __u32 cookie, - const char *filename) -{ -} - -static inline void inotify_unmount_inodes(struct list_head *list) -{ -} - -static inline void inotify_inode_is_dead(struct inode *inode) -{ -} - -static inline u32 inotify_get_cookie(void) -{ - return 0; -} - -static inline struct inotify_handle *inotify_init(const struct inotify_operations *ops) -{ - return ERR_PTR(-EOPNOTSUPP); -} - -static inline void inotify_init_watch(struct inotify_watch *watch) -{ -} - -static inline void inotify_destroy(struct inotify_handle *ih) -{ -} - -static inline __s32 inotify_find_watch(struct inotify_handle *ih, struct inode *inode, - struct inotify_watch **watchp) -{ - return -EOPNOTSUPP; -} - -static inline __s32 inotify_find_update_watch(struct inotify_handle *ih, - struct inode *inode, u32 mask) -{ - return -EOPNOTSUPP; -} - -static inline __s32 inotify_add_watch(struct inotify_handle *ih, - struct inotify_watch *watch, - struct inode *inode, __u32 mask) -{ - return -EOPNOTSUPP; -} - -static inline int inotify_rm_watch(struct inotify_handle *ih, - struct inotify_watch *watch) -{ - return -EOPNOTSUPP; -} - -static inline int inotify_rm_wd(struct inotify_handle *ih, __u32 wd) -{ - return -EOPNOTSUPP; -} - -static inline void inotify_remove_watch_locked(struct inotify_handle *ih, - struct inotify_watch *watch) -{ -} - -static inline void get_inotify_watch(struct inotify_watch *watch) -{ -} - -static inline void put_inotify_watch(struct inotify_watch *watch) -{ -} - -#endif /* CONFIG_INOTIFY */ - -#endif /* __KERNEL __ */ #endif /* _LINUX_INOTIFY_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/input.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/input.h 2007-05-24 15:40:43.000000000 +0200 @@ -9,15 +9,10 @@ * the Free Software Foundation. */ -#ifdef __KERNEL__ -#include -#include -#else #include #include #include #include -#endif /* * The event structure itself @@ -895,343 +890,4 @@ #define FF_MAX 0x7f -#ifdef __KERNEL__ - -/* - * In-kernel definitions. - */ - -#include -#include -#include -#include - -#define NBITS(x) (((x)/BITS_PER_LONG)+1) -#define BIT(x) (1UL<<((x)%BITS_PER_LONG)) -#define LONG(x) ((x)/BITS_PER_LONG) - -#define INPUT_KEYCODE(dev, scancode) ((dev->keycodesize == 1) ? ((u8*)dev->keycode)[scancode] : \ - ((dev->keycodesize == 2) ? ((u16*)dev->keycode)[scancode] : (((u32*)dev->keycode)[scancode]))) - -#define SET_INPUT_KEYCODE(dev, scancode, val) \ - ({ unsigned __old; \ - switch (dev->keycodesize) { \ - case 1: { \ - u8 *k = (u8 *)dev->keycode; \ - __old = k[scancode]; \ - k[scancode] = val; \ - break; \ - } \ - case 2: { \ - u16 *k = (u16 *)dev->keycode; \ - __old = k[scancode]; \ - k[scancode] = val; \ - break; \ - } \ - default: { \ - u32 *k = (u32 *)dev->keycode; \ - __old = k[scancode]; \ - k[scancode] = val; \ - break; \ - } \ - } \ - __old; }) - -struct input_dev { - - void *private; - - const char *name; - const char *phys; - const char *uniq; - struct input_id id; - - unsigned long evbit[NBITS(EV_MAX)]; - unsigned long keybit[NBITS(KEY_MAX)]; - unsigned long relbit[NBITS(REL_MAX)]; - unsigned long absbit[NBITS(ABS_MAX)]; - unsigned long mscbit[NBITS(MSC_MAX)]; - unsigned long ledbit[NBITS(LED_MAX)]; - unsigned long sndbit[NBITS(SND_MAX)]; - unsigned long ffbit[NBITS(FF_MAX)]; - unsigned long swbit[NBITS(SW_MAX)]; - - unsigned int keycodemax; - unsigned int keycodesize; - void *keycode; - - struct ff_device *ff; - - unsigned int repeat_key; - struct timer_list timer; - - int state; - - int sync; - - int abs[ABS_MAX + 1]; - int rep[REP_MAX + 1]; - - unsigned long key[NBITS(KEY_MAX)]; - unsigned long led[NBITS(LED_MAX)]; - unsigned long snd[NBITS(SND_MAX)]; - unsigned long sw[NBITS(SW_MAX)]; - - int absmax[ABS_MAX + 1]; - int absmin[ABS_MAX + 1]; - int absfuzz[ABS_MAX + 1]; - int absflat[ABS_MAX + 1]; - - int (*open)(struct input_dev *dev); - void (*close)(struct input_dev *dev); - int (*flush)(struct input_dev *dev, struct file *file); - int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); - - struct input_handle *grab; - - struct mutex mutex; /* serializes open and close operations */ - unsigned int users; - - struct class_device cdev; - - struct list_head h_list; - struct list_head node; -}; -#define to_input_dev(d) container_of(d, struct input_dev, cdev) - -/* - * Verify that we are in sync with input_device_id mod_devicetable.h #defines - */ - -#if EV_MAX != INPUT_DEVICE_ID_EV_MAX -#error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match" -#endif - -#if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX -#error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match" -#endif - -#if REL_MAX != INPUT_DEVICE_ID_REL_MAX -#error "REL_MAX and INPUT_DEVICE_ID_REL_MAX do not match" -#endif - -#if ABS_MAX != INPUT_DEVICE_ID_ABS_MAX -#error "ABS_MAX and INPUT_DEVICE_ID_ABS_MAX do not match" -#endif - -#if MSC_MAX != INPUT_DEVICE_ID_MSC_MAX -#error "MSC_MAX and INPUT_DEVICE_ID_MSC_MAX do not match" -#endif - -#if LED_MAX != INPUT_DEVICE_ID_LED_MAX -#error "LED_MAX and INPUT_DEVICE_ID_LED_MAX do not match" -#endif - -#if SND_MAX != INPUT_DEVICE_ID_SND_MAX -#error "SND_MAX and INPUT_DEVICE_ID_SND_MAX do not match" -#endif - -#if FF_MAX != INPUT_DEVICE_ID_FF_MAX -#error "FF_MAX and INPUT_DEVICE_ID_FF_MAX do not match" -#endif - -#if SW_MAX != INPUT_DEVICE_ID_SW_MAX -#error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" -#endif - -#define INPUT_DEVICE_ID_MATCH_DEVICE \ - (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) -#define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ - (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION) - -struct input_handle; - -/** - * struct input_handler - implements one of interfaces for input devices - * @private: driver-specific data - * @event: event handler - * @connect: called when attaching a handler to an input device - * @disconnect: disconnects a handler from input device - * @start: starts handler for given handle. This function is called by - * input core right after connect() method and also when a process - * that "grabbed" a device releases it - * @fops: file operations this driver implements - * @minor: beginning of range of 32 minors for devices this driver - * can provide - * @name: name of the handler, to be shown in /proc/bus/input/handlers - * @id_table: pointer to a table of input_device_ids this driver can - * handle - * @blacklist: prointer to a table of input_device_ids this driver should - * ignore even if they match @id_table - * @h_list: list of input handles associated with the handler - * @node: for placing the driver onto input_handler_list - */ -struct input_handler { - - void *private; - - void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); - struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); - void (*disconnect)(struct input_handle *handle); - void (*start)(struct input_handle *handle); - - const struct file_operations *fops; - int minor; - const char *name; - - const struct input_device_id *id_table; - const struct input_device_id *blacklist; - - struct list_head h_list; - struct list_head node; -}; - -struct input_handle { - - void *private; - - int open; - const char *name; - - struct input_dev *dev; - struct input_handler *handler; - - struct list_head d_node; - struct list_head h_node; -}; - -#define to_dev(n) container_of(n,struct input_dev,node) -#define to_handler(n) container_of(n,struct input_handler,node); -#define to_handle(n) container_of(n,struct input_handle,d_node) -#define to_handle_h(n) container_of(n,struct input_handle,h_node) - -struct input_dev *input_allocate_device(void); -void input_free_device(struct input_dev *dev); - -static inline struct input_dev *input_get_device(struct input_dev *dev) -{ - return to_input_dev(class_device_get(&dev->cdev)); -} - -static inline void input_put_device(struct input_dev *dev) -{ - class_device_put(&dev->cdev); -} - -int input_register_device(struct input_dev *); -void input_unregister_device(struct input_dev *); - -int input_register_handler(struct input_handler *); -void input_unregister_handler(struct input_handler *); - -int input_grab_device(struct input_handle *); -void input_release_device(struct input_handle *); - -int input_open_device(struct input_handle *); -void input_close_device(struct input_handle *); - -int input_flush_device(struct input_handle* handle, struct file* file); - -void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); -void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); - -static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_KEY, code, !!value); -} - -static inline void input_report_rel(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_REL, code, value); -} - -static inline void input_report_abs(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_ABS, code, value); -} - -static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_FF_STATUS, code, value); -} - -static inline void input_report_switch(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_SW, code, !!value); -} - -static inline void input_sync(struct input_dev *dev) -{ - input_event(dev, EV_SYN, SYN_REPORT, 0); -} - -static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) -{ - dev->absmin[axis] = min; - dev->absmax[axis] = max; - dev->absfuzz[axis] = fuzz; - dev->absflat[axis] = flat; - - dev->absbit[LONG(axis)] |= BIT(axis); -} - -extern struct class input_class; - -/** - * struct ff_device - force-feedback part of an input device - * @upload: Called to upload an new effect into device - * @erase: Called to erase an effect from device - * @playback: Called to request device to start playing specified effect - * @set_gain: Called to set specified gain - * @set_autocenter: Called to auto-center device - * @destroy: called by input core when parent input device is being - * destroyed - * @private: driver-specific data, will be freed automatically - * @ffbit: bitmap of force feedback capabilities truly supported by - * device (not emulated like ones in input_dev->ffbit) - * @mutex: mutex for serializing access to the device - * @max_effects: maximum number of effects supported by device - * @effects: pointer to an array of effects currently loaded into device - * @effect_owners: array of effect owners; when file handle owning - * an effect gets closed the effcet is automatically erased - * - * Every force-feedback device must implement upload() and playback() - * methods; erase() is optional. set_gain() and set_autocenter() need - * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER - * bits. - */ -struct ff_device { - int (*upload)(struct input_dev *dev, struct ff_effect *effect, - struct ff_effect *old); - int (*erase)(struct input_dev *dev, int effect_id); - - int (*playback)(struct input_dev *dev, int effect_id, int value); - void (*set_gain)(struct input_dev *dev, u16 gain); - void (*set_autocenter)(struct input_dev *dev, u16 magnitude); - - void (*destroy)(struct ff_device *); - - void *private; - - unsigned long ffbit[NBITS(FF_MAX)]; - - struct mutex mutex; - - int max_effects; - struct ff_effect *effects; - struct file *effect_owners[]; -}; - -int input_ff_create(struct input_dev *dev, int max_effects); -void input_ff_destroy(struct input_dev *dev); - -int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); - -int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file); -int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file); - -int input_ff_create_memless(struct input_dev *dev, void *data, - int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ipc.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ipc.h 2007-05-24 15:40:43.000000000 +0200 @@ -49,81 +49,6 @@ #define IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger message sizes, etc. */ -#ifdef __KERNEL__ - -#include - -#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ - -/* used by in-kernel data structures */ -struct kern_ipc_perm -{ - spinlock_t lock; - int deleted; - key_t key; - uid_t uid; - gid_t gid; - uid_t cuid; - gid_t cgid; - mode_t mode; - unsigned long seq; - void *security; -}; - -struct ipc_ids; -struct ipc_namespace { - struct kref kref; - struct ipc_ids *ids[3]; - - int sem_ctls[4]; - int used_sems; - - int msg_ctlmax; - int msg_ctlmnb; - int msg_ctlmni; - - size_t shm_ctlmax; - size_t shm_ctlall; - int shm_ctlmni; - int shm_tot; -}; - -extern struct ipc_namespace init_ipc_ns; - -#ifdef CONFIG_SYSVIPC -#define INIT_IPC_NS(ns) .ns = &init_ipc_ns, -#else -#define INIT_IPC_NS(ns) -#endif - -#ifdef CONFIG_IPC_NS -extern void free_ipc_ns(struct kref *kref); -extern int copy_ipcs(unsigned long flags, struct task_struct *tsk); -extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns); -#else -static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk) -{ - return 0; -} -#endif - -static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) -{ -#ifdef CONFIG_IPC_NS - if (ns) - kref_get(&ns->kref); -#endif - return ns; -} - -static inline void put_ipc_ns(struct ipc_namespace *ns) -{ -#ifdef CONFIG_IPC_NS - kref_put(&ns->kref, free_ipc_ns); -#endif -} - -#endif /* __KERNEL__ */ #endif /* _LINUX_IPC_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ipmi.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ipmi.h 2007-05-24 15:40:43.000000000 +0200 @@ -35,7 +35,6 @@ #define __LINUX_IPMI_H #include -#include /* * This file describes an interface to an IPMI driver. You have to @@ -167,7 +166,7 @@ unsigned char netfn; unsigned char cmd; unsigned short data_len; - unsigned char __user *data; + unsigned char *data; }; struct kernel_ipmi_msg @@ -209,218 +208,6 @@ -#ifdef __KERNEL__ - -/* - * The in-kernel interface. - */ -#include -#include -#include -#include - -/* Opaque type for a IPMI message user. One of these is needed to - send and receive messages. */ -typedef struct ipmi_user *ipmi_user_t; - -/* - * Stuff coming from the receive interface comes as one of these. - * They are allocated, the receiver must free them with - * ipmi_free_recv_msg() when done with the message. The link is not - * used after the message is delivered, so the upper layer may use the - * link to build a linked list, if it likes. - */ -struct ipmi_recv_msg -{ - struct list_head link; - - /* The type of message as defined in the "Receive Types" - defines above. */ - int recv_type; - - ipmi_user_t user; - struct ipmi_addr addr; - long msgid; - struct kernel_ipmi_msg msg; - - /* The user_msg_data is the data supplied when a message was - sent, if this is a response to a sent message. If this is - not a response to a sent message, then user_msg_data will - be NULL. If the user above is NULL, then this will be the - intf. */ - void *user_msg_data; - - /* Call this when done with the message. It will presumably free - the message and do any other necessary cleanup. */ - void (*done)(struct ipmi_recv_msg *msg); - - /* Place-holder for the data, don't make any assumptions about - the size or existance of this, since it may change. */ - unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; -}; - -/* Allocate and free the receive message. */ -void ipmi_free_recv_msg(struct ipmi_recv_msg *msg); - -struct ipmi_user_hndl -{ - /* Routine type to call when a message needs to be routed to - the upper layer. This will be called with some locks held, - the only IPMI routines that can be called are ipmi_request - and the alloc/free operations. The handler_data is the - variable supplied when the receive handler was registered. */ - void (*ipmi_recv_hndl)(struct ipmi_recv_msg *msg, - void *user_msg_data); - - /* Called when the interface detects a watchdog pre-timeout. If - this is NULL, it will be ignored for the user. */ - void (*ipmi_watchdog_pretimeout)(void *handler_data); -}; - -/* Create a new user of the IPMI layer on the given interface number. */ -int ipmi_create_user(unsigned int if_num, - struct ipmi_user_hndl *handler, - void *handler_data, - ipmi_user_t *user); - -/* Destroy the given user of the IPMI layer. Note that after this - function returns, the system is guaranteed to not call any - callbacks for the user. Thus as long as you destroy all the users - before you unload a module, you will be safe. And if you destroy - the users before you destroy the callback structures, it should be - safe, too. */ -int ipmi_destroy_user(ipmi_user_t user); - -/* Get the IPMI version of the BMC we are talking to. */ -void ipmi_get_version(ipmi_user_t user, - unsigned char *major, - unsigned char *minor); - -/* Set and get the slave address and LUN that we will use for our - source messages. Note that this affects the interface, not just - this user, so it will affect all users of this interface. This is - so some initialization code can come in and do the OEM-specific - things it takes to determine your address (if not the BMC) and set - it for everyone else. Note that each channel can have its own address. */ -int ipmi_set_my_address(ipmi_user_t user, - unsigned int channel, - unsigned char address); -int ipmi_get_my_address(ipmi_user_t user, - unsigned int channel, - unsigned char *address); -int ipmi_set_my_LUN(ipmi_user_t user, - unsigned int channel, - unsigned char LUN); -int ipmi_get_my_LUN(ipmi_user_t user, - unsigned int channel, - unsigned char *LUN); - -/* - * Like ipmi_request, but lets you specify the number of retries and - * the retry time. The retries is the number of times the message - * will be resent if no reply is received. If set to -1, the default - * value will be used. The retry time is the time in milliseconds - * between retries. If set to zero, the default value will be - * used. - * - * Don't use this unless you *really* have to. It's primarily for the - * IPMI over LAN converter; since the LAN stuff does its own retries, - * it makes no sense to do it here. However, this can be used if you - * have unusual requirements. - */ -int ipmi_request_settime(ipmi_user_t user, - struct ipmi_addr *addr, - long msgid, - struct kernel_ipmi_msg *msg, - void *user_msg_data, - int priority, - int max_retries, - unsigned int retry_time_ms); - -/* - * Like ipmi_request, but with messages supplied. This will not - * allocate any memory, and the messages may be statically allocated - * (just make sure to do the "done" handling on them). Note that this - * is primarily for the watchdog timer, since it should be able to - * send messages even if no memory is available. This is subject to - * change as the system changes, so don't use it unless you REALLY - * have to. - */ -int ipmi_request_supply_msgs(ipmi_user_t user, - struct ipmi_addr *addr, - long msgid, - struct kernel_ipmi_msg *msg, - void *user_msg_data, - void *supplied_smi, - struct ipmi_recv_msg *supplied_recv, - int priority); - -/* - * When commands come in to the SMS, the user can register to receive - * them. Only one user can be listening on a specific netfn/cmd/chan tuple - * at a time, you will get an EBUSY error if the command is already - * registered. If a command is received that does not have a user - * registered, the driver will automatically return the proper - * error. Channels are specified as a bitfield, use IPMI_CHAN_ALL to - * mean all channels. - */ -int ipmi_register_for_cmd(ipmi_user_t user, - unsigned char netfn, - unsigned char cmd, - unsigned int chans); -int ipmi_unregister_for_cmd(ipmi_user_t user, - unsigned char netfn, - unsigned char cmd, - unsigned int chans); - -/* - * Allow run-to-completion mode to be set for the interface of - * a specific user. - */ -void ipmi_user_set_run_to_completion(ipmi_user_t user, int val); - -/* - * When the user is created, it will not receive IPMI events by - * default. The user must set this to TRUE to get incoming events. - * The first user that sets this to TRUE will receive all events that - * have been queued while no one was waiting for events. - */ -int ipmi_set_gets_events(ipmi_user_t user, int val); - -/* - * Called when a new SMI is registered. This will also be called on - * every existing interface when a new watcher is registered with - * ipmi_smi_watcher_register(). - */ -struct ipmi_smi_watcher -{ - struct list_head link; - - /* You must set the owner to the current module, if you are in - a module (generally just set it to "THIS_MODULE"). */ - struct module *owner; - - /* These two are called with read locks held for the interface - the watcher list. So you can add and remove users from the - IPMI interface, send messages, etc., but you cannot add - or remove SMI watchers or SMI interfaces. */ - void (*new_smi)(int if_num, struct device *dev); - void (*smi_gone)(int if_num); -}; - -int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher); -int ipmi_smi_watcher_unregister(struct ipmi_smi_watcher *watcher); - -/* The following are various helper functions for dealing with IPMI - addresses. */ - -/* Return the maximum length of an IPMI address given it's type. */ -unsigned int ipmi_addr_length(int addr_type); - -/* Validate that the given IPMI address is valid. */ -int ipmi_validate_addr(struct ipmi_addr *addr, int len); - -#endif /* __KERNEL__ */ /* @@ -466,7 +253,7 @@ /* Messages sent to the interface are this format. */ struct ipmi_req { - unsigned char __user *addr; /* Address to send the message to. */ + unsigned char *addr; /* Address to send the message to. */ unsigned int addr_len; long msgid; /* The sequence number for the message. This @@ -517,7 +304,7 @@ int recv_type; /* Is this a command, response or an asyncronous event. */ - unsigned char __user *addr; /* Address the message was from is put + unsigned char *addr; /* Address the message was from is put here. The caller must supply the memory. */ unsigned int addr_len; /* The size of the address buffer. --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ipv6.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ipv6.h 2007-05-24 15:40:43.000000000 +0200 @@ -58,9 +58,6 @@ #define ipv6_destopt_hdr ipv6_opt_hdr #define ipv6_hopopt_hdr ipv6_opt_hdr -#ifdef __KERNEL__ -#define ipv6_optlen(p) (((p)->hdrlen+1) << 3) -#endif /* * routing header type 0 (used in cmsghdr struct) @@ -208,265 +205,5 @@ DEVCONF_MAX }; -#ifdef __KERNEL__ -#include -#include -#include - -#include /* struct ipv6_mc_socklist */ -#include - -/* - This structure contains results of exthdrs parsing - as offsets from skb->nh. - */ - -struct inet6_skb_parm { - int iif; - __u16 ra; - __u16 hop; - __u16 dst0; - __u16 srcrt; - __u16 dst1; - __u16 lastopt; - __u32 nhoff; - __u16 flags; -#ifdef CONFIG_IPV6_MIP6 - __u16 dsthao; -#endif - -#define IP6SKB_XFRM_TRANSFORMED 1 -}; - -#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) - -static inline int inet6_iif(const struct sk_buff *skb) -{ - return IP6CB(skb)->iif; -} - -struct inet6_request_sock { - struct in6_addr loc_addr; - struct in6_addr rmt_addr; - struct sk_buff *pktopts; - int iif; -}; - -struct tcp6_request_sock { - struct tcp_request_sock tcp6rsk_tcp; - struct inet6_request_sock tcp6rsk_inet6; -}; - -/** - * struct ipv6_pinfo - ipv6 private area - * - * In the struct sock hierarchy (tcp6_sock, upd6_sock, etc) - * this _must_ be the last member, so that inet6_sk_generic - * is able to calculate its offset from the base struct sock - * by using the struct proto->slab_obj_size member. -acme - */ -struct ipv6_pinfo { - struct in6_addr saddr; - struct in6_addr rcv_saddr; - struct in6_addr daddr; - struct in6_addr *daddr_cache; -#ifdef CONFIG_IPV6_SUBTREES - struct in6_addr *saddr_cache; -#endif - - __u32 flow_label; - __u32 frag_size; - __s16 hop_limit; - __s16 mcast_hops; - int mcast_oif; - - /* pktoption flags */ - union { - struct { - __u16 srcrt:2, - osrcrt:2, - rxinfo:1, - rxoinfo:1, - rxhlim:1, - rxohlim:1, - hopopts:1, - ohopopts:1, - dstopts:1, - odstopts:1, - rxflow:1, - rxtclass:1; - } bits; - __u16 all; - } rxopt; - - /* sockopt flags */ - __u8 mc_loop:1, - recverr:1, - sndflow:1, - pmtudisc:2, - ipv6only:1; - __u8 tclass; - - __u32 dst_cookie; - - struct ipv6_mc_socklist *ipv6_mc_list; - struct ipv6_ac_socklist *ipv6_ac_list; - struct ipv6_fl_socklist *ipv6_fl_list; - - struct ipv6_txoptions *opt; - struct sk_buff *pktoptions; - struct { - struct ipv6_txoptions *opt; - struct rt6_info *rt; - int hop_limit; - int tclass; - } cork; -}; - -/* WARNING: don't change the layout of the members in {raw,udp,tcp}6_sock! */ -struct raw6_sock { - /* inet_sock has to be the first member of raw6_sock */ - struct inet_sock inet; - __u32 checksum; /* perform checksum */ - __u32 offset; /* checksum offset */ - struct icmp6_filter filter; - /* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */ - struct ipv6_pinfo inet6; -}; - -struct udp6_sock { - struct udp_sock udp; - /* ipv6_pinfo has to be the last member of udp6_sock, see inet6_sk_generic */ - struct ipv6_pinfo inet6; -}; - -struct tcp6_sock { - struct tcp_sock tcp; - /* ipv6_pinfo has to be the last member of tcp6_sock, see inet6_sk_generic */ - struct ipv6_pinfo inet6; -}; - -extern int inet6_sk_rebuild_header(struct sock *sk); - -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) -static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk) -{ - return inet_sk(__sk)->pinet6; -} - -static inline struct inet6_request_sock * - inet6_rsk(const struct request_sock *rsk) -{ - return (struct inet6_request_sock *)(((u8 *)rsk) + - inet_rsk(rsk)->inet6_rsk_offset); -} - -static inline u32 inet6_rsk_offset(struct request_sock *rsk) -{ - return rsk->rsk_ops->obj_size - sizeof(struct inet6_request_sock); -} - -static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *ops) -{ - struct request_sock *req = reqsk_alloc(ops); - - if (req != NULL) - inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); - - return req; -} - -static inline struct raw6_sock *raw6_sk(const struct sock *sk) -{ - return (struct raw6_sock *)sk; -} - -static inline void inet_sk_copy_descendant(struct sock *sk_to, - const struct sock *sk_from) -{ - int ancestor_size = sizeof(struct inet_sock); - - if (sk_from->sk_family == PF_INET6) - ancestor_size += sizeof(struct ipv6_pinfo); - - __inet_sk_copy_descendant(sk_to, sk_from, ancestor_size); -} - -#define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only) -#define ipv6_only_sock(sk) ((sk)->sk_family == PF_INET6 && __ipv6_only_sock(sk)) - -struct inet6_timewait_sock { - struct in6_addr tw_v6_daddr; - struct in6_addr tw_v6_rcv_saddr; -}; - -struct tcp6_timewait_sock { - struct tcp_timewait_sock tcp6tw_tcp; - struct inet6_timewait_sock tcp6tw_inet6; -}; - -static inline u16 inet6_tw_offset(const struct proto *prot) -{ - return prot->twsk_prot->twsk_obj_size - - sizeof(struct inet6_timewait_sock); -} - -static inline struct inet6_timewait_sock *inet6_twsk(const struct sock *sk) -{ - return (struct inet6_timewait_sock *)(((u8 *)sk) + - inet_twsk(sk)->tw_ipv6_offset); -} - -static inline struct in6_addr *__inet6_rcv_saddr(const struct sock *sk) -{ - return likely(sk->sk_state != TCP_TIME_WAIT) ? - &inet6_sk(sk)->rcv_saddr : &inet6_twsk(sk)->tw_v6_rcv_saddr; -} - -static inline struct in6_addr *inet6_rcv_saddr(const struct sock *sk) -{ - return sk->sk_family == AF_INET6 ? __inet6_rcv_saddr(sk) : NULL; -} - -static inline int inet_v6_ipv6only(const struct sock *sk) -{ - return likely(sk->sk_state != TCP_TIME_WAIT) ? - ipv6_only_sock(sk) : inet_twsk(sk)->tw_ipv6only; -} -#else -#define __ipv6_only_sock(sk) 0 -#define ipv6_only_sock(sk) 0 - -static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk) -{ - return NULL; -} - -static inline struct inet6_request_sock * - inet6_rsk(const struct request_sock *rsk) -{ - return NULL; -} - -static inline struct raw6_sock *raw6_sk(const struct sock *sk) -{ - return NULL; -} - -#define __inet6_rcv_saddr(__sk) NULL -#define inet6_rcv_saddr(__sk) NULL -#define tcp_twsk_ipv6only(__sk) 0 -#define inet_v6_ipv6only(__sk) 0 -#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ - -#define INET6_MATCH(__sk, __hash, __saddr, __daddr, __ports, __dif)\ - (((__sk)->sk_hash == (__hash)) && \ - ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ - ((__sk)->sk_family == AF_INET6) && \ - ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ - ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \ - (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) - -#endif /* __KERNEL__ */ #endif /* _IPV6_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ipv6_route.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ipv6_route.h 2007-05-24 15:40:43.000000000 +0200 @@ -34,10 +34,6 @@ #define RTF_LOCAL 0x80000000 -#ifdef __KERNEL__ -#define IPV6_EXTRACT_PREF(flag) (((flag) & RTF_PREF_MASK) >> 27) -#define IPV6_DECODE_PREF(pref) ((pref) ^ 2) /* 1:low,2:med,3:high */ -#endif struct in6_rtmsg { struct in6_addr rtmsg_dst; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/isdn.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/isdn.h 2007-05-24 15:40:43.000000000 +0200 @@ -144,493 +144,5 @@ #define ISDN_NET_DM_AUTO 0x80 /* this interface is autodial */ #define ISDN_NET_DIALMODE(x) ((&(x))->flags & ISDN_NET_DIALMODE_MASK) -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define ISDN_TTY_MAJOR 43 -#define ISDN_TTYAUX_MAJOR 44 -#define ISDN_MAJOR 45 - -/* The minor-devicenumbers for Channel 0 and 1 are used as arguments for - * physical Channel-Mapping, so they MUST NOT be changed without changing - * the correspondent code in isdn.c - */ - -#define ISDN_MINOR_B 0 -#define ISDN_MINOR_BMAX (ISDN_MAX_CHANNELS-1) -#define ISDN_MINOR_CTRL 64 -#define ISDN_MINOR_CTRLMAX (64 + (ISDN_MAX_CHANNELS-1)) -#define ISDN_MINOR_PPP 128 -#define ISDN_MINOR_PPPMAX (128 + (ISDN_MAX_CHANNELS-1)) -#define ISDN_MINOR_STATUS 255 - -#ifdef CONFIG_ISDN_PPP - -#ifdef CONFIG_ISDN_PPP_VJ -# include -#endif - -#include -#include - -#include -#endif - -#ifdef CONFIG_ISDN_X25 -# include -#endif - -#include - -#define ISDN_DRVIOCTL_MASK 0x7f /* Mask for Device-ioctl */ - -/* Until now unused */ -#define ISDN_SERVICE_VOICE 1 -#define ISDN_SERVICE_AB 1<<1 -#define ISDN_SERVICE_X21 1<<2 -#define ISDN_SERVICE_G4 1<<3 -#define ISDN_SERVICE_BTX 1<<4 -#define ISDN_SERVICE_DFUE 1<<5 -#define ISDN_SERVICE_X25 1<<6 -#define ISDN_SERVICE_TTX 1<<7 -#define ISDN_SERVICE_MIXED 1<<8 -#define ISDN_SERVICE_FW 1<<9 -#define ISDN_SERVICE_GTEL 1<<10 -#define ISDN_SERVICE_BTXN 1<<11 -#define ISDN_SERVICE_BTEL 1<<12 - -/* Macros checking plain usage */ -#define USG_NONE(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_NONE) -#define USG_RAW(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_RAW) -#define USG_MODEM(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_MODEM) -#define USG_VOICE(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_VOICE) -#define USG_NET(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_NET) -#define USG_FAX(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_FAX) -#define USG_OUTGOING(x) ((x & ISDN_USAGE_OUTGOING)==ISDN_USAGE_OUTGOING) -#define USG_MODEMORVOICE(x) (((x & ISDN_USAGE_MASK)==ISDN_USAGE_MODEM) || \ - ((x & ISDN_USAGE_MASK)==ISDN_USAGE_VOICE) ) - -/* Timer-delays and scheduling-flags */ -#define ISDN_TIMER_RES 4 /* Main Timer-Resolution */ -#define ISDN_TIMER_02SEC (HZ/ISDN_TIMER_RES/5) /* Slow-Timer1 .2 sec */ -#define ISDN_TIMER_1SEC (HZ/ISDN_TIMER_RES) /* Slow-Timer2 1 sec */ -#define ISDN_TIMER_RINGING 5 /* tty RINGs = ISDN_TIMER_1SEC * this factor */ -#define ISDN_TIMER_KEEPINT 10 /* Cisco-Keepalive = ISDN_TIMER_1SEC * this factor */ -#define ISDN_TIMER_MODEMREAD 1 -#define ISDN_TIMER_MODEMPLUS 2 -#define ISDN_TIMER_MODEMRING 4 -#define ISDN_TIMER_MODEMXMIT 8 -#define ISDN_TIMER_NETDIAL 16 -#define ISDN_TIMER_NETHANGUP 32 -#define ISDN_TIMER_CARRIER 256 /* Wait for Carrier */ -#define ISDN_TIMER_FAST (ISDN_TIMER_MODEMREAD | ISDN_TIMER_MODEMPLUS | \ - ISDN_TIMER_MODEMXMIT) -#define ISDN_TIMER_SLOW (ISDN_TIMER_MODEMRING | ISDN_TIMER_NETHANGUP | \ - ISDN_TIMER_NETDIAL | ISDN_TIMER_CARRIER) - -/* Timeout-Values for isdn_net_dial() */ -#define ISDN_TIMER_DTIMEOUT10 (10*HZ/(ISDN_TIMER_02SEC*(ISDN_TIMER_RES+1))) -#define ISDN_TIMER_DTIMEOUT15 (15*HZ/(ISDN_TIMER_02SEC*(ISDN_TIMER_RES+1))) -#define ISDN_TIMER_DTIMEOUT60 (60*HZ/(ISDN_TIMER_02SEC*(ISDN_TIMER_RES+1))) - -/* GLOBAL_FLAGS */ -#define ISDN_GLOBAL_STOPPED 1 - -/*=================== Start of ip-over-ISDN stuff =========================*/ - -/* Feature- and status-flags for a net-interface */ -#define ISDN_NET_CONNECTED 0x01 /* Bound to ISDN-Channel */ -#define ISDN_NET_SECURE 0x02 /* Accept calls from phonelist only */ -#define ISDN_NET_CALLBACK 0x04 /* activate callback */ -#define ISDN_NET_CBHUP 0x08 /* hangup before callback */ -#define ISDN_NET_CBOUT 0x10 /* remote machine does callback */ - -#define ISDN_NET_MAGIC 0x49344C02 /* for paranoia-checking */ - -/* Phone-list-element */ -typedef struct { - void *next; - char num[ISDN_MSNLEN]; -} isdn_net_phone; - -/* - Principles when extending structures for generic encapsulation protocol - ("concap") support: - - Stuff which is hardware specific (here i4l-specific) goes in - the netdev -> local structure (here: isdn_net_local) - - Stuff which is encapsulation protocol specific goes in the structure - which holds the linux device structure (here: isdn_net_device) -*/ - -/* Local interface-data */ -typedef struct isdn_net_local_s { - ulong magic; - char name[10]; /* Name of device */ - struct net_device_stats stats; /* Ethernet Statistics */ - int isdn_device; /* Index to isdn-device */ - int isdn_channel; /* Index to isdn-channel */ - int ppp_slot; /* PPPD device slot number */ - int pre_device; /* Preselected isdn-device */ - int pre_channel; /* Preselected isdn-channel */ - int exclusive; /* If non-zero idx to reserved chan.*/ - int flags; /* Connection-flags */ - int dialretry; /* Counter for Dialout-retries */ - int dialmax; /* Max. Number of Dial-retries */ - int cbdelay; /* Delay before Callback starts */ - int dtimer; /* Timeout-counter for dialing */ - char msn[ISDN_MSNLEN]; /* MSNs/EAZs for this interface */ - u_char cbhup; /* Flag: Reject Call before Callback*/ - u_char dialstate; /* State for dialing */ - u_char p_encap; /* Packet encapsulation */ - /* 0 = Ethernet over ISDN */ - /* 1 = RAW-IP */ - /* 2 = IP with type field */ - u_char l2_proto; /* Layer-2-protocol */ - /* See ISDN_PROTO_L2..-constants in */ - /* isdnif.h */ - /* 0 = X75/LAPB with I-Frames */ - /* 1 = X75/LAPB with UI-Frames */ - /* 2 = X75/LAPB with BUI-Frames */ - /* 3 = HDLC */ - u_char l3_proto; /* Layer-3-protocol */ - /* See ISDN_PROTO_L3..-constants in */ - /* isdnif.h */ - /* 0 = Transparent */ - int huptimer; /* Timeout-counter for auto-hangup */ - int charge; /* Counter for charging units */ - ulong chargetime; /* Timer for Charging info */ - int hupflags; /* Flags for charge-unit-hangup: */ - /* bit0: chargeint is invalid */ - /* bit1: Getting charge-interval */ - /* bit2: Do charge-unit-hangup */ - /* bit3: Do hangup even on incoming */ - int outgoing; /* Flag: outgoing call */ - int onhtime; /* Time to keep link up */ - int chargeint; /* Interval between charge-infos */ - int onum; /* Flag: at least 1 outgoing number */ - int cps; /* current speed of this interface */ - int transcount; /* byte-counter for cps-calculation */ - int sqfull; /* Flag: netdev-queue overloaded */ - ulong sqfull_stamp; /* Start-Time of overload */ - ulong slavedelay; /* Dynamic bundling delaytime */ - int triggercps; /* BogoCPS needed for trigger slave */ - isdn_net_phone *phone[2]; /* List of remote-phonenumbers */ - /* phone[0] = Incoming Numbers */ - /* phone[1] = Outgoing Numbers */ - isdn_net_phone *dial; /* Pointer to dialed number */ - struct net_device *master; /* Ptr to Master device for slaves */ - struct net_device *slave; /* Ptr to Slave device for masters */ - struct isdn_net_local_s *next; /* Ptr to next link in bundle */ - struct isdn_net_local_s *last; /* Ptr to last link in bundle */ - struct isdn_net_dev_s *netdev; /* Ptr to netdev */ - struct sk_buff_head super_tx_queue; /* List of supervisory frames to */ - /* be transmitted asap */ - atomic_t frame_cnt; /* number of frames currently */ - /* queued in HL driver */ - /* Ptr to orig. hard_header_cache */ - spinlock_t xmit_lock; /* used to protect the xmit path of */ - /* a particular channel (including */ - /* the frame_cnt */ - - int (*org_hhc)( - struct neighbour *neigh, - struct hh_cache *hh); - /* Ptr to orig. header_cache_update */ - void (*org_hcu)(struct hh_cache *, - struct net_device *, - unsigned char *); - int pppbind; /* ippp device for bindings */ - int dialtimeout; /* How long shall we try on dialing? (jiffies) */ - int dialwait; /* How long shall we wait after failed attempt? (jiffies) */ - ulong dialstarted; /* jiffies of first dialing-attempt */ - ulong dialwait_timer; /* jiffies of earliest next dialing-attempt */ - int huptimeout; /* How long will the connection be up? (seconds) */ -#ifdef CONFIG_ISDN_X25 - struct concap_device_ops *dops; /* callbacks used by encapsulator */ -#endif - /* use an own struct for that in later versions */ - ulong cisco_myseq; /* Local keepalive seq. for Cisco */ - ulong cisco_mineseen; /* returned keepalive seq. from remote */ - ulong cisco_yourseq; /* Remote keepalive seq. for Cisco */ - int cisco_keepalive_period; /* keepalive period */ - ulong cisco_last_slarp_in; /* jiffie of last keepalive packet we received */ - char cisco_line_state; /* state of line according to keepalive packets */ - char cisco_debserint; /* debugging flag of cisco hdlc with slarp */ - struct timer_list cisco_timer; - struct work_struct tqueue; -} isdn_net_local; - -/* the interface itself */ -typedef struct isdn_net_dev_s { - isdn_net_local *local; - isdn_net_local *queue; /* circular list of all bundled - channels, which are currently - online */ - spinlock_t queue_lock; /* lock to protect queue */ - void *next; /* Pointer to next isdn-interface */ - struct net_device dev; /* interface to upper levels */ -#ifdef CONFIG_ISDN_PPP - ippp_bundle * pb; /* pointer to the common bundle structure - * with the per-bundle data */ -#endif -#ifdef CONFIG_ISDN_X25 - struct concap_proto *cprot; /* connection oriented encapsulation protocol */ -#endif - -} isdn_net_dev; - -/*===================== End of ip-over-ISDN stuff ===========================*/ - -/*======================= Start of ISDN-tty stuff ===========================*/ - -#define ISDN_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */ -#define ISDN_ASYNC_INITIALIZED 0x80000000 /* port was initialized */ -#define ISDN_ASYNC_CALLOUT_ACTIVE 0x40000000 /* Call out device active */ -#define ISDN_ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device active */ -#define ISDN_ASYNC_CLOSING 0x08000000 /* Serial port is closing */ -#define ISDN_ASYNC_CTS_FLOW 0x04000000 /* Do CTS flow control */ -#define ISDN_ASYNC_CHECK_CD 0x02000000 /* i.e., CLOCAL */ -#define ISDN_ASYNC_HUP_NOTIFY 0x0001 /* Notify tty on hangups/closes */ -#define ISDN_ASYNC_SESSION_LOCKOUT 0x0100 /* Lock cua opens on session */ -#define ISDN_ASYNC_PGRP_LOCKOUT 0x0200 /* Lock cua opens on pgrp */ -#define ISDN_ASYNC_CALLOUT_NOHUP 0x0400 /* No hangup for cui */ -#define ISDN_ASYNC_SPLIT_TERMIOS 0x0008 /* Sep. termios for dialin/out */ -#define ISDN_SERIAL_XMIT_SIZE 1024 /* Default bufsize for write */ -#define ISDN_SERIAL_XMIT_MAX 4000 /* Maximum bufsize for write */ -#define ISDN_SERIAL_TYPE_NORMAL 1 -#define ISDN_SERIAL_TYPE_CALLOUT 2 - -#ifdef CONFIG_ISDN_AUDIO -/* For using sk_buffs with audio we need some private variables - * within each sk_buff. For this purpose, we declare a struct here, - * and put it always at the private skb->cb data array. A few macros help - * accessing the variables. - */ -typedef struct _isdn_audio_data { - unsigned short dle_count; - unsigned char lock; -} isdn_audio_data_t; - -#define ISDN_AUDIO_SKB_DLECOUNT(skb) (((isdn_audio_data_t *)&skb->cb[0])->dle_count) -#define ISDN_AUDIO_SKB_LOCK(skb) (((isdn_audio_data_t *)&skb->cb[0])->lock) -#endif - -/* Private data of AT-command-interpreter */ -typedef struct atemu { - u_char profile[ISDN_MODEM_NUMREG]; /* Modem-Regs. Profile 0 */ - u_char mdmreg[ISDN_MODEM_NUMREG]; /* Modem-Registers */ - char pmsn[ISDN_MSNLEN]; /* EAZ/MSNs Profile 0 */ - char msn[ISDN_MSNLEN]; /* EAZ/MSN */ - char plmsn[ISDN_LMSNLEN]; /* Listening MSNs Profile 0 */ - char lmsn[ISDN_LMSNLEN]; /* Listening MSNs */ - char cpn[ISDN_MSNLEN]; /* CalledPartyNumber on incoming call */ - char connmsg[ISDN_CMSGLEN]; /* CONNECT-Msg from HL-Driver */ -#ifdef CONFIG_ISDN_AUDIO - u_char vpar[10]; /* Voice-parameters */ - int lastDLE; /* Flag for voice-coding: DLE seen */ -#endif - int mdmcmdl; /* Length of Modem-Commandbuffer */ - int pluscount; /* Counter for +++ sequence */ - u_long lastplus; /* Timestamp of last + */ - int carrierwait; /* Seconds of carrier waiting */ - char mdmcmd[255]; /* Modem-Commandbuffer */ - unsigned int charge; /* Charge units of current connection */ -} atemu; - -/* Private data (similar to async_struct in ) */ -typedef struct modem_info { - int magic; - struct module *owner; - int flags; /* defined in tty.h */ - int x_char; /* xon/xoff character */ - int mcr; /* Modem control register */ - int msr; /* Modem status register */ - int lsr; /* Line status register */ - int line; - int count; /* # of fd on device */ - int blocked_open; /* # of blocked opens */ - long session; /* Session of opening process */ - long pgrp; /* pgrp of opening process */ - int online; /* 1 = B-Channel is up, drop data */ - /* 2 = B-Channel is up, deliver d.*/ - int dialing; /* Dial in progress or ATA */ - int rcvsched; /* Receive needs schedule */ - int isdn_driver; /* Index to isdn-driver */ - int isdn_channel; /* Index to isdn-channel */ - int drv_index; /* Index to dev->usage */ - int ncarrier; /* Flag: schedule NO CARRIER */ - unsigned char last_cause[8]; /* Last cause message */ - unsigned char last_num[ISDN_MSNLEN]; - /* Last phone-number */ - unsigned char last_l2; /* Last layer-2 protocol */ - unsigned char last_si; /* Last service */ - unsigned char last_lhup; /* Last hangup local? */ - unsigned char last_dir; /* Last direction (in or out) */ - struct timer_list nc_timer; /* Timer for delayed NO CARRIER */ - int send_outstanding;/* # of outstanding send-requests */ - int xmit_size; /* max. # of chars in xmit_buf */ - int xmit_count; /* # of chars in xmit_buf */ - unsigned char *xmit_buf; /* transmit buffer */ - struct sk_buff_head xmit_queue; /* transmit queue */ - atomic_t xmit_lock; /* Semaphore for isdn_tty_write */ -#ifdef CONFIG_ISDN_AUDIO - int vonline; /* Voice-channel status */ - /* Bit 0 = recording */ - /* Bit 1 = playback */ - /* Bit 2 = playback, DLE-ETX seen */ - struct sk_buff_head dtmf_queue; /* queue for dtmf results */ - void *adpcms; /* state for adpcm decompression */ - void *adpcmr; /* state for adpcm compression */ - void *dtmf_state; /* state for dtmf decoder */ - void *silence_state; /* state for silence detection */ -#endif -#ifdef CONFIG_ISDN_TTY_FAX - struct T30_s *fax; /* T30 Fax Group 3 data/interface */ - int faxonline; /* Fax-channel status */ -#endif - struct tty_struct *tty; /* Pointer to corresponding tty */ - atemu emu; /* AT-emulator data */ - struct termios normal_termios; /* For saving termios structs */ - struct termios callout_termios; - wait_queue_head_t open_wait, close_wait; - struct semaphore write_sem; - spinlock_t readlock; -} modem_info; - -#define ISDN_MODEM_WINSIZE 8 - -/* Description of one ISDN-tty */ -typedef struct _isdn_modem { - int refcount; /* Number of opens */ - struct tty_driver *tty_modem; /* tty-device */ - struct tty_struct *modem_table[ISDN_MAX_CHANNELS]; /* ?? copied from Orig */ - struct termios *modem_termios[ISDN_MAX_CHANNELS]; - struct termios *modem_termios_locked[ISDN_MAX_CHANNELS]; - modem_info info[ISDN_MAX_CHANNELS]; /* Private data */ -} isdn_modem_t; - -/*======================= End of ISDN-tty stuff ============================*/ - -/*======================== Start of V.110 stuff ============================*/ -#define V110_BUFSIZE 1024 - -typedef struct { - int nbytes; /* 1 Matrixbyte -> nbytes in stream */ - int nbits; /* Number of used bits in streambyte */ - unsigned char key; /* Bitmask in stream eg. 11 (nbits=2) */ - int decodelen; /* Amount of data in decodebuf */ - int SyncInit; /* Number of sync frames to send */ - unsigned char *OnlineFrame; /* Precalculated V110 idle frame */ - unsigned char *OfflineFrame; /* Precalculated V110 sync Frame */ - int framelen; /* Length of frames */ - int skbuser; /* Number of unacked userdata skbs */ - int skbidle; /* Number of unacked idle/sync skbs */ - int introducer; /* Local vars for decoder */ - int dbit; - unsigned char b; - int skbres; /* space to reserve in outgoing skb */ - int maxsize; /* maxbufsize of lowlevel driver */ - unsigned char *encodebuf; /* temporary buffer for encoding */ - unsigned char decodebuf[V110_BUFSIZE]; /* incomplete V110 matrices */ -} isdn_v110_stream; - -/*========================= End of V.110 stuff =============================*/ - -/*======================= Start of general stuff ===========================*/ - -typedef struct { - char *next; - char *private; -} infostruct; - -#define DRV_FLAG_RUNNING 1 -#define DRV_FLAG_REJBUS 2 -#define DRV_FLAG_LOADED 4 - -/* Description of hardware-level-driver */ -typedef struct _isdn_driver { - ulong online; /* Channel-Online flags */ - ulong flags; /* Misc driver Flags */ - int locks; /* Number of locks for this driver */ - int channels; /* Number of channels */ - wait_queue_head_t st_waitq; /* Wait-Queue for status-read's */ - int maxbufsize; /* Maximum Buffersize supported */ - unsigned long pktcount; /* Until now: unused */ - int stavail; /* Chars avail on Status-device */ - isdn_if *interface; /* Interface to driver */ - int *rcverr; /* Error-counters for B-Ch.-receive */ - int *rcvcount; /* Byte-counters for B-Ch.-receive */ -#ifdef CONFIG_ISDN_AUDIO - unsigned long DLEflag; /* Flags: Insert DLE at next read */ -#endif - struct sk_buff_head *rpqueue; /* Pointers to start of Rcv-Queue */ - wait_queue_head_t *rcv_waitq; /* Wait-Queues for B-Channel-Reads */ - wait_queue_head_t *snd_waitq; /* Wait-Queue for B-Channel-Send's */ - char msn2eaz[10][ISDN_MSNLEN]; /* Mapping-Table MSN->EAZ */ -} isdn_driver_t; - -/* Main driver-data */ -typedef struct isdn_devt { - struct module *owner; - spinlock_t lock; - unsigned short flags; /* Bitmapped Flags: */ - int drivers; /* Current number of drivers */ - int channels; /* Current number of channels */ - int net_verbose; /* Verbose-Flag */ - int modempoll; /* Flag: tty-read active */ - spinlock_t timerlock; - int tflags; /* Timer-Flags: */ - /* see ISDN_TIMER_..defines */ - int global_flags; - infostruct *infochain; /* List of open info-devs. */ - wait_queue_head_t info_waitq; /* Wait-Queue for isdninfo */ - struct timer_list timer; /* Misc.-function Timer */ - int chanmap[ISDN_MAX_CHANNELS]; /* Map minor->device-channel */ - int drvmap[ISDN_MAX_CHANNELS]; /* Map minor->driver-index */ - int usage[ISDN_MAX_CHANNELS]; /* Used by tty/ip/voice */ - char num[ISDN_MAX_CHANNELS][ISDN_MSNLEN]; - /* Remote number of active ch.*/ - int m_idx[ISDN_MAX_CHANNELS]; /* Index for mdm.... */ - isdn_driver_t *drv[ISDN_MAX_DRIVERS]; /* Array of drivers */ - isdn_net_dev *netdev; /* Linked list of net-if's */ - char drvid[ISDN_MAX_DRIVERS][20];/* Driver-ID */ - struct task_struct *profd; /* For iprofd */ - isdn_modem_t mdm; /* tty-driver-data */ - isdn_net_dev *rx_netdev[ISDN_MAX_CHANNELS]; /* rx netdev-pointers */ - isdn_net_dev *st_netdev[ISDN_MAX_CHANNELS]; /* stat netdev-pointers */ - ulong ibytes[ISDN_MAX_CHANNELS]; /* Statistics incoming bytes */ - ulong obytes[ISDN_MAX_CHANNELS]; /* Statistics outgoing bytes */ - int v110emu[ISDN_MAX_CHANNELS]; /* V.110 emulator-mode 0=none */ - atomic_t v110use[ISDN_MAX_CHANNELS]; /* Usage-Semaphore for stream */ - isdn_v110_stream *v110[ISDN_MAX_CHANNELS]; /* V.110 private data */ - struct semaphore sem; /* serialize list access*/ - unsigned long global_features; -} isdn_dev; - -extern isdn_dev *dev; - - -#endif /* __KERNEL__ */ #endif /* __ISDN_H__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/isdn_ppp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/isdn_ppp.h 2007-05-24 15:40:43.000000000 +0200 @@ -64,185 +64,4 @@ int flags; }; -#ifdef __KERNEL__ - - - -#ifdef CONFIG_IPPP_FILTER -#include -#endif - -#define DECOMP_ERR_NOMEM (-10) - -#define MP_END_FRAG 0x40 -#define MP_BEGIN_FRAG 0x80 - -#define MP_MAX_QUEUE_LEN 16 - -/* - * We need a way for the decompressor to influence the generation of CCP - * Reset-Requests in a variety of ways. The decompressor is already returning - * a lot of information (generated skb length, error conditions) so we use - * another parameter. This parameter is a pointer to a structure which is - * to be marked valid by the decompressor and only in this case is ever used. - * Furthermore, the only case where this data is used is when the decom- - * pressor returns DECOMP_ERROR. - * - * We use this same struct for the reset entry of the compressor to commu- - * nicate to its caller how to deal with sending of a Reset Ack. In this - * case, expra is not used, but other options still apply (suppressing - * sending with rsend, appending arbitrary data, etc). - */ - -#define IPPP_RESET_MAXDATABYTES 32 - -struct isdn_ppp_resetparams { - unsigned char valid:1; /* rw Is this structure filled at all ? */ - unsigned char rsend:1; /* rw Should we send one at all ? */ - unsigned char idval:1; /* rw Is the id field valid ? */ - unsigned char dtval:1; /* rw Is the data field valid ? */ - unsigned char expra:1; /* rw Is an Ack expected for this Req ? */ - unsigned char id; /* wo Send CCP ResetReq with this id */ - unsigned short maxdlen; /* ro Max bytes to be stored in data field */ - unsigned short dlen; /* rw Bytes stored in data field */ - unsigned char *data; /* wo Data for ResetReq info field */ -}; - -/* - * this is an 'old friend' from ppp-comp.h under a new name - * check the original include for more information - */ -struct isdn_ppp_compressor { - struct isdn_ppp_compressor *next, *prev; - struct module *owner; - int num; /* CCP compression protocol number */ - - void *(*alloc) (struct isdn_ppp_comp_data *); - void (*free) (void *state); - int (*init) (void *state, struct isdn_ppp_comp_data *, - int unit,int debug); - - /* The reset entry needs to get more exact information about the - ResetReq or ResetAck it was called with. The parameters are - obvious. If reset is called without a Req or Ack frame which - could be handed into it, code MUST be set to 0. Using rsparm, - the reset entry can control if and how a ResetAck is returned. */ - - void (*reset) (void *state, unsigned char code, unsigned char id, - unsigned char *data, unsigned len, - struct isdn_ppp_resetparams *rsparm); - - int (*compress) (void *state, struct sk_buff *in, - struct sk_buff *skb_out, int proto); - - int (*decompress) (void *state,struct sk_buff *in, - struct sk_buff *skb_out, - struct isdn_ppp_resetparams *rsparm); - - void (*incomp) (void *state, struct sk_buff *in,int proto); - void (*stat) (void *state, struct compstat *stats); -}; - -extern int isdn_ppp_register_compressor(struct isdn_ppp_compressor *); -extern int isdn_ppp_unregister_compressor(struct isdn_ppp_compressor *); -extern int isdn_ppp_dial_slave(char *); -extern int isdn_ppp_hangup_slave(char *); - -typedef struct { - unsigned long seqerrs; - unsigned long frame_drops; - unsigned long overflows; - unsigned long max_queue_len; -} isdn_mppp_stats; - -typedef struct { - int mp_mrru; /* unused */ - struct sk_buff * frags; /* fragments sl list -- use skb->next */ - long frames; /* number of frames in the frame list */ - unsigned int seq; /* last processed packet seq #: any packets - * with smaller seq # will be dropped - * unconditionally */ - spinlock_t lock; - int ref_ct; - /* statistics */ - isdn_mppp_stats stats; -} ippp_bundle; - -#define NUM_RCV_BUFFS 64 - -struct ippp_buf_queue { - struct ippp_buf_queue *next; - struct ippp_buf_queue *last; - char *buf; /* NULL here indicates end of queue */ - int len; -}; - -/* The data structure for one CCP reset transaction */ -enum ippp_ccp_reset_states { - CCPResetIdle, - CCPResetSentReq, - CCPResetRcvdReq, - CCPResetSentAck, - CCPResetRcvdAck -}; - -struct ippp_ccp_reset_state { - enum ippp_ccp_reset_states state; /* State of this transaction */ - struct ippp_struct *is; /* Backlink to device stuff */ - unsigned char id; /* Backlink id index */ - unsigned char ta:1; /* The timer is active (flag) */ - unsigned char expra:1; /* We expect a ResetAck at all */ - int dlen; /* Databytes stored in data */ - struct timer_list timer; /* For timeouts/retries */ - /* This is a hack but seems sufficient for the moment. We do not want - to have this be yet another allocation for some bytes, it is more - memory management overhead than the whole mess is worth. */ - unsigned char data[IPPP_RESET_MAXDATABYTES]; -}; - -/* The data structure keeping track of the currently outstanding CCP Reset - transactions. */ -struct ippp_ccp_reset { - struct ippp_ccp_reset_state *rs[256]; /* One per possible id */ - unsigned char lastid; /* Last id allocated by the engine */ -}; - -struct ippp_struct { - struct ippp_struct *next_link; - int state; - spinlock_t buflock; - struct ippp_buf_queue rq[NUM_RCV_BUFFS]; /* packet queue for isdn_ppp_read() */ - struct ippp_buf_queue *first; /* pointer to (current) first packet */ - struct ippp_buf_queue *last; /* pointer to (current) last used packet in queue */ - wait_queue_head_t wq; - struct task_struct *tk; - unsigned int mpppcfg; - unsigned int pppcfg; - unsigned int mru; - unsigned int mpmru; - unsigned int mpmtu; - unsigned int maxcid; - struct isdn_net_local_s *lp; - int unit; - int minor; - unsigned int last_link_seqno; - long mp_seqno; -#ifdef CONFIG_ISDN_PPP_VJ - unsigned char *cbuf; - struct slcompress *slcomp; -#endif -#ifdef CONFIG_IPPP_FILTER - struct sock_filter *pass_filter; /* filter for packets to pass */ - struct sock_filter *active_filter; /* filter for pkts to reset idle */ - unsigned pass_len, active_len; -#endif - unsigned long debug; - struct isdn_ppp_compressor *compressor,*decompressor; - struct isdn_ppp_compressor *link_compressor,*link_decompressor; - void *decomp_stat,*comp_stat,*link_decomp_stat,*link_comp_stat; - struct ippp_ccp_reset *reset; /* Allocated on demand, may never be needed */ - unsigned long compflags; -}; - -#endif /* __KERNEL__ */ #endif /* _LINUX_ISDN_PPP_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/isdnif.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/isdnif.h 2007-05-24 15:40:43.000000000 +0200 @@ -52,495 +52,5 @@ #define ISDN_PROTO_L3_FCLASS1 3 /* Fax Group 2/3 CLASS 1 */ #define ISDN_PROTO_L3_MAX 7 /* Max. 8 Protocols */ -#ifdef __KERNEL__ - -#include - -/***************************************************************************/ -/* Extensions made by Werner Cornelius (werner@ikt.de) */ -/* */ -/* The proceed command holds a incoming call in a state to leave processes */ -/* enough time to check whether ist should be accepted. */ -/* The PROT_IO Command extends the interface to make protocol dependent */ -/* features available (call diversion, call waiting...). */ -/* */ -/* The PROT_IO Command is executed with the desired driver id and the arg */ -/* parameter coded as follows: */ -/* The lower 8 bits of arg contain the desired protocol from ISDN_PTYPE */ -/* definitions. The upper 24 bits represent the protocol specific cmd/stat.*/ -/* Any additional data is protocol and command specific. */ -/* This mechanism also applies to the statcallb callback STAT_PROT. */ -/* */ -/* This suggested extension permits an easy expansion of protocol specific */ -/* handling. Extensions may be added at any time without changing the HL */ -/* driver code and not getting conflicts without certifications. */ -/* The well known CAPI 2.0 interface handles such extensions in a similar */ -/* way. Perhaps a protocol specific module may be added and separately */ -/* loaded and linked to the basic isdn module for handling. */ -/***************************************************************************/ - -/*****************/ -/* DSS1 commands */ -/*****************/ -#define DSS1_CMD_INVOKE ((0x00 << 8) | ISDN_PTYPE_EURO) /* invoke a supplementary service */ -#define DSS1_CMD_INVOKE_ABORT ((0x01 << 8) | ISDN_PTYPE_EURO) /* abort a invoke cmd */ - -/*******************************/ -/* DSS1 Status callback values */ -/*******************************/ -#define DSS1_STAT_INVOKE_RES ((0x80 << 8) | ISDN_PTYPE_EURO) /* Result for invocation */ -#define DSS1_STAT_INVOKE_ERR ((0x81 << 8) | ISDN_PTYPE_EURO) /* Error Return for invocation */ -#define DSS1_STAT_INVOKE_BRD ((0x82 << 8) | ISDN_PTYPE_EURO) /* Deliver invoke broadcast info */ - - -/*********************************************************************/ -/* structures for DSS1 commands and callback */ -/* */ -/* An action is invoked by sending a DSS1_CMD_INVOKE. The ll_id, proc*/ -/* timeout, datalen and data fields must be set before calling. */ -/* */ -/* The return value is a positive hl_id value also delivered in the */ -/* hl_id field. A value of zero signals no more left hl_id capacitys.*/ -/* A negative return value signals errors in LL. So if the return */ -/* value is <= 0 no action in LL will be taken -> request ignored */ -/* */ -/* The timeout field must be filled with a positive value specifying */ -/* the amount of time the INVOKED process waits for a reaction from */ -/* the network. */ -/* If a response (either error or result) is received during this */ -/* intervall, a reporting callback is initiated and the process will */ -/* be deleted, the hl identifier will be freed. */ -/* If no response is received during the specified intervall, a error*/ -/* callback is initiated with timeout set to -1 and a datalen set */ -/* to 0. */ -/* If timeout is set to a value <= 0 during INVOCATION the process is*/ -/* immediately deleted after sending the data. No callback occurs ! */ -/* */ -/* A currently waiting process may be aborted with INVOKE_ABORT. No */ -/* callback will occur when a process has been aborted. */ -/* */ -/* Broadcast invoke frames from the network are reported via the */ -/* STAT_INVOKE_BRD callback. The ll_id is set to 0, the other fields */ -/* are supplied by the network and not by the HL. */ -/*********************************************************************/ - -/*****************/ -/* NI1 commands */ -/*****************/ -#define NI1_CMD_INVOKE ((0x00 << 8) | ISDN_PTYPE_NI1) /* invoke a supplementary service */ -#define NI1_CMD_INVOKE_ABORT ((0x01 << 8) | ISDN_PTYPE_NI1) /* abort a invoke cmd */ - -/*******************************/ -/* NI1 Status callback values */ -/*******************************/ -#define NI1_STAT_INVOKE_RES ((0x80 << 8) | ISDN_PTYPE_NI1) /* Result for invocation */ -#define NI1_STAT_INVOKE_ERR ((0x81 << 8) | ISDN_PTYPE_NI1) /* Error Return for invocation */ -#define NI1_STAT_INVOKE_BRD ((0x82 << 8) | ISDN_PTYPE_NI1) /* Deliver invoke broadcast info */ - -typedef struct - { ulong ll_id; /* ID supplied by LL when executing */ - /* a command and returned by HL for */ - /* INVOKE_RES and INVOKE_ERR */ - int hl_id; /* ID supplied by HL when called */ - /* for executing a cmd and delivered */ - /* for results and errors */ - /* must be supplied by LL when aborting*/ - int proc; /* invoke procedure used by CMD_INVOKE */ - /* returned by callback and broadcast */ - int timeout; /* timeout for INVOKE CMD in ms */ - /* -1 in stat callback when timed out */ - /* error value when error callback */ - int datalen; /* length of cmd or stat data */ - u_char *data;/* pointer to data delivered or send */ - } isdn_cmd_stat; - -/* - * Commands from linklevel to lowlevel - * - */ -#define ISDN_CMD_IOCTL 0 /* Perform ioctl */ -#define ISDN_CMD_DIAL 1 /* Dial out */ -#define ISDN_CMD_ACCEPTD 2 /* Accept an incoming call on D-Chan. */ -#define ISDN_CMD_ACCEPTB 3 /* Request B-Channel connect. */ -#define ISDN_CMD_HANGUP 4 /* Hangup */ -#define ISDN_CMD_CLREAZ 5 /* Clear EAZ(s) of channel */ -#define ISDN_CMD_SETEAZ 6 /* Set EAZ(s) of channel */ -#define ISDN_CMD_GETEAZ 7 /* Get EAZ(s) of channel */ -#define ISDN_CMD_SETSIL 8 /* Set Service-Indicator-List of channel */ -#define ISDN_CMD_GETSIL 9 /* Get Service-Indicator-List of channel */ -#define ISDN_CMD_SETL2 10 /* Set B-Chan. Layer2-Parameter */ -#define ISDN_CMD_GETL2 11 /* Get B-Chan. Layer2-Parameter */ -#define ISDN_CMD_SETL3 12 /* Set B-Chan. Layer3-Parameter */ -#define ISDN_CMD_GETL3 13 /* Get B-Chan. Layer3-Parameter */ -// #define ISDN_CMD_LOCK 14 /* Signal usage by upper levels */ -// #define ISDN_CMD_UNLOCK 15 /* Release usage-lock */ -#define ISDN_CMD_SUSPEND 16 /* Suspend connection */ -#define ISDN_CMD_RESUME 17 /* Resume connection */ -#define ISDN_CMD_PROCEED 18 /* Proceed with call establishment */ -#define ISDN_CMD_ALERT 19 /* Alert after Proceeding */ -#define ISDN_CMD_REDIR 20 /* Redir a incoming call */ -#define ISDN_CMD_PROT_IO 21 /* Protocol specific commands */ -#define CAPI_PUT_MESSAGE 22 /* CAPI message send down or up */ -#define ISDN_CMD_FAXCMD 23 /* FAX commands to HL-driver */ -#define ISDN_CMD_AUDIO 24 /* DSP, DTMF, ... settings */ - -/* - * Status-Values delivered from lowlevel to linklevel via - * statcallb(). - * - */ -#define ISDN_STAT_STAVAIL 256 /* Raw status-data available */ -#define ISDN_STAT_ICALL 257 /* Incoming call detected */ -#define ISDN_STAT_RUN 258 /* Signal protocol-code is running */ -#define ISDN_STAT_STOP 259 /* Signal halt of protocol-code */ -#define ISDN_STAT_DCONN 260 /* Signal D-Channel connect */ -#define ISDN_STAT_BCONN 261 /* Signal B-Channel connect */ -#define ISDN_STAT_DHUP 262 /* Signal D-Channel disconnect */ -#define ISDN_STAT_BHUP 263 /* Signal B-Channel disconnect */ -#define ISDN_STAT_CINF 264 /* Charge-Info */ -#define ISDN_STAT_LOAD 265 /* Signal new lowlevel-driver is loaded */ -#define ISDN_STAT_UNLOAD 266 /* Signal unload of lowlevel-driver */ -#define ISDN_STAT_BSENT 267 /* Signal packet sent */ -#define ISDN_STAT_NODCH 268 /* Signal no D-Channel */ -#define ISDN_STAT_ADDCH 269 /* Add more Channels */ -#define ISDN_STAT_CAUSE 270 /* Cause-Message */ -#define ISDN_STAT_ICALLW 271 /* Incoming call without B-chan waiting */ -#define ISDN_STAT_REDIR 272 /* Redir result */ -#define ISDN_STAT_PROT 273 /* protocol IO specific callback */ -#define ISDN_STAT_DISPLAY 274 /* deliver a received display message */ -#define ISDN_STAT_L1ERR 275 /* Signal Layer-1 Error */ -#define ISDN_STAT_FAXIND 276 /* FAX indications from HL-driver */ -#define ISDN_STAT_AUDIO 277 /* DTMF, DSP indications */ -#define ISDN_STAT_DISCH 278 /* Disable/Enable channel usage */ - -/* - * Audio commands - */ -#define ISDN_AUDIO_SETDD 0 /* Set DTMF detection */ -#define ISDN_AUDIO_DTMF 1 /* Rx/Tx DTMF */ - -/* - * Values for errcode field - */ -#define ISDN_STAT_L1ERR_SEND 1 -#define ISDN_STAT_L1ERR_RECV 2 - -/* - * Values for feature-field of interface-struct. - */ -/* Layer 2 */ -#define ISDN_FEATURE_L2_X75I (0x0001 << ISDN_PROTO_L2_X75I) -#define ISDN_FEATURE_L2_X75UI (0x0001 << ISDN_PROTO_L2_X75UI) -#define ISDN_FEATURE_L2_X75BUI (0x0001 << ISDN_PROTO_L2_X75BUI) -#define ISDN_FEATURE_L2_HDLC (0x0001 << ISDN_PROTO_L2_HDLC) -#define ISDN_FEATURE_L2_TRANS (0x0001 << ISDN_PROTO_L2_TRANS) -#define ISDN_FEATURE_L2_X25DTE (0x0001 << ISDN_PROTO_L2_X25DTE) -#define ISDN_FEATURE_L2_X25DCE (0x0001 << ISDN_PROTO_L2_X25DCE) -#define ISDN_FEATURE_L2_V11096 (0x0001 << ISDN_PROTO_L2_V11096) -#define ISDN_FEATURE_L2_V11019 (0x0001 << ISDN_PROTO_L2_V11019) -#define ISDN_FEATURE_L2_V11038 (0x0001 << ISDN_PROTO_L2_V11038) -#define ISDN_FEATURE_L2_MODEM (0x0001 << ISDN_PROTO_L2_MODEM) -#define ISDN_FEATURE_L2_FAX (0x0001 << ISDN_PROTO_L2_FAX) -#define ISDN_FEATURE_L2_HDLC_56K (0x0001 << ISDN_PROTO_L2_HDLC_56K) - -#define ISDN_FEATURE_L2_MASK (0x0FFFF) /* Max. 16 protocols */ -#define ISDN_FEATURE_L2_SHIFT (0) - -/* Layer 3 */ -#define ISDN_FEATURE_L3_TRANS (0x10000 << ISDN_PROTO_L3_TRANS) -#define ISDN_FEATURE_L3_TRANSDSP (0x10000 << ISDN_PROTO_L3_TRANSDSP) -#define ISDN_FEATURE_L3_FCLASS2 (0x10000 << ISDN_PROTO_L3_FCLASS2) -#define ISDN_FEATURE_L3_FCLASS1 (0x10000 << ISDN_PROTO_L3_FCLASS1) - -#define ISDN_FEATURE_L3_MASK (0x0FF0000) /* Max. 8 Protocols */ -#define ISDN_FEATURE_L3_SHIFT (16) - -/* Signaling */ -#define ISDN_FEATURE_P_UNKNOWN (0x1000000 << ISDN_PTYPE_UNKNOWN) -#define ISDN_FEATURE_P_1TR6 (0x1000000 << ISDN_PTYPE_1TR6) -#define ISDN_FEATURE_P_EURO (0x1000000 << ISDN_PTYPE_EURO) -#define ISDN_FEATURE_P_NI1 (0x1000000 << ISDN_PTYPE_NI1) - -#define ISDN_FEATURE_P_MASK (0x0FF000000) /* Max. 8 Protocols */ -#define ISDN_FEATURE_P_SHIFT (24) - -typedef struct setup_parm { - unsigned char phone[32]; /* Remote Phone-Number */ - unsigned char eazmsn[32]; /* Local EAZ or MSN */ - unsigned char si1; /* Service Indicator 1 */ - unsigned char si2; /* Service Indicator 2 */ - unsigned char plan; /* Numbering plan */ - unsigned char screen; /* Screening info */ -} setup_parm; - - -#ifdef CONFIG_ISDN_TTY_FAX -/* T.30 Fax G3 */ - -#define FAXIDLEN 21 - -typedef struct T30_s { - /* session parameters */ - __u8 resolution; - __u8 rate; - __u8 width; - __u8 length; - __u8 compression; - __u8 ecm; - __u8 binary; - __u8 scantime; - __u8 id[FAXIDLEN]; - /* additional parameters */ - __u8 phase; - __u8 direction; - __u8 code; - __u8 badlin; - __u8 badmul; - __u8 bor; - __u8 fet; - __u8 pollid[FAXIDLEN]; - __u8 cq; - __u8 cr; - __u8 ctcrty; - __u8 minsp; - __u8 phcto; - __u8 rel; - __u8 nbc; - /* remote station parameters */ - __u8 r_resolution; - __u8 r_rate; - __u8 r_width; - __u8 r_length; - __u8 r_compression; - __u8 r_ecm; - __u8 r_binary; - __u8 r_scantime; - __u8 r_id[FAXIDLEN]; - __u8 r_code; -} __attribute__((packed)) T30_s; - -#define ISDN_TTY_FAX_CONN_IN 0 -#define ISDN_TTY_FAX_CONN_OUT 1 - -#define ISDN_TTY_FAX_FCON 0 -#define ISDN_TTY_FAX_DIS 1 -#define ISDN_TTY_FAX_FTT 2 -#define ISDN_TTY_FAX_MCF 3 -#define ISDN_TTY_FAX_DCS 4 -#define ISDN_TTY_FAX_TRAIN_OK 5 -#define ISDN_TTY_FAX_EOP 6 -#define ISDN_TTY_FAX_EOM 7 -#define ISDN_TTY_FAX_MPS 8 -#define ISDN_TTY_FAX_DTC 9 -#define ISDN_TTY_FAX_RID 10 -#define ISDN_TTY_FAX_HNG 11 -#define ISDN_TTY_FAX_DT 12 -#define ISDN_TTY_FAX_FCON_I 13 -#define ISDN_TTY_FAX_DR 14 -#define ISDN_TTY_FAX_ET 15 -#define ISDN_TTY_FAX_CFR 16 -#define ISDN_TTY_FAX_PTS 17 -#define ISDN_TTY_FAX_SENT 18 - -#define ISDN_FAX_PHASE_IDLE 0 -#define ISDN_FAX_PHASE_A 1 -#define ISDN_FAX_PHASE_B 2 -#define ISDN_FAX_PHASE_C 3 -#define ISDN_FAX_PHASE_D 4 -#define ISDN_FAX_PHASE_E 5 - -#endif /* TTY_FAX */ - -#define ISDN_FAX_CLASS1_FAE 0 -#define ISDN_FAX_CLASS1_FTS 1 -#define ISDN_FAX_CLASS1_FRS 2 -#define ISDN_FAX_CLASS1_FTM 3 -#define ISDN_FAX_CLASS1_FRM 4 -#define ISDN_FAX_CLASS1_FTH 5 -#define ISDN_FAX_CLASS1_FRH 6 -#define ISDN_FAX_CLASS1_CTRL 7 - -#define ISDN_FAX_CLASS1_OK 0 -#define ISDN_FAX_CLASS1_CONNECT 1 -#define ISDN_FAX_CLASS1_NOCARR 2 -#define ISDN_FAX_CLASS1_ERROR 3 -#define ISDN_FAX_CLASS1_FCERROR 4 -#define ISDN_FAX_CLASS1_QUERY 5 - -typedef struct { - __u8 cmd; - __u8 subcmd; - __u8 para[50]; -} aux_s; - -#define AT_COMMAND 0 -#define AT_EQ_VALUE 1 -#define AT_QUERY 2 -#define AT_EQ_QUERY 3 - -/* CAPI structs */ - -/* this is compatible to the old union size */ -#define MAX_CAPI_PARA_LEN 50 - -typedef struct { - /* Header */ - __u16 Length; - __u16 ApplId; - __u8 Command; - __u8 Subcommand; - __u16 Messagenumber; - - /* Parameter */ - union { - __u32 Controller; - __u32 PLCI; - __u32 NCCI; - } adr; - __u8 para[MAX_CAPI_PARA_LEN]; -} capi_msg; - -/* - * Structure for exchanging above infos - * - */ -typedef struct { - int driver; /* Lowlevel-Driver-ID */ - int command; /* Command or Status (see above) */ - ulong arg; /* Additional Data */ - union { - ulong errcode; /* Type of error with STAT_L1ERR */ - int length; /* Amount of bytes sent with STAT_BSENT */ - u_char num[50]; /* Additional Data */ - setup_parm setup;/* For SETUP msg */ - capi_msg cmsg; /* For CAPI like messages */ - char display[85];/* display message data */ - isdn_cmd_stat isdn_io; /* ISDN IO-parameter/result */ - aux_s aux; /* for modem commands/indications */ -#ifdef CONFIG_ISDN_TTY_FAX - T30_s *fax; /* Pointer to ttys fax struct */ -#endif - ulong userdata; /* User Data */ - } parm; -} isdn_ctrl; - -#define dss1_io isdn_io -#define ni1_io isdn_io - -/* - * The interface-struct itself (initialized at load-time of lowlevel-driver) - * - * See Documentation/isdn/INTERFACE for a description, how the communication - * between the ISDN subsystem and its drivers is done. - * - */ -typedef struct { - struct module *owner; - - /* Number of channels supported by this driver - */ - int channels; - - /* - * Maximum Size of transmit/receive-buffer this driver supports. - */ - int maxbufsize; - - /* Feature-Flags for this driver. - * See defines ISDN_FEATURE_... for Values - */ - unsigned long features; - - /* - * Needed for calculating - * dev->hard_header_len = linklayer header + hl_hdrlen; - * Drivers, not supporting sk_buff's should set this to 0. - */ - unsigned short hl_hdrlen; - - /* - * Receive-Callback using sk_buff's - * Parameters: - * int Driver-ID - * int local channel-number (0 ...) - * struct sk_buff *skb received Data - */ - void (*rcvcallb_skb)(int, int, struct sk_buff *); - - /* Status-Callback - * Parameters: - * isdn_ctrl* - * driver = Driver ID. - * command = One of above ISDN_STAT_... constants. - * arg = depending on status-type. - * num = depending on status-type. - */ - int (*statcallb)(isdn_ctrl*); - - /* Send command - * Parameters: - * isdn_ctrl* - * driver = Driver ID. - * command = One of above ISDN_CMD_... constants. - * arg = depending on command. - * num = depending on command. - */ - int (*command)(isdn_ctrl*); - - /* - * Send data using sk_buff's - * Parameters: - * int driverId - * int local channel-number (0...) - * int Flag: Need ACK for this packet. - * struct sk_buff *skb Data to send - */ - int (*writebuf_skb) (int, int, int, struct sk_buff *); - - /* Send raw D-Channel-Commands - * Parameters: - * u_char pointer data - * int length of data - * int driverId - * int local channel-number (0 ...) - */ - int (*writecmd)(const u_char __user *, int, int, int); - - /* Read raw Status replies - * u_char pointer data (volatile) - * int length of buffer - * int driverId - * int local channel-number (0 ...) - */ - int (*readstat)(u_char __user *, int, int, int); - - char id[20]; -} isdn_if; - -/* - * Function which must be called by lowlevel-driver at loadtime with - * the following fields of above struct set: - * - * channels Number of channels that will be supported. - * hl_hdrlen Space to preserve in sk_buff's when sending. Drivers, not - * supporting sk_buff's should set this to 0. - * command Address of Command-Handler. - * features Bitwise coded Features of this driver. (use ISDN_FEATURE_...) - * writebuf_skb Address of Skbuff-Send-Handler. - * writecmd " " D-Channel " which accepts raw D-Ch-Commands. - * readstat " " D-Channel " which delivers raw Status-Data. - * - * The linklevel-driver fills the following fields: - * - * channels Driver-ID assigned to this driver. (Must be used on all - * subsequent callbacks. - * rcvcallb_skb Address of handler for received Skbuff's. - * statcallb " " " for status-changes. - * - */ -extern int register_isdn(isdn_if*); -#include - -#endif /* __KERNEL__ */ #endif /* __ISDNIF_H__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/isicom.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/isicom.h 2007-05-24 15:40:43.000000000 +0200 @@ -4,89 +4,5 @@ /*#define ISICOM_DEBUG*/ /*#define ISICOM_DEBUG_DTR_RTS*/ -#ifdef __KERNEL__ - -#define YES 1 -#define NO 0 - -/* - * ISICOM Driver definitions ... - * - */ - -#define ISICOM_NAME "ISICom" - -/* - * PCI definitions - */ - -#define DEVID_COUNT 9 -#define VENDOR_ID 0x10b5 - -/* - * These are now officially allocated numbers - */ - -#define ISICOM_NMAJOR 112 /* normal */ -#define ISICOM_CMAJOR 113 /* callout */ -#define ISICOM_MAGIC (('M' << 8) | 'T') - -#define WAKEUP_CHARS 256 /* hard coded for now */ -#define TX_SIZE 254 - -#define BOARD_COUNT 4 -#define PORT_COUNT (BOARD_COUNT*16) - -#define SERIAL_TYPE_NORMAL 1 - -/* character sizes */ - -#define ISICOM_CS5 0x0000 -#define ISICOM_CS6 0x0001 -#define ISICOM_CS7 0x0002 -#define ISICOM_CS8 0x0003 - -/* stop bits */ - -#define ISICOM_1SB 0x0000 -#define ISICOM_2SB 0x0004 - -/* parity */ - -#define ISICOM_NOPAR 0x0000 -#define ISICOM_ODPAR 0x0008 -#define ISICOM_EVPAR 0x0018 - -/* flow control */ - -#define ISICOM_CTSRTS 0x03 -#define ISICOM_INITIATE_XONXOFF 0x04 -#define ISICOM_RESPOND_XONXOFF 0x08 - -#define BOARD(line) (((line) >> 4) & 0x3) - - /* isi kill queue bitmap */ - -#define ISICOM_KILLTX 0x01 -#define ISICOM_KILLRX 0x02 - - /* isi_board status bitmap */ - -#define FIRMWARE_LOADED 0x0001 -#define BOARD_ACTIVE 0x0002 - - /* isi_port status bitmap */ - -#define ISI_CTS 0x1000 -#define ISI_DSR 0x2000 -#define ISI_RI 0x4000 -#define ISI_DCD 0x8000 -#define ISI_DTR 0x0100 -#define ISI_RTS 0x0200 - - -#define ISI_TXOK 0x0001 - -#endif /* __KERNEL__ */ #endif /* ISICOM_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/jbd.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/jbd.h 2007-05-24 15:40:43.000000000 +0200 @@ -17,22 +17,9 @@ #define _LINUX_JBD_H /* Allow this file to be included directly into e2fsprogs */ -#ifndef __KERNEL__ #include "jfs_compat.h" #define JFS_DEBUG #define jfs_debug jbd_debug -#else - -#include -#include -#include -#include -#include -#include -#include - -#include -#endif #define journal_oom_retry 1 @@ -82,41 +69,6 @@ #define JFS_MIN_JOURNAL_BLOCKS 1024 -#ifdef __KERNEL__ - -/** - * typedef handle_t - The handle_t type represents a single atomic update being performed by some process. - * - * All filesystem modifications made by the process go - * through this handle. Recursive operations (such as quota operations) - * are gathered into a single update. - * - * The buffer credits field is used to account for journaled buffers - * being modified by the running process. To ensure that there is - * enough log space for all outstanding operations, we need to limit the - * number of outstanding buffers possible at any time. When the - * operation completes, any buffer credits not used are credited back to - * the transaction, so that at all times we know how many buffers the - * outstanding updates on a transaction might possibly touch. - * - * This is an opaque datatype. - **/ -typedef struct handle_s handle_t; /* Atomic operation type */ - - -/** - * typedef journal_t - The journal_t maintains all of the journaling state information for a single filesystem. - * - * journal_t is linked to from the fs superblock structure. - * - * We use the journal_t to keep track of all outstanding transaction - * activity on the filesystem, and to manage the state of the log - * writing process. - * - * This is an opaque datatype. - **/ -typedef struct journal_s journal_t; /* Journal control structure */ -#endif /* * Internal structures used by the logging mechanism: @@ -241,811 +193,17 @@ #define JFS_KNOWN_ROCOMPAT_FEATURES 0 #define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE -#ifdef __KERNEL__ - -#include -#include - -#define JBD_ASSERTIONS -#ifdef JBD_ASSERTIONS -#define J_ASSERT(assert) \ -do { \ - if (!(assert)) { \ - printk (KERN_EMERG \ - "Assertion failure in %s() at %s:%d: \"%s\"\n", \ - __FUNCTION__, __FILE__, __LINE__, # assert); \ - BUG(); \ - } \ -} while (0) - -#if defined(CONFIG_BUFFER_DEBUG) -void buffer_assertion_failure(struct buffer_head *bh); -#define J_ASSERT_BH(bh, expr) \ - do { \ - if (!(expr)) \ - buffer_assertion_failure(bh); \ - J_ASSERT(expr); \ - } while (0) -#define J_ASSERT_JH(jh, expr) J_ASSERT_BH(jh2bh(jh), expr) -#else -#define J_ASSERT_BH(bh, expr) J_ASSERT(expr) -#define J_ASSERT_JH(jh, expr) J_ASSERT(expr) -#endif - -#else -#define J_ASSERT(assert) do { } while (0) -#endif /* JBD_ASSERTIONS */ - -#if defined(JBD_PARANOID_IOFAIL) -#define J_EXPECT(expr, why...) J_ASSERT(expr) -#define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr) -#define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr) -#else -#define __journal_expect(expr, why...) \ - ({ \ - int val = (expr); \ - if (!val) { \ - printk(KERN_ERR \ - "EXT3-fs unexpected failure: %s;\n",# expr); \ - printk(KERN_ERR why "\n"); \ - } \ - val; \ - }) -#define J_EXPECT(expr, why...) __journal_expect(expr, ## why) -#define J_EXPECT_BH(bh, expr, why...) __journal_expect(expr, ## why) -#define J_EXPECT_JH(jh, expr, why...) __journal_expect(expr, ## why) -#endif - -enum jbd_state_bits { - BH_JBD /* Has an attached ext3 journal_head */ - = BH_PrivateStart, - BH_JWrite, /* Being written to log (@@@ DEBUGGING) */ - BH_Freed, /* Has been freed (truncated) */ - BH_Revoked, /* Has been revoked from the log */ - BH_RevokeValid, /* Revoked flag is valid */ - BH_JBDDirty, /* Is dirty but journaled */ - BH_State, /* Pins most journal_head state */ - BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ - BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ -}; - -BUFFER_FNS(JBD, jbd) -BUFFER_FNS(JWrite, jwrite) -BUFFER_FNS(JBDDirty, jbddirty) -TAS_BUFFER_FNS(JBDDirty, jbddirty) -BUFFER_FNS(Revoked, revoked) -TAS_BUFFER_FNS(Revoked, revoked) -BUFFER_FNS(RevokeValid, revokevalid) -TAS_BUFFER_FNS(RevokeValid, revokevalid) -BUFFER_FNS(Freed, freed) - -static inline struct buffer_head *jh2bh(struct journal_head *jh) -{ - return jh->b_bh; -} - -static inline struct journal_head *bh2jh(struct buffer_head *bh) -{ - return bh->b_private; -} - -static inline void jbd_lock_bh_state(struct buffer_head *bh) -{ - bit_spin_lock(BH_State, &bh->b_state); -} - -static inline int jbd_trylock_bh_state(struct buffer_head *bh) -{ - return bit_spin_trylock(BH_State, &bh->b_state); -} - -static inline int jbd_is_locked_bh_state(struct buffer_head *bh) -{ - return bit_spin_is_locked(BH_State, &bh->b_state); -} - -static inline void jbd_unlock_bh_state(struct buffer_head *bh) -{ - bit_spin_unlock(BH_State, &bh->b_state); -} - -static inline void jbd_lock_bh_journal_head(struct buffer_head *bh) -{ - bit_spin_lock(BH_JournalHead, &bh->b_state); -} - -static inline void jbd_unlock_bh_journal_head(struct buffer_head *bh) -{ - bit_spin_unlock(BH_JournalHead, &bh->b_state); -} - -struct jbd_revoke_table_s; - -/** - * struct handle_s - The handle_s type is the concrete type associated with - * handle_t. - * @h_transaction: Which compound transaction is this update a part of? - * @h_buffer_credits: Number of remaining buffers we are allowed to dirty. - * @h_ref: Reference count on this handle - * @h_err: Field for caller's use to track errors through large fs operations - * @h_sync: flag for sync-on-close - * @h_jdata: flag to force data journaling - * @h_aborted: flag indicating fatal error on handle - **/ - -/* Docbook can't yet cope with the bit fields, but will leave the documentation - * in so it can be fixed later. - */ - -struct handle_s -{ - /* Which compound transaction is this update a part of? */ - transaction_t *h_transaction; - - /* Number of remaining buffers we are allowed to dirty: */ - int h_buffer_credits; - - /* Reference count on this handle */ - int h_ref; - - /* Field for caller's use to track errors through large fs */ - /* operations */ - int h_err; - - /* Flags [no locking] */ - unsigned int h_sync: 1; /* sync-on-close */ - unsigned int h_jdata: 1; /* force data journaling */ - unsigned int h_aborted: 1; /* fatal error on handle */ -}; - - -/* The transaction_t type is the guts of the journaling mechanism. It - * tracks a compound transaction through its various states: - * - * RUNNING: accepting new updates - * LOCKED: Updates still running but we don't accept new ones - * RUNDOWN: Updates are tidying up but have finished requesting - * new buffers to modify (state not used for now) - * FLUSH: All updates complete, but we are still writing to disk - * COMMIT: All data on disk, writing commit record - * FINISHED: We still have to keep the transaction for checkpointing. - * - * The transaction keeps track of all of the buffers modified by a - * running transaction, and all of the buffers committed but not yet - * flushed to home for finished transactions. - */ - -/* - * Lock ranking: - * - * j_list_lock - * ->jbd_lock_bh_journal_head() (This is "innermost") - * - * j_state_lock - * ->jbd_lock_bh_state() - * - * jbd_lock_bh_state() - * ->j_list_lock - * - * j_state_lock - * ->t_handle_lock - * - * j_state_lock - * ->j_list_lock (journal_unmap_buffer) - * - */ - -struct transaction_s -{ - /* Pointer to the journal for this transaction. [no locking] */ - journal_t *t_journal; - - /* Sequence number for this transaction [no locking] */ - tid_t t_tid; - - /* - * Transaction's current state - * [no locking - only kjournald alters this] - * FIXME: needs barriers - * KLUDGE: [use j_state_lock] - */ - enum { - T_RUNNING, - T_LOCKED, - T_RUNDOWN, - T_FLUSH, - T_COMMIT, - T_FINISHED - } t_state; - - /* - * Where in the log does this transaction's commit start? [no locking] - */ - unsigned long t_log_start; - - /* Number of buffers on the t_buffers list [j_list_lock] */ - int t_nr_buffers; - - /* - * Doubly-linked circular list of all buffers reserved but not yet - * modified by this transaction [j_list_lock] - */ - struct journal_head *t_reserved_list; - - /* - * Doubly-linked circular list of all buffers under writeout during - * commit [j_list_lock] - */ - struct journal_head *t_locked_list; - - /* - * Doubly-linked circular list of all metadata buffers owned by this - * transaction [j_list_lock] - */ - struct journal_head *t_buffers; - - /* - * Doubly-linked circular list of all data buffers still to be - * flushed before this transaction can be committed [j_list_lock] - */ - struct journal_head *t_sync_datalist; - - /* - * Doubly-linked circular list of all forget buffers (superseded - * buffers which we can un-checkpoint once this transaction commits) - * [j_list_lock] - */ - struct journal_head *t_forget; - - /* - * Doubly-linked circular list of all buffers still to be flushed before - * this transaction can be checkpointed. [j_list_lock] - */ - struct journal_head *t_checkpoint_list; - - /* - * Doubly-linked circular list of all buffers submitted for IO while - * checkpointing. [j_list_lock] - */ - struct journal_head *t_checkpoint_io_list; - - /* - * Doubly-linked circular list of temporary buffers currently undergoing - * IO in the log [j_list_lock] - */ - struct journal_head *t_iobuf_list; - - /* - * Doubly-linked circular list of metadata buffers being shadowed by log - * IO. The IO buffers on the iobuf list and the shadow buffers on this - * list match each other one for one at all times. [j_list_lock] - */ - struct journal_head *t_shadow_list; - - /* - * Doubly-linked circular list of control buffers being written to the - * log. [j_list_lock] - */ - struct journal_head *t_log_list; - - /* - * Protects info related to handles - */ - spinlock_t t_handle_lock; - - /* - * Number of outstanding updates running on this transaction - * [t_handle_lock] - */ - int t_updates; - - /* - * Number of buffers reserved for use by all handles in this transaction - * handle but not yet modified. [t_handle_lock] - */ - int t_outstanding_credits; - - /* - * Forward and backward links for the circular list of all transactions - * awaiting checkpoint. [j_list_lock] - */ - transaction_t *t_cpnext, *t_cpprev; - - /* - * When will the transaction expire (become due for commit), in jiffies? - * [no locking] - */ - unsigned long t_expires; - - /* - * How many handles used this transaction? [t_handle_lock] - */ - int t_handle_count; - -}; - -/** - * struct journal_s - The journal_s type is the concrete type associated with - * journal_t. - * @j_flags: General journaling state flags - * @j_errno: Is there an outstanding uncleared error on the journal (from a - * prior abort)? - * @j_sb_buffer: First part of superblock buffer - * @j_superblock: Second part of superblock buffer - * @j_format_version: Version of the superblock format - * @j_state_lock: Protect the various scalars in the journal - * @j_barrier_count: Number of processes waiting to create a barrier lock - * @j_barrier: The barrier lock itself - * @j_running_transaction: The current running transaction.. - * @j_committing_transaction: the transaction we are pushing to disk - * @j_checkpoint_transactions: a linked circular list of all transactions - * waiting for checkpointing - * @j_wait_transaction_locked: Wait queue for waiting for a locked transaction - * to start committing, or for a barrier lock to be released - * @j_wait_logspace: Wait queue for waiting for checkpointing to complete - * @j_wait_done_commit: Wait queue for waiting for commit to complete - * @j_wait_checkpoint: Wait queue to trigger checkpointing - * @j_wait_commit: Wait queue to trigger commit - * @j_wait_updates: Wait queue to wait for updates to complete - * @j_checkpoint_mutex: Mutex for locking against concurrent checkpoints - * @j_head: Journal head - identifies the first unused block in the journal - * @j_tail: Journal tail - identifies the oldest still-used block in the - * journal. - * @j_free: Journal free - how many free blocks are there in the journal? - * @j_first: The block number of the first usable block - * @j_last: The block number one beyond the last usable block - * @j_dev: Device where we store the journal - * @j_blocksize: blocksize for the location where we store the journal. - * @j_blk_offset: starting block offset for into the device where we store the - * journal - * @j_fs_dev: Device which holds the client fs. For internal journal this will - * be equal to j_dev - * @j_maxlen: Total maximum capacity of the journal region on disk. - * @j_list_lock: Protects the buffer lists and internal buffer state. - * @j_inode: Optional inode where we store the journal. If present, all journal - * block numbers are mapped into this inode via bmap(). - * @j_tail_sequence: Sequence number of the oldest transaction in the log - * @j_transaction_sequence: Sequence number of the next transaction to grant - * @j_commit_sequence: Sequence number of the most recently committed - * transaction - * @j_commit_request: Sequence number of the most recent transaction wanting - * commit - * @j_uuid: Uuid of client object. - * @j_task: Pointer to the current commit thread for this journal - * @j_max_transaction_buffers: Maximum number of metadata buffers to allow in a - * single compound commit transaction - * @j_commit_interval: What is the maximum transaction lifetime before we begin - * a commit? - * @j_commit_timer: The timer used to wakeup the commit thread - * @j_revoke_lock: Protect the revoke table - * @j_revoke: The revoke table - maintains the list of revoked blocks in the - * current transaction. - * @j_revoke_table: alternate revoke tables for j_revoke - * @j_wbuf: array of buffer_heads for journal_commit_transaction - * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the - * number that will fit in j_blocksize - * @j_last_sync_writer: most recent pid which did a synchronous write - * @j_private: An opaque pointer to fs-private information. - */ - -struct journal_s -{ - /* General journaling state flags [j_state_lock] */ - unsigned long j_flags; - - /* - * Is there an outstanding uncleared error on the journal (from a prior - * abort)? [j_state_lock] - */ - int j_errno; - - /* The superblock buffer */ - struct buffer_head *j_sb_buffer; - journal_superblock_t *j_superblock; - - /* Version of the superblock format */ - int j_format_version; - - /* - * Protect the various scalars in the journal - */ - spinlock_t j_state_lock; - - /* - * Number of processes waiting to create a barrier lock [j_state_lock] - */ - int j_barrier_count; - - /* The barrier lock itself */ - struct mutex j_barrier; - - /* - * Transactions: The current running transaction... - * [j_state_lock] [caller holding open handle] - */ - transaction_t *j_running_transaction; - - /* - * the transaction we are pushing to disk - * [j_state_lock] [caller holding open handle] - */ - transaction_t *j_committing_transaction; - - /* - * ... and a linked circular list of all transactions waiting for - * checkpointing. [j_list_lock] - */ - transaction_t *j_checkpoint_transactions; - - /* - * Wait queue for waiting for a locked transaction to start committing, - * or for a barrier lock to be released - */ - wait_queue_head_t j_wait_transaction_locked; - - /* Wait queue for waiting for checkpointing to complete */ - wait_queue_head_t j_wait_logspace; - - /* Wait queue for waiting for commit to complete */ - wait_queue_head_t j_wait_done_commit; - - /* Wait queue to trigger checkpointing */ - wait_queue_head_t j_wait_checkpoint; - - /* Wait queue to trigger commit */ - wait_queue_head_t j_wait_commit; - - /* Wait queue to wait for updates to complete */ - wait_queue_head_t j_wait_updates; - - /* Semaphore for locking against concurrent checkpoints */ - struct mutex j_checkpoint_mutex; - - /* - * Journal head: identifies the first unused block in the journal. - * [j_state_lock] - */ - unsigned long j_head; - - /* - * Journal tail: identifies the oldest still-used block in the journal. - * [j_state_lock] - */ - unsigned long j_tail; - - /* - * Journal free: how many free blocks are there in the journal? - * [j_state_lock] - */ - unsigned long j_free; - - /* - * Journal start and end: the block numbers of the first usable block - * and one beyond the last usable block in the journal. [j_state_lock] - */ - unsigned long j_first; - unsigned long j_last; - - /* - * Device, blocksize and starting block offset for the location where we - * store the journal. - */ - struct block_device *j_dev; - int j_blocksize; - unsigned long j_blk_offset; - - /* - * Device which holds the client fs. For internal journal this will be - * equal to j_dev. - */ - struct block_device *j_fs_dev; - - /* Total maximum capacity of the journal region on disk. */ - unsigned int j_maxlen; - - /* - * Protects the buffer lists and internal buffer state. - */ - spinlock_t j_list_lock; - - /* Optional inode where we store the journal. If present, all */ - /* journal block numbers are mapped into this inode via */ - /* bmap(). */ - struct inode *j_inode; - - /* - * Sequence number of the oldest transaction in the log [j_state_lock] - */ - tid_t j_tail_sequence; - - /* - * Sequence number of the next transaction to grant [j_state_lock] - */ - tid_t j_transaction_sequence; - - /* - * Sequence number of the most recently committed transaction - * [j_state_lock]. - */ - tid_t j_commit_sequence; - - /* - * Sequence number of the most recent transaction wanting commit - * [j_state_lock] - */ - tid_t j_commit_request; - - /* - * Journal uuid: identifies the object (filesystem, LVM volume etc) - * backed by this journal. This will eventually be replaced by an array - * of uuids, allowing us to index multiple devices within a single - * journal and to perform atomic updates across them. - */ - __u8 j_uuid[16]; - - /* Pointer to the current commit thread for this journal */ - struct task_struct *j_task; - - /* - * Maximum number of metadata buffers to allow in a single compound - * commit transaction - */ - int j_max_transaction_buffers; - - /* - * What is the maximum transaction lifetime before we begin a commit? - */ - unsigned long j_commit_interval; - - /* The timer used to wakeup the commit thread: */ - struct timer_list j_commit_timer; - - /* - * The revoke table: maintains the list of revoked blocks in the - * current transaction. [j_revoke_lock] - */ - spinlock_t j_revoke_lock; - struct jbd_revoke_table_s *j_revoke; - struct jbd_revoke_table_s *j_revoke_table[2]; - - /* - * array of bhs for journal_commit_transaction - */ - struct buffer_head **j_wbuf; - int j_wbufsize; - - pid_t j_last_sync_writer; - - /* - * An opaque pointer to fs-private information. ext3 puts its - * superblock pointer here - */ - void *j_private; -}; - -/* - * Journal flag definitions - */ -#define JFS_UNMOUNT 0x001 /* Journal thread is being destroyed */ -#define JFS_ABORT 0x002 /* Journaling has been aborted for errors. */ -#define JFS_ACK_ERR 0x004 /* The errno in the sb has been acked */ -#define JFS_FLUSHED 0x008 /* The journal superblock has been flushed */ -#define JFS_LOADED 0x010 /* The journal superblock has been loaded */ -#define JFS_BARRIER 0x020 /* Use IDE barriers */ - -/* - * Function declarations for the journaling transaction and buffer - * management - */ - -/* Filing buffers */ -extern void __journal_temp_unlink_buffer(struct journal_head *jh); -extern void journal_unfile_buffer(journal_t *, struct journal_head *); -extern void __journal_unfile_buffer(struct journal_head *); -extern void __journal_refile_buffer(struct journal_head *); -extern void journal_refile_buffer(journal_t *, struct journal_head *); -extern void __journal_file_buffer(struct journal_head *, transaction_t *, int); -extern void __journal_free_buffer(struct journal_head *bh); -extern void journal_file_buffer(struct journal_head *, transaction_t *, int); -extern void __journal_clean_data_list(transaction_t *transaction); - -/* Log buffer allocation */ -extern struct journal_head * journal_get_descriptor_buffer(journal_t *); -int journal_next_log_block(journal_t *, unsigned long *); - -/* Commit management */ -extern void journal_commit_transaction(journal_t *); - -/* Checkpoint list management */ -int __journal_clean_checkpoint_list(journal_t *journal); -int __journal_remove_checkpoint(struct journal_head *); -void __journal_insert_checkpoint(struct journal_head *, transaction_t *); - -/* Buffer IO */ -extern int -journal_write_metadata_buffer(transaction_t *transaction, - struct journal_head *jh_in, - struct journal_head **jh_out, - unsigned long blocknr); - -/* Transaction locking */ -extern void __wait_on_journal (journal_t *); - -/* - * Journal locking. - * - * We need to lock the journal during transaction state changes so that nobody - * ever tries to take a handle on the running transaction while we are in the - * middle of moving it to the commit phase. j_state_lock does this. - * - * Note that the locking is completely interrupt unsafe. We never touch - * journal structures from interrupts. - */ - -static inline handle_t *journal_current_handle(void) -{ - return current->journal_info; -} - -/* The journaling code user interface: - * - * Create and destroy handles - * Register buffer modifications against the current transaction. - */ - -extern handle_t *journal_start(journal_t *, int nblocks); -extern int journal_restart (handle_t *, int nblocks); -extern int journal_extend (handle_t *, int nblocks); -extern int journal_get_write_access(handle_t *, struct buffer_head *); -extern int journal_get_create_access (handle_t *, struct buffer_head *); -extern int journal_get_undo_access(handle_t *, struct buffer_head *); -extern int journal_dirty_data (handle_t *, struct buffer_head *); -extern int journal_dirty_metadata (handle_t *, struct buffer_head *); -extern void journal_release_buffer (handle_t *, struct buffer_head *); -extern int journal_forget (handle_t *, struct buffer_head *); -extern void journal_sync_buffer (struct buffer_head *); -extern void journal_invalidatepage(journal_t *, - struct page *, unsigned long); -extern int journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); -extern int journal_stop(handle_t *); -extern int journal_flush (journal_t *); -extern void journal_lock_updates (journal_t *); -extern void journal_unlock_updates (journal_t *); - -extern journal_t * journal_init_dev(struct block_device *bdev, - struct block_device *fs_dev, - int start, int len, int bsize); -extern journal_t * journal_init_inode (struct inode *); -extern int journal_update_format (journal_t *); -extern int journal_check_used_features - (journal_t *, unsigned long, unsigned long, unsigned long); -extern int journal_check_available_features - (journal_t *, unsigned long, unsigned long, unsigned long); -extern int journal_set_features - (journal_t *, unsigned long, unsigned long, unsigned long); -extern int journal_create (journal_t *); -extern int journal_load (journal_t *journal); -extern void journal_destroy (journal_t *); -extern int journal_recover (journal_t *journal); -extern int journal_wipe (journal_t *, int); -extern int journal_skip_recovery (journal_t *); -extern void journal_update_superblock (journal_t *, int); -extern void __journal_abort_hard (journal_t *); -extern void journal_abort (journal_t *, int); -extern int journal_errno (journal_t *); -extern void journal_ack_err (journal_t *); -extern int journal_clear_err (journal_t *); -extern int journal_bmap(journal_t *, unsigned long, unsigned long *); -extern int journal_force_commit(journal_t *); - -/* - * journal_head management - */ -struct journal_head *journal_add_journal_head(struct buffer_head *bh); -struct journal_head *journal_grab_journal_head(struct buffer_head *bh); -void journal_remove_journal_head(struct buffer_head *bh); -void journal_put_journal_head(struct journal_head *jh); - -/* - * handle management - */ -extern kmem_cache_t *jbd_handle_cache; - -static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags) -{ - return kmem_cache_alloc(jbd_handle_cache, gfp_flags); -} - -static inline void jbd_free_handle(handle_t *handle) -{ - kmem_cache_free(jbd_handle_cache, handle); -} - -/* Primary revoke support */ -#define JOURNAL_REVOKE_DEFAULT_HASH 256 -extern int journal_init_revoke(journal_t *, int); -extern void journal_destroy_revoke_caches(void); -extern int journal_init_revoke_caches(void); - -extern void journal_destroy_revoke(journal_t *); -extern int journal_revoke (handle_t *, - unsigned long, struct buffer_head *); -extern int journal_cancel_revoke(handle_t *, struct journal_head *); -extern void journal_write_revoke_records(journal_t *, transaction_t *); - -/* Recovery revoke support */ -extern int journal_set_revoke(journal_t *, unsigned long, tid_t); -extern int journal_test_revoke(journal_t *, unsigned long, tid_t); -extern void journal_clear_revoke(journal_t *); -extern void journal_switch_revoke_table(journal_t *journal); - -/* - * The log thread user interface: - * - * Request space in the current transaction, and force transaction commit - * transitions on demand. - */ - -int __log_space_left(journal_t *); /* Called with journal locked */ -int log_start_commit(journal_t *journal, tid_t tid); -int __log_start_commit(journal_t *journal, tid_t tid); -int journal_start_commit(journal_t *journal, tid_t *tid); -int journal_force_commit_nested(journal_t *journal); -int log_wait_commit(journal_t *journal, tid_t tid); -int log_do_checkpoint(journal_t *journal); - -void __log_wait_for_space(journal_t *journal); -extern void __journal_drop_transaction(journal_t *, transaction_t *); -extern int cleanup_journal_tail(journal_t *); - -/* Debugging code only: */ - -#define jbd_ENOSYS() \ -do { \ - printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \ - current->state = TASK_UNINTERRUPTIBLE; \ - schedule(); \ -} while (1) - -/* - * is_journal_abort - * - * Simple test wrapper function to test the JFS_ABORT state flag. This - * bit, when set, indicates that we have had a fatal error somewhere, - * either inside the journaling layer or indicated to us by the client - * (eg. ext3), and that we and should not commit any further - * transactions. - */ - -static inline int is_journal_aborted(journal_t *journal) -{ - return journal->j_flags & JFS_ABORT; -} - -static inline int is_handle_aborted(handle_t *handle) -{ - if (handle->h_aborted) - return 1; - return is_journal_aborted(handle->h_transaction->t_journal); -} - -static inline void journal_abort_handle(handle_t *handle) -{ - handle->h_aborted = 1; -} - -#endif /* __KERNEL__ */ /* Comparison functions for transaction IDs: perform comparisons using * modulo arithmetic so that they work over sequence number wraps. */ -static inline int tid_gt(tid_t x, tid_t y) +static __inline__ int tid_gt(tid_t x, tid_t y) { int difference = (x - y); return (difference > 0); } -static inline int tid_geq(tid_t x, tid_t y) +static __inline__ int tid_geq(tid_t x, tid_t y) { int difference = (x - y); return (difference >= 0); @@ -1057,7 +215,7 @@ * Return the minimum number of blocks which must be free in the journal * before a new transaction may be started. Must be called under j_state_lock. */ -static inline int jbd_space_needed(journal_t *journal) +static __inline__ int jbd_space_needed(journal_t *journal) { int nblocks = journal->j_max_transaction_buffers; if (journal->j_committing_transaction) @@ -1084,15 +242,5 @@ extern int jbd_blocks_per_page(struct inode *inode); -#ifdef __KERNEL__ - -#define buffer_trace_init(bh) do {} while (0) -#define print_buffer_fields(bh) do {} while (0) -#define print_buffer_trace(bh) do {} while (0) -#define BUFFER_TRACE(bh, info) do {} while (0) -#define BUFFER_TRACE2(bh, bh2, info) do {} while (0) -#define JBUFFER_TRACE(jh, info) do {} while (0) - -#endif /* __KERNEL__ */ #endif /* _LINUX_JBD_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/joystick.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/joystick.h 2007-05-24 15:40:43.000000000 +0200 @@ -134,14 +134,5 @@ struct JS_DATA_TYPE JS_CORR; }; -#ifdef __KERNEL__ -#if BITS_PER_LONG == 64 -#define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64 -#elif BITS_PER_LONG == 32 -#define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_32 -#else -#error Unexpected BITS_PER_LONG -#endif -#endif #endif /* _LINUX_JOYSTICK_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/kd.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/kd.h 2007-05-24 15:40:43.000000000 +0200 @@ -1,7 +1,6 @@ #ifndef _LINUX_KD_H #define _LINUX_KD_H #include -#include /* 0x4B is 'K', to avoid collision with termios and vt */ @@ -13,7 +12,7 @@ struct consolefontdesc { unsigned short charcount; /* characters in font (256 or 512) */ unsigned short charheight; /* scan lines per character (1-32) */ - char __user *chardata; /* font data in expanded form */ + char *chardata; /* font data in expanded form */ }; #define PIO_FONTRESET 0x4B6D /* reset to default font */ @@ -64,7 +63,7 @@ }; struct unimapdesc { unsigned short entry_ct; - struct unipair __user *entries; + struct unipair *entries; }; #define PIO_UNIMAP 0x4B67 /* put unicode-to-font mapping in kernel */ #define PIO_UNIMAPCLR 0x4B68 /* clear table, possibly advise hash algorithm */ @@ -149,7 +148,7 @@ unsigned int flags; /* KD_FONT_FLAG_* */ unsigned int width, height; /* font size */ unsigned int charcount; - unsigned char __user *data; /* font data with height fixed to 32 */ + unsigned char *data; /* font data with height fixed to 32 */ }; struct console_font { @@ -164,9 +163,6 @@ #define KD_FONT_OP_COPY 3 /* Copy from another console */ #define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */ -#ifdef __KERNEL__ -#define KD_FONT_FLAG_OLD 0x80000000 /* Invoked via old interface [compat] */ -#endif /* note: 0x4B00-0x4B4E all have had a value at some time; don't reuse for the time being */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/kdev_t.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/kdev_t.h 2007-05-24 15:40:43.000000000 +0200 @@ -1,94 +1,5 @@ #ifndef _LINUX_KDEV_T_H #define _LINUX_KDEV_T_H -#ifdef __KERNEL__ -#define MINORBITS 20 -#define MINORMASK ((1U << MINORBITS) - 1) - -#define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS)) -#define MINOR(dev) ((unsigned int) ((dev) & MINORMASK)) -#define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi)) - -#define print_dev_t(buffer, dev) \ - sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev)) - -#define format_dev_t(buffer, dev) \ - ({ \ - sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \ - buffer; \ - }) - -/* acceptable for old filesystems */ -static inline int old_valid_dev(dev_t dev) -{ - return MAJOR(dev) < 256 && MINOR(dev) < 256; -} - -static inline u16 old_encode_dev(dev_t dev) -{ - return (MAJOR(dev) << 8) | MINOR(dev); -} - -static inline dev_t old_decode_dev(u16 val) -{ - return MKDEV((val >> 8) & 255, val & 255); -} - -static inline int new_valid_dev(dev_t dev) -{ - return 1; -} - -static inline u32 new_encode_dev(dev_t dev) -{ - unsigned major = MAJOR(dev); - unsigned minor = MINOR(dev); - return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12); -} - -static inline dev_t new_decode_dev(u32 dev) -{ - unsigned major = (dev & 0xfff00) >> 8; - unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00); - return MKDEV(major, minor); -} - -static inline int huge_valid_dev(dev_t dev) -{ - return 1; -} - -static inline u64 huge_encode_dev(dev_t dev) -{ - return new_encode_dev(dev); -} - -static inline dev_t huge_decode_dev(u64 dev) -{ - return new_decode_dev(dev); -} - -static inline int sysv_valid_dev(dev_t dev) -{ - return MAJOR(dev) < (1<<14) && MINOR(dev) < (1<<18); -} - -static inline u32 sysv_encode_dev(dev_t dev) -{ - return MINOR(dev) | (MAJOR(dev) << 18); -} - -static inline unsigned sysv_major(u32 dev) -{ - return (dev >> 18) & 0x3fff; -} - -static inline unsigned sysv_minor(u32 dev) -{ - return dev & 0x3ffff; -} - - -#else /* __KERNEL__ */ /* Some programs want their definitions of MAJOR and MINOR and MKDEV @@ -97,5 +8,4 @@ #define MAJOR(dev) ((dev)>>8) #define MINOR(dev) ((dev) & 0xff) #define MKDEV(ma,mi) ((ma)<<8 | (mi)) -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/kernel.h 2007-05-25 14:25:37.000000000 +0200 +++ ./linux/kernel.h 2007-05-24 15:40:44.000000000 +0200 @@ -5,331 +5,6 @@ * 'kernel.h' contains some often-used function prototypes etc */ -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include -#include -#include - -extern const char linux_banner[]; - -#define INT_MAX ((int)(~0U>>1)) -#define INT_MIN (-INT_MAX - 1) -#define UINT_MAX (~0U) -#define LONG_MAX ((long)(~0UL>>1)) -#define LONG_MIN (-LONG_MAX - 1) -#define ULONG_MAX (~0UL) -#define LLONG_MAX ((long long)(~0ULL>>1)) -#define LLONG_MIN (-LLONG_MAX - 1) -#define ULLONG_MAX (~0ULL) - -#define STACK_MAGIC 0xdeadbeef - -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL)) -#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) -#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) -#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) - -#define KERN_EMERG "<0>" /* system is unusable */ -#define KERN_ALERT "<1>" /* action must be taken immediately */ -#define KERN_CRIT "<2>" /* critical conditions */ -#define KERN_ERR "<3>" /* error conditions */ -#define KERN_WARNING "<4>" /* warning conditions */ -#define KERN_NOTICE "<5>" /* normal but significant condition */ -#define KERN_INFO "<6>" /* informational */ -#define KERN_DEBUG "<7>" /* debug-level messages */ - -extern int console_printk[]; - -#define console_loglevel (console_printk[0]) -#define default_message_loglevel (console_printk[1]) -#define minimum_console_loglevel (console_printk[2]) -#define default_console_loglevel (console_printk[3]) - -struct completion; -struct pt_regs; -struct user; - -/** - * might_sleep - annotation for functions that can sleep - * - * this macro will print a stack trace if it is executed in an atomic - * context (spinlock, irq-handler, ...). - * - * This is a useful debugging help to be able to catch problems early and not - * be biten later when the calling function happens to sleep when it is not - * supposed to. - */ -#ifdef CONFIG_PREEMPT_VOLUNTARY -extern int cond_resched(void); -# define might_resched() cond_resched() -#else -# define might_resched() do { } while (0) -#endif - -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP - void __might_sleep(char *file, int line); -# define might_sleep() \ - do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) -#else -# define might_sleep() do { might_resched(); } while (0) -#endif - -#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0) - -#define abs(x) ({ \ - int __x = (x); \ - (__x < 0) ? -__x : __x; \ - }) - -#define labs(x) ({ \ - long __x = (x); \ - (__x < 0) ? -__x : __x; \ - }) - -extern struct atomic_notifier_head panic_notifier_list; -extern long (*panic_blink)(long time); -NORET_TYPE void panic(const char * fmt, ...) - __attribute__ ((NORET_AND format (printf, 1, 2))); -extern void oops_enter(void); -extern void oops_exit(void); -extern int oops_may_print(void); -fastcall NORET_TYPE void do_exit(long error_code) - ATTRIB_NORET; -NORET_TYPE void complete_and_exit(struct completion *, long) - ATTRIB_NORET; -extern unsigned long simple_strtoul(const char *,char **,unsigned int); -extern long simple_strtol(const char *,char **,unsigned int); -extern unsigned long long simple_strtoull(const char *,char **,unsigned int); -extern long long simple_strtoll(const char *,char **,unsigned int); -extern int sprintf(char * buf, const char * fmt, ...) - __attribute__ ((format (printf, 2, 3))); -extern int vsprintf(char *buf, const char *, va_list) - __attribute__ ((format (printf, 2, 0))); -extern int snprintf(char * buf, size_t size, const char * fmt, ...) - __attribute__ ((format (printf, 3, 4))); -extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) - __attribute__ ((format (printf, 3, 0))); -extern int scnprintf(char * buf, size_t size, const char * fmt, ...) - __attribute__ ((format (printf, 3, 4))); -extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) - __attribute__ ((format (printf, 3, 0))); -extern char *kasprintf(gfp_t gfp, const char *fmt, ...) - __attribute__ ((format (printf, 2, 3))); - -extern int sscanf(const char *, const char *, ...) - __attribute__ ((format (scanf, 2, 3))); -extern int vsscanf(const char *, const char *, va_list) - __attribute__ ((format (scanf, 2, 0))); - -extern int get_option(char **str, int *pint); -extern char *get_options(const char *str, int nints, int *ints); -extern unsigned long long memparse(char *ptr, char **retptr); - -extern int core_kernel_text(unsigned long addr); -extern int __kernel_text_address(unsigned long addr); -extern int kernel_text_address(unsigned long addr); -extern int session_of_pgrp(int pgrp); - -extern void dump_thread(struct pt_regs *regs, struct user *dump); - -#ifdef CONFIG_PRINTK -asmlinkage int vprintk(const char *fmt, va_list args) - __attribute__ ((format (printf, 1, 0))); - -/* zeigt immer auf printk */ -extern asmlinkage int (*__printk)(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); - -/* wird ggf. auf andere Funktion umgebogen */ -#define printk _printk -extern asmlinkage int (*_printk)(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); - -void set_printk(int (*__print)(const char * fmt, ...) __attribute__ ((format (printf, 1, 2)))); -void restore_printk(void); - -#else -static inline int vprintk(const char *s, va_list args) - __attribute__ ((format (printf, 1, 0))); -static inline int vprintk(const char *s, va_list args) { return 0; } -static inline int printk(const char *s, ...) - __attribute__ ((format (printf, 1, 2))); -static inline int printk(const char *s, ...) { return 0; } -#endif - -unsigned long int_sqrt(unsigned long); - -static inline int __attribute_pure__ long_log2(unsigned long x) -{ - int r = 0; - for (x >>= 1; x > 0; x >>= 1) - r++; - return r; -} - -static inline unsigned long -__attribute_const__ roundup_pow_of_two(unsigned long x) -{ - return 1UL << fls_long(x - 1); -} - -extern int printk_ratelimit(void); -extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); - -static inline void console_silent(void) -{ - console_loglevel = 0; -} - -static inline void console_verbose(void) -{ - if (console_loglevel) - console_loglevel = 15; -} - -extern void bust_spinlocks(int yes); -extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ -extern int panic_timeout; -extern int panic_on_oops; -extern int panic_on_unrecovered_nmi; -extern int tainted; -extern const char *print_tainted(void); -extern void add_taint(unsigned); - -/* Values used for system_state */ -extern enum system_states { - SYSTEM_BOOTING, - SYSTEM_RUNNING, - SYSTEM_HALT, - SYSTEM_POWER_OFF, - SYSTEM_RESTART, - SYSTEM_SUSPEND_DISK, -} system_state; - -#define TAINT_PROPRIETARY_MODULE (1<<0) -#define TAINT_FORCED_MODULE (1<<1) -#define TAINT_UNSAFE_SMP (1<<2) -#define TAINT_FORCED_RMMOD (1<<3) -#define TAINT_MACHINE_CHECK (1<<4) -#define TAINT_BAD_PAGE (1<<5) - -extern void dump_stack(void); - -#ifdef DEBUG -/* If you are writing a driver, please use dev_dbg instead */ -#define pr_debug(fmt,arg...) \ - printk(KERN_DEBUG fmt,##arg) -#else -static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...) -{ - return 0; -} -#endif - -#define pr_info(fmt,arg...) \ - printk(KERN_INFO fmt,##arg) - -/* - * Display an IP address in readable format. - */ - -#define NIPQUAD(addr) \ - ((unsigned char *)&addr)[0], \ - ((unsigned char *)&addr)[1], \ - ((unsigned char *)&addr)[2], \ - ((unsigned char *)&addr)[3] -#define NIPQUAD_FMT "%u.%u.%u.%u" - -#define NIP6(addr) \ - ntohs((addr).s6_addr16[0]), \ - ntohs((addr).s6_addr16[1]), \ - ntohs((addr).s6_addr16[2]), \ - ntohs((addr).s6_addr16[3]), \ - ntohs((addr).s6_addr16[4]), \ - ntohs((addr).s6_addr16[5]), \ - ntohs((addr).s6_addr16[6]), \ - ntohs((addr).s6_addr16[7]) -#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" -#define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x" - -#if defined(__LITTLE_ENDIAN) -#define HIPQUAD(addr) \ - ((unsigned char *)&addr)[3], \ - ((unsigned char *)&addr)[2], \ - ((unsigned char *)&addr)[1], \ - ((unsigned char *)&addr)[0] -#elif defined(__BIG_ENDIAN) -#define HIPQUAD NIPQUAD -#else -#error "Please fix asm/byteorder.h" -#endif /* __LITTLE_ENDIAN */ - -/* - * min()/max() macros that also do - * strict type-checking.. See the - * "unnecessary" pointer comparison. - */ -#define min(x,y) ({ \ - typeof(x) _x = (x); \ - typeof(y) _y = (y); \ - (void) (&_x == &_y); \ - _x < _y ? _x : _y; }) - -#define max(x,y) ({ \ - typeof(x) _x = (x); \ - typeof(y) _y = (y); \ - (void) (&_x == &_y); \ - _x > _y ? _x : _y; }) - -/* - * ..and if you can't take the strict - * types, you can specify one yourself. - * - * Or not use min/max at all, of course. - */ -#define min_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) -#define max_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) - - -/** - * container_of - cast a member of a structure out to the containing structure - * @ptr: the pointer to the member. - * @type: the type of the container struct this is embedded in. - * @member: the name of the member within the struct. - * - */ -#define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) - -/* - * Check at compile time that something is of a particular type. - * Always evaluates to 1 so you may use it easily in comparisons. - */ -#define typecheck(type,x) \ -({ type __dummy; \ - typeof(x) __dummy2; \ - (void)(&__dummy == &__dummy2); \ - 1; \ -}) - -/* - * Check at compile time that 'function' is a certain type, or is a pointer - * to that type (needs to use typedef for the function type.) - */ -#define typecheck_fn(type,function) \ -({ typeof(type) __tmp = function; \ - (void)__tmp; \ -}) - -#endif /* __KERNEL__ */ #define SI_LOAD_SHIFT 16 struct sysinfo { --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/kernelcapi.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/kernelcapi.h 2007-05-24 15:40:44.000000000 +0200 @@ -43,119 +43,5 @@ #define KCAPI_TRACE_FULL 4 -#ifdef __KERNEL__ - -#include -#include - -#define KCI_CONTRUP 0 /* arg: struct capi_profile */ -#define KCI_CONTRDOWN 1 /* arg: NULL */ - -struct capi20_appl { - u16 applid; - capi_register_params rparam; - void (*recv_message)(struct capi20_appl *ap, struct sk_buff *skb); - void *private; - - /* internal to kernelcapi.o */ - unsigned long nrecvctlpkt; - unsigned long nrecvdatapkt; - unsigned long nsentctlpkt; - unsigned long nsentdatapkt; - struct semaphore recv_sem; - struct sk_buff_head recv_queue; - struct work_struct recv_work; - int release_in_progress; - - /* ugly hack to allow for notification of added/removed - * controllers. The Right Way (tm) is known. XXX - */ - void (*callback) (unsigned int cmd, __u32 contr, void *data); -}; - -u16 capi20_isinstalled(void); -u16 capi20_register(struct capi20_appl *ap); -u16 capi20_release(struct capi20_appl *ap); -u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb); -u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]); -u16 capi20_get_version(u32 contr, struct capi_version *verp); -u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]); -u16 capi20_get_profile(u32 contr, struct capi_profile *profp); -int capi20_manufacturer(unsigned int cmd, void __user *data); - -/* temporary hack XXX */ -void capi20_set_callback(struct capi20_appl *ap, - void (*callback) (unsigned int cmd, __u32 contr, void *data)); - - - -#define CAPI_NOERROR 0x0000 - -#define CAPI_TOOMANYAPPLS 0x1001 -#define CAPI_LOGBLKSIZETOSMALL 0x1002 -#define CAPI_BUFFEXECEEDS64K 0x1003 -#define CAPI_MSGBUFSIZETOOSMALL 0x1004 -#define CAPI_ANZLOGCONNNOTSUPPORTED 0x1005 -#define CAPI_REGRESERVED 0x1006 -#define CAPI_REGBUSY 0x1007 -#define CAPI_REGOSRESOURCEERR 0x1008 -#define CAPI_REGNOTINSTALLED 0x1009 -#define CAPI_REGCTRLERNOTSUPPORTEXTEQUIP 0x100a -#define CAPI_REGCTRLERONLYSUPPORTEXTEQUIP 0x100b - -#define CAPI_ILLAPPNR 0x1101 -#define CAPI_ILLCMDORSUBCMDORMSGTOSMALL 0x1102 -#define CAPI_SENDQUEUEFULL 0x1103 -#define CAPI_RECEIVEQUEUEEMPTY 0x1104 -#define CAPI_RECEIVEOVERFLOW 0x1105 -#define CAPI_UNKNOWNNOTPAR 0x1106 -#define CAPI_MSGBUSY 0x1107 -#define CAPI_MSGOSRESOURCEERR 0x1108 -#define CAPI_MSGNOTINSTALLED 0x1109 -#define CAPI_MSGCTRLERNOTSUPPORTEXTEQUIP 0x110a -#define CAPI_MSGCTRLERONLYSUPPORTEXTEQUIP 0x110b - -typedef enum { - CapiMessageNotSupportedInCurrentState = 0x2001, - CapiIllContrPlciNcci = 0x2002, - CapiNoPlciAvailable = 0x2003, - CapiNoNcciAvailable = 0x2004, - CapiNoListenResourcesAvailable = 0x2005, - CapiNoFaxResourcesAvailable = 0x2006, - CapiIllMessageParmCoding = 0x2007, -} RESOURCE_CODING_PROBLEM; - -typedef enum { - CapiB1ProtocolNotSupported = 0x3001, - CapiB2ProtocolNotSupported = 0x3002, - CapiB3ProtocolNotSupported = 0x3003, - CapiB1ProtocolParameterNotSupported = 0x3004, - CapiB2ProtocolParameterNotSupported = 0x3005, - CapiB3ProtocolParameterNotSupported = 0x3006, - CapiBProtocolCombinationNotSupported = 0x3007, - CapiNcpiNotSupported = 0x3008, - CapiCipValueUnknown = 0x3009, - CapiFlagsNotSupported = 0x300a, - CapiFacilityNotSupported = 0x300b, - CapiDataLengthNotSupportedByCurrentProtocol = 0x300c, - CapiResetProcedureNotSupportedByCurrentProtocol = 0x300d, - CapiTeiAssignmentFailed = 0x300e, -} REQUESTED_SERVICES_PROBLEM; - -typedef enum { - CapiSuccess = 0x0000, - CapiSupplementaryServiceNotSupported = 0x300e, - CapiRequestNotAllowedInThisState = 0x3010, -} SUPPLEMENTARY_SERVICE_INFO; - -typedef enum { - CapiProtocolErrorLayer1 = 0x3301, - CapiProtocolErrorLayer2 = 0x3302, - CapiProtocolErrorLayer3 = 0x3303, - CapiTimeOut = 0x3303, // SuppServiceReason - CapiCallGivenToOtherApplication = 0x3304, -} CAPI_REASON; - -#endif /* __KERNEL__ */ #endif /* __KERNELCAPI_H__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/keyboard.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/keyboard.h 2007-05-24 15:40:44.000000000 +0200 @@ -22,12 +22,6 @@ may increase the number of keymaps beyond MAX_NR_OF_USER_KEYMAPS. */ #define MAX_NR_OF_USER_KEYMAPS 256 /* should be at least 7 */ -#ifdef __KERNEL__ -extern const int NR_TYPES; -extern const int max_vals[]; -extern unsigned short *key_maps[MAX_NR_KEYMAPS]; -extern unsigned short plain_map[NR_KEYS]; -#endif #define MAX_NR_FUNC 256 /* max nr of strings assigned to keys */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/llc.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/llc.h 2007-05-24 15:40:44.000000000 +0200 @@ -70,11 +70,4 @@ #define LLC_SAP_RM 0xD4 /* Resource Management */ #define LLC_SAP_GLOBAL 0xFF /* Global SAP. */ -#ifdef __KERNEL__ -#define LLC_SAP_DYN_START 0xC0 -#define LLC_SAP_DYN_STOP 0xDE -#define LLC_SAP_DYN_TRIES 4 - -#define llc_ui_skb_cb(__skb) ((struct sockaddr_llc *)&((__skb)->cb[0])) -#endif /* __KERNEL__ */ #endif /* __LINUX_LLC_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/loop.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/loop.h 2007-05-24 15:40:44.000000000 +0200 @@ -13,60 +13,6 @@ #define LO_NAME_SIZE 64 #define LO_KEY_SIZE 32 -#ifdef __KERNEL__ -#include -#include -#include -#include - -/* Possible states of device */ -enum { - Lo_unbound, - Lo_bound, - Lo_rundown, -}; - -struct loop_func_table; - -struct loop_device { - int lo_number; - int lo_refcnt; - loff_t lo_offset; - loff_t lo_sizelimit; - int lo_flags; - int (*transfer)(struct loop_device *, int cmd, - struct page *raw_page, unsigned raw_off, - struct page *loop_page, unsigned loop_off, - int size, sector_t real_block); - char lo_file_name[LO_NAME_SIZE]; - char lo_crypt_name[LO_NAME_SIZE]; - char lo_encrypt_key[LO_KEY_SIZE]; - int lo_encrypt_key_size; - struct loop_func_table *lo_encryption; - __u32 lo_init[2]; - uid_t lo_key_owner; /* Who set the key */ - int (*ioctl)(struct loop_device *, int cmd, - unsigned long arg); - - struct file * lo_backing_file; - struct block_device *lo_device; - unsigned lo_blocksize; - void *key_data; - - gfp_t old_gfp_mask; - - spinlock_t lo_lock; - struct bio *lo_bio; - struct bio *lo_biotail; - int lo_state; - struct mutex lo_ctl_mutex; - struct task_struct *lo_thread; - wait_queue_head_t lo_event; - - request_queue_t *lo_queue; -}; - -#endif /* __KERNEL__ */ /* * Loop flags @@ -127,25 +73,6 @@ #define LO_CRYPT_CRYPTOAPI 18 #define MAX_LO_CRYPT 20 -#ifdef __KERNEL__ -/* Support for loadable transfer modules */ -struct loop_func_table { - int number; /* filter type */ - int (*transfer)(struct loop_device *lo, int cmd, - struct page *raw_page, unsigned raw_off, - struct page *loop_page, unsigned loop_off, - int size, sector_t real_block); - int (*init)(struct loop_device *, const struct loop_info64 *); - /* release is called from loop_unregister_transfer or clr_fd */ - int (*release)(struct loop_device *); - int (*ioctl)(struct loop_device *, int cmd, unsigned long arg); - struct module *owner; -}; - -int loop_register_transfer(struct loop_func_table *funcs); -int loop_unregister_transfer(int number); - -#endif /* * IOCTL commands --- we will commandeer 0x4C ('L') */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/lp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/lp.h 2007-05-24 15:40:44.000000000 +0200 @@ -96,96 +96,5 @@ #define LP_TIMEOUT_INTERRUPT (60 * HZ) #define LP_TIMEOUT_POLLED (10 * HZ) -#ifdef __KERNEL__ - -#include -#include - -/* Magic numbers for defining port-device mappings */ -#define LP_PARPORT_UNSPEC -4 -#define LP_PARPORT_AUTO -3 -#define LP_PARPORT_OFF -2 -#define LP_PARPORT_NONE -1 - -#define LP_F(minor) lp_table[(minor)].flags /* flags for busy, etc. */ -#define LP_CHAR(minor) lp_table[(minor)].chars /* busy timeout */ -#define LP_TIME(minor) lp_table[(minor)].time /* wait time */ -#define LP_WAIT(minor) lp_table[(minor)].wait /* strobe wait */ -#define LP_IRQ(minor) lp_table[(minor)].dev->port->irq /* interrupt # */ - /* PARPORT_IRQ_NONE means polled */ -#ifdef LP_STATS -#define LP_STAT(minor) lp_table[(minor)].stats /* statistics area */ -#endif -#define LP_BUFFER_SIZE PAGE_SIZE - -#define LP_BASE(x) lp_table[(x)].dev->port->base - -#ifdef LP_STATS -struct lp_stats { - unsigned long chars; - unsigned long sleeps; - unsigned int maxrun; - unsigned int maxwait; - unsigned int meanwait; - unsigned int mdev; -}; -#endif - -struct lp_struct { - struct pardevice *dev; - unsigned long flags; - unsigned int chars; - unsigned int time; - unsigned int wait; - char *lp_buffer; -#ifdef LP_STATS - unsigned int lastcall; - unsigned int runchars; - struct lp_stats stats; -#endif - wait_queue_head_t waitq; - unsigned int last_error; - struct semaphore port_mutex; - wait_queue_head_t dataq; - long timeout; - unsigned int best_mode; - unsigned int current_mode; - unsigned long bits; -}; - -/* - * The following constants describe the various signals of the printer port - * hardware. Note that the hardware inverts some signals and that some - * signals are active low. An example is LP_STROBE, which must be programmed - * with 1 for being active and 0 for being inactive, because the strobe signal - * gets inverted, but it is also active low. - */ - - -/* - * defines for 8255 control port - * base + 2 - * accessed with LP_C(minor) - */ -#define LP_PINTEN 0x10 /* high to read data in or-ed with data out */ -#define LP_PSELECP 0x08 /* inverted output, active low */ -#define LP_PINITP 0x04 /* unchanged output, active low */ -#define LP_PAUTOLF 0x02 /* inverted output, active low */ -#define LP_PSTROBE 0x01 /* short high output on raising edge */ - -/* - * the value written to ports to test existence. PC-style ports will - * return the value written. AT-style ports will return 0. so why not - * make them the same ? - */ -#define LP_DUMMY 0x00 - -/* - * This is the port delay time, in microseconds. - * It is used only in the lp_init() and lp_reset() routine. - */ -#define LP_DELAY 50 - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/mempolicy.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/mempolicy.h 2007-05-24 15:40:44.000000000 +0200 @@ -26,252 +26,5 @@ #define MPOL_MF_MOVE_ALL (1<<2) /* Move every page to conform to mapping */ #define MPOL_MF_INTERNAL (1<<3) /* Internal flags start here */ -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include - -struct vm_area_struct; -struct mm_struct; - -#ifdef CONFIG_NUMA - -/* - * Describe a memory policy. - * - * A mempolicy can be either associated with a process or with a VMA. - * For VMA related allocations the VMA policy is preferred, otherwise - * the process policy is used. Interrupts ignore the memory policy - * of the current process. - * - * Locking policy for interlave: - * In process context there is no locking because only the process accesses - * its own state. All vma manipulation is somewhat protected by a down_read on - * mmap_sem. - * - * Freeing policy: - * When policy is MPOL_BIND v.zonelist is kmalloc'ed and must be kfree'd. - * All other policies don't have any external state. mpol_free() handles this. - * - * Copying policy objects: - * For MPOL_BIND the zonelist must be always duplicated. mpol_clone() does this. - */ -struct mempolicy { - atomic_t refcnt; - short policy; /* See MPOL_* above */ - union { - struct zonelist *zonelist; /* bind */ - short preferred_node; /* preferred */ - nodemask_t nodes; /* interleave */ - /* undefined for default */ - } v; - nodemask_t cpuset_mems_allowed; /* mempolicy relative to these nodes */ -}; - -/* - * Support for managing mempolicy data objects (clone, copy, destroy) - * The default fast path of a NULL MPOL_DEFAULT policy is always inlined. - */ - -extern void __mpol_free(struct mempolicy *pol); -static inline void mpol_free(struct mempolicy *pol) -{ - if (pol) - __mpol_free(pol); -} - -extern struct mempolicy *__mpol_copy(struct mempolicy *pol); -static inline struct mempolicy *mpol_copy(struct mempolicy *pol) -{ - if (pol) - pol = __mpol_copy(pol); - return pol; -} - -#define vma_policy(vma) ((vma)->vm_policy) -#define vma_set_policy(vma, pol) ((vma)->vm_policy = (pol)) - -static inline void mpol_get(struct mempolicy *pol) -{ - if (pol) - atomic_inc(&pol->refcnt); -} - -extern int __mpol_equal(struct mempolicy *a, struct mempolicy *b); -static inline int mpol_equal(struct mempolicy *a, struct mempolicy *b) -{ - if (a == b) - return 1; - return __mpol_equal(a, b); -} -#define vma_mpol_equal(a,b) mpol_equal(vma_policy(a), vma_policy(b)) - -/* Could later add inheritance of the process policy here. */ - -#define mpol_set_vma_default(vma) ((vma)->vm_policy = NULL) - -/* - * Tree of shared policies for a shared memory region. - * Maintain the policies in a pseudo mm that contains vmas. The vmas - * carry the policy. As a special twist the pseudo mm is indexed in pages, not - * bytes, so that we can work with shared memory segments bigger than - * unsigned long. - */ - -struct sp_node { - struct rb_node nd; - unsigned long start, end; - struct mempolicy *policy; -}; - -struct shared_policy { - struct rb_root root; - spinlock_t lock; -}; - -void mpol_shared_policy_init(struct shared_policy *info, int policy, - nodemask_t *nodes); -int mpol_set_shared_policy(struct shared_policy *info, - struct vm_area_struct *vma, - struct mempolicy *new); -void mpol_free_shared_policy(struct shared_policy *p); -struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, - unsigned long idx); - -extern void numa_default_policy(void); -extern void numa_policy_init(void); -extern void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *new); -extern void mpol_rebind_task(struct task_struct *tsk, - const nodemask_t *new); -extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new); -extern void mpol_fix_fork_child_flag(struct task_struct *p); -#define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x)) - -#ifdef CONFIG_CPUSETS -#define current_cpuset_is_being_rebound() \ - (cpuset_being_rebound == current->cpuset) -#else -#define current_cpuset_is_being_rebound() 0 -#endif - -extern struct mempolicy default_policy; -extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, - unsigned long addr); -extern unsigned slab_node(struct mempolicy *policy); - -extern enum zone_type policy_zone; - -static inline void check_highest_zone(enum zone_type k) -{ - if (k > policy_zone) - policy_zone = k; -} - -int do_migrate_pages(struct mm_struct *mm, - const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags); - -extern void *cpuset_being_rebound; /* Trigger mpol_copy vma rebind */ - -#else - -struct mempolicy {}; - -static inline int mpol_equal(struct mempolicy *a, struct mempolicy *b) -{ - return 1; -} -#define vma_mpol_equal(a,b) 1 - -#define mpol_set_vma_default(vma) do {} while(0) - -static inline void mpol_free(struct mempolicy *p) -{ -} - -static inline void mpol_get(struct mempolicy *pol) -{ -} - -static inline struct mempolicy *mpol_copy(struct mempolicy *old) -{ - return NULL; -} - -struct shared_policy {}; - -static inline int mpol_set_shared_policy(struct shared_policy *info, - struct vm_area_struct *vma, - struct mempolicy *new) -{ - return -EINVAL; -} - -static inline void mpol_shared_policy_init(struct shared_policy *info, - int policy, nodemask_t *nodes) -{ -} - -static inline void mpol_free_shared_policy(struct shared_policy *p) -{ -} - -static inline struct mempolicy * -mpol_shared_policy_lookup(struct shared_policy *sp, unsigned long idx) -{ - return NULL; -} - -#define vma_policy(vma) NULL -#define vma_set_policy(vma, pol) do {} while(0) - -static inline void numa_policy_init(void) -{ -} - -static inline void numa_default_policy(void) -{ -} - -static inline void mpol_rebind_policy(struct mempolicy *pol, - const nodemask_t *new) -{ -} - -static inline void mpol_rebind_task(struct task_struct *tsk, - const nodemask_t *new) -{ -} - -static inline void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new) -{ -} - -static inline void mpol_fix_fork_child_flag(struct task_struct *p) -{ -} - -#define set_cpuset_being_rebound(x) do {} while (0) - -static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, - unsigned long addr) -{ - return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER); -} - -static inline int do_migrate_pages(struct mm_struct *mm, - const nodemask_t *from_nodes, - const nodemask_t *to_nodes, int flags) -{ - return 0; -} - -static inline void check_highest_zone(int k) -{ -} -#endif /* CONFIG_NUMA */ -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/mii.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/mii.h 2007-05-24 15:40:44.000000000 +0200 @@ -143,97 +143,4 @@ __u16 val_out; }; -#ifdef __KERNEL__ - -#include - -struct ethtool_cmd; - -struct mii_if_info { - int phy_id; - int advertising; - int phy_id_mask; - int reg_num_mask; - - unsigned int full_duplex : 1; /* is full duplex? */ - unsigned int force_media : 1; /* is autoneg. disabled? */ - unsigned int supports_gmii : 1; /* are GMII registers supported? */ - - struct net_device *dev; - int (*mdio_read) (struct net_device *dev, int phy_id, int location); - void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val); -}; - -extern int mii_link_ok (struct mii_if_info *mii); -extern int mii_nway_restart (struct mii_if_info *mii); -extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); -extern int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); -extern int mii_check_gmii_support(struct mii_if_info *mii); -extern void mii_check_link (struct mii_if_info *mii); -extern unsigned int mii_check_media (struct mii_if_info *mii, - unsigned int ok_to_print, - unsigned int init_media); -extern int generic_mii_ioctl(struct mii_if_info *mii_if, - struct mii_ioctl_data *mii_data, int cmd, - unsigned int *duplex_changed); - - -static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) -{ - return (struct mii_ioctl_data *) &rq->ifr_ifru; -} - - -/** - * mii_nway_result - * @negotiated: value of MII ANAR and'd with ANLPAR - * - * Given a set of MII abilities, check each bit and returns the - * currently supported media, in the priority order defined by - * IEEE 802.3u. We use LPA_xxx constants but note this is not the - * value of LPA solely, as described above. - * - * The one exception to IEEE 802.3u is that 100baseT4 is placed - * between 100T-full and 100T-half. If your phy does not support - * 100T4 this is fine. If your phy places 100T4 elsewhere in the - * priority order, you will need to roll your own function. - */ -static inline unsigned int mii_nway_result (unsigned int negotiated) -{ - unsigned int ret; - - if (negotiated & LPA_100FULL) - ret = LPA_100FULL; - else if (negotiated & LPA_100BASE4) - ret = LPA_100BASE4; - else if (negotiated & LPA_100HALF) - ret = LPA_100HALF; - else if (negotiated & LPA_10FULL) - ret = LPA_10FULL; - else - ret = LPA_10HALF; - - return ret; -} - -/** - * mii_duplex - * @duplex_lock: Non-zero if duplex is locked at full - * @negotiated: value of MII ANAR and'd with ANLPAR - * - * A small helper function for a common case. Returns one - * if the media is operating or locked at full duplex, and - * returns zero otherwise. - */ -static inline unsigned int mii_duplex (unsigned int duplex_lock, - unsigned int negotiated) -{ - if (duplex_lock) - return 1; - if (mii_nway_result(negotiated) & LPA_DUPLEX) - return 1; - return 0; -} - -#endif /* __KERNEL__ */ #endif /* __LINUX_MII_H__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/mman.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/mman.h 2007-05-24 15:40:44.000000000 +0200 @@ -10,65 +10,4 @@ #define OVERCOMMIT_ALWAYS 1 #define OVERCOMMIT_NEVER 2 -#ifdef __KERNEL__ -#include - -#include - -extern int sysctl_overcommit_memory; -extern int sysctl_overcommit_ratio; -extern atomic_t vm_committed_space; - -#ifdef CONFIG_SMP -extern void vm_acct_memory(long pages); -#else -static inline void vm_acct_memory(long pages) -{ - atomic_add(pages, &vm_committed_space); -} -#endif - -static inline void vm_unacct_memory(long pages) -{ - vm_acct_memory(-pages); -} - -/* - * Optimisation macro. It is equivalent to: - * (x & bit1) ? bit2 : 0 - * but this version is faster. - * ("bit1" and "bit2" must be single bits) - */ -#define _calc_vm_trans(x, bit1, bit2) \ - ((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \ - : ((x) & (bit1)) / ((bit1) / (bit2))) - -/* - * Combine the mmap "prot" argument into "vm_flags" used internally. - */ -static inline unsigned long -calc_vm_prot_bits(unsigned long prot) -{ - return _calc_vm_trans(prot, PROT_READ, VM_READ ) | - _calc_vm_trans(prot, PROT_WRITE, VM_WRITE) | - _calc_vm_trans(prot, PROT_EXEC, VM_EXEC ); -} - -/* - * Combine the mmap "flags" argument into "vm_flags" used internally. - */ -static inline unsigned long -calc_vm_flag_bits(unsigned long flags) -{ - return _calc_vm_trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN ) | - -#ifdef CONFIG_PAX_SEGMEXEC - _calc_vm_trans(flags, MAP_MIRROR, VM_MIRROR) | -#endif - - _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | - _calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) | - _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); -} -#endif /* __KERNEL__ */ #endif /* _LINUX_MMAN_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/mroute.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/mroute.h 2007-05-24 15:40:44.000000000 +0200 @@ -125,66 +125,6 @@ * That's all usermode folks */ -#ifdef __KERNEL__ -#include - -extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); -extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); -extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); -extern void ip_mr_init(void); - - -struct vif_device -{ - struct net_device *dev; /* Device we are using */ - unsigned long bytes_in,bytes_out; - unsigned long pkt_in,pkt_out; /* Statistics */ - unsigned long rate_limit; /* Traffic shaping (NI) */ - unsigned char threshold; /* TTL threshold */ - unsigned short flags; /* Control flags */ - __be32 local,remote; /* Addresses(remote for tunnels)*/ - int link; /* Physical interface index */ -}; - -#define VIFF_STATIC 0x8000 - -struct mfc_cache -{ - struct mfc_cache *next; /* Next entry on cache line */ - __be32 mfc_mcastgrp; /* Group the entry belongs to */ - __be32 mfc_origin; /* Source of packet */ - vifi_t mfc_parent; /* Source interface */ - int mfc_flags; /* Flags on line */ - - union { - struct { - unsigned long expires; - struct sk_buff_head unresolved; /* Unresolved buffers */ - } unres; - struct { - unsigned long last_assert; - int minvif; - int maxvif; - unsigned long bytes; - unsigned long pkt; - unsigned long wrong_if; - unsigned char ttls[MAXVIFS]; /* TTL thresholds */ - } res; - } mfc_un; -}; - -#define MFC_STATIC 1 -#define MFC_NOTIFY 2 - -#define MFC_LINES 64 - -#ifdef __BIG_ENDIAN -#define MFC_HASH(a,b) (((((__force u32)(__be32)a)>>24)^(((__force u32)(__be32)b)>>26))&(MFC_LINES-1)) -#else -#define MFC_HASH(a,b) ((((__force u32)(__be32)a)^(((__force u32)(__be32)b)>>2))&(MFC_LINES-1)) -#endif - -#endif #define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */ @@ -197,30 +137,5 @@ #define IGMPMSG_WRONGVIF 2 /* For PIM assert processing (unused) */ #define IGMPMSG_WHOLEPKT 3 /* For PIM Register processing */ -#ifdef __KERNEL__ - -#define PIM_V1_VERSION __constant_htonl(0x10000000) -#define PIM_V1_REGISTER 1 - -#define PIM_VERSION 2 -#define PIM_REGISTER 1 - -#define PIM_NULL_REGISTER __constant_htonl(0x40000000) - -/* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */ - -struct pimreghdr -{ - __u8 type; - __u8 reserved; - __be16 csum; - __be32 flags; -}; - -extern int pim_rcv_v1(struct sk_buff *); - -struct rtmsg; -extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait); -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/msdos_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/msdos_fs.h 2007-05-24 15:40:44.000000000 +0200 @@ -178,254 +178,5 @@ struct buffer_head *bh; }; -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include - -struct fat_mount_options { - uid_t fs_uid; - gid_t fs_gid; - unsigned short fs_fmask; - unsigned short fs_dmask; - unsigned short codepage; /* Codepage for shortname conversions */ - char *iocharset; /* Charset used for filename input/display */ - unsigned short shortname; /* flags for shortname display/create rule */ - unsigned char name_check; /* r = relaxed, n = normal, s = strict */ - unsigned quiet:1, /* set = fake successful chmods and chowns */ - showexec:1, /* set = only set x bit for com/exe/bat */ - sys_immutable:1, /* set = system files are immutable */ - dotsOK:1, /* set = hidden and system files are named '.filename' */ - isvfat:1, /* 0=no vfat long filename support, 1=vfat support */ - utf8:1, /* Use of UTF-8 character set (Default) */ - unicode_xlate:1, /* create escape sequences for unhandled Unicode */ - numtail:1, /* Does first alias have a numeric '~1' type tail? */ - atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */ - flush:1, /* write things quickly */ - nocase:1; /* Does this need case conversion? 0=need case conversion*/ -}; - -#define FAT_HASH_BITS 8 -#define FAT_HASH_SIZE (1UL << FAT_HASH_BITS) -#define FAT_HASH_MASK (FAT_HASH_SIZE-1) - -/* - * MS-DOS file system in-core superblock data - */ -struct msdos_sb_info { - unsigned short sec_per_clus; /* sectors/cluster */ - unsigned short cluster_bits; /* log2(cluster_size) */ - unsigned int cluster_size; /* cluster size */ - unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */ - unsigned short fat_start; - unsigned long fat_length; /* FAT start & length (sec.) */ - unsigned long dir_start; - unsigned short dir_entries; /* root dir start & entries */ - unsigned long data_start; /* first data sector */ - unsigned long max_cluster; /* maximum cluster number */ - unsigned long root_cluster; /* first cluster of the root directory */ - unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */ - struct mutex fat_lock; - unsigned int prev_free; /* previously allocated cluster number */ - unsigned int free_clusters; /* -1 if undefined */ - struct fat_mount_options options; - struct nls_table *nls_disk; /* Codepage used on disk */ - struct nls_table *nls_io; /* Charset used for input and display */ - void *dir_ops; /* Opaque; default directory operations */ - int dir_per_block; /* dir entries per block */ - int dir_per_block_bits; /* log2(dir_per_block) */ - - int fatent_shift; - struct fatent_operations *fatent_ops; - - spinlock_t inode_hash_lock; - struct hlist_head inode_hashtable[FAT_HASH_SIZE]; -}; - -#define FAT_CACHE_VALID 0 /* special case for valid cache */ - -/* - * MS-DOS file system inode data in memory - */ -struct msdos_inode_info { - spinlock_t cache_lru_lock; - struct list_head cache_lru; - int nr_caches; - /* for avoiding the race between fat_free() and fat_get_cluster() */ - unsigned int cache_valid_id; - - loff_t mmu_private; - int i_start; /* first cluster or 0 */ - int i_logstart; /* logical first cluster */ - int i_attrs; /* unused attribute bits */ - loff_t i_pos; /* on-disk position of directory entry or 0 */ - struct hlist_node i_fat_hash; /* hash by i_location */ - struct inode vfs_inode; -}; - -static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb) -{ - return sb->s_fs_info; -} - -static inline struct msdos_inode_info *MSDOS_I(struct inode *inode) -{ - return container_of(inode, struct msdos_inode_info, vfs_inode); -} - -/* Return the FAT attribute byte for this inode */ -static inline u8 fat_attr(struct inode *inode) -{ - return ((inode->i_mode & S_IWUGO) ? ATTR_NONE : ATTR_RO) | - (S_ISDIR(inode->i_mode) ? ATTR_DIR : ATTR_NONE) | - MSDOS_I(inode)->i_attrs; -} - -static inline unsigned char fat_checksum(const __u8 *name) -{ - unsigned char s = name[0]; - s = (s<<7) + (s>>1) + name[1]; s = (s<<7) + (s>>1) + name[2]; - s = (s<<7) + (s>>1) + name[3]; s = (s<<7) + (s>>1) + name[4]; - s = (s<<7) + (s>>1) + name[5]; s = (s<<7) + (s>>1) + name[6]; - s = (s<<7) + (s>>1) + name[7]; s = (s<<7) + (s>>1) + name[8]; - s = (s<<7) + (s>>1) + name[9]; s = (s<<7) + (s>>1) + name[10]; - return s; -} - -static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus) -{ - return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus - + sbi->data_start; -} - -static inline void fat16_towchar(wchar_t *dst, const __u8 *src, size_t len) -{ -#ifdef __BIG_ENDIAN - while (len--) { - *dst++ = src[0] | (src[1] << 8); - src += 2; - } -#else - memcpy(dst, src, len * 2); -#endif -} - -static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) -{ -#ifdef __BIG_ENDIAN - while (len--) { - dst[0] = *src & 0x00FF; - dst[1] = (*src & 0xFF00) >> 8; - dst += 2; - src++; - } -#else - memcpy(dst, src, len * 2); -#endif -} - -/* fat/cache.c */ -extern void fat_cache_inval_inode(struct inode *inode); -extern int fat_get_cluster(struct inode *inode, int cluster, - int *fclus, int *dclus); -extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, - unsigned long *mapped_blocks); - -/* fat/dir.c */ -extern const struct file_operations fat_dir_operations; -extern int fat_search_long(struct inode *inode, const unsigned char *name, - int name_len, struct fat_slot_info *sinfo); -extern int fat_dir_empty(struct inode *dir); -extern int fat_subdirs(struct inode *dir); -extern int fat_scan(struct inode *dir, const unsigned char *name, - struct fat_slot_info *sinfo); -extern int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh, - struct msdos_dir_entry **de, loff_t *i_pos); -extern int fat_alloc_new_dir(struct inode *dir, struct timespec *ts); -extern int fat_add_entries(struct inode *dir, void *slots, int nr_slots, - struct fat_slot_info *sinfo); -extern int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo); - -/* fat/fatent.c */ -struct fat_entry { - int entry; - union { - u8 *ent12_p[2]; - __le16 *ent16_p; - __le32 *ent32_p; - } u; - int nr_bhs; - struct buffer_head *bhs[2]; -}; - -static inline void fatent_init(struct fat_entry *fatent) -{ - fatent->nr_bhs = 0; - fatent->entry = 0; - fatent->u.ent32_p = NULL; - fatent->bhs[0] = fatent->bhs[1] = NULL; -} - -static inline void fatent_set_entry(struct fat_entry *fatent, int entry) -{ - fatent->entry = entry; - fatent->u.ent32_p = NULL; -} - -static inline void fatent_brelse(struct fat_entry *fatent) -{ - int i; - fatent->u.ent32_p = NULL; - for (i = 0; i < fatent->nr_bhs; i++) - brelse(fatent->bhs[i]); - fatent->nr_bhs = 0; - fatent->bhs[0] = fatent->bhs[1] = NULL; -} - -extern void fat_ent_access_init(struct super_block *sb); -extern int fat_ent_read(struct inode *inode, struct fat_entry *fatent, - int entry); -extern int fat_ent_write(struct inode *inode, struct fat_entry *fatent, - int new, int wait); -extern int fat_alloc_clusters(struct inode *inode, int *cluster, - int nr_cluster); -extern int fat_free_clusters(struct inode *inode, int cluster); -extern int fat_count_free_clusters(struct super_block *sb); - -/* fat/file.c */ -extern int fat_generic_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); -extern const struct file_operations fat_file_operations; -extern struct inode_operations fat_file_inode_operations; -extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); -extern void fat_truncate(struct inode *inode); - -/* fat/inode.c */ -extern void fat_attach(struct inode *inode, loff_t i_pos); -extern void fat_detach(struct inode *inode); -extern struct inode *fat_iget(struct super_block *sb, loff_t i_pos); -extern struct inode *fat_build_inode(struct super_block *sb, - struct msdos_dir_entry *de, loff_t i_pos); -extern int fat_sync_inode(struct inode *inode); -extern int fat_fill_super(struct super_block *sb, void *data, int silent, - struct inode_operations *fs_dir_inode_ops, int isvfat); - -extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, - struct inode *i2); -/* fat/misc.c */ -extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); -extern void fat_clusters_flush(struct super_block *sb); -extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); -extern int date_dos2unix(unsigned short time, unsigned short date); -extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date); -extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); - -int fat_cache_init(void); -void fat_cache_destroy(void); - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/msg.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/msg.h 2007-05-24 15:40:44.000000000 +0200 @@ -61,37 +61,5 @@ #define __MSGSEG ((MSGPOOL*1024)/ MSGSSZ) /* max no. of segments */ #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) -#ifdef __KERNEL__ -#include - -/* one msg_msg structure for each message */ -struct msg_msg { - struct list_head m_list; - long m_type; - int m_ts; /* message text size */ - struct msg_msgseg* next; - void *security; - /* the actual message follows immediately */ -}; - -/* one msq_queue structure for each present queue on the system */ -struct msg_queue { - struct kern_ipc_perm q_perm; - int q_id; - time_t q_stime; /* last msgsnd time */ - time_t q_rtime; /* last msgrcv time */ - time_t q_ctime; /* last change time */ - unsigned long q_cbytes; /* current number of bytes on queue */ - unsigned long q_qnum; /* number of messages in queue */ - unsigned long q_qbytes; /* max number of bytes on queue */ - pid_t q_lspid; /* pid of last msgsnd */ - pid_t q_lrpid; /* last receive pid */ - - struct list_head q_messages; - struct list_head q_receivers; - struct list_head q_senders; -}; - -#endif /* __KERNEL__ */ #endif /* _LINUX_MSG_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/n_r3964.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/n_r3964.h 2007-05-24 15:40:44.000000000 +0200 @@ -50,31 +50,6 @@ /* line disciplines for r3964 protocol */ -#ifdef __KERNEL__ - -#include - -/* - * Common ascii handshake characters: - */ - -#define STX 0x02 -#define ETX 0x03 -#define DLE 0x10 -#define NAK 0x15 - -/* - * Timeouts (from milliseconds to jiffies) - */ - -#define R3964_TO_QVZ ((550)*HZ/1000) -#define R3964_TO_ZVZ ((220)*HZ/1000) -#define R3964_TO_NO_BUF ((400)*HZ/1000) -#define R3964_NO_TX_ROOM ((100)*HZ/1000) -#define R3964_TO_RX_PANIC ((4000)*HZ/1000) -#define R3964_MAX_RETRIES 5 - -#endif /* * Ioctl-commands @@ -99,36 +74,6 @@ /* * r3964 operation states: */ -#ifdef __KERNEL__ - -enum { R3964_IDLE, - R3964_TX_REQUEST, R3964_TRANSMITTING, - R3964_WAIT_ZVZ_BEFORE_TX_RETRY, R3964_WAIT_FOR_TX_ACK, - R3964_WAIT_FOR_RX_BUF, - R3964_RECEIVING, R3964_WAIT_FOR_BCC, R3964_WAIT_FOR_RX_REPEAT - }; - -/* - * All open file-handles are 'clients' and are stored in a linked list: - */ - -struct r3964_message; - -struct r3964_client_info { - spinlock_t lock; - pid_t pid; - unsigned int sig_flags; - - struct r3964_client_info *next; - - struct r3964_message *first_msg; - struct r3964_message *last_msg; - struct r3964_block_header *next_block_to_read; - int msg_count; -}; - - -#endif /* types for msg_id: */ enum {R3964_MSG_ACK=1, R3964_MSG_DATA }; @@ -150,83 +95,5 @@ #define R3964_MTU 256 -#ifdef __KERNEL__ - -struct r3964_block_header; - -/* internal version of client_message: */ -struct r3964_message { - int msg_id; - int arg; - int error_code; - struct r3964_block_header *block; - struct r3964_message *next; -}; - -/* - * Header of received block in rx_buf/tx_buf: - */ - -struct r3964_block_header -{ - unsigned int length; /* length in chars without header */ - unsigned char *data; /* usually data is located - immediately behind this struct */ - unsigned int locks; /* only used in rx_buffer */ - - struct r3964_block_header *next; - struct r3964_client_info *owner; /* =NULL in rx_buffer */ -}; - -/* - * If rx_buf hasn't enough space to store R3964_MTU chars, - * we will reject all incoming STX-requests by sending NAK. - */ - -#define RX_BUF_SIZE 4000 -#define TX_BUF_SIZE 4000 -#define R3964_MAX_BLOCKS_IN_RX_QUEUE 100 - -#define R3964_PARITY 0x0001 -#define R3964_FRAME 0x0002 -#define R3964_OVERRUN 0x0004 -#define R3964_UNKNOWN 0x0008 -#define R3964_BREAK 0x0010 -#define R3964_CHECKSUM 0x0020 -#define R3964_ERROR 0x003f -#define R3964_BCC 0x4000 -#define R3964_DEBUG 0x8000 - - -struct r3964_info { - spinlock_t lock; - struct tty_struct *tty; - unsigned char priority; - unsigned char *rx_buf; /* ring buffer */ - unsigned char *tx_buf; - - wait_queue_head_t read_wait; - //struct wait_queue *read_wait; - - struct r3964_block_header *rx_first; - struct r3964_block_header *rx_last; - struct r3964_block_header *tx_first; - struct r3964_block_header *tx_last; - unsigned int tx_position; - unsigned int rx_position; - unsigned char last_rx; - unsigned char bcc; - unsigned int blocks_in_rx_queue; - - - struct r3964_client_info *firstClient; - unsigned int state; - unsigned int flags; - - struct timer_list tmr; - int nRetry; -}; - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nbd.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nbd.h 2007-05-24 15:40:44.000000000 +0200 @@ -37,36 +37,6 @@ #define MAX_NBD 128 /* userspace doesn't need the nbd_device structure */ -#ifdef __KERNEL__ - -#include -#include - -/* values for flags field */ -#define NBD_READ_ONLY 0x0001 -#define NBD_WRITE_NOCHK 0x0002 - -struct request; - -struct nbd_device { - int flags; - int harderror; /* Code of hard error */ - struct socket * sock; - struct file * file; /* If == NULL, device is not ready, yet */ - int magic; - - spinlock_t queue_lock; - struct list_head queue_head;/* Requests are added here... */ - struct request *active_req; - wait_queue_head_t active_wq; - - struct mutex tx_lock; - struct gendisk *disk; - int blksize; - u64 bytesize; -}; - -#endif /* These are sent over the network in the request/reply magic fields */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ncp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ncp.h 2007-05-24 15:40:44.000000000 +0200 @@ -155,9 +155,6 @@ __u8 nameLen; __u8 entryName[256]; /* libncp may depend on there being nothing after entryName */ -#ifdef __KERNEL__ - struct nw_nfs_info nfs; -#endif } __attribute__((packed)); /* modify mask - use with MODIFY_DOS_INFO structure */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ncp_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ncp_fs.h 2007-05-24 15:40:44.000000000 +0200 @@ -23,7 +23,7 @@ struct ncp_ioctl_request { unsigned int function; unsigned int size; - char __user *data; + char *data; }; struct ncp_fs_info { @@ -87,13 +87,13 @@ #define NCP_AUTH_NDS 0x32 int auth_type; size_t object_name_len; - void __user * object_name; /* an userspace data, in most cases user name */ + void * object_name; /* an userspace data, in most cases user name */ }; struct ncp_privatedata_ioctl { size_t len; - void __user * data; /* ~1000 for NDS */ + void * data; /* ~1000 for NDS */ }; /* NLS charsets by ioctl */ @@ -143,127 +143,5 @@ #define NCP_MAXPATHLEN 255 #define NCP_MAXNAMELEN 14 -#ifdef __KERNEL__ - -#include -#include - -/* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */ -#undef PRINTK -/* define because it is easy to change PRINTK to {*}PRINTK */ -#define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) - -#undef NCPFS_PARANOIA -#ifdef NCPFS_PARANOIA -#define PPRINTK(format, args...) PRINTK(format , ## args) -#else -#define PPRINTK(format, args...) -#endif - -#ifndef DEBUG_NCP -#define DEBUG_NCP 0 -#endif -#if DEBUG_NCP > 0 -#define DPRINTK(format, args...) PRINTK(format , ## args) -#else -#define DPRINTK(format, args...) -#endif -#if DEBUG_NCP > 1 -#define DDPRINTK(format, args...) PRINTK(format , ## args) -#else -#define DDPRINTK(format, args...) -#endif - -#define NCP_MAX_RPC_TIMEOUT (6*HZ) - - -struct ncp_entry_info { - struct nw_info_struct i; - ino_t ino; - int opened; - int access; - unsigned int volume; - __u8 file_handle[6]; -}; - -static inline struct ncp_server *NCP_SBP(struct super_block *sb) -{ - return sb->s_fs_info; -} - -#define NCP_SERVER(inode) NCP_SBP((inode)->i_sb) -static inline struct ncp_inode_info *NCP_FINFO(struct inode *inode) -{ - return container_of(inode, struct ncp_inode_info, vfs_inode); -} - -/* linux/fs/ncpfs/inode.c */ -int ncp_notify_change(struct dentry *, struct iattr *); -struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *); -void ncp_update_inode(struct inode *, struct ncp_entry_info *); -void ncp_update_inode2(struct inode *, struct ncp_entry_info *); - -/* linux/fs/ncpfs/dir.c */ -extern struct inode_operations ncp_dir_inode_operations; -extern const struct file_operations ncp_dir_operations; -int ncp_conn_logged_in(struct super_block *); -int ncp_date_dos2unix(__le16 time, __le16 date); -void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); - -/* linux/fs/ncpfs/ioctl.c */ -int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long); -long ncp_compat_ioctl(struct file *, unsigned int, unsigned long); - -/* linux/fs/ncpfs/sock.c */ -int ncp_request2(struct ncp_server *server, int function, - void* reply, int max_reply_size); -static inline int ncp_request(struct ncp_server *server, int function) { - return ncp_request2(server, function, server->packet, server->packet_size); -} -int ncp_connect(struct ncp_server *server); -int ncp_disconnect(struct ncp_server *server); -void ncp_lock_server(struct ncp_server *server); -void ncp_unlock_server(struct ncp_server *server); - -/* linux/fs/ncpfs/file.c */ -extern struct inode_operations ncp_file_inode_operations; -extern const struct file_operations ncp_file_operations; -int ncp_make_open(struct inode *, int); - -/* linux/fs/ncpfs/mmap.c */ -int ncp_mmap(struct file *, struct vm_area_struct *); - -/* linux/fs/ncpfs/ncplib_kernel.c */ -int ncp_make_closed(struct inode *); - -#define ncp_namespace(i) (NCP_SERVER(i)->name_space[NCP_FINFO(i)->volNumber]) - -static inline int ncp_preserve_entry_case(struct inode *i, __u32 nscreator) -{ -#ifdef CONFIG_NCPFS_SMALLDOS - int ns = ncp_namespace(i); - - if ((ns == NW_NS_DOS) -#ifdef CONFIG_NCPFS_OS2_NS - || ((ns == NW_NS_OS2) && (nscreator == NW_NS_DOS)) -#endif /* CONFIG_NCPFS_OS2_NS */ - ) - return 0; -#endif /* CONFIG_NCPFS_SMALLDOS */ - return 1; -} - -#define ncp_preserve_case(i) (ncp_namespace(i) != NW_NS_DOS) - -static inline int ncp_case_sensitive(struct inode *i) -{ -#ifdef CONFIG_NCPFS_NFS_NS - return ncp_namespace(i) == NW_NS_NFS; -#else - return 0; -#endif /* CONFIG_NCPFS_NFS_NS */ -} - -#endif /* __KERNEL__ */ #endif /* _LINUX_NCP_FS_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ncp_mount.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ncp_mount.h 2007-05-24 15:40:44.000000000 +0200 @@ -68,26 +68,5 @@ #define NCP_MOUNT_VERSION_V5 (5) /* Text only */ -#ifdef __KERNEL__ - -struct ncp_mount_data_kernel { - unsigned long flags; /* NCP_MOUNT_* flags */ - unsigned int int_flags; /* internal flags */ -#define NCP_IMOUNT_LOGGEDIN_POSSIBLE 0x0001 - __kernel_uid32_t mounted_uid; /* Who may umount() this filesystem? */ - __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */ - unsigned int ncp_fd; /* The socket to the ncp port */ - unsigned int time_out; /* How long should I wait after - sending a NCP request? */ - unsigned int retry_count; /* And how often should I retry? */ - unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_mode_t file_mode; - __kernel_mode_t dir_mode; - int info_fd; -}; - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/net.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/net.h 2007-05-24 15:40:44.000000000 +0200 @@ -54,270 +54,4 @@ #define __SO_ACCEPTCON (1 << 16) /* performed a listen */ -#ifdef __KERNEL__ -#include -#include - -#define SOCK_ASYNC_NOSPACE 0 -#define SOCK_ASYNC_WAITDATA 1 -#define SOCK_NOSPACE 2 -#define SOCK_PASSCRED 3 -#define SOCK_PASSSEC 4 - -#ifndef ARCH_HAS_SOCKET_TYPES -/** - * enum sock_type - Socket types - * @SOCK_STREAM: stream (connection) socket - * @SOCK_DGRAM: datagram (conn.less) socket - * @SOCK_RAW: raw socket - * @SOCK_RDM: reliably-delivered message - * @SOCK_SEQPACKET: sequential packet socket - * @SOCK_DCCP: Datagram Congestion Control Protocol socket - * @SOCK_PACKET: linux specific way of getting packets at the dev level. - * For writing rarp and other similar things on the user level. - * - * When adding some new socket type please - * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS - * overrides this enum for binary compat reasons. - */ -enum sock_type { - SOCK_STREAM = 1, - SOCK_DGRAM = 2, - SOCK_RAW = 3, - SOCK_RDM = 4, - SOCK_SEQPACKET = 5, - SOCK_DCCP = 6, - SOCK_PACKET = 10, -}; - -#define SOCK_MAX (SOCK_PACKET + 1) - -#endif /* ARCH_HAS_SOCKET_TYPES */ - -/** - * struct socket - general BSD socket - * @state: socket state (%SS_CONNECTED, etc) - * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) - * @ops: protocol specific socket operations - * @fasync_list: Asynchronous wake up list - * @file: File back pointer for gc - * @sk: internal networking protocol agnostic socket representation - * @wait: wait queue for several uses - * @type: socket type (%SOCK_STREAM, etc) - */ -struct socket { - socket_state state; - unsigned long flags; - const struct proto_ops *ops; - struct fasync_struct *fasync_list; - struct file *file; - struct sock *sk; - wait_queue_head_t wait; - short type; -}; - -struct vm_area_struct; -struct page; -struct kiocb; -struct sockaddr; -struct msghdr; -struct module; - -struct proto_ops { - int family; - struct module *owner; - int (*release) (struct socket *sock); - int (*bind) (struct socket *sock, - struct sockaddr *myaddr, - int sockaddr_len); - int (*connect) (struct socket *sock, - struct sockaddr *vaddr, - int sockaddr_len, int flags); - int (*socketpair)(struct socket *sock1, - struct socket *sock2); - int (*accept) (struct socket *sock, - struct socket *newsock, int flags); - int (*getname) (struct socket *sock, - struct sockaddr *addr, - int *sockaddr_len, int peer); - unsigned int (*poll) (struct file *file, struct socket *sock, - struct poll_table_struct *wait); - int (*ioctl) (struct socket *sock, unsigned int cmd, - unsigned long arg); - int (*compat_ioctl) (struct socket *sock, unsigned int cmd, - unsigned long arg); - int (*listen) (struct socket *sock, int len); - int (*shutdown) (struct socket *sock, int flags); - int (*setsockopt)(struct socket *sock, int level, - int optname, char __user *optval, int optlen); - int (*getsockopt)(struct socket *sock, int level, - int optname, char __user *optval, int __user *optlen); - int (*compat_setsockopt)(struct socket *sock, int level, - int optname, char __user *optval, int optlen); - int (*compat_getsockopt)(struct socket *sock, int level, - int optname, char __user *optval, int __user *optlen); - int (*sendmsg) (struct kiocb *iocb, struct socket *sock, - struct msghdr *m, size_t total_len); - int (*recvmsg) (struct kiocb *iocb, struct socket *sock, - struct msghdr *m, size_t total_len, - int flags); - int (*mmap) (struct file *file, struct socket *sock, - struct vm_area_struct * vma); - ssize_t (*sendpage) (struct socket *sock, struct page *page, - int offset, size_t size, int flags); -}; - -struct net_proto_family { - int family; - int (*create)(struct socket *sock, int protocol); - struct module *owner; -}; - -struct iovec; -struct kvec; - -extern int sock_wake_async(struct socket *sk, int how, int band); -extern int sock_register(const struct net_proto_family *fam); -extern void sock_unregister(int family); -extern int sock_create(int family, int type, int proto, - struct socket **res); -extern int sock_create_kern(int family, int type, int proto, - struct socket **res); -extern int sock_create_lite(int family, int type, int proto, - struct socket **res); -extern void sock_release(struct socket *sock); -extern int sock_sendmsg(struct socket *sock, struct msghdr *msg, - size_t len); -extern int sock_recvmsg(struct socket *sock, struct msghdr *msg, - size_t size, int flags); -extern int sock_map_fd(struct socket *sock); -extern struct socket *sockfd_lookup(int fd, int *err); -#define sockfd_put(sock) fput(sock->file) -extern int net_ratelimit(void); - -#define net_random() random32() -#define net_srandom(seed) srandom32(seed) - -extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, - struct kvec *vec, size_t num, size_t len); -extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg, - struct kvec *vec, size_t num, - size_t len, int flags); - -extern int kernel_bind(struct socket *sock, struct sockaddr *addr, - int addrlen); -extern int kernel_listen(struct socket *sock, int backlog); -extern int kernel_accept(struct socket *sock, struct socket **newsock, - int flags); -extern int kernel_connect(struct socket *sock, struct sockaddr *addr, - int addrlen, int flags); -extern int kernel_getsockname(struct socket *sock, struct sockaddr *addr, - int *addrlen); -extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr, - int *addrlen); -extern int kernel_getsockopt(struct socket *sock, int level, int optname, - char *optval, int *optlen); -extern int kernel_setsockopt(struct socket *sock, int level, int optname, - char *optval, int optlen); -extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, - size_t size, int flags); -extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); - -#ifndef CONFIG_SMP -#define SOCKOPS_WRAPPED(name) name -#define SOCKOPS_WRAP(name, fam) -#else - -#define SOCKOPS_WRAPPED(name) __unlocked_##name - -#define SOCKCALL_WRAP(name, call, parms, args) \ -static int __lock_##name##_##call parms \ -{ \ - int ret; \ - lock_kernel(); \ - ret = __unlocked_##name##_ops.call args ;\ - unlock_kernel(); \ - return ret; \ -} - -#define SOCKCALL_UWRAP(name, call, parms, args) \ -static unsigned int __lock_##name##_##call parms \ -{ \ - int ret; \ - lock_kernel(); \ - ret = __unlocked_##name##_ops.call args ;\ - unlock_kernel(); \ - return ret; \ -} - - -#define SOCKOPS_WRAP(name, fam) \ -SOCKCALL_WRAP(name, release, (struct socket *sock), (sock)) \ -SOCKCALL_WRAP(name, bind, (struct socket *sock, struct sockaddr *uaddr, int addr_len), \ - (sock, uaddr, addr_len)) \ -SOCKCALL_WRAP(name, connect, (struct socket *sock, struct sockaddr * uaddr, \ - int addr_len, int flags), \ - (sock, uaddr, addr_len, flags)) \ -SOCKCALL_WRAP(name, socketpair, (struct socket *sock1, struct socket *sock2), \ - (sock1, sock2)) \ -SOCKCALL_WRAP(name, accept, (struct socket *sock, struct socket *newsock, \ - int flags), (sock, newsock, flags)) \ -SOCKCALL_WRAP(name, getname, (struct socket *sock, struct sockaddr *uaddr, \ - int *addr_len, int peer), (sock, uaddr, addr_len, peer)) \ -SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_table_struct *wait), \ - (file, sock, wait)) \ -SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \ - unsigned long arg), (sock, cmd, arg)) \ -SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \ - unsigned long arg), (sock, cmd, arg)) \ -SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ -SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ -SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ - char __user *optval, int optlen), (sock, level, optname, optval, optlen)) \ -SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \ - char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \ -SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \ - (iocb, sock, m, len)) \ -SOCKCALL_WRAP(name, recvmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len, int flags), \ - (iocb, sock, m, len, flags)) \ -SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \ - (file, sock, vma)) \ - \ -static const struct proto_ops name##_ops = { \ - .family = fam, \ - .owner = THIS_MODULE, \ - .release = __lock_##name##_release, \ - .bind = __lock_##name##_bind, \ - .connect = __lock_##name##_connect, \ - .socketpair = __lock_##name##_socketpair, \ - .accept = __lock_##name##_accept, \ - .getname = __lock_##name##_getname, \ - .poll = __lock_##name##_poll, \ - .ioctl = __lock_##name##_ioctl, \ - .compat_ioctl = __lock_##name##_compat_ioctl, \ - .listen = __lock_##name##_listen, \ - .shutdown = __lock_##name##_shutdown, \ - .setsockopt = __lock_##name##_setsockopt, \ - .getsockopt = __lock_##name##_getsockopt, \ - .sendmsg = __lock_##name##_sendmsg, \ - .recvmsg = __lock_##name##_recvmsg, \ - .mmap = __lock_##name##_mmap, \ -}; - -#endif - -#define MODULE_ALIAS_NETPROTO(proto) \ - MODULE_ALIAS("net-pf-" __stringify(proto)) - -#define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \ - MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto)) - -#ifdef CONFIG_SYSCTL -#include -extern ctl_table net_table[]; -extern int net_msg_cost; -extern int net_msg_burst; -#endif - -#endif /* __KERNEL__ */ #endif /* _LINUX_NET_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/netdevice.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netdevice.h 2007-05-24 15:40:44.000000000 +0200 @@ -29,47 +29,6 @@ #include #include -#ifdef __KERNEL__ -#include -#include -#include - -#include -#include -#include - -struct divert_blk; -struct vlan_group; -struct ethtool_ops; -struct netpoll_info; - /* source back-compat hooks */ -#define SET_ETHTOOL_OPS(netdev,ops) \ - ( (netdev)->ethtool_ops = (ops) ) - -#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev - functions are available. */ -#define HAVE_FREE_NETDEV /* free_netdev() */ -#define HAVE_NETDEV_PRIV /* netdev_priv() */ - -#define NET_XMIT_SUCCESS 0 -#define NET_XMIT_DROP 1 /* skb dropped */ -#define NET_XMIT_CN 2 /* congestion notification */ -#define NET_XMIT_POLICED 3 /* skb is shot by police */ -#define NET_XMIT_BYPASS 4 /* packet does not leave via dequeue; - (TC use only - dev_queue_xmit - returns this as NET_XMIT_SUCCESS) */ - -/* Backlog congestion levels */ -#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ -#define NET_RX_DROP 1 /* packet dropped */ -#define NET_RX_CN_LOW 2 /* storm alert, just in case */ -#define NET_RX_CN_MOD 3 /* Storm on its way! */ -#define NET_RX_CN_HIGH 4 /* The storm is here */ -#define NET_RX_BAD 5 /* packet dropped due to kernel error */ - -#define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) - -#endif #define MAX_ADDR_LEN 32 /* Largest hardware address length */ @@ -150,899 +109,5 @@ IF_PORT_100BASEFX }; -#ifdef __KERNEL__ - -#include -#include - -struct neighbour; -struct neigh_parms; -struct sk_buff; - -struct netif_rx_stats -{ - unsigned total; - unsigned dropped; - unsigned time_squeeze; - unsigned cpu_collision; -}; - -DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); - - -/* - * We tag multicasts with these structures. - */ - -struct dev_mc_list -{ - struct dev_mc_list *next; - __u8 dmi_addr[MAX_ADDR_LEN]; - unsigned char dmi_addrlen; - int dmi_users; - int dmi_gusers; -}; - -struct hh_cache -{ - struct hh_cache *hh_next; /* Next entry */ - atomic_t hh_refcnt; /* number of users */ - __be16 hh_type; /* protocol identifier, f.e ETH_P_IP - * NOTE: For VLANs, this will be the - * encapuslated type. --BLG - */ - int hh_len; /* length of header */ - int (*hh_output)(struct sk_buff *skb); - rwlock_t hh_lock; - - /* cached hardware header; allow for machine alignment needs. */ -#define HH_DATA_MOD 16 -#define HH_DATA_OFF(__len) \ - (HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1)) -#define HH_DATA_ALIGN(__len) \ - (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1)) - unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)]; -}; - -/* Reserve HH_DATA_MOD byte aligned hard_header_len, but at least that much. - * Alternative is: - * dev->hard_header_len ? (dev->hard_header_len + - * (HH_DATA_MOD - 1)) & ~(HH_DATA_MOD - 1) : 0 - * - * We could use other alignment values, but we must maintain the - * relationship HH alignment <= LL alignment. - */ -#define LL_RESERVED_SPACE(dev) \ - (((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) -#define LL_RESERVED_SPACE_EXTRA(dev,extra) \ - ((((dev)->hard_header_len+extra)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) - -/* These flag bits are private to the generic network queueing - * layer, they may not be explicitly referenced by any other - * code. - */ - -enum netdev_state_t -{ - __LINK_STATE_XOFF=0, - __LINK_STATE_START, - __LINK_STATE_PRESENT, - __LINK_STATE_SCHED, - __LINK_STATE_NOCARRIER, - __LINK_STATE_RX_SCHED, - __LINK_STATE_LINKWATCH_PENDING, - __LINK_STATE_DORMANT, - __LINK_STATE_QDISC_RUNNING, -}; - - -/* - * This structure holds at boot time configured netdevice settings. They - * are then used in the device probing. - */ -struct netdev_boot_setup { - char name[IFNAMSIZ]; - struct ifmap map; -}; -#define NETDEV_BOOT_SETUP_MAX 8 - -extern int __init netdev_boot_setup(char *str); - -/* - * The DEVICE structure. - * Actually, this whole structure is a big mistake. It mixes I/O - * data with strictly "high-level" data, and it has to know about - * almost every data structure used in the INET module. - * - * FIXME: cleanup struct net_device such that network protocol info - * moves out. - */ - -struct net_device -{ - - /* - * This is the first field of the "visible" part of this structure - * (i.e. as seen by users in the "Space.c" file). It is the name - * the interface. - */ - char name[IFNAMSIZ]; - /* device name hash chain */ - struct hlist_node name_hlist; - - /* - * I/O specific fields - * FIXME: Merge these and struct ifmap into one - */ - unsigned long mem_end; /* shared mem end */ - unsigned long mem_start; /* shared mem start */ - unsigned long base_addr; /* device I/O address */ - unsigned int irq; /* device IRQ number */ - - /* - * Some hardware also needs these fields, but they are not - * part of the usual set specified in Space.c. - */ - - unsigned char if_port; /* Selectable AUI, TP,..*/ - unsigned char dma; /* DMA channel */ - - unsigned long state; - - struct net_device *next; - - /* The device initialization function. Called only once. */ - int (*init)(struct net_device *dev); - - /* ------- Fields preinitialized in Space.c finish here ------- */ - - /* Net device features */ - unsigned long features; -#define NETIF_F_SG 1 /* Scatter/gather IO. */ -#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ -#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ -#define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */ -#define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ -#define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ -#define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */ -#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ -#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ -#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ -#define NETIF_F_GSO 2048 /* Enable software GSO. */ -#define NETIF_F_LLTX 4096 /* LockLess TX */ - - /* Segmentation offload features */ -#define NETIF_F_GSO_SHIFT 16 -#define NETIF_F_GSO_MASK 0xffff0000 -#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) -#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) -#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) -#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) -#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) - - /* List of features with software fallbacks. */ -#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) - -#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) -#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) - - struct net_device *next_sched; - - /* Interface index. Unique device identifier */ - int ifindex; - int iflink; - - - struct net_device_stats* (*get_stats)(struct net_device *dev); - - /* List of functions to handle Wireless Extensions (instead of ioctl). - * See for details. Jean II */ - const struct iw_handler_def * wireless_handlers; - /* Instance data managed by the core of Wireless Extensions. */ - struct iw_public_data * wireless_data; - - const struct ethtool_ops *ethtool_ops; - - /* - * This marks the end of the "visible" part of the structure. All - * fields hereafter are internal to the system, and may change at - * will (read: may be cleaned up at will). - */ - - - unsigned int flags; /* interface flags (a la BSD) */ - unsigned short gflags; - unsigned short priv_flags; /* Like 'flags' but invisible to userspace. */ - unsigned short padded; /* How much padding added by alloc_netdev() */ - - unsigned char operstate; /* RFC2863 operstate */ - unsigned char link_mode; /* mapping policy to operstate */ - - unsigned mtu; /* interface MTU value */ - unsigned short type; /* interface hardware type */ - unsigned short hard_header_len; /* hardware hdr length */ - - struct net_device *master; /* Pointer to master device of a group, - * which this device is member of. - */ - - /* Interface address info. */ - unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */ - unsigned char addr_len; /* hardware address length */ - unsigned short dev_id; /* for shared network cards */ - - struct dev_mc_list *mc_list; /* Multicast mac addresses */ - int mc_count; /* Number of installed mcasts */ - int promiscuity; - int allmulti; - - - /* Protocol specific pointers */ - - void *atalk_ptr; /* AppleTalk link */ - void *ip_ptr; /* IPv4 specific data */ - void *dn_ptr; /* DECnet specific data */ - void *ip6_ptr; /* IPv6 specific data */ - void *ec_ptr; /* Econet specific data */ - void *ax25_ptr; /* AX.25 specific data */ - -/* - * Cache line mostly used on receive path (including eth_type_trans()) - */ - struct list_head poll_list ____cacheline_aligned_in_smp; - /* Link to poll list */ - - int (*poll) (struct net_device *dev, int *quota); - int quota; - int weight; - unsigned long last_rx; /* Time of last Rx */ - /* Interface address info used in eth_type_trans() */ - unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast - because most packets are unicast) */ - - unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ - -/* - * Cache line mostly used on queue transmit path (qdisc) - */ - /* device queue lock */ - spinlock_t queue_lock ____cacheline_aligned_in_smp; - struct Qdisc *qdisc; - struct Qdisc *qdisc_sleeping; - struct list_head qdisc_list; - unsigned long tx_queue_len; /* Max frames per queue allowed */ - - /* Partially transmitted GSO packet. */ - struct sk_buff *gso_skb; - - /* ingress path synchronizer */ - spinlock_t ingress_lock; - struct Qdisc *qdisc_ingress; - -/* - * One part is mostly used on xmit path (device) - */ - /* hard_start_xmit synchronizer */ - spinlock_t _xmit_lock ____cacheline_aligned_in_smp; - /* cpu id of processor entered to hard_start_xmit or -1, - if nobody entered there. - */ - int xmit_lock_owner; - void *priv; /* pointer to private data */ - int (*hard_start_xmit) (struct sk_buff *skb, - struct net_device *dev); - /* These may be needed for future network-power-down code. */ - unsigned long trans_start; /* Time (in jiffies) of last Tx */ - - int watchdog_timeo; /* used by dev_watchdog() */ - struct timer_list watchdog_timer; - -/* - * refcnt is a very hot point, so align it on SMP - */ - /* Number of references to this device */ - atomic_t refcnt ____cacheline_aligned_in_smp; - - /* delayed register/unregister */ - struct list_head todo_list; - /* device index hash chain */ - struct hlist_node index_hlist; - - /* register/unregister state machine */ - enum { NETREG_UNINITIALIZED=0, - NETREG_REGISTERED, /* completed register_netdevice */ - NETREG_UNREGISTERING, /* called unregister_netdevice */ - NETREG_UNREGISTERED, /* completed unregister todo */ - NETREG_RELEASED, /* called free_netdev */ - } reg_state; - - /* Called after device is detached from network. */ - void (*uninit)(struct net_device *dev); - /* Called after last user reference disappears. */ - void (*destructor)(struct net_device *dev); - - /* Pointers to interface service routines. */ - int (*open)(struct net_device *dev); - int (*stop)(struct net_device *dev); -#define HAVE_NETDEV_POLL - int (*hard_header) (struct sk_buff *skb, - struct net_device *dev, - unsigned short type, - void *daddr, - void *saddr, - unsigned len); - int (*rebuild_header)(struct sk_buff *skb); -#define HAVE_MULTICAST - void (*set_multicast_list)(struct net_device *dev); -#define HAVE_SET_MAC_ADDR - int (*set_mac_address)(struct net_device *dev, - void *addr); -#define HAVE_PRIVATE_IOCTL - int (*do_ioctl)(struct net_device *dev, - struct ifreq *ifr, int cmd); -#define HAVE_SET_CONFIG - int (*set_config)(struct net_device *dev, - struct ifmap *map); -#define HAVE_HEADER_CACHE - int (*hard_header_cache)(struct neighbour *neigh, - struct hh_cache *hh); - void (*header_cache_update)(struct hh_cache *hh, - struct net_device *dev, - unsigned char * haddr); -#define HAVE_CHANGE_MTU - int (*change_mtu)(struct net_device *dev, int new_mtu); - -#define HAVE_TX_TIMEOUT - void (*tx_timeout) (struct net_device *dev); - - void (*vlan_rx_register)(struct net_device *dev, - struct vlan_group *grp); - void (*vlan_rx_add_vid)(struct net_device *dev, - unsigned short vid); - void (*vlan_rx_kill_vid)(struct net_device *dev, - unsigned short vid); - - int (*hard_header_parse)(struct sk_buff *skb, - unsigned char *haddr); - int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); -#ifdef CONFIG_NETPOLL - struct netpoll_info *npinfo; -#endif -#ifdef CONFIG_NET_POLL_CONTROLLER - void (*poll_controller)(struct net_device *dev); -#endif - - /* bridge stuff */ - struct net_bridge_port *br_port; - -#ifdef CONFIG_NET_DIVERT - /* this will get initialized at each interface type init routine */ - struct divert_blk *divert; -#endif /* CONFIG_NET_DIVERT */ - - /* class/net/name entry */ - struct class_device class_dev; - /* space for optional statistics and wireless sysfs groups */ - struct attribute_group *sysfs_groups[3]; -}; - -#define NETDEV_ALIGN 32 -#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) - -static inline void *netdev_priv(struct net_device *dev) -{ - return (char *)dev + ((sizeof(struct net_device) - + NETDEV_ALIGN_CONST) - & ~NETDEV_ALIGN_CONST); -} - -#define SET_MODULE_OWNER(dev) do { } while (0) -/* Set the sysfs physical device reference for the network logical device - * if set prior to registration will cause a symlink during initialization. - */ -#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) - -struct packet_type { - __be16 type; /* This is really htons(ether_type). */ - struct net_device *dev; /* NULL is wildcarded here */ - int (*func) (struct sk_buff *, - struct net_device *, - struct packet_type *, - struct net_device *); - struct sk_buff *(*gso_segment)(struct sk_buff *skb, - int features); - int (*gso_send_check)(struct sk_buff *skb); - void *af_packet_priv; - struct list_head list; -}; - -#include -#include - -extern struct net_device loopback_dev; /* The loopback */ -extern struct net_device *dev_base; /* All devices */ -extern rwlock_t dev_base_lock; /* Device list lock */ - -extern int netdev_boot_setup_check(struct net_device *dev); -extern unsigned long netdev_boot_base(const char *prefix, int unit); -extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr); -extern struct net_device *dev_getfirstbyhwtype(unsigned short type); -extern void dev_add_pack(struct packet_type *pt); -extern void dev_remove_pack(struct packet_type *pt); -extern void __dev_remove_pack(struct packet_type *pt); - -extern struct net_device *dev_get_by_flags(unsigned short flags, - unsigned short mask); -extern struct net_device *dev_get_by_name(const char *name); -extern struct net_device *__dev_get_by_name(const char *name); -extern int dev_alloc_name(struct net_device *dev, const char *name); -extern int dev_open(struct net_device *dev); -extern int dev_close(struct net_device *dev); -extern int dev_queue_xmit(struct sk_buff *skb); -extern int register_netdevice(struct net_device *dev); -extern int unregister_netdevice(struct net_device *dev); -extern void free_netdev(struct net_device *dev); -extern void synchronize_net(void); -extern int register_netdevice_notifier(struct notifier_block *nb); -extern int unregister_netdevice_notifier(struct notifier_block *nb); -extern int call_netdevice_notifiers(unsigned long val, void *v); -extern struct net_device *dev_get_by_index(int ifindex); -extern struct net_device *__dev_get_by_index(int ifindex); -extern int dev_restart(struct net_device *dev); -#ifdef CONFIG_NETPOLL_TRAP -extern int netpoll_trap(void); -#endif - -typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len); -extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf); -static inline int unregister_gifconf(unsigned int family) -{ - return register_gifconf(family, NULL); -} - -/* - * Incoming packets are placed on per-cpu queues so that - * no locking is needed. - */ - -struct softnet_data -{ - struct net_device *output_queue; - struct sk_buff_head input_pkt_queue; - struct list_head poll_list; - struct sk_buff *completion_queue; - - struct net_device backlog_dev; /* Sorry. 8) */ -#ifdef CONFIG_NET_DMA - struct dma_chan *net_dma; -#endif -}; - -DECLARE_PER_CPU(struct softnet_data,softnet_data); - -#define HAVE_NETIF_QUEUE - -extern void __netif_schedule(struct net_device *dev); - -static inline void netif_schedule(struct net_device *dev) -{ - if (!test_bit(__LINK_STATE_XOFF, &dev->state)) - __netif_schedule(dev); -} - -static inline void netif_start_queue(struct net_device *dev) -{ - clear_bit(__LINK_STATE_XOFF, &dev->state); -} - -static inline void netif_wake_queue(struct net_device *dev) -{ -#ifdef CONFIG_NETPOLL_TRAP - if (netpoll_trap()) - return; -#endif - if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) - __netif_schedule(dev); -} - -static inline void netif_stop_queue(struct net_device *dev) -{ -#ifdef CONFIG_NETPOLL_TRAP - if (netpoll_trap()) - return; -#endif - set_bit(__LINK_STATE_XOFF, &dev->state); -} - -static inline int netif_queue_stopped(const struct net_device *dev) -{ - return test_bit(__LINK_STATE_XOFF, &dev->state); -} - -static inline int netif_running(const struct net_device *dev) -{ - return test_bit(__LINK_STATE_START, &dev->state); -} - - -/* Use this variant when it is known for sure that it - * is executing from interrupt context. - */ -static inline void dev_kfree_skb_irq(struct sk_buff *skb) -{ - if (atomic_dec_and_test(&skb->users)) { - struct softnet_data *sd; - unsigned long flags; - - local_irq_save(flags); - sd = &__get_cpu_var(softnet_data); - skb->next = sd->completion_queue; - sd->completion_queue = skb; - raise_softirq_irqoff(NET_TX_SOFTIRQ); - local_irq_restore(flags); - } -} - -/* Use this variant in places where it could be invoked - * either from interrupt or non-interrupt context. - */ -extern void dev_kfree_skb_any(struct sk_buff *skb); - -#define HAVE_NETIF_RX 1 -extern int netif_rx(struct sk_buff *skb); -extern int netif_rx_ni(struct sk_buff *skb); -#define HAVE_NETIF_RECEIVE_SKB 1 -extern int netif_receive_skb(struct sk_buff *skb); -extern int dev_valid_name(const char *name); -extern int dev_ioctl(unsigned int cmd, void __user *); -extern int dev_ethtool(struct ifreq *); -extern unsigned dev_get_flags(const struct net_device *); -extern int dev_change_flags(struct net_device *, unsigned); -extern int dev_change_name(struct net_device *, char *); -extern int dev_set_mtu(struct net_device *, int); -extern int dev_set_mac_address(struct net_device *, - struct sockaddr *); -extern int dev_hard_start_xmit(struct sk_buff *skb, - struct net_device *dev); - -extern void dev_init(void); - -extern int netdev_budget; - -/* Called by rtnetlink.c:rtnl_unlock() */ -extern void netdev_run_todo(void); - -static inline void dev_put(struct net_device *dev) -{ - atomic_dec(&dev->refcnt); -} - -static inline void dev_hold(struct net_device *dev) -{ - atomic_inc(&dev->refcnt); -} - -/* Carrier loss detection, dial on demand. The functions netif_carrier_on - * and _off may be called from IRQ context, but it is caller - * who is responsible for serialization of these calls. - * - * The name carrier is inappropriate, these functions should really be - * called netif_lowerlayer_*() because they represent the state of any - * kind of lower layer not just hardware media. - */ - -extern void linkwatch_fire_event(struct net_device *dev); - -static inline int netif_carrier_ok(const struct net_device *dev) -{ - return !test_bit(__LINK_STATE_NOCARRIER, &dev->state); -} - -extern void __netdev_watchdog_up(struct net_device *dev); - -extern void netif_carrier_on(struct net_device *dev); - -extern void netif_carrier_off(struct net_device *dev); - -static inline void netif_dormant_on(struct net_device *dev) -{ - if (!test_and_set_bit(__LINK_STATE_DORMANT, &dev->state)) - linkwatch_fire_event(dev); -} - -static inline void netif_dormant_off(struct net_device *dev) -{ - if (test_and_clear_bit(__LINK_STATE_DORMANT, &dev->state)) - linkwatch_fire_event(dev); -} - -static inline int netif_dormant(const struct net_device *dev) -{ - return test_bit(__LINK_STATE_DORMANT, &dev->state); -} - - -static inline int netif_oper_up(const struct net_device *dev) { - return (dev->operstate == IF_OPER_UP || - dev->operstate == IF_OPER_UNKNOWN /* backward compat */); -} - -/* Hot-plugging. */ -static inline int netif_device_present(struct net_device *dev) -{ - return test_bit(__LINK_STATE_PRESENT, &dev->state); -} - -extern void netif_device_detach(struct net_device *dev); - -extern void netif_device_attach(struct net_device *dev); - -/* - * Network interface message level settings - */ -#define HAVE_NETIF_MSG 1 - -enum { - NETIF_MSG_DRV = 0x0001, - NETIF_MSG_PROBE = 0x0002, - NETIF_MSG_LINK = 0x0004, - NETIF_MSG_TIMER = 0x0008, - NETIF_MSG_IFDOWN = 0x0010, - NETIF_MSG_IFUP = 0x0020, - NETIF_MSG_RX_ERR = 0x0040, - NETIF_MSG_TX_ERR = 0x0080, - NETIF_MSG_TX_QUEUED = 0x0100, - NETIF_MSG_INTR = 0x0200, - NETIF_MSG_TX_DONE = 0x0400, - NETIF_MSG_RX_STATUS = 0x0800, - NETIF_MSG_PKTDATA = 0x1000, - NETIF_MSG_HW = 0x2000, - NETIF_MSG_WOL = 0x4000, -}; - -#define netif_msg_drv(p) ((p)->msg_enable & NETIF_MSG_DRV) -#define netif_msg_probe(p) ((p)->msg_enable & NETIF_MSG_PROBE) -#define netif_msg_link(p) ((p)->msg_enable & NETIF_MSG_LINK) -#define netif_msg_timer(p) ((p)->msg_enable & NETIF_MSG_TIMER) -#define netif_msg_ifdown(p) ((p)->msg_enable & NETIF_MSG_IFDOWN) -#define netif_msg_ifup(p) ((p)->msg_enable & NETIF_MSG_IFUP) -#define netif_msg_rx_err(p) ((p)->msg_enable & NETIF_MSG_RX_ERR) -#define netif_msg_tx_err(p) ((p)->msg_enable & NETIF_MSG_TX_ERR) -#define netif_msg_tx_queued(p) ((p)->msg_enable & NETIF_MSG_TX_QUEUED) -#define netif_msg_intr(p) ((p)->msg_enable & NETIF_MSG_INTR) -#define netif_msg_tx_done(p) ((p)->msg_enable & NETIF_MSG_TX_DONE) -#define netif_msg_rx_status(p) ((p)->msg_enable & NETIF_MSG_RX_STATUS) -#define netif_msg_pktdata(p) ((p)->msg_enable & NETIF_MSG_PKTDATA) -#define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) -#define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) - -static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) -{ - /* use default */ - if (debug_value < 0 || debug_value >= (sizeof(u32) * 8)) - return default_msg_enable_bits; - if (debug_value == 0) /* no output */ - return 0; - /* set low N bits */ - return (1 << debug_value) - 1; -} - -/* Test if receive needs to be scheduled */ -static inline int __netif_rx_schedule_prep(struct net_device *dev) -{ - return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); -} - -/* Test if receive needs to be scheduled but only if up */ -static inline int netif_rx_schedule_prep(struct net_device *dev) -{ - return netif_running(dev) && __netif_rx_schedule_prep(dev); -} - -/* Add interface to tail of rx poll list. This assumes that _prep has - * already been called and returned 1. - */ - -extern void __netif_rx_schedule(struct net_device *dev); - -/* Try to reschedule poll. Called by irq handler. */ - -static inline void netif_rx_schedule(struct net_device *dev) -{ - if (netif_rx_schedule_prep(dev)) - __netif_rx_schedule(dev); -} - -/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). - * Do not inline this? - */ -static inline int netif_rx_reschedule(struct net_device *dev, int undo) -{ - if (netif_rx_schedule_prep(dev)) { - unsigned long flags; - - dev->quota += undo; - - local_irq_save(flags); - list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list); - __raise_softirq_irqoff(NET_RX_SOFTIRQ); - local_irq_restore(flags); - return 1; - } - return 0; -} - -/* Remove interface from poll list: it must be in the poll list - * on current cpu. This primitive is called by dev->poll(), when - * it completes the work. The device cannot be out of poll list at this - * moment, it is BUG(). - */ -static inline void netif_rx_complete(struct net_device *dev) -{ - unsigned long flags; - - local_irq_save(flags); - BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state)); - list_del(&dev->poll_list); - smp_mb__before_clear_bit(); - clear_bit(__LINK_STATE_RX_SCHED, &dev->state); - local_irq_restore(flags); -} - -static inline void netif_poll_disable(struct net_device *dev) -{ - while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) - /* No hurry. */ - schedule_timeout_interruptible(1); -} - -static inline void netif_poll_enable(struct net_device *dev) -{ - clear_bit(__LINK_STATE_RX_SCHED, &dev->state); -} - -/* same as netif_rx_complete, except that local_irq_save(flags) - * has already been issued - */ -static inline void __netif_rx_complete(struct net_device *dev) -{ - BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state)); - list_del(&dev->poll_list); - smp_mb__before_clear_bit(); - clear_bit(__LINK_STATE_RX_SCHED, &dev->state); -} - -static inline void netif_tx_lock(struct net_device *dev) -{ - spin_lock(&dev->_xmit_lock); - dev->xmit_lock_owner = smp_processor_id(); -} - -static inline void netif_tx_lock_bh(struct net_device *dev) -{ - spin_lock_bh(&dev->_xmit_lock); - dev->xmit_lock_owner = smp_processor_id(); -} - -static inline int netif_tx_trylock(struct net_device *dev) -{ - int ok = spin_trylock(&dev->_xmit_lock); - if (likely(ok)) - dev->xmit_lock_owner = smp_processor_id(); - return ok; -} - -static inline void netif_tx_unlock(struct net_device *dev) -{ - dev->xmit_lock_owner = -1; - spin_unlock(&dev->_xmit_lock); -} - -static inline void netif_tx_unlock_bh(struct net_device *dev) -{ - dev->xmit_lock_owner = -1; - spin_unlock_bh(&dev->_xmit_lock); -} - -static inline void netif_tx_disable(struct net_device *dev) -{ - netif_tx_lock_bh(dev); - netif_stop_queue(dev); - netif_tx_unlock_bh(dev); -} - -/* These functions live elsewhere (drivers/net/net_init.c, but related) */ - -extern void ether_setup(struct net_device *dev); - -/* Support for loadable net-drivers */ -extern struct net_device *alloc_netdev(int sizeof_priv, const char *name, - void (*setup)(struct net_device *)); -extern int register_netdev(struct net_device *dev); -extern void unregister_netdev(struct net_device *dev); -/* Functions used for multicast support */ -extern void dev_mc_upload(struct net_device *dev); -extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); -extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); -extern void dev_mc_discard(struct net_device *dev); -extern void dev_set_promiscuity(struct net_device *dev, int inc); -extern void dev_set_allmulti(struct net_device *dev, int inc); -extern void netdev_state_change(struct net_device *dev); -extern void netdev_features_change(struct net_device *dev); -/* Load a device via the kmod */ -extern void dev_load(const char *name); -extern void dev_mcast_init(void); -extern int netdev_max_backlog; -extern int weight_p; -extern int netdev_set_master(struct net_device *dev, struct net_device *master); -extern int skb_checksum_help(struct sk_buff *skb); -extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features); -#ifdef CONFIG_BUG -extern void netdev_rx_csum_fault(struct net_device *dev); -#else -static inline void netdev_rx_csum_fault(struct net_device *dev) -{ -} -#endif -/* rx skb timestamps */ -extern void net_enable_timestamp(void); -extern void net_disable_timestamp(void); - -#ifdef CONFIG_PROC_FS -extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); -extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); -extern void dev_seq_stop(struct seq_file *seq, void *v); -#endif - -extern void linkwatch_run_queue(void); - -static inline int net_gso_ok(int features, int gso_type) -{ - int feature = gso_type << NETIF_F_GSO_SHIFT; - return (features & feature) == feature; -} - -static inline int skb_gso_ok(struct sk_buff *skb, int features) -{ - return net_gso_ok(features, skb_shinfo(skb)->gso_type); -} - -static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) -{ - return skb_is_gso(skb) && - (!skb_gso_ok(skb, dev->features) || - unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); -} - -/* On bonding slaves other than the currently active slave, suppress - * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and - * ARP on active-backup slaves with arp_validate enabled. - */ -static inline int skb_bond_should_drop(struct sk_buff *skb) -{ - struct net_device *dev = skb->dev; - struct net_device *master = dev->master; - - if (master && - (dev->priv_flags & IFF_SLAVE_INACTIVE)) { - if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && - skb->protocol == __constant_htons(ETH_P_ARP)) - return 0; - - if (master->priv_flags & IFF_MASTER_ALB) { - if (skb->pkt_type != PACKET_BROADCAST && - skb->pkt_type != PACKET_MULTICAST) - return 0; - } - if (master->priv_flags & IFF_MASTER_8023AD && - skb->protocol == __constant_htons(ETH_P_SLOW)) - return 0; - - return 1; - } - return 0; -} - -#endif /* __KERNEL__ */ #endif /* _LINUX_DEV_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/netfilter.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter.h 2007-05-24 15:40:44.000000000 +0200 @@ -1,16 +1,6 @@ #ifndef __LINUX_NETFILTER_H #define __LINUX_NETFILTER_H -#ifdef __KERNEL__ -#include -#include -#include -#include -#include -#include -#include -#endif -#include /* Responses from hook functions. */ #define NF_DROP 0 @@ -32,341 +22,9 @@ #define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE) /* only for userspace compatibility */ -#ifndef __KERNEL__ /* Generic cache responses from hook functions. <= 0x2000 is used for protocol-flags. */ #define NFC_UNKNOWN 0x4000 #define NFC_ALTERED 0x8000 -#endif -#ifdef __KERNEL__ -#ifdef CONFIG_NETFILTER - -extern void netfilter_init(void); - -/* Largest hook number + 1 */ -#define NF_MAX_HOOKS 8 - -struct sk_buff; -struct net_device; - -typedef unsigned int nf_hookfn(unsigned int hooknum, - struct sk_buff **skb, - const struct net_device *in, - const struct net_device *out, - int (*okfn)(struct sk_buff *)); - -struct nf_hook_ops -{ - struct list_head list; - - /* User fills in from here down. */ - nf_hookfn *hook; - struct module *owner; - int pf; - int hooknum; - /* Hooks are ordered in ascending priority. */ - int priority; -}; - -struct nf_sockopt_ops -{ - struct list_head list; - - int pf; - - /* Non-inclusive ranges: use 0/0/NULL to never get called. */ - int set_optmin; - int set_optmax; - int (*set)(struct sock *sk, int optval, void __user *user, unsigned int len); - int (*compat_set)(struct sock *sk, int optval, - void __user *user, unsigned int len); - - int get_optmin; - int get_optmax; - int (*get)(struct sock *sk, int optval, void __user *user, int *len); - int (*compat_get)(struct sock *sk, int optval, - void __user *user, int *len); - - /* Number of users inside set() or get(). */ - unsigned int use; - struct task_struct *cleanup_task; -}; - -/* Each queued (to userspace) skbuff has one of these. */ -struct nf_info -{ - /* The ops struct which sent us to userspace. */ - struct nf_hook_ops *elem; - - /* If we're sent to userspace, this keeps housekeeping info */ - int pf; - unsigned int hook; - struct net_device *indev, *outdev; - int (*okfn)(struct sk_buff *); -}; - -/* Function to register/unregister hook points. */ -int nf_register_hook(struct nf_hook_ops *reg); -void nf_unregister_hook(struct nf_hook_ops *reg); -int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n); -void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n); - -/* Functions to register get/setsockopt ranges (non-inclusive). You - need to check permissions yourself! */ -int nf_register_sockopt(struct nf_sockopt_ops *reg); -void nf_unregister_sockopt(struct nf_sockopt_ops *reg); - -extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS]; - -/* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will - * disappear once iptables is replaced with pkttables. Please DO NOT use them - * for any new code! */ -#define NF_LOG_TCPSEQ 0x01 /* Log TCP sequence numbers */ -#define NF_LOG_TCPOPT 0x02 /* Log TCP options */ -#define NF_LOG_IPOPT 0x04 /* Log IP options */ -#define NF_LOG_UID 0x08 /* Log UID owning local socket */ -#define NF_LOG_MASK 0x0f - -#define NF_LOG_TYPE_LOG 0x01 -#define NF_LOG_TYPE_ULOG 0x02 - -struct nf_loginfo { - u_int8_t type; - union { - struct { - u_int32_t copy_len; - u_int16_t group; - u_int16_t qthreshold; - } ulog; - struct { - u_int8_t level; - u_int8_t logflags; - } log; - } u; -}; - -typedef void nf_logfn(unsigned int pf, - unsigned int hooknum, - const struct sk_buff *skb, - const struct net_device *in, - const struct net_device *out, - const struct nf_loginfo *li, - const char *prefix); - -struct nf_logger { - struct module *me; - nf_logfn *logfn; - char *name; -}; - -/* Function to register/unregister log function. */ -int nf_log_register(int pf, struct nf_logger *logger); -int nf_log_unregister_pf(int pf); -void nf_log_unregister_logger(struct nf_logger *logger); - -/* Calls the registered backend logging function */ -void nf_log_packet(int pf, - unsigned int hooknum, - const struct sk_buff *skb, - const struct net_device *in, - const struct net_device *out, - struct nf_loginfo *li, - const char *fmt, ...); - -int nf_hook_slow(int pf, unsigned int hook, struct sk_buff **pskb, - struct net_device *indev, struct net_device *outdev, - int (*okfn)(struct sk_buff *), int thresh); - -/** - * nf_hook_thresh - call a netfilter hook - * - * Returns 1 if the hook has allowed the packet to pass. The function - * okfn must be invoked by the caller in this case. Any other return - * value indicates the packet has been consumed by the hook. - */ -static inline int nf_hook_thresh(int pf, unsigned int hook, - struct sk_buff **pskb, - struct net_device *indev, - struct net_device *outdev, - int (*okfn)(struct sk_buff *), int thresh, - int cond) -{ - if (!cond) - return 1; -#ifndef CONFIG_NETFILTER_DEBUG - if (list_empty(&nf_hooks[pf][hook])) - return 1; -#endif - return nf_hook_slow(pf, hook, pskb, indev, outdev, okfn, thresh); -} - -static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, - struct net_device *indev, struct net_device *outdev, - int (*okfn)(struct sk_buff *)) -{ - return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN, 1); -} - -/* Activate hook; either okfn or kfree_skb called, unless a hook - returns NF_STOLEN (in which case, it's up to the hook to deal with - the consequences). - - Returns -ERRNO if packet dropped. Zero means queued, stolen or - accepted. -*/ - -/* RR: - > I don't want nf_hook to return anything because people might forget - > about async and trust the return value to mean "packet was ok". - - AK: - Just document it clearly, then you can expect some sense from kernel - coders :) -*/ - -/* This is gross, but inline doesn't cut it for avoiding the function - call in fast path: gcc doesn't inline (needs value tracking?). --RR */ - -/* HX: It's slightly less gross now. */ - -#define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ -({int __ret; \ -if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh, 1)) == 1)\ - __ret = (okfn)(skb); \ -__ret;}) - -#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ -({int __ret; \ -if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, INT_MIN, cond)) == 1)\ - __ret = (okfn)(skb); \ -__ret;}) - -#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \ - NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN) - -/* Call setsockopt() */ -int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt, - int len); -int nf_getsockopt(struct sock *sk, int pf, int optval, char __user *opt, - int *len); - -int compat_nf_setsockopt(struct sock *sk, int pf, int optval, - char __user *opt, int len); -int compat_nf_getsockopt(struct sock *sk, int pf, int optval, - char __user *opt, int *len); - -/* Packet queuing */ -struct nf_queue_handler { - int (*outfn)(struct sk_buff *skb, struct nf_info *info, - unsigned int queuenum, void *data); - void *data; - char *name; -}; -extern int nf_register_queue_handler(int pf, - struct nf_queue_handler *qh); -extern int nf_unregister_queue_handler(int pf); -extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh); -extern void nf_reinject(struct sk_buff *skb, - struct nf_info *info, - unsigned int verdict); - -extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *); -extern void nf_ct_attach(struct sk_buff *, struct sk_buff *); - -/* FIXME: Before cache is ever used, this must be implemented for real. */ -extern void nf_invalidate_cache(int pf); - -/* Call this before modifying an existing packet: ensures it is - modifiable and linear to the point you care about (writable_len). - Returns true or false. */ -extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len); - -extern u_int16_t nf_csum_update(u_int32_t oldval, u_int32_t newval, - u_int32_t csum); -extern u_int16_t nf_proto_csum_update(struct sk_buff *skb, - u_int32_t oldval, u_int32_t newval, - u_int16_t csum, int pseudohdr); - -struct nf_afinfo { - unsigned short family; - unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook, - unsigned int dataoff, u_int8_t protocol); - void (*saveroute)(const struct sk_buff *skb, - struct nf_info *info); - int (*reroute)(struct sk_buff **skb, - const struct nf_info *info); - int route_key_size; -}; - -extern struct nf_afinfo *nf_afinfo[]; -static inline struct nf_afinfo *nf_get_afinfo(unsigned short family) -{ - return rcu_dereference(nf_afinfo[family]); -} - -static inline unsigned int -nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, - u_int8_t protocol, unsigned short family) -{ - struct nf_afinfo *afinfo; - unsigned int csum = 0; - - rcu_read_lock(); - afinfo = nf_get_afinfo(family); - if (afinfo) - csum = afinfo->checksum(skb, hook, dataoff, protocol); - rcu_read_unlock(); - return csum; -} - -extern int nf_register_afinfo(struct nf_afinfo *afinfo); -extern void nf_unregister_afinfo(struct nf_afinfo *afinfo); - -#define nf_info_reroute(x) ((void *)x + sizeof(struct nf_info)) - -#include -extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); - -static inline void -nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) -{ -#ifdef CONFIG_IP_NF_NAT_NEEDED - void (*decodefn)(struct sk_buff *, struct flowi *); - - if (family == AF_INET && (decodefn = ip_nat_decode_session) != NULL) - decodefn(skb, fl); -#endif -} - -#ifdef CONFIG_PROC_FS -#include -extern struct proc_dir_entry *proc_net_netfilter; -#endif - -#else /* !CONFIG_NETFILTER */ -#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) -#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) -static inline int nf_hook_thresh(int pf, unsigned int hook, - struct sk_buff **pskb, - struct net_device *indev, - struct net_device *outdev, - int (*okfn)(struct sk_buff *), int thresh, - int cond) -{ - return okfn(*pskb); -} -static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, - struct net_device *indev, struct net_device *outdev, - int (*okfn)(struct sk_buff *)) -{ - return 1; -} -static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} -struct flowi; -static inline void -nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) {} -#endif /*CONFIG_NETFILTER*/ - -#endif /*__KERNEL__*/ #endif /*__LINUX_NETFILTER_H*/ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/netfilter_bridge.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_bridge.h 2007-05-24 15:40:44.000000000 +0200 @@ -23,56 +23,4 @@ #define NF_BR_BROUTING 5 #define NF_BR_NUMHOOKS 6 -#ifdef __KERNEL__ - -enum nf_br_hook_priorities { - NF_BR_PRI_FIRST = INT_MIN, - NF_BR_PRI_NAT_DST_BRIDGED = -300, - NF_BR_PRI_FILTER_BRIDGED = -200, - NF_BR_PRI_BRNF = 0, - NF_BR_PRI_NAT_DST_OTHER = 100, - NF_BR_PRI_FILTER_OTHER = 200, - NF_BR_PRI_NAT_SRC = 300, - NF_BR_PRI_LAST = INT_MAX, -}; - -#ifdef CONFIG_BRIDGE_NETFILTER - -#define BRNF_PKT_TYPE 0x01 -#define BRNF_BRIDGED_DNAT 0x02 -#define BRNF_DONT_TAKE_PARENT 0x04 -#define BRNF_BRIDGED 0x08 -#define BRNF_NF_BRIDGE_PREROUTING 0x10 - - -/* Only used in br_forward.c */ -extern int nf_bridge_copy_header(struct sk_buff *skb); -static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) -{ - if (skb->nf_bridge) - return nf_bridge_copy_header(skb); - return 0; -} - -/* This is called by the IP fragmenting code and it ensures there is - * enough room for the encapsulating header (if there is one). */ -static inline int nf_bridge_pad(const struct sk_buff *skb) -{ - return (skb->nf_bridge && skb->protocol == htons(ETH_P_8021Q)) - ? VLAN_HLEN : 0; -} - -struct bridge_skb_cb { - union { - __u32 ipv4; - } daddr; -}; - -extern int brnf_deferred_hooks; -#else -#define nf_bridge_maybe_copy_header(skb) (0) -#define nf_bridge_pad(skb) (0) -#endif /* CONFIG_BRIDGE_NETFILTER */ - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/netfilter_decnet.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_decnet.h 2007-05-24 15:40:44.000000000 +0200 @@ -10,7 +10,6 @@ #include /* only for userspace compatibility */ -#ifndef __KERNEL__ /* IP Cache bits. */ /* Src IP address. */ #define NFC_DN_SRC 0x0001 @@ -20,7 +19,6 @@ #define NFC_DN_IF_IN 0x0004 /* Output device. */ #define NFC_DN_IF_OUT 0x0008 -#endif /* ! __KERNEL__ */ /* DECnet Hooks */ /* After promisc drops, checksum checks. */ @@ -56,11 +54,9 @@ #define NFDN_RTMSG(r) ((unsigned char *)(r) + NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg))) -#ifndef __KERNEL__ /* backwards compatibility for userspace */ #define DNRMG_L1_GROUP 0x01 #define DNRMG_L2_GROUP 0x02 -#endif enum { DNRNG_NLGRP_NONE, --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/netfilter_ipv4.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv4.h 2007-05-24 15:40:44.000000000 +0200 @@ -8,7 +8,6 @@ #include /* only for userspace compatibility */ -#ifndef __KERNEL__ /* IP Cache bits. */ /* Src IP address. */ #define NFC_IP_SRC 0x0001 @@ -36,7 +35,6 @@ #define NFC_IP_DST_PT 0x0400 /* Something else about the proto */ #define NFC_IP_PROTO_UNKNOWN 0x2000 -#endif /* ! __KERNEL__ */ /* IP Hooks */ /* After promisc drops, checksum checks. */ @@ -76,11 +74,5 @@ /* 2.4 firewalling went 64 through 67. */ #define SO_ORIGINAL_DST 80 -#ifdef __KERNEL__ -extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type); -extern int ip_xfrm_me_harder(struct sk_buff **pskb); -extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook, - unsigned int dataoff, u_int8_t protocol); -#endif /*__KERNEL__*/ #endif /*__LINUX_IP_NETFILTER_H*/ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/netfilter_ipv6.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netfilter_ipv6.h 2007-05-24 15:40:44.000000000 +0200 @@ -11,7 +11,6 @@ #include /* only for userspace compatibility */ -#ifndef __KERNEL__ /* IP Cache bits. */ /* Src IP address. */ #define NFC_IP6_SRC 0x0001 @@ -40,7 +39,6 @@ #define NFC_IP6_DST_PT 0x0400 /* Something else about the proto */ #define NFC_IP6_PROTO_UNKNOWN 0x2000 -#endif /* ! __KERNEL__ */ /* IP6 Hooks */ @@ -80,8 +78,8 @@ extern int ipv6_netfilter_init(void); extern void ipv6_netfilter_fini(void); #else /* CONFIG_NETFILTER */ -static inline int ipv6_netfilter_init(void) { return 0; } -static inline void ipv6_netfilter_fini(void) { return; } +static __inline__ int ipv6_netfilter_init(void) { return 0; } +static __inline__ void ipv6_netfilter_fini(void) { return; } #endif /* CONFIG_NETFILTER */ #endif /*__LINUX_IP6_NETFILTER_H*/ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/netlink.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/netlink.h 2007-05-24 15:40:44.000000000 +0200 @@ -132,112 +132,5 @@ #define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) #define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) -#ifdef __KERNEL__ - -#include -#include - -struct netlink_skb_parms -{ - struct ucred creds; /* Skb credentials */ - __u32 pid; - __u32 dst_pid; - __u32 dst_group; - kernel_cap_t eff_cap; - __u32 loginuid; /* Login (audit) uid */ - __u32 sid; /* SELinux security id */ -}; - -#define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) -#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) - - -extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*input)(struct sock *sk, int len), struct module *module); -extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); -extern int netlink_has_listeners(struct sock *sk, unsigned int group); -extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); -extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, - __u32 group, gfp_t allocation); -extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); -extern int netlink_register_notifier(struct notifier_block *nb); -extern int netlink_unregister_notifier(struct notifier_block *nb); - -/* finegrained unicast helpers: */ -struct sock *netlink_getsockbyfilp(struct file *filp); -int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, - long timeo, struct sock *ssk); -void netlink_detachskb(struct sock *sk, struct sk_buff *skb); -int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); - -/* - * skb should fit one page. This choice is good for headerless malloc. - */ -#define NLMSG_GOODORDER 0 -#define NLMSG_GOODSIZE (SKB_MAX_ORDER(0, NLMSG_GOODORDER)) - - -struct netlink_callback -{ - struct sk_buff *skb; - struct nlmsghdr *nlh; - int (*dump)(struct sk_buff * skb, struct netlink_callback *cb); - int (*done)(struct netlink_callback *cb); - int family; - long args[5]; -}; - -struct netlink_notify -{ - int pid; - int protocol; -}; - -static __inline__ struct nlmsghdr * -__nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) -{ - struct nlmsghdr *nlh; - int size = NLMSG_LENGTH(len); - - nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size)); - nlh->nlmsg_type = type; - nlh->nlmsg_len = size; - nlh->nlmsg_flags = flags; - nlh->nlmsg_pid = pid; - nlh->nlmsg_seq = seq; - memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size); - return nlh; -} - -#define NLMSG_NEW(skb, pid, seq, type, len, flags) \ -({ if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) \ - goto nlmsg_failure; \ - __nlmsg_put(skb, pid, seq, type, len, flags); }) - -#define NLMSG_PUT(skb, pid, seq, type, len) \ - NLMSG_NEW(skb, pid, seq, type, len, 0) - -#define NLMSG_NEW_ANSWER(skb, cb, type, len, flags) \ - NLMSG_NEW(skb, NETLINK_CB((cb)->skb).pid, \ - (cb)->nlh->nlmsg_seq, type, len, flags) - -#define NLMSG_END(skb, nlh) \ -({ (nlh)->nlmsg_len = (skb)->tail - (unsigned char *) (nlh); \ - (skb)->len; }) - -#define NLMSG_CANCEL(skb, nlh) \ -({ skb_trim(skb, (unsigned char *) (nlh) - (skb)->data); \ - -1; }) - -extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, - struct nlmsghdr *nlh, - int (*dump)(struct sk_buff *skb, struct netlink_callback*), - int (*done)(struct netlink_callback*)); - - -#define NL_NONROOT_RECV 0x1 -#define NL_NONROOT_SEND 0x2 -extern void netlink_set_nonroot(int protocol, unsigned flag); - -#endif /* __KERNEL__ */ #endif /* __LINUX_NETLINK_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nfs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nfs.h 2007-05-24 15:40:44.000000000 +0200 @@ -126,46 +126,4 @@ NFFIFO = 8 }; -#ifdef __KERNEL__ -#include -#include - -/* - * This is the kernel NFS client file handle representation - */ -#define NFS_MAXFHSIZE 128 -struct nfs_fh { - unsigned short size; - unsigned char data[NFS_MAXFHSIZE]; -}; - -/* - * Returns a zero iff the size and data fields match. - * Checks only "size" bytes in the data field. - */ -static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b) -{ - return a->size != b->size || memcmp(a->data, b->data, a->size) != 0; -} - -static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source) -{ - target->size = source->size; - memcpy(target->data, source->data, source->size); -} - - -/* - * This is really a general kernel constant, but since nothing like - * this is defined in the kernel headers, I have to do it here. - */ -#define NFS_OFFSET_MAX ((__s64)((~(__u64)0) >> 1)) - - -enum nfs3_stable_how { - NFS_UNSTABLE = 0, - NFS_DATA_SYNC = 1, - NFS_FILE_SYNC = 2 -}; -#endif /* __KERNEL__ */ #endif /* _LINUX_NFS_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nfs4.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nfs4.h 2007-05-24 15:40:44.000000000 +0200 @@ -96,304 +96,6 @@ NFS4_ACL_WHO_EVERYONE, }; -#ifdef __KERNEL__ -#include - -struct nfs4_ace { - uint32_t type; - uint32_t flag; - uint32_t access_mask; - int whotype; - uid_t who; - struct list_head l_ace; -}; - -struct nfs4_acl { - uint32_t naces; - struct list_head ace_head; -}; - -typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; -typedef struct { char data[16]; } nfs4_stateid; - -enum nfs_opnum4 { - OP_ACCESS = 3, - OP_CLOSE = 4, - OP_COMMIT = 5, - OP_CREATE = 6, - OP_DELEGPURGE = 7, - OP_DELEGRETURN = 8, - OP_GETATTR = 9, - OP_GETFH = 10, - OP_LINK = 11, - OP_LOCK = 12, - OP_LOCKT = 13, - OP_LOCKU = 14, - OP_LOOKUP = 15, - OP_LOOKUPP = 16, - OP_NVERIFY = 17, - OP_OPEN = 18, - OP_OPENATTR = 19, - OP_OPEN_CONFIRM = 20, - OP_OPEN_DOWNGRADE = 21, - OP_PUTFH = 22, - OP_PUTPUBFH = 23, - OP_PUTROOTFH = 24, - OP_READ = 25, - OP_READDIR = 26, - OP_READLINK = 27, - OP_REMOVE = 28, - OP_RENAME = 29, - OP_RENEW = 30, - OP_RESTOREFH = 31, - OP_SAVEFH = 32, - OP_SECINFO = 33, - OP_SETATTR = 34, - OP_SETCLIENTID = 35, - OP_SETCLIENTID_CONFIRM = 36, - OP_VERIFY = 37, - OP_WRITE = 38, - OP_RELEASE_LOCKOWNER = 39, - OP_ILLEGAL = 10044, -}; - -/*Defining first and last NFS4 operations implemented. -Needs to be updated if more operations are defined in future.*/ - -#define FIRST_NFS4_OP OP_ACCESS -#define LAST_NFS4_OP OP_RELEASE_LOCKOWNER - -enum nfsstat4 { - NFS4_OK = 0, - NFS4ERR_PERM = 1, - NFS4ERR_NOENT = 2, - NFS4ERR_IO = 5, - NFS4ERR_NXIO = 6, - NFS4ERR_ACCESS = 13, - NFS4ERR_EXIST = 17, - NFS4ERR_XDEV = 18, - /* Unused/reserved 19 */ - NFS4ERR_NOTDIR = 20, - NFS4ERR_ISDIR = 21, - NFS4ERR_INVAL = 22, - NFS4ERR_FBIG = 27, - NFS4ERR_NOSPC = 28, - NFS4ERR_ROFS = 30, - NFS4ERR_MLINK = 31, - NFS4ERR_NAMETOOLONG = 63, - NFS4ERR_NOTEMPTY = 66, - NFS4ERR_DQUOT = 69, - NFS4ERR_STALE = 70, - NFS4ERR_BADHANDLE = 10001, - NFS4ERR_BAD_COOKIE = 10003, - NFS4ERR_NOTSUPP = 10004, - NFS4ERR_TOOSMALL = 10005, - NFS4ERR_SERVERFAULT = 10006, - NFS4ERR_BADTYPE = 10007, - NFS4ERR_DELAY = 10008, - NFS4ERR_SAME = 10009, - NFS4ERR_DENIED = 10010, - NFS4ERR_EXPIRED = 10011, - NFS4ERR_LOCKED = 10012, - NFS4ERR_GRACE = 10013, - NFS4ERR_FHEXPIRED = 10014, - NFS4ERR_SHARE_DENIED = 10015, - NFS4ERR_WRONGSEC = 10016, - NFS4ERR_CLID_INUSE = 10017, - NFS4ERR_RESOURCE = 10018, - NFS4ERR_MOVED = 10019, - NFS4ERR_NOFILEHANDLE = 10020, - NFS4ERR_MINOR_VERS_MISMATCH = 10021, - NFS4ERR_STALE_CLIENTID = 10022, - NFS4ERR_STALE_STATEID = 10023, - NFS4ERR_OLD_STATEID = 10024, - NFS4ERR_BAD_STATEID = 10025, - NFS4ERR_BAD_SEQID = 10026, - NFS4ERR_NOT_SAME = 10027, - NFS4ERR_LOCK_RANGE = 10028, - NFS4ERR_SYMLINK = 10029, - NFS4ERR_RESTOREFH = 10030, - NFS4ERR_LEASE_MOVED = 10031, - NFS4ERR_ATTRNOTSUPP = 10032, - NFS4ERR_NO_GRACE = 10033, - NFS4ERR_RECLAIM_BAD = 10034, - NFS4ERR_RECLAIM_CONFLICT = 10035, - NFS4ERR_BADXDR = 10036, - NFS4ERR_LOCKS_HELD = 10037, - NFS4ERR_OPENMODE = 10038, - NFS4ERR_BADOWNER = 10039, - NFS4ERR_BADCHAR = 10040, - NFS4ERR_BADNAME = 10041, - NFS4ERR_BAD_RANGE = 10042, - NFS4ERR_LOCK_NOTSUPP = 10043, - NFS4ERR_OP_ILLEGAL = 10044, - NFS4ERR_DEADLOCK = 10045, - NFS4ERR_FILE_OPEN = 10046, - NFS4ERR_ADMIN_REVOKED = 10047, - NFS4ERR_CB_PATH_DOWN = 10048 -}; - -/* - * Note: NF4BAD is not actually part of the protocol; it is just used - * internally by nfsd. - */ -enum nfs_ftype4 { - NF4BAD = 0, - NF4REG = 1, /* Regular File */ - NF4DIR = 2, /* Directory */ - NF4BLK = 3, /* Special File - block device */ - NF4CHR = 4, /* Special File - character device */ - NF4LNK = 5, /* Symbolic Link */ - NF4SOCK = 6, /* Special File - socket */ - NF4FIFO = 7, /* Special File - fifo */ - NF4ATTRDIR = 8, /* Attribute Directory */ - NF4NAMEDATTR = 9 /* Named Attribute */ -}; - -enum open_claim_type4 { - NFS4_OPEN_CLAIM_NULL = 0, - NFS4_OPEN_CLAIM_PREVIOUS = 1, - NFS4_OPEN_CLAIM_DELEGATE_CUR = 2, - NFS4_OPEN_CLAIM_DELEGATE_PREV = 3 -}; - -enum opentype4 { - NFS4_OPEN_NOCREATE = 0, - NFS4_OPEN_CREATE = 1 -}; - -enum createmode4 { - NFS4_CREATE_UNCHECKED = 0, - NFS4_CREATE_GUARDED = 1, - NFS4_CREATE_EXCLUSIVE = 2 -}; - -enum limit_by4 { - NFS4_LIMIT_SIZE = 1, - NFS4_LIMIT_BLOCKS = 2 -}; - -enum open_delegation_type4 { - NFS4_OPEN_DELEGATE_NONE = 0, - NFS4_OPEN_DELEGATE_READ = 1, - NFS4_OPEN_DELEGATE_WRITE = 2 -}; - -enum lock_type4 { - NFS4_UNLOCK_LT = 0, - NFS4_READ_LT = 1, - NFS4_WRITE_LT = 2, - NFS4_READW_LT = 3, - NFS4_WRITEW_LT = 4 -}; - - -/* Mandatory Attributes */ -#define FATTR4_WORD0_SUPPORTED_ATTRS (1UL << 0) -#define FATTR4_WORD0_TYPE (1UL << 1) -#define FATTR4_WORD0_FH_EXPIRE_TYPE (1UL << 2) -#define FATTR4_WORD0_CHANGE (1UL << 3) -#define FATTR4_WORD0_SIZE (1UL << 4) -#define FATTR4_WORD0_LINK_SUPPORT (1UL << 5) -#define FATTR4_WORD0_SYMLINK_SUPPORT (1UL << 6) -#define FATTR4_WORD0_NAMED_ATTR (1UL << 7) -#define FATTR4_WORD0_FSID (1UL << 8) -#define FATTR4_WORD0_UNIQUE_HANDLES (1UL << 9) -#define FATTR4_WORD0_LEASE_TIME (1UL << 10) -#define FATTR4_WORD0_RDATTR_ERROR (1UL << 11) - -/* Recommended Attributes */ -#define FATTR4_WORD0_ACL (1UL << 12) -#define FATTR4_WORD0_ACLSUPPORT (1UL << 13) -#define FATTR4_WORD0_ARCHIVE (1UL << 14) -#define FATTR4_WORD0_CANSETTIME (1UL << 15) -#define FATTR4_WORD0_CASE_INSENSITIVE (1UL << 16) -#define FATTR4_WORD0_CASE_PRESERVING (1UL << 17) -#define FATTR4_WORD0_CHOWN_RESTRICTED (1UL << 18) -#define FATTR4_WORD0_FILEHANDLE (1UL << 19) -#define FATTR4_WORD0_FILEID (1UL << 20) -#define FATTR4_WORD0_FILES_AVAIL (1UL << 21) -#define FATTR4_WORD0_FILES_FREE (1UL << 22) -#define FATTR4_WORD0_FILES_TOTAL (1UL << 23) -#define FATTR4_WORD0_FS_LOCATIONS (1UL << 24) -#define FATTR4_WORD0_HIDDEN (1UL << 25) -#define FATTR4_WORD0_HOMOGENEOUS (1UL << 26) -#define FATTR4_WORD0_MAXFILESIZE (1UL << 27) -#define FATTR4_WORD0_MAXLINK (1UL << 28) -#define FATTR4_WORD0_MAXNAME (1UL << 29) -#define FATTR4_WORD0_MAXREAD (1UL << 30) -#define FATTR4_WORD0_MAXWRITE (1UL << 31) -#define FATTR4_WORD1_MIMETYPE (1UL << 0) -#define FATTR4_WORD1_MODE (1UL << 1) -#define FATTR4_WORD1_NO_TRUNC (1UL << 2) -#define FATTR4_WORD1_NUMLINKS (1UL << 3) -#define FATTR4_WORD1_OWNER (1UL << 4) -#define FATTR4_WORD1_OWNER_GROUP (1UL << 5) -#define FATTR4_WORD1_QUOTA_HARD (1UL << 6) -#define FATTR4_WORD1_QUOTA_SOFT (1UL << 7) -#define FATTR4_WORD1_QUOTA_USED (1UL << 8) -#define FATTR4_WORD1_RAWDEV (1UL << 9) -#define FATTR4_WORD1_SPACE_AVAIL (1UL << 10) -#define FATTR4_WORD1_SPACE_FREE (1UL << 11) -#define FATTR4_WORD1_SPACE_TOTAL (1UL << 12) -#define FATTR4_WORD1_SPACE_USED (1UL << 13) -#define FATTR4_WORD1_SYSTEM (1UL << 14) -#define FATTR4_WORD1_TIME_ACCESS (1UL << 15) -#define FATTR4_WORD1_TIME_ACCESS_SET (1UL << 16) -#define FATTR4_WORD1_TIME_BACKUP (1UL << 17) -#define FATTR4_WORD1_TIME_CREATE (1UL << 18) -#define FATTR4_WORD1_TIME_DELTA (1UL << 19) -#define FATTR4_WORD1_TIME_METADATA (1UL << 20) -#define FATTR4_WORD1_TIME_MODIFY (1UL << 21) -#define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22) -#define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23) - -#define NFSPROC4_NULL 0 -#define NFSPROC4_COMPOUND 1 -#define NFS4_MINOR_VERSION 0 -#define NFS4_DEBUG 1 - -/* Index of predefined Linux client operations */ - -enum { - NFSPROC4_CLNT_NULL = 0, /* Unused */ - NFSPROC4_CLNT_READ, - NFSPROC4_CLNT_WRITE, - NFSPROC4_CLNT_COMMIT, - NFSPROC4_CLNT_OPEN, - NFSPROC4_CLNT_OPEN_CONFIRM, - NFSPROC4_CLNT_OPEN_NOATTR, - NFSPROC4_CLNT_OPEN_DOWNGRADE, - NFSPROC4_CLNT_CLOSE, - NFSPROC4_CLNT_SETATTR, - NFSPROC4_CLNT_FSINFO, - NFSPROC4_CLNT_RENEW, - NFSPROC4_CLNT_SETCLIENTID, - NFSPROC4_CLNT_SETCLIENTID_CONFIRM, - NFSPROC4_CLNT_LOCK, - NFSPROC4_CLNT_LOCKT, - NFSPROC4_CLNT_LOCKU, - NFSPROC4_CLNT_ACCESS, - NFSPROC4_CLNT_GETATTR, - NFSPROC4_CLNT_LOOKUP, - NFSPROC4_CLNT_LOOKUP_ROOT, - NFSPROC4_CLNT_REMOVE, - NFSPROC4_CLNT_RENAME, - NFSPROC4_CLNT_LINK, - NFSPROC4_CLNT_SYMLINK, - NFSPROC4_CLNT_CREATE, - NFSPROC4_CLNT_PATHCONF, - NFSPROC4_CLNT_STATFS, - NFSPROC4_CLNT_READLINK, - NFSPROC4_CLNT_READDIR, - NFSPROC4_CLNT_SERVER_CAPS, - NFSPROC4_CLNT_DELEGRETURN, - NFSPROC4_CLNT_GETACL, - NFSPROC4_CLNT_SETACL, - NFSPROC4_CLNT_FS_LOCATIONS, -}; - -#endif #endif /* --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nfs_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nfs_fs.h 2007-05-24 15:40:44.000000000 +0200 @@ -34,540 +34,6 @@ #define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */ #define FLUSH_INVALIDATE 64 /* Invalidate the page cache */ -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include - -/* - * These are the default flags for swap requests - */ -#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) - -/* - * NFSv3/v4 Access mode cache entry - */ -struct nfs_access_entry { - struct rb_node rb_node; - struct list_head lru; - unsigned long jiffies; - struct rpc_cred * cred; - int mask; -}; - -struct nfs4_state; -struct nfs_open_context { - atomic_t count; - struct vfsmount *vfsmnt; - struct dentry *dentry; - struct rpc_cred *cred; - struct nfs4_state *state; - fl_owner_t lockowner; - int mode; - int error; - - struct list_head list; - - __u64 dir_cookie; -}; - -/* - * NFSv4 delegation - */ -struct nfs_delegation; - -struct posix_acl; - -/* - * nfs fs inode data in memory - */ -struct nfs_inode { - /* - * The 64bit 'inode number' - */ - __u64 fileid; - - /* - * NFS file handle - */ - struct nfs_fh fh; - - /* - * Various flags - */ - unsigned long flags; /* atomic bit ops */ - unsigned long cache_validity; /* bit mask */ - - /* - * read_cache_jiffies is when we started read-caching this inode. - * attrtimeo is for how long the cached information is assumed - * to be valid. A successful attribute revalidation doubles - * attrtimeo (up to acregmax/acdirmax), a failure resets it to - * acregmin/acdirmin. - * - * We need to revalidate the cached attrs for this inode if - * - * jiffies - read_cache_jiffies > attrtimeo - */ - unsigned long read_cache_jiffies; - unsigned long attrtimeo; - unsigned long attrtimeo_timestamp; - __u64 change_attr; /* v4 only */ - - unsigned long last_updated; - /* "Generation counter" for the attribute cache. This is - * bumped whenever we update the metadata on the - * server. - */ - unsigned long cache_change_attribute; - /* - * Counter indicating the number of outstanding requests that - * will cause a file data update. - */ - atomic_t data_updates; - - struct rb_root access_cache; - struct list_head access_cache_entry_lru; - struct list_head access_cache_inode_lru; -#ifdef CONFIG_NFS_V3_ACL - struct posix_acl *acl_access; - struct posix_acl *acl_default; -#endif - - /* - * This is the cookie verifier used for NFSv3 readdir - * operations - */ - __be32 cookieverf[2]; - - /* - * This is the list of dirty unwritten pages. - */ - spinlock_t req_lock; - struct list_head dirty; - struct list_head commit; - struct radix_tree_root nfs_page_tree; - - unsigned int ndirty, - ncommit, - npages; - - /* Open contexts for shared mmap writes */ - struct list_head open_files; - -#ifdef CONFIG_NFS_V4 - struct nfs4_cached_acl *nfs4_acl; - /* NFSv4 state */ - struct list_head open_states; - struct nfs_delegation *delegation; - int delegation_state; - struct rw_semaphore rwsem; -#endif /* CONFIG_NFS_V4*/ - struct inode vfs_inode; -}; - -/* - * Cache validity bit flags - */ -#define NFS_INO_INVALID_ATTR 0x0001 /* cached attrs are invalid */ -#define NFS_INO_INVALID_DATA 0x0002 /* cached data is invalid */ -#define NFS_INO_INVALID_ATIME 0x0004 /* cached atime is invalid */ -#define NFS_INO_INVALID_ACCESS 0x0008 /* cached access cred invalid */ -#define NFS_INO_INVALID_ACL 0x0010 /* cached acls are invalid */ -#define NFS_INO_REVAL_PAGECACHE 0x0020 /* must revalidate pagecache */ - -/* - * Bit offsets in flags field - */ -#define NFS_INO_REVALIDATING (0) /* revalidating attrs */ -#define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ -#define NFS_INO_STALE (2) /* possible stale inode */ -#define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ - -static inline struct nfs_inode *NFS_I(struct inode *inode) -{ - return container_of(inode, struct nfs_inode, vfs_inode); -} -#define NFS_SB(s) ((struct nfs_server *)(s->s_fs_info)) - -#define NFS_FH(inode) (&NFS_I(inode)->fh) -#define NFS_SERVER(inode) (NFS_SB(inode->i_sb)) -#define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) -#define NFS_PROTO(inode) (NFS_SERVER(inode)->nfs_client->rpc_ops) -#define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf) -#define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies) -#define NFS_CHANGE_ATTR(inode) (NFS_I(inode)->change_attr) -#define NFS_ATTRTIMEO(inode) (NFS_I(inode)->attrtimeo) -#define NFS_MINATTRTIMEO(inode) \ - (S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmin \ - : NFS_SERVER(inode)->acregmin) -#define NFS_MAXATTRTIMEO(inode) \ - (S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmax \ - : NFS_SERVER(inode)->acregmax) -#define NFS_ATTRTIMEO_UPDATE(inode) (NFS_I(inode)->attrtimeo_timestamp) - -#define NFS_FLAGS(inode) (NFS_I(inode)->flags) -#define NFS_STALE(inode) (test_bit(NFS_INO_STALE, &NFS_FLAGS(inode))) - -#define NFS_FILEID(inode) (NFS_I(inode)->fileid) - -static inline int nfs_caches_unstable(struct inode *inode) -{ - return atomic_read(&NFS_I(inode)->data_updates) != 0; -} - -static inline void nfs_mark_for_revalidate(struct inode *inode) -{ - struct nfs_inode *nfsi = NFS_I(inode); - - spin_lock(&inode->i_lock); - nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS; - if (S_ISDIR(inode->i_mode)) - nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; - spin_unlock(&inode->i_lock); -} - -static inline void NFS_CACHEINV(struct inode *inode) -{ - if (!nfs_caches_unstable(inode)) - nfs_mark_for_revalidate(inode); -} - -static inline int nfs_server_capable(struct inode *inode, int cap) -{ - return NFS_SERVER(inode)->caps & cap; -} - -static inline int NFS_USE_READDIRPLUS(struct inode *inode) -{ - return test_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); -} - -/** - * nfs_save_change_attribute - Returns the inode attribute change cookie - * @inode - pointer to inode - * The "change attribute" is updated every time we finish an operation - * that will result in a metadata change on the server. - */ -static inline long nfs_save_change_attribute(struct inode *inode) -{ - return NFS_I(inode)->cache_change_attribute; -} - -/** - * nfs_verify_change_attribute - Detects NFS inode cache updates - * @inode - pointer to inode - * @chattr - previously saved change attribute - * Return "false" if metadata has been updated (or is in the process of - * being updated) since the change attribute was saved. - */ -static inline int nfs_verify_change_attribute(struct inode *inode, unsigned long chattr) -{ - return !nfs_caches_unstable(inode) - && time_after_eq(chattr, NFS_I(inode)->cache_change_attribute); -} - -/* - * linux/fs/nfs/inode.c - */ -extern int nfs_sync_mapping(struct address_space *mapping); -extern void nfs_zap_mapping(struct inode *inode, struct address_space *mapping); -extern void nfs_zap_caches(struct inode *); -extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, - struct nfs_fattr *); -extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *); -extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); -extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); -extern int nfs_permission(struct inode *, int, struct nameidata *); -extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *); -extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *); -extern void nfs_access_zap_cache(struct inode *inode); -extern int nfs_open(struct inode *, struct file *); -extern int nfs_release(struct inode *, struct file *); -extern int nfs_attribute_timeout(struct inode *inode); -extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); -extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); -extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); -extern int nfs_setattr(struct dentry *, struct iattr *); -extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); -extern void nfs_begin_attr_update(struct inode *); -extern void nfs_end_attr_update(struct inode *); -extern void nfs_begin_data_update(struct inode *); -extern void nfs_end_data_update(struct inode *); -extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); -extern void put_nfs_open_context(struct nfs_open_context *ctx); -extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); - -/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ -extern u32 root_nfs_parse_addr(char *name); /*__init*/ - -static inline void nfs_fattr_init(struct nfs_fattr *fattr) -{ - fattr->valid = 0; - fattr->time_start = jiffies; -} - -/* - * linux/fs/nfs/file.c - */ -extern struct inode_operations nfs_file_inode_operations; -#ifdef CONFIG_NFS_V3 -extern struct inode_operations nfs3_file_inode_operations; -#endif /* CONFIG_NFS_V3 */ -extern const struct file_operations nfs_file_operations; -extern const struct address_space_operations nfs_file_aops; - -static inline struct rpc_cred *nfs_file_cred(struct file *file) -{ - if (file != NULL) { - struct nfs_open_context *ctx; - - ctx = (struct nfs_open_context*)file->private_data; - return ctx->cred; - } - return NULL; -} - -/* - * linux/fs/nfs/xattr.c - */ -#ifdef CONFIG_NFS_V3_ACL -extern ssize_t nfs3_listxattr(struct dentry *, char *, size_t); -extern ssize_t nfs3_getxattr(struct dentry *, const char *, void *, size_t); -extern int nfs3_setxattr(struct dentry *, const char *, - const void *, size_t, int); -extern int nfs3_removexattr (struct dentry *, const char *name); -#else -# define nfs3_listxattr NULL -# define nfs3_getxattr NULL -# define nfs3_setxattr NULL -# define nfs3_removexattr NULL -#endif - -/* - * linux/fs/nfs/direct.c - */ -extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, - unsigned long); -extern ssize_t nfs_file_direct_read(struct kiocb *iocb, - const struct iovec *iov, unsigned long nr_segs, - loff_t pos); -extern ssize_t nfs_file_direct_write(struct kiocb *iocb, - const struct iovec *iov, unsigned long nr_segs, - loff_t pos); - -/* - * linux/fs/nfs/dir.c - */ -extern struct inode_operations nfs_dir_inode_operations; -#ifdef CONFIG_NFS_V3 -extern struct inode_operations nfs3_dir_inode_operations; -#endif /* CONFIG_NFS_V3 */ -extern const struct file_operations nfs_dir_operations; -extern struct dentry_operations nfs_dentry_operations; - -extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr); - -/* - * linux/fs/nfs/symlink.c - */ -extern struct inode_operations nfs_symlink_inode_operations; - -/* - * linux/fs/nfs/sysctl.c - */ -#ifdef CONFIG_SYSCTL -extern int nfs_register_sysctl(void); -extern void nfs_unregister_sysctl(void); -#else -#define nfs_register_sysctl() 0 -#define nfs_unregister_sysctl() do { } while(0) -#endif - -/* - * linux/fs/nfs/namespace.c - */ -extern struct list_head nfs_automount_list; -extern struct inode_operations nfs_mountpoint_inode_operations; -extern struct inode_operations nfs_referral_inode_operations; -extern int nfs_mountpoint_expiry_timeout; -extern void nfs_release_automount_timer(void); - -/* - * linux/fs/nfs/unlink.c - */ -extern int nfs_async_unlink(struct dentry *); -extern void nfs_complete_unlink(struct dentry *); - -/* - * linux/fs/nfs/write.c - */ -extern int nfs_writepage(struct page *page, struct writeback_control *wbc); -extern int nfs_writepages(struct address_space *, struct writeback_control *); -extern int nfs_flush_incompatible(struct file *file, struct page *page); -extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); -extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); -extern void nfs_writedata_release(void *); - -#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) -struct nfs_write_data *nfs_commit_alloc(void); -void nfs_commit_free(struct nfs_write_data *p); -#endif - -/* - * Try to write back everything synchronously (but check the - * return value!) - */ -extern int nfs_sync_inode_wait(struct inode *, unsigned long, unsigned int, int); -#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) -extern int nfs_commit_inode(struct inode *, int); -extern void nfs_commit_release(void *wdata); -#else -static inline int -nfs_commit_inode(struct inode *inode, int how) -{ - return 0; -} -#endif - -static inline int -nfs_have_writebacks(struct inode *inode) -{ - return NFS_I(inode)->npages != 0; -} - -static inline int -nfs_wb_all(struct inode *inode) -{ - int error = nfs_sync_inode_wait(inode, 0, 0, 0); - return (error < 0) ? error : 0; -} - -/* - * Write back all requests on one page - we do this before reading it. - */ -static inline int nfs_wb_page_priority(struct inode *inode, struct page* page, int how) -{ - int error = nfs_sync_inode_wait(inode, page->index, 1, - how | FLUSH_STABLE); - return (error < 0) ? error : 0; -} - -static inline int nfs_wb_page(struct inode *inode, struct page* page) -{ - return nfs_wb_page_priority(inode, page, 0); -} - -/* - * Allocate nfs_write_data structures - */ -extern struct nfs_write_data *nfs_writedata_alloc(size_t len); - -/* - * linux/fs/nfs/read.c - */ -extern int nfs_readpage(struct file *, struct page *); -extern int nfs_readpages(struct file *, struct address_space *, - struct list_head *, unsigned); -extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); -extern void nfs_readdata_release(void *data); - -/* - * Allocate nfs_read_data structures - */ -extern struct nfs_read_data *nfs_readdata_alloc(size_t len); - -/* - * linux/fs/nfs3proc.c - */ -#ifdef CONFIG_NFS_V3_ACL -extern struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type); -extern int nfs3_proc_setacl(struct inode *inode, int type, - struct posix_acl *acl); -extern int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode, - mode_t mode); -extern void nfs3_forget_cached_acls(struct inode *inode); -#else -static inline int nfs3_proc_set_default_acl(struct inode *dir, - struct inode *inode, - mode_t mode) -{ - return 0; -} - -static inline void nfs3_forget_cached_acls(struct inode *inode) -{ -} -#endif /* CONFIG_NFS_V3_ACL */ - -/* - * linux/fs/mount_clnt.c - * (Used only by nfsroot module) - */ -extern int nfsroot_mount(struct sockaddr_in *, char *, struct nfs_fh *, - int, int); - -/* - * inline functions - */ - -static inline loff_t -nfs_size_to_loff_t(__u64 size) -{ - loff_t maxsz = (((loff_t) ULONG_MAX) << PAGE_CACHE_SHIFT) + PAGE_CACHE_SIZE - 1; - if (size > maxsz) - return maxsz; - return (loff_t) size; -} - -static inline ino_t -nfs_fileid_to_ino_t(u64 fileid) -{ - ino_t ino = (ino_t) fileid; - if (sizeof(ino_t) < sizeof(u64)) - ino ^= fileid >> (sizeof(u64)-sizeof(ino_t)) * 8; - return ino; -} - -/* NFS root */ - -extern void * nfs_root_data(void); - -#define nfs_wait_event(clnt, wq, condition) \ -({ \ - int __retval = 0; \ - if (clnt->cl_intr) { \ - sigset_t oldmask; \ - rpc_clnt_sigmask(clnt, &oldmask); \ - __retval = wait_event_interruptible(wq, condition); \ - rpc_clnt_sigunmask(clnt, &oldmask); \ - } else \ - wait_event(wq, condition); \ - __retval; \ -}) - -#define NFS_JUKEBOX_RETRY_TIME (5 * HZ) - -#endif /* __KERNEL__ */ /* * NFS debug flags @@ -584,13 +50,5 @@ #define NFSDBG_CLIENT 0x0200 #define NFSDBG_ALL 0xFFFF -#ifdef __KERNEL__ -# undef ifdebug -# ifdef NFS_DEBUG -# define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) -# else -# define ifdebug(fac) if (0) -# endif -#endif /* __KERNEL */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nfs_idmap.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nfs_idmap.h 2007-05-24 15:40:44.000000000 +0200 @@ -59,20 +59,5 @@ __u8 im_status; }; -#ifdef __KERNEL__ - -/* Forward declaration to make this header independent of others */ -struct nfs_client; - -int nfs_idmap_new(struct nfs_client *); -void nfs_idmap_delete(struct nfs_client *); - -int nfs_map_name_to_uid(struct nfs_client *, const char *, size_t, __u32 *); -int nfs_map_group_to_gid(struct nfs_client *, const char *, size_t, __u32 *); -int nfs_map_uid_to_name(struct nfs_client *, __u32, char *); -int nfs_map_gid_to_group(struct nfs_client *, __u32, char *); - -extern unsigned int nfs_idmap_cache_timeout; -#endif /* __KERNEL__ */ #endif /* NFS_IDMAP_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nfsacl.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nfsacl.h 2007-05-24 15:40:44.000000000 +0200 @@ -26,33 +26,4 @@ /* Flag for Default ACL entries */ #define NFS_ACL_DEFAULT 0x1000 -#ifdef __KERNEL__ - -#include - -/* Maximum number of ACL entries over NFS */ -#define NFS_ACL_MAX_ENTRIES 1024 - -#define NFSACL_MAXWORDS (2*(2+3*NFS_ACL_MAX_ENTRIES)) -#define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \ - >> PAGE_SHIFT) - -static inline unsigned int -nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) -{ - unsigned int w = 16; - w += max(acl_access ? (int)acl_access->a_count : 3, 4) * 12; - if (acl_default) - w += max((int)acl_default->a_count, 4) * 12; - return w; -} - -extern unsigned int -nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, - struct posix_acl *acl, int encode_entries, int typeflag); -extern unsigned int -nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, - struct posix_acl **pacl); - -#endif /* __KERNEL__ */ #endif /* __LINUX_NFSACL_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nubus.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nubus.h 2007-05-24 15:40:44.000000000 +0200 @@ -12,9 +12,6 @@ #ifndef LINUX_NUBUS_H #define LINUX_NUBUS_H -#ifdef __KERNEL__ -#include -#endif enum nubus_category { NUBUS_CAT_BOARD = 0x0001, @@ -326,7 +323,7 @@ int maxlen); /* We'd like to get rid of this eventually. Only daynaport.c uses it now. */ -static inline void *nubus_slot_addr(int slot) +static __inline__ void *nubus_slot_addr(int slot) { return (void *)(0xF0000000|(slot<<24)); } --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/nvram.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/nvram.h 2007-05-24 15:40:44.000000000 +0200 @@ -12,14 +12,5 @@ /* all these functions expect an NVRAM offset, not an absolute */ #define NVRAM_OFFSET(x) ((x)-NVRAM_FIRST_BYTE) -#ifdef __KERNEL__ -/* __foo is foo without grabbing the rtc_lock - get it yourself */ -extern unsigned char __nvram_read_byte(int i); -extern unsigned char nvram_read_byte(int i); -extern void __nvram_write_byte(unsigned char c, int i); -extern void nvram_write_byte(unsigned char c, int i); -extern int __nvram_check_checksum(void); -extern int nvram_check_checksum(void); -#endif #endif /* _LINUX_NVRAM_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/parport.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/parport.h 2007-05-24 15:40:44.000000000 +0200 @@ -94,468 +94,4 @@ #define PARPORT_W91284PIC (1<<1) /* have a Warp9 w91284pic in the device */ /* The rest is for the kernel only */ -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include -#include - -/* Define this later. */ -struct parport; -struct pardevice; - -struct pc_parport_state { - unsigned int ctr; - unsigned int ecr; -}; - -struct ax_parport_state { - unsigned int ctr; - unsigned int ecr; - unsigned int dcsr; -}; - -/* used by both parport_amiga and parport_mfc3 */ -struct amiga_parport_state { - unsigned char data; /* ciaa.prb */ - unsigned char datadir; /* ciaa.ddrb */ - unsigned char status; /* ciab.pra & 7 */ - unsigned char statusdir;/* ciab.ddrb & 7 */ -}; - -struct ax88796_parport_state { - unsigned char cpr; -}; - -struct ip32_parport_state { - unsigned int dcr; - unsigned int ecr; -}; - -struct parport_state { - union { - struct pc_parport_state pc; - /* ARC has no state. */ - struct ax_parport_state ax; - struct amiga_parport_state amiga; - struct ax88796_parport_state ax88796; - /* Atari has not state. */ - struct ip32_parport_state ip32; - void *misc; - } u; -}; - -struct parport_operations { - /* IBM PC-style virtual registers. */ - void (*write_data)(struct parport *, unsigned char); - unsigned char (*read_data)(struct parport *); - - void (*write_control)(struct parport *, unsigned char); - unsigned char (*read_control)(struct parport *); - unsigned char (*frob_control)(struct parport *, unsigned char mask, - unsigned char val); - - unsigned char (*read_status)(struct parport *); - - /* IRQs. */ - void (*enable_irq)(struct parport *); - void (*disable_irq)(struct parport *); - - /* Data direction. */ - void (*data_forward) (struct parport *); - void (*data_reverse) (struct parport *); - - /* For core parport code. */ - void (*init_state)(struct pardevice *, struct parport_state *); - void (*save_state)(struct parport *, struct parport_state *); - void (*restore_state)(struct parport *, struct parport_state *); - - /* Block read/write */ - size_t (*epp_write_data) (struct parport *port, const void *buf, - size_t len, int flags); - size_t (*epp_read_data) (struct parport *port, void *buf, size_t len, - int flags); - size_t (*epp_write_addr) (struct parport *port, const void *buf, - size_t len, int flags); - size_t (*epp_read_addr) (struct parport *port, void *buf, size_t len, - int flags); - - size_t (*ecp_write_data) (struct parport *port, const void *buf, - size_t len, int flags); - size_t (*ecp_read_data) (struct parport *port, void *buf, size_t len, - int flags); - size_t (*ecp_write_addr) (struct parport *port, const void *buf, - size_t len, int flags); - - size_t (*compat_write_data) (struct parport *port, const void *buf, - size_t len, int flags); - size_t (*nibble_read_data) (struct parport *port, void *buf, - size_t len, int flags); - size_t (*byte_read_data) (struct parport *port, void *buf, - size_t len, int flags); - struct module *owner; -}; - -struct parport_device_info { - parport_device_class class; - const char *class_name; - const char *mfr; - const char *model; - const char *cmdset; - const char *description; -}; - -/* Each device can have two callback functions: - * 1) a preemption function, called by the resource manager to request - * that the driver relinquish control of the port. The driver should - * return zero if it agrees to release the port, and nonzero if it - * refuses. Do not call parport_release() - the kernel will do this - * implicitly. - * - * 2) a wake-up function, called by the resource manager to tell drivers - * that the port is available to be claimed. If a driver wants to use - * the port, it should call parport_claim() here. - */ - -/* A parallel port device */ -struct pardevice { - const char *name; - struct parport *port; - int daisy; - int (*preempt)(void *); - void (*wakeup)(void *); - void *private; - void (*irq_func)(int, void *); - unsigned int flags; - struct pardevice *next; - struct pardevice *prev; - struct parport_state *state; /* saved status over preemption */ - wait_queue_head_t wait_q; - unsigned long int time; - unsigned long int timeslice; - volatile long int timeout; - unsigned long waiting; /* long req'd for set_bit --RR */ - struct pardevice *waitprev; - struct pardevice *waitnext; - void * sysctl_table; -}; - -/* IEEE1284 information */ - -/* IEEE1284 phases. These are exposed to userland through ppdev IOCTL - * PP[GS]ETPHASE, so do not change existing values. */ -enum ieee1284_phase { - IEEE1284_PH_FWD_DATA, - IEEE1284_PH_FWD_IDLE, - IEEE1284_PH_TERMINATE, - IEEE1284_PH_NEGOTIATION, - IEEE1284_PH_HBUSY_DNA, - IEEE1284_PH_REV_IDLE, - IEEE1284_PH_HBUSY_DAVAIL, - IEEE1284_PH_REV_DATA, - IEEE1284_PH_ECP_SETUP, - IEEE1284_PH_ECP_FWD_TO_REV, - IEEE1284_PH_ECP_REV_TO_FWD, - IEEE1284_PH_ECP_DIR_UNKNOWN, -}; -struct ieee1284_info { - int mode; - volatile enum ieee1284_phase phase; - struct semaphore irq; -}; - -/* A parallel port */ -struct parport { - unsigned long base; /* base address */ - unsigned long base_hi; /* base address (hi - ECR) */ - unsigned int size; /* IO extent */ - const char *name; - unsigned int modes; - int irq; /* interrupt (or -1 for none) */ - int dma; - int muxport; /* which muxport (if any) this is */ - int portnum; /* which physical parallel port (not mux) */ - - struct parport *physport; - /* If this is a non-default mux - parport, i.e. we're a clone of a real - physical port, this is a pointer to that - port. The locking is only done in the - real port. For a clone port, the - following structure members are - meaningless: devices, cad, muxsel, - waithead, waittail, flags, pdir, - ieee1284, *_lock. - - It this is a default mux parport, or - there is no mux involved, this points to - ourself. */ - - struct pardevice *devices; - struct pardevice *cad; /* port owner */ - int daisy; /* currently selected daisy addr */ - int muxsel; /* currently selected mux port */ - - struct pardevice *waithead; - struct pardevice *waittail; - - struct list_head list; - unsigned int flags; - - void *sysctl_table; - struct parport_device_info probe_info[5]; /* 0-3 + non-IEEE1284.3 */ - struct ieee1284_info ieee1284; - - struct parport_operations *ops; - void *private_data; /* for lowlevel driver */ - - int number; /* port index - the `n' in `parportn' */ - spinlock_t pardevice_lock; - spinlock_t waitlist_lock; - rwlock_t cad_lock; - - int spintime; - atomic_t ref_count; - - struct list_head full_list; - struct parport *slaves[3]; -}; - -#define DEFAULT_SPIN_TIME 500 /* us */ - -struct parport_driver { - const char *name; - void (*attach) (struct parport *); - void (*detach) (struct parport *); - struct list_head list; -}; - -/* parport_register_port registers a new parallel port at the given - address (if one does not already exist) and returns a pointer to it. - This entails claiming the I/O region, IRQ and DMA. NULL is returned - if initialisation fails. */ -struct parport *parport_register_port(unsigned long base, int irq, int dma, - struct parport_operations *ops); - -/* Once a registered port is ready for high-level drivers to use, the - low-level driver that registered it should announce it. This will - call the high-level drivers' attach() functions (after things like - determining the IEEE 1284.3 topology of the port and collecting - DeviceIDs). */ -void parport_announce_port (struct parport *port); - -/* Unregister a port. */ -extern void parport_remove_port(struct parport *port); - -/* Register a new high-level driver. */ -extern int parport_register_driver (struct parport_driver *); - -/* Unregister a high-level driver. */ -extern void parport_unregister_driver (struct parport_driver *); - -/* If parport_register_driver doesn't fit your needs, perhaps - * parport_find_xxx does. */ -extern struct parport *parport_find_number (int); -extern struct parport *parport_find_base (unsigned long); - -/* Reference counting for ports. */ -extern struct parport *parport_get_port (struct parport *); -extern void parport_put_port (struct parport *); - -/* parport_register_device declares that a device is connected to a - port, and tells the kernel all it needs to know. - - pf is the preemption function (may be NULL for no callback) - - kf is the wake-up function (may be NULL for no callback) - - irq_func is the interrupt handler (may be NULL for no interrupts) - - handle is a user pointer that gets handed to callback functions. */ -struct pardevice *parport_register_device(struct parport *port, - const char *name, - int (*pf)(void *), void (*kf)(void *), - void (*irq_func)(int, void *), - int flags, void *handle); - -/* parport_unregister unlinks a device from the chain. */ -extern void parport_unregister_device(struct pardevice *dev); - -/* parport_claim tries to gain ownership of the port for a particular - driver. This may fail (return non-zero) if another driver is busy. - If this driver has registered an interrupt handler, it will be - enabled. */ -extern int parport_claim(struct pardevice *dev); - -/* parport_claim_or_block is the same, but sleeps if the port cannot - be claimed. Return value is 1 if it slept, 0 normally and -errno - on error. */ -extern int parport_claim_or_block(struct pardevice *dev); - -/* parport_release reverses a previous parport_claim. This can never - fail, though the effects are undefined (except that they are bad) - if you didn't previously own the port. Once you have released the - port you should make sure that neither your code nor the hardware - on the port tries to initiate any communication without first - re-claiming the port. If you mess with the port state (enabling - ECP for example) you should clean up before releasing the port. */ - -extern void parport_release(struct pardevice *dev); - -/** - * parport_yield - relinquish a parallel port temporarily - * @dev: a device on the parallel port - * - * This function relinquishes the port if it would be helpful to other - * drivers to do so. Afterwards it tries to reclaim the port using - * parport_claim(), and the return value is the same as for - * parport_claim(). If it fails, the port is left unclaimed and it is - * the driver's responsibility to reclaim the port. - * - * The parport_yield() and parport_yield_blocking() functions are for - * marking points in the driver at which other drivers may claim the - * port and use their devices. Yielding the port is similar to - * releasing it and reclaiming it, but is more efficient because no - * action is taken if there are no other devices needing the port. In - * fact, nothing is done even if there are other devices waiting but - * the current device is still within its "timeslice". The default - * timeslice is half a second, but it can be adjusted via the /proc - * interface. - **/ -static __inline__ int parport_yield(struct pardevice *dev) -{ - unsigned long int timeslip = (jiffies - dev->time); - if ((dev->port->waithead == NULL) || (timeslip < dev->timeslice)) - return 0; - parport_release(dev); - return parport_claim(dev); -} - -/** - * parport_yield_blocking - relinquish a parallel port temporarily - * @dev: a device on the parallel port - * - * This function relinquishes the port if it would be helpful to other - * drivers to do so. Afterwards it tries to reclaim the port using - * parport_claim_or_block(), and the return value is the same as for - * parport_claim_or_block(). - **/ -static __inline__ int parport_yield_blocking(struct pardevice *dev) -{ - unsigned long int timeslip = (jiffies - dev->time); - if ((dev->port->waithead == NULL) || (timeslip < dev->timeslice)) - return 0; - parport_release(dev); - return parport_claim_or_block(dev); -} - -/* Flags used to identify what a device does. */ -#define PARPORT_DEV_TRAN 0 /* WARNING !! DEPRECATED !! */ -#define PARPORT_DEV_LURK (1<<0) /* WARNING !! DEPRECATED !! */ -#define PARPORT_DEV_EXCL (1<<1) /* Need exclusive access. */ - -#define PARPORT_FLAG_EXCL (1<<1) /* EXCL driver registered. */ - -/* IEEE1284 functions */ -extern void parport_ieee1284_interrupt (int, void *); -extern int parport_negotiate (struct parport *, int mode); -extern ssize_t parport_write (struct parport *, const void *buf, size_t len); -extern ssize_t parport_read (struct parport *, void *buf, size_t len); - -#define PARPORT_INACTIVITY_O_NONBLOCK 1 -extern long parport_set_timeout (struct pardevice *, long inactivity); - -extern int parport_wait_event (struct parport *, long timeout); -extern int parport_wait_peripheral (struct parport *port, - unsigned char mask, - unsigned char val); -extern int parport_poll_peripheral (struct parport *port, - unsigned char mask, - unsigned char val, - int usec); - -/* For architectural drivers */ -extern size_t parport_ieee1284_write_compat (struct parport *, - const void *, size_t, int); -extern size_t parport_ieee1284_read_nibble (struct parport *, - void *, size_t, int); -extern size_t parport_ieee1284_read_byte (struct parport *, - void *, size_t, int); -extern size_t parport_ieee1284_ecp_read_data (struct parport *, - void *, size_t, int); -extern size_t parport_ieee1284_ecp_write_data (struct parport *, - const void *, size_t, int); -extern size_t parport_ieee1284_ecp_write_addr (struct parport *, - const void *, size_t, int); -extern size_t parport_ieee1284_epp_write_data (struct parport *, - const void *, size_t, int); -extern size_t parport_ieee1284_epp_read_data (struct parport *, - void *, size_t, int); -extern size_t parport_ieee1284_epp_write_addr (struct parport *, - const void *, size_t, int); -extern size_t parport_ieee1284_epp_read_addr (struct parport *, - void *, size_t, int); - -/* IEEE1284.3 functions */ -extern int parport_daisy_init (struct parport *port); -extern void parport_daisy_fini (struct parport *port); -extern struct pardevice *parport_open (int devnum, const char *name, - int (*pf) (void *), - void (*kf) (void *), - void (*irqf) (int, void *), - int flags, void *handle); -extern void parport_close (struct pardevice *dev); -extern ssize_t parport_device_id (int devnum, char *buffer, size_t len); -extern int parport_device_num (int parport, int mux, int daisy); -extern void parport_daisy_deselect_all (struct parport *port); -extern int parport_daisy_select (struct parport *port, int daisy, int mode); - -/* Lowlevel drivers _can_ call this support function to handle irqs. */ -static __inline__ void parport_generic_irq(int irq, struct parport *port) -{ - parport_ieee1284_interrupt (irq, port); - read_lock(&port->cad_lock); - if (port->cad && port->cad->irq_func) - port->cad->irq_func(irq, port->cad->private); - read_unlock(&port->cad_lock); -} - -/* Prototypes from parport_procfs */ -extern int parport_proc_register(struct parport *pp); -extern int parport_proc_unregister(struct parport *pp); -extern int parport_device_proc_register(struct pardevice *device); -extern int parport_device_proc_unregister(struct pardevice *device); - -/* If PC hardware is the only type supported, we can optimise a bit. */ -#if !defined(CONFIG_PARPORT_NOT_PC) - -#include -#define parport_write_data(p,x) parport_pc_write_data(p,x) -#define parport_read_data(p) parport_pc_read_data(p) -#define parport_write_control(p,x) parport_pc_write_control(p,x) -#define parport_read_control(p) parport_pc_read_control(p) -#define parport_frob_control(p,m,v) parport_pc_frob_control(p,m,v) -#define parport_read_status(p) parport_pc_read_status(p) -#define parport_enable_irq(p) parport_pc_enable_irq(p) -#define parport_disable_irq(p) parport_pc_disable_irq(p) -#define parport_data_forward(p) parport_pc_data_forward(p) -#define parport_data_reverse(p) parport_pc_data_reverse(p) - -#else /* !CONFIG_PARPORT_NOT_PC */ - -/* Generic operations vector through the dispatch table. */ -#define parport_write_data(p,x) (p)->ops->write_data(p,x) -#define parport_read_data(p) (p)->ops->read_data(p) -#define parport_write_control(p,x) (p)->ops->write_control(p,x) -#define parport_read_control(p) (p)->ops->read_control(p) -#define parport_frob_control(p,m,v) (p)->ops->frob_control(p,m,v) -#define parport_read_status(p) (p)->ops->read_status(p) -#define parport_enable_irq(p) (p)->ops->enable_irq(p) -#define parport_disable_irq(p) (p)->ops->disable_irq(p) -#define parport_data_forward(p) (p)->ops->data_forward(p) -#define parport_data_reverse(p) (p)->ops->data_reverse(p) - -#endif /* !CONFIG_PARPORT_NOT_PC */ - -#endif /* __KERNEL__ */ #endif /* _PARPORT_H_ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/patchkey.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/patchkey.h 2007-05-24 15:40:44.000000000 +0200 @@ -18,21 +18,9 @@ #define _LINUX_PATCHKEY_H /* Endian macros. */ -#ifdef __KERNEL__ -# include -#else # include -#endif -#if defined(__KERNEL__) -# if defined(__BIG_ENDIAN) -# define _PATCHKEY(id) (0xfd00|id) -# elif defined(__LITTLE_ENDIAN) -# define _PATCHKEY(id) ((id<<8)|0x00fd) -# else -# error "could not determine byte order" -# endif -#elif defined(__BYTE_ORDER) +#if defined(__BYTE_ORDER) # if __BYTE_ORDER == __BIG_ENDIAN # define _PATCHKEY(id) (0xfd00|id) # elif __BYTE_ORDER == __LITTLE_ENDIAN --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/pci.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/pci.h 2007-05-24 15:40:44.000000000 +0200 @@ -42,776 +42,4 @@ #define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */ #define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */ -#ifdef __KERNEL__ - -#include - -#include -#include -#include -#include -#include -#include - -/* File state for mmap()s on /proc/bus/pci/X/Y */ -enum pci_mmap_state { - pci_mmap_io, - pci_mmap_mem -}; - -/* This defines the direction arg to the DMA mapping routines. */ -#define PCI_DMA_BIDIRECTIONAL 0 -#define PCI_DMA_TODEVICE 1 -#define PCI_DMA_FROMDEVICE 2 -#define PCI_DMA_NONE 3 - -#define DEVICE_COUNT_COMPATIBLE 4 -#define DEVICE_COUNT_RESOURCE 12 - -typedef int __bitwise pci_power_t; - -#define PCI_D0 ((pci_power_t __force) 0) -#define PCI_D1 ((pci_power_t __force) 1) -#define PCI_D2 ((pci_power_t __force) 2) -#define PCI_D3hot ((pci_power_t __force) 3) -#define PCI_D3cold ((pci_power_t __force) 4) -#define PCI_UNKNOWN ((pci_power_t __force) 5) -#define PCI_POWER_ERROR ((pci_power_t __force) -1) - -/** The pci_channel state describes connectivity between the CPU and - * the pci device. If some PCI bus between here and the pci device - * has crashed or locked up, this info is reflected here. - */ -typedef unsigned int __bitwise pci_channel_state_t; - -enum pci_channel_state { - /* I/O channel is in normal state */ - pci_channel_io_normal = (__force pci_channel_state_t) 1, - - /* I/O to channel is blocked */ - pci_channel_io_frozen = (__force pci_channel_state_t) 2, - - /* PCI card is dead */ - pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, -}; - -typedef unsigned short __bitwise pci_bus_flags_t; -enum pci_bus_flags { - PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, -}; - -struct pci_cap_saved_state { - struct hlist_node next; - char cap_nr; - u32 data[0]; -}; - -/* - * The pci_dev structure is used to describe PCI devices. - */ -struct pci_dev { - struct list_head global_list; /* node in list of all PCI devices */ - struct list_head bus_list; /* node in per-bus list */ - struct pci_bus *bus; /* bus this device is on */ - struct pci_bus *subordinate; /* bus this device bridges to */ - - void *sysdata; /* hook for sys-specific extension */ - struct proc_dir_entry *procent; /* device entry in /proc/bus/pci */ - - unsigned int devfn; /* encoded device & function index */ - unsigned short vendor; - unsigned short device; - unsigned short subsystem_vendor; - unsigned short subsystem_device; - unsigned int class; /* 3 bytes: (base,sub,prog-if) */ - u8 hdr_type; /* PCI header type (`multi' flag masked out) */ - u8 rom_base_reg; /* which config register controls the ROM */ - u8 pin; /* which interrupt pin this device uses */ - - struct pci_driver *driver; /* which driver has allocated this device */ - u64 dma_mask; /* Mask of the bits of bus address this - device implements. Normally this is - 0xffffffff. You only need to change - this if your device has broken DMA - or supports 64-bit transfers. */ - - pci_power_t current_state; /* Current operating state. In ACPI-speak, - this is D0-D3, D0 being fully functional, - and D3 being off. */ - - pci_channel_state_t error_state; /* current connectivity state */ - struct device dev; /* Generic device interface */ - - /* device is compatible with these IDs */ - unsigned short vendor_compatible[DEVICE_COUNT_COMPATIBLE]; - unsigned short device_compatible[DEVICE_COUNT_COMPATIBLE]; - - int cfg_size; /* Size of configuration space */ - - /* - * Instead of touching interrupt line and base address registers - * directly, use the values stored here. They might be different! - */ - unsigned int irq; - struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ - - /* These fields are used by common fixups */ - unsigned int transparent:1; /* Transparent PCI bridge */ - unsigned int multifunction:1;/* Part of multi-function device */ - /* keep track of device state */ - unsigned int is_enabled:1; /* pci_enable_device has been called */ - unsigned int is_busmaster:1; /* device is busmaster */ - unsigned int no_msi:1; /* device may not use msi */ - unsigned int no_d1d2:1; /* only allow d0 or d3 */ - unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ - unsigned int broken_parity_status:1; /* Device generates false positive parity */ - unsigned int msi_enabled:1; - unsigned int msix_enabled:1; - - u32 saved_config_space[16]; /* config space saved at suspend time */ - struct hlist_head saved_cap_space; - struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ - int rom_attr_enabled; /* has display of the rom attribute been enabled? */ - struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ -}; - -#define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) -#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) -#define to_pci_dev(n) container_of(n, struct pci_dev, dev) -#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) - -static inline struct pci_cap_saved_state *pci_find_saved_cap( - struct pci_dev *pci_dev,char cap) -{ - struct pci_cap_saved_state *tmp; - struct hlist_node *pos; - - hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { - if (tmp->cap_nr == cap) - return tmp; - } - return NULL; -} - -static inline void pci_add_saved_cap(struct pci_dev *pci_dev, - struct pci_cap_saved_state *new_cap) -{ - hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); -} - -static inline void pci_remove_saved_cap(struct pci_cap_saved_state *cap) -{ - hlist_del(&cap->next); -} - -/* - * For PCI devices, the region numbers are assigned this way: - * - * 0-5 standard PCI regions - * 6 expansion ROM - * 7-10 bridges: address space assigned to buses behind the bridge - */ - -#define PCI_ROM_RESOURCE 6 -#define PCI_BRIDGE_RESOURCES 7 -#define PCI_NUM_RESOURCES 11 - -#ifndef PCI_BUS_NUM_RESOURCES -#define PCI_BUS_NUM_RESOURCES 8 -#endif - -#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ - -struct pci_bus { - struct list_head node; /* node in list of buses */ - struct pci_bus *parent; /* parent bus this bridge is on */ - struct list_head children; /* list of child buses */ - struct list_head devices; /* list of devices on this bus */ - struct pci_dev *self; /* bridge device as seen by parent */ - struct resource *resource[PCI_BUS_NUM_RESOURCES]; - /* address space routed to this bus */ - - struct pci_ops *ops; /* configuration access functions */ - void *sysdata; /* hook for sys-specific extension */ - struct proc_dir_entry *procdir; /* directory entry in /proc/bus/pci */ - - unsigned char number; /* bus number */ - unsigned char primary; /* number of primary bridge */ - unsigned char secondary; /* number of secondary bridge */ - unsigned char subordinate; /* max number of subordinate buses */ - - char name[48]; - - unsigned short bridge_ctl; /* manage NO_ISA/FBB/et al behaviors */ - pci_bus_flags_t bus_flags; /* Inherited by child busses */ - struct device *bridge; - struct class_device class_dev; - struct bin_attribute *legacy_io; /* legacy I/O for this bus */ - struct bin_attribute *legacy_mem; /* legacy mem */ -}; - -#define pci_bus_b(n) list_entry(n, struct pci_bus, node) -#define to_pci_bus(n) container_of(n, struct pci_bus, class_dev) - -/* - * Error values that may be returned by PCI functions. - */ -#define PCIBIOS_SUCCESSFUL 0x00 -#define PCIBIOS_FUNC_NOT_SUPPORTED 0x81 -#define PCIBIOS_BAD_VENDOR_ID 0x83 -#define PCIBIOS_DEVICE_NOT_FOUND 0x86 -#define PCIBIOS_BAD_REGISTER_NUMBER 0x87 -#define PCIBIOS_SET_FAILED 0x88 -#define PCIBIOS_BUFFER_TOO_SMALL 0x89 - -/* Low-level architecture-dependent routines */ - -struct pci_ops { - int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val); - int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); -}; - -struct pci_raw_ops { - int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, - int reg, int len, u32 *val); - int (*write)(unsigned int domain, unsigned int bus, unsigned int devfn, - int reg, int len, u32 val); -}; - -extern struct pci_raw_ops *raw_pci_ops; - -struct pci_bus_region { - unsigned long start; - unsigned long end; -}; - -struct pci_dynids { - spinlock_t lock; /* protects list, index */ - struct list_head list; /* for IDs added at runtime */ - unsigned int use_driver_data:1; /* pci_driver->driver_data is used */ -}; - -/* ---------------------------------------------------------------- */ -/** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides - * a set fof callbacks in struct pci_error_handlers, then that device driver - * will be notified of PCI bus errors, and will be driven to recovery - * when an error occurs. - */ - -typedef unsigned int __bitwise pci_ers_result_t; - -enum pci_ers_result { - /* no result/none/not supported in device driver */ - PCI_ERS_RESULT_NONE = (__force pci_ers_result_t) 1, - - /* Device driver can recover without slot reset */ - PCI_ERS_RESULT_CAN_RECOVER = (__force pci_ers_result_t) 2, - - /* Device driver wants slot to be reset. */ - PCI_ERS_RESULT_NEED_RESET = (__force pci_ers_result_t) 3, - - /* Device has completely failed, is unrecoverable */ - PCI_ERS_RESULT_DISCONNECT = (__force pci_ers_result_t) 4, - - /* Device driver is fully recovered and operational */ - PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5, -}; - -/* PCI bus error event callbacks */ -struct pci_error_handlers -{ - /* PCI bus error detected on this device */ - pci_ers_result_t (*error_detected)(struct pci_dev *dev, - enum pci_channel_state error); - - /* MMIO has been re-enabled, but not DMA */ - pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev); - - /* PCI Express link has been reset */ - pci_ers_result_t (*link_reset)(struct pci_dev *dev); - - /* PCI slot has been reset */ - pci_ers_result_t (*slot_reset)(struct pci_dev *dev); - - /* Device driver may resume normal operations */ - void (*resume)(struct pci_dev *dev); -}; - -/* ---------------------------------------------------------------- */ - -struct module; -struct pci_driver { - struct list_head node; - char *name; - const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */ - int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ - void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ - int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ - int (*suspend_late) (struct pci_dev *dev, pm_message_t state); - int (*resume_early) (struct pci_dev *dev); - int (*resume) (struct pci_dev *dev); /* Device woken up */ - int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ - void (*shutdown) (struct pci_dev *dev); - - struct pci_error_handlers *err_handler; - struct device_driver driver; - struct pci_dynids dynids; - - int multithread_probe; -}; - -#define to_pci_driver(drv) container_of(drv,struct pci_driver, driver) - -/** - * PCI_DEVICE - macro used to describe a specific pci device - * @vend: the 16 bit PCI Vendor ID - * @dev: the 16 bit PCI Device ID - * - * This macro is used to create a struct pci_device_id that matches a - * specific device. The subvendor and subdevice fields will be set to - * PCI_ANY_ID. - */ -#define PCI_DEVICE(vend,dev) \ - .vendor = (vend), .device = (dev), \ - .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID - -/** - * PCI_DEVICE_CLASS - macro used to describe a specific pci device class - * @dev_class: the class, subclass, prog-if triple for this device - * @dev_class_mask: the class mask for this device - * - * This macro is used to create a struct pci_device_id that matches a - * specific PCI class. The vendor, device, subvendor, and subdevice - * fields will be set to PCI_ANY_ID. - */ -#define PCI_DEVICE_CLASS(dev_class,dev_class_mask) \ - .class = (dev_class), .class_mask = (dev_class_mask), \ - .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \ - .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID - -/* - * pci_module_init is obsolete, this stays here till we fix up all usages of it - * in the tree. - */ -#define pci_module_init pci_register_driver - -/* these external functions are only available when PCI support is enabled */ -#ifdef CONFIG_PCI - -extern struct bus_type pci_bus_type; - -/* Do NOT directly access these two variables, unless you are arch specific pci - * code, or pci core code. */ -extern struct list_head pci_root_buses; /* list of all known PCI buses */ -extern struct list_head pci_devices; /* list of all devices */ - -void pcibios_fixup_bus(struct pci_bus *); -int __must_check pcibios_enable_device(struct pci_dev *, int mask); -char *pcibios_setup (char *str); - -/* Used only when drivers/pci/setup.c is used */ -void pcibios_align_resource(void *, struct resource *, resource_size_t, - resource_size_t); -void pcibios_update_irq(struct pci_dev *, int irq); - -/* Generic PCI functions used internally */ - -extern struct pci_bus *pci_find_bus(int domain, int busnr); -void pci_bus_add_devices(struct pci_bus *bus); -struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata); -static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata) -{ - struct pci_bus *root_bus; - root_bus = pci_scan_bus_parented(NULL, bus, ops, sysdata); - if (root_bus) - pci_bus_add_devices(root_bus); - return root_bus; -} -struct pci_bus *pci_create_bus(struct device *parent, int bus, struct pci_ops *ops, void *sysdata); -struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr); -int pci_scan_slot(struct pci_bus *bus, int devfn); -struct pci_dev * pci_scan_single_device(struct pci_bus *bus, int devfn); -void pci_device_add(struct pci_dev *dev, struct pci_bus *bus); -unsigned int pci_scan_child_bus(struct pci_bus *bus); -int __must_check pci_bus_add_device(struct pci_dev *dev); -void pci_read_bridge_bases(struct pci_bus *child); -struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct resource *res); -int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); -extern struct pci_dev *pci_dev_get(struct pci_dev *dev); -extern void pci_dev_put(struct pci_dev *dev); -extern void pci_remove_bus(struct pci_bus *b); -extern void pci_remove_bus_device(struct pci_dev *dev); -extern void pci_stop_bus_device(struct pci_dev *dev); -void pci_setup_cardbus(struct pci_bus *bus); -extern void pci_sort_breadthfirst(void); - -/* Generic PCI functions exported to card drivers */ - -struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); -struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); -struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); -int pci_find_capability (struct pci_dev *dev, int cap); -int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); -int pci_find_ext_capability (struct pci_dev *dev, int cap); -struct pci_bus *pci_find_next_bus(const struct pci_bus *from); - -struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, - struct pci_dev *from); -struct pci_dev *pci_get_device_reverse(unsigned int vendor, unsigned int device, - struct pci_dev *from); - -struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, - unsigned int ss_vendor, unsigned int ss_device, - struct pci_dev *from); -struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn); -struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn); -struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); -int pci_dev_present(const struct pci_device_id *ids); - -int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val); -int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val); -int pci_bus_read_config_dword (struct pci_bus *bus, unsigned int devfn, int where, u32 *val); -int pci_bus_write_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 val); -int pci_bus_write_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 val); -int pci_bus_write_config_dword (struct pci_bus *bus, unsigned int devfn, int where, u32 val); - -static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) -{ - return pci_bus_read_config_byte (dev->bus, dev->devfn, where, val); -} -static inline int pci_read_config_word(struct pci_dev *dev, int where, u16 *val) -{ - return pci_bus_read_config_word (dev->bus, dev->devfn, where, val); -} -static inline int pci_read_config_dword(struct pci_dev *dev, int where, u32 *val) -{ - return pci_bus_read_config_dword (dev->bus, dev->devfn, where, val); -} -static inline int pci_write_config_byte(struct pci_dev *dev, int where, u8 val) -{ - return pci_bus_write_config_byte (dev->bus, dev->devfn, where, val); -} -static inline int pci_write_config_word(struct pci_dev *dev, int where, u16 val) -{ - return pci_bus_write_config_word (dev->bus, dev->devfn, where, val); -} -static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val) -{ - return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val); -} - -int __must_check pci_enable_device(struct pci_dev *dev); -int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); -void pci_disable_device(struct pci_dev *dev); -void pci_set_master(struct pci_dev *dev); -#define HAVE_PCI_SET_MWI -int __must_check pci_set_mwi(struct pci_dev *dev); -void pci_clear_mwi(struct pci_dev *dev); -void pci_intx(struct pci_dev *dev, int enable); -int pci_set_dma_mask(struct pci_dev *dev, u64 mask); -int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); -void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); -int __must_check pci_assign_resource(struct pci_dev *dev, int i); -int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); -void pci_restore_bars(struct pci_dev *dev); - -/* ROM control related routines */ -void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); -void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); -void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); -void pci_remove_rom(struct pci_dev *pdev); - -/* Power management related routines */ -int pci_save_state(struct pci_dev *dev); -int pci_restore_state(struct pci_dev *dev); -int pci_set_power_state(struct pci_dev *dev, pci_power_t state); -pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); -int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); - -/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ -void pci_bus_assign_resources(struct pci_bus *bus); -void pci_bus_size_bridges(struct pci_bus *bus); -int pci_claim_resource(struct pci_dev *, int); -void pci_assign_unassigned_resources(void); -void pdev_enable_device(struct pci_dev *); -void pdev_sort_resources(struct pci_dev *, struct resource_list *); -void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), - int (*)(struct pci_dev *, u8, u8)); -#define HAVE_PCI_REQ_REGIONS 2 -int __must_check pci_request_regions(struct pci_dev *, const char *); -void pci_release_regions(struct pci_dev *); -int __must_check pci_request_region(struct pci_dev *, int, const char *); -void pci_release_region(struct pci_dev *, int); - -/* drivers/pci/bus.c */ -int __must_check pci_bus_alloc_resource(struct pci_bus *bus, - struct resource *res, resource_size_t size, - resource_size_t align, resource_size_t min, - unsigned int type_mask, - void (*alignf)(void *, struct resource *, - resource_size_t, resource_size_t), - void *alignf_data); -void pci_enable_bridges(struct pci_bus *bus); - -/* Proper probing supporting hot-pluggable devices */ -int __must_check __pci_register_driver(struct pci_driver *, struct module *); -static inline int __must_check pci_register_driver(struct pci_driver *driver) -{ - return __pci_register_driver(driver, THIS_MODULE); -} - -void pci_unregister_driver(struct pci_driver *); -void pci_remove_behind_bridge(struct pci_dev *); -struct pci_driver *pci_dev_driver(const struct pci_dev *); -const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); -const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); -int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); - -void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), - void *userdata); -int pci_cfg_space_size(struct pci_dev *dev); -unsigned char pci_bus_max_busnr(struct pci_bus* bus); - -/* kmem_cache style wrapper around pci_alloc_consistent() */ - -#include - -#define pci_pool dma_pool -#define pci_pool_create(name, pdev, size, align, allocation) \ - dma_pool_create(name, &pdev->dev, size, align, allocation) -#define pci_pool_destroy(pool) dma_pool_destroy(pool) -#define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle) -#define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr) - -enum pci_dma_burst_strategy { - PCI_DMA_BURST_INFINITY, /* make bursts as large as possible, - strategy_parameter is N/A */ - PCI_DMA_BURST_BOUNDARY, /* disconnect at every strategy_parameter - byte boundaries */ - PCI_DMA_BURST_MULTIPLE, /* disconnect at some multiple of - strategy_parameter byte boundaries */ -}; - -#if defined(CONFIG_ISA) || defined(CONFIG_EISA) -extern struct pci_dev *isa_bridge; -#endif - -struct msix_entry { - u16 vector; /* kernel uses to write allocated vector */ - u16 entry; /* driver uses to specify entry, OS writes */ -}; - - -#ifndef CONFIG_PCI_MSI -static inline void pci_scan_msi_device(struct pci_dev *dev) {} -static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} -static inline void pci_disable_msi(struct pci_dev *dev) {} -static inline int pci_enable_msix(struct pci_dev* dev, - struct msix_entry *entries, int nvec) {return -1;} -static inline void pci_disable_msix(struct pci_dev *dev) {} -static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} -#else -extern void pci_scan_msi_device(struct pci_dev *dev); -extern int pci_enable_msi(struct pci_dev *dev); -extern void pci_disable_msi(struct pci_dev *dev); -extern int pci_enable_msix(struct pci_dev* dev, - struct msix_entry *entries, int nvec); -extern void pci_disable_msix(struct pci_dev *dev); -extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); -#endif - -#ifdef CONFIG_HT_IRQ -/* The functions a driver should call */ -int ht_create_irq(struct pci_dev *dev, int idx); -void ht_destroy_irq(unsigned int irq); -#endif /* CONFIG_HT_IRQ */ - -extern void pci_block_user_cfg_access(struct pci_dev *dev); -extern void pci_unblock_user_cfg_access(struct pci_dev *dev); - -/* - * PCI domain support. Sometimes called PCI segment (eg by ACPI), - * a PCI domain is defined to be a set of PCI busses which share - * configuration space. - */ -#ifndef CONFIG_PCI_DOMAINS -static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } -static inline int pci_proc_domain(struct pci_bus *bus) -{ - return 0; -} -#endif - -#else /* CONFIG_PCI is not enabled */ - -/* - * If the system does not have PCI, clearly these return errors. Define - * these as simple inline functions to avoid hair in drivers. - */ - -#define _PCI_NOP(o,s,t) \ - static inline int pci_##o##_config_##s (struct pci_dev *dev, int where, t val) \ - { return PCIBIOS_FUNC_NOT_SUPPORTED; } -#define _PCI_NOP_ALL(o,x) _PCI_NOP(o,byte,u8 x) \ - _PCI_NOP(o,word,u16 x) \ - _PCI_NOP(o,dword,u32 x) -_PCI_NOP_ALL(read, *) -_PCI_NOP_ALL(write,) - -static inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev *from) -{ return NULL; } - -static inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn) -{ return NULL; } - -static inline struct pci_dev *pci_get_device(unsigned int vendor, - unsigned int device, struct pci_dev *from) -{ return NULL; } - -static inline struct pci_dev *pci_get_device_reverse(unsigned int vendor, - unsigned int device, struct pci_dev *from) -{ return NULL; } - -static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, -unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from) -{ return NULL; } - -static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) -{ return NULL; } - -#define pci_dev_present(ids) (0) -#define pci_dev_put(dev) do { } while (0) - -static inline void pci_set_master(struct pci_dev *dev) { } -static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } -static inline void pci_disable_device(struct pci_dev *dev) { } -static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } -static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} -static inline int __pci_register_driver(struct pci_driver *drv, struct module *owner) { return 0;} -static inline int pci_register_driver(struct pci_driver *drv) { return 0;} -static inline void pci_unregister_driver(struct pci_driver *drv) { } -static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } -static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } -static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } -static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } - -/* Power management related routines */ -static inline int pci_save_state(struct pci_dev *dev) { return 0; } -static inline int pci_restore_state(struct pci_dev *dev) { return 0; } -static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { return 0; } -static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } -static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } - -#define isa_bridge ((struct pci_dev *)NULL) - -#define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) - -static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } -static inline void pci_unblock_user_cfg_access(struct pci_dev *dev) { } - -#endif /* CONFIG_PCI */ - -/* Include architecture-dependent settings and functions */ - -#include - -/* these helpers provide future and backwards compatibility - * for accessing popular PCI BAR info */ -#define pci_resource_start(dev,bar) ((dev)->resource[(bar)].start) -#define pci_resource_end(dev,bar) ((dev)->resource[(bar)].end) -#define pci_resource_flags(dev,bar) ((dev)->resource[(bar)].flags) -#define pci_resource_len(dev,bar) \ - ((pci_resource_start((dev),(bar)) == 0 && \ - pci_resource_end((dev),(bar)) == \ - pci_resource_start((dev),(bar))) ? 0 : \ - \ - (pci_resource_end((dev),(bar)) - \ - pci_resource_start((dev),(bar)) + 1)) - -/* Similar to the helpers above, these manipulate per-pci_dev - * driver-specific data. They are really just a wrapper around - * the generic device structure functions of these calls. - */ -static inline void *pci_get_drvdata (struct pci_dev *pdev) -{ - return dev_get_drvdata(&pdev->dev); -} - -static inline void pci_set_drvdata (struct pci_dev *pdev, void *data) -{ - dev_set_drvdata(&pdev->dev, data); -} - -/* If you want to know what to call your pci_dev, ask this function. - * Again, it's a wrapper around the generic device. - */ -static inline char *pci_name(struct pci_dev *pdev) -{ - return pdev->dev.bus_id; -} - - -/* Some archs don't want to expose struct resource to userland as-is - * in sysfs and /proc - */ -#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER -static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, - const struct resource *rsrc, resource_size_t *start, - resource_size_t *end) -{ - *start = rsrc->start; - *end = rsrc->end; -} -#endif /* HAVE_ARCH_PCI_RESOURCE_TO_USER */ - - -/* - * The world is not perfect and supplies us with broken PCI devices. - * For at least a part of these bugs we need a work-around, so both - * generic (drivers/pci/quirks.c) and per-architecture code can define - * fixup hooks to be called for particular buggy devices. - */ - -struct pci_fixup { - u16 vendor, device; /* You can use PCI_ANY_ID here of course */ - void (*hook)(struct pci_dev *dev); -}; - -enum pci_fixup_pass { - pci_fixup_early, /* Before probing BARs */ - pci_fixup_header, /* After reading configuration header */ - pci_fixup_final, /* Final phase of device fixups */ - pci_fixup_enable, /* pci_enable_device() time */ -}; - -/* Anonymous variables would be nice... */ -#define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, hook) \ - static const struct pci_fixup __pci_fixup_##name __attribute_used__ \ - __attribute__((__section__(#section))) = { vendor, device, hook }; -#define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ - DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ - vendor##device##hook, vendor, device, hook) -#define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook) \ - DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ - vendor##device##hook, vendor, device, hook) -#define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \ - DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ - vendor##device##hook, vendor, device, hook) -#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ - DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ - vendor##device##hook, vendor, device, hook) - - -void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); - -extern int pci_pci_problems; -#define PCIPCI_FAIL 1 /* No PCI PCI DMA */ -#define PCIPCI_TRITON 2 -#define PCIPCI_NATOMA 4 -#define PCIPCI_VIAETBF 8 -#define PCIPCI_VSFX 16 -#define PCIPCI_ALIMAGIK 32 /* Need low latency setting */ -#define PCIAGP_FAIL 64 /* No PCI to AGP DMA */ - -#endif /* __KERNEL__ */ #endif /* LINUX_PCI_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/pktcdvd.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/pktcdvd.h 2007-05-24 15:40:44.000000000 +0200 @@ -107,172 +107,5 @@ #define PACKET_IOCTL_MAGIC ('X') #define PACKET_CTRL_CMD _IOWR(PACKET_IOCTL_MAGIC, 1, struct pkt_ctrl_command) -#ifdef __KERNEL__ -#include -#include -#include - -struct packet_settings -{ - __u32 size; /* packet size in (512 byte) sectors */ - __u8 fp; /* fixed packets */ - __u8 link_loss; /* the rest is specified - * as per Mt Fuji */ - __u8 write_type; - __u8 track_mode; - __u8 block_mode; -}; - -/* - * Very crude stats for now - */ -struct packet_stats -{ - unsigned long pkt_started; - unsigned long pkt_ended; - unsigned long secs_w; - unsigned long secs_rg; - unsigned long secs_r; -}; - -struct packet_cdrw -{ - struct list_head pkt_free_list; - struct list_head pkt_active_list; - spinlock_t active_list_lock; /* Serialize access to pkt_active_list */ - struct task_struct *thread; - atomic_t pending_bios; -}; - -/* - * Switch to high speed reading after reading this many kilobytes - * with no interspersed writes. - */ -#define HI_SPEED_SWITCH 512 - -struct packet_iosched -{ - atomic_t attention; /* Set to non-zero when queue processing is needed */ - int writing; /* Non-zero when writing, zero when reading */ - spinlock_t lock; /* Protecting read/write queue manipulations */ - struct bio *read_queue; - struct bio *read_queue_tail; - struct bio *write_queue; - struct bio *write_queue_tail; - sector_t last_write; /* The sector where the last write ended */ - int successive_reads; -}; - -/* - * 32 buffers of 2048 bytes - */ -#if (PAGE_SIZE % CD_FRAMESIZE) != 0 -#error "PAGE_SIZE must be a multiple of CD_FRAMESIZE" -#endif -#define PACKET_MAX_SIZE 128 -#define FRAMES_PER_PAGE (PAGE_SIZE / CD_FRAMESIZE) -#define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) - -enum packet_data_state { - PACKET_IDLE_STATE, /* Not used at the moment */ - PACKET_WAITING_STATE, /* Waiting for more bios to arrive, so */ - /* we don't have to do as much */ - /* data gathering */ - PACKET_READ_WAIT_STATE, /* Waiting for reads to fill in holes */ - PACKET_WRITE_WAIT_STATE, /* Waiting for the write to complete */ - PACKET_RECOVERY_STATE, /* Recover after read/write errors */ - PACKET_FINISHED_STATE, /* After write has finished */ - - PACKET_NUM_STATES /* Number of possible states */ -}; - -/* - * Information needed for writing a single packet - */ -struct pktcdvd_device; - -struct packet_data -{ - struct list_head list; - - spinlock_t lock; /* Lock protecting state transitions and */ - /* orig_bios list */ - - struct bio *orig_bios; /* Original bios passed to pkt_make_request */ - struct bio *orig_bios_tail;/* that will be handled by this packet */ - int write_size; /* Total size of all bios in the orig_bios */ - /* list, measured in number of frames */ - - struct bio *w_bio; /* The bio we will send to the real CD */ - /* device once we have all data for the */ - /* packet we are going to write */ - sector_t sector; /* First sector in this packet */ - int frames; /* Number of frames in this packet */ - - enum packet_data_state state; /* Current state */ - atomic_t run_sm; /* Incremented whenever the state */ - /* machine needs to be run */ - long sleep_time; /* Set this to non-zero to make the state */ - /* machine run after this many jiffies. */ - - atomic_t io_wait; /* Number of pending IO operations */ - atomic_t io_errors; /* Number of read/write errors during IO */ - - struct bio *r_bios[PACKET_MAX_SIZE]; /* bios to use during data gathering */ - struct page *pages[PACKET_MAX_SIZE / FRAMES_PER_PAGE]; - - int cache_valid; /* If non-zero, the data for the zone defined */ - /* by the sector variable is completely cached */ - /* in the pages[] vector. */ - - int id; /* ID number for debugging */ - struct pktcdvd_device *pd; -}; - -struct pkt_rb_node { - struct rb_node rb_node; - struct bio *bio; -}; - -struct packet_stacked_data -{ - struct bio *bio; /* Original read request bio */ - struct pktcdvd_device *pd; -}; -#define PSD_POOL_SIZE 64 - -struct pktcdvd_device -{ - struct block_device *bdev; /* dev attached */ - dev_t pkt_dev; /* our dev */ - char name[20]; - struct packet_settings settings; - struct packet_stats stats; - int refcnt; /* Open count */ - int write_speed; /* current write speed, kB/s */ - int read_speed; /* current read speed, kB/s */ - unsigned long offset; /* start offset */ - __u8 mode_offset; /* 0 / 8 */ - __u8 type; - unsigned long flags; - __u16 mmc3_profile; - __u32 nwa; /* next writable address */ - __u32 lra; /* last recorded address */ - struct packet_cdrw cdrw; - wait_queue_head_t wqueue; - - spinlock_t lock; /* Serialize access to bio_queue */ - struct rb_root bio_queue; /* Work queue of bios we need to handle */ - int bio_queue_size; /* Number of nodes in bio_queue */ - sector_t current_sector; /* Keep track of where the elevator is */ - atomic_t scan_queue; /* Set to non-zero when pkt_handle_queue */ - /* needs to be run. */ - mempool_t *rb_pool; /* mempool for pkt_rb_node allocations */ - - struct packet_iosched iosched; - struct gendisk *disk; -}; - -#endif /* __KERNEL__ */ #endif /* __PKTCDVD_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/pmu.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/pmu.h 2007-05-24 15:40:44.000000000 +0200 @@ -133,104 +133,3 @@ /* no param, but historically was _IOR('B', 6, 0), meaning 4 bytes */ #define PMU_IOC_GRAB_BACKLIGHT _IOR('B', 6, size_t) -#ifdef __KERNEL__ - -extern int find_via_pmu(void); - -extern int pmu_request(struct adb_request *req, - void (*done)(struct adb_request *), int nbytes, ...); -extern int pmu_queue_request(struct adb_request *req); -extern void pmu_poll(void); -extern void pmu_poll_adb(void); /* For use by xmon */ -extern void pmu_wait_complete(struct adb_request *req); - -/* For use before switching interrupts off for a long time; - * warning: not stackable - */ -extern void pmu_suspend(void); -extern void pmu_resume(void); - -extern void pmu_enable_irled(int on); - -extern void pmu_restart(void); -extern void pmu_shutdown(void); -extern void pmu_unlock(void); - -extern int pmu_present(void); -extern int pmu_get_model(void); - -#ifdef CONFIG_PM -/* - * Stuff for putting the powerbook to sleep and waking it again. - * - */ -#include - -struct pmu_sleep_notifier -{ - int (*notifier_call)(struct pmu_sleep_notifier *self, int when); - int priority; - struct list_head list; -}; - -/* Code values for calling sleep/wakeup handlers - * - * Note: If a sleep request got cancelled, all drivers will get - * the PBOOK_SLEEP_REJECT, even those who didn't get the PBOOK_SLEEP_REQUEST. - */ -#define PBOOK_SLEEP_REQUEST 1 -#define PBOOK_SLEEP_NOW 2 -#define PBOOK_SLEEP_REJECT 3 -#define PBOOK_WAKE 4 - -/* Result codes returned by the notifiers */ -#define PBOOK_SLEEP_OK 0 -#define PBOOK_SLEEP_REFUSE -1 - -/* priority levels in notifiers */ -#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */ -#define SLEEP_LEVEL_MEDIABAY 90 /* Media bay driver */ -#define SLEEP_LEVEL_BLOCK 80 /* IDE, SCSI */ -#define SLEEP_LEVEL_NET 70 /* bmac, gmac */ -#define SLEEP_LEVEL_MISC 60 /* Anything else */ -#define SLEEP_LEVEL_USERLAND 55 /* Reserved for apm_emu */ -#define SLEEP_LEVEL_ADB 50 /* ADB (async) */ -#define SLEEP_LEVEL_SOUND 40 /* Sound driver (blocking) */ - -/* special register notifier functions */ -int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier); -int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier); - -#endif /* CONFIG_PM */ - -#define PMU_MAX_BATTERIES 2 - -/* values for pmu_power_flags */ -#define PMU_PWR_AC_PRESENT 0x00000001 - -/* values for pmu_battery_info.flags */ -#define PMU_BATT_PRESENT 0x00000001 -#define PMU_BATT_CHARGING 0x00000002 -#define PMU_BATT_TYPE_MASK 0x000000f0 -#define PMU_BATT_TYPE_SMART 0x00000010 /* Smart battery */ -#define PMU_BATT_TYPE_HOOPER 0x00000020 /* 3400/3500 */ -#define PMU_BATT_TYPE_COMET 0x00000030 /* 2400 */ - -struct pmu_battery_info -{ - unsigned int flags; - unsigned int charge; /* current charge */ - unsigned int max_charge; /* maximum charge */ - signed int amperage; /* current, positive if charging */ - unsigned int voltage; /* voltage */ - unsigned int time_remaining; /* remaining time */ -}; - -extern int pmu_battery_count; -extern struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; -extern unsigned int pmu_power_flags; - -/* Backlight */ -extern void pmu_backlight_init(void); - -#endif /* __KERNEL__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/poll.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/poll.h 2007-05-24 15:40:44.000000000 +0200 @@ -3,118 +3,5 @@ #include -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include - -/* ~832 bytes of stack space used max in sys_select/sys_poll before allocating - additional memory. */ -#define MAX_STACK_ALLOC 832 -#define FRONTEND_STACK_ALLOC 256 -#define SELECT_STACK_ALLOC FRONTEND_STACK_ALLOC -#define POLL_STACK_ALLOC FRONTEND_STACK_ALLOC -#define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) -#define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) - -struct poll_table_struct; - -/* - * structures and helpers for f_op->poll implementations - */ -typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *); - -typedef struct poll_table_struct { - poll_queue_proc qproc; -} poll_table; - -static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) -{ - if (p && wait_address) - p->qproc(filp, wait_address, p); -} - -static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) -{ - pt->qproc = qproc; -} - -struct poll_table_entry { - struct file * filp; - wait_queue_t wait; - wait_queue_head_t * wait_address; -}; - -/* - * Structures and helpers for sys_poll/sys_poll - */ -struct poll_wqueues { - poll_table pt; - struct poll_table_page * table; - int error; - int inline_index; - struct poll_table_entry inline_entries[N_INLINE_POLL_ENTRIES]; -}; - -extern void poll_initwait(struct poll_wqueues *pwq); -extern void poll_freewait(struct poll_wqueues *pwq); - -/* - * Scaleable version of the fd_set. - */ - -typedef struct { - unsigned long *in, *out, *ex; - unsigned long *res_in, *res_out, *res_ex; -} fd_set_bits; - -/* - * How many longwords for "nr" bits? - */ -#define FDS_BITPERLONG (8*sizeof(long)) -#define FDS_LONGS(nr) (((nr)+FDS_BITPERLONG-1)/FDS_BITPERLONG) -#define FDS_BYTES(nr) (FDS_LONGS(nr)*sizeof(long)) - -/* - * We do a VERIFY_WRITE here even though we are only reading this time: - * we'll write to it eventually.. - * - * Use "unsigned long" accesses to let user-mode fd_set's be long-aligned. - */ -static inline -int get_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset) -{ - nr = FDS_BYTES(nr); - if (ufdset) - return copy_from_user(fdset, ufdset, nr) ? -EFAULT : 0; - - memset(fdset, 0, nr); - return 0; -} - -static inline unsigned long __must_check -set_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset) -{ - if (ufdset) - return __copy_to_user(ufdset, fdset, FDS_BYTES(nr)); - return 0; -} - -static inline -void zero_fd_set(unsigned long nr, unsigned long *fdset) -{ - memset(fdset, 0, FDS_BYTES(nr)); -} - -#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1) - -extern int do_select(int n, fd_set_bits *fds, s64 *timeout); -extern int do_sys_poll(struct pollfd __user * ufds, unsigned int nfds, - s64 *timeout); - -#endif /* KERNEL */ #endif /* _LINUX_POLL_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ppp-comp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ppp-comp.h 2007-05-24 15:40:44.000000000 +0200 @@ -208,9 +208,5 @@ #define CI_PREDICTOR_2 2 /* config option for Predictor-2 */ #define CILEN_PREDICTOR_2 2 /* length of its config option */ -#ifdef __KERNEL__ -extern int ppp_register_compressor(struct compressor *); -extern void ppp_unregister_compressor(struct compressor *); -#endif /* __KERNEL__ */ #endif /* _NET_PPP_COMP_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ppp_defs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ppp_defs.h 2007-05-24 15:40:44.000000000 +0200 @@ -96,10 +96,6 @@ #define PPP_INITFCS 0xffff /* Initial FCS value */ #define PPP_GOODFCS 0xf0b8 /* Good final FCS value */ -#ifdef __KERNEL__ -#include -#define PPP_FCS(fcs, c) crc_ccitt_byte(fcs, c) -#endif /* * Extended asyncmap - allows any character to be escaped. --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/ptrace.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/ptrace.h 2007-05-24 15:40:44.000000000 +0200 @@ -48,84 +48,5 @@ #include -#ifdef __KERNEL__ -/* - * Ptrace flags - * - * The owner ship rules for task->ptrace which holds the ptrace - * flags is simple. When a task is running it owns it's task->ptrace - * flags. When the a task is stopped the ptracer owns task->ptrace. - */ - -#define PT_PTRACED 0x00000001 -#define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */ -#define PT_TRACESYSGOOD 0x00000004 -#define PT_PTRACE_CAP 0x00000008 /* ptracer can follow suid-exec */ -#define PT_TRACE_FORK 0x00000010 -#define PT_TRACE_VFORK 0x00000020 -#define PT_TRACE_CLONE 0x00000040 -#define PT_TRACE_EXEC 0x00000080 -#define PT_TRACE_VFORK_DONE 0x00000100 -#define PT_TRACE_EXIT 0x00000200 -#define PT_ATTACHED 0x00000400 /* parent != real_parent */ - -#define PT_TRACE_MASK 0x000003f4 - -/* single stepping state bits (used on ARM and PA-RISC) */ -#define PT_SINGLESTEP_BIT 31 -#define PT_SINGLESTEP (1< /* For unlikely. */ -#include /* For struct task_struct. */ - - -extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); -extern struct task_struct *ptrace_get_task_struct(pid_t pid); -extern int ptrace_traceme(void); -extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); -extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); -extern int ptrace_attach(struct task_struct *tsk); -extern int ptrace_detach(struct task_struct *, unsigned int); -extern void ptrace_disable(struct task_struct *); -extern int ptrace_check_attach(struct task_struct *task, int kill); -extern int ptrace_request(struct task_struct *child, long request, long addr, long data); -extern void ptrace_notify(int exit_code); -extern void __ptrace_link(struct task_struct *child, - struct task_struct *new_parent); -extern void __ptrace_unlink(struct task_struct *child); -extern void ptrace_untrace(struct task_struct *child); -extern int ptrace_may_attach(struct task_struct *task); - -static inline void ptrace_link(struct task_struct *child, - struct task_struct *new_parent) -{ - if (unlikely(child->ptrace)) - __ptrace_link(child, new_parent); -} -static inline void ptrace_unlink(struct task_struct *child) -{ - if (unlikely(child->ptrace)) - __ptrace_unlink(child); -} - - -#ifndef force_successful_syscall_return -/* - * System call handlers that, upon successful completion, need to return a - * negative value should call force_successful_syscall_return() right before - * returning. On architectures where the syscall convention provides for a - * separate error flag (e.g., alpha, ia64, ppc{,64}, sparc{,64}, possibly - * others), this macro can be used to ensure that the error flag will not get - * set. On architectures which do not support a separate error flag, the macro - * is a no-op and the spurious error condition needs to be filtered out by some - * other means (e.g., in user-level, by passing an extra argument to the - * syscall handler, or something along those lines). - */ -#define force_successful_syscall_return() do { } while (0) -#endif - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/qnx4_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/qnx4_fs.h 2007-05-24 15:40:44.000000000 +0200 @@ -87,64 +87,5 @@ struct qnx4_inode_entry AltBoot; }; -#ifdef __KERNEL__ - -#define QNX4_DEBUG 0 - -#if QNX4_DEBUG -#define QNX4DEBUG(X) printk X -#else -#define QNX4DEBUG(X) (void) 0 -#endif - -struct qnx4_sb_info { - struct buffer_head *sb_buf; /* superblock buffer */ - struct qnx4_super_block *sb; /* our superblock */ - unsigned int Version; /* may be useful */ - struct qnx4_inode_entry *BitMap; /* useful */ -}; - -struct qnx4_inode_info { - struct qnx4_inode_entry raw; - loff_t mmu_private; - struct inode vfs_inode; -}; - -extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd); -extern unsigned long qnx4_count_free_blocks(struct super_block *sb); -extern unsigned long qnx4_block_map(struct inode *inode, long iblock); - -extern struct buffer_head *qnx4_bread(struct inode *, int, int); - -extern struct inode_operations qnx4_file_inode_operations; -extern struct inode_operations qnx4_dir_inode_operations; -extern const struct file_operations qnx4_file_operations; -extern const struct file_operations qnx4_dir_operations; -extern int qnx4_is_free(struct super_block *sb, long block); -extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy); -extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd); -extern void qnx4_truncate(struct inode *inode); -extern void qnx4_free_inode(struct inode *inode); -extern int qnx4_unlink(struct inode *dir, struct dentry *dentry); -extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry); -extern int qnx4_sync_file(struct file *file, struct dentry *dentry, int); -extern int qnx4_sync_inode(struct inode *inode); - -static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb) -{ - return sb->s_fs_info; -} - -static inline struct qnx4_inode_info *qnx4_i(struct inode *inode) -{ - return container_of(inode, struct qnx4_inode_info, vfs_inode); -} - -static inline struct qnx4_inode_entry *qnx4_raw_inode(struct inode *inode) -{ - return &qnx4_i(inode)->raw; -} - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/quota.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/quota.h 2007-05-24 15:40:44.000000000 +0200 @@ -130,194 +130,6 @@ __u32 dqi_valid; }; -#ifdef __KERNEL__ -#include -#include - -#include -#include -#include - -/* Maximal numbers of writes for quota operation (insert/delete/update) - * (over VFS all formats) */ -#define DQUOT_INIT_ALLOC max(V1_INIT_ALLOC, V2_INIT_ALLOC) -#define DQUOT_INIT_REWRITE max(V1_INIT_REWRITE, V2_INIT_REWRITE) -#define DQUOT_DEL_ALLOC max(V1_DEL_ALLOC, V2_DEL_ALLOC) -#define DQUOT_DEL_REWRITE max(V1_DEL_REWRITE, V2_DEL_REWRITE) - -/* - * Data for one user/group kept in memory - */ -struct mem_dqblk { - __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ - __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ - qsize_t dqb_curspace; /* current used space */ - __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ - __u32 dqb_isoftlimit; /* preferred inode limit */ - __u32 dqb_curinodes; /* current # allocated inodes */ - time_t dqb_btime; /* time limit for excessive disk use */ - time_t dqb_itime; /* time limit for excessive inode use */ -}; - -/* - * Data for one quotafile kept in memory - */ -struct quota_format_type; - -struct mem_dqinfo { - struct quota_format_type *dqi_format; - struct list_head dqi_dirty_list; /* List of dirty dquots */ - unsigned long dqi_flags; - unsigned int dqi_bgrace; - unsigned int dqi_igrace; - union { - struct v1_mem_dqinfo v1_i; - struct v2_mem_dqinfo v2_i; - } u; -}; - -struct super_block; - -#define DQF_MASK 0xffff /* Mask for format specific flags */ -#define DQF_INFO_DIRTY_B 16 -#define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ - -extern void mark_info_dirty(struct super_block *sb, int type); -#define info_dirty(info) test_bit(DQF_INFO_DIRTY_B, &(info)->dqi_flags) -#define info_any_dquot_dirty(info) (!list_empty(&(info)->dqi_dirty_list)) -#define info_any_dirty(info) (info_dirty(info) || info_any_dquot_dirty(info)) - -#define sb_dqopt(sb) (&(sb)->s_dquot) -#define sb_dqinfo(sb, type) (sb_dqopt(sb)->info+(type)) - -struct dqstats { - int lookups; - int drops; - int reads; - int writes; - int cache_hits; - int allocated_dquots; - int free_dquots; - int syncs; -}; - -extern struct dqstats dqstats; - -#define DQ_MOD_B 0 /* dquot modified since read */ -#define DQ_BLKS_B 1 /* uid/gid has been warned about blk limit */ -#define DQ_INODES_B 2 /* uid/gid has been warned about inode limit */ -#define DQ_FAKE_B 3 /* no limits only usage */ -#define DQ_READ_B 4 /* dquot was read into memory */ -#define DQ_ACTIVE_B 5 /* dquot is active (dquot_release not called) */ - -struct dquot { - struct hlist_node dq_hash; /* Hash list in memory */ - struct list_head dq_inuse; /* List of all quotas */ - struct list_head dq_free; /* Free list element */ - struct list_head dq_dirty; /* List of dirty dquots */ - struct mutex dq_lock; /* dquot IO lock */ - atomic_t dq_count; /* Use count */ - wait_queue_head_t dq_wait_unused; /* Wait queue for dquot to become unused */ - struct super_block *dq_sb; /* superblock this applies to */ - unsigned int dq_id; /* ID this applies to (uid, gid) */ - loff_t dq_off; /* Offset of dquot on disk */ - unsigned long dq_flags; /* See DQ_* */ - short dq_type; /* Type of quota */ - struct mem_dqblk dq_dqb; /* Diskquota usage */ -}; - -#define NODQUOT (struct dquot *)NULL - -#define QUOTA_OK 0 -#define NO_QUOTA 1 - -/* Operations which must be implemented by each quota format */ -struct quota_format_ops { - int (*check_quota_file)(struct super_block *sb, int type); /* Detect whether file is in our format */ - int (*read_file_info)(struct super_block *sb, int type); /* Read main info about file - called on quotaon() */ - int (*write_file_info)(struct super_block *sb, int type); /* Write main info about file */ - int (*free_file_info)(struct super_block *sb, int type); /* Called on quotaoff() */ - int (*read_dqblk)(struct dquot *dquot); /* Read structure for one user */ - int (*commit_dqblk)(struct dquot *dquot); /* Write structure for one user */ - int (*release_dqblk)(struct dquot *dquot); /* Called when last reference to dquot is being dropped */ -}; - -/* Operations working with dquots */ -struct dquot_operations { - int (*initialize) (struct inode *, int); - int (*drop) (struct inode *); - int (*alloc_space) (struct inode *, qsize_t, int); - int (*alloc_inode) (const struct inode *, unsigned long); - int (*free_space) (struct inode *, qsize_t); - int (*free_inode) (const struct inode *, unsigned long); - int (*transfer) (struct inode *, struct iattr *); - int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ - int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */ - int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ - int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ - int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ -}; - -/* Operations handling requests from userspace */ -struct quotactl_ops { - int (*quota_on)(struct super_block *, int, int, char *); - int (*quota_off)(struct super_block *, int); - int (*quota_sync)(struct super_block *, int); - int (*get_info)(struct super_block *, int, struct if_dqinfo *); - int (*set_info)(struct super_block *, int, struct if_dqinfo *); - int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); - int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); - int (*get_xstate)(struct super_block *, struct fs_quota_stat *); - int (*set_xstate)(struct super_block *, unsigned int, int); - int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *); - int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *); -}; - -struct quota_format_type { - int qf_fmt_id; /* Quota format id */ - struct quota_format_ops *qf_ops; /* Operations of format */ - struct module *qf_owner; /* Module implementing quota format */ - struct quota_format_type *qf_next; -}; - -#define DQUOT_USR_ENABLED 0x01 /* User diskquotas enabled */ -#define DQUOT_GRP_ENABLED 0x02 /* Group diskquotas enabled */ - -struct quota_info { - unsigned int flags; /* Flags for diskquotas on this device */ - struct mutex dqio_mutex; /* lock device while I/O in progress */ - struct mutex dqonoff_mutex; /* Serialize quotaon & quotaoff */ - struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ - struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ - struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ - struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ -}; - -/* Inline would be better but we need to dereference super_block which is not defined yet */ -int mark_dquot_dirty(struct dquot *dquot); - -#define dquot_dirty(dquot) test_bit(DQ_MOD_B, &(dquot)->dq_flags) - -#define sb_has_quota_enabled(sb, type) ((type)==USRQUOTA ? \ - (sb_dqopt(sb)->flags & DQUOT_USR_ENABLED) : (sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED)) - -#define sb_any_quota_enabled(sb) (sb_has_quota_enabled(sb, USRQUOTA) | \ - sb_has_quota_enabled(sb, GRPQUOTA)) - -int register_quota_format(struct quota_format_type *fmt); -void unregister_quota_format(struct quota_format_type *fmt); - -struct quota_module_name { - int qm_fmt_id; - char *qm_mod_name; -}; - -#define INIT_QUOTA_MODULE_NAMES {\ - {QFMT_VFS_OLD, "quota_v1"},\ - {QFMT_VFS_V0, "quota_v2"},\ - {0, NULL}} - -#else # /* nodep */ include @@ -325,5 +137,4 @@ long quotactl __P ((unsigned int, const char *, int, caddr_t)); __END_DECLS -#endif /* __KERNEL__ */ #endif /* _QUOTA_ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/random.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/random.h 2007-05-24 15:40:44.000000000 +0200 @@ -40,40 +40,5 @@ /* Exported functions */ -#ifdef __KERNEL__ - -extern void rand_initialize_irq(int irq); - -extern void add_input_randomness(unsigned int type, unsigned int code, - unsigned int value); -extern void add_interrupt_randomness(int irq); - -extern void get_random_bytes(void *buf, int nbytes); -void generate_random_uuid(unsigned char uuid_out[16]); - -extern __u32 secure_ip_id(__u32 daddr); -extern u32 secure_ipv4_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport); -extern u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, - __u16 dport); -extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, - __u16 sport, __u16 dport); -extern __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr, - __u16 sport, __u16 dport); -extern u64 secure_dccp_sequence_number(__u32 saddr, __u32 daddr, - __u16 sport, __u16 dport); - -extern unsigned long pax_get_random_long(void); - -#ifndef MODULE -extern struct file_operations random_fops, urandom_fops; -#endif - -unsigned int get_random_int(void); -unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len); - -u32 random32(void); -void srandom32(u32 seed); - -#endif /* __KERNEL___ */ #endif /* _LINUX_RANDOM_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/reboot.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/reboot.h 2007-05-24 15:40:44.000000000 +0200 @@ -35,45 +35,5 @@ #define LINUX_REBOOT_CMD_KEXEC 0x45584543 -#ifdef __KERNEL__ - -#include - -extern int register_reboot_notifier(struct notifier_block *); -extern int unregister_reboot_notifier(struct notifier_block *); - - -/* - * Architecture-specific implementations of sys_reboot commands. - */ - -extern void machine_restart(char *cmd); -extern void machine_halt(void); -extern void machine_power_off(void); - -extern void machine_shutdown(void); -struct pt_regs; -extern void machine_crash_shutdown(struct pt_regs *); - -/* - * Architecture independent implemenations of sys_reboot commands. - */ - -extern void kernel_shutdown_prepare(enum system_states state); - -extern void kernel_restart(char *cmd); -extern void kernel_halt(void); -extern void kernel_power_off(void); - -void ctrl_alt_del(void); - -/* - * Emergency restart, callable from an interrupt handler. - */ - -extern void emergency_restart(void); -#include - -#endif #endif /* _LINUX_REBOOT_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/reiserfs_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/reiserfs_fs.h 2007-05-24 15:40:44.000000000 +0200 @@ -14,19 +14,6 @@ #include #include -#ifdef __KERNEL__ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif /* * include/linux/reiser_fs.h @@ -93,7 +80,7 @@ #define RFALSE( cond, format, args... ) do {;} while( 0 ) #endif -#define CONSTF __attribute_const__ +#define CONSTF /* * Disk Data Structures */ @@ -271,12 +258,12 @@ #define STAT_DATA_V1 0 #define STAT_DATA_V2 1 -static inline struct reiserfs_inode_info *REISERFS_I(const struct inode *inode) +static __inline__ struct reiserfs_inode_info *REISERFS_I(const struct inode *inode) { return container_of(inode, struct reiserfs_inode_info, vfs_inode); } -static inline struct reiserfs_sb_info *REISERFS_SB(const struct super_block *sb) +static __inline__ struct reiserfs_sb_info *REISERFS_SB(const struct super_block *sb) { return sb->s_fs_info; } @@ -367,24 +354,24 @@ __le64 v; } __attribute__ ((__packed__)); -static inline __u16 offset_v2_k_type(const struct offset_v2 *v2) +static __inline__ __u16 offset_v2_k_type(const struct offset_v2 *v2) { __u8 type = le64_to_cpu(v2->v) >> 60; return (type <= TYPE_MAXTYPE) ? type : TYPE_ANY; } -static inline void set_offset_v2_k_type(struct offset_v2 *v2, int type) +static __inline__ void set_offset_v2_k_type(struct offset_v2 *v2, int type) { v2->v = (v2->v & cpu_to_le64(~0ULL >> 4)) | cpu_to_le64((__u64) type << 60); } -static inline loff_t offset_v2_k_offset(const struct offset_v2 *v2) +static __inline__ loff_t offset_v2_k_offset(const struct offset_v2 *v2) { return le64_to_cpu(v2->v) & (~0ULL >> 4); } -static inline void set_offset_v2_k_offset(struct offset_v2 *v2, loff_t offset) +static __inline__ void set_offset_v2_k_offset(struct offset_v2 *v2, loff_t offset) { offset &= (~0ULL >> 4); v2->v = (v2->v & cpu_to_le64(15ULL << 60)) | cpu_to_le64(offset); @@ -525,8 +512,8 @@ // // here are conversion routines // -static inline int uniqueness2type(__u32 uniqueness) CONSTF; -static inline int uniqueness2type(__u32 uniqueness) +static __inline__ int uniqueness2type(__u32 uniqueness) CONSTF; +static __inline__ int uniqueness2type(__u32 uniqueness) { switch ((int)uniqueness) { case V1_SD_UNIQUENESS: @@ -545,8 +532,8 @@ } } -static inline __u32 type2uniqueness(int type) CONSTF; -static inline __u32 type2uniqueness(int type) +static __inline__ __u32 type2uniqueness(int type) CONSTF; +static __inline__ __u32 type2uniqueness(int type) { switch (type) { case TYPE_STAT_DATA: @@ -569,7 +556,7 @@ // there is no way to get version of object from key, so, provide // version to these defines // -static inline loff_t le_key_k_offset(int version, +static __inline__ loff_t le_key_k_offset(int version, const struct reiserfs_key *key) { return (version == KEY_FORMAT_3_5) ? @@ -577,36 +564,36 @@ offset_v2_k_offset(&(key->u.k_offset_v2)); } -static inline loff_t le_ih_k_offset(const struct item_head *ih) +static __inline__ loff_t le_ih_k_offset(const struct item_head *ih) { return le_key_k_offset(ih_version(ih), &(ih->ih_key)); } -static inline loff_t le_key_k_type(int version, const struct reiserfs_key *key) +static __inline__ loff_t le_key_k_type(int version, const struct reiserfs_key *key) { return (version == KEY_FORMAT_3_5) ? uniqueness2type(le32_to_cpu(key->u.k_offset_v1.k_uniqueness)) : offset_v2_k_type(&(key->u.k_offset_v2)); } -static inline loff_t le_ih_k_type(const struct item_head *ih) +static __inline__ loff_t le_ih_k_type(const struct item_head *ih) { return le_key_k_type(ih_version(ih), &(ih->ih_key)); } -static inline void set_le_key_k_offset(int version, struct reiserfs_key *key, +static __inline__ void set_le_key_k_offset(int version, struct reiserfs_key *key, loff_t offset) { (version == KEY_FORMAT_3_5) ? (void)(key->u.k_offset_v1.k_offset = cpu_to_le32(offset)) : /* jdm check */ (void)(set_offset_v2_k_offset(&(key->u.k_offset_v2), offset)); } -static inline void set_le_ih_k_offset(struct item_head *ih, loff_t offset) +static __inline__ void set_le_ih_k_offset(struct item_head *ih, loff_t offset) { set_le_key_k_offset(ih_version(ih), &(ih->ih_key), offset); } -static inline void set_le_key_k_type(int version, struct reiserfs_key *key, +static __inline__ void set_le_key_k_type(int version, struct reiserfs_key *key, int type) { (version == KEY_FORMAT_3_5) ? @@ -614,7 +601,7 @@ cpu_to_le32(type2uniqueness(type))) : (void)(set_offset_v2_k_type(&(key->u.k_offset_v2), type)); } -static inline void set_le_ih_k_type(struct item_head *ih, int type) +static __inline__ void set_le_ih_k_type(struct item_head *ih, int type) { set_le_key_k_type(ih_version(ih), &(ih->ih_key), type); } @@ -635,27 +622,27 @@ // // key is pointer to cpu key, result is cpu // -static inline loff_t cpu_key_k_offset(const struct cpu_key *key) +static __inline__ loff_t cpu_key_k_offset(const struct cpu_key *key) { return key->on_disk_key.k_offset; } -static inline loff_t cpu_key_k_type(const struct cpu_key *key) +static __inline__ loff_t cpu_key_k_type(const struct cpu_key *key) { return key->on_disk_key.k_type; } -static inline void set_cpu_key_k_offset(struct cpu_key *key, loff_t offset) +static __inline__ void set_cpu_key_k_offset(struct cpu_key *key, loff_t offset) { key->on_disk_key.k_offset = offset; } -static inline void set_cpu_key_k_type(struct cpu_key *key, int type) +static __inline__ void set_cpu_key_k_type(struct cpu_key *key, int type) { key->on_disk_key.k_type = type; } -static inline void cpu_key_k_offset_dec(struct cpu_key *key) +static __inline__ void cpu_key_k_offset_dec(struct cpu_key *key) { key->on_disk_key.k_offset--; } @@ -1010,7 +997,7 @@ #define I_DEH_N_ENTRY_LENGTH(ih,deh,i) \ ((i) ? (deh_location((deh)-1) - deh_location((deh))) : (ih_item_len((ih)) - deh_location((deh)))) */ -static inline int entry_length(const struct buffer_head *bh, +static __inline__ int entry_length(const struct buffer_head *bh, const struct item_head *ih, int pos_in_item) { struct reiserfs_de_head *deh; @@ -1225,7 +1212,7 @@ // reiserfs version 2 has max offset 60 bits. Version 1 - 32 bit offset #define U32_MAX (~(__u32)0) -static inline loff_t max_reiserfs_offset(struct inode *inode) +static __inline__ loff_t max_reiserfs_offset(struct inode *inode) { if (get_inode_item_key_version(inode) == KEY_FORMAT_3_5) return (loff_t) U32_MAX; @@ -1678,7 +1665,7 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *, struct super_block *, struct buffer_head *bh); -static inline int reiserfs_file_data_log(struct inode *inode) +static __inline__ int reiserfs_file_data_log(struct inode *inode) { if (reiserfs_data_log(inode->i_sb) || (REISERFS_I(inode)->i_flags & i_data_log)) @@ -1686,7 +1673,7 @@ return 0; } -static inline int reiserfs_transaction_running(struct super_block *s) +static __inline__ int reiserfs_transaction_running(struct super_block *s) { struct reiserfs_transaction_handle *th = current->journal_info; if (th && th->t_super == s) @@ -1696,7 +1683,7 @@ return 0; } -static inline int reiserfs_transaction_free_space(struct reiserfs_transaction_handle *th) +static __inline__ int reiserfs_transaction_free_space(struct reiserfs_transaction_handle *th) { return th->t_blocks_allocated - th->t_blocks_logged; } @@ -1774,7 +1761,7 @@ // // get key version from on disk key - kludge // -static inline int le_key_version(const struct reiserfs_key *key) +static __inline__ int le_key_version(const struct reiserfs_key *key) { int type; @@ -1787,7 +1774,7 @@ } -static inline void copy_key(struct reiserfs_key *to, +static __inline__ void copy_key(struct reiserfs_key *to, const struct reiserfs_key *from) { memcpy(to, from, KEY_SIZE); @@ -1892,7 +1879,7 @@ void reiserfs_update_sd_size(struct reiserfs_transaction_handle *th, struct inode *inode, loff_t size); -static inline void reiserfs_update_sd(struct reiserfs_transaction_handle *th, +static __inline__ void reiserfs_update_sd(struct reiserfs_transaction_handle *th, struct inode *inode) { reiserfs_update_sd_size(th, inode, inode->i_size); @@ -2082,7 +2069,7 @@ b_blocknr_t, int for_unformatted); int reiserfs_allocate_blocknrs(reiserfs_blocknr_hint_t *, b_blocknr_t *, int, int); -static inline int reiserfs_new_form_blocknrs(struct tree_balance *tb, +static __inline__ int reiserfs_new_form_blocknrs(struct tree_balance *tb, b_blocknr_t * new_blocknrs, int amount_needed) { @@ -2098,7 +2085,7 @@ 0); } -static inline int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle +static __inline__ int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle *th, struct inode *inode, b_blocknr_t * new_blocknrs, struct path *path, long block) @@ -2115,7 +2102,7 @@ } #ifdef REISERFS_PREALLOCATE -static inline int reiserfs_new_unf_blocknrs2(struct reiserfs_transaction_handle +static __inline__ int reiserfs_new_unf_blocknrs2(struct reiserfs_transaction_handle *th, struct inode *inode, b_blocknr_t * new_blocknrs, struct path *path, long block) --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/reiserfs_xattr.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/reiserfs_xattr.h 2007-05-24 15:40:44.000000000 +0200 @@ -12,131 +12,3 @@ __le32 h_hash; /* hash of the value */ }; -#ifdef __KERNEL__ -#include - -struct reiserfs_xattr_handler { - char *prefix; - int (*init) (void); - void (*exit) (void); - int (*get) (struct inode * inode, const char *name, void *buffer, - size_t size); - int (*set) (struct inode * inode, const char *name, const void *buffer, - size_t size, int flags); - int (*del) (struct inode * inode, const char *name); - int (*list) (struct inode * inode, const char *name, int namelen, - char *out); - struct list_head handlers; -}; - -#ifdef CONFIG_REISERFS_FS_XATTR -#define is_reiserfs_priv_object(inode) IS_PRIVATE(inode) -#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) -ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name, - void *buffer, size_t size); -int reiserfs_setxattr(struct dentry *dentry, const char *name, - const void *value, size_t size, int flags); -ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size); -int reiserfs_removexattr(struct dentry *dentry, const char *name); -int reiserfs_delete_xattrs(struct inode *inode); -int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); -int reiserfs_xattr_init(struct super_block *sb, int mount_flags); -int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); - -int reiserfs_xattr_del(struct inode *, const char *); -int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); -int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); - -extern struct reiserfs_xattr_handler user_handler; -extern struct reiserfs_xattr_handler trusted_handler; -#ifdef CONFIG_REISERFS_FS_SECURITY -extern struct reiserfs_xattr_handler security_handler; -#endif - -int reiserfs_xattr_register_handlers(void) __init; -void reiserfs_xattr_unregister_handlers(void); - -static inline void reiserfs_write_lock_xattrs(struct super_block *sb) -{ - down_write(&REISERFS_XATTR_DIR_SEM(sb)); -} -static inline void reiserfs_write_unlock_xattrs(struct super_block *sb) -{ - up_write(&REISERFS_XATTR_DIR_SEM(sb)); -} -static inline void reiserfs_read_lock_xattrs(struct super_block *sb) -{ - down_read(&REISERFS_XATTR_DIR_SEM(sb)); -} - -static inline void reiserfs_read_unlock_xattrs(struct super_block *sb) -{ - up_read(&REISERFS_XATTR_DIR_SEM(sb)); -} - -static inline void reiserfs_write_lock_xattr_i(struct inode *inode) -{ - down_write(&REISERFS_I(inode)->xattr_sem); -} -static inline void reiserfs_write_unlock_xattr_i(struct inode *inode) -{ - up_write(&REISERFS_I(inode)->xattr_sem); -} -static inline void reiserfs_read_lock_xattr_i(struct inode *inode) -{ - down_read(&REISERFS_I(inode)->xattr_sem); -} - -static inline void reiserfs_read_unlock_xattr_i(struct inode *inode) -{ - up_read(&REISERFS_I(inode)->xattr_sem); -} - -static inline void reiserfs_mark_inode_private(struct inode *inode) -{ - inode->i_flags |= S_PRIVATE; -} - -static inline void reiserfs_init_xattr_rwsem(struct inode *inode) -{ - init_rwsem(&REISERFS_I(inode)->xattr_sem); -} - -#else - -#define is_reiserfs_priv_object(inode) 0 -#define reiserfs_mark_inode_private(inode) do {;} while(0) -#define reiserfs_getxattr NULL -#define reiserfs_setxattr NULL -#define reiserfs_listxattr NULL -#define reiserfs_removexattr NULL -#define reiserfs_write_lock_xattrs(sb) do {;} while(0) -#define reiserfs_write_unlock_xattrs(sb) do {;} while(0) -#define reiserfs_read_lock_xattrs(sb) -#define reiserfs_read_unlock_xattrs(sb) - -#define reiserfs_permission NULL - -#define reiserfs_xattr_register_handlers() 0 -#define reiserfs_xattr_unregister_handlers() - -static inline int reiserfs_delete_xattrs(struct inode *inode) -{ - return 0; -}; -static inline int reiserfs_chown_xattrs(struct inode *inode, - struct iattr *attrs) -{ - return 0; -}; -static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) -{ - sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */ - return 0; -}; -static inline void reiserfs_init_xattr_rwsem(struct inode *inode) -{ -} -#endif - -#endif /* __KERNEL__ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/romfs_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/romfs_fs.h 2007-05-24 15:40:44.000000000 +0200 @@ -53,9 +53,4 @@ #define ROMFH_PAD (ROMFH_SIZE-1) #define ROMFH_MASK (~ROMFH_PAD) -#ifdef __KERNEL__ - -/* Not much now */ - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/route.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/route.h 2007-05-24 15:40:44.000000000 +0200 @@ -24,7 +24,6 @@ #define _LINUX_ROUTE_H #include -#include /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ struct rtentry @@ -38,11 +37,9 @@ unsigned long rt_pad3; void *rt_pad4; short rt_metric; /* +1 for binary compatibility! */ - char __user *rt_dev; /* forcing the device at add */ + char *rt_dev; /* forcing the device at add */ unsigned long rt_mtu; /* per route MTU/Window */ -#ifndef __KERNEL__ #define rt_mss rt_mtu /* Compatibility :-( */ -#endif unsigned long rt_window; /* Window clamping */ unsigned short rt_irtt; /* Initial RTT */ }; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/rtc.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/rtc.h 2007-05-24 15:40:44.000000000 +0200 @@ -97,119 +97,5 @@ #define RTC_AF 0x20 #define RTC_UF 0x10 -#ifdef __KERNEL__ - -#include - -extern int rtc_month_days(unsigned int month, unsigned int year); -extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year); -extern int rtc_valid_tm(struct rtc_time *tm); -extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); -extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); - -#include -#include -#include -#include -#include - -extern struct class *rtc_class; - -struct rtc_class_ops { - int (*open)(struct device *); - void (*release)(struct device *); - int (*ioctl)(struct device *, unsigned int, unsigned long); - int (*read_time)(struct device *, struct rtc_time *); - int (*set_time)(struct device *, struct rtc_time *); - int (*read_alarm)(struct device *, struct rtc_wkalrm *); - int (*set_alarm)(struct device *, struct rtc_wkalrm *); - int (*proc)(struct device *, struct seq_file *); - int (*set_mmss)(struct device *, unsigned long secs); - int (*irq_set_state)(struct device *, int enabled); - int (*irq_set_freq)(struct device *, int freq); - int (*read_callback)(struct device *, int data); -}; - -#define RTC_DEVICE_NAME_SIZE 20 -struct rtc_task; - -struct rtc_device -{ - struct class_device class_dev; - struct module *owner; - - int id; - char name[RTC_DEVICE_NAME_SIZE]; - - const struct rtc_class_ops *ops; - struct mutex ops_lock; - - struct class_device *rtc_dev; - struct cdev char_dev; - struct mutex char_lock; - - unsigned long irq_data; - spinlock_t irq_lock; - wait_queue_head_t irq_queue; - struct fasync_struct *async_queue; - - struct rtc_task *irq_task; - spinlock_t irq_task_lock; - int irq_freq; - int max_user_freq; -#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL - struct work_struct uie_task; - struct timer_list uie_timer; - /* Those fields are protected by rtc->irq_lock */ - unsigned int oldsecs; - unsigned int irq_active:1; - unsigned int stop_uie_polling:1; - unsigned int uie_task_active:1; - unsigned int uie_timer_active:1; -#endif -}; -#define to_rtc_device(d) container_of(d, struct rtc_device, class_dev) - -extern struct rtc_device *rtc_device_register(const char *name, - struct device *dev, - const struct rtc_class_ops *ops, - struct module *owner); -extern void rtc_device_unregister(struct rtc_device *rdev); -extern int rtc_interface_register(struct class_interface *intf); - -extern int rtc_read_time(struct class_device *class_dev, struct rtc_time *tm); -extern int rtc_set_time(struct class_device *class_dev, struct rtc_time *tm); -extern int rtc_set_mmss(struct class_device *class_dev, unsigned long secs); -extern int rtc_read_alarm(struct class_device *class_dev, - struct rtc_wkalrm *alrm); -extern int rtc_set_alarm(struct class_device *class_dev, - struct rtc_wkalrm *alrm); -extern void rtc_update_irq(struct class_device *class_dev, - unsigned long num, unsigned long events); - -extern struct class_device *rtc_class_open(char *name); -extern void rtc_class_close(struct class_device *class_dev); - -extern int rtc_irq_register(struct class_device *class_dev, - struct rtc_task *task); -extern void rtc_irq_unregister(struct class_device *class_dev, - struct rtc_task *task); -extern int rtc_irq_set_state(struct class_device *class_dev, - struct rtc_task *task, int enabled); -extern int rtc_irq_set_freq(struct class_device *class_dev, - struct rtc_task *task, int freq); - -typedef struct rtc_task { - void (*func)(void *private_data); - void *private_data; -} rtc_task_t; - -int rtc_register(rtc_task_t *task); -int rtc_unregister(rtc_task_t *task); -int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); -void rtc_get_rtc_time(struct rtc_time *rtc_tm); -irqreturn_t rtc_interrupt(int irq, void *dev_id); - -#endif /* __KERNEL__ */ #endif /* _LINUX_RTC_H_ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/rtnetlink.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/rtnetlink.h 2007-05-24 15:40:44.000000000 +0200 @@ -479,7 +479,6 @@ #define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) #define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg)) -#ifndef __KERNEL__ /* RTnetlink multicast groups - backwards compatibility for userspace */ #define RTMGRP_LINK 1 #define RTMGRP_NOTIFY 2 @@ -500,7 +499,6 @@ #define RTMGRP_DECnet_ROUTE 0x4000 #define RTMGRP_IPV6_PREFIX 0x20000 -#endif /* RTnetlink multicast groups */ enum rtnetlink_groups { @@ -560,174 +558,6 @@ /* End of information exported to user level */ -#ifdef __KERNEL__ - -#include - -extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size); -static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) -{ - int len = strlen(str) + 1; - return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len); -} - -extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); - -#define rtattr_parse_nested(tb, max, rta) \ - rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) - -struct rtnetlink_link -{ - int (*doit)(struct sk_buff *, struct nlmsghdr*, void *attr); - int (*dumpit)(struct sk_buff *, struct netlink_callback *cb); -}; - -extern struct rtnetlink_link * rtnetlink_links[NPROTO]; -extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); -extern int rtnl_unicast(struct sk_buff *skb, u32 pid); -extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, - struct nlmsghdr *nlh, gfp_t flags); -extern void rtnl_set_sk_err(u32 group, int error); -extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); - -extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data); - -#define RTA_PUT(skb, attrtype, attrlen, data) \ -({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \ - goto rtattr_failure; \ - __rta_fill(skb, attrtype, attrlen, data); }) - -#define RTA_APPEND(skb, attrlen, data) \ -({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ - goto rtattr_failure; \ - memcpy(skb_put(skb, attrlen), data, attrlen); }) - -#define RTA_PUT_NOHDR(skb, attrlen, data) \ -({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); \ - memset(skb->tail - (RTA_ALIGN(attrlen) - attrlen), 0, \ - RTA_ALIGN(attrlen) - attrlen); }) - -#define RTA_PUT_U8(skb, attrtype, value) \ -({ u8 _tmp = (value); \ - RTA_PUT(skb, attrtype, sizeof(u8), &_tmp); }) - -#define RTA_PUT_U16(skb, attrtype, value) \ -({ u16 _tmp = (value); \ - RTA_PUT(skb, attrtype, sizeof(u16), &_tmp); }) - -#define RTA_PUT_U32(skb, attrtype, value) \ -({ u32 _tmp = (value); \ - RTA_PUT(skb, attrtype, sizeof(u32), &_tmp); }) - -#define RTA_PUT_U64(skb, attrtype, value) \ -({ u64 _tmp = (value); \ - RTA_PUT(skb, attrtype, sizeof(u64), &_tmp); }) - -#define RTA_PUT_SECS(skb, attrtype, value) \ - RTA_PUT_U64(skb, attrtype, (value) / HZ) - -#define RTA_PUT_MSECS(skb, attrtype, value) \ - RTA_PUT_U64(skb, attrtype, jiffies_to_msecs(value)) - -#define RTA_PUT_STRING(skb, attrtype, value) \ - RTA_PUT(skb, attrtype, strlen(value) + 1, value) - -#define RTA_PUT_FLAG(skb, attrtype) \ - RTA_PUT(skb, attrtype, 0, NULL); - -#define RTA_NEST(skb, type) \ -({ struct rtattr *__start = (struct rtattr *) (skb)->tail; \ - RTA_PUT(skb, type, 0, NULL); \ - __start; }) - -#define RTA_NEST_END(skb, start) \ -({ (start)->rta_len = ((skb)->tail - (unsigned char *) (start)); \ - (skb)->len; }) - -#define RTA_NEST_CANCEL(skb, start) \ -({ if (start) \ - skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ - -1; }) - -#define RTA_GET_U8(rta) \ -({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u8)) \ - goto rtattr_failure; \ - *(u8 *) RTA_DATA(rta); }) - -#define RTA_GET_U16(rta) \ -({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u16)) \ - goto rtattr_failure; \ - *(u16 *) RTA_DATA(rta); }) - -#define RTA_GET_U32(rta) \ -({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u32)) \ - goto rtattr_failure; \ - *(u32 *) RTA_DATA(rta); }) - -#define RTA_GET_U64(rta) \ -({ u64 _tmp; \ - if (!rta || RTA_PAYLOAD(rta) < sizeof(u64)) \ - goto rtattr_failure; \ - memcpy(&_tmp, RTA_DATA(rta), sizeof(_tmp)); \ - _tmp; }) - -#define RTA_GET_FLAG(rta) (!!(rta)) - -#define RTA_GET_SECS(rta) ((unsigned long) RTA_GET_U64(rta) * HZ) -#define RTA_GET_MSECS(rta) (msecs_to_jiffies((unsigned long) RTA_GET_U64(rta))) - -static inline struct rtattr * -__rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) -{ - struct rtattr *rta; - int size = RTA_LENGTH(attrlen); - - rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size)); - rta->rta_type = attrtype; - rta->rta_len = size; - memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); - return rta; -} - -#define __RTA_PUT(skb, attrtype, attrlen) \ -({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \ - goto rtattr_failure; \ - __rta_reserve(skb, attrtype, attrlen); }) - -extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change); - -/* RTNL is used as a global lock for all changes to network configuration */ -extern void rtnl_lock(void); -extern void rtnl_unlock(void); -extern int rtnl_trylock(void); - -extern void rtnetlink_init(void); -extern void __rtnl_unlock(void); - -#define ASSERT_RTNL() do { \ - if (unlikely(rtnl_trylock())) { \ - rtnl_unlock(); \ - printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \ - __FILE__, __LINE__); \ - dump_stack(); \ - } \ -} while(0) - -#define BUG_TRAP(x) do { \ - if (unlikely(!(x))) { \ - printk(KERN_ERR "KERNEL: assertion (%s) failed at %s (%d)\n", \ - #x, __FILE__ , __LINE__); \ - } \ -} while(0) - -static inline u32 rtm_get_table(struct rtattr **rta, u8 table) -{ - return RTA_GET_U32(rta[RTA_TABLE-1]); -rtattr_failure: - return table; -} - -#endif /* __KERNEL__ */ #endif /* __LINUX_RTNETLINK_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/scc.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/scc.h 2007-05-24 15:40:44.000000000 +0200 @@ -169,84 +169,4 @@ unsigned char pattern; }; -#ifdef __KERNEL__ - -enum {TX_OFF, TX_ON}; /* command for scc_key_trx() */ - -/* Vector masks in RR2B */ - -#define VECTOR_MASK 0x06 -#define TXINT 0x00 -#define EXINT 0x02 -#define RXINT 0x04 -#define SPINT 0x06 - -#ifdef CONFIG_SCC_DELAY -#define Inb(port) inb_p(port) -#define Outb(port, val) outb_p(val, port) -#else -#define Inb(port) inb(port) -#define Outb(port, val) outb(val, port) -#endif - -/* SCC channel control structure for KISS */ - -struct scc_kiss { - unsigned char txdelay; /* Transmit Delay 10 ms/cnt */ - unsigned char persist; /* Persistence (0-255) as a % */ - unsigned char slottime; /* Delay to wait on persistence hit */ - unsigned char tailtime; /* Delay after last byte written */ - unsigned char fulldup; /* Full Duplex mode 0=CSMA 1=DUP 2=ALWAYS KEYED */ - unsigned char waittime; /* Waittime before any transmit attempt */ - unsigned int maxkeyup; /* Maximum time to transmit (seconds) */ - unsigned int mintime; /* Minimal offtime after MAXKEYUP timeout (seconds) */ - unsigned int idletime; /* Maximum idle time in ALWAYS KEYED mode (seconds) */ - unsigned int maxdefer; /* Timer for CSMA channel busy limit */ - unsigned char tx_inhibit; /* Transmit is not allowed when set */ - unsigned char group; /* Group ID for AX.25 TX interlocking */ - unsigned char mode; /* 'normal' or 'hwctrl' mode (unused) */ - unsigned char softdcd; /* Use DPLL instead of DCD pin for carrier detect */ -}; - - -/* SCC channel structure */ - -struct scc_channel { - int init; /* channel exists? */ - - struct net_device *dev; /* link to device control structure */ - struct net_device_stats dev_stat;/* device statistics */ - - char brand; /* manufacturer of the board */ - long clock; /* used clock */ - - io_port ctrl; /* I/O address of CONTROL register */ - io_port data; /* I/O address of DATA register */ - io_port special; /* I/O address of special function port */ - int irq; /* Number of Interrupt */ - - char option; - char enhanced; /* Enhanced SCC support */ - - unsigned char wreg[16]; /* Copy of last written value in WRx */ - unsigned char status; /* Copy of R0 at last external interrupt */ - unsigned char dcd; /* DCD status */ - - struct scc_kiss kiss; /* control structure for KISS params */ - struct scc_stat stat; /* statistical information */ - struct scc_modem modem; /* modem information */ - - struct sk_buff_head tx_queue; /* next tx buffer */ - struct sk_buff *rx_buff; /* pointer to frame currently received */ - struct sk_buff *tx_buff; /* pointer to frame currently transmitted */ - - /* Timer */ - struct timer_list tx_t; /* tx timer for this channel */ - struct timer_list tx_wdog; /* tx watchdogs */ - - /* Channel lock */ - spinlock_t lock; /* Channel guard lock */ -}; - -#endif /* defined(__KERNEL__) */ #endif /* defined(_SCC_H) */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/sched.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/sched.h 2007-05-24 15:40:44.000000000 +0200 @@ -35,1722 +35,4 @@ #define SCHED_RR 2 #define SCHED_BATCH 3 -#ifdef __KERNEL__ - -struct sched_param { - int sched_priority; -}; - -#include /* for HZ */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -struct exec_domain; -struct futex_pi_state; -struct linux_binprm; - -/* - * List of flags we want to share for kernel threads, - * if only because they are not used by them anyway. - */ -#define CLONE_KERNEL (CLONE_FS | CLONE_FILES | CLONE_SIGHAND) - -/* - * These are the constant used to fake the fixed-point load-average - * counting. Some notes: - * - 11 bit fractions expand to 22 bits by the multiplies: this gives - * a load-average precision of 10 bits integer + 11 bits fractional - * - if you want to count load-averages more often, you need more - * precision, or rounding will get you. With 2-second counting freq, - * the EXP_n values would be 1981, 2034 and 2043 if still using only - * 11 bit fractions. - */ -extern unsigned long avenrun[]; /* Load averages */ - -#define FSHIFT 11 /* nr of bits of precision */ -#define FIXED_1 (1<>= FSHIFT; - -extern unsigned long total_forks; -extern int nr_threads; -DECLARE_PER_CPU(unsigned long, process_counts); -extern int nr_processes(void); -extern unsigned long nr_running(void); -extern unsigned long nr_uninterruptible(void); -extern unsigned long nr_active(void); -extern unsigned long nr_iowait(void); -extern unsigned long weighted_cpuload(const int cpu); - - -/* - * Task state bitmask. NOTE! These bits are also - * encoded in fs/proc/array.c: get_task_state(). - * - * We have two separate sets of flags: task->state - * is about runnability, while task->exit_state are - * about the task exiting. Confusing, but this way - * modifying one set can't modify the other one by - * mistake. - */ -#define TASK_RUNNING 0 -#define TASK_INTERRUPTIBLE 1 -#define TASK_UNINTERRUPTIBLE 2 -#define TASK_STOPPED 4 -#define TASK_TRACED 8 -/* in tsk->exit_state */ -#define EXIT_ZOMBIE 16 -#define EXIT_DEAD 32 -/* in tsk->state again */ -#define TASK_NONINTERACTIVE 64 -#define TASK_DEAD 128 - -#define __set_task_state(tsk, state_value) \ - do { (tsk)->state = (state_value); } while (0) -#define set_task_state(tsk, state_value) \ - set_mb((tsk)->state, (state_value)) - -/* - * set_current_state() includes a barrier so that the write of current->state - * is correctly serialised wrt the caller's subsequent test of whether to - * actually sleep: - * - * set_current_state(TASK_UNINTERRUPTIBLE); - * if (do_i_need_to_sleep()) - * schedule(); - * - * If the caller does not need such serialisation then use __set_current_state() - */ -#define __set_current_state(state_value) \ - do { current->state = (state_value); } while (0) -#define set_current_state(state_value) \ - set_mb(current->state, (state_value)) - -/* Task command name length */ -#define TASK_COMM_LEN 16 - -#include - -/* - * This serializes "schedule()" and also protects - * the run-queue from deletions/modifications (but - * _adding_ to the beginning of the run-queue has - * a separate lock). - */ -extern rwlock_t tasklist_lock; -extern spinlock_t mmlist_lock; - -struct task_struct; - -extern void sched_init(void); -extern void sched_init_smp(void); -extern void init_idle(struct task_struct *idle, int cpu); - -extern cpumask_t nohz_cpu_mask; - -extern void show_state(void); -extern void show_regs(struct pt_regs *); - -/* - * TASK is a pointer to the task whose backtrace we want to see (or NULL for current - * task), SP is the stack pointer of the first frame that should be shown in the back - * trace (or NULL if the entire call-chain of the task should be shown). - */ -extern void show_stack(struct task_struct *task, unsigned long *sp); - -#ifdef CONFIG_SCHEDSTATS -extern void show_sched_stats(void); -extern void show_process_eip(unsigned char* name); -#endif - -void io_schedule(void); -long io_schedule_timeout(long timeout); - -extern void cpu_init (void); -extern void trap_init(void); -extern void update_process_times(int user); -extern void scheduler_tick(void); - -#ifdef CONFIG_DETECT_SOFTLOCKUP -extern void softlockup_tick(void); -extern void spawn_softlockup_task(void); -extern void touch_softlockup_watchdog(void); -#else -static inline void softlockup_tick(void) -{ -} -static inline void spawn_softlockup_task(void) -{ -} -static inline void touch_softlockup_watchdog(void) -{ -} -#endif - - -/* Attach to any functions which should be ignored in wchan output. */ -#define __sched __attribute__((__section__(".sched.text"))) -/* Is this address in the __sched functions? */ -extern int in_sched_functions(unsigned long addr); - -#define MAX_SCHEDULE_TIMEOUT LONG_MAX -extern signed long FASTCALL(schedule_timeout(signed long timeout)); -extern signed long schedule_timeout_interruptible(signed long timeout); -extern signed long schedule_timeout_uninterruptible(signed long timeout); -asmlinkage void schedule(void); - -struct nsproxy; - -/* Maximum number of active map areas.. This is a random (large) number */ -#define DEFAULT_MAX_MAP_COUNT 65536 - -extern int sysctl_max_map_count; - -#include - -extern unsigned long -arch_get_unmapped_area(struct file *, unsigned long, unsigned long, - unsigned long, unsigned long); -extern unsigned long -arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, - unsigned long len, unsigned long pgoff, - unsigned long flags); -extern void arch_unmap_area(struct mm_struct *, unsigned long); -extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); - -#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS -/* - * The mm counters are not protected by its page_table_lock, - * so must be incremented atomically. - */ -#define set_mm_counter(mm, member, value) atomic_long_set(&(mm)->_##member, value) -#define get_mm_counter(mm, member) ((unsigned long)atomic_long_read(&(mm)->_##member)) -#define add_mm_counter(mm, member, value) atomic_long_add(value, &(mm)->_##member) -#define inc_mm_counter(mm, member) atomic_long_inc(&(mm)->_##member) -#define dec_mm_counter(mm, member) atomic_long_dec(&(mm)->_##member) -typedef atomic_long_t mm_counter_t; - -#else /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */ -/* - * The mm counters are protected by its page_table_lock, - * so can be incremented directly. - */ -#define set_mm_counter(mm, member, value) (mm)->_##member = (value) -#define get_mm_counter(mm, member) ((mm)->_##member) -#define add_mm_counter(mm, member, value) (mm)->_##member += (value) -#define inc_mm_counter(mm, member) (mm)->_##member++ -#define dec_mm_counter(mm, member) (mm)->_##member-- -typedef unsigned long mm_counter_t; - -#endif /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */ - -#define get_mm_rss(mm) \ - (get_mm_counter(mm, file_rss) + get_mm_counter(mm, anon_rss)) -#define update_hiwater_rss(mm) do { \ - unsigned long _rss = get_mm_rss(mm); \ - if ((mm)->hiwater_rss < _rss) \ - (mm)->hiwater_rss = _rss; \ -} while (0) -#define update_hiwater_vm(mm) do { \ - if ((mm)->hiwater_vm < (mm)->total_vm) \ - (mm)->hiwater_vm = (mm)->total_vm; \ -} while (0) - -struct mm_struct { - struct vm_area_struct * mmap; /* list of VMAs */ - struct rb_root mm_rb; - struct vm_area_struct * mmap_cache; /* last find_vma result */ - unsigned long (*get_unmapped_area) (struct file *filp, - unsigned long addr, unsigned long len, - unsigned long pgoff, unsigned long flags); - void (*unmap_area) (struct mm_struct *mm, unsigned long addr); - unsigned long mmap_base; /* base of mmap area */ - unsigned long task_size; /* size of task vm space */ - unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ - unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ - pgd_t * pgd; - atomic_t mm_users; /* How many users with user space? */ - atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ - int map_count; /* number of VMAs */ - struct rw_semaphore mmap_sem; - spinlock_t page_table_lock; /* Protects page tables and some counters */ - - struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung - * together off init_mm.mmlist, and are protected - * by mmlist_lock - */ - - /* Special counters, in some configurations protected by the - * page_table_lock, in other configurations by being atomic. - */ - mm_counter_t _file_rss; - mm_counter_t _anon_rss; - - unsigned long hiwater_rss; /* High-watermark of RSS usage */ - unsigned long hiwater_vm; /* High-water virtual memory usage */ - - unsigned long total_vm, locked_vm, shared_vm, exec_vm; - unsigned long stack_vm, reserved_vm, def_flags, nr_ptes; - unsigned long start_code, end_code, start_data, end_data; - unsigned long start_brk, brk, start_stack; - unsigned long arg_start, arg_end, env_start, env_end; - - unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ - - unsigned dumpable:2; - cpumask_t cpu_vm_mask; - - /* Architecture-specific MM context */ - mm_context_t context; - - /* Token based thrashing protection. */ - unsigned long swap_token_time; - char recent_pagein; - - /* coredumping support */ - int core_waiters; - struct completion *core_startup_done, core_done; - - /* aio bits */ - rwlock_t ioctx_list_lock; - struct kioctx *ioctx_list; - -#if defined(CONFIG_PAX_NOEXEC) || defined(CONFIG_PAX_ASLR) - unsigned long pax_flags; -#endif - -#ifdef CONFIG_PAX_DLRESOLVE - unsigned long call_dl_resolve; -#endif - -#if defined(CONFIG_PPC32) && defined(CONFIG_PAX_EMUSIGRT) - unsigned long call_syscall; -#endif - -#ifdef CONFIG_PAX_ASLR - unsigned long delta_mmap; /* randomized offset */ - unsigned long delta_exec; /* randomized offset */ - unsigned long delta_stack; /* randomized offset */ -#endif - -}; - -#define MF_PAX_PAGEEXEC 0x01000000 /* Paging based non-executable pages */ -#define MF_PAX_EMUTRAMP 0x02000000 /* Emulate trampolines */ -#define MF_PAX_MPROTECT 0x04000000 /* Restrict mprotect() */ -#define MF_PAX_RANDMMAP 0x08000000 /* Randomize mmap() base */ -/*#define MF_PAX_RANDEXEC 0x10000000*/ /* Randomize ET_EXEC base */ -#define MF_PAX_SEGMEXEC 0x20000000 /* Segmentation based non-executable pages */ - -struct sighand_struct { - atomic_t count; - struct k_sigaction action[_NSIG]; - spinlock_t siglock; -}; - -struct pacct_struct { - int ac_flag; - long ac_exitcode; - unsigned long ac_mem; - cputime_t ac_utime, ac_stime; - unsigned long ac_minflt, ac_majflt; -}; - -/* - * NOTE! "signal_struct" does not have it's own - * locking, because a shared signal_struct always - * implies a shared sighand_struct, so locking - * sighand_struct is always a proper superset of - * the locking of signal_struct. - */ -struct signal_struct { - atomic_t count; - atomic_t live; - - wait_queue_head_t wait_chldexit; /* for wait4() */ - - /* current thread group signal load-balancing target: */ - struct task_struct *curr_target; - - /* shared signal handling: */ - struct sigpending shared_pending; - - /* thread group exit support */ - int group_exit_code; - /* overloaded: - * - notify group_exit_task when ->count is equal to notify_count - * - everyone except group_exit_task is stopped during signal delivery - * of fatal signals, group_exit_task processes the signal. - */ - struct task_struct *group_exit_task; - int notify_count; - - /* thread group stop support, overloads group_exit_code too */ - int group_stop_count; - unsigned int flags; /* see SIGNAL_* flags below */ - - /* POSIX.1b Interval Timers */ - struct list_head posix_timers; - - /* ITIMER_REAL timer for the process */ - struct hrtimer real_timer; - struct task_struct *tsk; - ktime_t it_real_incr; - - /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */ - cputime_t it_prof_expires, it_virt_expires; - cputime_t it_prof_incr, it_virt_incr; - - /* job control IDs */ - pid_t pgrp; - pid_t tty_old_pgrp; - pid_t session; - /* boolean value for session group leader */ - int leader; - - struct tty_struct *tty; /* NULL if no tty */ - - /* - * Cumulative resource counters for dead threads in the group, - * and for reaped dead child processes forked by this group. - * Live threads maintain their own counters and add to these - * in __exit_signal, except for the group leader. - */ - cputime_t utime, stime, cutime, cstime; - unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; - unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; - - /* - * Cumulative ns of scheduled CPU time for dead threads in the - * group, not including a zombie group leader. (This only differs - * from jiffies_to_ns(utime + stime) if sched_clock uses something - * other than jiffies.) - */ - unsigned long long sched_time; - - /* - * We don't bother to synchronize most readers of this at all, - * because there is no reader checking a limit that actually needs - * to get both rlim_cur and rlim_max atomically, and either one - * alone is a single word that can safely be read normally. - * getrlimit/setrlimit use task_lock(current->group_leader) to - * protect this instead of the siglock, because they really - * have no need to disable irqs. - */ - struct rlimit rlim[RLIM_NLIMITS]; - - struct list_head cpu_timers[3]; - - /* keep the process-shared keyrings here so that they do the right - * thing in threads created with CLONE_THREAD */ -#ifdef CONFIG_KEYS - struct key *session_keyring; /* keyring inherited over fork */ - struct key *process_keyring; /* keyring private to this process */ -#endif -#ifdef CONFIG_BSD_PROCESS_ACCT - struct pacct_struct pacct; /* per-process accounting information */ -#endif -#ifdef CONFIG_TASKSTATS - spinlock_t stats_lock; - struct taskstats *stats; -#endif - -#ifdef CONFIG_GRKERNSEC - u32 curr_ip; - u32 gr_saddr; - u32 gr_daddr; - u16 gr_sport; - u16 gr_dport; - u8 used_accept:1; -#endif -}; - -/* Context switch must be unlocked if interrupts are to be enabled */ -#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW -# define __ARCH_WANT_UNLOCKED_CTXSW -#endif - -/* - * Bits in flags field of signal_struct. - */ -#define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ -#define SIGNAL_STOP_DEQUEUED 0x00000002 /* stop signal dequeued */ -#define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */ -#define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */ - - -/* - * Priority of a process goes from 0..MAX_PRIO-1, valid RT - * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH - * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority - * values are inverted: lower p->prio value means higher priority. - * - * The MAX_USER_RT_PRIO value allows the actual maximum - * RT priority to be separate from the value exported to - * user-space. This allows kernel threads to set their - * priority to a value higher than any user task. Note: - * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. - */ - -#define MAX_USER_RT_PRIO 100 -#define MAX_RT_PRIO MAX_USER_RT_PRIO - -#define MAX_PRIO (MAX_RT_PRIO + 40) - -#define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) -#define rt_task(p) rt_prio((p)->prio) -#define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) -#define is_rt_policy(p) ((p) != SCHED_NORMAL && (p) != SCHED_BATCH) -#define has_rt_policy(p) unlikely(is_rt_policy((p)->policy)) - -/* - * Some day this will be a full-fledged user tracking system.. - */ -struct user_struct { - atomic_t __count; /* reference count */ - atomic_t processes; /* How many processes does this user have? */ - atomic_t files; /* How many open files does this user have? */ - atomic_t sigpending; /* How many pending signals does this user have? */ -#ifdef CONFIG_INOTIFY_USER - atomic_t inotify_watches; /* How many inotify watches does this user have? */ - atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ -#endif - /* protected by mq_lock */ - unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ - unsigned long locked_shm; /* How many pages of mlocked shm ? */ - -#ifdef CONFIG_KEYS - struct key *uid_keyring; /* UID specific keyring */ - struct key *session_keyring; /* UID's default session keyring */ -#endif - - /* Hash table maintenance information */ - struct list_head uidhash_list; - uid_t uid; -}; - -extern struct user_struct *find_user(uid_t); - -extern struct user_struct root_user; -#define INIT_USER (&root_user) - -struct backing_dev_info; -struct reclaim_state; - -#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) -struct sched_info { - /* cumulative counters */ - unsigned long cpu_time, /* time spent on the cpu */ - run_delay, /* time spent waiting on a runqueue */ - pcnt, /* # of timeslices run on this cpu */ - cpu_last_hist; /* time spent on the cpu during the last n seconds */ - - /* timestamps */ - unsigned long last_arrival, /* when we last ran on a cpu */ - last_queued; /* when we were last queued to run */ -}; -#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ - -#ifdef CONFIG_SCHEDSTATS -extern struct file_operations proc_schedstat_operations; -#endif /* CONFIG_SCHEDSTATS */ - -#ifdef CONFIG_TASK_DELAY_ACCT -struct task_delay_info { - spinlock_t lock; - unsigned int flags; /* Private per-task flags */ - - /* For each stat XXX, add following, aligned appropriately - * - * struct timespec XXX_start, XXX_end; - * u64 XXX_delay; - * u32 XXX_count; - * - * Atomicity of updates to XXX_delay, XXX_count protected by - * single lock above (split into XXX_lock if contention is an issue). - */ - - /* - * XXX_count is incremented on every XXX operation, the delay - * associated with the operation is added to XXX_delay. - * XXX_delay contains the accumulated delay time in nanoseconds. - */ - struct timespec blkio_start, blkio_end; /* Shared by blkio, swapin */ - u64 blkio_delay; /* wait for sync block io completion */ - u64 swapin_delay; /* wait for swapin block io completion */ - u32 blkio_count; /* total count of the number of sync block */ - /* io operations performed */ - u32 swapin_count; /* total count of the number of swapin block */ - /* io operations performed */ -}; -#endif /* CONFIG_TASK_DELAY_ACCT */ - -static inline int sched_info_on(void) -{ -#ifdef CONFIG_SCHEDSTATS - return 1; -#elif defined(CONFIG_TASK_DELAY_ACCT) - extern int delayacct_on; - return delayacct_on; -#else - return 0; -#endif -} - -enum idle_type -{ - SCHED_IDLE, - NOT_IDLE, - NEWLY_IDLE, - MAX_IDLE_TYPES -}; - -/* - * sched-domains (multiprocessor balancing) declarations: - */ -#define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ - -#ifdef CONFIG_SMP -#define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ -#define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ -#define SD_BALANCE_EXEC 4 /* Balance on exec */ -#define SD_BALANCE_FORK 8 /* Balance on fork, clone */ -#define SD_WAKE_IDLE 16 /* Wake to idle CPU on task wakeup */ -#define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ -#define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ -#define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ -#define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ -#define SD_SHARE_PKG_RESOURCES 512 /* Domain members share cpu pkg resources */ - -#define BALANCE_FOR_MC_POWER \ - (sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0) - -#define BALANCE_FOR_PKG_POWER \ - ((sched_mc_power_savings || sched_smt_power_savings) ? \ - SD_POWERSAVINGS_BALANCE : 0) - -#define test_sd_parent(sd, flag) ((sd->parent && \ - (sd->parent->flags & flag)) ? 1 : 0) - - -struct sched_group { - struct sched_group *next; /* Must be a circular list */ - cpumask_t cpumask; - - /* - * CPU power of this group, SCHED_LOAD_SCALE being max power for a - * single CPU. This is read only (except for setup, hotplug CPU). - */ - unsigned long cpu_power; -}; - -struct sched_domain { - /* These fields must be setup */ - struct sched_domain *parent; /* top domain must be null terminated */ - struct sched_domain *child; /* bottom domain must be null terminated */ - struct sched_group *groups; /* the balancing groups of the domain */ - cpumask_t span; /* span of all CPUs in this domain */ - unsigned long min_interval; /* Minimum balance interval ms */ - unsigned long max_interval; /* Maximum balance interval ms */ - unsigned int busy_factor; /* less balancing by factor if busy */ - unsigned int imbalance_pct; /* No balance until over watermark */ - unsigned long long cache_hot_time; /* Task considered cache hot (ns) */ - unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */ - unsigned int per_cpu_gain; /* CPU % gained by adding domain cpus */ - unsigned int busy_idx; - unsigned int idle_idx; - unsigned int newidle_idx; - unsigned int wake_idx; - unsigned int forkexec_idx; - int flags; /* See SD_* */ - - /* Runtime fields. */ - unsigned long last_balance; /* init to jiffies. units in jiffies */ - unsigned int balance_interval; /* initialise to 1. units in ms. */ - unsigned int nr_balance_failed; /* initialise to 0 */ - -#ifdef CONFIG_SCHEDSTATS - /* load_balance() stats */ - unsigned long lb_cnt[MAX_IDLE_TYPES]; - unsigned long lb_failed[MAX_IDLE_TYPES]; - unsigned long lb_balanced[MAX_IDLE_TYPES]; - unsigned long lb_imbalance[MAX_IDLE_TYPES]; - unsigned long lb_gained[MAX_IDLE_TYPES]; - unsigned long lb_hot_gained[MAX_IDLE_TYPES]; - unsigned long lb_nobusyg[MAX_IDLE_TYPES]; - unsigned long lb_nobusyq[MAX_IDLE_TYPES]; - - /* Active load balancing */ - unsigned long alb_cnt; - unsigned long alb_failed; - unsigned long alb_pushed; - - /* SD_BALANCE_EXEC stats */ - unsigned long sbe_cnt; - unsigned long sbe_balanced; - unsigned long sbe_pushed; - - /* SD_BALANCE_FORK stats */ - unsigned long sbf_cnt; - unsigned long sbf_balanced; - unsigned long sbf_pushed; - - /* try_to_wake_up() stats */ - unsigned long ttwu_wake_remote; - unsigned long ttwu_move_affine; - unsigned long ttwu_move_balance; -#endif -}; - -extern int partition_sched_domains(cpumask_t *partition1, - cpumask_t *partition2); - -/* - * Maximum cache size the migration-costs auto-tuning code will - * search from: - */ -extern unsigned int max_cache_size; - -#endif /* CONFIG_SMP */ - - -struct io_context; /* See blkdev.h */ -struct cpuset; - -#define NGROUPS_SMALL 32 -#define NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t))) -struct group_info { - int ngroups; - atomic_t usage; - gid_t small_block[NGROUPS_SMALL]; - int nblocks; - gid_t *blocks[0]; -}; - -/* - * get_group_info() must be called with the owning task locked (via task_lock()) - * when task != current. The reason being that the vast majority of callers are - * looking at current->group_info, which can not be changed except by the - * current task. Changing current->group_info requires the task lock, too. - */ -#define get_group_info(group_info) do { \ - atomic_inc(&(group_info)->usage); \ -} while (0) - -#define put_group_info(group_info) do { \ - if (atomic_dec_and_test(&(group_info)->usage)) \ - groups_free(group_info); \ -} while (0) - -extern struct group_info *groups_alloc(int gidsetsize); -extern void groups_free(struct group_info *group_info); -extern int set_current_groups(struct group_info *group_info); -extern int groups_search(struct group_info *group_info, gid_t grp); -/* access the groups "array" with this macro */ -#define GROUP_AT(gi, i) \ - ((gi)->blocks[(i)/NGROUPS_PER_BLOCK][(i)%NGROUPS_PER_BLOCK]) - -#ifdef ARCH_HAS_PREFETCH_SWITCH_STACK -extern void prefetch_stack(struct task_struct *t); -#else -static inline void prefetch_stack(struct task_struct *t) { } -#endif - -struct audit_context; /* See audit.c */ -struct mempolicy; -struct pipe_inode_info; -struct uts_namespace; - -enum sleep_type { - SLEEP_NORMAL, - SLEEP_NONINTERACTIVE, - SLEEP_INTERACTIVE, - SLEEP_INTERRUPTED, -}; - -struct prio_array; - -struct task_struct { - volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ - struct thread_info *thread_info; - atomic_t usage; - unsigned long flags; /* per process flags, defined below */ - unsigned long ptrace; - - int lock_depth; /* BKL lock depth */ - -#ifdef CONFIG_SMP -#ifdef __ARCH_WANT_UNLOCKED_CTXSW - int oncpu; -#endif -#endif - int load_weight; /* for niceness load balancing purposes */ - int prio, static_prio, normal_prio; - struct list_head run_list; - struct prio_array *array; - - unsigned short ioprio; -#ifdef CONFIG_BLK_DEV_IO_TRACE - unsigned int btrace_seq; -#endif - unsigned long sleep_avg; - unsigned long long timestamp, last_ran; - unsigned long long sched_time; /* sched_clock time spent running */ - enum sleep_type sleep_type; - - unsigned long policy; - cpumask_t cpus_allowed; - unsigned int time_slice, first_time_slice; - -#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) - struct sched_info sched_info; -#endif - - struct list_head tasks; - /* - * ptrace_list/ptrace_children forms the list of my children - * that were stolen by a ptracer. - */ - struct list_head ptrace_children; - struct list_head ptrace_list; - - struct mm_struct *mm, *active_mm; - -/* task state */ - struct linux_binfmt *binfmt; - long exit_state; - int exit_code, exit_signal; - int pdeath_signal; /* The signal sent when the parent dies */ - /* ??? */ - unsigned long personality; - unsigned did_exec:1; - pid_t pid; - pid_t tgid; - -#ifdef CONFIG_CC_STACKPROTECTOR - /* Canary value for the -fstack-protector gcc feature */ - unsigned long stack_canary; -#endif - /* - * pointers to (original) parent process, youngest child, younger sibling, - * older sibling, respectively. (p->father can be replaced with - * p->parent->pid) - */ - struct task_struct *real_parent; /* real parent process (when being debugged) */ - struct task_struct *parent; /* parent process */ - /* - * children/sibling forms the list of my children plus the - * tasks I'm ptracing. - */ - struct list_head children; /* list of my children */ - struct list_head sibling; /* linkage in my parent's children list */ - struct task_struct *group_leader; /* threadgroup leader */ - - /* PID/PID hash table linkage. */ - struct pid_link pids[PIDTYPE_MAX]; - struct list_head thread_group; - - struct completion *vfork_done; /* for vfork() */ - int __user *set_child_tid; /* CLONE_CHILD_SETTID */ - int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ - - unsigned long rt_priority; - cputime_t utime, stime; - unsigned long nvcsw, nivcsw; /* context switch counts */ - struct timespec start_time; -/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ - unsigned long min_flt, maj_flt; - - cputime_t it_prof_expires, it_virt_expires; - unsigned long long it_sched_expires; - struct list_head cpu_timers[3]; - -/* process credentials */ - uid_t uid,euid,suid,fsuid; - gid_t gid,egid,sgid,fsgid; - struct group_info *group_info; - kernel_cap_t cap_effective, cap_inheritable, cap_permitted; - unsigned keep_capabilities:1; - struct user_struct *user; -#ifdef CONFIG_KEYS - struct key *request_key_auth; /* assumed request_key authority */ - struct key *thread_keyring; /* keyring private to this thread */ - unsigned char jit_keyring; /* default keyring to attach requested keys to */ -#endif - /* - * fpu_counter contains the number of consecutive context switches - * that the FPU is used. If this is over a threshold, the lazy fpu - * saving becomes unlazy to save the trap. This is an unsigned char - * so that after 256 times the counter wraps and the behavior turns - * lazy again; this to deal with bursty apps that only use FPU for - * a short time - */ - unsigned char fpu_counter; - int oomkilladj; /* OOM kill score adjustment (bit shift). */ - char comm[TASK_COMM_LEN]; /* executable name excluding path - - access with [gs]et_task_comm (which lock - it with task_lock()) - - initialized normally by flush_old_exec */ -/* file system info */ - int link_count, total_link_count; -#ifdef CONFIG_SYSVIPC -/* ipc stuff */ - struct sysv_sem sysvsem; -#endif -/* CPU-specific state of this task */ - struct thread_struct thread; -/* filesystem information */ - struct fs_struct *fs; -/* open file information */ - struct files_struct *files; -/* namespaces */ - struct nsproxy *nsproxy; -/* signal handlers */ - struct signal_struct *signal; - struct sighand_struct *sighand; - - sigset_t blocked, real_blocked; - sigset_t saved_sigmask; /* To be restored with TIF_RESTORE_SIGMASK */ - struct sigpending pending; - - unsigned long sas_ss_sp; - size_t sas_ss_size; - int (*notifier)(void *priv); - void *notifier_data; - sigset_t *notifier_mask; - - void *security; - struct audit_context *audit_context; - seccomp_t seccomp; - -/* Thread group tracking */ - u32 parent_exec_id; - u32 self_exec_id; -/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ - spinlock_t alloc_lock; - - /* Protection of the PI data structures: */ - spinlock_t pi_lock; - -#ifdef CONFIG_RT_MUTEXES - /* PI waiters blocked on a rt_mutex held by this task */ - struct plist_head pi_waiters; - /* Deadlock detection and priority inheritance handling */ - struct rt_mutex_waiter *pi_blocked_on; -#endif - -#ifdef CONFIG_DEBUG_MUTEXES - /* mutex deadlock detection */ - struct mutex_waiter *blocked_on; -#endif -#ifdef CONFIG_TRACE_IRQFLAGS - unsigned int irq_events; - int hardirqs_enabled; - unsigned long hardirq_enable_ip; - unsigned int hardirq_enable_event; - unsigned long hardirq_disable_ip; - unsigned int hardirq_disable_event; - int softirqs_enabled; - unsigned long softirq_disable_ip; - unsigned int softirq_disable_event; - unsigned long softirq_enable_ip; - unsigned int softirq_enable_event; - int hardirq_context; - int softirq_context; -#endif -#ifdef CONFIG_LOCKDEP -# define MAX_LOCK_DEPTH 30UL - u64 curr_chain_key; - int lockdep_depth; - struct held_lock held_locks[MAX_LOCK_DEPTH]; - unsigned int lockdep_recursion; -#endif - -/* journalling filesystem info */ - void *journal_info; - -/* VM state */ - struct reclaim_state *reclaim_state; - - struct backing_dev_info *backing_dev_info; - - struct io_context *io_context; - - unsigned long ptrace_message; - siginfo_t *last_siginfo; /* For ptrace use. */ -/* - * current io wait handle: wait queue entry to use for io waits - * If this thread is processing aio, this points at the waitqueue - * inside the currently handled kiocb. It may be NULL (i.e. default - * to a stack based synchronous wait) if its doing sync IO. - */ - wait_queue_t *io_wait; -/* i/o counters(bytes read/written, #syscalls */ - u64 rchar, wchar, syscr, syscw; -#if defined(CONFIG_TASK_XACCT) - u64 acct_rss_mem1; /* accumulated rss usage */ - u64 acct_vm_mem1; /* accumulated virtual memory usage */ - cputime_t acct_stimexpd;/* stime since last update */ -#endif -#ifdef CONFIG_NUMA - struct mempolicy *mempolicy; - short il_next; -#endif -#ifdef CONFIG_CPUSETS - struct cpuset *cpuset; - nodemask_t mems_allowed; - int cpuset_mems_generation; - int cpuset_mem_spread_rotor; -#endif - struct robust_list_head __user *robust_list; -#ifdef CONFIG_COMPAT - struct compat_robust_list_head __user *compat_robust_list; -#endif - struct list_head pi_state_list; - struct futex_pi_state *pi_state_cache; - -#ifdef CONFIG_GRKERNSEC - /* grsecurity */ - struct acl_subject_label *acl; - struct acl_role_label *role; - struct file *exec_file; - u16 acl_role_id; - u8 acl_sp_role:1; - u8 is_writable:1; - u8 brute:1; -#endif - - atomic_t fs_excl; /* holding fs exclusive resources */ - struct rcu_head rcu; - - /* - * cache last used pipe for splice - */ - struct pipe_inode_info *splice_pipe; -#ifdef CONFIG_TASK_DELAY_ACCT - struct task_delay_info *delays; -#endif -}; - -static inline pid_t process_group(struct task_struct *tsk) -{ - return tsk->signal->pgrp; -} - -static inline struct pid *task_pid(struct task_struct *task) -{ - return task->pids[PIDTYPE_PID].pid; -} - -static inline struct pid *task_tgid(struct task_struct *task) -{ - return task->group_leader->pids[PIDTYPE_PID].pid; -} - -static inline struct pid *task_pgrp(struct task_struct *task) -{ - return task->group_leader->pids[PIDTYPE_PGID].pid; -} - -static inline struct pid *task_session(struct task_struct *task) -{ - return task->group_leader->pids[PIDTYPE_SID].pid; -} - -/** - * pid_alive - check that a task structure is not stale - * @p: Task structure to be checked. - * - * Test if a process is not yet dead (at most zombie state) - * If pid_alive fails, then pointers within the task structure - * can be stale and must not be dereferenced. - */ -static inline int pid_alive(struct task_struct *p) -{ - return p->pids[PIDTYPE_PID].pid != NULL; -} - -/** - * is_init - check if a task structure is init - * @tsk: Task structure to be checked. - * - * Check if a task structure is the first user space task the kernel created. - */ -static inline int is_init(struct task_struct *tsk) -{ - return tsk->pid == 1; -} - -extern struct pid *cad_pid; - -extern void free_task(struct task_struct *tsk); -#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) - -extern void __put_task_struct(struct task_struct *t); - -static inline void put_task_struct(struct task_struct *t) -{ - if (atomic_dec_and_test(&t->usage)) - __put_task_struct(t); -} - -/* - * Per process flags - */ -#define PF_ALIGNWARN 0x00000001 /* Print alignment warning msgs */ - /* Not implemented yet, only for 486*/ -#define PF_STARTING 0x00000002 /* being created */ -#define PF_EXITING 0x00000004 /* getting shut down */ -#define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ -#define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ -#define PF_DUMPCORE 0x00000200 /* dumped core */ -#define PF_SIGNALED 0x00000400 /* killed by a signal */ -#define PF_MEMALLOC 0x00000800 /* Allocating memory */ -#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ -#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ -#define PF_FREEZE 0x00004000 /* this task is being frozen for suspend now */ -#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ -#define PF_FROZEN 0x00010000 /* frozen for system suspend */ -#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ -#define PF_KSWAPD 0x00040000 /* I am kswapd */ -#define PF_SWAPOFF 0x00080000 /* I am in swapoff */ -#define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ -#define PF_BORROWED_MM 0x00200000 /* I am a kthread doing use_mm */ -#define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ -#define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ -#define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ -#define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ -#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ -#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ - -/* - * Only the _current_ task can read/write to tsk->flags, but other - * tasks can access tsk->flags in readonly mode for example - * with tsk_used_math (like during threaded core dumping). - * There is however an exception to this rule during ptrace - * or during fork: the ptracer task is allowed to write to the - * child->flags of its traced child (same goes for fork, the parent - * can write to the child->flags), because we're guaranteed the - * child is not running and in turn not changing child->flags - * at the same time the parent does it. - */ -#define clear_stopped_child_used_math(child) do { (child)->flags &= ~PF_USED_MATH; } while (0) -#define set_stopped_child_used_math(child) do { (child)->flags |= PF_USED_MATH; } while (0) -#define clear_used_math() clear_stopped_child_used_math(current) -#define set_used_math() set_stopped_child_used_math(current) -#define conditional_stopped_child_used_math(condition, child) \ - do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= (condition) ? PF_USED_MATH : 0; } while (0) -#define conditional_used_math(condition) \ - conditional_stopped_child_used_math(condition, current) -#define copy_to_stopped_child_used_math(child) \ - do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= current->flags & PF_USED_MATH; } while (0) -/* NOTE: this will return 0 or PF_USED_MATH, it will never return 1 */ -#define tsk_used_math(p) ((p)->flags & PF_USED_MATH) -#define used_math() tsk_used_math(current) - -#ifdef CONFIG_SMP -extern int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask); -#else -static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) -{ - if (!cpu_isset(0, new_mask)) - return -EINVAL; - return 0; -} -#endif - -extern unsigned long long sched_clock(void); -extern unsigned long long -current_sched_time(const struct task_struct *current_task); - -/* sched_exec is called by processes performing an exec */ -#ifdef CONFIG_SMP -extern void sched_exec(void); -#else -#define sched_exec() {} -#endif - -#ifdef CONFIG_HOTPLUG_CPU -extern void idle_task_exit(void); -#else -static inline void idle_task_exit(void) {} -#endif - -extern void sched_idle_next(void); - -#ifdef CONFIG_RT_MUTEXES -extern int rt_mutex_getprio(struct task_struct *p); -extern void rt_mutex_setprio(struct task_struct *p, int prio); -extern void rt_mutex_adjust_pi(struct task_struct *p); -#else -static inline int rt_mutex_getprio(struct task_struct *p) -{ - return p->normal_prio; -} -# define rt_mutex_adjust_pi(p) do { } while (0) -#endif - -extern void set_user_nice(struct task_struct *p, long nice); -extern int task_prio(const struct task_struct *p); -extern int task_nice(const struct task_struct *p); -extern int can_nice(const struct task_struct *p, const int nice); -extern int task_curr(const struct task_struct *p); -extern int idle_cpu(int cpu); -extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); -extern struct task_struct *idle_task(int cpu); -extern struct task_struct *curr_task(int cpu); -extern void set_curr_task(int cpu, struct task_struct *p); - -void yield(void); - -/* - * The default (Linux) execution domain. - */ -extern struct exec_domain default_exec_domain; - -union thread_union { - struct thread_info thread_info; - unsigned long stack[THREAD_SIZE/sizeof(long)]; -}; - -#ifndef __HAVE_ARCH_KSTACK_END -static inline int kstack_end(void *addr) -{ - /* Reliable end of stack detection: - * Some APM bios versions misalign the stack - */ - return !(((unsigned long)addr+sizeof(void*)-1) & (THREAD_SIZE-sizeof(void*))); -} -#endif - -extern union thread_union init_thread_union; -extern struct task_struct init_task; - -extern struct mm_struct init_mm; - -#define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr) -extern struct task_struct *find_task_by_pid_type(int type, int pid); -extern void set_special_pids(pid_t session, pid_t pgrp); -extern void __set_special_pids(pid_t session, pid_t pgrp); - -/* per-UID process charging. */ -extern struct user_struct * alloc_uid(uid_t); -static inline struct user_struct *get_uid(struct user_struct *u) -{ - atomic_inc(&u->__count); - return u; -} -extern void free_uid(struct user_struct *); -extern void switch_uid(struct user_struct *); - -#include - -extern void do_timer(unsigned long ticks); - -extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state)); -extern int FASTCALL(wake_up_process(struct task_struct * tsk)); -extern void FASTCALL(wake_up_new_task(struct task_struct * tsk, - unsigned long clone_flags)); -#ifdef CONFIG_SMP - extern void kick_process(struct task_struct *tsk); -#else - static inline void kick_process(struct task_struct *tsk) { } -#endif -extern void FASTCALL(sched_fork(struct task_struct * p, int clone_flags)); -extern void FASTCALL(sched_exit(struct task_struct * p)); - -extern int in_group_p(gid_t); -extern int in_egroup_p(gid_t); - -extern void proc_caches_init(void); -extern void flush_signals(struct task_struct *); -extern void flush_signal_handlers(struct task_struct *, int force_default); -extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); - -static inline int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) -{ - unsigned long flags; - int ret; - - spin_lock_irqsave(&tsk->sighand->siglock, flags); - ret = dequeue_signal(tsk, mask, info); - spin_unlock_irqrestore(&tsk->sighand->siglock, flags); - - return ret; -} - -extern void block_all_signals(int (*notifier)(void *priv), void *priv, - sigset_t *mask); -extern void unblock_all_signals(void); -extern void release_task(struct task_struct * p); -extern int send_sig_info(int, struct siginfo *, struct task_struct *); -extern int send_group_sig_info(int, struct siginfo *, struct task_struct *); -extern int force_sigsegv(int, struct task_struct *); -extern int force_sig_info(int, struct siginfo *, struct task_struct *); -extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); -extern int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); -extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); -extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); -extern int kill_pgrp(struct pid *pid, int sig, int priv); -extern int kill_pid(struct pid *pid, int sig, int priv); -extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); -extern int kill_pg_info(int, struct siginfo *, pid_t); -extern int kill_proc_info(int, struct siginfo *, pid_t); -extern void do_notify_parent(struct task_struct *, int); -extern void force_sig(int, struct task_struct *); -extern void force_sig_specific(int, struct task_struct *); -extern int send_sig(int, struct task_struct *, int); -extern void zap_other_threads(struct task_struct *p); -extern int kill_pg(pid_t, int, int); -extern int kill_proc(pid_t, int, int); -extern struct sigqueue *sigqueue_alloc(void); -extern void sigqueue_free(struct sigqueue *); -extern int send_sigqueue(int, struct sigqueue *, struct task_struct *); -extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *); -extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); -extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); - -static inline int kill_cad_pid(int sig, int priv) -{ - return kill_pid(cad_pid, sig, priv); -} - -/* These can be the second arg to send_sig_info/send_group_sig_info. */ -#define SEND_SIG_NOINFO ((struct siginfo *) 0) -#define SEND_SIG_PRIV ((struct siginfo *) 1) -#define SEND_SIG_FORCED ((struct siginfo *) 2) - -static inline int is_si_special(const struct siginfo *info) -{ - return info <= SEND_SIG_FORCED; -} - -/* True if we are on the alternate signal stack. */ - -static inline int on_sig_stack(unsigned long sp) -{ - return (sp - current->sas_ss_sp < current->sas_ss_size); -} - -static inline int sas_ss_flags(unsigned long sp) -{ - return (current->sas_ss_size == 0 ? SS_DISABLE - : on_sig_stack(sp) ? SS_ONSTACK : 0); -} - -/* - * Routines for handling mm_structs - */ -extern struct mm_struct * mm_alloc(void); - -/* mmdrop drops the mm and the page tables */ -extern void FASTCALL(__mmdrop(struct mm_struct *)); -static inline void mmdrop(struct mm_struct * mm) -{ - if (atomic_dec_and_test(&mm->mm_count)) - __mmdrop(mm); -} - -/* mmput gets rid of the mappings and all user-space */ -extern void mmput(struct mm_struct *); -/* Grab a reference to a task's mm, if it is not already going away */ -extern struct mm_struct *get_task_mm(struct task_struct *task); -/* Remove the current tasks stale references to the old mm_struct */ -extern void mm_release(struct task_struct *, struct mm_struct *); - -extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *); -extern void flush_thread(void); -extern void exit_thread(void); - -extern void exit_files(struct task_struct *); -extern void __cleanup_signal(struct signal_struct *); -extern void __cleanup_sighand(struct sighand_struct *); -extern void exit_itimers(struct signal_struct *); - -extern NORET_TYPE void do_group_exit(int); - -extern void daemonize(const char *, ...); -extern int allow_signal(int); -extern int disallow_signal(int); -extern struct task_struct *child_reaper; - -extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); -extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); -struct task_struct *fork_idle(int); - -extern void set_task_comm(struct task_struct *tsk, char *from); -extern void get_task_comm(char *to, struct task_struct *tsk); - -#ifdef CONFIG_SMP -extern void wait_task_inactive(struct task_struct * p); -#else -#define wait_task_inactive(p) do { } while (0) -#endif - -#define remove_parent(p) list_del_init(&(p)->sibling) -#define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children) - -#define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) - -#define for_each_process(p) \ - for (p = &init_task ; (p = next_task(p)) != &init_task ; ) - -/* - * Careful: do_each_thread/while_each_thread is a double loop so - * 'break' will not work as expected - use goto instead. - */ -#define do_each_thread(g, t) \ - for (g = t = &init_task ; (g = t = next_task(g)) != &init_task ; ) do - -#define while_each_thread(g, t) \ - while ((t = next_thread(t)) != g) - -/* de_thread depends on thread_group_leader not being a pid based check */ -#define thread_group_leader(p) (p == p->group_leader) - -/* Do to the insanities of de_thread it is possible for a process - * to have the pid of the thread group leader without actually being - * the thread group leader. For iteration through the pids in proc - * all we care about is that we have a task with the appropriate - * pid, we don't actually care if we have the right task. - */ -static inline int has_group_leader_pid(struct task_struct *p) -{ - return p->pid == p->tgid; -} - -static inline struct task_struct *next_thread(const struct task_struct *p) -{ - return list_entry(rcu_dereference(p->thread_group.next), - struct task_struct, thread_group); -} - -static inline int thread_group_empty(struct task_struct *p) -{ - return list_empty(&p->thread_group); -} - -#define delay_group_leader(p) \ - (thread_group_leader(p) && !thread_group_empty(p)) - -/* - * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring - * subscriptions and synchronises with wait4(). Also used in procfs. Also - * pins the final release of task.io_context. Also protects ->cpuset. - * - * Nests both inside and outside of read_lock(&tasklist_lock). - * It must not be nested with write_lock_irq(&tasklist_lock), - * neither inside nor outside. - */ -static inline void task_lock(struct task_struct *p) -{ - spin_lock(&p->alloc_lock); -} - -static inline void task_unlock(struct task_struct *p) -{ - spin_unlock(&p->alloc_lock); -} - -extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk, - unsigned long *flags); - -static inline void unlock_task_sighand(struct task_struct *tsk, - unsigned long *flags) -{ - spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); -} - -#ifndef __HAVE_THREAD_FUNCTIONS - -#define task_thread_info(task) (task)->thread_info -#define task_stack_page(task) ((void*)((task)->thread_info)) - -static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) -{ - *task_thread_info(p) = *task_thread_info(org); - task_thread_info(p)->task = p; -} - -static inline unsigned long *end_of_stack(struct task_struct *p) -{ - return (unsigned long *)(p->thread_info + 1); -} - -#endif - -/* set thread flags in other task's structures - * - see asm/thread_info.h for TIF_xxxx flags available - */ -static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) -{ - set_ti_thread_flag(task_thread_info(tsk), flag); -} - -static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag) -{ - clear_ti_thread_flag(task_thread_info(tsk), flag); -} - -static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) -{ - return test_and_set_ti_thread_flag(task_thread_info(tsk), flag); -} - -static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) -{ - return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag); -} - -static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) -{ - return test_ti_thread_flag(task_thread_info(tsk), flag); -} - -static inline void set_tsk_need_resched(struct task_struct *tsk) -{ - set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); -} - -static inline void clear_tsk_need_resched(struct task_struct *tsk) -{ - clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); -} - -static inline int signal_pending(struct task_struct *p) -{ - return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); -} - -static inline int need_resched(void) -{ - return unlikely(test_thread_flag(TIF_NEED_RESCHED)); -} - -/* - * cond_resched() and cond_resched_lock(): latency reduction via - * explicit rescheduling in places that are safe. The return - * value indicates whether a reschedule was done in fact. - * cond_resched_lock() will drop the spinlock before scheduling, - * cond_resched_softirq() will enable bhs before scheduling. - */ -extern int cond_resched(void); -extern int cond_resched_lock(spinlock_t * lock); -extern int cond_resched_softirq(void); - -/* - * Does a critical section need to be broken due to another - * task waiting?: - */ -#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP) -# define need_lockbreak(lock) ((lock)->break_lock) -#else -# define need_lockbreak(lock) 0 -#endif - -/* - * Does a critical section need to be broken due to another - * task waiting or preemption being signalled: - */ -static inline int lock_need_resched(spinlock_t *lock) -{ - if (need_lockbreak(lock) || need_resched()) - return 1; - return 0; -} - -/* Reevaluate whether the task has signals pending delivery. - This is required every time the blocked sigset_t changes. - callers must hold sighand->siglock. */ - -extern FASTCALL(void recalc_sigpending_tsk(struct task_struct *t)); -extern void recalc_sigpending(void); - -extern void signal_wake_up(struct task_struct *t, int resume_stopped); - -/* - * Wrappers for p->thread_info->cpu access. No-op on UP. - */ -#ifdef CONFIG_SMP - -static inline unsigned int task_cpu(const struct task_struct *p) -{ - return task_thread_info(p)->cpu; -} - -static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) -{ - task_thread_info(p)->cpu = cpu; -} - -#else - -static inline unsigned int task_cpu(const struct task_struct *p) -{ - return 0; -} - -static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) -{ -} - -#endif /* CONFIG_SMP */ - -#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT -extern void arch_pick_mmap_layout(struct mm_struct *mm); -#else -static inline void arch_pick_mmap_layout(struct mm_struct *mm) -{ - mm->mmap_base = TASK_UNMAPPED_BASE; - -#ifdef CONFIG_PAX_RANDMMAP - if (mm->pax_flags & MF_PAX_RANDMMAP) - mm->mmap_base += mm->delta_mmap; -#endif - - mm->get_unmapped_area = arch_get_unmapped_area; - mm->unmap_area = arch_unmap_area; -} -#endif - -extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); -extern long sched_getaffinity(pid_t pid, cpumask_t *mask); - -#include -extern int sched_mc_power_savings, sched_smt_power_savings; -extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings; -extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); - -extern void normalize_rt_tasks(void); - -#ifdef CONFIG_PM -/* - * Check if a process has been frozen - */ -static inline int frozen(struct task_struct *p) -{ - return p->flags & PF_FROZEN; -} - -/* - * Check if there is a request to freeze a process - */ -static inline int freezing(struct task_struct *p) -{ - return p->flags & PF_FREEZE; -} - -/* - * Request that a process be frozen - * FIXME: SMP problem. We may not modify other process' flags! - */ -static inline void freeze(struct task_struct *p) -{ - p->flags |= PF_FREEZE; -} - -/* - * Sometimes we may need to cancel the previous 'freeze' request - */ -static inline void do_not_freeze(struct task_struct *p) -{ - p->flags &= ~PF_FREEZE; -} - -/* - * Wake up a frozen process - */ -static inline int thaw_process(struct task_struct *p) -{ - if (frozen(p)) { - p->flags &= ~PF_FROZEN; - wake_up_process(p); - return 1; - } - return 0; -} - -/* - * freezing is complete, mark process as frozen - */ -static inline void frozen_process(struct task_struct *p) -{ - p->flags = (p->flags & ~PF_FREEZE) | PF_FROZEN; -} - -extern void refrigerator(void); -extern int freeze_processes(void); -extern void thaw_processes(void); - -static inline int try_to_freeze(void) -{ - if (freezing(current)) { - refrigerator(); - return 1; - } else - return 0; -} -#else -static inline int frozen(struct task_struct *p) { return 0; } -static inline int freezing(struct task_struct *p) { return 0; } -static inline void freeze(struct task_struct *p) { BUG(); } -static inline int thaw_process(struct task_struct *p) { return 1; } -static inline void frozen_process(struct task_struct *p) { BUG(); } - -static inline void refrigerator(void) {} -static inline int freeze_processes(void) { BUG(); return 0; } -static inline void thaw_processes(void) {} - -static inline int try_to_freeze(void) { return 0; } - -#endif /* CONFIG_PM */ -#endif /* __KERNEL__ */ - #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/sdla.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/sdla.h 2007-05-24 15:40:44.000000000 +0200 @@ -58,7 +58,7 @@ struct sdla_mem { int addr; int len; - void __user *data; + void *data; }; #define SDLA_START (FRAD_LAST_IOCTL + 7) @@ -112,228 +112,8 @@ short Tb_max; }; -#ifndef __KERNEL__ void sdla(void *cfg_info, char *dev, struct frad_conf *conf, int quiet); -#else - -/* important Z80 window addresses */ -#define SDLA_CONTROL_WND 0xE000 - -#define SDLA_502_CMD_BUF 0xEF60 -#define SDLA_502_RCV_BUF 0xA900 -#define SDLA_502_TXN_AVAIL 0xFFF1 -#define SDLA_502_RCV_AVAIL 0xFFF2 -#define SDLA_502_EVENT_FLAGS 0xFFF3 -#define SDLA_502_MDM_STATUS 0xFFF4 -#define SDLA_502_IRQ_INTERFACE 0xFFFD -#define SDLA_502_IRQ_PERMISSION 0xFFFE -#define SDLA_502_DATA_OFS 0x0010 - -#define SDLA_508_CMD_BUF 0xE000 -#define SDLA_508_TXBUF_INFO 0xF100 -#define SDLA_508_RXBUF_INFO 0xF120 -#define SDLA_508_EVENT_FLAGS 0xF003 -#define SDLA_508_MDM_STATUS 0xF004 -#define SDLA_508_IRQ_INTERFACE 0xF010 -#define SDLA_508_IRQ_PERMISSION 0xF011 -#define SDLA_508_TSE_OFFSET 0xF012 - -/* Event flags */ -#define SDLA_EVENT_STATUS 0x01 -#define SDLA_EVENT_DLCI_STATUS 0x02 -#define SDLA_EVENT_BAD_DLCI 0x04 -#define SDLA_EVENT_LINK_DOWN 0x40 - -/* IRQ Trigger flags */ -#define SDLA_INTR_RX 0x01 -#define SDLA_INTR_TX 0x02 -#define SDLA_INTR_MODEM 0x04 -#define SDLA_INTR_COMPLETE 0x08 -#define SDLA_INTR_STATUS 0x10 -#define SDLA_INTR_TIMER 0x20 - -/* DLCI status bits */ -#define SDLA_DLCI_DELETED 0x01 -#define SDLA_DLCI_ACTIVE 0x02 -#define SDLA_DLCI_WAITING 0x04 -#define SDLA_DLCI_NEW 0x08 -#define SDLA_DLCI_INCLUDED 0x40 - -/* valid command codes */ -#define SDLA_INFORMATION_WRITE 0x01 -#define SDLA_INFORMATION_READ 0x02 -#define SDLA_ISSUE_IN_CHANNEL_SIGNAL 0x03 -#define SDLA_SET_DLCI_CONFIGURATION 0x10 -#define SDLA_READ_DLCI_CONFIGURATION 0x11 -#define SDLA_DISABLE_COMMUNICATIONS 0x12 -#define SDLA_ENABLE_COMMUNICATIONS 0x13 -#define SDLA_READ_DLC_STATUS 0x14 -#define SDLA_READ_DLC_STATISTICS 0x15 -#define SDLA_FLUSH_DLC_STATISTICS 0x16 -#define SDLA_LIST_ACTIVE_DLCI 0x17 -#define SDLA_FLUSH_INFORMATION_BUFFERS 0x18 -#define SDLA_ADD_DLCI 0x20 -#define SDLA_DELETE_DLCI 0x21 -#define SDLA_ACTIVATE_DLCI 0x22 -#define SDLA_DEACTIVATE_DLCI 0x23 -#define SDLA_READ_MODEM_STATUS 0x30 -#define SDLA_SET_MODEM_STATUS 0x31 -#define SDLA_READ_COMMS_ERR_STATS 0x32 -#define SDLA_FLUSH_COMMS_ERR_STATS 0x33 -#define SDLA_READ_CODE_VERSION 0x40 -#define SDLA_SET_IRQ_TRIGGER 0x50 -#define SDLA_GET_IRQ_TRIGGER 0x51 - -/* In channel signal types */ -#define SDLA_ICS_LINK_VERIFY 0x02 -#define SDLA_ICS_STATUS_ENQ 0x03 - -/* modem status flags */ -#define SDLA_MODEM_DTR_HIGH 0x01 -#define SDLA_MODEM_RTS_HIGH 0x02 -#define SDLA_MODEM_DCD_HIGH 0x08 -#define SDLA_MODEM_CTS_HIGH 0x20 - -/* used for RET_MODEM interpretation */ -#define SDLA_MODEM_DCD_LOW 0x01 -#define SDLA_MODEM_CTS_LOW 0x02 - -/* return codes */ -#define SDLA_RET_OK 0x00 -#define SDLA_RET_COMMUNICATIONS 0x01 -#define SDLA_RET_CHANNEL_INACTIVE 0x02 -#define SDLA_RET_DLCI_INACTIVE 0x03 -#define SDLA_RET_DLCI_CONFIG 0x04 -#define SDLA_RET_BUF_TOO_BIG 0x05 -#define SDLA_RET_NO_DATA 0x05 -#define SDLA_RET_BUF_OVERSIZE 0x06 -#define SDLA_RET_CIR_OVERFLOW 0x07 -#define SDLA_RET_NO_BUFS 0x08 -#define SDLA_RET_TIMEOUT 0x0A -#define SDLA_RET_MODEM 0x10 -#define SDLA_RET_CHANNEL_OFF 0x11 -#define SDLA_RET_CHANNEL_ON 0x12 -#define SDLA_RET_DLCI_STATUS 0x13 -#define SDLA_RET_DLCI_UNKNOWN 0x14 -#define SDLA_RET_COMMAND_INVALID 0x1F - -/* Configuration flags */ -#define SDLA_DIRECT_RECV 0x0080 -#define SDLA_TX_NO_EXCEPT 0x0020 -#define SDLA_NO_ICF_MSGS 0x1000 -#define SDLA_TX50_RX50 0x0000 -#define SDLA_TX70_RX30 0x2000 -#define SDLA_TX30_RX70 0x4000 - -/* IRQ selection flags */ -#define SDLA_IRQ_RECEIVE 0x01 -#define SDLA_IRQ_TRANSMIT 0x02 -#define SDLA_IRQ_MODEM_STAT 0x04 -#define SDLA_IRQ_COMMAND 0x08 -#define SDLA_IRQ_CHANNEL 0x10 -#define SDLA_IRQ_TIMER 0x20 - -/* definitions for PC memory mapping */ -#define SDLA_8K_WINDOW 0x01 -#define SDLA_S502_SEG_A 0x10 -#define SDLA_S502_SEG_C 0x20 -#define SDLA_S502_SEG_D 0x00 -#define SDLA_S502_SEG_E 0x30 -#define SDLA_S507_SEG_A 0x00 -#define SDLA_S507_SEG_B 0x40 -#define SDLA_S507_SEG_C 0x80 -#define SDLA_S507_SEG_E 0xC0 -#define SDLA_S508_SEG_A 0x00 -#define SDLA_S508_SEG_C 0x10 -#define SDLA_S508_SEG_D 0x08 -#define SDLA_S508_SEG_E 0x18 - -/* SDLA adapter port constants */ -#define SDLA_IO_EXTENTS 0x04 - -#define SDLA_REG_CONTROL 0x00 -#define SDLA_REG_PC_WINDOW 0x01 /* offset for PC window select latch */ -#define SDLA_REG_Z80_WINDOW 0x02 /* offset for Z80 window select latch */ -#define SDLA_REG_Z80_CONTROL 0x03 /* offset for Z80 control latch */ - -#define SDLA_S502_STS 0x00 /* status reg for 502, 502E, 507 */ -#define SDLA_S508_GNRL 0x00 /* general purp. reg for 508 */ -#define SDLA_S508_STS 0x01 /* status reg for 508 */ -#define SDLA_S508_IDR 0x02 /* ID reg for 508 */ - -/* control register flags */ -#define SDLA_S502A_START 0x00 /* start the CPU */ -#define SDLA_S502A_INTREQ 0x02 -#define SDLA_S502A_INTEN 0x04 -#define SDLA_S502A_HALT 0x08 /* halt the CPU */ -#define SDLA_S502A_NMI 0x10 /* issue an NMI to the CPU */ - -#define SDLA_S502E_CPUEN 0x01 -#define SDLA_S502E_ENABLE 0x02 -#define SDLA_S502E_INTACK 0x04 - -#define SDLA_S507_ENABLE 0x01 -#define SDLA_S507_IRQ3 0x00 -#define SDLA_S507_IRQ4 0x20 -#define SDLA_S507_IRQ5 0x40 -#define SDLA_S507_IRQ7 0x60 -#define SDLA_S507_IRQ10 0x80 -#define SDLA_S507_IRQ11 0xA0 -#define SDLA_S507_IRQ12 0xC0 -#define SDLA_S507_IRQ15 0xE0 - -#define SDLA_HALT 0x00 -#define SDLA_CPUEN 0x02 -#define SDLA_MEMEN 0x04 -#define SDLA_S507_EPROMWR 0x08 -#define SDLA_S507_EPROMCLK 0x10 -#define SDLA_S508_INTRQ 0x08 -#define SDLA_S508_INTEN 0x10 - -struct sdla_cmd { - char opp_flag; - char cmd; - short length; - char retval; - short dlci; - char flags; - short rxlost_int; - long rxlost_app; - char reserve[2]; - char data[SDLA_MAX_DATA]; /* transfer data buffer */ -} __attribute__((packed)); - -struct intr_info { - char flags; - short txlen; - char irq; - char flags2; - short timeout; -} __attribute__((packed)); - -/* found in the 508's control window at RXBUF_INFO */ -struct buf_info { - unsigned short rse_num; - unsigned long rse_base; - unsigned long rse_next; - unsigned long buf_base; - unsigned short reserved; - unsigned long buf_top; -} __attribute__((packed)); - -/* structure pointed to by rse_base in RXBUF_INFO struct */ -struct buf_entry { - char opp_flag; - short length; - short dlci; - char flags; - short timestamp; - short reserved[2]; - long buf_addr; -} __attribute__((packed)); - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/selinux_netlink.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/selinux_netlink.h 2007-05-24 15:40:44.000000000 +0200 @@ -20,12 +20,10 @@ SELNL_MSG_MAX }; -#ifndef __KERNEL__ /* Multicast groups - backwards compatiblility for userspace */ #define SELNL_GRP_NONE 0x00000000 #define SELNL_GRP_AVC 0x00000001 /* AVC notifications */ #define SELNL_GRP_ALL 0xffffffff -#endif enum selinux_nlgroups { SELNLGRP_NONE, --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/sem.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/sem.h 2007-05-24 15:40:44.000000000 +0200 @@ -44,10 +44,10 @@ /* arg for semctl system calls. */ union semun { int val; /* value for SETVAL */ - struct semid_ds __user *buf; /* buffer for IPC_STAT & IPC_SET */ - unsigned short __user *array; /* array for GETALL & SETALL */ - struct seminfo __user *__buf; /* buffer for IPC_INFO */ - void __user *__pad; + struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ + unsigned short *array; /* array for GETALL & SETALL */ + struct seminfo *__buf; /* buffer for IPC_INFO */ + void *__pad; }; struct seminfo { @@ -76,85 +76,5 @@ #define SEMMAP SEMMNS /* # of entries in semaphore map */ #define SEMUSZ 20 /* sizeof struct sem_undo */ -#ifdef __KERNEL__ -#include - -struct task_struct; - -/* One semaphore structure for each semaphore in the system. */ -struct sem { - int semval; /* current value */ - int sempid; /* pid of last operation */ -}; - -/* One sem_array data structure for each set of semaphores in the system. */ -struct sem_array { - struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */ - int sem_id; - time_t sem_otime; /* last semop time */ - time_t sem_ctime; /* last change time */ - struct sem *sem_base; /* ptr to first semaphore in array */ - struct sem_queue *sem_pending; /* pending operations to be processed */ - struct sem_queue **sem_pending_last; /* last pending operation */ - struct sem_undo *undo; /* undo requests on this array */ - unsigned long sem_nsems; /* no. of semaphores in array */ -}; - -/* One queue for each sleeping process in the system. */ -struct sem_queue { - struct sem_queue * next; /* next entry in the queue */ - struct sem_queue ** prev; /* previous entry in the queue, *(q->prev) == q */ - struct task_struct* sleeper; /* this process */ - struct sem_undo * undo; /* undo structure */ - int pid; /* process id of requesting process */ - int status; /* completion status of operation */ - struct sem_array * sma; /* semaphore array for operations */ - int id; /* internal sem id */ - struct sembuf * sops; /* array of pending operations */ - int nsops; /* number of operations */ - int alter; /* does the operation alter the array? */ -}; - -/* Each task has a list of undo requests. They are executed automatically - * when the process exits. - */ -struct sem_undo { - struct sem_undo * proc_next; /* next entry on this process */ - struct sem_undo * id_next; /* next entry on this semaphore set */ - int semid; /* semaphore set identifier */ - short * semadj; /* array of adjustments, one per semaphore */ -}; - -/* sem_undo_list controls shared access to the list of sem_undo structures - * that may be shared among all a CLONE_SYSVSEM task group. - */ -struct sem_undo_list { - atomic_t refcnt; - spinlock_t lock; - struct sem_undo *proc_list; -}; - -struct sysv_sem { - struct sem_undo_list *undo_list; -}; - -#ifdef CONFIG_SYSVIPC - -extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); -extern void exit_sem(struct task_struct *tsk); - -#else -static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) -{ - return 0; -} - -static inline void exit_sem(struct task_struct *tsk) -{ - return; -} -#endif - -#endif /* __KERNEL__ */ #endif /* _LINUX_SEM_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/serial.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/serial.h 2007-05-24 15:40:44.000000000 +0200 @@ -10,26 +10,6 @@ #ifndef _LINUX_SERIAL_H #define _LINUX_SERIAL_H -#ifdef __KERNEL__ -#include -#include - -/* - * Counters of the input lines (CTS, DSR, RI, CD) interrupts - */ - -struct async_icount { - __u32 cts, dsr, rng, dcd, tx, rx; - __u32 frame, parity, overrun, brk; - __u32 buf_overrun; -}; - -/* - * The size of the serial xmit buffer is 1 page, or 4096 bytes - */ -#define SERIAL_XMIT_SIZE PAGE_SIZE - -#endif struct serial_struct { int type; @@ -174,14 +154,4 @@ }; -#ifdef __KERNEL__ -#include - -/* Allow architectures to override entries in serial8250_ports[] at run time: */ -struct uart_port; /* forward declaration */ -extern int early_serial_setup(struct uart_port *port); -extern int early_serial_console_init(char *options); -extern int serial8250_start_console(struct uart_port *port, char *options); - -#endif /* __KERNEL__ */ #endif /* _LINUX_SERIAL_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/serial_core.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/serial_core.h 2007-05-24 15:40:44.000000000 +0200 @@ -136,400 +136,5 @@ #define PORT_S3C2412 73 -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include -#include - -struct uart_port; -struct uart_info; -struct serial_struct; -struct device; - -/* - * This structure describes all the operations that can be - * done on the physical hardware. - */ -struct uart_ops { - unsigned int (*tx_empty)(struct uart_port *); - void (*set_mctrl)(struct uart_port *, unsigned int mctrl); - unsigned int (*get_mctrl)(struct uart_port *); - void (*stop_tx)(struct uart_port *); - void (*start_tx)(struct uart_port *); - void (*send_xchar)(struct uart_port *, char ch); - void (*stop_rx)(struct uart_port *); - void (*enable_ms)(struct uart_port *); - void (*break_ctl)(struct uart_port *, int ctl); - int (*startup)(struct uart_port *); - void (*shutdown)(struct uart_port *); - void (*set_termios)(struct uart_port *, struct termios *new, - struct termios *old); - void (*pm)(struct uart_port *, unsigned int state, - unsigned int oldstate); - int (*set_wake)(struct uart_port *, unsigned int state); - - /* - * Return a string describing the type of the port - */ - const char *(*type)(struct uart_port *); - - /* - * Release IO and memory resources used by the port. - * This includes iounmap if necessary. - */ - void (*release_port)(struct uart_port *); - - /* - * Request IO and memory resources used by the port. - * This includes iomapping the port if necessary. - */ - int (*request_port)(struct uart_port *); - void (*config_port)(struct uart_port *, int); - int (*verify_port)(struct uart_port *, struct serial_struct *); - int (*ioctl)(struct uart_port *, unsigned int, unsigned long); -}; - -#define UART_CONFIG_TYPE (1 << 0) -#define UART_CONFIG_IRQ (1 << 1) - -struct uart_icount { - __u32 cts; - __u32 dsr; - __u32 rng; - __u32 dcd; - __u32 rx; - __u32 tx; - __u32 frame; - __u32 overrun; - __u32 parity; - __u32 brk; - __u32 buf_overrun; -}; - -typedef unsigned int __bitwise__ upf_t; - -struct uart_port { - spinlock_t lock; /* port lock */ - unsigned int iobase; /* in/out[bwl] */ - unsigned char __iomem *membase; /* read/write[bwl] */ - unsigned int irq; /* irq number */ - unsigned int uartclk; /* base uart clock */ - unsigned int fifosize; /* tx fifo size */ - unsigned char x_char; /* xon/xoff char */ - unsigned char regshift; /* reg offset shift */ - unsigned char iotype; /* io access style */ - unsigned char unused1; - -#define UPIO_PORT (0) -#define UPIO_HUB6 (1) -#define UPIO_MEM (2) -#define UPIO_MEM32 (3) -#define UPIO_AU (4) /* Au1x00 type IO */ -#define UPIO_TSI (5) /* Tsi108/109 type IO */ - - unsigned int read_status_mask; /* driver specific */ - unsigned int ignore_status_mask; /* driver specific */ - struct uart_info *info; /* pointer to parent info */ - struct uart_icount icount; /* statistics */ - - struct console *cons; /* struct console, if any */ -#ifdef CONFIG_SERIAL_CORE_CONSOLE - unsigned long sysrq; /* sysrq timeout */ -#endif - - upf_t flags; - -#define UPF_FOURPORT ((__force upf_t) (1 << 1)) -#define UPF_SAK ((__force upf_t) (1 << 2)) -#define UPF_SPD_MASK ((__force upf_t) (0x1030)) -#define UPF_SPD_HI ((__force upf_t) (0x0010)) -#define UPF_SPD_VHI ((__force upf_t) (0x0020)) -#define UPF_SPD_CUST ((__force upf_t) (0x0030)) -#define UPF_SPD_SHI ((__force upf_t) (0x1000)) -#define UPF_SPD_WARP ((__force upf_t) (0x1010)) -#define UPF_SKIP_TEST ((__force upf_t) (1 << 6)) -#define UPF_AUTO_IRQ ((__force upf_t) (1 << 7)) -#define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) -#define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) -#define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) -#define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) -#define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) -#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) -#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) -#define UPF_DEAD ((__force upf_t) (1 << 30)) -#define UPF_IOREMAP ((__force upf_t) (1 << 31)) - -#define UPF_CHANGE_MASK ((__force upf_t) (0x17fff)) -#define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY)) - - unsigned int mctrl; /* current modem ctrl settings */ - unsigned int timeout; /* character-based timeout */ - unsigned int type; /* port type */ - const struct uart_ops *ops; - unsigned int custom_divisor; - unsigned int line; /* port index */ - unsigned long mapbase; /* for ioremap */ - struct device *dev; /* parent device */ - unsigned char hub6; /* this should be in the 8250 driver */ - unsigned char unused[3]; -}; - -/* - * This is the state information which is persistent across opens. - * The low level driver must not to touch any elements contained - * within. - */ -struct uart_state { - unsigned int close_delay; /* msec */ - unsigned int closing_wait; /* msec */ - -#define USF_CLOSING_WAIT_INF (0) -#define USF_CLOSING_WAIT_NONE (~0U) - - int count; - int pm_state; - struct uart_info *info; - struct uart_port *port; - - struct mutex mutex; -}; - -#define UART_XMIT_SIZE PAGE_SIZE - -typedef unsigned int __bitwise__ uif_t; - -/* - * This is the state information which is only valid when the port - * is open; it may be freed by the core driver once the device has - * been closed. Either the low level driver or the core can modify - * stuff here. - */ -struct uart_info { - struct tty_struct *tty; - struct circ_buf xmit; - uif_t flags; - -/* - * Definitions for info->flags. These are _private_ to serial_core, and - * are specific to this structure. They may be queried by low level drivers. - */ -#define UIF_CHECK_CD ((__force uif_t) (1 << 25)) -#define UIF_CTS_FLOW ((__force uif_t) (1 << 26)) -#define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29)) -#define UIF_INITIALIZED ((__force uif_t) (1 << 31)) -#define UIF_SUSPENDED ((__force uif_t) (1 << 30)) - - int blocked_open; - - struct tasklet_struct tlet; - - wait_queue_head_t open_wait; - wait_queue_head_t delta_msr_wait; -}; - -/* number of characters left in xmit buffer before we ask for more */ -#define WAKEUP_CHARS 256 - -struct module; -struct tty_driver; - -struct uart_driver { - struct module *owner; - const char *driver_name; - const char *dev_name; - int major; - int minor; - int nr; - struct console *cons; - - /* - * these are private; the low level driver should not - * touch these; they should be initialised to NULL - */ - struct uart_state *state; - struct tty_driver *tty_driver; -}; - -void uart_write_wakeup(struct uart_port *port); - -/* - * Baud rate helpers. - */ -void uart_update_timeout(struct uart_port *port, unsigned int cflag, - unsigned int baud); -unsigned int uart_get_baud_rate(struct uart_port *port, struct termios *termios, - struct termios *old, unsigned int min, - unsigned int max); -unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); - -/* - * Console helpers. - */ -struct uart_port *uart_get_console(struct uart_port *ports, int nr, - struct console *c); -void uart_parse_options(char *options, int *baud, int *parity, int *bits, - int *flow); -int uart_set_options(struct uart_port *port, struct console *co, int baud, - int parity, int bits, int flow); -struct tty_driver *uart_console_device(struct console *co, int *index); -void uart_console_write(struct uart_port *port, const char *s, - unsigned int count, - void (*putchar)(struct uart_port *, int)); - -/* - * Port/driver registration/removal - */ -int uart_register_driver(struct uart_driver *uart); -void uart_unregister_driver(struct uart_driver *uart); -int uart_add_one_port(struct uart_driver *reg, struct uart_port *port); -int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); -int uart_match_port(struct uart_port *port1, struct uart_port *port2); - -/* - * Power Management - */ -int uart_suspend_port(struct uart_driver *reg, struct uart_port *port); -int uart_resume_port(struct uart_driver *reg, struct uart_port *port); - -#define uart_circ_empty(circ) ((circ)->head == (circ)->tail) -#define uart_circ_clear(circ) ((circ)->head = (circ)->tail = 0) - -#define uart_circ_chars_pending(circ) \ - (CIRC_CNT((circ)->head, (circ)->tail, UART_XMIT_SIZE)) - -#define uart_circ_chars_free(circ) \ - (CIRC_SPACE((circ)->head, (circ)->tail, UART_XMIT_SIZE)) - -#define uart_tx_stopped(port) \ - ((port)->info->tty->stopped || (port)->info->tty->hw_stopped) - -/* - * The following are helper functions for the low level drivers. - */ -static inline int -uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) -{ -#ifdef SUPPORT_SYSRQ - if (port->sysrq) { - if (ch && time_before(jiffies, port->sysrq)) { - handle_sysrq(ch, port->info->tty); - port->sysrq = 0; - return 1; - } - port->sysrq = 0; - } -#endif - return 0; -} -#ifndef SUPPORT_SYSRQ -#define uart_handle_sysrq_char(port,ch) uart_handle_sysrq_char(port, 0) -#endif - -/* - * We do the SysRQ and SAK checking like this... - */ -static inline int uart_handle_break(struct uart_port *port) -{ - struct uart_info *info = port->info; -#ifdef SUPPORT_SYSRQ - if (port->cons && port->cons->index == port->line) { - if (!port->sysrq) { - port->sysrq = jiffies + HZ*5; - return 1; - } - port->sysrq = 0; - } -#endif - if (port->flags & UPF_SAK) - do_SAK(info->tty); - return 0; -} - -/** - * uart_handle_dcd_change - handle a change of carrier detect state - * @port: uart_port structure for the open port - * @status: new carrier detect status, nonzero if active - */ -static inline void -uart_handle_dcd_change(struct uart_port *port, unsigned int status) -{ - struct uart_info *info = port->info; - - port->icount.dcd++; - -#ifdef CONFIG_HARD_PPS - if ((port->flags & UPF_HARDPPS_CD) && status) - hardpps(); -#endif - - if (info->flags & UIF_CHECK_CD) { - if (status) - wake_up_interruptible(&info->open_wait); - else if (info->tty) - tty_hangup(info->tty); - } -} - -/** - * uart_handle_cts_change - handle a change of clear-to-send state - * @port: uart_port structure for the open port - * @status: new clear to send status, nonzero if active - */ -static inline void -uart_handle_cts_change(struct uart_port *port, unsigned int status) -{ - struct uart_info *info = port->info; - struct tty_struct *tty = info->tty; - - port->icount.cts++; - - if (info->flags & UIF_CTS_FLOW) { - if (tty->hw_stopped) { - if (status) { - tty->hw_stopped = 0; - port->ops->start_tx(port); - uart_write_wakeup(port); - } - } else { - if (!status) { - tty->hw_stopped = 1; - port->ops->stop_tx(port); - } - } - } -} - -#include - -static inline void -uart_insert_char(struct uart_port *port, unsigned int status, - unsigned int overrun, unsigned int ch, unsigned int flag) -{ - struct tty_struct *tty = port->info->tty; - - if ((status & port->ignore_status_mask & ~overrun) == 0) - tty_insert_flip_char(tty, ch, flag); - - /* - * Overrun is special. Since it's reported immediately, - * it doesn't affect the current character. - */ - if (status & ~port->ignore_status_mask & overrun) - tty_insert_flip_char(tty, 0, TTY_OVERRUN); -} - -/* - * UART_ENABLE_MS - determine if port should enable modem status irqs - */ -#define UART_ENABLE_MS(port,cflag) ((port)->flags & UPF_HARDPPS_CD || \ - (cflag) & CRTSCTS || \ - !((cflag) & CLOCAL)) - -#endif #endif /* LINUX_SERIAL_CORE_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/serio.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/serio.h 2007-05-24 15:40:44.000000000 +0200 @@ -13,160 +13,6 @@ #define SPIOCSTYPE _IOW('q', 0x01, unsigned long) -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include - -struct serio { - void *port_data; - - char name[32]; - char phys[32]; - - unsigned int manual_bind; - - struct serio_device_id id; - - spinlock_t lock; /* protects critical sections from port's interrupt handler */ - - int (*write)(struct serio *, unsigned char); - int (*open)(struct serio *); - void (*close)(struct serio *); - int (*start)(struct serio *); - void (*stop)(struct serio *); - - struct serio *parent, *child; - unsigned int depth; /* level of nesting in serio hierarchy */ - - struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ - struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ - - struct device dev; - unsigned int registered; /* port has been fully registered with driver core */ - - struct list_head node; -}; -#define to_serio_port(d) container_of(d, struct serio, dev) - -struct serio_driver { - void *private; - char *description; - - struct serio_device_id *id_table; - unsigned int manual_bind; - - void (*write_wakeup)(struct serio *); - irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int); - int (*connect)(struct serio *, struct serio_driver *drv); - int (*reconnect)(struct serio *); - void (*disconnect)(struct serio *); - void (*cleanup)(struct serio *); - - struct device_driver driver; -}; -#define to_serio_driver(d) container_of(d, struct serio_driver, driver) - -int serio_open(struct serio *serio, struct serio_driver *drv); -void serio_close(struct serio *serio); -void serio_rescan(struct serio *serio); -void serio_reconnect(struct serio *serio); -irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags); - -void __serio_register_port(struct serio *serio, struct module *owner); -static inline void serio_register_port(struct serio *serio) -{ - __serio_register_port(serio, THIS_MODULE); -} - -void serio_unregister_port(struct serio *serio); -void serio_unregister_child_port(struct serio *serio); -void __serio_unregister_port_delayed(struct serio *serio, struct module *owner); -static inline void serio_unregister_port_delayed(struct serio *serio) -{ - __serio_unregister_port_delayed(serio, THIS_MODULE); -} - -void __serio_register_driver(struct serio_driver *drv, struct module *owner); -static inline void serio_register_driver(struct serio_driver *drv) -{ - __serio_register_driver(drv, THIS_MODULE); -} - -void serio_unregister_driver(struct serio_driver *drv); - -static inline int serio_write(struct serio *serio, unsigned char data) -{ - if (serio->write) - return serio->write(serio, data); - else - return -1; -} - -static inline void serio_drv_write_wakeup(struct serio *serio) -{ - if (serio->drv && serio->drv->write_wakeup) - serio->drv->write_wakeup(serio); -} - -static inline void serio_cleanup(struct serio *serio) -{ - if (serio->drv && serio->drv->cleanup) - serio->drv->cleanup(serio); -} - -/* - * Use the following functions to manipulate serio's per-port - * driver-specific data. - */ -static inline void *serio_get_drvdata(struct serio *serio) -{ - return dev_get_drvdata(&serio->dev); -} - -static inline void serio_set_drvdata(struct serio *serio, void *data) -{ - dev_set_drvdata(&serio->dev, data); -} - -/* - * Use the following functions to protect critical sections in - * driver code from port's interrupt handler - */ -static inline void serio_pause_rx(struct serio *serio) -{ - spin_lock_irq(&serio->lock); -} - -static inline void serio_continue_rx(struct serio *serio) -{ - spin_unlock_irq(&serio->lock); -} - -/* - * Use the following functions to pin serio's driver in process context - */ -static inline int serio_pin_driver(struct serio *serio) -{ - return mutex_lock_interruptible(&serio->drv_mutex); -} - -static inline void serio_pin_driver_uninterruptible(struct serio *serio) -{ - mutex_lock(&serio->drv_mutex); -} - -static inline void serio_unpin_driver(struct serio *serio) -{ - mutex_unlock(&serio->drv_mutex); -} - - -#endif /* * bit masks for use in "interrupt" flags (3rd argument) --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/shm.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/shm.h 2007-05-24 15:40:44.000000000 +0200 @@ -72,42 +72,5 @@ unsigned long swap_successes; }; -#ifdef __KERNEL__ -struct shmid_kernel /* private to the kernel */ -{ - struct kern_ipc_perm shm_perm; - struct file * shm_file; - int id; - unsigned long shm_nattch; - unsigned long shm_segsz; - time_t shm_atim; - time_t shm_dtim; - time_t shm_ctim; - pid_t shm_cprid; - pid_t shm_lprid; - struct user_struct *mlock_user; -#ifdef CONFIG_GRKERNSEC - time_t shm_createtime; - pid_t shm_lapid; -#endif -}; - -/* shm_mode upper byte flags */ -#define SHM_DEST 01000 /* segment will be destroyed on last detach */ -#define SHM_LOCKED 02000 /* segment will not be swapped */ -#define SHM_HUGETLB 04000 /* segment will use huge TLB pages */ -#define SHM_NORESERVE 010000 /* don't check for reservations */ - -#ifdef CONFIG_SYSVIPC -long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr); -#else -static inline long do_shmat(int shmid, char __user *shmaddr, - int shmflg, unsigned long *addr) -{ - return -ENOSYS; -} -#endif - -#endif /* __KERNEL__ */ #endif /* _LINUX_SHM_H_ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/signal.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/signal.h 2007-05-24 15:40:44.000000000 +0200 @@ -4,243 +4,5 @@ #include #include -#ifdef __KERNEL__ -#include -#include - -/* - * Real Time signals may be queued. - */ - -struct sigqueue { - struct list_head list; - int flags; - siginfo_t info; - struct user_struct *user; -}; - -/* flags values. */ -#define SIGQUEUE_PREALLOC 1 - -struct sigpending { - struct list_head list; - sigset_t signal; -}; - -/* - * Define some primitives to manipulate sigset_t. - */ - -#ifndef __HAVE_ARCH_SIG_BITOPS -#include - -/* We don't use for these because there is no need to - be atomic. */ -static inline void sigaddset(sigset_t *set, int _sig) -{ - unsigned long sig = _sig - 1; - if (_NSIG_WORDS == 1) - set->sig[0] |= 1UL << sig; - else - set->sig[sig / _NSIG_BPW] |= 1UL << (sig % _NSIG_BPW); -} - -static inline void sigdelset(sigset_t *set, int _sig) -{ - unsigned long sig = _sig - 1; - if (_NSIG_WORDS == 1) - set->sig[0] &= ~(1UL << sig); - else - set->sig[sig / _NSIG_BPW] &= ~(1UL << (sig % _NSIG_BPW)); -} - -static inline int sigismember(sigset_t *set, int _sig) -{ - unsigned long sig = _sig - 1; - if (_NSIG_WORDS == 1) - return 1 & (set->sig[0] >> sig); - else - return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); -} - -static inline int sigfindinword(unsigned long word) -{ - return ffz(~word); -} - -#endif /* __HAVE_ARCH_SIG_BITOPS */ - -static inline int sigisemptyset(sigset_t *set) -{ - extern void _NSIG_WORDS_is_unsupported_size(void); - switch (_NSIG_WORDS) { - case 4: - return (set->sig[3] | set->sig[2] | - set->sig[1] | set->sig[0]) == 0; - case 2: - return (set->sig[1] | set->sig[0]) == 0; - case 1: - return set->sig[0] == 0; - default: - _NSIG_WORDS_is_unsupported_size(); - return 0; - } -} - -#define sigmask(sig) (1UL << ((sig) - 1)) - -#ifndef __HAVE_ARCH_SIG_SETOPS -#include - -#define _SIG_SET_BINOP(name, op) \ -static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) \ -{ \ - extern void _NSIG_WORDS_is_unsupported_size(void); \ - unsigned long a0, a1, a2, a3, b0, b1, b2, b3; \ - \ - switch (_NSIG_WORDS) { \ - case 4: \ - a3 = a->sig[3]; a2 = a->sig[2]; \ - b3 = b->sig[3]; b2 = b->sig[2]; \ - r->sig[3] = op(a3, b3); \ - r->sig[2] = op(a2, b2); \ - case 2: \ - a1 = a->sig[1]; b1 = b->sig[1]; \ - r->sig[1] = op(a1, b1); \ - case 1: \ - a0 = a->sig[0]; b0 = b->sig[0]; \ - r->sig[0] = op(a0, b0); \ - break; \ - default: \ - _NSIG_WORDS_is_unsupported_size(); \ - } \ -} - -#define _sig_or(x,y) ((x) | (y)) -_SIG_SET_BINOP(sigorsets, _sig_or) - -#define _sig_and(x,y) ((x) & (y)) -_SIG_SET_BINOP(sigandsets, _sig_and) - -#define _sig_nand(x,y) ((x) & ~(y)) -_SIG_SET_BINOP(signandsets, _sig_nand) - -#undef _SIG_SET_BINOP -#undef _sig_or -#undef _sig_and -#undef _sig_nand - -#define _SIG_SET_OP(name, op) \ -static inline void name(sigset_t *set) \ -{ \ - extern void _NSIG_WORDS_is_unsupported_size(void); \ - \ - switch (_NSIG_WORDS) { \ - case 4: set->sig[3] = op(set->sig[3]); \ - set->sig[2] = op(set->sig[2]); \ - case 2: set->sig[1] = op(set->sig[1]); \ - case 1: set->sig[0] = op(set->sig[0]); \ - break; \ - default: \ - _NSIG_WORDS_is_unsupported_size(); \ - } \ -} - -#define _sig_not(x) (~(x)) -_SIG_SET_OP(signotset, _sig_not) - -#undef _SIG_SET_OP -#undef _sig_not - -static inline void sigemptyset(sigset_t *set) -{ - switch (_NSIG_WORDS) { - default: - memset(set, 0, sizeof(sigset_t)); - break; - case 2: set->sig[1] = 0; - case 1: set->sig[0] = 0; - break; - } -} - -static inline void sigfillset(sigset_t *set) -{ - switch (_NSIG_WORDS) { - default: - memset(set, -1, sizeof(sigset_t)); - break; - case 2: set->sig[1] = -1; - case 1: set->sig[0] = -1; - break; - } -} - -/* Some extensions for manipulating the low 32 signals in particular. */ - -static inline void sigaddsetmask(sigset_t *set, unsigned long mask) -{ - set->sig[0] |= mask; -} - -static inline void sigdelsetmask(sigset_t *set, unsigned long mask) -{ - set->sig[0] &= ~mask; -} - -static inline int sigtestsetmask(sigset_t *set, unsigned long mask) -{ - return (set->sig[0] & mask) != 0; -} - -static inline void siginitset(sigset_t *set, unsigned long mask) -{ - set->sig[0] = mask; - switch (_NSIG_WORDS) { - default: - memset(&set->sig[1], 0, sizeof(long)*(_NSIG_WORDS-1)); - break; - case 2: set->sig[1] = 0; - case 1: ; - } -} - -static inline void siginitsetinv(sigset_t *set, unsigned long mask) -{ - set->sig[0] = ~mask; - switch (_NSIG_WORDS) { - default: - memset(&set->sig[1], -1, sizeof(long)*(_NSIG_WORDS-1)); - break; - case 2: set->sig[1] = -1; - case 1: ; - } -} - -#endif /* __HAVE_ARCH_SIG_SETOPS */ - -static inline void init_sigpending(struct sigpending *sig) -{ - sigemptyset(&sig->signal); - INIT_LIST_HEAD(&sig->list); -} - -extern void flush_sigqueue(struct sigpending *queue); - -/* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */ -static inline int valid_signal(unsigned long sig) -{ - return sig <= _NSIG ? 1 : 0; -} - -extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); -extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); -extern long do_sigpending(void __user *, unsigned long); -extern int sigprocmask(int, sigset_t *, sigset_t *); - -struct pt_regs; -extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); - -#endif /* __KERNEL__ */ #endif /* _LINUX_SIGNAL_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/smb.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/smb.h 2007-05-24 15:40:44.000000000 +0200 @@ -61,55 +61,4 @@ __s16 serverzone; }; -#ifdef __KERNEL__ - -#define SMB_NLS_MAXNAMELEN 20 -struct smb_nls_codepage { - char local_name[SMB_NLS_MAXNAMELEN]; - char remote_name[SMB_NLS_MAXNAMELEN]; -}; - - -#define SMB_MAXNAMELEN 255 -#define SMB_MAXPATHLEN 1024 - -/* - * Contains all relevant data on a SMB networked file. - */ -struct smb_fattr { - __u16 attr; - - unsigned long f_ino; - umode_t f_mode; - nlink_t f_nlink; - uid_t f_uid; - gid_t f_gid; - dev_t f_rdev; - loff_t f_size; - struct timespec f_atime; - struct timespec f_mtime; - struct timespec f_ctime; - unsigned long f_blocks; - int f_unix; -}; - -enum smb_conn_state { - CONN_VALID, /* everything's fine */ - CONN_INVALID, /* Something went wrong, but did not - try to reconnect yet. */ - CONN_RETRIED, /* Tried a reconnection, but was refused */ - CONN_RETRYING /* Currently trying to reconnect */ -}; - -#define SMB_HEADER_LEN 37 /* includes everything up to, but not - * including smb_bcc */ - -#define SMB_INITIAL_PACKET_SIZE 4000 -#define SMB_MAX_PACKET_SIZE 32768 - -/* reserve this much space for trans2 parameters. Shouldn't have to be more - than 10 or so, but OS/2 seems happier like this. */ -#define SMB_TRANS2_MAX_PARAM 64 - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/smb_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/smb_fs.h 2007-05-24 15:40:44.000000000 +0200 @@ -21,137 +21,5 @@ #define SMB_IOC_GETMOUNTUID32 _IOR('u', 3, __kernel_uid32_t) -#ifdef __KERNEL__ -#include -#include - -#include -#include -#include -#include -#include - -static inline struct smb_sb_info *SMB_SB(struct super_block *sb) -{ - return sb->s_fs_info; -} - -static inline struct smb_inode_info *SMB_I(struct inode *inode) -{ - return container_of(inode, struct smb_inode_info, vfs_inode); -} - -/* macro names are short for word, double-word, long value (?) */ -#define WVAL(buf,pos) \ - (le16_to_cpu(get_unaligned((__le16 *)((u8 *)(buf) + (pos))))) -#define DVAL(buf,pos) \ - (le32_to_cpu(get_unaligned((__le32 *)((u8 *)(buf) + (pos))))) -#define LVAL(buf,pos) \ - (le64_to_cpu(get_unaligned((__le64 *)((u8 *)(buf) + (pos))))) -#define WSET(buf,pos,val) \ - put_unaligned(cpu_to_le16((u16)(val)), (__le16 *)((u8 *)(buf) + (pos))) -#define DSET(buf,pos,val) \ - put_unaligned(cpu_to_le32((u32)(val)), (__le32 *)((u8 *)(buf) + (pos))) -#define LSET(buf,pos,val) \ - put_unaligned(cpu_to_le64((u64)(val)), (__le64 *)((u8 *)(buf) + (pos))) - -/* where to find the base of the SMB packet proper */ -#define smb_base(buf) ((u8 *)(((u8 *)(buf))+4)) - -/* - * Flags for the in-memory inode - */ -#define SMB_F_LOCALWRITE 0x02 /* file modified locally */ - - -/* NT1 protocol capability bits */ -#define SMB_CAP_RAW_MODE 0x00000001 -#define SMB_CAP_MPX_MODE 0x00000002 -#define SMB_CAP_UNICODE 0x00000004 -#define SMB_CAP_LARGE_FILES 0x00000008 -#define SMB_CAP_NT_SMBS 0x00000010 -#define SMB_CAP_RPC_REMOTE_APIS 0x00000020 -#define SMB_CAP_STATUS32 0x00000040 -#define SMB_CAP_LEVEL_II_OPLOCKS 0x00000080 -#define SMB_CAP_LOCK_AND_READ 0x00000100 -#define SMB_CAP_NT_FIND 0x00000200 -#define SMB_CAP_DFS 0x00001000 -#define SMB_CAP_LARGE_READX 0x00004000 -#define SMB_CAP_LARGE_WRITEX 0x00008000 -#define SMB_CAP_UNIX 0x00800000 /* unofficial ... */ - - -/* - * This is the time we allow an inode, dentry or dir cache to live. It is bad - * for performance to have shorter ttl on an inode than on the cache. It can - * cause refresh on each inode for a dir listing ... one-by-one - */ -#define SMB_MAX_AGE(server) (((server)->mnt->ttl * HZ) / 1000) - -static inline void -smb_age_dentry(struct smb_sb_info *server, struct dentry *dentry) -{ - dentry->d_time = jiffies - SMB_MAX_AGE(server); -} - -struct smb_cache_head { - time_t mtime; /* unused */ - unsigned long time; /* cache age */ - unsigned long end; /* last valid fpos in cache */ - int eof; -}; - -#define SMB_DIRCACHE_SIZE ((int)(PAGE_CACHE_SIZE/sizeof(struct dentry *))) -union smb_dir_cache { - struct smb_cache_head head; - struct dentry *dentry[SMB_DIRCACHE_SIZE]; -}; - -#define SMB_FIRSTCACHE_SIZE ((int)((SMB_DIRCACHE_SIZE * \ - sizeof(struct dentry *) - sizeof(struct smb_cache_head)) / \ - sizeof(struct dentry *))) - -#define SMB_DIRCACHE_START (SMB_DIRCACHE_SIZE - SMB_FIRSTCACHE_SIZE) - -struct smb_cache_control { - struct smb_cache_head head; - struct page *page; - union smb_dir_cache *cache; - unsigned long fpos, ofs; - int filled, valid, idx; -}; - -#define SMB_OPS_NUM_STATIC 5 -struct smb_ops { - int (*read)(struct inode *inode, loff_t offset, int count, - char *data); - int (*write)(struct inode *inode, loff_t offset, int count, const - char *data); - int (*readdir)(struct file *filp, void *dirent, filldir_t filldir, - struct smb_cache_control *ctl); - - int (*getattr)(struct smb_sb_info *server, struct dentry *dir, - struct smb_fattr *fattr); - /* int (*setattr)(...); */ /* setattr is really icky! */ - - int (*truncate)(struct inode *inode, loff_t length); - - - /* --- --- --- end of "static" entries --- --- --- */ - - int (*convert)(unsigned char *output, int olen, - const unsigned char *input, int ilen, - struct nls_table *nls_from, - struct nls_table *nls_to); -}; - -static inline int -smb_is_open(struct inode *i) -{ - return (SMB_I(i)->open == server_from_inode(i)->generation); -} - -extern void smb_install_null_ops(struct smb_ops *); -#endif /* __KERNEL__ */ #endif /* _LINUX_SMB_FS_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/smb_mount.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/smb_mount.h 2007-05-24 15:40:44.000000000 +0200 @@ -23,43 +23,5 @@ }; -#ifdef __KERNEL__ - -/* "vers" in big-endian */ -#define SMB_MOUNT_ASCII 0x76657273 - -#define SMB_MOUNT_OLDVERSION 6 -#undef SMB_MOUNT_VERSION -#define SMB_MOUNT_VERSION 7 - -/* flags */ -#define SMB_MOUNT_WIN95 0x0001 /* Win 95 server */ -#define SMB_MOUNT_OLDATTR 0x0002 /* Use core getattr (Win 95 speedup) */ -#define SMB_MOUNT_DIRATTR 0x0004 /* Use find_first for getattr */ -#define SMB_MOUNT_CASE 0x0008 /* Be case sensitive */ -#define SMB_MOUNT_UNICODE 0x0010 /* Server talks unicode */ -#define SMB_MOUNT_UID 0x0020 /* Use user specified uid */ -#define SMB_MOUNT_GID 0x0040 /* Use user specified gid */ -#define SMB_MOUNT_FMODE 0x0080 /* Use user specified file mode */ -#define SMB_MOUNT_DMODE 0x0100 /* Use user specified dir mode */ - -struct smb_mount_data_kernel { - int version; - - uid_t mounted_uid; /* Who may umount() this filesystem? */ - uid_t uid; - gid_t gid; - mode_t file_mode; - mode_t dir_mode; - - u32 flags; - - /* maximum age in jiffies (inode, dentry and dircache) */ - int ttl; - - struct smb_nls_codepage codepage; -}; - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/socket.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/socket.h 2007-05-24 15:40:44.000000000 +0200 @@ -22,7 +22,6 @@ #include /* the SIOCxxx I/O controls */ #include /* iovec support */ #include /* pid_t */ -#include /* __user */ extern int sysctl_somaxconn; #ifdef CONFIG_PROC_FS @@ -103,9 +102,7 @@ * This mess will go away with glibc */ -#ifdef __KERNEL__ -#define __KINLINE static inline -#elif defined(__GNUC__) +#if defined(__GNUC__) #define __KINLINE static __inline__ #elif defined(__cplusplus) #define __KINLINE static inline @@ -285,21 +282,5 @@ /* IPX options */ #define IPX_TYPE 1 -#ifdef __KERNEL__ -extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); -extern int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov, - int offset, int len); -extern int csum_partial_copy_fromiovecend(unsigned char *kdata, - struct iovec *iov, - int offset, - unsigned int len, int *csump); - -extern int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode); -extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len); -extern int move_addr_to_user(void *kaddr, int klen, void __user *uaddr, int __user *ulen); -extern int move_addr_to_kernel(void __user *uaddr, int ulen, void *kaddr); -extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); - -#endif #endif /* not kernel and not glibc */ #endif /* _LINUX_SOCKET_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/sonet.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/sonet.h 2007-05-24 15:40:44.000000000 +0200 @@ -56,20 +56,5 @@ #define SONET_FRSENSE_SIZE 6 /* C1[3],H1[3] (0xff for unknown) */ -#ifdef __KERNEL__ - -#include - -struct k_sonet_stats { -#define __HANDLE_ITEM(i) atomic_t i - __SONET_ITEMS -#undef __HANDLE_ITEM -}; - -extern void sonet_copy_stats(struct k_sonet_stats *from,struct sonet_stats *to); -extern void sonet_subtract_stats(struct k_sonet_stats *from, - struct sonet_stats *to); - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/sonypi.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/sonypi.h 2007-05-24 15:40:44.000000000 +0200 @@ -129,32 +129,5 @@ /* get temperature (C) */ #define SONYPI_IOCGTEMP _IOR('v', 12, __u8) -#ifdef __KERNEL__ - -/* used only for communication between v4l and sonypi */ - -#define SONYPI_COMMAND_GETCAMERA 1 /* obsolete */ -#define SONYPI_COMMAND_SETCAMERA 2 -#define SONYPI_COMMAND_GETCAMERABRIGHTNESS 3 /* obsolete */ -#define SONYPI_COMMAND_SETCAMERABRIGHTNESS 4 -#define SONYPI_COMMAND_GETCAMERACONTRAST 5 /* obsolete */ -#define SONYPI_COMMAND_SETCAMERACONTRAST 6 -#define SONYPI_COMMAND_GETCAMERAHUE 7 /* obsolete */ -#define SONYPI_COMMAND_SETCAMERAHUE 8 -#define SONYPI_COMMAND_GETCAMERACOLOR 9 /* obsolete */ -#define SONYPI_COMMAND_SETCAMERACOLOR 10 -#define SONYPI_COMMAND_GETCAMERASHARPNESS 11 /* obsolete */ -#define SONYPI_COMMAND_SETCAMERASHARPNESS 12 -#define SONYPI_COMMAND_GETCAMERAPICTURE 13 /* obsolete */ -#define SONYPI_COMMAND_SETCAMERAPICTURE 14 -#define SONYPI_COMMAND_GETCAMERAAGC 15 /* obsolete */ -#define SONYPI_COMMAND_SETCAMERAAGC 16 -#define SONYPI_COMMAND_GETCAMERADIRECTION 17 /* obsolete */ -#define SONYPI_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */ -#define SONYPI_COMMAND_GETCAMERAREVISION 19 /* obsolete */ - -int sonypi_camera_command(int command, u8 value); - -#endif /* __KERNEL__ */ #endif /* _SONYPI_H_ */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/soundcard.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/soundcard.h 2007-05-24 15:40:44.000000000 +0200 @@ -40,11 +40,7 @@ #include /* Endian macros. */ -#ifdef __KERNEL__ -# include -#else # include -#endif /* * Supported card ID numbers (Should be somewhere else?) @@ -190,15 +186,7 @@ #include #undef _LINUX_PATCHKEY_H_INDIRECT -#if defined(__KERNEL__) -# if defined(__BIG_ENDIAN) -# define AFMT_S16_NE AFMT_S16_BE -# elif defined(__LITTLE_ENDIAN) -# define AFMT_S16_NE AFMT_S16_LE -# else -# error "could not determine byte order" -# endif -#elif defined(__BYTE_ORDER) +#if defined(__BYTE_ORDER) # if __BYTE_ORDER == __BIG_ENDIAN # define AFMT_S16_NE AFMT_S16_BE # elif __BYTE_ORDER == __LITTLE_ENDIAN --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/stat.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/stat.h 2007-05-24 15:40:44.000000000 +0200 @@ -1,11 +1,6 @@ #ifndef _LINUX_STAT_H #define _LINUX_STAT_H -#ifdef __KERNEL__ - -#include - -#endif #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) @@ -46,32 +41,5 @@ #endif -#ifdef __KERNEL__ -#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO) -#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO) -#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH) -#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH) -#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH) - -#include -#include - -struct kstat { - u64 ino; - dev_t dev; - umode_t mode; - unsigned int nlink; - uid_t uid; - gid_t gid; - dev_t rdev; - loff_t size; - struct timespec atime; - struct timespec mtime; - struct timespec ctime; - unsigned long blksize; - unsigned long long blocks; -}; - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/stddef.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/stddef.h 2007-05-24 15:40:44.000000000 +0200 @@ -1,7 +1,6 @@ #ifndef _LINUX_STDDEF_H #define _LINUX_STDDEF_H -#include #undef NULL #if defined(__cplusplus) @@ -10,19 +9,5 @@ #define NULL ((void *)0) #endif -#ifdef __KERNEL__ - -enum { - false = 0, - true = 1 -}; - -#undef offsetof -#ifdef __compiler_offsetof -#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) -#else -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/sysctl.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/sysctl.h 2007-05-24 15:40:44.000000000 +0200 @@ -20,7 +20,6 @@ #include #include -#include struct file; struct completion; @@ -31,11 +30,11 @@ member of a struct __sysctl_args to have? */ struct __sysctl_args { - int __user *name; + int *name; int nlen; - void __user *oldval; - size_t __user *oldlenp; - void __user *newval; + void *oldval; + size_t *oldlenp; + void *newval; size_t newlen; unsigned long __unused[4]; }; @@ -45,10 +44,6 @@ /* Top-level names: */ /* For internal pattern-matching use only: */ -#ifdef __KERNEL__ -#define CTL_ANY -1 /* Matches any name */ -#define CTL_NONE 0 -#endif enum { @@ -925,124 +920,6 @@ ABI_FAKE_UTSNAME=6, /* fake target utsname information */ }; -#ifdef __KERNEL__ -#include - -extern void sysctl_init(void); - -typedef struct ctl_table ctl_table; - -typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, - void __user *oldval, size_t __user *oldlenp, - void __user *newval, size_t newlen, - void **context); - -typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, - void __user *buffer, size_t *lenp, loff_t *ppos); - -extern int proc_dostring(ctl_table *, int, struct file *, - void __user *, size_t *, loff_t *); -extern int proc_dointvec(ctl_table *, int, struct file *, - void __user *, size_t *, loff_t *); -extern int proc_dointvec_bset(ctl_table *, int, struct file *, - void __user *, size_t *, loff_t *); -extern int proc_dointvec_minmax(ctl_table *, int, struct file *, - void __user *, size_t *, loff_t *); -extern int proc_dointvec_jiffies(ctl_table *, int, struct file *, - void __user *, size_t *, loff_t *); -extern int proc_dointvec_userhz_jiffies(ctl_table *, int, struct file *, - void __user *, size_t *, loff_t *); -extern int proc_dointvec_ms_jiffies(ctl_table *, int, struct file *, - void __user *, size_t *, loff_t *); -extern int proc_doulongvec_minmax(ctl_table *, int, struct file *, - void __user *, size_t *, loff_t *); -extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int, - struct file *, void __user *, size_t *, loff_t *); - -extern int do_sysctl (int __user *name, int nlen, - void __user *oldval, size_t __user *oldlenp, - void __user *newval, size_t newlen); - -extern int do_sysctl_strategy (ctl_table *table, - int __user *name, int nlen, - void __user *oldval, size_t __user *oldlenp, - void __user *newval, size_t newlen, void ** context); - -extern ctl_handler sysctl_string; -extern ctl_handler sysctl_intvec; -extern ctl_handler sysctl_jiffies; -extern ctl_handler sysctl_ms_jiffies; - - -/* - * Register a set of sysctl names by calling register_sysctl_table - * with an initialised array of ctl_table's. An entry with zero - * ctl_name terminates the table. table->de will be set up by the - * registration and need not be initialised in advance. - * - * sysctl names can be mirrored automatically under /proc/sys. The - * procname supplied controls /proc naming. - * - * The table's mode will be honoured both for sys_sysctl(2) and - * proc-fs access. - * - * Leaf nodes in the sysctl tree will be represented by a single file - * under /proc; non-leaf nodes will be represented by directories. A - * null procname disables /proc mirroring at this node. - * - * sysctl(2) can automatically manage read and write requests through - * the sysctl table. The data and maxlen fields of the ctl_table - * struct enable minimal validation of the values being written to be - * performed, and the mode field allows minimal authentication. - * - * More sophisticated management can be enabled by the provision of a - * strategy routine with the table entry. This will be called before - * any automatic read or write of the data is performed. - * - * The strategy routine may return: - * <0: Error occurred (error is passed to user process) - * 0: OK - proceed with automatic read or write. - * >0: OK - read or write has been done by the strategy routine, so - * return immediately. - * - * There must be a proc_handler routine for any terminal nodes - * mirrored under /proc/sys (non-terminals are handled by a built-in - * directory handler). Several default handlers are available to - * cover common cases. - */ - -/* A sysctl table is an array of struct ctl_table: */ -struct ctl_table -{ - int ctl_name; /* Binary ID */ - const char *procname; /* Text ID for /proc/sys, or zero */ - void *data; - int maxlen; - mode_t mode; - ctl_table *child; - proc_handler *proc_handler; /* Callback for text formatting */ - ctl_handler *strategy; /* Callback function for all r/w */ - struct proc_dir_entry *de; /* /proc control block */ - void *extra1; - void *extra2; -}; - -/* struct ctl_table_header is used to maintain dynamic lists of - ctl_table trees. */ -struct ctl_table_header -{ - ctl_table *ctl_table; - struct list_head ctl_entry; - int used; - struct completion *unregistering; -}; - -struct ctl_table_header * register_sysctl_table(ctl_table * table, - int insert_at_head); -void unregister_sysctl_table(struct ctl_table_header * table); - -#else /* __KERNEL__ */ -#endif /* __KERNEL__ */ #endif /* _LINUX_SYSCTL_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/tcp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/tcp.h 2007-05-24 15:40:44.000000000 +0200 @@ -157,233 +157,5 @@ __u32 tcpi_total_retrans; }; -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include - -/* This defines a selective acknowledgement block. */ -struct tcp_sack_block_wire { - __be32 start_seq; - __be32 end_seq; -}; - -struct tcp_sack_block { - __u32 start_seq; - __u32 end_seq; -}; - -struct tcp_options_received { -/* PAWS/RTTM data */ - long ts_recent_stamp;/* Time we stored ts_recent (for aging) */ - __u32 ts_recent; /* Time stamp to echo next */ - __u32 rcv_tsval; /* Time stamp value */ - __u32 rcv_tsecr; /* Time stamp echo reply */ - __u16 saw_tstamp : 1, /* Saw TIMESTAMP on last packet */ - tstamp_ok : 1, /* TIMESTAMP seen on SYN packet */ - dsack : 1, /* D-SACK is scheduled */ - wscale_ok : 1, /* Wscale seen on SYN packet */ - sack_ok : 4, /* SACK seen on SYN packet */ - snd_wscale : 4, /* Window scaling received from sender */ - rcv_wscale : 4; /* Window scaling to send to receiver */ -/* SACKs data */ - __u8 eff_sacks; /* Size of SACK array to send with next packet */ - __u8 num_sacks; /* Number of SACK blocks */ - __u16 user_mss; /* mss requested by user in ioctl */ - __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ -}; - -struct tcp_request_sock { - struct inet_request_sock req; - __u32 rcv_isn; - __u32 snt_isn; -}; - -static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) -{ - return (struct tcp_request_sock *)req; -} - -struct tcp_sock { - /* inet_connection_sock has to be the first member of tcp_sock */ - struct inet_connection_sock inet_conn; - int tcp_header_len; /* Bytes of tcp header to send */ - -/* - * Header prediction flags - * 0x5?10 << 16 + snd_wnd in net byte order - */ - __be32 pred_flags; - -/* - * RFC793 variables by their proper names. This means you can - * read the code and the spec side by side (and laugh ...) - * See RFC793 and RFC1122. The RFC writes these in capitals. - */ - __u32 rcv_nxt; /* What we want to receive next */ - __u32 snd_nxt; /* Next sequence we send */ - - __u32 snd_una; /* First byte we want an ack for */ - __u32 snd_sml; /* Last byte of the most recently transmitted small packet */ - __u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ - __u32 lsndtime; /* timestamp of last sent data packet (for restart window) */ - - /* Data for direct copy to user */ - struct { - struct sk_buff_head prequeue; - struct task_struct *task; - struct iovec *iov; - int memory; - int len; -#ifdef CONFIG_NET_DMA - /* members for async copy */ - struct dma_chan *dma_chan; - int wakeup; - struct dma_pinned_list *pinned_list; - dma_cookie_t dma_cookie; -#endif - } ucopy; - - __u32 snd_wl1; /* Sequence for window update */ - __u32 snd_wnd; /* The window we expect to receive */ - __u32 max_window; /* Maximal window ever seen from peer */ - __u32 mss_cache; /* Cached effective mss, not including SACKS */ - __u16 xmit_size_goal; /* Goal for segmenting output packets */ - /* XXX Two bytes hole, try to pack */ - - __u32 window_clamp; /* Maximal window to advertise */ - __u32 rcv_ssthresh; /* Current window clamp */ - - __u32 frto_highmark; /* snd_nxt when RTO occurred */ - __u8 reordering; /* Packet reordering metric. */ - __u8 frto_counter; /* Number of new acks after RTO */ - __u8 nonagle; /* Disable Nagle algorithm? */ - __u8 keepalive_probes; /* num of allowed keep alive probes */ - -/* RTT measurement */ - __u32 srtt; /* smoothed round trip time << 3 */ - __u32 mdev; /* medium deviation */ - __u32 mdev_max; /* maximal mdev for the last rtt period */ - __u32 rttvar; /* smoothed mdev_max */ - __u32 rtt_seq; /* sequence number to update rttvar */ - - __u32 packets_out; /* Packets which are "in flight" */ - __u32 left_out; /* Packets which leaved network */ - __u32 retrans_out; /* Retransmitted packets out */ -/* - * Options received (usually on last packet, some only on SYN packets). - */ - struct tcp_options_received rx_opt; - -/* - * Slow start and congestion control (see also Nagle, and Karn & Partridge) - */ - __u32 snd_ssthresh; /* Slow start size threshold */ - __u32 snd_cwnd; /* Sending congestion window */ - __u16 snd_cwnd_cnt; /* Linear increase counter */ - __u16 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */ - __u32 snd_cwnd_used; - __u32 snd_cwnd_stamp; - - struct sk_buff_head out_of_order_queue; /* Out of order segments go here */ - - __u32 rcv_wnd; /* Current receiver window */ - __u32 rcv_wup; /* rcv_nxt on last window update sent */ - __u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ - __u32 pushed_seq; /* Last pushed seq, required to talk to windows */ - __u32 copied_seq; /* Head of yet unread data */ - -/* SACKs data */ - struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ - struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ - - struct tcp_sack_block recv_sack_cache[4]; - - /* from STCP, retrans queue hinting */ - struct sk_buff* lost_skb_hint; - - struct sk_buff *scoreboard_skb_hint; - struct sk_buff *retransmit_skb_hint; - struct sk_buff *forward_skb_hint; - struct sk_buff *fastpath_skb_hint; - - int fastpath_cnt_hint; - int lost_cnt_hint; - int retransmit_cnt_hint; - int forward_cnt_hint; - - __u16 advmss; /* Advertised MSS */ - __u16 prior_ssthresh; /* ssthresh saved at recovery start */ - __u32 lost_out; /* Lost packets */ - __u32 sacked_out; /* SACK'd packets */ - __u32 fackets_out; /* FACK'd packets */ - __u32 high_seq; /* snd_nxt at onset of congestion */ - - __u32 retrans_stamp; /* Timestamp of the last retransmit, - * also used in SYN-SENT to remember stamp of - * the first SYN. */ - __u32 undo_marker; /* tracking retrans started here. */ - int undo_retrans; /* number of undoable retransmissions. */ - __u32 urg_seq; /* Seq of received urgent pointer */ - __u16 urg_data; /* Saved octet of OOB data and control flags */ - __u8 urg_mode; /* In urgent mode */ - __u8 ecn_flags; /* ECN status bits. */ - __u32 snd_up; /* Urgent pointer */ - - __u32 total_retrans; /* Total retransmits for entire connection */ - __u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */ - - unsigned int keepalive_time; /* time before keep alive takes place */ - unsigned int keepalive_intvl; /* time interval between keep alive probes */ - int linger2; - - unsigned long last_synq_overflow; - - __u32 tso_deferred; - -/* Receiver side RTT estimation */ - struct { - __u32 rtt; - __u32 seq; - __u32 time; - } rcv_rtt_est; - -/* Receiver queue space */ - struct { - int space; - __u32 seq; - __u32 time; - } rcvq_space; - -/* TCP-specific MTU probe information. */ - struct { - __u32 probe_seq_start; - __u32 probe_seq_end; - } mtu_probe; -}; - -static inline struct tcp_sock *tcp_sk(const struct sock *sk) -{ - return (struct tcp_sock *)sk; -} - -struct tcp_timewait_sock { - struct inet_timewait_sock tw_sk; - __u32 tw_rcv_nxt; - __u32 tw_snd_nxt; - __u32 tw_rcv_wnd; - __u32 tw_ts_recent; - long tw_ts_recent_stamp; -}; - -static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) -{ - return (struct tcp_timewait_sock *)sk; -} - -#endif #endif /* _LINUX_TCP_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/time.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/time.h 2007-05-24 15:40:44.000000000 +0200 @@ -3,9 +3,6 @@ #include -#ifdef __KERNEL__ -# include -#endif #ifndef _STRUCT_TIMESPEC #define _STRUCT_TIMESPEC @@ -25,156 +22,6 @@ int tz_dsttime; /* type of dst correction */ }; -#ifdef __KERNEL__ - -/* Parameters used to convert the timespec values: */ -#define MSEC_PER_SEC 1000L -#define USEC_PER_MSEC 1000L -#define NSEC_PER_USEC 1000L -#define NSEC_PER_MSEC 1000000L -#define USEC_PER_SEC 1000000L -#define NSEC_PER_SEC 1000000000L -#define FSEC_PER_SEC 1000000000000000L - -static inline int timespec_equal(struct timespec *a, struct timespec *b) -{ - return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); -} - -/* - * lhs < rhs: return <0 - * lhs == rhs: return 0 - * lhs > rhs: return >0 - */ -static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) -{ - if (lhs->tv_sec < rhs->tv_sec) - return -1; - if (lhs->tv_sec > rhs->tv_sec) - return 1; - return lhs->tv_nsec - rhs->tv_nsec; -} - -static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) -{ - if (lhs->tv_sec < rhs->tv_sec) - return -1; - if (lhs->tv_sec > rhs->tv_sec) - return 1; - return lhs->tv_usec - rhs->tv_usec; -} - -extern unsigned long mktime(const unsigned int year, const unsigned int mon, - const unsigned int day, const unsigned int hour, - const unsigned int min, const unsigned int sec); - -extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); - -/* - * sub = lhs - rhs, in normalized form - */ -static inline struct timespec timespec_sub(struct timespec lhs, - struct timespec rhs) -{ - struct timespec ts_delta; - set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, - lhs.tv_nsec - rhs.tv_nsec); - return ts_delta; -} - -/* - * Returns true if the timespec is norm, false if denorm: - */ -#define timespec_valid(ts) \ - (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) - -extern struct timespec xtime; -extern struct timespec wall_to_monotonic; -extern seqlock_t xtime_lock; - -void timekeeping_init(void); - -static inline unsigned long get_seconds(void) -{ - return xtime.tv_sec; -} - -struct timespec current_kernel_time(void); - -#define CURRENT_TIME (current_kernel_time()) -#define CURRENT_TIME_SEC ((struct timespec) { xtime.tv_sec, 0 }) - -extern void do_gettimeofday(struct timeval *tv); -extern int do_settimeofday(struct timespec *tv); -extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); -#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) -extern long do_utimes(int dfd, char __user *filename, struct timeval *times); -struct itimerval; -extern int do_setitimer(int which, struct itimerval *value, - struct itimerval *ovalue); -extern unsigned int alarm_setitimer(unsigned int seconds); -extern int do_getitimer(int which, struct itimerval *value); -extern void getnstimeofday(struct timespec *tv); - -extern struct timespec timespec_trunc(struct timespec t, unsigned gran); -extern int timekeeping_is_continuous(void); - -/** - * timespec_to_ns - Convert timespec to nanoseconds - * @ts: pointer to the timespec variable to be converted - * - * Returns the scalar nanosecond representation of the timespec - * parameter. - */ -static inline s64 timespec_to_ns(const struct timespec *ts) -{ - return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; -} - -/** - * timeval_to_ns - Convert timeval to nanoseconds - * @ts: pointer to the timeval variable to be converted - * - * Returns the scalar nanosecond representation of the timeval - * parameter. - */ -static inline s64 timeval_to_ns(const struct timeval *tv) -{ - return ((s64) tv->tv_sec * NSEC_PER_SEC) + - tv->tv_usec * NSEC_PER_USEC; -} - -/** - * ns_to_timespec - Convert nanoseconds to timespec - * @nsec: the nanoseconds value to be converted - * - * Returns the timespec representation of the nsec parameter. - */ -extern struct timespec ns_to_timespec(const s64 nsec); - -/** - * ns_to_timeval - Convert nanoseconds to timeval - * @nsec: the nanoseconds value to be converted - * - * Returns the timeval representation of the nsec parameter. - */ -extern struct timeval ns_to_timeval(const s64 nsec); - -/** - * timespec_add_ns - Adds nanoseconds to a timespec - * @a: pointer to timespec to be incremented - * @ns: unsigned nanoseconds value to be added - */ -static inline void timespec_add_ns(struct timespec *a, u64 ns) -{ - ns += a->tv_nsec; - while(unlikely(ns >= NSEC_PER_SEC)) { - ns -= NSEC_PER_SEC; - a->tv_sec++; - } - a->tv_nsec = ns; -} -#endif /* __KERNEL__ */ #define NFDBITS __NFDBITS --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/timex.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/timex.h 2007-05-24 15:40:44.000000000 +0200 @@ -53,7 +53,6 @@ #ifndef _LINUX_TIMEX_H #define _LINUX_TIMEX_H -#include #include #include @@ -183,119 +182,5 @@ #define TIME_ERROR 5 /* clock not synchronized */ #define TIME_BAD TIME_ERROR /* bw compat */ -#ifdef __KERNEL__ -#include - -/* - * kernel variables - * Note: maximum error = NTP synch distance = dispersion + delay / 2; - * estimated error = NTP dispersion. - */ -extern unsigned long tick_usec; /* USER_HZ period (usec) */ -extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ -extern int tickadj; /* amount of adjustment per tick */ - -/* - * phase-lock loop variables - */ -extern int time_status; /* clock synchronization status bits */ -extern long time_maxerror; /* maximum error */ -extern long time_esterror; /* estimated error */ - -extern long time_freq; /* frequency offset (scaled ppm) */ - -extern long time_adjust; /* The amount of adjtime left */ - -extern void ntp_clear(void); - -/** - * ntp_synced - Returns 1 if the NTP status is not UNSYNC - * - */ -static inline int ntp_synced(void) -{ - return !(time_status & STA_UNSYNC); -} - -/* Required to safely shift negative values */ -#define shift_right(x, s) ({ \ - __typeof__(x) __x = (x); \ - __typeof__(s) __s = (s); \ - __x < 0 ? -(-__x >> __s) : __x >> __s; \ -}) - - -#ifdef CONFIG_TIME_INTERPOLATION - -#define TIME_SOURCE_CPU 0 -#define TIME_SOURCE_MMIO64 1 -#define TIME_SOURCE_MMIO32 2 -#define TIME_SOURCE_FUNCTION 3 - -/* For proper operations time_interpolator clocks must run slightly slower - * than the standard clock since the interpolator may only correct by having - * time jump forward during a tick. A slower clock is usually a side effect - * of the integer divide of the nanoseconds in a second by the frequency. - * The accuracy of the division can be increased by specifying a shift. - * However, this may cause the clock not to be slow enough. - * The interpolator will self-tune the clock by slowing down if no - * resets occur or speeding up if the time jumps per analysis cycle - * become too high. - * - * Setting jitter compensates for a fluctuating timesource by comparing - * to the last value read from the timesource to insure that an earlier value - * is not returned by a later call. The price to pay - * for the compensation is that the timer routines are not as scalable anymore. - */ - -struct time_interpolator { - u16 source; /* time source flags */ - u8 shift; /* increases accuracy of multiply by shifting. */ - /* Note that bits may be lost if shift is set too high */ - u8 jitter; /* if set compensate for fluctuations */ - u32 nsec_per_cyc; /* set by register_time_interpolator() */ - void *addr; /* address of counter or function */ - u64 mask; /* mask the valid bits of the counter */ - unsigned long offset; /* nsec offset at last update of interpolator */ - u64 last_counter; /* counter value in units of the counter at last update */ - u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ - u64 frequency; /* frequency in counts/second */ - long drift; /* drift in parts-per-million (or -1) */ - unsigned long skips; /* skips forward */ - unsigned long ns_skipped; /* nanoseconds skipped */ - struct time_interpolator *next; -}; - -extern void register_time_interpolator(struct time_interpolator *); -extern void unregister_time_interpolator(struct time_interpolator *); -extern void time_interpolator_reset(void); -extern unsigned long time_interpolator_get_offset(void); -extern void time_interpolator_update(long delta_nsec); - -#else /* !CONFIG_TIME_INTERPOLATION */ - -static inline void time_interpolator_reset(void) -{ -} - -static inline void time_interpolator_update(long delta_nsec) -{ -} - -#endif /* !CONFIG_TIME_INTERPOLATION */ - -#define TICK_LENGTH_SHIFT 32 - -/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ -extern u64 current_tick_length(void); - -extern void second_overflow(void); -extern void update_ntp_one_tick(void); -extern int do_adjtimex(struct timex *); - -/* Don't use! Compatibility define for existing users. */ -#define tickadj (500/HZ ? : 1) - -#endif /* KERNEL */ #endif /* LINUX_TIMEX_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/tty.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/tty.h 2007-05-24 15:40:44.000000000 +0200 @@ -5,341 +5,4 @@ * 'tty.h' defines some structures used by tty_io.c and some defines. */ -#ifdef __KERNEL__ -#include -#include -#include -#include -#include -#include -#include - -#include - - -/* - * (Note: the *_driver.minor_start values 1, 64, 128, 192 are - * hardcoded at present.) - */ -#define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ -#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ -#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ -#define NR_LDISCS 16 - -/* - * This character is the same as _POSIX_VDISABLE: it cannot be used as - * a c_cc[] character, but indicates that a particular special character - * isn't in use (eg VINTR has no character etc) - */ -#define __DISABLED_CHAR '\0' - -/* - * This is the flip buffer used for the tty driver. The buffer is - * located in the tty structure, and is used as a high speed interface - * between the tty driver and the tty line discipline. - */ -#define TTY_FLIPBUF_SIZE 512 - -struct tty_buffer { - struct tty_buffer *next; - char *char_buf_ptr; - unsigned char *flag_buf_ptr; - int used; - int size; - int commit; - int read; - /* Data points here */ - unsigned long data[0]; -}; - -struct tty_bufhead { - struct work_struct work; - struct semaphore pty_sem; - spinlock_t lock; - struct tty_buffer *head; /* Queue head */ - struct tty_buffer *tail; /* Active buffer */ - struct tty_buffer *free; /* Free queue head */ - int memory_used; /* Buffer space used excluding free queue */ -}; -/* - * The pty uses char_buf and flag_buf as a contiguous buffer - */ -#define PTY_BUF_SIZE 4*TTY_FLIPBUF_SIZE - -/* - * When a break, frame error, or parity error happens, these codes are - * stuffed into the flags buffer. - */ -#define TTY_NORMAL 0 -#define TTY_BREAK 1 -#define TTY_FRAME 2 -#define TTY_PARITY 3 -#define TTY_OVERRUN 4 - -#define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR]) -#define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT]) -#define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE]) -#define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL]) -#define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF]) -#define TIME_CHAR(tty) ((tty)->termios->c_cc[VTIME]) -#define MIN_CHAR(tty) ((tty)->termios->c_cc[VMIN]) -#define SWTC_CHAR(tty) ((tty)->termios->c_cc[VSWTC]) -#define START_CHAR(tty) ((tty)->termios->c_cc[VSTART]) -#define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP]) -#define SUSP_CHAR(tty) ((tty)->termios->c_cc[VSUSP]) -#define EOL_CHAR(tty) ((tty)->termios->c_cc[VEOL]) -#define REPRINT_CHAR(tty) ((tty)->termios->c_cc[VREPRINT]) -#define DISCARD_CHAR(tty) ((tty)->termios->c_cc[VDISCARD]) -#define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE]) -#define LNEXT_CHAR(tty) ((tty)->termios->c_cc[VLNEXT]) -#define EOL2_CHAR(tty) ((tty)->termios->c_cc[VEOL2]) - -#define _I_FLAG(tty,f) ((tty)->termios->c_iflag & (f)) -#define _O_FLAG(tty,f) ((tty)->termios->c_oflag & (f)) -#define _C_FLAG(tty,f) ((tty)->termios->c_cflag & (f)) -#define _L_FLAG(tty,f) ((tty)->termios->c_lflag & (f)) - -#define I_IGNBRK(tty) _I_FLAG((tty),IGNBRK) -#define I_BRKINT(tty) _I_FLAG((tty),BRKINT) -#define I_IGNPAR(tty) _I_FLAG((tty),IGNPAR) -#define I_PARMRK(tty) _I_FLAG((tty),PARMRK) -#define I_INPCK(tty) _I_FLAG((tty),INPCK) -#define I_ISTRIP(tty) _I_FLAG((tty),ISTRIP) -#define I_INLCR(tty) _I_FLAG((tty),INLCR) -#define I_IGNCR(tty) _I_FLAG((tty),IGNCR) -#define I_ICRNL(tty) _I_FLAG((tty),ICRNL) -#define I_IUCLC(tty) _I_FLAG((tty),IUCLC) -#define I_IXON(tty) _I_FLAG((tty),IXON) -#define I_IXANY(tty) _I_FLAG((tty),IXANY) -#define I_IXOFF(tty) _I_FLAG((tty),IXOFF) -#define I_IMAXBEL(tty) _I_FLAG((tty),IMAXBEL) -#define I_IUTF8(tty) _I_FLAG((tty),IUTF8) - -#define O_OPOST(tty) _O_FLAG((tty),OPOST) -#define O_OLCUC(tty) _O_FLAG((tty),OLCUC) -#define O_ONLCR(tty) _O_FLAG((tty),ONLCR) -#define O_OCRNL(tty) _O_FLAG((tty),OCRNL) -#define O_ONOCR(tty) _O_FLAG((tty),ONOCR) -#define O_ONLRET(tty) _O_FLAG((tty),ONLRET) -#define O_OFILL(tty) _O_FLAG((tty),OFILL) -#define O_OFDEL(tty) _O_FLAG((tty),OFDEL) -#define O_NLDLY(tty) _O_FLAG((tty),NLDLY) -#define O_CRDLY(tty) _O_FLAG((tty),CRDLY) -#define O_TABDLY(tty) _O_FLAG((tty),TABDLY) -#define O_BSDLY(tty) _O_FLAG((tty),BSDLY) -#define O_VTDLY(tty) _O_FLAG((tty),VTDLY) -#define O_FFDLY(tty) _O_FLAG((tty),FFDLY) - -#define C_BAUD(tty) _C_FLAG((tty),CBAUD) -#define C_CSIZE(tty) _C_FLAG((tty),CSIZE) -#define C_CSTOPB(tty) _C_FLAG((tty),CSTOPB) -#define C_CREAD(tty) _C_FLAG((tty),CREAD) -#define C_PARENB(tty) _C_FLAG((tty),PARENB) -#define C_PARODD(tty) _C_FLAG((tty),PARODD) -#define C_HUPCL(tty) _C_FLAG((tty),HUPCL) -#define C_CLOCAL(tty) _C_FLAG((tty),CLOCAL) -#define C_CIBAUD(tty) _C_FLAG((tty),CIBAUD) -#define C_CRTSCTS(tty) _C_FLAG((tty),CRTSCTS) - -#define L_ISIG(tty) _L_FLAG((tty),ISIG) -#define L_ICANON(tty) _L_FLAG((tty),ICANON) -#define L_XCASE(tty) _L_FLAG((tty),XCASE) -#define L_ECHO(tty) _L_FLAG((tty),ECHO) -#define L_ECHOE(tty) _L_FLAG((tty),ECHOE) -#define L_ECHOK(tty) _L_FLAG((tty),ECHOK) -#define L_ECHONL(tty) _L_FLAG((tty),ECHONL) -#define L_NOFLSH(tty) _L_FLAG((tty),NOFLSH) -#define L_TOSTOP(tty) _L_FLAG((tty),TOSTOP) -#define L_ECHOCTL(tty) _L_FLAG((tty),ECHOCTL) -#define L_ECHOPRT(tty) _L_FLAG((tty),ECHOPRT) -#define L_ECHOKE(tty) _L_FLAG((tty),ECHOKE) -#define L_FLUSHO(tty) _L_FLAG((tty),FLUSHO) -#define L_PENDIN(tty) _L_FLAG((tty),PENDIN) -#define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) - -struct device; -/* - * Where all of the state associated with a tty is kept while the tty - * is open. Since the termios state should be kept even if the tty - * has been closed --- for things like the baud rate, etc --- it is - * not stored here, but rather a pointer to the real state is stored - * here. Possible the winsize structure should have the same - * treatment, but (1) the default 80x24 is usually right and (2) it's - * most often used by a windowing system, which will set the correct - * size each time the window is created or resized anyway. - * - TYT, 9/14/92 - */ -struct tty_struct { - int magic; - struct tty_driver *driver; - int index; - struct tty_ldisc ldisc; - struct mutex termios_mutex; - struct termios *termios, *termios_locked; - char name[64]; - int pgrp; - int session; - unsigned long flags; - int count; - struct winsize winsize; - unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1; - unsigned char low_latency:1, warned:1; - unsigned char ctrl_status; - unsigned int receive_room; /* Bytes free for queue */ - - struct tty_struct *link; - struct fasync_struct *fasync; - struct tty_bufhead buf; - int alt_speed; /* For magic substitution of 38400 bps */ - wait_queue_head_t write_wait; - wait_queue_head_t read_wait; - struct work_struct hangup_work; - void *disc_data; - void *driver_data; - struct list_head tty_files; - -#define N_TTY_BUF_SIZE 4096 - - /* - * The following is data for the N_TTY line discipline. For - * historical reasons, this is included in the tty structure. - */ - unsigned int column; - unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1; - unsigned char closing:1; - unsigned short minimum_to_wake; - unsigned long overrun_time; - int num_overrun; - unsigned long process_char_map[256/(8*sizeof(unsigned long))]; - char *read_buf; - int read_head; - int read_tail; - int read_cnt; - unsigned long read_flags[N_TTY_BUF_SIZE/(8*sizeof(unsigned long))]; - int canon_data; - unsigned long canon_head; - unsigned int canon_column; - struct mutex atomic_read_lock; - struct mutex atomic_write_lock; - unsigned char *write_buf; - int write_cnt; - spinlock_t read_lock; - /* If the tty has a pending do_SAK, queue it here - akpm */ - struct work_struct SAK_work; -}; - -/* tty magic number */ -#define TTY_MAGIC 0x5401 - -/* - * These bits are used in the flags field of the tty structure. - * - * So that interrupts won't be able to mess up the queues, - * copy_to_cooked must be atomic with respect to itself, as must - * tty->write. Thus, you must use the inline functions set_bit() and - * clear_bit() to make things atomic. - */ -#define TTY_THROTTLED 0 /* Call unthrottle() at threshold min */ -#define TTY_IO_ERROR 1 /* Canse an I/O error (may be no ldisc too) */ -#define TTY_OTHER_CLOSED 2 /* Other side (if any) has closed */ -#define TTY_EXCLUSIVE 3 /* Exclusive open mode */ -#define TTY_DEBUG 4 /* Debugging */ -#define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ -#define TTY_PUSH 6 /* n_tty private */ -#define TTY_CLOSING 7 /* ->close() in progress */ -#define TTY_LDISC 9 /* Line discipline attached */ -#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ -#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ -#define TTY_PTY_LOCK 16 /* pty private */ -#define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ -#define TTY_HUPPED 18 /* Post driver->hangup() */ - -#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) - -extern void tty_write_flush(struct tty_struct *); - -extern struct termios tty_std_termios; - -extern int kmsg_redirect; - -extern void console_init(void); -extern int vcs_init(void); - -extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, - const char *routine); -extern char *tty_name(struct tty_struct *tty, char *buf); -extern void tty_wait_until_sent(struct tty_struct * tty, long timeout); -extern int tty_check_change(struct tty_struct * tty); -extern void stop_tty(struct tty_struct * tty); -extern void start_tty(struct tty_struct * tty); -extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc); -extern int tty_unregister_ldisc(int disc); -extern int tty_register_driver(struct tty_driver *driver); -extern int tty_unregister_driver(struct tty_driver *driver); -extern struct class_device *tty_register_device(struct tty_driver *driver, - unsigned index, - struct device *dev); -extern void tty_unregister_device(struct tty_driver *driver, unsigned index); -extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, - int buflen); -extern void tty_write_message(struct tty_struct *tty, char *msg); - -extern int is_orphaned_pgrp(int pgrp); -extern int is_ignored(int sig); -extern int tty_signal(int sig, struct tty_struct *tty); -extern void tty_hangup(struct tty_struct * tty); -extern void tty_vhangup(struct tty_struct * tty); -extern void tty_unhangup(struct file *filp); -extern int tty_hung_up_p(struct file * filp); -extern void do_SAK(struct tty_struct *tty); -extern void disassociate_ctty(int priv); -extern void tty_flip_buffer_push(struct tty_struct *tty); -extern int tty_get_baud_rate(struct tty_struct *tty); -extern int tty_termios_baud_rate(struct termios *termios); - -extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); -extern void tty_ldisc_deref(struct tty_ldisc *); -extern struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *); - -extern struct tty_ldisc *tty_ldisc_get(int); -extern void tty_ldisc_put(int); - -extern void tty_wakeup(struct tty_struct *tty); -extern void tty_ldisc_flush(struct tty_struct *tty); - -extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg); - -extern struct mutex tty_mutex; - -/* n_tty.c */ -extern struct tty_ldisc tty_ldisc_N_TTY; - -/* tty_ioctl.c */ -extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, - unsigned int cmd, unsigned long arg); - -/* serial.c */ - -extern void serial_console_init(void); - -/* pcxx.c */ - -extern int pcxe_open(struct tty_struct *tty, struct file *filp); - -/* printk.c */ - -extern void console_print(const char *); - -/* vt.c */ - -extern int vt_ioctl(struct tty_struct *tty, struct file * file, - unsigned int cmd, unsigned long arg); - -static inline dev_t tty_devnum(struct tty_struct *tty) -{ - return MKDEV(tty->driver->major, tty->driver->minor_start) + tty->index; -} - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/types.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/types.h 2007-05-24 15:40:44.000000000 +0200 @@ -1,15 +1,6 @@ #ifndef _LINUX_TYPES_H #define _LINUX_TYPES_H -#ifdef __KERNEL__ - -#define BITS_TO_LONGS(bits) \ - (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) -#define DECLARE_BITMAP(name,bits) \ - unsigned long name[BITS_TO_LONGS(bits)] - -#define BITS_PER_BYTE 8 -#endif #include #include @@ -32,27 +23,8 @@ typedef __kernel_clockid_t clockid_t; typedef __kernel_mqd_t mqd_t; -#ifdef __KERNEL__ -typedef _Bool bool; - -typedef __kernel_uid32_t uid_t; -typedef __kernel_gid32_t gid_t; -typedef __kernel_uid16_t uid16_t; -typedef __kernel_gid16_t gid16_t; - -#ifdef CONFIG_UID16 -/* This is defined by include/asm-{arch}/posix_types.h */ -typedef __kernel_old_uid_t old_uid_t; -typedef __kernel_old_gid_t old_gid_t; -#endif /* CONFIG_UID16 */ - -/* libc5 includes this file to define uid_t, thus uid_t can never change - * when it is included by non-kernel code - */ -#else typedef __kernel_uid_t uid_t; typedef __kernel_gid_t gid_t; -#endif /* __KERNEL__ */ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) typedef __kernel_loff_t loff_t; @@ -181,16 +153,6 @@ typedef __u64 __bitwise __be64; #endif -#ifdef __KERNEL__ -typedef unsigned __bitwise__ gfp_t; - -#ifdef CONFIG_RESOURCES_64BIT -typedef u64 resource_size_t; -#else -typedef u32 resource_size_t; -#endif - -#endif /* __KERNEL__ */ struct ustat { __kernel_daddr_t f_tfree; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/udf_fs_i.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/udf_fs_i.h 2007-05-24 15:40:44.000000000 +0200 @@ -13,34 +13,6 @@ #ifndef _UDF_FS_I_H #define _UDF_FS_I_H 1 -#ifdef __KERNEL__ - -struct udf_inode_info -{ - struct timespec i_crtime; - /* Physical address of inode */ - kernel_lb_addr i_location; - __u64 i_unique; - __u32 i_lenEAttr; - __u32 i_lenAlloc; - __u64 i_lenExtents; - __u32 i_next_alloc_block; - __u32 i_next_alloc_goal; - unsigned i_alloc_type : 3; - unsigned i_efe : 1; - unsigned i_use : 1; - unsigned i_strat4096 : 1; - unsigned reserved : 26; - union - { - short_ad *i_sad; - long_ad *i_lad; - __u8 *i_data; - } i_ext; - struct inode vfs_inode; -}; - -#endif /* exported IOCTLs, we have 'l', 0x40-0x7f */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/udp.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/udp.h 2007-05-24 15:40:44.000000000 +0200 @@ -34,29 +34,5 @@ #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ -#ifdef __KERNEL__ -#include - -#include - -struct udp_sock { - /* inet_sock has to be the first member */ - struct inet_sock inet; - int pending; /* Any pending frames ? */ - unsigned int corkflag; /* Cork is required */ - __u16 encap_type; /* Is this an Encapsulation socket? */ - /* - * Following member retains the information to create a UDP header - * when the socket is uncorked. - */ - __u16 len; /* total length of pending frames */ -}; - -static inline struct udp_sock *udp_sk(const struct sock *sk) -{ - return (struct udp_sock *)sk; -} - -#endif #endif /* _LINUX_UDP_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/uinput.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/uinput.h 2007-05-24 15:40:44.000000000 +0200 @@ -34,46 +34,6 @@ #define UINPUT_VERSION 3 -#ifdef __KERNEL__ -#define UINPUT_MINOR 223 -#define UINPUT_NAME "uinput" -#define UINPUT_BUFFER_SIZE 16 -#define UINPUT_NUM_REQUESTS 16 - -enum uinput_state { UIST_NEW_DEVICE, UIST_SETUP_COMPLETE, UIST_CREATED }; - -struct uinput_request { - int id; - int code; /* UI_FF_UPLOAD, UI_FF_ERASE */ - - int retval; - struct completion done; - - union { - int effect_id; - struct { - struct ff_effect *effect; - struct ff_effect *old; - } upload; - } u; -}; - -struct uinput_device { - struct input_dev *dev; - struct mutex mutex; - enum uinput_state state; - wait_queue_head_t waitq; - unsigned char ready; - unsigned char head; - unsigned char tail; - struct input_event buff[UINPUT_BUFFER_SIZE]; - int ff_effects_max; - - struct uinput_request *requests[UINPUT_NUM_REQUESTS]; - wait_queue_head_t requests_waitq; - spinlock_t requests_lock; -}; -#endif /* __KERNEL__ */ struct uinput_ff_upload { int request_id; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/uio.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/uio.h 2007-05-24 15:40:44.000000000 +0200 @@ -1,7 +1,6 @@ #ifndef __LINUX_UIO_H #define __LINUX_UIO_H -#include #include /* @@ -19,18 +18,10 @@ struct iovec { - void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ + void *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */ __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ }; -#ifdef __KERNEL__ - -struct kvec { - void *iov_base; /* and that should *never* hold a userland pointer */ - size_t iov_len; -}; - -#endif /* * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) @@ -51,7 +42,7 @@ * segment lengths have been validated. Because the individual lengths can * overflow a size_t when added together. */ -static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) +static __inline__ size_t iov_length(const struct iovec *iov, unsigned long nr_segs) { unsigned long seg; size_t ret = 0; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/usbdevice_fs.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/usbdevice_fs.h 2007-05-24 15:40:44.000000000 +0200 @@ -45,14 +45,14 @@ __u16 wIndex; __u16 wLength; __u32 timeout; /* in milliseconds */ - void __user *data; + void *data; }; struct usbdevfs_bulktransfer { unsigned int ep; unsigned int len; unsigned int timeout; /* in milliseconds */ - void __user *data; + void *data; }; struct usbdevfs_setinterface { @@ -62,7 +62,7 @@ struct usbdevfs_disconnectsignal { unsigned int signr; - void __user *context; + void *context; }; #define USBDEVFS_MAXDRIVERNAME 255 @@ -96,7 +96,7 @@ unsigned char endpoint; int status; unsigned int flags; - void __user *buffer; + void *buffer; int buffer_length; int actual_length; int start_frame; @@ -112,7 +112,7 @@ int ifno; /* interface 0..N ; negative numbers reserved */ int ioctl_code; /* MUST encode size + direction of data so the * macros in give correct values */ - void __user *data; /* param buffer (in, or out) */ + void *data; /* param buffer (in, or out) */ }; /* You can do most things with hubs just through control messages, @@ -122,32 +122,6 @@ char port [127]; /* e.g. port 3 connects to device 27 */ }; -#ifdef __KERNEL__ -#ifdef CONFIG_COMPAT -#include -struct usbdevfs_urb32 { - unsigned char type; - unsigned char endpoint; - compat_int_t status; - compat_uint_t flags; - compat_caddr_t buffer; - compat_int_t buffer_length; - compat_int_t actual_length; - compat_int_t start_frame; - compat_int_t number_of_packets; - compat_int_t error_count; - compat_uint_t signr; - compat_caddr_t usercontext; /* unused */ - struct usbdevfs_iso_packet_desc iso_frame_desc[0]; -}; - -struct usbdevfs_ioctl32 { - s32 ifno; - s32 ioctl_code; - compat_caddr_t data; -}; -#endif -#endif /* __KERNEL__ */ #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer) #define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer) --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/utsname.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/utsname.h 2007-05-24 15:40:44.000000000 +0200 @@ -30,65 +30,5 @@ char domainname[65]; }; -#ifdef __KERNEL__ - -#include -#include -#include -#include - -struct uts_namespace { - struct kref kref; - struct new_utsname name; -}; -extern struct uts_namespace init_uts_ns; - -static inline void get_uts_ns(struct uts_namespace *ns) -{ - kref_get(&ns->kref); -} - -#ifdef CONFIG_UTS_NS -extern int unshare_utsname(unsigned long unshare_flags, - struct uts_namespace **new_uts); -extern int copy_utsname(int flags, struct task_struct *tsk); -extern void free_uts_ns(struct kref *kref); - -static inline void put_uts_ns(struct uts_namespace *ns) -{ - kref_put(&ns->kref, free_uts_ns); -} -#else -static inline int unshare_utsname(unsigned long unshare_flags, - struct uts_namespace **new_uts) -{ - if (unshare_flags & CLONE_NEWUTS) - return -EINVAL; - - return 0; -} - -static inline int copy_utsname(int flags, struct task_struct *tsk) -{ - return 0; -} -static inline void put_uts_ns(struct uts_namespace *ns) -{ -} -#endif - -static inline struct new_utsname *utsname(void) -{ - return ¤t->nsproxy->uts_ns->name; -} - -static inline struct new_utsname *init_utsname(void) -{ - return &init_uts_ns.name; -} - -extern struct rw_semaphore uts_sem; - -#endif /* __KERNEL__ */ #endif /* _LINUX_UTSNAME_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/videodev.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/videodev.h 2007-05-24 15:40:44.000000000 +0200 @@ -129,7 +129,7 @@ __u32 width,height; /* Its size */ __u32 chromakey; __u32 flags; - struct video_clip __user *clips; /* Set only */ + struct video_clip *clips; /* Set only */ int clipcount; #define VIDEO_WINDOW_INTERLACE 1 #define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/videodev2.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/videodev2.h 2007-05-24 15:40:44.000000000 +0200 @@ -14,12 +14,7 @@ */ #ifndef __LINUX_VIDEODEV2_H #define __LINUX_VIDEODEV2_H -#ifdef __KERNEL__ -#include /* need struct timeval */ -#include /* need __user */ -#else #define __user -#endif #include /* @@ -381,93 +376,6 @@ #define V4L2_TC_USERBITS_8BITCHARS 0x0008 /* The above is based on SMPTE timecodes */ -#ifdef __KERNEL__ -/* - * M P E G C O M P R E S S I O N P A R A M E T E R S - * - * ### WARNING: This experimental MPEG compression API is obsolete. - * ### It is replaced by the MPEG controls API. - * ### This old API will disappear in the near future! - * - */ -enum v4l2_bitrate_mode { - V4L2_BITRATE_NONE = 0, /* not specified */ - V4L2_BITRATE_CBR, /* constant bitrate */ - V4L2_BITRATE_VBR, /* variable bitrate */ -}; -struct v4l2_bitrate { - /* rates are specified in kbit/sec */ - enum v4l2_bitrate_mode mode; - __u32 min; - __u32 target; /* use this one for CBR */ - __u32 max; -}; - -enum v4l2_mpeg_streamtype { - V4L2_MPEG_SS_1, /* MPEG-1 system stream */ - V4L2_MPEG_PS_2, /* MPEG-2 program stream */ - V4L2_MPEG_TS_2, /* MPEG-2 transport stream */ - V4L2_MPEG_PS_DVD, /* MPEG-2 program stream with DVD header fixups */ -}; -enum v4l2_mpeg_audiotype { - V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */ - V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */ - V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */ - V4L2_MPEG_AC3, /* AC3 */ - V4L2_MPEG_LPCM, /* LPCM */ -}; -enum v4l2_mpeg_videotype { - V4L2_MPEG_VI_1, /* MPEG-1 */ - V4L2_MPEG_VI_2, /* MPEG-2 */ -}; -enum v4l2_mpeg_aspectratio { - V4L2_MPEG_ASPECT_SQUARE = 1, /* square pixel */ - V4L2_MPEG_ASPECT_4_3 = 2, /* 4 : 3 */ - V4L2_MPEG_ASPECT_16_9 = 3, /* 16 : 9 */ - V4L2_MPEG_ASPECT_1_221 = 4, /* 1 : 2,21 */ -}; - -struct v4l2_mpeg_compression { - /* general */ - enum v4l2_mpeg_streamtype st_type; - struct v4l2_bitrate st_bitrate; - - /* transport streams */ - __u16 ts_pid_pmt; - __u16 ts_pid_audio; - __u16 ts_pid_video; - __u16 ts_pid_pcr; - - /* program stream */ - __u16 ps_size; - __u16 reserved_1; /* align */ - - /* audio */ - enum v4l2_mpeg_audiotype au_type; - struct v4l2_bitrate au_bitrate; - __u32 au_sample_rate; - __u8 au_pesid; - __u8 reserved_2[3]; /* align */ - - /* video */ - enum v4l2_mpeg_videotype vi_type; - enum v4l2_mpeg_aspectratio vi_aspect_ratio; - struct v4l2_bitrate vi_bitrate; - __u32 vi_frame_rate; - __u16 vi_frames_per_gop; - __u16 vi_bframes_count; - __u8 vi_pesid; - __u8 reserved_3[3]; /* align */ - - /* misc flags */ - __u32 closed_gops:1; - __u32 pulldown:1; - __u32 reserved_4:30; /* align */ - - /* I don't expect the above being perfect yet ;) */ - __u32 reserved_5[8]; -}; -#endif struct v4l2_jpegcompression { @@ -567,7 +475,7 @@ struct v4l2_clip { struct v4l2_rect c; - struct v4l2_clip __user *next; + struct v4l2_clip *next; }; struct v4l2_window @@ -575,9 +483,9 @@ struct v4l2_rect w; enum v4l2_field field; __u32 chromakey; - struct v4l2_clip __user *clips; + struct v4l2_clip *clips; __u32 clipcount; - void __user *bitmap; + void *bitmap; }; /* @@ -1269,10 +1177,6 @@ #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) -#ifdef __KERNEL__ -#define VIDIOC_G_MPEGCOMP _IOR ('V', 6, struct v4l2_mpeg_compression) -#define VIDIOC_S_MPEGCOMP _IOW ('V', 7, struct v4l2_mpeg_compression) -#endif #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/wait.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/wait.h 2007-05-24 15:40:44.000000000 +0200 @@ -17,438 +17,5 @@ #define P_PID 1 #define P_PGID 2 -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include - -typedef struct __wait_queue wait_queue_t; -typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key); -int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); - -struct __wait_queue { - unsigned int flags; -#define WQ_FLAG_EXCLUSIVE 0x01 - void *private; - wait_queue_func_t func; - struct list_head task_list; -}; - -struct wait_bit_key { - void *flags; - int bit_nr; -}; - -struct wait_bit_queue { - struct wait_bit_key key; - wait_queue_t wait; -}; - -struct __wait_queue_head { - spinlock_t lock; - struct list_head task_list; -}; -typedef struct __wait_queue_head wait_queue_head_t; - -struct task_struct; - -/* - * Macros for declaration and initialisaton of the datatypes - */ - -#define __WAITQUEUE_INITIALIZER(name, tsk) { \ - .private = tsk, \ - .func = default_wake_function, \ - .task_list = { NULL, NULL } } - -#define DECLARE_WAITQUEUE(name, tsk) \ - wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk) - -#define __WAIT_QUEUE_HEAD_INITIALIZER(name) { \ - .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ - .task_list = { &(name).task_list, &(name).task_list } } - -#define DECLARE_WAIT_QUEUE_HEAD(name) \ - wait_queue_head_t name = __WAIT_QUEUE_HEAD_INITIALIZER(name) - -#define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ - { .flags = word, .bit_nr = bit, } - -extern void init_waitqueue_head(wait_queue_head_t *q); - -static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) -{ - q->flags = 0; - q->private = p; - q->func = default_wake_function; -} - -static inline void init_waitqueue_func_entry(wait_queue_t *q, - wait_queue_func_t func) -{ - q->flags = 0; - q->private = NULL; - q->func = func; -} - -static inline int waitqueue_active(wait_queue_head_t *q) -{ - return !list_empty(&q->task_list); -} - -/* - * Used to distinguish between sync and async io wait context: - * sync i/o typically specifies a NULL wait queue entry or a wait - * queue entry bound to a task (current task) to wake up. - * aio specifies a wait queue entry with an async notification - * callback routine, not associated with any task. - */ -#define is_sync_wait(wait) (!(wait) || ((wait)->private)) - -extern void FASTCALL(add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)); -extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait)); -extern void FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)); - -static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) -{ - list_add(&new->task_list, &head->task_list); -} - -/* - * Used for wake-one threads: - */ -static inline void __add_wait_queue_tail(wait_queue_head_t *head, - wait_queue_t *new) -{ - list_add_tail(&new->task_list, &head->task_list); -} - -static inline void __remove_wait_queue(wait_queue_head_t *head, - wait_queue_t *old) -{ - list_del(&old->task_list); -} - -void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key)); -extern void FASTCALL(__wake_up_locked(wait_queue_head_t *q, unsigned int mode)); -extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr)); -void FASTCALL(__wake_up_bit(wait_queue_head_t *, void *, int)); -int FASTCALL(__wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned)); -int FASTCALL(__wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned)); -void FASTCALL(wake_up_bit(void *, int)); -int FASTCALL(out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned)); -int FASTCALL(out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned)); -wait_queue_head_t *FASTCALL(bit_waitqueue(void *, int)); - -#define wake_up(x) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1, NULL) -#define wake_up_nr(x, nr) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, nr, NULL) -#define wake_up_all(x) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 0, NULL) -#define wake_up_interruptible(x) __wake_up(x, TASK_INTERRUPTIBLE, 1, NULL) -#define wake_up_interruptible_nr(x, nr) __wake_up(x, TASK_INTERRUPTIBLE, nr, NULL) -#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) -#define wake_up_locked(x) __wake_up_locked((x), TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE) -#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE, 1) - -#define __wait_event(wq, condition) \ -do { \ - DEFINE_WAIT(__wait); \ - \ - for (;;) { \ - prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \ - if (condition) \ - break; \ - schedule(); \ - } \ - finish_wait(&wq, &__wait); \ -} while (0) - -/** - * wait_event - sleep until a condition gets true - * @wq: the waitqueue to wait on - * @condition: a C expression for the event to wait for - * - * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the - * @condition evaluates to true. The @condition is checked each time - * the waitqueue @wq is woken up. - * - * wake_up() has to be called after changing any variable that could - * change the result of the wait condition. - */ -#define wait_event(wq, condition) \ -do { \ - if (condition) \ - break; \ - __wait_event(wq, condition); \ -} while (0) - -#define __wait_event_timeout(wq, condition, ret) \ -do { \ - DEFINE_WAIT(__wait); \ - \ - for (;;) { \ - prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \ - if (condition) \ - break; \ - ret = schedule_timeout(ret); \ - if (!ret) \ - break; \ - } \ - finish_wait(&wq, &__wait); \ -} while (0) - -/** - * wait_event_timeout - sleep until a condition gets true or a timeout elapses - * @wq: the waitqueue to wait on - * @condition: a C expression for the event to wait for - * @timeout: timeout, in jiffies - * - * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the - * @condition evaluates to true. The @condition is checked each time - * the waitqueue @wq is woken up. - * - * wake_up() has to be called after changing any variable that could - * change the result of the wait condition. - * - * The function returns 0 if the @timeout elapsed, and the remaining - * jiffies if the condition evaluated to true before the timeout elapsed. - */ -#define wait_event_timeout(wq, condition, timeout) \ -({ \ - long __ret = timeout; \ - if (!(condition)) \ - __wait_event_timeout(wq, condition, __ret); \ - __ret; \ -}) - -#define __wait_event_interruptible(wq, condition, ret) \ -do { \ - DEFINE_WAIT(__wait); \ - \ - for (;;) { \ - prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \ - if (condition) \ - break; \ - if (!signal_pending(current)) { \ - schedule(); \ - continue; \ - } \ - ret = -ERESTARTSYS; \ - break; \ - } \ - finish_wait(&wq, &__wait); \ -} while (0) - -/** - * wait_event_interruptible - sleep until a condition gets true - * @wq: the waitqueue to wait on - * @condition: a C expression for the event to wait for - * - * The process is put to sleep (TASK_INTERRUPTIBLE) until the - * @condition evaluates to true or a signal is received. - * The @condition is checked each time the waitqueue @wq is woken up. - * - * wake_up() has to be called after changing any variable that could - * change the result of the wait condition. - * - * The function will return -ERESTARTSYS if it was interrupted by a - * signal and 0 if @condition evaluated to true. - */ -#define wait_event_interruptible(wq, condition) \ -({ \ - int __ret = 0; \ - if (!(condition)) \ - __wait_event_interruptible(wq, condition, __ret); \ - __ret; \ -}) - -#define __wait_event_interruptible_timeout(wq, condition, ret) \ -do { \ - DEFINE_WAIT(__wait); \ - \ - for (;;) { \ - prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \ - if (condition) \ - break; \ - if (!signal_pending(current)) { \ - ret = schedule_timeout(ret); \ - if (!ret) \ - break; \ - continue; \ - } \ - ret = -ERESTARTSYS; \ - break; \ - } \ - finish_wait(&wq, &__wait); \ -} while (0) - -/** - * wait_event_interruptible_timeout - sleep until a condition gets true or a timeout elapses - * @wq: the waitqueue to wait on - * @condition: a C expression for the event to wait for - * @timeout: timeout, in jiffies - * - * The process is put to sleep (TASK_INTERRUPTIBLE) until the - * @condition evaluates to true or a signal is received. - * The @condition is checked each time the waitqueue @wq is woken up. - * - * wake_up() has to be called after changing any variable that could - * change the result of the wait condition. - * - * The function returns 0 if the @timeout elapsed, -ERESTARTSYS if it - * was interrupted by a signal, and the remaining jiffies otherwise - * if the condition evaluated to true before the timeout elapsed. - */ -#define wait_event_interruptible_timeout(wq, condition, timeout) \ -({ \ - long __ret = timeout; \ - if (!(condition)) \ - __wait_event_interruptible_timeout(wq, condition, __ret); \ - __ret; \ -}) - -#define __wait_event_interruptible_exclusive(wq, condition, ret) \ -do { \ - DEFINE_WAIT(__wait); \ - \ - for (;;) { \ - prepare_to_wait_exclusive(&wq, &__wait, \ - TASK_INTERRUPTIBLE); \ - if (condition) \ - break; \ - if (!signal_pending(current)) { \ - schedule(); \ - continue; \ - } \ - ret = -ERESTARTSYS; \ - break; \ - } \ - finish_wait(&wq, &__wait); \ -} while (0) - -#define wait_event_interruptible_exclusive(wq, condition) \ -({ \ - int __ret = 0; \ - if (!(condition)) \ - __wait_event_interruptible_exclusive(wq, condition, __ret);\ - __ret; \ -}) - -/* - * Must be called with the spinlock in the wait_queue_head_t held. - */ -static inline void add_wait_queue_exclusive_locked(wait_queue_head_t *q, - wait_queue_t * wait) -{ - wait->flags |= WQ_FLAG_EXCLUSIVE; - __add_wait_queue_tail(q, wait); -} - -/* - * Must be called with the spinlock in the wait_queue_head_t held. - */ -static inline void remove_wait_queue_locked(wait_queue_head_t *q, - wait_queue_t * wait) -{ - __remove_wait_queue(q, wait); -} - -/* - * These are the old interfaces to sleep waiting for an event. - * They are racy. DO NOT use them, use the wait_event* interfaces above. - * We plan to remove these interfaces during 2.7. - */ -extern void FASTCALL(sleep_on(wait_queue_head_t *q)); -extern long FASTCALL(sleep_on_timeout(wait_queue_head_t *q, - signed long timeout)); -extern void FASTCALL(interruptible_sleep_on(wait_queue_head_t *q)); -extern long FASTCALL(interruptible_sleep_on_timeout(wait_queue_head_t *q, - signed long timeout)); - -/* - * Waitqueues which are removed from the waitqueue_head at wakeup time - */ -void FASTCALL(prepare_to_wait(wait_queue_head_t *q, - wait_queue_t *wait, int state)); -void FASTCALL(prepare_to_wait_exclusive(wait_queue_head_t *q, - wait_queue_t *wait, int state)); -void FASTCALL(finish_wait(wait_queue_head_t *q, wait_queue_t *wait)); -int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); -int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); - -#define DEFINE_WAIT(name) \ - wait_queue_t name = { \ - .private = current, \ - .func = autoremove_wake_function, \ - .task_list = LIST_HEAD_INIT((name).task_list), \ - } - -#define DEFINE_WAIT_BIT(name, word, bit) \ - struct wait_bit_queue name = { \ - .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ - .wait = { \ - .private = current, \ - .func = wake_bit_function, \ - .task_list = \ - LIST_HEAD_INIT((name).wait.task_list), \ - }, \ - } - -#define init_wait(wait) \ - do { \ - (wait)->private = current; \ - (wait)->func = autoremove_wake_function; \ - INIT_LIST_HEAD(&(wait)->task_list); \ - } while (0) - -/** - * wait_on_bit - wait for a bit to be cleared - * @word: the word being waited on, a kernel virtual address - * @bit: the bit of the word being waited on - * @action: the function used to sleep, which may take special actions - * @mode: the task state to sleep in - * - * There is a standard hashed waitqueue table for generic use. This - * is the part of the hashtable's accessor API that waits on a bit. - * For instance, if one were to have waiters on a bitflag, one would - * call wait_on_bit() in threads waiting for the bit to clear. - * One uses wait_on_bit() where one is waiting for the bit to clear, - * but has no intention of setting it. - */ -static inline int wait_on_bit(void *word, int bit, - int (*action)(void *), unsigned mode) -{ - if (!test_bit(bit, word)) - return 0; - return out_of_line_wait_on_bit(word, bit, action, mode); -} - -/** - * wait_on_bit_lock - wait for a bit to be cleared, when wanting to set it - * @word: the word being waited on, a kernel virtual address - * @bit: the bit of the word being waited on - * @action: the function used to sleep, which may take special actions - * @mode: the task state to sleep in - * - * There is a standard hashed waitqueue table for generic use. This - * is the part of the hashtable's accessor API that waits on a bit - * when one intends to set it, for instance, trying to lock bitflags. - * For instance, if one were to have waiters trying to set bitflag - * and waiting for it to clear before setting it, one would call - * wait_on_bit() in threads waiting to be able to set the bit. - * One uses wait_on_bit_lock() where one is waiting for the bit to - * clear with the intention of setting it, and when done, clearing it. - */ -static inline int wait_on_bit_lock(void *word, int bit, - int (*action)(void *), unsigned mode) -{ - if (!test_and_set_bit(bit, word)) - return 0; - return out_of_line_wait_on_bit_lock(word, bit, action, mode); -} - -#endif /* __KERNEL__ */ #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/wanrouter.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/wanrouter.h 2007-05-24 15:40:44.000000000 +0200 @@ -449,92 +449,4 @@ unsigned char receive_only; /* no transmit buffering (Y/N) */ } wanif_conf_t; -#ifdef __KERNEL__ -/****** Kernel Interface ****************************************************/ - -#include /* support for device drivers */ -#include /* proc filesystem pragmatics */ -#include /* support for network drivers */ -#include /* Support for SMP Locking */ - -/*---------------------------------------------------------------------------- - * WAN device data space. - */ -struct wan_device { - unsigned magic; /* magic number */ - char* name; /* -> WAN device name (ASCIIZ) */ - void* private; /* -> driver private data */ - unsigned config_id; /* Configuration ID */ - /****** hardware configuration ******/ - unsigned ioport; /* adapter I/O port base #1 */ - char S514_cpu_no[1]; /* PCI CPU Number */ - unsigned char S514_slot_no; /* PCI Slot Number */ - unsigned long maddr; /* dual-port memory address */ - unsigned msize; /* dual-port memory size */ - int irq; /* interrupt request level */ - int dma; /* DMA request level */ - unsigned bps; /* data transfer rate */ - unsigned mtu; /* max physical transmit unit size */ - unsigned udp_port; /* UDP port for management */ - unsigned char ttl; /* Time To Live for UDP security */ - unsigned enable_tx_int; /* Transmit Interrupt enabled or not */ - char interface; /* RS-232/V.35, etc. */ - char clocking; /* external/internal */ - char line_coding; /* NRZ/NRZI/FM0/FM1, etc. */ - char station; /* DTE/DCE, primary/secondary, etc. */ - char connection; /* permanent/switched/on-demand */ - char signalling; /* Signalling RS232 or V35 */ - char read_mode; /* read mode: Polling or interrupt */ - char new_if_cnt; /* Number of interfaces per wanpipe */ - char del_if_cnt; /* Number of times del_if() gets called */ - unsigned char piggyback; /* Piggibacking a port */ - unsigned hw_opt[4]; /* other hardware options */ - /****** status and statistics *******/ - char state; /* device state */ - char api_status; /* device api status */ - struct net_device_stats stats; /* interface statistics */ - unsigned reserved[16]; /* reserved for future use */ - unsigned long critical; /* critical section flag */ - spinlock_t lock; /* Support for SMP Locking */ - - /****** device management methods ***/ - int (*setup) (struct wan_device *wandev, wandev_conf_t *conf); - int (*shutdown) (struct wan_device *wandev); - int (*update) (struct wan_device *wandev); - int (*ioctl) (struct wan_device *wandev, unsigned cmd, - unsigned long arg); - int (*new_if)(struct wan_device *wandev, struct net_device *dev, - wanif_conf_t *conf); - int (*del_if)(struct wan_device *wandev, struct net_device *dev); - /****** maintained by the router ****/ - struct wan_device* next; /* -> next device */ - struct net_device* dev; /* list of network interfaces */ - unsigned ndev; /* number of interfaces */ - struct proc_dir_entry *dent; /* proc filesystem entry */ -}; - -/* Public functions available for device drivers */ -extern int register_wan_device(struct wan_device *wandev); -extern int unregister_wan_device(char *name); -__be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev); -int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev, - unsigned short type); - -/* Proc interface functions. These must not be called by the drivers! */ -extern int wanrouter_proc_init(void); -extern void wanrouter_proc_cleanup(void); -extern int wanrouter_proc_add(struct wan_device *wandev); -extern int wanrouter_proc_delete(struct wan_device *wandev); -extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); - -extern void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); -extern void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); - - - -/* Public Data */ -/* list of registered devices */ -extern struct wan_device *wanrouter_router_devlist; - -#endif /* __KERNEL__ */ #endif /* _ROUTER_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/watchdog.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/watchdog.h 2007-05-24 15:40:44.000000000 +0200 @@ -51,14 +51,5 @@ #define WDIOS_ENABLECARD 0x0002 /* Turn on the watchdog timer */ #define WDIOS_TEMPPANIC 0x0004 /* Kernel panic on temperature trip */ -#ifdef __KERNEL__ - -#ifdef CONFIG_WATCHDOG_NOWAYOUT -#define WATCHDOG_NOWAYOUT 1 -#else -#define WATCHDOG_NOWAYOUT 0 -#endif - -#endif /* __KERNEL__ */ #endif /* ifndef _LINUX_WATCHDOG_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/xfrm.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/xfrm.h 2007-05-24 15:40:44.000000000 +0200 @@ -349,14 +349,12 @@ struct xfrm_selector sel; }; -#ifndef __KERNEL__ /* backwards compatibility for userspace */ #define XFRMGRP_ACQUIRE 1 #define XFRMGRP_EXPIRE 2 #define XFRMGRP_SA 4 #define XFRMGRP_POLICY 8 #define XFRMGRP_REPORT 0x10 -#endif enum xfrm_nlgroups { XFRMNLGRP_NONE, --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./linux/zftape.h 2007-05-08 14:40:13.000000000 +0200 +++ ./linux/zftape.h 2007-05-24 15:40:44.000000000 +0200 @@ -52,36 +52,5 @@ #define MTIOC_ZFTAPE_GETBLKSZ _IOR('m', 104, struct mtblksz) #endif -#ifdef __KERNEL__ - -extern int zft_init(void); - -static inline __s64 zft_div_blksz(__s64 value, __u32 blk_sz) -{ - if (blk_sz == 1) { - return value; - } else { - return (__s64)(((__u32)(value >> 10) + (blk_sz >> 10) - 1) - / (blk_sz >> 10)); - } -} - -static inline __s64 zft_mul_blksz(__s64 value, __u32 blk_sz) -{ - if (blk_sz == 1) { - return value; - } else { - /* if blk_sz != 1, then it is a multiple of 1024. In - * this case, `value' will also fit into 32 bits. - * - * Actually, this limits the capacity to 42 - * bits. This is (2^32)*1024, roughly a thousand - * times 2GB, or 3 Terabytes. Hopefully this is enough - */ - return(__s64)(((__u32)(value)*(blk_sz>>10))<<10); - } -} - -#endif #endif --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./mtd/mtd-abi.h 2007-05-08 14:40:00.000000000 +0200 +++ ./mtd/mtd-abi.h 2007-05-24 15:40:44.000000000 +0200 @@ -15,7 +15,7 @@ struct mtd_oob_buf { uint32_t start; uint32_t length; - unsigned char __user *ptr; + unsigned char *ptr; }; #define MTD_ABSENT 0 --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./scsi/scsi.h 2007-05-08 14:40:14.000000000 +0200 +++ ./scsi/scsi.h 2007-05-24 15:40:44.000000000 +0200 @@ -143,7 +143,7 @@ * This returns true for known good conditions that may be treated as * command completed normally */ -static inline int scsi_status_is_good(int status) +static __inline__ int scsi_status_is_good(int status) { /* * FIXME: bit0 is listed as reserved in SCSI-2, but is @@ -430,7 +430,7 @@ #define SCSI_IOCTL_GET_PCI 0x5387 /* Pull a u32 out of a SCSI message (using BE SCSI conventions) */ -static inline u32 scsi_to_u32(u8 *ptr) +static __inline__ u32 scsi_to_u32(u8 *ptr) { return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3]; } --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./scsi/scsi_ioctl.h 2007-05-08 14:40:14.000000000 +0200 +++ ./scsi/scsi_ioctl.h 2007-05-24 15:40:44.000000000 +0200 @@ -15,34 +15,4 @@ #define SCSI_REMOVAL_PREVENT 1 #define SCSI_REMOVAL_ALLOW 0 -#ifdef __KERNEL__ - -struct scsi_device; - -/* - * Structures used for scsi_ioctl et al. - */ - -typedef struct scsi_ioctl_command { - unsigned int inlen; - unsigned int outlen; - unsigned char data[0]; -} Scsi_Ioctl_Command; - -typedef struct scsi_idlun { - __u32 dev_id; - __u32 host_unique_id; -} Scsi_Idlun; - -/* Fibre Channel WWN, port_id struct */ -typedef struct scsi_fctargaddress { - __u32 host_port_id; - unsigned char host_wwn[8]; // include NULL term. -} Scsi_FCTargAddress; - -extern int scsi_ioctl(struct scsi_device *, int, void __user *); -extern int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd, - void __user *arg, struct file *filp); - -#endif /* __KERNEL__ */ #endif /* _SCSI_IOCTL_H */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./scsi/sg.h 2007-05-08 14:40:14.000000000 +0200 +++ ./scsi/sg.h 2007-05-24 15:40:44.000000000 +0200 @@ -1,7 +1,6 @@ #ifndef _SCSI_GENERIC_H #define _SCSI_GENERIC_H -#include /* History: @@ -75,7 +74,7 @@ typedef struct sg_iovec /* same structure as used by readv() Linux system */ { /* call. It defines one scatter-gather element. */ - void __user *iov_base; /* Starting address */ + void *iov_base; /* Starting address */ size_t iov_len; /* Length in bytes */ } sg_iovec_t; @@ -88,14 +87,14 @@ unsigned char mx_sb_len; /* [i] max length to write to sbp */ unsigned short iovec_count; /* [i] 0 implies no scatter gather */ unsigned int dxfer_len; /* [i] byte count of data transfer */ - void __user *dxferp; /* [i], [*io] points to data transfer memory + void *dxferp; /* [i], [*io] points to data transfer memory or scatter gather list */ - unsigned char __user *cmdp; /* [i], [*i] points to command to perform */ - void __user *sbp; /* [i], [*o] points to sense_buffer memory */ + unsigned char *cmdp; /* [i], [*i] points to command to perform */ + void *sbp; /* [i], [*o] points to sense_buffer memory */ unsigned int timeout; /* [i] MAX_UINT->no timeout (unit: millisec) */ unsigned int flags; /* [i] 0 -> default, see SG_FLAG... */ int pack_id; /* [i->o] unused internally (normally) */ - void __user * usr_ptr; /* [i->o] unused internally */ + void * usr_ptr; /* [i->o] unused internally */ unsigned char status; /* [o] scsi status */ unsigned char masked_status;/* [o] shifted, masked scsi status */ unsigned char msg_status; /* [o] messaging level data (optional) */ @@ -155,7 +154,7 @@ char sg_io_owned; /* 0 -> complete with read(), 1 -> owned by SG_IO */ char problem; /* 0 -> no problem detected, 1 -> error to report */ int pack_id; /* pack_id associated with request */ - void __user *usr_ptr; /* user provided pointer (in new interface) */ + void *usr_ptr; /* user provided pointer (in new interface) */ unsigned int duration; /* millisecs elapsed since written (req_state==1) or request duration (req_state==2) */ int unused; @@ -294,11 +293,7 @@ /* Defaults, commented if they differ from original sg driver */ -#ifdef __KERNEL__ -#define SG_DEFAULT_TIMEOUT_USER (60*USER_HZ) /* HZ == 'jiffies in 1 second' */ -#else #define SG_DEFAULT_TIMEOUT (60*HZ) /* HZ == 'jiffies in 1 second' */ -#endif #define SG_DEF_COMMAND_Q 0 /* command queuing is always on when the new interface is used */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./sound/hdsp.h 2007-05-08 14:40:01.000000000 +0200 +++ ./sound/hdsp.h 2007-05-24 15:40:44.000000000 +0200 @@ -70,7 +70,7 @@ #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info) struct hdsp_firmware { - void __user *firmware_data; /* 24413 x 4 bytes */ + void *firmware_data; /* 24413 x 4 bytes */ }; #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware) --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./sound/sscape_ioctl.h 2007-05-08 14:40:01.000000000 +0200 +++ ./sound/sscape_ioctl.h 2007-05-24 15:40:44.000000000 +0200 @@ -12,7 +12,7 @@ struct sscape_microcode { - unsigned char __user *code; + unsigned char *code; }; #define SND_SSCAPE_LOAD_BOOTB _IOWR('P', 100, struct sscape_bootblock) --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./sound/asequencer.h 2007-05-08 14:40:01.000000000 +0200 +++ ./sound/asequencer.h 2007-05-24 15:40:44.000000000 +0200 @@ -22,10 +22,6 @@ #ifndef __SOUND_ASEQUENCER_H #define __SOUND_ASEQUENCER_H -#ifdef __KERNEL__ -#include -#include -#endif /** version of the sequencer */ #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1) @@ -415,68 +411,6 @@ /* external data follows here. */ }; -#ifdef __KERNEL__ - -/* helper macro */ -#define snd_seq_event_bounce_ext_data(ev) ((void*)((char *)(ev)->data.ext.ptr + sizeof(struct snd_seq_event_bounce))) - -/* - * type check macros - */ -/* result events: 0-4 */ -#define snd_seq_ev_is_result_type(ev) ((ev)->type < 5) -/* channel specific events: 5-19 */ -#define snd_seq_ev_is_channel_type(ev) ((ev)->type >= 5 && (ev)->type < 20) -/* note events: 5-9 */ -#define snd_seq_ev_is_note_type(ev) ((ev)->type >= 5 && (ev)->type < 10) -/* control events: 10-19 */ -#define snd_seq_ev_is_control_type(ev) ((ev)->type >= 10 && (ev)->type < 20) -/* queue control events: 30-39 */ -#define snd_seq_ev_is_queue_type(ev) ((ev)->type >= 30 && (ev)->type < 40) -/* system status messages */ -#define snd_seq_ev_is_message_type(ev) ((ev)->type >= 60 && (ev)->type < 69) -/* sample messages */ -#define snd_seq_ev_is_sample_type(ev) ((ev)->type >= 70 && (ev)->type < 79) -/* user-defined messages */ -#define snd_seq_ev_is_user_type(ev) ((ev)->type >= 90 && (ev)->type < 99) -/* fixed length events: 0-99 */ -#define snd_seq_ev_is_fixed_type(ev) ((ev)->type < 100) -/* instrument layer events: 100-129 */ -#define snd_seq_ev_is_instr_type(ev) ((ev)->type >= 100 && (ev)->type < 130) -/* variable length events: 130-139 */ -#define snd_seq_ev_is_variable_type(ev) ((ev)->type >= 130 && (ev)->type < 140) -/* reserved for kernel */ -#define snd_seq_ev_is_reserved(ev) ((ev)->type >= 150) - -/* direct dispatched events */ -#define snd_seq_ev_is_direct(ev) ((ev)->queue == SNDRV_SEQ_QUEUE_DIRECT) - -/* - * macros to check event flags - */ -/* prior events */ -#define snd_seq_ev_is_prior(ev) (((ev)->flags & SNDRV_SEQ_PRIORITY_MASK) == SNDRV_SEQ_PRIORITY_HIGH) - -/* event length type */ -#define snd_seq_ev_length_type(ev) ((ev)->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) -#define snd_seq_ev_is_fixed(ev) (snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_FIXED) -#define snd_seq_ev_is_variable(ev) (snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE) -#define snd_seq_ev_is_varusr(ev) (snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARUSR) - -/* time-stamp type */ -#define snd_seq_ev_timestamp_type(ev) ((ev)->flags & SNDRV_SEQ_TIME_STAMP_MASK) -#define snd_seq_ev_is_tick(ev) (snd_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_TICK) -#define snd_seq_ev_is_real(ev) (snd_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_REAL) - -/* time-mode type */ -#define snd_seq_ev_timemode_type(ev) ((ev)->flags & SNDRV_SEQ_TIME_MODE_MASK) -#define snd_seq_ev_is_abstime(ev) (snd_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_ABS) -#define snd_seq_ev_is_reltime(ev) (snd_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_REL) - -/* queue sync port */ -#define snd_seq_queue_sync_port(q) ((q) + 16) - -#endif /* __KERNEL__ */ /* system information */ struct snd_seq_system_info { @@ -509,9 +443,9 @@ /* client types */ typedef int __bitwise snd_seq_client_type_t; -#define NO_CLIENT ((__force snd_seq_client_type_t) 0) -#define USER_CLIENT ((__force snd_seq_client_type_t) 1) -#define KERNEL_CLIENT ((__force snd_seq_client_type_t) 2) +#define NO_CLIENT ( (snd_seq_client_type_t) 0) +#define USER_CLIENT ( (snd_seq_client_type_t) 1) +#define KERNEL_CLIENT ( (snd_seq_client_type_t) 2) /* event filter flags */ #define SNDRV_SEQ_FILTER_BROADCAST (1<<0) /* accept broadcast messages */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./sound/asound.h 2007-05-08 14:40:01.000000000 +0200 +++ ./sound/asound.h 2007-05-24 15:40:44.000000000 +0200 @@ -23,23 +23,6 @@ #ifndef __SOUND_ASOUND_H #define __SOUND_ASOUND_H -#ifdef __KERNEL__ -#include -#include -#include -#include - -#ifdef __LITTLE_ENDIAN -#define SNDRV_LITTLE_ENDIAN -#else -#ifdef __BIG_ENDIAN -#define SNDRV_BIG_ENDIAN -#else -#error "Unsupported endian..." -#endif -#endif - -#endif /* __KERNEL__ **/ /* * protocol version @@ -119,7 +102,7 @@ struct snd_hwdep_dsp_image { unsigned int index; /* W: DSP index */ unsigned char name[64]; /* W: ID (e.g. file name) */ - unsigned char __user *image; /* W: binary image */ + unsigned char *image; /* W: binary image */ size_t length; /* W: size of image in bytes */ unsigned long driver_data; /* W: driver-specific data */ }; @@ -165,52 +148,52 @@ }; typedef int __bitwise snd_pcm_access_t; -#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((__force snd_pcm_access_t) 0) /* interleaved mmap */ -#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((__force snd_pcm_access_t) 1) /* noninterleaved mmap */ -#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((__force snd_pcm_access_t) 2) /* complex mmap */ -#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((__force snd_pcm_access_t) 3) /* readi/writei */ -#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((__force snd_pcm_access_t) 4) /* readn/writen */ +#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ( (snd_pcm_access_t) 0) /* interleaved mmap */ +#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ( (snd_pcm_access_t) 1) /* noninterleaved mmap */ +#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ( (snd_pcm_access_t) 2) /* complex mmap */ +#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ( (snd_pcm_access_t) 3) /* readi/writei */ +#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ( (snd_pcm_access_t) 4) /* readn/writen */ #define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED typedef int __bitwise snd_pcm_format_t; -#define SNDRV_PCM_FORMAT_S8 ((__force snd_pcm_format_t) 0) -#define SNDRV_PCM_FORMAT_U8 ((__force snd_pcm_format_t) 1) -#define SNDRV_PCM_FORMAT_S16_LE ((__force snd_pcm_format_t) 2) -#define SNDRV_PCM_FORMAT_S16_BE ((__force snd_pcm_format_t) 3) -#define SNDRV_PCM_FORMAT_U16_LE ((__force snd_pcm_format_t) 4) -#define SNDRV_PCM_FORMAT_U16_BE ((__force snd_pcm_format_t) 5) -#define SNDRV_PCM_FORMAT_S24_LE ((__force snd_pcm_format_t) 6) /* low three bytes */ -#define SNDRV_PCM_FORMAT_S24_BE ((__force snd_pcm_format_t) 7) /* low three bytes */ -#define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8) /* low three bytes */ -#define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9) /* low three bytes */ -#define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10) -#define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11) -#define SNDRV_PCM_FORMAT_U32_LE ((__force snd_pcm_format_t) 12) -#define SNDRV_PCM_FORMAT_U32_BE ((__force snd_pcm_format_t) 13) -#define SNDRV_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ -#define SNDRV_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ -#define SNDRV_PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ -#define SNDRV_PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ -#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */ -#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */ -#define SNDRV_PCM_FORMAT_MU_LAW ((__force snd_pcm_format_t) 20) -#define SNDRV_PCM_FORMAT_A_LAW ((__force snd_pcm_format_t) 21) -#define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22) -#define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23) -#define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24) -#define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31) -#define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U24_3LE ((__force snd_pcm_format_t) 34) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U24_3BE ((__force snd_pcm_format_t) 35) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S20_3LE ((__force snd_pcm_format_t) 36) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S20_3BE ((__force snd_pcm_format_t) 37) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U20_3LE ((__force snd_pcm_format_t) 38) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U20_3BE ((__force snd_pcm_format_t) 39) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S18_3LE ((__force snd_pcm_format_t) 40) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S8 ( (snd_pcm_format_t) 0) +#define SNDRV_PCM_FORMAT_U8 ( (snd_pcm_format_t) 1) +#define SNDRV_PCM_FORMAT_S16_LE ( (snd_pcm_format_t) 2) +#define SNDRV_PCM_FORMAT_S16_BE ( (snd_pcm_format_t) 3) +#define SNDRV_PCM_FORMAT_U16_LE ( (snd_pcm_format_t) 4) +#define SNDRV_PCM_FORMAT_U16_BE ( (snd_pcm_format_t) 5) +#define SNDRV_PCM_FORMAT_S24_LE ( (snd_pcm_format_t) 6) /* low three bytes */ +#define SNDRV_PCM_FORMAT_S24_BE ( (snd_pcm_format_t) 7) /* low three bytes */ +#define SNDRV_PCM_FORMAT_U24_LE ( (snd_pcm_format_t) 8) /* low three bytes */ +#define SNDRV_PCM_FORMAT_U24_BE ( (snd_pcm_format_t) 9) /* low three bytes */ +#define SNDRV_PCM_FORMAT_S32_LE ( (snd_pcm_format_t) 10) +#define SNDRV_PCM_FORMAT_S32_BE ( (snd_pcm_format_t) 11) +#define SNDRV_PCM_FORMAT_U32_LE ( (snd_pcm_format_t) 12) +#define SNDRV_PCM_FORMAT_U32_BE ( (snd_pcm_format_t) 13) +#define SNDRV_PCM_FORMAT_FLOAT_LE ( (snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ +#define SNDRV_PCM_FORMAT_FLOAT_BE ( (snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ +#define SNDRV_PCM_FORMAT_FLOAT64_LE ( (snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ +#define SNDRV_PCM_FORMAT_FLOAT64_BE ( (snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ +#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ( (snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */ +#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ( (snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */ +#define SNDRV_PCM_FORMAT_MU_LAW ( (snd_pcm_format_t) 20) +#define SNDRV_PCM_FORMAT_A_LAW ( (snd_pcm_format_t) 21) +#define SNDRV_PCM_FORMAT_IMA_ADPCM ( (snd_pcm_format_t) 22) +#define SNDRV_PCM_FORMAT_MPEG ( (snd_pcm_format_t) 23) +#define SNDRV_PCM_FORMAT_GSM ( (snd_pcm_format_t) 24) +#define SNDRV_PCM_FORMAT_SPECIAL ( (snd_pcm_format_t) 31) +#define SNDRV_PCM_FORMAT_S24_3LE ( (snd_pcm_format_t) 32) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S24_3BE ( (snd_pcm_format_t) 33) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U24_3LE ( (snd_pcm_format_t) 34) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U24_3BE ( (snd_pcm_format_t) 35) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S20_3LE ( (snd_pcm_format_t) 36) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S20_3BE ( (snd_pcm_format_t) 37) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U20_3LE ( (snd_pcm_format_t) 38) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U20_3BE ( (snd_pcm_format_t) 39) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S18_3LE ( (snd_pcm_format_t) 40) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S18_3BE ( (snd_pcm_format_t) 41) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U18_3LE ( (snd_pcm_format_t) 42) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U18_3BE ( (snd_pcm_format_t) 43) /* in three bytes */ #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_U18_3BE #ifdef SNDRV_LITTLE_ENDIAN @@ -237,7 +220,7 @@ #endif typedef int __bitwise snd_pcm_subformat_t; -#define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0) +#define SNDRV_PCM_SUBFORMAT_STD ( (snd_pcm_subformat_t) 0) #define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD #define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ @@ -256,15 +239,15 @@ #define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ typedef int __bitwise snd_pcm_state_t; -#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0) /* stream is open */ -#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1) /* stream has a setup */ -#define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2) /* stream is ready to start */ -#define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3) /* stream is running */ -#define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4) /* stream reached an xrun */ -#define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5) /* stream is draining */ -#define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6) /* stream is paused */ -#define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7) /* hardware is suspended */ -#define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8) /* hardware is disconnected */ +#define SNDRV_PCM_STATE_OPEN ( (snd_pcm_state_t) 0) /* stream is open */ +#define SNDRV_PCM_STATE_SETUP ( (snd_pcm_state_t) 1) /* stream has a setup */ +#define SNDRV_PCM_STATE_PREPARED ( (snd_pcm_state_t) 2) /* stream is ready to start */ +#define SNDRV_PCM_STATE_RUNNING ( (snd_pcm_state_t) 3) /* stream is running */ +#define SNDRV_PCM_STATE_XRUN ( (snd_pcm_state_t) 4) /* stream reached an xrun */ +#define SNDRV_PCM_STATE_DRAINING ( (snd_pcm_state_t) 5) /* stream is draining */ +#define SNDRV_PCM_STATE_PAUSED ( (snd_pcm_state_t) 6) /* stream is paused */ +#define SNDRV_PCM_STATE_SUSPENDED ( (snd_pcm_state_t) 7) /* hardware is suspended */ +#define SNDRV_PCM_STATE_DISCONNECTED ( (snd_pcm_state_t) 8) /* hardware is disconnected */ #define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED enum { @@ -296,24 +279,24 @@ }; typedef int __bitwise snd_pcm_hw_param_t; -#define SNDRV_PCM_HW_PARAM_ACCESS ((__force snd_pcm_hw_param_t) 0) /* Access type */ -#define SNDRV_PCM_HW_PARAM_FORMAT ((__force snd_pcm_hw_param_t) 1) /* Format */ -#define SNDRV_PCM_HW_PARAM_SUBFORMAT ((__force snd_pcm_hw_param_t) 2) /* Subformat */ +#define SNDRV_PCM_HW_PARAM_ACCESS ( (snd_pcm_hw_param_t) 0) /* Access type */ +#define SNDRV_PCM_HW_PARAM_FORMAT ( (snd_pcm_hw_param_t) 1) /* Format */ +#define SNDRV_PCM_HW_PARAM_SUBFORMAT ( (snd_pcm_hw_param_t) 2) /* Subformat */ #define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS #define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT -#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS ((__force snd_pcm_hw_param_t) 8) /* Bits per sample */ -#define SNDRV_PCM_HW_PARAM_FRAME_BITS ((__force snd_pcm_hw_param_t) 9) /* Bits per frame */ -#define SNDRV_PCM_HW_PARAM_CHANNELS ((__force snd_pcm_hw_param_t) 10) /* Channels */ -#define SNDRV_PCM_HW_PARAM_RATE ((__force snd_pcm_hw_param_t) 11) /* Approx rate */ -#define SNDRV_PCM_HW_PARAM_PERIOD_TIME ((__force snd_pcm_hw_param_t) 12) /* Approx distance between interrupts in us */ -#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE ((__force snd_pcm_hw_param_t) 13) /* Approx frames between interrupts */ -#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES ((__force snd_pcm_hw_param_t) 14) /* Approx bytes between interrupts */ -#define SNDRV_PCM_HW_PARAM_PERIODS ((__force snd_pcm_hw_param_t) 15) /* Approx interrupts per buffer */ -#define SNDRV_PCM_HW_PARAM_BUFFER_TIME ((__force snd_pcm_hw_param_t) 16) /* Approx duration of buffer in us */ -#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE ((__force snd_pcm_hw_param_t) 17) /* Size of buffer in frames */ -#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES ((__force snd_pcm_hw_param_t) 18) /* Size of buffer in bytes */ -#define SNDRV_PCM_HW_PARAM_TICK_TIME ((__force snd_pcm_hw_param_t) 19) /* Approx tick duration in us */ +#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS ( (snd_pcm_hw_param_t) 8) /* Bits per sample */ +#define SNDRV_PCM_HW_PARAM_FRAME_BITS ( (snd_pcm_hw_param_t) 9) /* Bits per frame */ +#define SNDRV_PCM_HW_PARAM_CHANNELS ( (snd_pcm_hw_param_t) 10) /* Channels */ +#define SNDRV_PCM_HW_PARAM_RATE ( (snd_pcm_hw_param_t) 11) /* Approx rate */ +#define SNDRV_PCM_HW_PARAM_PERIOD_TIME ( (snd_pcm_hw_param_t) 12) /* Approx distance between interrupts in us */ +#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE ( (snd_pcm_hw_param_t) 13) /* Approx frames between interrupts */ +#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES ( (snd_pcm_hw_param_t) 14) /* Approx bytes between interrupts */ +#define SNDRV_PCM_HW_PARAM_PERIODS ( (snd_pcm_hw_param_t) 15) /* Approx interrupts per buffer */ +#define SNDRV_PCM_HW_PARAM_BUFFER_TIME ( (snd_pcm_hw_param_t) 16) /* Approx duration of buffer in us */ +#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE ( (snd_pcm_hw_param_t) 17) /* Size of buffer in frames */ +#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES ( (snd_pcm_hw_param_t) 18) /* Size of buffer in bytes */ +#define SNDRV_PCM_HW_PARAM_TICK_TIME ( (snd_pcm_hw_param_t) 19) /* Approx tick duration in us */ #define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS #define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME @@ -423,13 +406,13 @@ struct snd_xferi { snd_pcm_sframes_t result; - void __user *buf; + void *buf; snd_pcm_uframes_t frames; }; struct snd_xfern { snd_pcm_sframes_t result; - void __user * __user *bufs; + void * *bufs; snd_pcm_uframes_t frames; }; @@ -704,23 +687,23 @@ }; typedef int __bitwise snd_ctl_elem_type_t; -#define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0) /* invalid */ -#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1) /* boolean type */ -#define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2) /* integer type */ -#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3) /* enumerated type */ -#define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4) /* byte array */ -#define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */ -#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6) /* 64-bit integer type */ +#define SNDRV_CTL_ELEM_TYPE_NONE ( (snd_ctl_elem_type_t) 0) /* invalid */ +#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ( (snd_ctl_elem_type_t) 1) /* boolean type */ +#define SNDRV_CTL_ELEM_TYPE_INTEGER ( (snd_ctl_elem_type_t) 2) /* integer type */ +#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ( (snd_ctl_elem_type_t) 3) /* enumerated type */ +#define SNDRV_CTL_ELEM_TYPE_BYTES ( (snd_ctl_elem_type_t) 4) /* byte array */ +#define SNDRV_CTL_ELEM_TYPE_IEC958 ( (snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */ +#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ( (snd_ctl_elem_type_t) 6) /* 64-bit integer type */ #define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64 typedef int __bitwise snd_ctl_elem_iface_t; -#define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0) /* global control */ -#define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1) /* hardware dependent device */ -#define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2) /* virtual mixer device */ -#define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3) /* PCM device */ -#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4) /* RawMidi device */ -#define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5) /* timer device */ -#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6) /* sequencer client */ +#define SNDRV_CTL_ELEM_IFACE_CARD ( (snd_ctl_elem_iface_t) 0) /* global control */ +#define SNDRV_CTL_ELEM_IFACE_HWDEP ( (snd_ctl_elem_iface_t) 1) /* hardware dependent device */ +#define SNDRV_CTL_ELEM_IFACE_MIXER ( (snd_ctl_elem_iface_t) 2) /* virtual mixer device */ +#define SNDRV_CTL_ELEM_IFACE_PCM ( (snd_ctl_elem_iface_t) 3) /* PCM device */ +#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ( (snd_ctl_elem_iface_t) 4) /* RawMidi device */ +#define SNDRV_CTL_ELEM_IFACE_TIMER ( (snd_ctl_elem_iface_t) 5) /* timer device */ +#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ( (snd_ctl_elem_iface_t) 6) /* sequencer client */ #define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER #define SNDRV_CTL_ELEM_ACCESS_READ (1<<0) @@ -762,7 +745,7 @@ unsigned int space; /* W: count of element IDs to get */ unsigned int used; /* R: count of element IDs set */ unsigned int count; /* R: count of all elements */ - struct snd_ctl_elem_id __user *pids; /* R: IDs */ + struct snd_ctl_elem_id *pids; /* R: IDs */ unsigned char reserved[50]; }; --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./sound/emu10k1.h 2007-05-08 14:40:01.000000000 +0200 +++ ./sound/emu10k1.h 2007-05-24 15:40:44.000000000 +0200 @@ -23,1252 +23,6 @@ * */ -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* ------------------- DEFINES -------------------- */ - -#define EMUPAGESIZE 4096 -#define MAXREQVOICES 8 -#define MAXPAGES 8192 -#define RESERVED 0 -#define NUM_MIDI 16 -#define NUM_G 64 /* use all channels */ -#define NUM_FXSENDS 4 -#define NUM_EFX_PLAYBACK 16 - -/* FIXME? - according to the OSS driver the EMU10K1 needs a 29 bit DMA mask */ -#define EMU10K1_DMA_MASK 0x7fffffffUL /* 31bit */ -#define AUDIGY_DMA_MASK 0x7fffffffUL /* 31bit FIXME - 32 should work? */ - /* See ALSA bug #1276 - rlrevell */ - -#define TMEMSIZE 256*1024 -#define TMEMSIZEREG 4 - -#define IP_TO_CP(ip) ((ip == 0) ? 0 : (((0x00001000uL | (ip & 0x00000FFFL)) << (((ip >> 12) & 0x000FL) + 4)) & 0xFFFF0000uL)) - -// Audigy specify registers are prefixed with 'A_' - -/************************************************************************************************/ -/* PCI function 0 registers, address = + PCIBASE0 */ -/************************************************************************************************/ - -#define PTR 0x00 /* Indexed register set pointer register */ - /* NOTE: The CHANNELNUM and ADDRESS words can */ - /* be modified independently of each other. */ -#define PTR_CHANNELNUM_MASK 0x0000003f /* For each per-channel register, indicates the */ - /* channel number of the register to be */ - /* accessed. For non per-channel registers the */ - /* value should be set to zero. */ -#define PTR_ADDRESS_MASK 0x07ff0000 /* Register index */ -#define A_PTR_ADDRESS_MASK 0x0fff0000 - -#define DATA 0x04 /* Indexed register set data register */ - -#define IPR 0x08 /* Global interrupt pending register */ - /* Clear pending interrupts by writing a 1 to */ - /* the relevant bits and zero to the other bits */ -#define IPR_P16V 0x80000000 /* Bit set when the CA0151 P16V chip wishes - to interrupt */ -#define IPR_GPIOMSG 0x20000000 /* GPIO message interrupt (RE'd, still not sure - which INTE bits enable it) */ - -/* The next two interrupts are for the midi port on the Audigy Drive (A_MPU1) */ -#define IPR_A_MIDITRANSBUFEMPTY2 0x10000000 /* MIDI UART transmit buffer empty */ -#define IPR_A_MIDIRECVBUFEMPTY2 0x08000000 /* MIDI UART receive buffer empty */ - -#define IPR_SPDIFBUFFULL 0x04000000 /* SPDIF capture related, 10k2 only? (RE) */ -#define IPR_SPDIFBUFHALFFULL 0x02000000 /* SPDIF capture related? (RE) */ - -#define IPR_SAMPLERATETRACKER 0x01000000 /* Sample rate tracker lock status change */ -#define IPR_FXDSP 0x00800000 /* Enable FX DSP interrupts */ -#define IPR_FORCEINT 0x00400000 /* Force Sound Blaster interrupt */ -#define IPR_PCIERROR 0x00200000 /* PCI bus error */ -#define IPR_VOLINCR 0x00100000 /* Volume increment button pressed */ -#define IPR_VOLDECR 0x00080000 /* Volume decrement button pressed */ -#define IPR_MUTE 0x00040000 /* Mute button pressed */ -#define IPR_MICBUFFULL 0x00020000 /* Microphone buffer full */ -#define IPR_MICBUFHALFFULL 0x00010000 /* Microphone buffer half full */ -#define IPR_ADCBUFFULL 0x00008000 /* ADC buffer full */ -#define IPR_ADCBUFHALFFULL 0x00004000 /* ADC buffer half full */ -#define IPR_EFXBUFFULL 0x00002000 /* Effects buffer full */ -#define IPR_EFXBUFHALFFULL 0x00001000 /* Effects buffer half full */ -#define IPR_GPSPDIFSTATUSCHANGE 0x00000800 /* GPSPDIF channel status change */ -#define IPR_CDROMSTATUSCHANGE 0x00000400 /* CD-ROM channel status change */ -#define IPR_INTERVALTIMER 0x00000200 /* Interval timer terminal count */ -#define IPR_MIDITRANSBUFEMPTY 0x00000100 /* MIDI UART transmit buffer empty */ -#define IPR_MIDIRECVBUFEMPTY 0x00000080 /* MIDI UART receive buffer empty */ -#define IPR_CHANNELLOOP 0x00000040 /* Channel (half) loop interrupt(s) pending */ -#define IPR_CHANNELNUMBERMASK 0x0000003f /* When IPR_CHANNELLOOP is set, indicates the */ - /* highest set channel in CLIPL, CLIPH, HLIPL, */ - /* or HLIPH. When IP is written with CL set, */ - /* the bit in H/CLIPL or H/CLIPH corresponding */ - /* to the CIN value written will be cleared. */ - -#define INTE 0x0c /* Interrupt enable register */ -#define INTE_VIRTUALSB_MASK 0xc0000000 /* Virtual Soundblaster I/O port capture */ -#define INTE_VIRTUALSB_220 0x00000000 /* Capture at I/O base address 0x220-0x22f */ -#define INTE_VIRTUALSB_240 0x40000000 /* Capture at I/O base address 0x240 */ -#define INTE_VIRTUALSB_260 0x80000000 /* Capture at I/O base address 0x260 */ -#define INTE_VIRTUALSB_280 0xc0000000 /* Capture at I/O base address 0x280 */ -#define INTE_VIRTUALMPU_MASK 0x30000000 /* Virtual MPU I/O port capture */ -#define INTE_VIRTUALMPU_300 0x00000000 /* Capture at I/O base address 0x300-0x301 */ -#define INTE_VIRTUALMPU_310 0x10000000 /* Capture at I/O base address 0x310 */ -#define INTE_VIRTUALMPU_320 0x20000000 /* Capture at I/O base address 0x320 */ -#define INTE_VIRTUALMPU_330 0x30000000 /* Capture at I/O base address 0x330 */ -#define INTE_MASTERDMAENABLE 0x08000000 /* Master DMA emulation at 0x000-0x00f */ -#define INTE_SLAVEDMAENABLE 0x04000000 /* Slave DMA emulation at 0x0c0-0x0df */ -#define INTE_MASTERPICENABLE 0x02000000 /* Master PIC emulation at 0x020-0x021 */ -#define INTE_SLAVEPICENABLE 0x01000000 /* Slave PIC emulation at 0x0a0-0x0a1 */ -#define INTE_VSBENABLE 0x00800000 /* Enable virtual Soundblaster */ -#define INTE_ADLIBENABLE 0x00400000 /* Enable AdLib emulation at 0x388-0x38b */ -#define INTE_MPUENABLE 0x00200000 /* Enable virtual MPU */ -#define INTE_FORCEINT 0x00100000 /* Continuously assert INTAN */ - -#define INTE_MRHANDENABLE 0x00080000 /* Enable the "Mr. Hand" logic */ - /* NOTE: There is no reason to use this under */ - /* Linux, and it will cause odd hardware */ - /* behavior and possibly random segfaults and */ - /* lockups if enabled. */ - -/* The next two interrupts are for the midi port on the Audigy Drive (A_MPU1) */ -#define INTE_A_MIDITXENABLE2 0x00020000 /* Enable MIDI transmit-buffer-empty interrupts */ -#define INTE_A_MIDIRXENABLE2 0x00010000 /* Enable MIDI receive-buffer-empty interrupts */ - - -#define INTE_SAMPLERATETRACKER 0x00002000 /* Enable sample rate tracker interrupts */ - /* NOTE: This bit must always be enabled */ -#define INTE_FXDSPENABLE 0x00001000 /* Enable FX DSP interrupts */ -#define INTE_PCIERRORENABLE 0x00000800 /* Enable PCI bus error interrupts */ -#define INTE_VOLINCRENABLE 0x00000400 /* Enable volume increment button interrupts */ -#define INTE_VOLDECRENABLE 0x00000200 /* Enable volume decrement button interrupts */ -#define INTE_MUTEENABLE 0x00000100 /* Enable mute button interrupts */ -#define INTE_MICBUFENABLE 0x00000080 /* Enable microphone buffer interrupts */ -#define INTE_ADCBUFENABLE 0x00000040 /* Enable ADC buffer interrupts */ -#define INTE_EFXBUFENABLE 0x00000020 /* Enable Effects buffer interrupts */ -#define INTE_GPSPDIFENABLE 0x00000010 /* Enable GPSPDIF status interrupts */ -#define INTE_CDSPDIFENABLE 0x00000008 /* Enable CDSPDIF status interrupts */ -#define INTE_INTERVALTIMERENB 0x00000004 /* Enable interval timer interrupts */ -#define INTE_MIDITXENABLE 0x00000002 /* Enable MIDI transmit-buffer-empty interrupts */ -#define INTE_MIDIRXENABLE 0x00000001 /* Enable MIDI receive-buffer-empty interrupts */ - -#define WC 0x10 /* Wall Clock register */ -#define WC_SAMPLECOUNTER_MASK 0x03FFFFC0 /* Sample periods elapsed since reset */ -#define WC_SAMPLECOUNTER 0x14060010 -#define WC_CURRENTCHANNEL 0x0000003F /* Channel [0..63] currently being serviced */ - /* NOTE: Each channel takes 1/64th of a sample */ - /* period to be serviced. */ - -#define HCFG 0x14 /* Hardware config register */ - /* NOTE: There is no reason to use the legacy */ - /* SoundBlaster emulation stuff described below */ - /* under Linux, and all kinds of weird hardware */ - /* behavior can result if you try. Don't. */ -#define HCFG_LEGACYFUNC_MASK 0xe0000000 /* Legacy function number */ -#define HCFG_LEGACYFUNC_MPU 0x00000000 /* Legacy MPU */ -#define HCFG_LEGACYFUNC_SB 0x40000000 /* Legacy SB */ -#define HCFG_LEGACYFUNC_AD 0x60000000 /* Legacy AD */ -#define HCFG_LEGACYFUNC_MPIC 0x80000000 /* Legacy MPIC */ -#define HCFG_LEGACYFUNC_MDMA 0xa0000000 /* Legacy MDMA */ -#define HCFG_LEGACYFUNC_SPCI 0xc0000000 /* Legacy SPCI */ -#define HCFG_LEGACYFUNC_SDMA 0xe0000000 /* Legacy SDMA */ -#define HCFG_IOCAPTUREADDR 0x1f000000 /* The 4 LSBs of the captured I/O address. */ -#define HCFG_LEGACYWRITE 0x00800000 /* 1 = write, 0 = read */ -#define HCFG_LEGACYWORD 0x00400000 /* 1 = word, 0 = byte */ -#define HCFG_LEGACYINT 0x00200000 /* 1 = legacy event captured. Write 1 to clear. */ - /* NOTE: The rest of the bits in this register */ - /* _are_ relevant under Linux. */ -#define HCFG_CODECFORMAT_MASK 0x00070000 /* CODEC format */ -#define HCFG_CODECFORMAT_AC97 0x00000000 /* AC97 CODEC format -- Primary Output */ -#define HCFG_CODECFORMAT_I2S 0x00010000 /* I2S CODEC format -- Secondary (Rear) Output */ -#define HCFG_GPINPUT0 0x00004000 /* External pin112 */ -#define HCFG_GPINPUT1 0x00002000 /* External pin110 */ -#define HCFG_GPOUTPUT_MASK 0x00001c00 /* External pins which may be controlled */ -#define HCFG_GPOUT0 0x00001000 /* External pin? (spdif enable on 5.1) */ -#define HCFG_GPOUT1 0x00000800 /* External pin? (IR) */ -#define HCFG_GPOUT2 0x00000400 /* External pin? (IR) */ -#define HCFG_JOYENABLE 0x00000200 /* Internal joystick enable */ -#define HCFG_PHASETRACKENABLE 0x00000100 /* Phase tracking enable */ - /* 1 = Force all 3 async digital inputs to use */ - /* the same async sample rate tracker (ZVIDEO) */ -#define HCFG_AC3ENABLE_MASK 0x000000e0 /* AC3 async input control - Not implemented */ -#define HCFG_AC3ENABLE_ZVIDEO 0x00000080 /* Channels 0 and 1 replace ZVIDEO */ -#define HCFG_AC3ENABLE_CDSPDIF 0x00000040 /* Channels 0 and 1 replace CDSPDIF */ -#define HCFG_AC3ENABLE_GPSPDIF 0x00000020 /* Channels 0 and 1 replace GPSPDIF */ -#define HCFG_AUTOMUTE 0x00000010 /* When set, the async sample rate convertors */ - /* will automatically mute their output when */ - /* they are not rate-locked to the external */ - /* async audio source */ -#define HCFG_LOCKSOUNDCACHE 0x00000008 /* 1 = Cancel bustmaster accesses to soundcache */ - /* NOTE: This should generally never be used. */ -#define HCFG_LOCKTANKCACHE_MASK 0x00000004 /* 1 = Cancel bustmaster accesses to tankcache */ - /* NOTE: This should generally never be used. */ -#define HCFG_LOCKTANKCACHE 0x01020014 -#define HCFG_MUTEBUTTONENABLE 0x00000002 /* 1 = Master mute button sets AUDIOENABLE = 0. */ - /* NOTE: This is a 'cheap' way to implement a */ - /* master mute function on the mute button, and */ - /* in general should not be used unless a more */ - /* sophisticated master mute function has not */ - /* been written. */ -#define HCFG_AUDIOENABLE 0x00000001 /* 0 = CODECs transmit zero-valued samples */ - /* Should be set to 1 when the EMU10K1 is */ - /* completely initialized. */ - -//For Audigy, MPU port move to 0x70-0x74 ptr register - -#define MUDATA 0x18 /* MPU401 data register (8 bits) */ - -#define MUCMD 0x19 /* MPU401 command register (8 bits) */ -#define MUCMD_RESET 0xff /* RESET command */ -#define MUCMD_ENTERUARTMODE 0x3f /* Enter_UART_mode command */ - /* NOTE: All other commands are ignored */ - -#define MUSTAT MUCMD /* MPU401 status register (8 bits) */ -#define MUSTAT_IRDYN 0x80 /* 0 = MIDI data or command ACK */ -#define MUSTAT_ORDYN 0x40 /* 0 = MUDATA can accept a command or data */ - -#define A_IOCFG 0x18 /* GPIO on Audigy card (16bits) */ -#define A_GPINPUT_MASK 0xff00 -#define A_GPOUTPUT_MASK 0x00ff - -// Audigy output/GPIO stuff taken from the kX drivers -#define A_IOCFG_GPOUT0 0x0044 /* analog/digital */ -#define A_IOCFG_DISABLE_ANALOG 0x0040 /* = 'enable' for Audigy2 (chiprev=4) */ -#define A_IOCFG_ENABLE_DIGITAL 0x0004 -#define A_IOCFG_ENABLE_DIGITAL_AUDIGY4 0x0080 -#define A_IOCFG_UNKNOWN_20 0x0020 -#define A_IOCFG_DISABLE_AC97_FRONT 0x0080 /* turn off ac97 front -> front (10k2.1) */ -#define A_IOCFG_GPOUT1 0x0002 /* IR? drive's internal bypass (?) */ -#define A_IOCFG_GPOUT2 0x0001 /* IR */ -#define A_IOCFG_MULTIPURPOSE_JACK 0x2000 /* center+lfe+rear_center (a2/a2ex) */ - /* + digital for generic 10k2 */ -#define A_IOCFG_DIGITAL_JACK 0x1000 /* digital for a2 platinum */ -#define A_IOCFG_FRONT_JACK 0x4000 -#define A_IOCFG_REAR_JACK 0x8000 -#define A_IOCFG_PHONES_JACK 0x0100 /* LiveDrive */ - -/* outputs: - * for audigy2 platinum: 0xa00 - * for a2 platinum ex: 0x1c00 - * for a1 platinum: 0x0 - */ - -#define TIMER 0x1a /* Timer terminal count register */ - /* NOTE: After the rate is changed, a maximum */ - /* of 1024 sample periods should be allowed */ - /* before the new rate is guaranteed accurate. */ -#define TIMER_RATE_MASK 0x000003ff /* Timer interrupt rate in sample periods */ - /* 0 == 1024 periods, [1..4] are not useful */ -#define TIMER_RATE 0x0a00001a - -#define AC97DATA 0x1c /* AC97 register set data register (16 bit) */ - -#define AC97ADDRESS 0x1e /* AC97 register set address register (8 bit) */ -#define AC97ADDRESS_READY 0x80 /* Read-only bit, reflects CODEC READY signal */ -#define AC97ADDRESS_ADDRESS 0x7f /* Address of indexed AC97 register */ - -/* Available on the Audigy 2 and Audigy 4 only. This is the P16V chip. */ -#define PTR2 0x20 /* Indexed register set pointer register */ -#define DATA2 0x24 /* Indexed register set data register */ -#define IPR2 0x28 /* P16V interrupt pending register */ -#define IPR2_PLAYBACK_CH_0_LOOP 0x00001000 /* Playback Channel 0 loop */ -#define IPR2_PLAYBACK_CH_0_HALF_LOOP 0x00000100 /* Playback Channel 0 half loop */ -#define IPR2_CAPTURE_CH_0_LOOP 0x00100000 /* Capture Channel 0 loop */ -#define IPR2_CAPTURE_CH_0_HALF_LOOP 0x00010000 /* Capture Channel 0 half loop */ - /* 0x00000100 Playback. Only in once per period. - * 0x00110000 Capture. Int on half buffer. - */ -#define INTE2 0x2c /* P16V Interrupt enable register. */ -#define INTE2_PLAYBACK_CH_0_LOOP 0x00001000 /* Playback Channel 0 loop */ -#define INTE2_PLAYBACK_CH_0_HALF_LOOP 0x00000100 /* Playback Channel 0 half loop */ -#define INTE2_PLAYBACK_CH_1_LOOP 0x00002000 /* Playback Channel 1 loop */ -#define INTE2_PLAYBACK_CH_1_HALF_LOOP 0x00000200 /* Playback Channel 1 half loop */ -#define INTE2_PLAYBACK_CH_2_LOOP 0x00004000 /* Playback Channel 2 loop */ -#define INTE2_PLAYBACK_CH_2_HALF_LOOP 0x00000400 /* Playback Channel 2 half loop */ -#define INTE2_PLAYBACK_CH_3_LOOP 0x00008000 /* Playback Channel 3 loop */ -#define INTE2_PLAYBACK_CH_3_HALF_LOOP 0x00000800 /* Playback Channel 3 half loop */ -#define INTE2_CAPTURE_CH_0_LOOP 0x00100000 /* Capture Channel 0 loop */ -#define INTE2_CAPTURE_CH_0_HALF_LOOP 0x00010000 /* Caputre Channel 0 half loop */ -#define HCFG2 0x34 /* Defaults: 0, win2000 sets it to 00004201 */ - /* 0x00000000 2-channel output. */ - /* 0x00000200 8-channel output. */ - /* 0x00000004 pauses stream/irq fail. */ - /* Rest of bits no nothing to sound output */ - /* bit 0: Enable P16V audio. - * bit 1: Lock P16V record memory cache. - * bit 2: Lock P16V playback memory cache. - * bit 3: Dummy record insert zero samples. - * bit 8: Record 8-channel in phase. - * bit 9: Playback 8-channel in phase. - * bit 11-12: Playback mixer attenuation: 0=0dB, 1=-6dB, 2=-12dB, 3=Mute. - * bit 13: Playback mixer enable. - * bit 14: Route SRC48 mixer output to fx engine. - * bit 15: Enable IEEE 1394 chip. - */ -#define IPR3 0x38 /* Cdif interrupt pending register */ -#define INTE3 0x3c /* Cdif interrupt enable register. */ -/************************************************************************************************/ -/* PCI function 1 registers, address = + PCIBASE1 */ -/************************************************************************************************/ - -#define JOYSTICK1 0x00 /* Analog joystick port register */ -#define JOYSTICK2 0x01 /* Analog joystick port register */ -#define JOYSTICK3 0x02 /* Analog joystick port register */ -#define JOYSTICK4 0x03 /* Analog joystick port register */ -#define JOYSTICK5 0x04 /* Analog joystick port register */ -#define JOYSTICK6 0x05 /* Analog joystick port register */ -#define JOYSTICK7 0x06 /* Analog joystick port register */ -#define JOYSTICK8 0x07 /* Analog joystick port register */ - -/* When writing, any write causes JOYSTICK_COMPARATOR output enable to be pulsed on write. */ -/* When reading, use these bitfields: */ -#define JOYSTICK_BUTTONS 0x0f /* Joystick button data */ -#define JOYSTICK_COMPARATOR 0xf0 /* Joystick comparator data */ - - -/********************************************************************************************************/ -/* Emu10k1 pointer-offset register set, accessed through the PTR and DATA registers */ -/********************************************************************************************************/ - -#define CPF 0x00 /* Current pitch and fraction register */ -#define CPF_CURRENTPITCH_MASK 0xffff0000 /* Current pitch (linear, 0x4000 == unity pitch shift) */ -#define CPF_CURRENTPITCH 0x10100000 -#define CPF_STEREO_MASK 0x00008000 /* 1 = Even channel interleave, odd channel locked */ -#define CPF_STOP_MASK 0x00004000 /* 1 = Current pitch forced to 0 */ -#define CPF_FRACADDRESS_MASK 0x00003fff /* Linear fractional address of the current channel */ - -#define PTRX 0x01 /* Pitch target and send A/B amounts register */ -#define PTRX_PITCHTARGET_MASK 0xffff0000 /* Pitch target of specified channel */ -#define PTRX_PITCHTARGET 0x10100001 -#define PTRX_FXSENDAMOUNT_A_MASK 0x0000ff00 /* Linear level of channel output sent to FX send bus A */ -#define PTRX_FXSENDAMOUNT_A 0x08080001 -#define PTRX_FXSENDAMOUNT_B_MASK 0x000000ff /* Linear level of channel output sent to FX send bus B */ -#define PTRX_FXSENDAMOUNT_B 0x08000001 - -#define CVCF 0x02 /* Current volume and filter cutoff register */ -#define CVCF_CURRENTVOL_MASK 0xffff0000 /* Current linear volume of specified channel */ -#define CVCF_CURRENTVOL 0x10100002 -#define CVCF_CURRENTFILTER_MASK 0x0000ffff /* Current filter cutoff frequency of specified channel */ -#define CVCF_CURRENTFILTER 0x10000002 - -#define VTFT 0x03 /* Volume target and filter cutoff target register */ -#define VTFT_VOLUMETARGET_MASK 0xffff0000 /* Volume target of specified channel */ -#define VTFT_VOLUMETARGET 0x10100003 -#define VTFT_FILTERTARGET_MASK 0x0000ffff /* Filter cutoff target of specified channel */ -#define VTFT_FILTERTARGET 0x10000003 - -#define Z1 0x05 /* Filter delay memory 1 register */ - -#define Z2 0x04 /* Filter delay memory 2 register */ - -#define PSST 0x06 /* Send C amount and loop start address register */ -#define PSST_FXSENDAMOUNT_C_MASK 0xff000000 /* Linear level of channel output sent to FX send bus C */ - -#define PSST_FXSENDAMOUNT_C 0x08180006 - -#define PSST_LOOPSTARTADDR_MASK 0x00ffffff /* Loop start address of the specified channel */ -#define PSST_LOOPSTARTADDR 0x18000006 - -#define DSL 0x07 /* Send D amount and loop start address register */ -#define DSL_FXSENDAMOUNT_D_MASK 0xff000000 /* Linear level of channel output sent to FX send bus D */ - -#define DSL_FXSENDAMOUNT_D 0x08180007 - -#define DSL_LOOPENDADDR_MASK 0x00ffffff /* Loop end address of the specified channel */ -#define DSL_LOOPENDADDR 0x18000007 - -#define CCCA 0x08 /* Filter Q, interp. ROM, byte size, cur. addr register */ -#define CCCA_RESONANCE 0xf0000000 /* Lowpass filter resonance (Q) height */ -#define CCCA_INTERPROMMASK 0x0e000000 /* Selects passband of interpolation ROM */ - /* 1 == full band, 7 == lowpass */ - /* ROM 0 is used when pitch shifting downward or less */ - /* then 3 semitones upward. Increasingly higher ROM */ - /* numbers are used, typically in steps of 3 semitones, */ - /* as upward pitch shifting is performed. */ -#define CCCA_INTERPROM_0 0x00000000 /* Select interpolation ROM 0 */ -#define CCCA_INTERPROM_1 0x02000000 /* Select interpolation ROM 1 */ -#define CCCA_INTERPROM_2 0x04000000 /* Select interpolation ROM 2 */ -#define CCCA_INTERPROM_3 0x06000000 /* Select interpolation ROM 3 */ -#define CCCA_INTERPROM_4 0x08000000 /* Select interpolation ROM 4 */ -#define CCCA_INTERPROM_5 0x0a000000 /* Select interpolation ROM 5 */ -#define CCCA_INTERPROM_6 0x0c000000 /* Select interpolation ROM 6 */ -#define CCCA_INTERPROM_7 0x0e000000 /* Select interpolation ROM 7 */ -#define CCCA_8BITSELECT 0x01000000 /* 1 = Sound memory for this channel uses 8-bit samples */ -#define CCCA_CURRADDR_MASK 0x00ffffff /* Current address of the selected channel */ -#define CCCA_CURRADDR 0x18000008 - -#define CCR 0x09 /* Cache control register */ -#define CCR_CACHEINVALIDSIZE 0x07190009 -#define CCR_CACHEINVALIDSIZE_MASK 0xfe000000 /* Number of invalid samples cache for this channel */ -#define CCR_CACHELOOPFLAG 0x01000000 /* 1 = Cache has a loop service pending */ -#define CCR_INTERLEAVEDSAMPLES 0x00800000 /* 1 = A cache service will fetch interleaved samples */ -#define CCR_WORDSIZEDSAMPLES 0x00400000 /* 1 = A cache service will fetch word sized samples */ -#define CCR_READADDRESS 0x06100009 -#define CCR_READADDRESS_MASK 0x003f0000 /* Location of cache just beyond current cache service */ -#define CCR_LOOPINVALSIZE 0x0000fe00 /* Number of invalid samples in cache prior to loop */ - /* NOTE: This is valid only if CACHELOOPFLAG is set */ -#define CCR_LOOPFLAG 0x00000100 /* Set for a single sample period when a loop occurs */ -#define CCR_CACHELOOPADDRHI 0x000000ff /* DSL_LOOPSTARTADDR's hi byte if CACHELOOPFLAG is set */ - -#define CLP 0x0a /* Cache loop register (valid if CCR_CACHELOOPFLAG = 1) */ - /* NOTE: This register is normally not used */ -#define CLP_CACHELOOPADDR 0x0000ffff /* Cache loop address (DSL_LOOPSTARTADDR [0..15]) */ - -#define FXRT 0x0b /* Effects send routing register */ - /* NOTE: It is illegal to assign the same routing to */ - /* two effects sends. */ -#define FXRT_CHANNELA 0x000f0000 /* Effects send bus number for channel's effects send A */ -#define FXRT_CHANNELB 0x00f00000 /* Effects send bus number for channel's effects send B */ -#define FXRT_CHANNELC 0x0f000000 /* Effects send bus number for channel's effects send C */ -#define FXRT_CHANNELD 0xf0000000 /* Effects send bus number for channel's effects send D */ - -#define MAPA 0x0c /* Cache map A */ - -#define MAPB 0x0d /* Cache map B */ - -#define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */ -#define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ - -#define ENVVOL 0x10 /* Volume envelope register */ -#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ - /* 0x8000-n == 666*n usec delay */ - -#define ATKHLDV 0x11 /* Volume envelope hold and attack register */ -#define ATKHLDV_PHASE0 0x00008000 /* 0 = Begin attack phase */ -#define ATKHLDV_HOLDTIME_MASK 0x00007f00 /* Envelope hold time (127-n == n*88.2msec) */ -#define ATKHLDV_ATTACKTIME_MASK 0x0000007f /* Envelope attack time, log encoded */ - /* 0 = infinite, 1 = 10.9msec, ... 0x7f = 5.5msec */ - -#define DCYSUSV 0x12 /* Volume envelope sustain and decay register */ -#define DCYSUSV_PHASE1_MASK 0x00008000 /* 0 = Begin attack phase, 1 = begin release phase */ -#define DCYSUSV_SUSTAINLEVEL_MASK 0x00007f00 /* 127 = full, 0 = off, 0.75dB increments */ -#define DCYSUSV_CHANNELENABLE_MASK 0x00000080 /* 1 = Inhibit envelope engine from writing values in */ - /* this channel and from writing to pitch, filter and */ - /* volume targets. */ -#define DCYSUSV_DECAYTIME_MASK 0x0000007f /* Volume envelope decay time, log encoded */ - /* 0 = 43.7msec, 1 = 21.8msec, 0x7f = 22msec */ - -#define LFOVAL1 0x13 /* Modulation LFO value */ -#define LFOVAL_MASK 0x0000ffff /* Current value of modulation LFO state variable */ - /* 0x8000-n == 666*n usec delay */ - -#define ENVVAL 0x14 /* Modulation envelope register */ -#define ENVVAL_MASK 0x0000ffff /* Current value of modulation envelope state variable */ - /* 0x8000-n == 666*n usec delay */ - -#define ATKHLDM 0x15 /* Modulation envelope hold and attack register */ -#define ATKHLDM_PHASE0 0x00008000 /* 0 = Begin attack phase */ -#define ATKHLDM_HOLDTIME 0x00007f00 /* Envelope hold time (127-n == n*42msec) */ -#define ATKHLDM_ATTACKTIME 0x0000007f /* Envelope attack time, log encoded */ - /* 0 = infinite, 1 = 11msec, ... 0x7f = 5.5msec */ - -#define DCYSUSM 0x16 /* Modulation envelope decay and sustain register */ -#define DCYSUSM_PHASE1_MASK 0x00008000 /* 0 = Begin attack phase, 1 = begin release phase */ -#define DCYSUSM_SUSTAINLEVEL_MASK 0x00007f00 /* 127 = full, 0 = off, 0.75dB increments */ -#define DCYSUSM_DECAYTIME_MASK 0x0000007f /* Envelope decay time, log encoded */ - /* 0 = 43.7msec, 1 = 21.8msec, 0x7f = 22msec */ - -#define LFOVAL2 0x17 /* Vibrato LFO register */ -#define LFOVAL2_MASK 0x0000ffff /* Current value of vibrato LFO state variable */ - /* 0x8000-n == 666*n usec delay */ - -#define IP 0x18 /* Initial pitch register */ -#define IP_MASK 0x0000ffff /* Exponential initial pitch shift */ - /* 4 bits of octave, 12 bits of fractional octave */ -#define IP_UNITY 0x0000e000 /* Unity pitch shift */ - -#define IFATN 0x19 /* Initial filter cutoff and attenuation register */ -#define IFATN_FILTERCUTOFF_MASK 0x0000ff00 /* Initial filter cutoff frequency in exponential units */ - /* 6 most significant bits are semitones */ - /* 2 least significant bits are fractions */ -#define IFATN_FILTERCUTOFF 0x08080019 -#define IFATN_ATTENUATION_MASK 0x000000ff /* Initial attenuation in 0.375dB steps */ -#define IFATN_ATTENUATION 0x08000019 - - -#define PEFE 0x1a /* Pitch envelope and filter envelope amount register */ -#define PEFE_PITCHAMOUNT_MASK 0x0000ff00 /* Pitch envlope amount */ - /* Signed 2's complement, +/- one octave peak extremes */ -#define PEFE_PITCHAMOUNT 0x0808001a -#define PEFE_FILTERAMOUNT_MASK 0x000000ff /* Filter envlope amount */ - /* Signed 2's complement, +/- six octaves peak extremes */ -#define PEFE_FILTERAMOUNT 0x0800001a -#define FMMOD 0x1b /* Vibrato/filter modulation from LFO register */ -#define FMMOD_MODVIBRATO 0x0000ff00 /* Vibrato LFO modulation depth */ - /* Signed 2's complement, +/- one octave extremes */ -#define FMMOD_MOFILTER 0x000000ff /* Filter LFO modulation depth */ - /* Signed 2's complement, +/- three octave extremes */ - - -#define TREMFRQ 0x1c /* Tremolo amount and modulation LFO frequency register */ -#define TREMFRQ_DEPTH 0x0000ff00 /* Tremolo depth */ - /* Signed 2's complement, with +/- 12dB extremes */ - -#define TREMFRQ_FREQUENCY 0x000000ff /* Tremolo LFO frequency */ - /* ??Hz steps, maximum of ?? Hz. */ -#define FM2FRQ2 0x1d /* Vibrato amount and vibrato LFO frequency register */ -#define FM2FRQ2_DEPTH 0x0000ff00 /* Vibrato LFO vibrato depth */ - /* Signed 2's complement, +/- one octave extremes */ -#define FM2FRQ2_FREQUENCY 0x000000ff /* Vibrato LFO frequency */ - /* 0.039Hz steps, maximum of 9.85 Hz. */ - -#define TEMPENV 0x1e /* Tempory envelope register */ -#define TEMPENV_MASK 0x0000ffff /* 16-bit value */ - /* NOTE: All channels contain internal variables; do */ - /* not write to these locations. */ - -/* 1f something */ - -#define CD0 0x20 /* Cache data 0 register */ -#define CD1 0x21 /* Cache data 1 register */ -#define CD2 0x22 /* Cache data 2 register */ -#define CD3 0x23 /* Cache data 3 register */ -#define CD4 0x24 /* Cache data 4 register */ -#define CD5 0x25 /* Cache data 5 register */ -#define CD6 0x26 /* Cache data 6 register */ -#define CD7 0x27 /* Cache data 7 register */ -#define CD8 0x28 /* Cache data 8 register */ -#define CD9 0x29 /* Cache data 9 register */ -#define CDA 0x2a /* Cache data A register */ -#define CDB 0x2b /* Cache data B register */ -#define CDC 0x2c /* Cache data C register */ -#define CDD 0x2d /* Cache data D register */ -#define CDE 0x2e /* Cache data E register */ -#define CDF 0x2f /* Cache data F register */ - -/* 0x30-3f seem to be the same as 0x20-2f */ - -#define PTB 0x40 /* Page table base register */ -#define PTB_MASK 0xfffff000 /* Physical address of the page table in host memory */ - -#define TCB 0x41 /* Tank cache base register */ -#define TCB_MASK 0xfffff000 /* Physical address of the bottom of host based TRAM */ - -#define ADCCR 0x42 /* ADC sample rate/stereo control register */ -#define ADCCR_RCHANENABLE 0x00000010 /* Enables right channel for writing to the host */ -#define ADCCR_LCHANENABLE 0x00000008 /* Enables left channel for writing to the host */ - /* NOTE: To guarantee phase coherency, both channels */ - /* must be disabled prior to enabling both channels. */ -#define A_ADCCR_RCHANENABLE 0x00000020 -#define A_ADCCR_LCHANENABLE 0x00000010 - -#define A_ADCCR_SAMPLERATE_MASK 0x0000000F /* Audigy sample rate convertor output rate */ -#define ADCCR_SAMPLERATE_MASK 0x00000007 /* Sample rate convertor output rate */ -#define ADCCR_SAMPLERATE_48 0x00000000 /* 48kHz sample rate */ -#define ADCCR_SAMPLERATE_44 0x00000001 /* 44.1kHz sample rate */ -#define ADCCR_SAMPLERATE_32 0x00000002 /* 32kHz sample rate */ -#define ADCCR_SAMPLERATE_24 0x00000003 /* 24kHz sample rate */ -#define ADCCR_SAMPLERATE_22 0x00000004 /* 22.05kHz sample rate */ -#define ADCCR_SAMPLERATE_16 0x00000005 /* 16kHz sample rate */ -#define ADCCR_SAMPLERATE_11 0x00000006 /* 11.025kHz sample rate */ -#define ADCCR_SAMPLERATE_8 0x00000007 /* 8kHz sample rate */ -#define A_ADCCR_SAMPLERATE_12 0x00000006 /* 12kHz sample rate */ -#define A_ADCCR_SAMPLERATE_11 0x00000007 /* 11.025kHz sample rate */ -#define A_ADCCR_SAMPLERATE_8 0x00000008 /* 8kHz sample rate */ - -#define FXWC 0x43 /* FX output write channels register */ - /* When set, each bit enables the writing of the */ - /* corresponding FX output channel (internal registers */ - /* 0x20-0x3f) to host memory. This mode of recording */ - /* is 16bit, 48KHz only. All 32 channels can be enabled */ - /* simultaneously. */ - -#define FXWC_DEFAULTROUTE_C (1<<0) /* left emu out? */ -#define FXWC_DEFAULTROUTE_B (1<<1) /* right emu out? */ -#define FXWC_DEFAULTROUTE_A (1<<12) -#define FXWC_DEFAULTROUTE_D (1<<13) -#define FXWC_ADCLEFT (1<<18) -#define FXWC_CDROMSPDIFLEFT (1<<18) -#define FXWC_ADCRIGHT (1<<19) -#define FXWC_CDROMSPDIFRIGHT (1<<19) -#define FXWC_MIC (1<<20) -#define FXWC_ZOOMLEFT (1<<20) -#define FXWC_ZOOMRIGHT (1<<21) -#define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */ -#define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */ - -#define TCBS 0x44 /* Tank cache buffer size register */ -#define TCBS_MASK 0x00000007 /* Tank cache buffer size field */ -#define TCBS_BUFFSIZE_16K 0x00000000 -#define TCBS_BUFFSIZE_32K 0x00000001 -#define TCBS_BUFFSIZE_64K 0x00000002 -#define TCBS_BUFFSIZE_128K 0x00000003 -#define TCBS_BUFFSIZE_256K 0x00000004 -#define TCBS_BUFFSIZE_512K 0x00000005 -#define TCBS_BUFFSIZE_1024K 0x00000006 -#define TCBS_BUFFSIZE_2048K 0x00000007 - -#define MICBA 0x45 /* AC97 microphone buffer address register */ -#define MICBA_MASK 0xfffff000 /* 20 bit base address */ - -#define ADCBA 0x46 /* ADC buffer address register */ -#define ADCBA_MASK 0xfffff000 /* 20 bit base address */ - -#define FXBA 0x47 /* FX Buffer Address */ -#define FXBA_MASK 0xfffff000 /* 20 bit base address */ - -/* 0x48 something - word access, defaults to 3f */ - -#define MICBS 0x49 /* Microphone buffer size register */ - -#define ADCBS 0x4a /* ADC buffer size register */ - -#define FXBS 0x4b /* FX buffer size register */ - -/* register: 0x4c..4f: ffff-ffff current amounts, per-channel */ - -/* The following mask values define the size of the ADC, MIX and FX buffers in bytes */ -#define ADCBS_BUFSIZE_NONE 0x00000000 -#define ADCBS_BUFSIZE_384 0x00000001 -#define ADCBS_BUFSIZE_448 0x00000002 -#define ADCBS_BUFSIZE_512 0x00000003 -#define ADCBS_BUFSIZE_640 0x00000004 -#define ADCBS_BUFSIZE_768 0x00000005 -#define ADCBS_BUFSIZE_896 0x00000006 -#define ADCBS_BUFSIZE_1024 0x00000007 -#define ADCBS_BUFSIZE_1280 0x00000008 -#define ADCBS_BUFSIZE_1536 0x00000009 -#define ADCBS_BUFSIZE_1792 0x0000000a -#define ADCBS_BUFSIZE_2048 0x0000000b -#define ADCBS_BUFSIZE_2560 0x0000000c -#define ADCBS_BUFSIZE_3072 0x0000000d -#define ADCBS_BUFSIZE_3584 0x0000000e -#define ADCBS_BUFSIZE_4096 0x0000000f -#define ADCBS_BUFSIZE_5120 0x00000010 -#define ADCBS_BUFSIZE_6144 0x00000011 -#define ADCBS_BUFSIZE_7168 0x00000012 -#define ADCBS_BUFSIZE_8192 0x00000013 -#define ADCBS_BUFSIZE_10240 0x00000014 -#define ADCBS_BUFSIZE_12288 0x00000015 -#define ADCBS_BUFSIZE_14366 0x00000016 -#define ADCBS_BUFSIZE_16384 0x00000017 -#define ADCBS_BUFSIZE_20480 0x00000018 -#define ADCBS_BUFSIZE_24576 0x00000019 -#define ADCBS_BUFSIZE_28672 0x0000001a -#define ADCBS_BUFSIZE_32768 0x0000001b -#define ADCBS_BUFSIZE_40960 0x0000001c -#define ADCBS_BUFSIZE_49152 0x0000001d -#define ADCBS_BUFSIZE_57344 0x0000001e -#define ADCBS_BUFSIZE_65536 0x0000001f - - -#define CDCS 0x50 /* CD-ROM digital channel status register */ - -#define GPSCS 0x51 /* General Purpose SPDIF channel status register*/ - -#define DBG 0x52 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ - -#define REG53 0x53 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ - -#define A_DBG 0x53 -#define A_DBG_SINGLE_STEP 0x00020000 /* Set to zero to start dsp */ -#define A_DBG_ZC 0x40000000 /* zero tram counter */ -#define A_DBG_STEP_ADDR 0x000003ff -#define A_DBG_SATURATION_OCCURED 0x20000000 -#define A_DBG_SATURATION_ADDR 0x0ffc0000 - -// NOTE: 0x54,55,56: 64-bit -#define SPCS0 0x54 /* SPDIF output Channel Status 0 register */ - -#define SPCS1 0x55 /* SPDIF output Channel Status 1 register */ - -#define SPCS2 0x56 /* SPDIF output Channel Status 2 register */ - -#define SPCS_CLKACCYMASK 0x30000000 /* Clock accuracy */ -#define SPCS_CLKACCY_1000PPM 0x00000000 /* 1000 parts per million */ -#define SPCS_CLKACCY_50PPM 0x10000000 /* 50 parts per million */ -#define SPCS_CLKACCY_VARIABLE 0x20000000 /* Variable accuracy */ -#define SPCS_SAMPLERATEMASK 0x0f000000 /* Sample rate */ -#define SPCS_SAMPLERATE_44 0x00000000 /* 44.1kHz sample rate */ -#define SPCS_SAMPLERATE_48 0x02000000 /* 48kHz sample rate */ -#define SPCS_SAMPLERATE_32 0x03000000 /* 32kHz sample rate */ -#define SPCS_CHANNELNUMMASK 0x00f00000 /* Channel number */ -#define SPCS_CHANNELNUM_UNSPEC 0x00000000 /* Unspecified channel number */ -#define SPCS_CHANNELNUM_LEFT 0x00100000 /* Left channel */ -#define SPCS_CHANNELNUM_RIGHT 0x00200000 /* Right channel */ -#define SPCS_SOURCENUMMASK 0x000f0000 /* Source number */ -#define SPCS_SOURCENUM_UNSPEC 0x00000000 /* Unspecified source number */ -#define SPCS_GENERATIONSTATUS 0x00008000 /* Originality flag (see IEC-958 spec) */ -#define SPCS_CATEGORYCODEMASK 0x00007f00 /* Category code (see IEC-958 spec) */ -#define SPCS_MODEMASK 0x000000c0 /* Mode (see IEC-958 spec) */ -#define SPCS_EMPHASISMASK 0x00000038 /* Emphasis */ -#define SPCS_EMPHASIS_NONE 0x00000000 /* No emphasis */ -#define SPCS_EMPHASIS_50_15 0x00000008 /* 50/15 usec 2 channel */ -#define SPCS_COPYRIGHT 0x00000004 /* Copyright asserted flag -- do not modify */ -#define SPCS_NOTAUDIODATA 0x00000002 /* 0 = Digital audio, 1 = not audio */ -#define SPCS_PROFESSIONAL 0x00000001 /* 0 = Consumer (IEC-958), 1 = pro (AES3-1992) */ - -/* The 32-bit CLIx and SOLx registers all have one bit per channel control/status */ -#define CLIEL 0x58 /* Channel loop interrupt enable low register */ - -#define CLIEH 0x59 /* Channel loop interrupt enable high register */ - -#define CLIPL 0x5a /* Channel loop interrupt pending low register */ - -#define CLIPH 0x5b /* Channel loop interrupt pending high register */ - -#define SOLEL 0x5c /* Stop on loop enable low register */ - -#define SOLEH 0x5d /* Stop on loop enable high register */ - -#define SPBYPASS 0x5e /* SPDIF BYPASS mode register */ -#define SPBYPASS_SPDIF0_MASK 0x00000003 /* SPDIF 0 bypass mode */ -#define SPBYPASS_SPDIF1_MASK 0x0000000c /* SPDIF 1 bypass mode */ -/* bypass mode: 0 - DSP; 1 - SPDIF A, 2 - SPDIF B, 3 - SPDIF C */ -#define SPBYPASS_FORMAT 0x00000f00 /* If 1, SPDIF XX uses 24 bit, if 0 - 20 bit */ - -#define AC97SLOT 0x5f /* additional AC97 slots enable bits */ -#define AC97SLOT_REAR_RIGHT 0x01 /* Rear left */ -#define AC97SLOT_REAR_LEFT 0x02 /* Rear right */ -#define AC97SLOT_CNTR 0x10 /* Center enable */ -#define AC97SLOT_LFE 0x20 /* LFE enable */ - -// NOTE: 0x60,61,62: 64-bit -#define CDSRCS 0x60 /* CD-ROM Sample Rate Converter status register */ - -#define GPSRCS 0x61 /* General Purpose SPDIF sample rate cvt status */ - -#define ZVSRCS 0x62 /* ZVideo sample rate converter status */ - /* NOTE: This one has no SPDIFLOCKED field */ - /* Assumes sample lock */ - -/* These three bitfields apply to CDSRCS, GPSRCS, and (except as noted) ZVSRCS. */ -#define SRCS_SPDIFVALID 0x04000000 /* SPDIF stream valid */ -#define SRCS_SPDIFLOCKED 0x02000000 /* SPDIF stream locked */ -#define SRCS_RATELOCKED 0x01000000 /* Sample rate locked */ -#define SRCS_ESTSAMPLERATE 0x0007ffff /* Do not modify this field. */ - -/* Note that these values can vary +/- by a small amount */ -#define SRCS_SPDIFRATE_44 0x0003acd9 -#define SRCS_SPDIFRATE_48 0x00040000 -#define SRCS_SPDIFRATE_96 0x00080000 - -#define MICIDX 0x63 /* Microphone recording buffer index register */ -#define MICIDX_MASK 0x0000ffff /* 16-bit value */ -#define MICIDX_IDX 0x10000063 - -#define ADCIDX 0x64 /* ADC recording buffer index register */ -#define ADCIDX_MASK 0x0000ffff /* 16 bit index field */ -#define ADCIDX_IDX 0x10000064 - -#define A_ADCIDX 0x63 -#define A_ADCIDX_IDX 0x10000063 - -#define A_MICIDX 0x64 -#define A_MICIDX_IDX 0x10000064 - -#define FXIDX 0x65 /* FX recording buffer index register */ -#define FXIDX_MASK 0x0000ffff /* 16-bit value */ -#define FXIDX_IDX 0x10000065 - -/* The 32-bit HLIx and HLIPx registers all have one bit per channel control/status */ -#define HLIEL 0x66 /* Channel half loop interrupt enable low register */ - -#define HLIEH 0x67 /* Channel half loop interrupt enable high register */ - -#define HLIPL 0x68 /* Channel half loop interrupt pending low register */ - -#define HLIPH 0x69 /* Channel half loop interrupt pending high register */ - -// 0x6a,6b,6c used for some recording -// 0x6d unused -// 0x6e,6f - tanktable base / offset - -/* This is the MPU port on the card (via the game port) */ -#define A_MUDATA1 0x70 -#define A_MUCMD1 0x71 -#define A_MUSTAT1 A_MUCMD1 - -/* This is the MPU port on the Audigy Drive */ -#define A_MUDATA2 0x72 -#define A_MUCMD2 0x73 -#define A_MUSTAT2 A_MUCMD2 - -/* The next two are the Audigy equivalent of FXWC */ -/* the Audigy can record any output (16bit, 48kHz, up to 64 channel simultaneously) */ -/* Each bit selects a channel for recording */ -#define A_FXWC1 0x74 /* Selects 0x7f-0x60 for FX recording */ -#define A_FXWC2 0x75 /* Selects 0x9f-0x80 for FX recording */ - -#define A_SPDIF_SAMPLERATE 0x76 /* Set the sample rate of SPDIF output */ -#define A_SAMPLE_RATE 0x76 /* Various sample rate settings. */ -#define A_SAMPLE_RATE_NOT_USED 0x0ffc111e /* Bits that are not used and cannot be set. */ -#define A_SAMPLE_RATE_UNKNOWN 0xf0030001 /* Bits that can be set, but have unknown use. */ -#define A_SPDIF_RATE_MASK 0x000000e0 /* Any other values for rates, just use 48000 */ -#define A_SPDIF_48000 0x00000000 -#define A_SPDIF_192000 0x00000020 -#define A_SPDIF_96000 0x00000040 -#define A_SPDIF_44100 0x00000080 - -#define A_I2S_CAPTURE_RATE_MASK 0x00000e00 /* This sets the capture PCM rate, but it is */ -#define A_I2S_CAPTURE_48000 0x00000000 /* unclear if this sets the ADC rate as well. */ -#define A_I2S_CAPTURE_192000 0x00000200 -#define A_I2S_CAPTURE_96000 0x00000400 -#define A_I2S_CAPTURE_44100 0x00000800 - -#define A_PCM_RATE_MASK 0x0000e000 /* This sets the playback PCM rate on the P16V */ -#define A_PCM_48000 0x00000000 -#define A_PCM_192000 0x00002000 -#define A_PCM_96000 0x00004000 -#define A_PCM_44100 0x00008000 - -/* 0x77,0x78,0x79 "something i2s-related" - default to 0x01080000 on my audigy 2 ZS --rlrevell */ -/* 0x7a, 0x7b - lookup tables */ - -#define A_FXRT2 0x7c -#define A_FXRT_CHANNELE 0x0000003f /* Effects send bus number for channel's effects send E */ -#define A_FXRT_CHANNELF 0x00003f00 /* Effects send bus number for channel's effects send F */ -#define A_FXRT_CHANNELG 0x003f0000 /* Effects send bus number for channel's effects send G */ -#define A_FXRT_CHANNELH 0x3f000000 /* Effects send bus number for channel's effects send H */ - -#define A_SENDAMOUNTS 0x7d -#define A_FXSENDAMOUNT_E_MASK 0xFF000000 -#define A_FXSENDAMOUNT_F_MASK 0x00FF0000 -#define A_FXSENDAMOUNT_G_MASK 0x0000FF00 -#define A_FXSENDAMOUNT_H_MASK 0x000000FF -/* 0x7c, 0x7e "high bit is used for filtering" */ - -/* The send amounts for this one are the same as used with the emu10k1 */ -#define A_FXRT1 0x7e -#define A_FXRT_CHANNELA 0x0000003f -#define A_FXRT_CHANNELB 0x00003f00 -#define A_FXRT_CHANNELC 0x003f0000 -#define A_FXRT_CHANNELD 0x3f000000 - - -/* Each FX general purpose register is 32 bits in length, all bits are used */ -#define FXGPREGBASE 0x100 /* FX general purpose registers base */ -#define A_FXGPREGBASE 0x400 /* Audigy GPRs, 0x400 to 0x5ff */ - -#define A_TANKMEMCTLREGBASE 0x100 /* Tank memory control registers base - only for Audigy */ -#define A_TANKMEMCTLREG_MASK 0x1f /* only 5 bits used - only for Audigy */ - -/* Tank audio data is logarithmically compressed down to 16 bits before writing to TRAM and is */ -/* decompressed back to 20 bits on a read. There are a total of 160 locations, the last 32 */ -/* locations are for external TRAM. */ -#define TANKMEMDATAREGBASE 0x200 /* Tank memory data registers base */ -#define TANKMEMDATAREG_MASK 0x000fffff /* 20 bit tank audio data field */ - -/* Combined address field and memory opcode or flag field. 160 locations, last 32 are external */ -#define TANKMEMADDRREGBASE 0x300 /* Tank memory address registers base */ -#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */ -#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */ -#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */ -#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */ -#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */ - -#define MICROCODEBASE 0x400 /* Microcode data base address */ - -/* Each DSP microcode instruction is mapped into 2 doublewords */ -/* NOTE: When writing, always write the LO doubleword first. Reads can be in either order. */ -#define LOWORD_OPX_MASK 0x000ffc00 /* Instruction operand X */ -#define LOWORD_OPY_MASK 0x000003ff /* Instruction operand Y */ -#define HIWORD_OPCODE_MASK 0x00f00000 /* Instruction opcode */ -#define HIWORD_RESULT_MASK 0x000ffc00 /* Instruction result */ -#define HIWORD_OPA_MASK 0x000003ff /* Instruction operand A */ - - -/* Audigy Soundcard have a different instruction format */ -#define A_MICROCODEBASE 0x600 -#define A_LOWORD_OPY_MASK 0x000007ff -#define A_LOWORD_OPX_MASK 0x007ff000 -#define A_HIWORD_OPCODE_MASK 0x0f000000 -#define A_HIWORD_RESULT_MASK 0x007ff000 -#define A_HIWORD_OPA_MASK 0x000007ff - - -/* ------------------- STRUCTURES -------------------- */ - -enum { - EMU10K1_EFX, - EMU10K1_PCM, - EMU10K1_SYNTH, - EMU10K1_MIDI -}; - -struct snd_emu10k1; - -struct snd_emu10k1_voice { - struct snd_emu10k1 *emu; - int number; - unsigned int use: 1, - pcm: 1, - efx: 1, - synth: 1, - midi: 1; - void (*interrupt)(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice); - - struct snd_emu10k1_pcm *epcm; -}; - -enum { - PLAYBACK_EMUVOICE, - PLAYBACK_EFX, - CAPTURE_AC97ADC, - CAPTURE_AC97MIC, - CAPTURE_EFX -}; - -struct snd_emu10k1_pcm { - struct snd_emu10k1 *emu; - int type; - struct snd_pcm_substream *substream; - struct snd_emu10k1_voice *voices[NUM_EFX_PLAYBACK]; - struct snd_emu10k1_voice *extra; - unsigned short running; - unsigned short first_ptr; - struct snd_util_memblk *memblk; - unsigned int start_addr; - unsigned int ccca_start_addr; - unsigned int capture_ipr; /* interrupt acknowledge mask */ - unsigned int capture_inte; /* interrupt enable mask */ - unsigned int capture_ba_reg; /* buffer address register */ - unsigned int capture_bs_reg; /* buffer size register */ - unsigned int capture_idx_reg; /* buffer index register */ - unsigned int capture_cr_val; /* control value */ - unsigned int capture_cr_val2; /* control value2 (for audigy) */ - unsigned int capture_bs_val; /* buffer size value */ - unsigned int capture_bufsize; /* buffer size in bytes */ -}; - -struct snd_emu10k1_pcm_mixer { - /* mono, left, right x 8 sends (4 on emu10k1) */ - unsigned char send_routing[3][8]; - unsigned char send_volume[3][8]; - unsigned short attn[3]; - struct snd_emu10k1_pcm *epcm; -}; - -#define snd_emu10k1_compose_send_routing(route) \ -((route[0] | (route[1] << 4) | (route[2] << 8) | (route[3] << 12)) << 16) - -#define snd_emu10k1_compose_audigy_fxrt1(route) \ -((unsigned int)route[0] | ((unsigned int)route[1] << 8) | ((unsigned int)route[2] << 16) | ((unsigned int)route[3] << 24)) - -#define snd_emu10k1_compose_audigy_fxrt2(route) \ -((unsigned int)route[4] | ((unsigned int)route[5] << 8) | ((unsigned int)route[6] << 16) | ((unsigned int)route[7] << 24)) - -struct snd_emu10k1_memblk { - struct snd_util_memblk mem; - /* private part */ - int first_page, last_page, pages, mapped_page; - unsigned int map_locked; - struct list_head mapped_link; - struct list_head mapped_order_link; -}; - -#define snd_emu10k1_memblk_offset(blk) (((blk)->mapped_page << PAGE_SHIFT) | ((blk)->mem.offset & (PAGE_SIZE - 1))) - -#define EMU10K1_MAX_TRAM_BLOCKS_PER_CODE 16 - -struct snd_emu10k1_fx8010_ctl { - struct list_head list; /* list link container */ - unsigned int vcount; - unsigned int count; /* count of GPR (1..16) */ - unsigned short gpr[32]; /* GPR number(s) */ - unsigned int value[32]; - unsigned int min; /* minimum range */ - unsigned int max; /* maximum range */ - unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ - struct snd_kcontrol *kcontrol; -}; - -typedef void (snd_fx8010_irq_handler_t)(struct snd_emu10k1 *emu, void *private_data); - -struct snd_emu10k1_fx8010_irq { - struct snd_emu10k1_fx8010_irq *next; - snd_fx8010_irq_handler_t *handler; - unsigned short gpr_running; - void *private_data; -}; - -struct snd_emu10k1_fx8010_pcm { - unsigned int valid: 1, - opened: 1, - active: 1; - unsigned int channels; /* 16-bit channels count */ - unsigned int tram_start; /* initial ring buffer position in TRAM (in samples) */ - unsigned int buffer_size; /* count of buffered samples */ - unsigned short gpr_size; /* GPR containing size of ring buffer in samples (host) */ - unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */ - unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */ - unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */ - unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */ - unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */ - unsigned char etram[32]; /* external TRAM address & data */ - struct snd_pcm_indirect pcm_rec; - unsigned int tram_pos; - unsigned int tram_shift; - struct snd_emu10k1_fx8010_irq *irq; -}; - -struct snd_emu10k1_fx8010 { - unsigned short fxbus_mask; /* used FX buses (bitmask) */ - unsigned short extin_mask; /* used external inputs (bitmask) */ - unsigned short extout_mask; /* used external outputs (bitmask) */ - unsigned short pad1; - unsigned int itram_size; /* internal TRAM size in samples */ - struct snd_dma_buffer etram_pages; /* external TRAM pages and size */ - unsigned int dbg; /* FX debugger register */ - unsigned char name[128]; - int gpr_size; /* size of allocated GPR controls */ - int gpr_count; /* count of used kcontrols */ - struct list_head gpr_ctl; /* GPR controls */ - struct mutex lock; - struct snd_emu10k1_fx8010_pcm pcm[8]; - spinlock_t irq_lock; - struct snd_emu10k1_fx8010_irq *irq_handlers; -}; - -#define emu10k1_gpr_ctl(n) list_entry(n, struct snd_emu10k1_fx8010_ctl, list) - -struct snd_emu10k1_midi { - struct snd_emu10k1 *emu; - struct snd_rawmidi *rmidi; - struct snd_rawmidi_substream *substream_input; - struct snd_rawmidi_substream *substream_output; - unsigned int midi_mode; - spinlock_t input_lock; - spinlock_t output_lock; - spinlock_t open_lock; - int tx_enable, rx_enable; - int port; - int ipr_tx, ipr_rx; - void (*interrupt)(struct snd_emu10k1 *emu, unsigned int status); -}; - -struct snd_emu_chip_details { - u32 vendor; - u32 device; - u32 subsystem; - unsigned char revision; - unsigned char emu10k1_chip; /* Original SB Live. Not SB Live 24bit. */ - unsigned char emu10k2_chip; /* Audigy 1 or Audigy 2. */ - unsigned char ca0102_chip; /* Audigy 1 or Audigy 2. Not SB Audigy 2 Value. */ - unsigned char ca0108_chip; /* Audigy 2 Value */ - unsigned char ca_cardbus_chip; /* Audigy 2 ZS Notebook */ - unsigned char ca0151_chip; /* P16V */ - unsigned char spk71; /* Has 7.1 speakers */ - unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */ - unsigned char spdif_bug; /* Has Spdif phasing bug */ - unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */ - unsigned char ecard; /* APS EEPROM */ - unsigned char emu1212m; /* EMU 1212m card */ - unsigned char spi_dac; /* SPI interface for DAC */ - unsigned char i2c_adc; /* I2C interface for ADC */ - unsigned char adc_1361t; /* Use Philips 1361T ADC */ - const char *driver; - const char *name; - const char *id; /* for backward compatibility - can be NULL if not needed */ -}; - -struct snd_emu10k1 { - int irq; - - unsigned long port; /* I/O port number */ - unsigned int tos_link: 1, /* tos link detected */ - rear_ac97: 1, /* rear channels are on AC'97 */ - enable_ir: 1; - /* Contains profile of card capabilities */ - const struct snd_emu_chip_details *card_capabilities; - unsigned int audigy; /* is Audigy? */ - unsigned int revision; /* chip revision */ - unsigned int serial; /* serial number */ - unsigned short model; /* subsystem id */ - unsigned int card_type; /* EMU10K1_CARD_* */ - unsigned int ecard_ctrl; /* ecard control bits */ - unsigned long dma_mask; /* PCI DMA mask */ - int max_cache_pages; /* max memory size / PAGE_SIZE */ - struct snd_dma_buffer silent_page; /* silent page */ - struct snd_dma_buffer ptb_pages; /* page table pages */ - struct snd_dma_device p16v_dma_dev; - struct snd_dma_buffer p16v_buffer; - - struct snd_util_memhdr *memhdr; /* page allocation list */ - struct snd_emu10k1_memblk *reserved_page; /* reserved page */ - - struct list_head mapped_link_head; - struct list_head mapped_order_link_head; - void **page_ptr_table; - unsigned long *page_addr_table; - spinlock_t memblk_lock; - - unsigned int spdif_bits[3]; /* s/pdif out setup */ - - struct snd_emu10k1_fx8010 fx8010; /* FX8010 info */ - int gpr_base; - - struct snd_ac97 *ac97; - - struct pci_dev *pci; - struct snd_card *card; - struct snd_pcm *pcm; - struct snd_pcm *pcm_mic; - struct snd_pcm *pcm_efx; - struct snd_pcm *pcm_multi; - struct snd_pcm *pcm_p16v; - - spinlock_t synth_lock; - void *synth; - int (*get_synth_voice)(struct snd_emu10k1 *emu); - - spinlock_t reg_lock; - spinlock_t emu_lock; - spinlock_t voice_lock; - - struct snd_emu10k1_voice voices[NUM_G]; - struct snd_emu10k1_voice p16v_voices[4]; - struct snd_emu10k1_voice p16v_capture_voice; - int p16v_device_offset; - u32 p16v_capture_source; - u32 p16v_capture_channel; - struct snd_emu10k1_pcm_mixer pcm_mixer[32]; - struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK]; - struct snd_kcontrol *ctl_send_routing; - struct snd_kcontrol *ctl_send_volume; - struct snd_kcontrol *ctl_attn; - struct snd_kcontrol *ctl_efx_send_routing; - struct snd_kcontrol *ctl_efx_send_volume; - struct snd_kcontrol *ctl_efx_attn; - - void (*hwvol_interrupt)(struct snd_emu10k1 *emu, unsigned int status); - void (*capture_interrupt)(struct snd_emu10k1 *emu, unsigned int status); - void (*capture_mic_interrupt)(struct snd_emu10k1 *emu, unsigned int status); - void (*capture_efx_interrupt)(struct snd_emu10k1 *emu, unsigned int status); - void (*spdif_interrupt)(struct snd_emu10k1 *emu, unsigned int status); - void (*dsp_interrupt)(struct snd_emu10k1 *emu); - - struct snd_pcm_substream *pcm_capture_substream; - struct snd_pcm_substream *pcm_capture_mic_substream; - struct snd_pcm_substream *pcm_capture_efx_substream; - struct snd_pcm_substream *pcm_playback_efx_substream; - - struct snd_timer *timer; - - struct snd_emu10k1_midi midi; - struct snd_emu10k1_midi midi2; /* for audigy */ - - unsigned int efx_voices_mask[2]; - unsigned int next_free_voice; - -#ifdef CONFIG_PM - unsigned int *saved_ptr; - unsigned int *saved_gpr; - unsigned int *tram_val_saved; - unsigned int *tram_addr_saved; - unsigned int *saved_icode; - unsigned int *p16v_saved; - unsigned int saved_a_iocfg, saved_hcfg; -#endif - -}; - -int snd_emu10k1_create(struct snd_card *card, - struct pci_dev *pci, - unsigned short extin_mask, - unsigned short extout_mask, - long max_cache_bytes, - int enable_ir, - uint subsystem, - struct snd_emu10k1 ** remu); - -int snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); -int snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); -int snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); -int snd_p16v_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); -int snd_p16v_free(struct snd_emu10k1 * emu); -int snd_p16v_mixer(struct snd_emu10k1 * emu); -int snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); -int snd_emu10k1_fx8010_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm); -int snd_emu10k1_mixer(struct snd_emu10k1 * emu, int pcm_device, int multi_device); -int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device); -int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep); - -irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id); - -void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice); -int snd_emu10k1_init_efx(struct snd_emu10k1 *emu); -void snd_emu10k1_free_efx(struct snd_emu10k1 *emu); -int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size); -int snd_emu10k1_done(struct snd_emu10k1 * emu); - -/* I/O functions */ -unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn); -void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data); -unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn); -void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data); -int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data); -unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc); -void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb); -void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb); -void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum); -void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum); -void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum); -void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum); -void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum); -void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum); -void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum); -void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum); -void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait); -static inline unsigned int snd_emu10k1_wc(struct snd_emu10k1 *emu) { return (inl(emu->port + WC) >> 6) & 0xfffff; } -unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg); -void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data); -unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate); - -#ifdef CONFIG_PM -void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu); -void snd_emu10k1_resume_init(struct snd_emu10k1 *emu); -void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu); -int snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu); -void snd_emu10k1_efx_free_pm_buffer(struct snd_emu10k1 *emu); -void snd_emu10k1_efx_suspend(struct snd_emu10k1 *emu); -void snd_emu10k1_efx_resume(struct snd_emu10k1 *emu); -int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu); -void snd_p16v_free_pm_buffer(struct snd_emu10k1 *emu); -void snd_p16v_suspend(struct snd_emu10k1 *emu); -void snd_p16v_resume(struct snd_emu10k1 *emu); -#endif - -/* memory allocation */ -struct snd_util_memblk *snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream); -int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk); -struct snd_util_memblk *snd_emu10k1_synth_alloc(struct snd_emu10k1 *emu, unsigned int size); -int snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *blk); -int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, int size); -int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, const char __user *data, int size); -int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk); - -/* voice allocation */ -int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int pair, struct snd_emu10k1_voice **rvoice); -int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice); - -/* MIDI uart */ -int snd_emu10k1_midi(struct snd_emu10k1 * emu); -int snd_emu10k1_audigy_midi(struct snd_emu10k1 * emu); - -/* proc interface */ -int snd_emu10k1_proc_init(struct snd_emu10k1 * emu); - -/* fx8010 irq handler */ -int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu, - snd_fx8010_irq_handler_t *handler, - unsigned char gpr_running, - void *private_data, - struct snd_emu10k1_fx8010_irq **r_irq); -int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu, - struct snd_emu10k1_fx8010_irq *irq); - -#endif /* __KERNEL__ */ /* * ---- FX8010 ---- @@ -1493,13 +247,11 @@ #define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */ /* tank memory address line */ -#ifndef __KERNEL__ #define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */ #define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */ #define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */ #define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */ #define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */ -#endif struct snd_emu10k1_fx8010_info { unsigned int internal_tram_size; /* in samples */ @@ -1535,24 +287,24 @@ char name[128]; DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ - u_int32_t __user *gpr_map; /* initializers */ + u_int32_t *gpr_map; /* initializers */ unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ - struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */ + struct snd_emu10k1_fx8010_control_gpr *gpr_add_controls; /* GPR controls to add/replace */ unsigned int gpr_del_control_count; /* count of GPR controls to remove */ - struct snd_ctl_elem_id __user *gpr_del_controls; /* IDs of GPR controls to remove */ + struct snd_ctl_elem_id *gpr_del_controls; /* IDs of GPR controls to remove */ unsigned int gpr_list_control_count; /* count of GPR controls to list */ unsigned int gpr_list_control_total; /* total count of GPR controls */ - struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ + struct snd_emu10k1_fx8010_control_gpr *gpr_list_controls; /* listed GPR controls */ DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ - u_int32_t __user *tram_data_map; /* data initializers */ - u_int32_t __user *tram_addr_map; /* map initializers */ + u_int32_t *tram_data_map; /* data initializers */ + u_int32_t *tram_addr_map; /* map initializers */ DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ - u_int32_t __user *code; /* one instruction - 64 bits */ + u_int32_t *code; /* one instruction - 64 bits */ }; struct snd_emu10k1_fx8010_tram { --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./sound/sb16_csp.h 2007-05-08 14:40:01.000000000 +0200 +++ ./sound/sb16_csp.h 2007-05-24 15:40:44.000000000 +0200 @@ -111,57 +111,5 @@ /* restart CSP and DMA transfer */ #define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16) -#ifdef __KERNEL__ -#include "sb.h" -#include "hwdep.h" - -struct snd_sb_csp; - -/* - * CSP operators - */ -struct snd_sb_csp_ops { - int (*csp_use) (struct snd_sb_csp * p); - int (*csp_unuse) (struct snd_sb_csp * p); - int (*csp_autoload) (struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode); - int (*csp_start) (struct snd_sb_csp * p, int sample_width, int channels); - int (*csp_stop) (struct snd_sb_csp * p); - int (*csp_qsound_transfer) (struct snd_sb_csp * p); -}; - -/* - * CSP private data - */ -struct snd_sb_csp { - struct snd_sb *chip; /* SB16 DSP */ - int used; /* usage flag - exclusive */ - char codec_name[16]; /* name of codec */ - unsigned short func_nr; /* function number */ - unsigned int acc_format; /* accepted PCM formats */ - int acc_channels; /* accepted channels */ - int acc_width; /* accepted sample width */ - int acc_rates; /* accepted sample rates */ - int mode; /* MODE */ - int run_channels; /* current CSP channels */ - int run_width; /* current sample width */ - int version; /* CSP version (0x10 - 0x1f) */ - int running; /* running state */ - - struct snd_sb_csp_ops ops; /* operators */ - - spinlock_t q_lock; /* locking */ - int q_enabled; /* enabled flag */ - int qpos_left; /* left position */ - int qpos_right; /* right position */ - int qpos_changed; /* position changed flag */ - - struct snd_kcontrol *qsound_switch; - struct snd_kcontrol *qsound_space; - - struct mutex access_mutex; /* locking */ -}; - -int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep); -#endif #endif /* __SOUND_SB16_CSP */ --- /home/mpommerenke/Develop.GU_Davinci/kernel_arm926_debug_build/kernel/linux-2.6.19.2/include/./video/sisfb.h 2007-05-08 14:40:02.000000000 +0200 +++ ./video/sisfb.h 2007-05-24 15:40:44.000000000 +0200 @@ -205,20 +205,5 @@ /* (for IN-KERNEL usage only) */ /**********************************************/ -#ifdef __KERNEL__ - -#include - -#define UNKNOWN_VGA 0 -#define SIS_300_VGA 1 -#define SIS_315_VGA 2 - -#define SISFB_HAVE_MALLOC_NEW -extern void sis_malloc(struct sis_memreq *req); -extern void sis_malloc_new(struct pci_dev *pdev, struct sis_memreq *req); - -extern void sis_free(u32 base); -extern void sis_free_new(struct pci_dev *pdev, u32 base); -#endif #endif