You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[h8300] move include/asm-h8300 to arch/h8300/include/asm
Done as a script (well, a single "git mv" actually) on request from Yoshinori Sato as a way to avoid a huge diff. Requested-by: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -1 +0,0 @@
|
||||
include include/asm-generic/Kbuild.asm
|
||||
@@ -1,20 +0,0 @@
|
||||
#ifndef __H8300_A_OUT_H__
|
||||
#define __H8300_A_OUT_H__
|
||||
|
||||
struct exec
|
||||
{
|
||||
unsigned long a_info; /* Use macros N_MAGIC, etc for access */
|
||||
unsigned a_text; /* length of text, in bytes */
|
||||
unsigned a_data; /* length of data, in bytes */
|
||||
unsigned a_bss; /* length of uninitialized data area for file, in bytes */
|
||||
unsigned a_syms; /* length of symbol table data in file, in bytes */
|
||||
unsigned a_entry; /* start address */
|
||||
unsigned a_trsize; /* length of relocation info for text, in bytes */
|
||||
unsigned a_drsize; /* length of relocation info for data, in bytes */
|
||||
};
|
||||
|
||||
#define N_TRSIZE(a) ((a).a_trsize)
|
||||
#define N_DRSIZE(a) ((a).a_drsize)
|
||||
#define N_SYMSIZE(a) ((a).a_syms)
|
||||
|
||||
#endif /* __H8300_A_OUT_H__ */
|
||||
@@ -1,144 +0,0 @@
|
||||
#ifndef __ARCH_H8300_ATOMIC__
|
||||
#define __ARCH_H8300_ATOMIC__
|
||||
|
||||
/*
|
||||
* Atomic operations that C can't guarantee us. Useful for
|
||||
* resource counting etc..
|
||||
*/
|
||||
|
||||
typedef struct { int counter; } atomic_t;
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
|
||||
#define atomic_read(v) ((v)->counter)
|
||||
#define atomic_set(v, i) (((v)->counter) = i)
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
static __inline__ int atomic_add_return(int i, atomic_t *v)
|
||||
{
|
||||
int ret,flags;
|
||||
local_irq_save(flags);
|
||||
ret = v->counter += i;
|
||||
local_irq_restore(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define atomic_add(i, v) atomic_add_return(i, v)
|
||||
#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
|
||||
|
||||
static __inline__ int atomic_sub_return(int i, atomic_t *v)
|
||||
{
|
||||
int ret,flags;
|
||||
local_irq_save(flags);
|
||||
ret = v->counter -= i;
|
||||
local_irq_restore(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define atomic_sub(i, v) atomic_sub_return(i, v)
|
||||
#define atomic_sub_and_test(i,v) (atomic_sub_return(i, v) == 0)
|
||||
|
||||
static __inline__ int atomic_inc_return(atomic_t *v)
|
||||
{
|
||||
int ret,flags;
|
||||
local_irq_save(flags);
|
||||
v->counter++;
|
||||
ret = v->counter;
|
||||
local_irq_restore(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define atomic_inc(v) atomic_inc_return(v)
|
||||
|
||||
/*
|
||||
* atomic_inc_and_test - increment and test
|
||||
* @v: pointer of type atomic_t
|
||||
*
|
||||
* Atomically increments @v by 1
|
||||
* and returns true if the result is zero, or false for all
|
||||
* other cases.
|
||||
*/
|
||||
#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
|
||||
|
||||
static __inline__ int atomic_dec_return(atomic_t *v)
|
||||
{
|
||||
int ret,flags;
|
||||
local_irq_save(flags);
|
||||
--v->counter;
|
||||
ret = v->counter;
|
||||
local_irq_restore(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define atomic_dec(v) atomic_dec_return(v)
|
||||
|
||||
static __inline__ int atomic_dec_and_test(atomic_t *v)
|
||||
{
|
||||
int ret,flags;
|
||||
local_irq_save(flags);
|
||||
--v->counter;
|
||||
ret = v->counter;
|
||||
local_irq_restore(flags);
|
||||
return ret == 0;
|
||||
}
|
||||
|
||||
static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
|
||||
{
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
ret = v->counter;
|
||||
if (likely(ret == old))
|
||||
v->counter = new;
|
||||
local_irq_restore(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
|
||||
|
||||
static inline int atomic_add_unless(atomic_t *v, int a, int u)
|
||||
{
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
ret = v->counter;
|
||||
if (ret != u)
|
||||
v->counter += a;
|
||||
local_irq_restore(flags);
|
||||
return ret != u;
|
||||
}
|
||||
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
|
||||
|
||||
static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v)
|
||||
{
|
||||
__asm__ __volatile__("stc ccr,r1l\n\t"
|
||||
"orc #0x80,ccr\n\t"
|
||||
"mov.l %0,er0\n\t"
|
||||
"and.l %1,er0\n\t"
|
||||
"mov.l er0,%0\n\t"
|
||||
"ldc r1l,ccr"
|
||||
: "=m" (*v) : "g" (~(mask)) :"er0","er1");
|
||||
}
|
||||
|
||||
static __inline__ void atomic_set_mask(unsigned long mask, unsigned long *v)
|
||||
{
|
||||
__asm__ __volatile__("stc ccr,r1l\n\t"
|
||||
"orc #0x80,ccr\n\t"
|
||||
"mov.l %0,er0\n\t"
|
||||
"or.l %1,er0\n\t"
|
||||
"mov.l er0,%0\n\t"
|
||||
"ldc r1l,ccr"
|
||||
: "=m" (*v) : "g" (mask) :"er0","er1");
|
||||
}
|
||||
|
||||
/* Atomic operations are already serializing */
|
||||
#define smp_mb__before_atomic_dec() barrier()
|
||||
#define smp_mb__after_atomic_dec() barrier()
|
||||
#define smp_mb__before_atomic_inc() barrier()
|
||||
#define smp_mb__after_atomic_inc() barrier()
|
||||
|
||||
#include <asm-generic/atomic.h>
|
||||
#endif /* __ARCH_H8300_ATOMIC __ */
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef __ASMH8300_AUXVEC_H
|
||||
#define __ASMH8300_AUXVEC_H
|
||||
|
||||
#endif
|
||||
@@ -1,212 +0,0 @@
|
||||
#ifndef _H8300_BITOPS_H
|
||||
#define _H8300_BITOPS_H
|
||||
|
||||
/*
|
||||
* Copyright 1992, Linus Torvalds.
|
||||
* Copyright 2002, Yoshinori Sato
|
||||
*/
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef _LINUX_BITOPS_H
|
||||
#error only <linux/bitops.h> can be included directly
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Function prototypes to keep gcc -Wall happy
|
||||
*/
|
||||
|
||||
/*
|
||||
* ffz = Find First Zero in word. Undefined if no zero exists,
|
||||
* so code should check against ~0UL first..
|
||||
*/
|
||||
static __inline__ unsigned long ffz(unsigned long word)
|
||||
{
|
||||
unsigned long result;
|
||||
|
||||
result = -1;
|
||||
__asm__("1:\n\t"
|
||||
"shlr.l %2\n\t"
|
||||
"adds #1,%0\n\t"
|
||||
"bcs 1b"
|
||||
: "=r" (result)
|
||||
: "0" (result),"r" (word));
|
||||
return result;
|
||||
}
|
||||
|
||||
#define H8300_GEN_BITOP_CONST(OP,BIT) \
|
||||
case BIT: \
|
||||
__asm__(OP " #" #BIT ",@%0"::"r"(b_addr):"memory"); \
|
||||
break;
|
||||
|
||||
#define H8300_GEN_BITOP(FNAME,OP) \
|
||||
static __inline__ void FNAME(int nr, volatile unsigned long* addr) \
|
||||
{ \
|
||||
volatile unsigned char *b_addr; \
|
||||
b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \
|
||||
if (__builtin_constant_p(nr)) { \
|
||||
switch(nr & 7) { \
|
||||
H8300_GEN_BITOP_CONST(OP,0) \
|
||||
H8300_GEN_BITOP_CONST(OP,1) \
|
||||
H8300_GEN_BITOP_CONST(OP,2) \
|
||||
H8300_GEN_BITOP_CONST(OP,3) \
|
||||
H8300_GEN_BITOP_CONST(OP,4) \
|
||||
H8300_GEN_BITOP_CONST(OP,5) \
|
||||
H8300_GEN_BITOP_CONST(OP,6) \
|
||||
H8300_GEN_BITOP_CONST(OP,7) \
|
||||
} \
|
||||
} else { \
|
||||
__asm__(OP " %w0,@%1"::"r"(nr),"r"(b_addr):"memory"); \
|
||||
} \
|
||||
}
|
||||
|
||||
/*
|
||||
* clear_bit() doesn't provide any barrier for the compiler.
|
||||
*/
|
||||
#define smp_mb__before_clear_bit() barrier()
|
||||
#define smp_mb__after_clear_bit() barrier()
|
||||
|
||||
H8300_GEN_BITOP(set_bit ,"bset")
|
||||
H8300_GEN_BITOP(clear_bit ,"bclr")
|
||||
H8300_GEN_BITOP(change_bit,"bnot")
|
||||
#define __set_bit(nr,addr) set_bit((nr),(addr))
|
||||
#define __clear_bit(nr,addr) clear_bit((nr),(addr))
|
||||
#define __change_bit(nr,addr) change_bit((nr),(addr))
|
||||
|
||||
#undef H8300_GEN_BITOP
|
||||
#undef H8300_GEN_BITOP_CONST
|
||||
|
||||
static __inline__ int test_bit(int nr, const unsigned long* addr)
|
||||
{
|
||||
return (*((volatile unsigned char *)addr +
|
||||
((nr >> 3) ^ 3)) & (1UL << (nr & 7))) != 0;
|
||||
}
|
||||
|
||||
#define __test_bit(nr, addr) test_bit(nr, addr)
|
||||
|
||||
#define H8300_GEN_TEST_BITOP_CONST_INT(OP,BIT) \
|
||||
case BIT: \
|
||||
__asm__("stc ccr,%w1\n\t" \
|
||||
"orc #0x80,ccr\n\t" \
|
||||
"bld #" #BIT ",@%4\n\t" \
|
||||
OP " #" #BIT ",@%4\n\t" \
|
||||
"rotxl.l %0\n\t" \
|
||||
"ldc %w1,ccr" \
|
||||
: "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \
|
||||
: "0" (retval),"r" (b_addr) \
|
||||
: "memory"); \
|
||||
break;
|
||||
|
||||
#define H8300_GEN_TEST_BITOP_CONST(OP,BIT) \
|
||||
case BIT: \
|
||||
__asm__("bld #" #BIT ",@%3\n\t" \
|
||||
OP " #" #BIT ",@%3\n\t" \
|
||||
"rotxl.l %0\n\t" \
|
||||
: "=r"(retval),"=m"(*b_addr) \
|
||||
: "0" (retval),"r" (b_addr) \
|
||||
: "memory"); \
|
||||
break;
|
||||
|
||||
#define H8300_GEN_TEST_BITOP(FNNAME,OP) \
|
||||
static __inline__ int FNNAME(int nr, volatile void * addr) \
|
||||
{ \
|
||||
int retval = 0; \
|
||||
char ccrsave; \
|
||||
volatile unsigned char *b_addr; \
|
||||
b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \
|
||||
if (__builtin_constant_p(nr)) { \
|
||||
switch(nr & 7) { \
|
||||
H8300_GEN_TEST_BITOP_CONST_INT(OP,0) \
|
||||
H8300_GEN_TEST_BITOP_CONST_INT(OP,1) \
|
||||
H8300_GEN_TEST_BITOP_CONST_INT(OP,2) \
|
||||
H8300_GEN_TEST_BITOP_CONST_INT(OP,3) \
|
||||
H8300_GEN_TEST_BITOP_CONST_INT(OP,4) \
|
||||
H8300_GEN_TEST_BITOP_CONST_INT(OP,5) \
|
||||
H8300_GEN_TEST_BITOP_CONST_INT(OP,6) \
|
||||
H8300_GEN_TEST_BITOP_CONST_INT(OP,7) \
|
||||
} \
|
||||
} else { \
|
||||
__asm__("stc ccr,%w1\n\t" \
|
||||
"orc #0x80,ccr\n\t" \
|
||||
"btst %w5,@%4\n\t" \
|
||||
OP " %w5,@%4\n\t" \
|
||||
"beq 1f\n\t" \
|
||||
"inc.l #1,%0\n" \
|
||||
"1:\n\t" \
|
||||
"ldc %w1,ccr" \
|
||||
: "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \
|
||||
: "0" (retval),"r" (b_addr),"r"(nr) \
|
||||
: "memory"); \
|
||||
} \
|
||||
return retval; \
|
||||
} \
|
||||
\
|
||||
static __inline__ int __ ## FNNAME(int nr, volatile void * addr) \
|
||||
{ \
|
||||
int retval = 0; \
|
||||
volatile unsigned char *b_addr; \
|
||||
b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \
|
||||
if (__builtin_constant_p(nr)) { \
|
||||
switch(nr & 7) { \
|
||||
H8300_GEN_TEST_BITOP_CONST(OP,0) \
|
||||
H8300_GEN_TEST_BITOP_CONST(OP,1) \
|
||||
H8300_GEN_TEST_BITOP_CONST(OP,2) \
|
||||
H8300_GEN_TEST_BITOP_CONST(OP,3) \
|
||||
H8300_GEN_TEST_BITOP_CONST(OP,4) \
|
||||
H8300_GEN_TEST_BITOP_CONST(OP,5) \
|
||||
H8300_GEN_TEST_BITOP_CONST(OP,6) \
|
||||
H8300_GEN_TEST_BITOP_CONST(OP,7) \
|
||||
} \
|
||||
} else { \
|
||||
__asm__("btst %w4,@%3\n\t" \
|
||||
OP " %w4,@%3\n\t" \
|
||||
"beq 1f\n\t" \
|
||||
"inc.l #1,%0\n" \
|
||||
"1:" \
|
||||
: "=r"(retval),"=m"(*b_addr) \
|
||||
: "0" (retval),"r" (b_addr),"r"(nr) \
|
||||
: "memory"); \
|
||||
} \
|
||||
return retval; \
|
||||
}
|
||||
|
||||
H8300_GEN_TEST_BITOP(test_and_set_bit, "bset")
|
||||
H8300_GEN_TEST_BITOP(test_and_clear_bit, "bclr")
|
||||
H8300_GEN_TEST_BITOP(test_and_change_bit,"bnot")
|
||||
#undef H8300_GEN_TEST_BITOP_CONST
|
||||
#undef H8300_GEN_TEST_BITOP_CONST_INT
|
||||
#undef H8300_GEN_TEST_BITOP
|
||||
|
||||
#include <asm-generic/bitops/ffs.h>
|
||||
|
||||
static __inline__ unsigned long __ffs(unsigned long word)
|
||||
{
|
||||
unsigned long result;
|
||||
|
||||
result = -1;
|
||||
__asm__("1:\n\t"
|
||||
"shlr.l %2\n\t"
|
||||
"adds #1,%0\n\t"
|
||||
"bcc 1b"
|
||||
: "=r" (result)
|
||||
: "0"(result),"r"(word));
|
||||
return result;
|
||||
}
|
||||
|
||||
#include <asm-generic/bitops/find.h>
|
||||
#include <asm-generic/bitops/sched.h>
|
||||
#include <asm-generic/bitops/hweight.h>
|
||||
#include <asm-generic/bitops/lock.h>
|
||||
#include <asm-generic/bitops/ext2-non-atomic.h>
|
||||
#include <asm-generic/bitops/ext2-atomic.h>
|
||||
#include <asm-generic/bitops/minix.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#include <asm-generic/bitops/fls.h>
|
||||
#include <asm-generic/bitops/fls64.h>
|
||||
|
||||
#endif /* _H8300_BITOPS_H */
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
/* Nothing for h8300 */
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef _H8300_BUG_H
|
||||
#define _H8300_BUG_H
|
||||
#include <asm-generic/bug.h>
|
||||
#endif
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* include/asm-h8300/bugs.h
|
||||
*
|
||||
* Copyright (C) 1994 Linus Torvalds
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is included by init/main.c to check for architecture-dependent bugs.
|
||||
*
|
||||
* Needs:
|
||||
* void check_bugs(void);
|
||||
*/
|
||||
|
||||
static void check_bugs(void)
|
||||
{
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef _H8300_BYTEORDER_H
|
||||
#define _H8300_BYTEORDER_H
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
|
||||
# define __BYTEORDER_HAS_U64__
|
||||
# define __SWAB_64_THRU_32__
|
||||
#endif
|
||||
|
||||
#include <linux/byteorder/big_endian.h>
|
||||
|
||||
#endif /* _H8300_BYTEORDER_H */
|
||||
@@ -1,12 +0,0 @@
|
||||
#ifndef __ARCH_H8300_CACHE_H
|
||||
#define __ARCH_H8300_CACHE_H
|
||||
|
||||
/* bytes per L1 cache line */
|
||||
#define L1_CACHE_BYTES 4
|
||||
|
||||
/* m68k-elf-gcc 2.95.2 doesn't like these */
|
||||
|
||||
#define __cacheline_aligned
|
||||
#define ____cacheline_aligned
|
||||
|
||||
#endif
|
||||
@@ -1,14 +0,0 @@
|
||||
#ifndef _H8300_CACHECTL_H
|
||||
#define _H8300_CACHECTL_H
|
||||
|
||||
/* Definitions for the cacheflush system call. */
|
||||
|
||||
#define FLUSH_SCOPE_LINE 0 /* Flush a cache line */
|
||||
#define FLUSH_SCOPE_PAGE 0 /* Flush a page */
|
||||
#define FLUSH_SCOPE_ALL 0 /* Flush the whole cache -- superuser only */
|
||||
|
||||
#define FLUSH_CACHE_DATA 0 /* Writeback and flush data cache */
|
||||
#define FLUSH_CACHE_INSN 0 /* Flush instruction cache */
|
||||
#define FLUSH_CACHE_BOTH 0 /* Flush both caches */
|
||||
|
||||
#endif /* _H8300_CACHECTL_H */
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* (C) Copyright 2002, Yoshinori Sato <ysato@users.sourceforge.jp>
|
||||
*/
|
||||
|
||||
#ifndef _ASM_H8300_CACHEFLUSH_H
|
||||
#define _ASM_H8300_CACHEFLUSH_H
|
||||
|
||||
/*
|
||||
* Cache handling functions
|
||||
* No Cache memory all dummy functions
|
||||
*/
|
||||
|
||||
#define flush_cache_all()
|
||||
#define flush_cache_mm(mm)
|
||||
#define flush_cache_dup_mm(mm) do { } while (0)
|
||||
#define flush_cache_range(vma,a,b)
|
||||
#define flush_cache_page(vma,p,pfn)
|
||||
#define flush_dcache_page(page)
|
||||
#define flush_dcache_mmap_lock(mapping)
|
||||
#define flush_dcache_mmap_unlock(mapping)
|
||||
#define flush_icache()
|
||||
#define flush_icache_page(vma,page)
|
||||
#define flush_icache_range(start,len)
|
||||
#define flush_cache_vmap(start, end)
|
||||
#define flush_cache_vunmap(start, end)
|
||||
#define cache_push_v(vaddr,len)
|
||||
#define cache_push(paddr,len)
|
||||
#define cache_clear(paddr,len)
|
||||
|
||||
#define flush_dcache_range(a,b)
|
||||
|
||||
#define flush_icache_user_range(vma,page,addr,len)
|
||||
|
||||
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
|
||||
memcpy(dst, src, len)
|
||||
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
|
||||
memcpy(dst, src, len)
|
||||
|
||||
#endif /* _ASM_H8300_CACHEFLUSH_H */
|
||||
@@ -1,102 +0,0 @@
|
||||
#ifndef _H8300_CHECKSUM_H
|
||||
#define _H8300_CHECKSUM_H
|
||||
|
||||
/*
|
||||
* computes the checksum of a memory block at buff, length len,
|
||||
* and adds in "sum" (32-bit)
|
||||
*
|
||||
* returns a 32-bit number suitable for feeding into itself
|
||||
* or csum_tcpudp_magic
|
||||
*
|
||||
* this function must be called with even lengths, except
|
||||
* for the last fragment, which may be odd
|
||||
*
|
||||
* it's best to have buff aligned on a 32-bit boundary
|
||||
*/
|
||||
__wsum csum_partial(const void *buff, int len, __wsum sum);
|
||||
|
||||
/*
|
||||
* the same as csum_partial, but copies from src while it
|
||||
* checksums
|
||||
*
|
||||
* here even more important to align src and dst on a 32-bit (or even
|
||||
* better 64-bit) boundary
|
||||
*/
|
||||
|
||||
__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
|
||||
|
||||
|
||||
/*
|
||||
* the same as csum_partial_copy, but copies from user space.
|
||||
*
|
||||
* here even more important to align src and dst on a 32-bit (or even
|
||||
* better 64-bit) boundary
|
||||
*/
|
||||
|
||||
extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
|
||||
int len, __wsum sum, int *csum_err);
|
||||
|
||||
__sum16 ip_fast_csum(const void *iph, unsigned int ihl);
|
||||
|
||||
|
||||
/*
|
||||
* Fold a partial checksum
|
||||
*/
|
||||
|
||||
static inline __sum16 csum_fold(__wsum sum)
|
||||
{
|
||||
__asm__("mov.l %0,er0\n\t"
|
||||
"add.w e0,r0\n\t"
|
||||
"xor.w e0,e0\n\t"
|
||||
"rotxl.w e0\n\t"
|
||||
"add.w e0,r0\n\t"
|
||||
"sub.w e0,e0\n\t"
|
||||
"mov.l er0,%0"
|
||||
: "=r"(sum)
|
||||
: "0"(sum)
|
||||
: "er0");
|
||||
return (__force __sum16)~sum;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* computes the checksum of the TCP/UDP pseudo-header
|
||||
* returns a 16-bit checksum, already complemented
|
||||
*/
|
||||
|
||||
static inline __wsum
|
||||
csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
|
||||
unsigned short proto, __wsum sum)
|
||||
{
|
||||
__asm__ ("sub.l er0,er0\n\t"
|
||||
"add.l %2,%0\n\t"
|
||||
"addx #0,r0l\n\t"
|
||||
"add.l %3,%0\n\t"
|
||||
"addx #0,r0l\n\t"
|
||||
"add.l %4,%0\n\t"
|
||||
"addx #0,r0l\n\t"
|
||||
"add.l er0,%0\n\t"
|
||||
"bcc 1f\n\t"
|
||||
"inc.l #1,%0\n"
|
||||
"1:"
|
||||
: "=&r" (sum)
|
||||
: "0" (sum), "r" (daddr), "r" (saddr), "r" (len + proto)
|
||||
:"er0");
|
||||
return sum;
|
||||
}
|
||||
|
||||
static inline __sum16
|
||||
csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
|
||||
unsigned short proto, __wsum sum)
|
||||
{
|
||||
return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
|
||||
}
|
||||
|
||||
/*
|
||||
* this routine is used for miscellaneous IP-like checksums, mainly
|
||||
* in icmp.c
|
||||
*/
|
||||
|
||||
extern __sum16 ip_compute_csum(const void *buff, int len);
|
||||
|
||||
#endif /* _H8300_CHECKSUM_H */
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __H8300_CPUTIME_H
|
||||
#define __H8300_CPUTIME_H
|
||||
|
||||
#include <asm-generic/cputime.h>
|
||||
|
||||
#endif /* __H8300_CPUTIME_H */
|
||||
@@ -1,25 +0,0 @@
|
||||
#ifndef _H8300_CURRENT_H
|
||||
#define _H8300_CURRENT_H
|
||||
/*
|
||||
* current.h
|
||||
* (C) Copyright 2000, Lineo, David McCullough <davidm@lineo.com>
|
||||
* (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
|
||||
*
|
||||
* rather than dedicate a register (as the m68k source does), we
|
||||
* just keep a global, we should probably just change it all to be
|
||||
* current and lose _current_task.
|
||||
*/
|
||||
|
||||
#include <linux/thread_info.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
struct task_struct;
|
||||
|
||||
static inline struct task_struct *get_current(void)
|
||||
{
|
||||
return(current_thread_info()->task);
|
||||
}
|
||||
|
||||
#define current get_current()
|
||||
|
||||
#endif /* _H8300_CURRENT_H */
|
||||
@@ -1,2 +0,0 @@
|
||||
#define DEBUG 1
|
||||
#define BREAK asm volatile ("trap #3")
|
||||
@@ -1,38 +0,0 @@
|
||||
#ifndef _H8300_DELAY_H
|
||||
#define _H8300_DELAY_H
|
||||
|
||||
#include <asm/param.h>
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Yoshinori Sato <ysato@sourceforge.jp>
|
||||
*
|
||||
* Delay routines, using a pre-computed "loops_per_second" value.
|
||||
*/
|
||||
|
||||
static inline void __delay(unsigned long loops)
|
||||
{
|
||||
__asm__ __volatile__ ("1:\n\t"
|
||||
"dec.l #1,%0\n\t"
|
||||
"bne 1b"
|
||||
:"=r" (loops):"0"(loops));
|
||||
}
|
||||
|
||||
/*
|
||||
* Use only for very small delays ( < 1 msec). Should probably use a
|
||||
* lookup table, really, as the multiplications take much too long with
|
||||
* short delays. This is a "reasonable" implementation, though (and the
|
||||
* first constant multiplications gets optimized away if the delay is
|
||||
* a constant)
|
||||
*/
|
||||
|
||||
extern unsigned long loops_per_jiffy;
|
||||
|
||||
static inline void udelay(unsigned long usecs)
|
||||
{
|
||||
usecs *= 4295; /* 2**32 / 1000000 */
|
||||
usecs /= (loops_per_jiffy*HZ);
|
||||
if (usecs)
|
||||
__delay(usecs);
|
||||
}
|
||||
|
||||
#endif /* _H8300_DELAY_H */
|
||||
@@ -1,7 +0,0 @@
|
||||
/*
|
||||
* Arch specific extensions to struct device
|
||||
*
|
||||
* This file is released under the GPLv2
|
||||
*/
|
||||
#include <asm-generic/device.h>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <asm-generic/div64.h>
|
||||
@@ -1,15 +0,0 @@
|
||||
#ifndef _H8300_DMA_H
|
||||
#define _H8300_DMA_H
|
||||
|
||||
|
||||
/*
|
||||
* Set number of channels of DMA on ColdFire for different implementations.
|
||||
*/
|
||||
#define MAX_DMA_CHANNELS 0
|
||||
#define MAX_DMA_ADDRESS PAGE_OFFSET
|
||||
|
||||
/* These are in kernel/dma.c: */
|
||||
extern int request_dma(unsigned int dmanr, const char *device_id); /* reserve a DMA channel */
|
||||
extern void free_dma(unsigned int dmanr); /* release it again */
|
||||
|
||||
#endif /* _H8300_DMA_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user