Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven. Fix up trivial conflict (m68k switched to generic version of uapi/asm/socket.h, net tree updated the old one) as per Geert. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/sun3: Fix instruction faults m68k/sun3: Get interrupts working again m68k: move to a single instance of free_initmem() m68k: merge MMU and non-MMU versions of mm/init.c m68k: switch to using the asm-generic termios.h m68k: switch to using the asm-generic termbits.h m68k: switch to using the asm-generic sockios.h m68k: switch to using the asm-generic socket.h m68k: switch to using the asm-generic shmbuf.h m68k: switch to using the asm-generic sembuf.h m68k: switch to using the asm-generic msgbuf.h m68k: switch to using the asm-generic auxvec.h m68k: switch to using the asm-generic shmparam.h m68k: switch to using the asm-generic spinlock.h m68k: switch to using the asm-generic hw_irq.h arch/m68k: remove CONFIG_EXPERIMENTAL
This commit is contained in:
commit
3127f23f01
|
@ -28,8 +28,8 @@ config ZORRO
|
|||
Linux use these.
|
||||
|
||||
config AMIGA_PCMCIA
|
||||
bool "Amiga 1200/600 PCMCIA support (EXPERIMENTAL)"
|
||||
depends on AMIGA && EXPERIMENTAL
|
||||
bool "Amiga 1200/600 PCMCIA support"
|
||||
depends on AMIGA
|
||||
help
|
||||
Include support in the kernel for pcmcia on Amiga 1200 and Amiga
|
||||
600. If you intend to use pcmcia cards say Y; otherwise say N.
|
||||
|
|
|
@ -274,9 +274,8 @@ endif # COLDFIRE
|
|||
comment "Processor Specific Options"
|
||||
|
||||
config M68KFPU_EMU
|
||||
bool "Math emulation support (EXPERIMENTAL)"
|
||||
bool "Math emulation support"
|
||||
depends on MMU
|
||||
depends on EXPERIMENTAL
|
||||
help
|
||||
At some point in the future, this will cause floating-point math
|
||||
instructions to be emulated by the kernel on machines that lack a
|
||||
|
|
|
@ -41,7 +41,7 @@ config NO_KERNEL_MSG
|
|||
|
||||
config BDM_DISABLE
|
||||
bool "Disable BDM signals"
|
||||
depends on (EXPERIMENTAL && COLDFIRE)
|
||||
depends on COLDFIRE
|
||||
help
|
||||
Disable the ColdFire CPU's BDM signals.
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ endmenu
|
|||
menu "Character devices"
|
||||
|
||||
config ATARI_DSP56K
|
||||
tristate "Atari DSP56k support (EXPERIMENTAL)"
|
||||
depends on ATARI && EXPERIMENTAL
|
||||
tristate "Atari DSP56k support"
|
||||
depends on ATARI
|
||||
help
|
||||
If you want to be able to use the DSP56001 in Falcons, say Y. This
|
||||
driver is still experimental, and if you don't know what it is, or
|
||||
|
@ -87,7 +87,7 @@ config HPDCA
|
|||
|
||||
config HPAPCI
|
||||
tristate "HP APCI serial support"
|
||||
depends on HP300 && SERIAL_8250 && EXPERIMENTAL
|
||||
depends on HP300 && SERIAL_8250
|
||||
help
|
||||
If you want to use the internal "APCI" serial ports on an HP400
|
||||
machine, say Y here.
|
||||
|
|
|
@ -7,6 +7,7 @@ generic-y += emergency-restart.h
|
|||
generic-y += errno.h
|
||||
generic-y += exec.h
|
||||
generic-y += futex.h
|
||||
generic-y += hw_irq.h
|
||||
generic-y += ioctl.h
|
||||
generic-y += ipcbuf.h
|
||||
generic-y += irq_regs.h
|
||||
|
@ -21,8 +22,11 @@ generic-y += percpu.h
|
|||
generic-y += resource.h
|
||||
generic-y += scatterlist.h
|
||||
generic-y += sections.h
|
||||
generic-y += shmparam.h
|
||||
generic-y += siginfo.h
|
||||
generic-y += spinlock.h
|
||||
generic-y += statfs.h
|
||||
generic-y += termios.h
|
||||
generic-y += topology.h
|
||||
generic-y += trace_clock.h
|
||||
generic-y += types.h
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#ifndef __ASM_M68K_HW_IRQ_H
|
||||
#define __ASM_M68K_HW_IRQ_H
|
||||
|
||||
/* Dummy include. */
|
||||
|
||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||
#ifndef _M68K_SHMPARAM_H
|
||||
#define _M68K_SHMPARAM_H
|
||||
|
||||
#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
|
||||
|
||||
#endif /* _M68K_SHMPARAM_H */
|
|
@ -1,6 +0,0 @@
|
|||
#ifndef __M68K_SPINLOCK_H
|
||||
#define __M68K_SPINLOCK_H
|
||||
|
||||
#error "m68k doesn't do SMP yet"
|
||||
|
||||
#endif
|
|
@ -1,50 +0,0 @@
|
|||
#ifndef _M68K_TERMIOS_H
|
||||
#define _M68K_TERMIOS_H
|
||||
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
/* 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"
|
||||
|
||||
/*
|
||||
* Translate a "termio" structure into a "termios". Ugh.
|
||||
*/
|
||||
#define user_termio_to_kernel_termios(termios, termio) \
|
||||
({ \
|
||||
unsigned short tmp; \
|
||||
get_user(tmp, &(termio)->c_iflag); \
|
||||
(termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \
|
||||
get_user(tmp, &(termio)->c_oflag); \
|
||||
(termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \
|
||||
get_user(tmp, &(termio)->c_cflag); \
|
||||
(termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \
|
||||
get_user(tmp, &(termio)->c_lflag); \
|
||||
(termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \
|
||||
get_user((termios)->c_line, &(termio)->c_line); \
|
||||
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 termios2))
|
||||
#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
|
||||
#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
|
||||
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
|
||||
|
||||
#endif /* _M68K_TERMIOS_H */
|
|
@ -1,26 +1,27 @@
|
|||
# UAPI Header export list
|
||||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += auxvec.h
|
||||
generic-y += msgbuf.h
|
||||
generic-y += sembuf.h
|
||||
generic-y += shmbuf.h
|
||||
generic-y += socket.h
|
||||
generic-y += sockios.h
|
||||
generic-y += termbits.h
|
||||
generic-y += termios.h
|
||||
|
||||
header-y += a.out.h
|
||||
header-y += auxvec.h
|
||||
header-y += byteorder.h
|
||||
header-y += cachectl.h
|
||||
header-y += fcntl.h
|
||||
header-y += ioctls.h
|
||||
header-y += msgbuf.h
|
||||
header-y += param.h
|
||||
header-y += poll.h
|
||||
header-y += posix_types.h
|
||||
header-y += ptrace.h
|
||||
header-y += sembuf.h
|
||||
header-y += setup.h
|
||||
header-y += shmbuf.h
|
||||
header-y += sigcontext.h
|
||||
header-y += signal.h
|
||||
header-y += socket.h
|
||||
header-y += sockios.h
|
||||
header-y += stat.h
|
||||
header-y += swab.h
|
||||
header-y += termbits.h
|
||||
header-y += termios.h
|
||||
header-y += unistd.h
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#ifndef __ASMm68k_AUXVEC_H
|
||||
#define __ASMm68k_AUXVEC_H
|
||||
|
||||
#endif
|
|
@ -1,31 +0,0 @@
|
|||
#ifndef _M68K_MSGBUF_H
|
||||
#define _M68K_MSGBUF_H
|
||||
|
||||
/*
|
||||
* The msqid64_ds structure for m68k architecture.
|
||||
* Note extra padding because this structure is passed back and forth
|
||||
* between kernel and user space.
|
||||
*
|
||||
* Pad space is left for:
|
||||
* - 64-bit time_t to solve y2038 problem
|
||||
* - 2 miscellaneous 32-bit values
|
||||
*/
|
||||
|
||||
struct msqid64_ds {
|
||||
struct ipc64_perm msg_perm;
|
||||
__kernel_time_t msg_stime; /* last msgsnd time */
|
||||
unsigned long __unused1;
|
||||
__kernel_time_t msg_rtime; /* last msgrcv time */
|
||||
unsigned long __unused2;
|
||||
__kernel_time_t msg_ctime; /* last change time */
|
||||
unsigned long __unused3;
|
||||
unsigned long msg_cbytes; /* current number of bytes on queue */
|
||||
unsigned long msg_qnum; /* number of messages in queue */
|
||||
unsigned long msg_qbytes; /* max number of bytes on queue */
|
||||
__kernel_pid_t msg_lspid; /* pid of last msgsnd */
|
||||
__kernel_pid_t msg_lrpid; /* last receive pid */
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
};
|
||||
|
||||
#endif /* _M68K_MSGBUF_H */
|
|
@ -1,25 +0,0 @@
|
|||
#ifndef _M68K_SEMBUF_H
|
||||
#define _M68K_SEMBUF_H
|
||||
|
||||
/*
|
||||
* The semid64_ds structure for m68k architecture.
|
||||
* Note extra padding because this structure is passed back and forth
|
||||
* between kernel and user space.
|
||||
*
|
||||
* Pad space is left for:
|
||||
* - 64-bit time_t to solve y2038 problem
|
||||
* - 2 miscellaneous 32-bit values
|
||||
*/
|
||||
|
||||
struct semid64_ds {
|
||||
struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
|
||||
__kernel_time_t sem_otime; /* last semop time */
|
||||
unsigned long __unused1;
|
||||
__kernel_time_t sem_ctime; /* last change time */
|
||||
unsigned long __unused2;
|
||||
unsigned long sem_nsems; /* no. of semaphores in array */
|
||||
unsigned long __unused3;
|
||||
unsigned long __unused4;
|
||||
};
|
||||
|
||||
#endif /* _M68K_SEMBUF_H */
|
|
@ -1,42 +0,0 @@
|
|||
#ifndef _M68K_SHMBUF_H
|
||||
#define _M68K_SHMBUF_H
|
||||
|
||||
/*
|
||||
* The shmid64_ds structure for m68k architecture.
|
||||
* Note extra padding because this structure is passed back and forth
|
||||
* between kernel and user space.
|
||||
*
|
||||
* Pad space is left for:
|
||||
* - 64-bit time_t to solve y2038 problem
|
||||
* - 2 miscellaneous 32-bit values
|
||||
*/
|
||||
|
||||
struct shmid64_ds {
|
||||
struct ipc64_perm shm_perm; /* operation perms */
|
||||
size_t shm_segsz; /* size of segment (bytes) */
|
||||
__kernel_time_t shm_atime; /* last attach time */
|
||||
unsigned long __unused1;
|
||||
__kernel_time_t shm_dtime; /* last detach time */
|
||||
unsigned long __unused2;
|
||||
__kernel_time_t shm_ctime; /* last change time */
|
||||
unsigned long __unused3;
|
||||
__kernel_pid_t shm_cpid; /* pid of creator */
|
||||
__kernel_pid_t shm_lpid; /* pid of last operator */
|
||||
unsigned long shm_nattch; /* no. of current attaches */
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
};
|
||||
|
||||
struct shminfo64 {
|
||||
unsigned long shmmax;
|
||||
unsigned long shmmin;
|
||||
unsigned long shmmni;
|
||||
unsigned long shmseg;
|
||||
unsigned long shmall;
|
||||
unsigned long __unused1;
|
||||
unsigned long __unused2;
|
||||
unsigned long __unused3;
|
||||
unsigned long __unused4;
|
||||
};
|
||||
|
||||
#endif /* _M68K_SHMBUF_H */
|
|
@ -1,73 +0,0 @@
|
|||
#ifndef _ASM_SOCKET_H
|
||||
#define _ASM_SOCKET_H
|
||||
|
||||
#include <asm/sockios.h>
|
||||
|
||||
/* For setsockopt(2) */
|
||||
#define SOL_SOCKET 1
|
||||
|
||||
#define SO_DEBUG 1
|
||||
#define SO_REUSEADDR 2
|
||||
#define SO_TYPE 3
|
||||
#define SO_ERROR 4
|
||||
#define SO_DONTROUTE 5
|
||||
#define SO_BROADCAST 6
|
||||
#define SO_SNDBUF 7
|
||||
#define SO_RCVBUF 8
|
||||
#define SO_SNDBUFFORCE 32
|
||||
#define SO_RCVBUFFORCE 33
|
||||
#define SO_KEEPALIVE 9
|
||||
#define SO_OOBINLINE 10
|
||||
#define SO_NO_CHECK 11
|
||||
#define SO_PRIORITY 12
|
||||
#define SO_LINGER 13
|
||||
#define SO_BSDCOMPAT 14
|
||||
/* To add :#define SO_REUSEPORT 15 */
|
||||
#define SO_PASSCRED 16
|
||||
#define SO_PEERCRED 17
|
||||
#define SO_RCVLOWAT 18
|
||||
#define SO_SNDLOWAT 19
|
||||
#define SO_RCVTIMEO 20
|
||||
#define SO_SNDTIMEO 21
|
||||
|
||||
/* Security levels - as per NRL IPv6 - don't actually do anything */
|
||||
#define SO_SECURITY_AUTHENTICATION 22
|
||||
#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
|
||||
#define SO_SECURITY_ENCRYPTION_NETWORK 24
|
||||
|
||||
#define SO_BINDTODEVICE 25
|
||||
|
||||
/* Socket filtering */
|
||||
#define SO_ATTACH_FILTER 26
|
||||
#define SO_DETACH_FILTER 27
|
||||
#define SO_GET_FILTER SO_ATTACH_FILTER
|
||||
|
||||
#define SO_PEERNAME 28
|
||||
#define SO_TIMESTAMP 29
|
||||
#define SCM_TIMESTAMP SO_TIMESTAMP
|
||||
|
||||
#define SO_ACCEPTCONN 30
|
||||
|
||||
#define SO_PEERSEC 31
|
||||
#define SO_PASSSEC 34
|
||||
#define SO_TIMESTAMPNS 35
|
||||
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
|
||||
|
||||
#define SO_MARK 36
|
||||
|
||||
#define SO_TIMESTAMPING 37
|
||||
#define SCM_TIMESTAMPING SO_TIMESTAMPING
|
||||
|
||||
#define SO_PROTOCOL 38
|
||||
#define SO_DOMAIN 39
|
||||
|
||||
#define SO_RXQ_OVFL 40
|
||||
|
||||
#define SO_WIFI_STATUS 41
|
||||
#define SCM_WIFI_STATUS SO_WIFI_STATUS
|
||||
#define SO_PEEK_OFF 42
|
||||
|
||||
/* Instruct lower device to use last 4-bytes of skb data as FCS */
|
||||
#define SO_NOFCS 43
|
||||
|
||||
#endif /* _ASM_SOCKET_H */
|
|
@ -1,13 +0,0 @@
|
|||
#ifndef __ARCH_M68K_SOCKIOS__
|
||||
#define __ARCH_M68K_SOCKIOS__
|
||||
|
||||
/* Socket-level I/O control calls. */
|
||||
#define FIOSETOWN 0x8901
|
||||
#define SIOCSPGRP 0x8902
|
||||
#define FIOGETOWN 0x8903
|
||||
#define SIOCGPGRP 0x8904
|
||||
#define SIOCATMARK 0x8905
|
||||
#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
|
||||
#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
|
||||
|
||||
#endif /* __ARCH_M68K_SOCKIOS__ */
|
|
@ -1,201 +0,0 @@
|
|||
#ifndef __ARCH_M68K_TERMBITS_H__
|
||||
#define __ARCH_M68K_TERMBITS_H__
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
|
||||
typedef unsigned char cc_t;
|
||||
typedef unsigned int speed_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
|
||||
#define NCCS 19
|
||||
struct termios {
|
||||
tcflag_t c_iflag; /* input mode flags */
|
||||
tcflag_t c_oflag; /* output mode flags */
|
||||
tcflag_t c_cflag; /* control mode flags */
|
||||
tcflag_t c_lflag; /* local mode flags */
|
||||
cc_t c_line; /* line discipline */
|
||||
cc_t c_cc[NCCS]; /* control characters */
|
||||
};
|
||||
|
||||
struct termios2 {
|
||||
tcflag_t c_iflag; /* input mode flags */
|
||||
tcflag_t c_oflag; /* output mode flags */
|
||||
tcflag_t c_cflag; /* control mode flags */
|
||||
tcflag_t c_lflag; /* local mode flags */
|
||||
cc_t c_line; /* line discipline */
|
||||
cc_t c_cc[NCCS]; /* control characters */
|
||||
speed_t c_ispeed; /* input speed */
|
||||
speed_t c_ospeed; /* output speed */
|
||||
};
|
||||
|
||||
struct ktermios {
|
||||
tcflag_t c_iflag; /* input mode flags */
|
||||
tcflag_t c_oflag; /* output mode flags */
|
||||
tcflag_t c_cflag; /* control mode flags */
|
||||
tcflag_t c_lflag; /* local mode flags */
|
||||
cc_t c_line; /* line discipline */
|
||||
cc_t c_cc[NCCS]; /* control characters */
|
||||
speed_t c_ispeed; /* input speed */
|
||||
speed_t c_ospeed; /* output speed */
|
||||
};
|
||||
|
||||
/* c_cc characters */
|
||||
#define VINTR 0
|
||||
#define VQUIT 1
|
||||
#define VERASE 2
|
||||
#define VKILL 3
|
||||
#define VEOF 4
|
||||
#define VTIME 5
|
||||
#define VMIN 6
|
||||
#define VSWTC 7
|
||||
#define VSTART 8
|
||||
#define VSTOP 9
|
||||
#define VSUSP 10
|
||||
#define VEOL 11
|
||||
#define VREPRINT 12
|
||||
#define VDISCARD 13
|
||||
#define VWERASE 14
|
||||
#define VLNEXT 15
|
||||
#define VEOL2 16
|
||||
|
||||
|
||||
/* c_iflag bits */
|
||||
#define IGNBRK 0000001
|
||||
#define BRKINT 0000002
|
||||
#define IGNPAR 0000004
|
||||
#define PARMRK 0000010
|
||||
#define INPCK 0000020
|
||||
#define ISTRIP 0000040
|
||||
#define INLCR 0000100
|
||||
#define IGNCR 0000200
|
||||
#define ICRNL 0000400
|
||||
#define IUCLC 0001000
|
||||
#define IXON 0002000
|
||||
#define IXANY 0004000
|
||||
#define IXOFF 0010000
|
||||
#define IMAXBEL 0020000
|
||||
#define IUTF8 0040000
|
||||
|
||||
/* c_oflag bits */
|
||||
#define OPOST 0000001
|
||||
#define OLCUC 0000002
|
||||
#define ONLCR 0000004
|
||||
#define OCRNL 0000010
|
||||
#define ONOCR 0000020
|
||||
#define ONLRET 0000040
|
||||
#define OFILL 0000100
|
||||
#define OFDEL 0000200
|
||||
#define NLDLY 0000400
|
||||
#define NL0 0000000
|
||||
#define NL1 0000400
|
||||
#define CRDLY 0003000
|
||||
#define CR0 0000000
|
||||
#define CR1 0001000
|
||||
#define CR2 0002000
|
||||
#define CR3 0003000
|
||||
#define TABDLY 0014000
|
||||
#define TAB0 0000000
|
||||
#define TAB1 0004000
|
||||
#define TAB2 0010000
|
||||
#define TAB3 0014000
|
||||
#define XTABS 0014000
|
||||
#define BSDLY 0020000
|
||||
#define BS0 0000000
|
||||
#define BS1 0020000
|
||||
#define VTDLY 0040000
|
||||
#define VT0 0000000
|
||||
#define VT1 0040000
|
||||
#define FFDLY 0100000
|
||||
#define FF0 0000000
|
||||
#define FF1 0100000
|
||||
|
||||
/* c_cflag bit meaning */
|
||||
#define CBAUD 0010017
|
||||
#define B0 0000000 /* hang up */
|
||||
#define B50 0000001
|
||||
#define B75 0000002
|
||||
#define B110 0000003
|
||||
#define B134 0000004
|
||||
#define B150 0000005
|
||||
#define B200 0000006
|
||||
#define B300 0000007
|
||||
#define B600 0000010
|
||||
#define B1200 0000011
|
||||
#define B1800 0000012
|
||||
#define B2400 0000013
|
||||
#define B4800 0000014
|
||||
#define B9600 0000015
|
||||
#define B19200 0000016
|
||||
#define B38400 0000017
|
||||
#define EXTA B19200
|
||||
#define EXTB B38400
|
||||
#define CSIZE 0000060
|
||||
#define CS5 0000000
|
||||
#define CS6 0000020
|
||||
#define CS7 0000040
|
||||
#define CS8 0000060
|
||||
#define CSTOPB 0000100
|
||||
#define CREAD 0000200
|
||||
#define PARENB 0000400
|
||||
#define PARODD 0001000
|
||||
#define HUPCL 0002000
|
||||
#define CLOCAL 0004000
|
||||
#define CBAUDEX 0010000
|
||||
#define BOTHER 0010000
|
||||
#define B57600 0010001
|
||||
#define B115200 0010002
|
||||
#define B230400 0010003
|
||||
#define B460800 0010004
|
||||
#define B500000 0010005
|
||||
#define B576000 0010006
|
||||
#define B921600 0010007
|
||||
#define B1000000 0010010
|
||||
#define B1152000 0010011
|
||||
#define B1500000 0010012
|
||||
#define B2000000 0010013
|
||||
#define B2500000 0010014
|
||||
#define B3000000 0010015
|
||||
#define B3500000 0010016
|
||||
#define B4000000 0010017
|
||||
#define CIBAUD 002003600000 /* input baud rate */
|
||||
#define CMSPAR 010000000000 /* mark or space (stick) parity */
|
||||
#define CRTSCTS 020000000000 /* flow control */
|
||||
|
||||
#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
|
||||
|
||||
/* c_lflag bits */
|
||||
#define ISIG 0000001
|
||||
#define ICANON 0000002
|
||||
#define XCASE 0000004
|
||||
#define ECHO 0000010
|
||||
#define ECHOE 0000020
|
||||
#define ECHOK 0000040
|
||||
#define ECHONL 0000100
|
||||
#define NOFLSH 0000200
|
||||
#define TOSTOP 0000400
|
||||
#define ECHOCTL 0001000
|
||||
#define ECHOPRT 0002000
|
||||
#define ECHOKE 0004000
|
||||
#define FLUSHO 0010000
|
||||
#define PENDIN 0040000
|
||||
#define IEXTEN 0100000
|
||||
#define EXTPROC 0200000
|
||||
|
||||
|
||||
/* tcflow() and TCXONC use these */
|
||||
#define TCOOFF 0
|
||||
#define TCOON 1
|
||||
#define TCIOFF 2
|
||||
#define TCION 3
|
||||
|
||||
/* tcflush() and TCFLSH use these */
|
||||
#define TCIFLUSH 0
|
||||
#define TCOFLUSH 1
|
||||
#define TCIOFLUSH 2
|
||||
|
||||
/* tcsetattr uses these */
|
||||
#define TCSANOW 0
|
||||
#define TCSADRAIN 1
|
||||
#define TCSAFLUSH 2
|
||||
|
||||
#endif /* __ARCH_M68K_TERMBITS_H__ */
|
|
@ -1,44 +0,0 @@
|
|||
#ifndef _UAPI_M68K_TERMIOS_H
|
||||
#define _UAPI_M68K_TERMIOS_H
|
||||
|
||||
#include <asm/termbits.h>
|
||||
#include <asm/ioctls.h>
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
unsigned short c_oflag; /* output mode flags */
|
||||
unsigned short c_cflag; /* control mode flags */
|
||||
unsigned short c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
|
||||
/* modem lines */
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
#define TIOCM_ST 0x008
|
||||
#define TIOCM_SR 0x010
|
||||
#define TIOCM_CTS 0x020
|
||||
#define TIOCM_CAR 0x040
|
||||
#define TIOCM_RNG 0x080
|
||||
#define TIOCM_DSR 0x100
|
||||
#define TIOCM_CD TIOCM_CAR
|
||||
#define TIOCM_RI TIOCM_RNG
|
||||
#define TIOCM_OUT1 0x2000
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
|
||||
|
||||
|
||||
#endif /* _UAPI_M68K_TERMIOS_H */
|
|
@ -506,7 +506,7 @@ static inline void bus_error030 (struct frame *fp)
|
|||
addr -= 2;
|
||||
|
||||
if (buserr_type & SUN3_BUSERR_INVALID) {
|
||||
if (!mmu_emu_handle_fault (fp->un.fmtb.daddr, 1, 0))
|
||||
if (!mmu_emu_handle_fault(addr, 1, 0))
|
||||
do_page_fault (&fp->ptregs, addr, 0);
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -1,5 +1,225 @@
|
|||
#ifdef CONFIG_MMU
|
||||
#include "init_mm.c"
|
||||
#else
|
||||
#include "init_no.c"
|
||||
/*
|
||||
* linux/arch/m68k/mm/init.c
|
||||
*
|
||||
* Copyright (C) 1995 Hamish Macdonald
|
||||
*
|
||||
* Contains common initialization routines, specific init code moved
|
||||
* to motorola.c and sun3mmu.c
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/swap.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/gfp.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/io.h>
|
||||
#ifdef CONFIG_ATARI
|
||||
#include <asm/atari_stram.h>
|
||||
#endif
|
||||
#include <asm/sections.h>
|
||||
#include <asm/tlb.h>
|
||||
|
||||
/*
|
||||
* ZERO_PAGE is a special page that is used for zero-initialized
|
||||
* data and COW.
|
||||
*/
|
||||
void *empty_zero_page;
|
||||
EXPORT_SYMBOL(empty_zero_page);
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
pg_data_t pg_data_map[MAX_NUMNODES];
|
||||
EXPORT_SYMBOL(pg_data_map);
|
||||
|
||||
int m68k_virt_to_node_shift;
|
||||
|
||||
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
|
||||
pg_data_t *pg_data_table[65];
|
||||
EXPORT_SYMBOL(pg_data_table);
|
||||
#endif
|
||||
|
||||
void __init m68k_setup_node(int node)
|
||||
{
|
||||
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
|
||||
struct mem_info *info = m68k_memory + node;
|
||||
int i, end;
|
||||
|
||||
i = (unsigned long)phys_to_virt(info->addr) >> __virt_to_node_shift();
|
||||
end = (unsigned long)phys_to_virt(info->addr + info->size - 1) >> __virt_to_node_shift();
|
||||
for (; i <= end; i++) {
|
||||
if (pg_data_table[i])
|
||||
printk("overlap at %u for chunk %u\n", i, node);
|
||||
pg_data_table[i] = pg_data_map + node;
|
||||
}
|
||||
#endif
|
||||
pg_data_map[node].bdata = bootmem_node_data + node;
|
||||
node_set_online(node);
|
||||
}
|
||||
|
||||
extern void init_pointer_table(unsigned long ptable);
|
||||
extern pmd_t *zero_pgtable;
|
||||
|
||||
#else /* CONFIG_MMU */
|
||||
|
||||
/*
|
||||
* paging_init() continues the virtual memory environment setup which
|
||||
* was begun by the code in arch/head.S.
|
||||
* The parameters are pointers to where to stick the starting and ending
|
||||
* addresses of available kernel virtual memory.
|
||||
*/
|
||||
void __init paging_init(void)
|
||||
{
|
||||
/*
|
||||
* Make sure start_mem is page aligned, otherwise bootmem and
|
||||
* page_alloc get different views of the world.
|
||||
*/
|
||||
unsigned long end_mem = memory_end & PAGE_MASK;
|
||||
unsigned long zones_size[MAX_NR_ZONES] = { 0, };
|
||||
|
||||
high_memory = (void *) end_mem;
|
||||
|
||||
empty_zero_page = alloc_bootmem_pages(PAGE_SIZE);
|
||||
memset(empty_zero_page, 0, PAGE_SIZE);
|
||||
|
||||
/*
|
||||
* Set up SFC/DFC registers (user data space).
|
||||
*/
|
||||
set_fs (USER_DS);
|
||||
|
||||
zones_size[ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT;
|
||||
free_area_init(zones_size);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
void free_initmem(void)
|
||||
{
|
||||
#ifndef CONFIG_MMU_SUN3
|
||||
unsigned long addr;
|
||||
|
||||
addr = (unsigned long) __init_begin;
|
||||
for (; addr < ((unsigned long) __init_end); addr += PAGE_SIZE) {
|
||||
ClearPageReserved(virt_to_page(addr));
|
||||
init_page_count(virt_to_page(addr));
|
||||
free_page(addr);
|
||||
totalram_pages++;
|
||||
}
|
||||
pr_notice("Freeing unused kernel memory: %luk freed (0x%x - 0x%x)\n",
|
||||
(addr - (unsigned long) __init_begin) >> 10,
|
||||
(unsigned int) __init_begin, (unsigned int) __init_end);
|
||||
#endif /* CONFIG_MMU_SUN3 */
|
||||
}
|
||||
|
||||
#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)
|
||||
#define VECTORS &vectors[0]
|
||||
#else
|
||||
#define VECTORS _ramvec
|
||||
#endif
|
||||
|
||||
void __init print_memmap(void)
|
||||
{
|
||||
#define UL(x) ((unsigned long) (x))
|
||||
#define MLK(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 10
|
||||
#define MLM(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 20
|
||||
#define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), 1024)
|
||||
|
||||
pr_notice("Virtual kernel memory layout:\n"
|
||||
" vector : 0x%08lx - 0x%08lx (%4ld KiB)\n"
|
||||
" kmap : 0x%08lx - 0x%08lx (%4ld MiB)\n"
|
||||
" vmalloc : 0x%08lx - 0x%08lx (%4ld MiB)\n"
|
||||
" lowmem : 0x%08lx - 0x%08lx (%4ld MiB)\n"
|
||||
" .init : 0x%p" " - 0x%p" " (%4d KiB)\n"
|
||||
" .text : 0x%p" " - 0x%p" " (%4d KiB)\n"
|
||||
" .data : 0x%p" " - 0x%p" " (%4d KiB)\n"
|
||||
" .bss : 0x%p" " - 0x%p" " (%4d KiB)\n",
|
||||
MLK(VECTORS, VECTORS + 256),
|
||||
MLM(KMAP_START, KMAP_END),
|
||||
MLM(VMALLOC_START, VMALLOC_END),
|
||||
MLM(PAGE_OFFSET, (unsigned long)high_memory),
|
||||
MLK_ROUNDUP(__init_begin, __init_end),
|
||||
MLK_ROUNDUP(_stext, _etext),
|
||||
MLK_ROUNDUP(_sdata, _edata),
|
||||
MLK_ROUNDUP(__bss_start, __bss_stop));
|
||||
}
|
||||
|
||||
void __init mem_init(void)
|
||||
{
|
||||
pg_data_t *pgdat;
|
||||
int codepages = 0;
|
||||
int datapages = 0;
|
||||
int initpages = 0;
|
||||
int i;
|
||||
|
||||
/* this will put all memory onto the freelists */
|
||||
totalram_pages = num_physpages = 0;
|
||||
for_each_online_pgdat(pgdat) {
|
||||
num_physpages += pgdat->node_present_pages;
|
||||
|
||||
totalram_pages += free_all_bootmem_node(pgdat);
|
||||
for (i = 0; i < pgdat->node_spanned_pages; i++) {
|
||||
struct page *page = pgdat->node_mem_map + i;
|
||||
char *addr = page_to_virt(page);
|
||||
|
||||
if (!PageReserved(page))
|
||||
continue;
|
||||
if (addr >= _text &&
|
||||
addr < _etext)
|
||||
codepages++;
|
||||
else if (addr >= __init_begin &&
|
||||
addr < __init_end)
|
||||
initpages++;
|
||||
else
|
||||
datapages++;
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
|
||||
/* insert pointer tables allocated so far into the tablelist */
|
||||
init_pointer_table((unsigned long)kernel_pg_dir);
|
||||
for (i = 0; i < PTRS_PER_PGD; i++) {
|
||||
if (pgd_present(kernel_pg_dir[i]))
|
||||
init_pointer_table(__pgd_page(kernel_pg_dir[i]));
|
||||
}
|
||||
|
||||
/* insert also pointer table that we used to unmap the zero page */
|
||||
if (zero_pgtable)
|
||||
init_pointer_table((unsigned long)zero_pgtable);
|
||||
#endif
|
||||
|
||||
pr_info("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n",
|
||||
nr_free_pages() << (PAGE_SHIFT-10),
|
||||
totalram_pages << (PAGE_SHIFT-10),
|
||||
codepages << (PAGE_SHIFT-10),
|
||||
datapages << (PAGE_SHIFT-10),
|
||||
initpages << (PAGE_SHIFT-10));
|
||||
print_memmap();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
void free_initrd_mem(unsigned long start, unsigned long end)
|
||||
{
|
||||
int pages = 0;
|
||||
for (; start < end; start += PAGE_SIZE) {
|
||||
ClearPageReserved(virt_to_page(start));
|
||||
init_page_count(virt_to_page(start));
|
||||
free_page(start);
|
||||
totalram_pages++;
|
||||
pages++;
|
||||
}
|
||||
pr_notice("Freeing initrd memory: %dk freed\n",
|
||||
pages << (PAGE_SHIFT - 10));
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,176 +0,0 @@
|
|||
/*
|
||||
* linux/arch/m68k/mm/init.c
|
||||
*
|
||||
* Copyright (C) 1995 Hamish Macdonald
|
||||
*
|
||||
* Contains common initialization routines, specific init code moved
|
||||
* to motorola.c and sun3mmu.c
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/swap.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/gfp.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/io.h>
|
||||
#ifdef CONFIG_ATARI
|
||||
#include <asm/atari_stram.h>
|
||||
#endif
|
||||
#include <asm/sections.h>
|
||||
#include <asm/tlb.h>
|
||||
|
||||
pg_data_t pg_data_map[MAX_NUMNODES];
|
||||
EXPORT_SYMBOL(pg_data_map);
|
||||
|
||||
int m68k_virt_to_node_shift;
|
||||
|
||||
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
|
||||
pg_data_t *pg_data_table[65];
|
||||
EXPORT_SYMBOL(pg_data_table);
|
||||
#endif
|
||||
|
||||
void __init m68k_setup_node(int node)
|
||||
{
|
||||
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
|
||||
struct mem_info *info = m68k_memory + node;
|
||||
int i, end;
|
||||
|
||||
i = (unsigned long)phys_to_virt(info->addr) >> __virt_to_node_shift();
|
||||
end = (unsigned long)phys_to_virt(info->addr + info->size - 1) >> __virt_to_node_shift();
|
||||
for (; i <= end; i++) {
|
||||
if (pg_data_table[i])
|
||||
printk("overlap at %u for chunk %u\n", i, node);
|
||||
pg_data_table[i] = pg_data_map + node;
|
||||
}
|
||||
#endif
|
||||
pg_data_map[node].bdata = bootmem_node_data + node;
|
||||
node_set_online(node);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ZERO_PAGE is a special page that is used for zero-initialized
|
||||
* data and COW.
|
||||
*/
|
||||
|
||||
void *empty_zero_page;
|
||||
EXPORT_SYMBOL(empty_zero_page);
|
||||
|
||||
extern void init_pointer_table(unsigned long ptable);
|
||||
|
||||
/* References to section boundaries */
|
||||
|
||||
extern pmd_t *zero_pgtable;
|
||||
|
||||
#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)
|
||||
#define VECTORS &vectors[0]
|
||||
#else
|
||||
#define VECTORS _ramvec
|
||||
#endif
|
||||
|
||||
void __init print_memmap(void)
|
||||
{
|
||||
#define UL(x) ((unsigned long) (x))
|
||||
#define MLK(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 10
|
||||
#define MLM(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 20
|
||||
#define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), 1024)
|
||||
|
||||
pr_notice("Virtual kernel memory layout:\n"
|
||||
" vector : 0x%08lx - 0x%08lx (%4ld KiB)\n"
|
||||
" kmap : 0x%08lx - 0x%08lx (%4ld MiB)\n"
|
||||
" vmalloc : 0x%08lx - 0x%08lx (%4ld MiB)\n"
|
||||
" lowmem : 0x%08lx - 0x%08lx (%4ld MiB)\n"
|
||||
" .init : 0x%p" " - 0x%p" " (%4d KiB)\n"
|
||||
" .text : 0x%p" " - 0x%p" " (%4d KiB)\n"
|
||||
" .data : 0x%p" " - 0x%p" " (%4d KiB)\n"
|
||||
" .bss : 0x%p" " - 0x%p" " (%4d KiB)\n",
|
||||
MLK(VECTORS, VECTORS + 256),
|
||||
MLM(KMAP_START, KMAP_END),
|
||||
MLM(VMALLOC_START, VMALLOC_END),
|
||||
MLM(PAGE_OFFSET, (unsigned long)high_memory),
|
||||
MLK_ROUNDUP(__init_begin, __init_end),
|
||||
MLK_ROUNDUP(_stext, _etext),
|
||||
MLK_ROUNDUP(_sdata, _edata),
|
||||
MLK_ROUNDUP(__bss_start, __bss_stop));
|
||||
}
|
||||
|
||||
void __init mem_init(void)
|
||||
{
|
||||
pg_data_t *pgdat;
|
||||
int codepages = 0;
|
||||
int datapages = 0;
|
||||
int initpages = 0;
|
||||
int i;
|
||||
|
||||
/* this will put all memory onto the freelists */
|
||||
totalram_pages = num_physpages = 0;
|
||||
for_each_online_pgdat(pgdat) {
|
||||
num_physpages += pgdat->node_present_pages;
|
||||
|
||||
totalram_pages += free_all_bootmem_node(pgdat);
|
||||
for (i = 0; i < pgdat->node_spanned_pages; i++) {
|
||||
struct page *page = pgdat->node_mem_map + i;
|
||||
char *addr = page_to_virt(page);
|
||||
|
||||
if (!PageReserved(page))
|
||||
continue;
|
||||
if (addr >= _text &&
|
||||
addr < _etext)
|
||||
codepages++;
|
||||
else if (addr >= __init_begin &&
|
||||
addr < __init_end)
|
||||
initpages++;
|
||||
else
|
||||
datapages++;
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
|
||||
/* insert pointer tables allocated so far into the tablelist */
|
||||
init_pointer_table((unsigned long)kernel_pg_dir);
|
||||
for (i = 0; i < PTRS_PER_PGD; i++) {
|
||||
if (pgd_present(kernel_pg_dir[i]))
|
||||
init_pointer_table(__pgd_page(kernel_pg_dir[i]));
|
||||
}
|
||||
|
||||
/* insert also pointer table that we used to unmap the zero page */
|
||||
if (zero_pgtable)
|
||||
init_pointer_table((unsigned long)zero_pgtable);
|
||||
#endif
|
||||
|
||||
printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n",
|
||||
nr_free_pages() << (PAGE_SHIFT-10),
|
||||
totalram_pages << (PAGE_SHIFT-10),
|
||||
codepages << (PAGE_SHIFT-10),
|
||||
datapages << (PAGE_SHIFT-10),
|
||||
initpages << (PAGE_SHIFT-10));
|
||||
print_memmap();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
void free_initrd_mem(unsigned long start, unsigned long end)
|
||||
{
|
||||
int pages = 0;
|
||||
for (; start < end; start += PAGE_SIZE) {
|
||||
ClearPageReserved(virt_to_page(start));
|
||||
init_page_count(virt_to_page(start));
|
||||
free_page(start);
|
||||
totalram_pages++;
|
||||
pages++;
|
||||
}
|
||||
printk ("Freeing initrd memory: %dk freed\n", pages);
|
||||
}
|
||||
#endif
|
|
@ -1,145 +0,0 @@
|
|||
/*
|
||||
* linux/arch/m68knommu/mm/init.c
|
||||
*
|
||||
* Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>,
|
||||
* Kenneth Albanowski <kjahds@kjahds.com>,
|
||||
* Copyright (C) 2000 Lineo, Inc. (www.lineo.com)
|
||||
*
|
||||
* Based on:
|
||||
*
|
||||
* linux/arch/m68k/mm/init.c
|
||||
*
|
||||
* Copyright (C) 1995 Hamish Macdonald
|
||||
*
|
||||
* JAN/1999 -- hacked to support ColdFire (gerg@snapgear.com)
|
||||
* DEC/2000 -- linux 2.4 support <davidm@snapgear.com>
|
||||
*/
|
||||
|
||||
#include <linux/signal.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/mman.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/swap.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/gfp.h>
|
||||
|
||||
#include <asm/setup.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
/*
|
||||
* ZERO_PAGE is a special page that is used for zero-initialized
|
||||
* data and COW.
|
||||
*/
|
||||
void *empty_zero_page;
|
||||
|
||||
/*
|
||||
* paging_init() continues the virtual memory environment setup which
|
||||
* was begun by the code in arch/head.S.
|
||||
* The parameters are pointers to where to stick the starting and ending
|
||||
* addresses of available kernel virtual memory.
|
||||
*/
|
||||
void __init paging_init(void)
|
||||
{
|
||||
/*
|
||||
* Make sure start_mem is page aligned, otherwise bootmem and
|
||||
* page_alloc get different views of the world.
|
||||
*/
|
||||
unsigned long end_mem = memory_end & PAGE_MASK;
|
||||
unsigned long zones_size[MAX_NR_ZONES] = {0, };
|
||||
|
||||
empty_zero_page = alloc_bootmem_pages(PAGE_SIZE);
|
||||
memset(empty_zero_page, 0, PAGE_SIZE);
|
||||
|
||||
/*
|
||||
* Set up SFC/DFC registers (user data space).
|
||||
*/
|
||||
set_fs (USER_DS);
|
||||
|
||||
zones_size[ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT;
|
||||
free_area_init(zones_size);
|
||||
}
|
||||
|
||||
void __init mem_init(void)
|
||||
{
|
||||
int codek = 0, datak = 0, initk = 0;
|
||||
unsigned long tmp;
|
||||
unsigned long len = _ramend - _rambase;
|
||||
unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */
|
||||
unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */
|
||||
|
||||
pr_debug("Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
|
||||
|
||||
end_mem &= PAGE_MASK;
|
||||
high_memory = (void *) end_mem;
|
||||
|
||||
start_mem = PAGE_ALIGN(start_mem);
|
||||
max_mapnr = num_physpages = (((unsigned long) high_memory) - PAGE_OFFSET) >> PAGE_SHIFT;
|
||||
|
||||
/* this will put all memory onto the freelists */
|
||||
totalram_pages = free_all_bootmem();
|
||||
|
||||
codek = (_etext - _stext) >> 10;
|
||||
datak = (__bss_stop - _sdata) >> 10;
|
||||
initk = (__init_begin - __init_end) >> 10;
|
||||
|
||||
tmp = nr_free_pages() << PAGE_SHIFT;
|
||||
printk(KERN_INFO "Memory available: %luk/%luk RAM, (%dk kernel code, %dk data)\n",
|
||||
tmp >> 10,
|
||||
len >> 10,
|
||||
codek,
|
||||
datak
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
void free_initrd_mem(unsigned long start, unsigned long end)
|
||||
{
|
||||
int pages = 0;
|
||||
for (; start < end; start += PAGE_SIZE) {
|
||||
ClearPageReserved(virt_to_page(start));
|
||||
init_page_count(virt_to_page(start));
|
||||
free_page(start);
|
||||
totalram_pages++;
|
||||
pages++;
|
||||
}
|
||||
pr_notice("Freeing initrd memory: %luk freed\n",
|
||||
pages * (PAGE_SIZE / 1024));
|
||||
}
|
||||
#endif
|
||||
|
||||
void free_initmem(void)
|
||||
{
|
||||
#ifdef CONFIG_RAMKERNEL
|
||||
unsigned long addr;
|
||||
/*
|
||||
* The following code should be cool even if these sections
|
||||
* are not page aligned.
|
||||
*/
|
||||
addr = PAGE_ALIGN((unsigned long) __init_begin);
|
||||
/* next to check that the page we free is not a partial page */
|
||||
for (; addr + PAGE_SIZE < ((unsigned long) __init_end); addr += PAGE_SIZE) {
|
||||
ClearPageReserved(virt_to_page(addr));
|
||||
init_page_count(virt_to_page(addr));
|
||||
free_page(addr);
|
||||
totalram_pages++;
|
||||
}
|
||||
pr_notice("Freeing unused kernel memory: %luk freed (0x%x - 0x%x)\n",
|
||||
(addr - PAGE_ALIGN((unsigned long) __init_begin)) >> 10,
|
||||
(int)(PAGE_ALIGN((unsigned long) __init_begin)),
|
||||
(int)(addr - PAGE_SIZE));
|
||||
#endif
|
||||
}
|
||||
|
|
@ -29,10 +29,6 @@ atomic_t nr_free_contexts;
|
|||
struct mm_struct *context_mm[LAST_CONTEXT+1];
|
||||
extern unsigned long num_pages;
|
||||
|
||||
void free_initmem(void)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* ColdFire paging_init derived from sun3.
|
||||
*/
|
||||
|
|
|
@ -304,17 +304,3 @@ void __init paging_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
void free_initmem(void)
|
||||
{
|
||||
unsigned long addr;
|
||||
|
||||
addr = (unsigned long)__init_begin;
|
||||
for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) {
|
||||
virt_to_page(addr)->flags &= ~(1 << PG_reserved);
|
||||
init_page_count(virt_to_page(addr));
|
||||
free_page(addr);
|
||||
totalram_pages++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,10 +30,6 @@ const char bad_pmd_string[] = "Bad pmd in pte_alloc: %08lx\n";
|
|||
|
||||
extern unsigned long num_pages;
|
||||
|
||||
void free_initmem(void)
|
||||
{
|
||||
}
|
||||
|
||||
/* For the sun3 we try to follow the i386 paging_init() more closely */
|
||||
/* start_mem and end_mem have PAGE_OFFSET added already */
|
||||
/* now sets up tables using sun3 PTEs rather than i386 as before. --m */
|
||||
|
|
|
@ -66,6 +66,8 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)
|
|||
#ifdef CONFIG_SUN3
|
||||
intersil_clear();
|
||||
#endif
|
||||
sun3_disable_irq(5);
|
||||
sun3_enable_irq(5);
|
||||
#ifdef CONFIG_SUN3
|
||||
intersil_clear();
|
||||
#endif
|
||||
|
@ -79,41 +81,18 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)
|
|||
|
||||
static irqreturn_t sun3_vec255(int irq, void *dev_id)
|
||||
{
|
||||
// intersil_clear();
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static void sun3_irq_enable(struct irq_data *data)
|
||||
{
|
||||
sun3_enable_irq(data->irq);
|
||||
};
|
||||
|
||||
static void sun3_irq_disable(struct irq_data *data)
|
||||
{
|
||||
sun3_disable_irq(data->irq);
|
||||
};
|
||||
|
||||
static struct irq_chip sun3_irq_chip = {
|
||||
.name = "sun3",
|
||||
.irq_startup = m68k_irq_startup,
|
||||
.irq_shutdown = m68k_irq_shutdown,
|
||||
.irq_enable = sun3_irq_enable,
|
||||
.irq_disable = sun3_irq_disable,
|
||||
.irq_mask = sun3_irq_disable,
|
||||
.irq_unmask = sun3_irq_enable,
|
||||
};
|
||||
|
||||
void __init sun3_init_IRQ(void)
|
||||
{
|
||||
*sun3_intreg = 1;
|
||||
|
||||
m68k_setup_irq_controller(&sun3_irq_chip, handle_level_irq, IRQ_AUTO_1,
|
||||
7);
|
||||
m68k_setup_user_interrupt(VEC_USER, 128);
|
||||
|
||||
if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL))
|
||||
if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "clock", NULL))
|
||||
pr_err("Couldn't register %s interrupt\n", "int5");
|
||||
if (request_irq(IRQ_AUTO_7, sun3_int7, 0, "int7", NULL))
|
||||
if (request_irq(IRQ_AUTO_7, sun3_int7, 0, "nmi", NULL))
|
||||
pr_err("Couldn't register %s interrupt\n", "int7");
|
||||
if (request_irq(IRQ_USER+127, sun3_vec255, 0, "vec255", NULL))
|
||||
pr_err("Couldn't register %s interrupt\n", "vec255");
|
||||
|
|
Loading…
Reference in New Issue