freebsd-dev/sys/alpha/include
Thomas Moestl 90ce56c287 Add the following functions/macros to support byte order conversions and
device drivers for bus system with other endinesses than the CPU (using
interfaces compatible to NetBSD):

- bwap16() and bswap32(). These have optimized implementations on some
  architectures; for those that don't, there exist generic implementations.
- macros to convert from a certain byte order to host byte order and vice
  versa, using a naming scheme like le16toh(), htole16().
  These are implemented using the bswap functions.
- stream bus space access functions, which do not perform a byte order
  conversion (while the normal access functions would if the bus endianess
  differs from the CPU endianess).

htons(), htonl(), ntohs() and ntohl() are implemented using the new
functions above for kernel usage. None of the above interfaces is currently
exported to user land.

Make use of the new functions in a few places where local implementations
of the same functionality existed.

Reviewed by:	mike, bde
Tested on alpha by:	mike
2002-02-27 17:16:18 +00:00
..
pc Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
_inttypes.h o Add new header <sys/stdint.h>. 2001-11-02 18:05:43 +00:00
_limits.h o Add new header <sys/stdint.h>. 2001-11-02 18:05:43 +00:00
alpha_cpu.h Block out all interrupts, even machine checks, for critical_enter() 2001-04-21 21:44:39 +00:00
ansi.h Resurrect one of the easiest changes from my big include files roll-up 2002-02-15 22:15:39 +00:00
asm.h Overhaul the per-CPU support a bit: 2001-12-11 23:33:44 +00:00
atomic.h Be conservative and always perform an mb after an atomic_cmpset operation. 2001-06-22 21:13:20 +00:00
bootinfo.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
bus_memio.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
bus_pio.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
bus.h Add the following functions/macros to support byte order conversions and 2002-02-27 17:16:18 +00:00
bwx.h * Completely rewrite the alpha busspace to hide the implementation from 2000-08-28 21:48:13 +00:00
chipset.h * Completely rewrite the alpha busspace to hide the implementation from 2000-08-28 21:48:13 +00:00
clock.h Move DELAY() from <machine/clock.h> to <sys/systm.h> 2000-10-15 09:51:49 +00:00
clockvar.h Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
cpu.h KSE Milestone 2 2001-09-12 08:38:13 +00:00
cpuconf.h Use struct device * rather than device_t for (*pci_intr_route args), so 2001-06-11 18:19:44 +00:00
cpufunc.h Modify the critical section API as follows: 2001-12-18 00:27:18 +00:00
db_machdep.h Allow alpha kernels to compile again- make sure opt_ddb.h is included 2002-01-17 02:16:35 +00:00
elf.h Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader 2001-10-10 23:06:54 +00:00
endian.h Add the following functions/macros to support byte order conversions and 2002-02-27 17:16:18 +00:00
exec.h Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
float.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
floatingpoint.h Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
fpu.h KSE Milestone 2 2001-09-12 08:38:13 +00:00
frame.h * Move exception_return to exception.s which is a more logical home for it. 2001-02-02 10:20:30 +00:00
ieee.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ieeefp.h Finish moving all IEEE fp types to be the same on all arch's. 2000-05-10 19:41:40 +00:00
in_cksum.h Make in_cksum() a macro call to in_cksum_skip(), since it provides the 2000-05-06 18:18:32 +00:00
inst.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
intr.h Introduce a standard name for the lock protecting an interrupt controller 2001-12-20 23:48:31 +00:00
intrcnt.h Clean up the code exporting interrupt statistics via sysctl a bit: 2001-06-01 13:23:28 +00:00
ioctl_bt848.h Merge from i386: Add MSP ioctl 2000-10-27 07:07:24 +00:00
ioctl_meteor.h Add include files to alpha/include directory. 2000-04-15 08:07:56 +00:00
limits.h o Add new header <sys/stdint.h>. 2001-11-02 18:05:43 +00:00
md_var.h [partially forced commit due to pilot error in earlier commit attempt] 2001-10-21 22:16:48 +00:00
mutex.h Modify the critical section API as follows: 2001-12-18 00:27:18 +00:00
pal.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
param.h Whitespace fixes. 2001-09-12 22:00:06 +00:00
pcb.h Overhaul the per-CPU support a bit: 2001-12-11 23:33:44 +00:00
pcpu.h Overhaul the per-CPU support a bit: 2001-12-11 23:33:44 +00:00
pmap.h Fixes for alpha pmap on SMP machines: 2002-02-06 04:30:26 +00:00
proc.h Overhaul the per-CPU support a bit: 2001-12-11 23:33:44 +00:00
profile.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
prom.h Detach the prom console when platform.cons_init is called. This seems 2001-10-26 16:13:47 +00:00
psl.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
pte.h Zap some latent problems hidden by differences between KERNEL and _KERNEL. 1999-11-22 15:14:56 +00:00
ptrace.h KSE Milestone 2 2001-09-12 08:38:13 +00:00
reg.h [partially forced commit due to pilot error in earlier commit attempt] 2001-10-21 22:16:48 +00:00
reloc.h Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
resource.h * Implement bus_set/get/delete_resource for pci. 1999-10-14 21:38:33 +00:00
rpb.h Recognize a few newer cpus (pca57, ev67 & ev68) and update systypes to 2001-03-30 22:04:08 +00:00
setjmp.h Work around a bug by adding struct tags. gcc-2.95 apparently gets the 2000-10-06 11:53:32 +00:00
sgmap.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
sigframe.h Use struct __ucontext in prototypes and associated functions instead of 2002-02-17 17:40:34 +00:00
signal.h Use struct __ucontext in prototypes and associated functions instead of 2002-02-17 17:40:34 +00:00
smp.h Remove IPI_HALT to make way for a more correct fix for halts and restarts 2001-08-13 22:41:15 +00:00
stdarg.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
swiz.h * Completely rewrite the alpha busspace to hide the implementation from 2000-08-28 21:48:13 +00:00
sysarch.h The kernel side of per-process unaligned access control (printing, fixing & 2000-01-16 07:07:33 +00:00
types.h style(9) 2001-12-09 19:12:07 +00:00
ucontext.h Use a spare slot in the machine context to identify the context format 2002-01-10 02:36:30 +00:00
varargs.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
vmparam.h KSE Milestone 2 2001-09-12 08:38:13 +00:00