From 112f8b1294cc20163dc547399a0c4df5783cd89d Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Tue, 23 Oct 2012 13:01:27 -0700 Subject: arch/m68k: remove CONFIG_EXPERIMENTAL This config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it. CC: Geert Uytterhoeven Signed-off-by: Kees Cook Signed-off-by: Geert Uytterhoeven --- arch/m68k/Kconfig.bus | 4 ++-- arch/m68k/Kconfig.cpu | 3 +-- arch/m68k/Kconfig.debug | 2 +- arch/m68k/Kconfig.devices | 6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) (limited to 'arch') diff --git a/arch/m68k/Kconfig.bus b/arch/m68k/Kconfig.bus index ffc0601a2a19..93ef0346b209 100644 --- a/arch/m68k/Kconfig.bus +++ b/arch/m68k/Kconfig.bus @@ -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. diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu index c4eb79edecec..2f2d87b40341 100644 --- a/arch/m68k/Kconfig.cpu +++ b/arch/m68k/Kconfig.cpu @@ -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 diff --git a/arch/m68k/Kconfig.debug b/arch/m68k/Kconfig.debug index 87233acef18b..fa12283d58fc 100644 --- a/arch/m68k/Kconfig.debug +++ b/arch/m68k/Kconfig.debug @@ -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. diff --git a/arch/m68k/Kconfig.devices b/arch/m68k/Kconfig.devices index 04a3d9be90e9..c4cdfe444c64 100644 --- a/arch/m68k/Kconfig.devices +++ b/arch/m68k/Kconfig.devices @@ -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. -- cgit v1.2.3 From 32782d51e95bb891695049033d0ba9ce0eefcd84 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:27 +1000 Subject: m68k: switch to using the asm-generic hw_irq.h We don't need a local hw_irq.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/hw_irq.h | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 arch/m68k/include/asm/hw_irq.h (limited to 'arch') diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 88fa3ac86fae..bf28713c2f15 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -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 diff --git a/arch/m68k/include/asm/hw_irq.h b/arch/m68k/include/asm/hw_irq.h deleted file mode 100644 index eacef0951fbf..000000000000 --- a/arch/m68k/include/asm/hw_irq.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_M68K_HW_IRQ_H -#define __ASM_M68K_HW_IRQ_H - -/* Dummy include. */ - -#endif -- cgit v1.2.3 From 8affd3e8122537a295bb69571a68f816a5e6867c Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:28 +1000 Subject: m68k: switch to using the asm-generic spinlock.h We don't need a local spinlock.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/spinlock.h | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 arch/m68k/include/asm/spinlock.h (limited to 'arch') diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index bf28713c2f15..a494c3eab9f2 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -23,6 +23,7 @@ generic-y += resource.h generic-y += scatterlist.h generic-y += sections.h generic-y += siginfo.h +generic-y += spinlock.h generic-y += statfs.h generic-y += topology.h generic-y += types.h diff --git a/arch/m68k/include/asm/spinlock.h b/arch/m68k/include/asm/spinlock.h deleted file mode 100644 index 20f46e27b534..000000000000 --- a/arch/m68k/include/asm/spinlock.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __M68K_SPINLOCK_H -#define __M68K_SPINLOCK_H - -#error "m68k doesn't do SMP yet" - -#endif -- cgit v1.2.3 From 395d32496ef1d4f693485c6848d670721db9042d Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:29 +1000 Subject: m68k: switch to using the asm-generic shmparam.h We don't need a local shmparam.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/shmparam.h | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 arch/m68k/include/asm/shmparam.h (limited to 'arch') diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index a494c3eab9f2..6c882877eda3 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -22,6 +22,7 @@ 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 diff --git a/arch/m68k/include/asm/shmparam.h b/arch/m68k/include/asm/shmparam.h deleted file mode 100644 index 558892a2efb3..000000000000 --- a/arch/m68k/include/asm/shmparam.h +++ /dev/null @@ -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 */ -- cgit v1.2.3 From b793eab1e318f6ef71e43239e767d04984c57da2 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:30 +1000 Subject: m68k: switch to using the asm-generic auxvec.h We don't need a local auxvec.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/uapi/asm/Kbuild | 3 ++- arch/m68k/include/uapi/asm/auxvec.h | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 arch/m68k/include/uapi/asm/auxvec.h (limited to 'arch') diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 972bce120e1e..8883a45f77c6 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -1,8 +1,9 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm +generic-y += auxvec.h + header-y += a.out.h -header-y += auxvec.h header-y += byteorder.h header-y += cachectl.h header-y += fcntl.h diff --git a/arch/m68k/include/uapi/asm/auxvec.h b/arch/m68k/include/uapi/asm/auxvec.h deleted file mode 100644 index 844d6d52204b..000000000000 --- a/arch/m68k/include/uapi/asm/auxvec.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __ASMm68k_AUXVEC_H -#define __ASMm68k_AUXVEC_H - -#endif -- cgit v1.2.3 From 316b4751c0bfcd72d68a14cce546b73131c9f188 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:31 +1000 Subject: m68k: switch to using the asm-generic msgbuf.h We don't need a local msgbuf.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/uapi/asm/Kbuild | 2 +- arch/m68k/include/uapi/asm/msgbuf.h | 31 ------------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 arch/m68k/include/uapi/asm/msgbuf.h (limited to 'arch') diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 8883a45f77c6..391ff1cec195 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -2,13 +2,13 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += auxvec.h +generic-y += msgbuf.h header-y += a.out.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 diff --git a/arch/m68k/include/uapi/asm/msgbuf.h b/arch/m68k/include/uapi/asm/msgbuf.h deleted file mode 100644 index 243cb798de8f..000000000000 --- a/arch/m68k/include/uapi/asm/msgbuf.h +++ /dev/null @@ -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 */ -- cgit v1.2.3 From 82ac6c1f06ec8e79acc87669cbc9614094ef6c69 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:32 +1000 Subject: m68k: switch to using the asm-generic sembuf.h We don't need a local sembuf.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/uapi/asm/Kbuild | 2 +- arch/m68k/include/uapi/asm/sembuf.h | 25 ------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 arch/m68k/include/uapi/asm/sembuf.h (limited to 'arch') diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 391ff1cec195..637f15a38849 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += auxvec.h generic-y += msgbuf.h +generic-y += sembuf.h header-y += a.out.h header-y += byteorder.h @@ -13,7 +14,6 @@ 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 diff --git a/arch/m68k/include/uapi/asm/sembuf.h b/arch/m68k/include/uapi/asm/sembuf.h deleted file mode 100644 index 2308052a8c24..000000000000 --- a/arch/m68k/include/uapi/asm/sembuf.h +++ /dev/null @@ -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 */ -- cgit v1.2.3 From 8e2e7656d4fac8059e35d44b7779ce1169f1a971 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:33 +1000 Subject: m68k: switch to using the asm-generic shmbuf.h We don't need a local shmbuf.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/uapi/asm/Kbuild | 2 +- arch/m68k/include/uapi/asm/shmbuf.h | 42 ------------------------------------- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 arch/m68k/include/uapi/asm/shmbuf.h (limited to 'arch') diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 637f15a38849..151b71da8f1e 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -4,6 +4,7 @@ include include/uapi/asm-generic/Kbuild.asm generic-y += auxvec.h generic-y += msgbuf.h generic-y += sembuf.h +generic-y += shmbuf.h header-y += a.out.h header-y += byteorder.h @@ -15,7 +16,6 @@ header-y += poll.h header-y += posix_types.h header-y += ptrace.h header-y += setup.h -header-y += shmbuf.h header-y += sigcontext.h header-y += signal.h header-y += socket.h diff --git a/arch/m68k/include/uapi/asm/shmbuf.h b/arch/m68k/include/uapi/asm/shmbuf.h deleted file mode 100644 index f8928d62f1b7..000000000000 --- a/arch/m68k/include/uapi/asm/shmbuf.h +++ /dev/null @@ -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 */ -- cgit v1.2.3 From 8918344ec0d39942e7b91d50d52445be92ea3229 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:34 +1000 Subject: m68k: switch to using the asm-generic socket.h We don't need a local socket.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/uapi/asm/Kbuild | 2 +- arch/m68k/include/uapi/asm/socket.h | 72 ------------------------------------- 2 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 arch/m68k/include/uapi/asm/socket.h (limited to 'arch') diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 151b71da8f1e..8b90cbd6344d 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -5,6 +5,7 @@ generic-y += auxvec.h generic-y += msgbuf.h generic-y += sembuf.h generic-y += shmbuf.h +generic-y += socket.h header-y += a.out.h header-y += byteorder.h @@ -18,7 +19,6 @@ header-y += ptrace.h header-y += setup.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 diff --git a/arch/m68k/include/uapi/asm/socket.h b/arch/m68k/include/uapi/asm/socket.h deleted file mode 100644 index d1be684edf97..000000000000 --- a/arch/m68k/include/uapi/asm/socket.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _ASM_SOCKET_H -#define _ASM_SOCKET_H - -#include - -/* 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_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 */ -- cgit v1.2.3 From b6f0b0b9bb26fe0d6376c8714303e56293735233 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:35 +1000 Subject: m68k: switch to using the asm-generic sockios.h We don't need a local sockios.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/uapi/asm/Kbuild | 2 +- arch/m68k/include/uapi/asm/sockios.h | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 arch/m68k/include/uapi/asm/sockios.h (limited to 'arch') diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 8b90cbd6344d..5218f3de23f4 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -6,6 +6,7 @@ generic-y += msgbuf.h generic-y += sembuf.h generic-y += shmbuf.h generic-y += socket.h +generic-y += sockios.h header-y += a.out.h header-y += byteorder.h @@ -19,7 +20,6 @@ header-y += ptrace.h header-y += setup.h header-y += sigcontext.h header-y += signal.h -header-y += sockios.h header-y += stat.h header-y += swab.h header-y += termbits.h diff --git a/arch/m68k/include/uapi/asm/sockios.h b/arch/m68k/include/uapi/asm/sockios.h deleted file mode 100644 index c04a23943cb7..000000000000 --- a/arch/m68k/include/uapi/asm/sockios.h +++ /dev/null @@ -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__ */ -- cgit v1.2.3 From 599a0c4e125628eae356498a88177e9fbf183e79 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:36 +1000 Subject: m68k: switch to using the asm-generic termbits.h We don't need a local termbits.h, switch to using the asm-generic version. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/uapi/asm/Kbuild | 2 +- arch/m68k/include/uapi/asm/termbits.h | 201 ---------------------------------- 2 files changed, 1 insertion(+), 202 deletions(-) delete mode 100644 arch/m68k/include/uapi/asm/termbits.h (limited to 'arch') diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 5218f3de23f4..931454eabd20 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -7,6 +7,7 @@ generic-y += sembuf.h generic-y += shmbuf.h generic-y += socket.h generic-y += sockios.h +generic-y += termbits.h header-y += a.out.h header-y += byteorder.h @@ -22,6 +23,5 @@ header-y += sigcontext.h header-y += signal.h header-y += stat.h header-y += swab.h -header-y += termbits.h header-y += termios.h header-y += unistd.h diff --git a/arch/m68k/include/uapi/asm/termbits.h b/arch/m68k/include/uapi/asm/termbits.h deleted file mode 100644 index aea1e37b765a..000000000000 --- a/arch/m68k/include/uapi/asm/termbits.h +++ /dev/null @@ -1,201 +0,0 @@ -#ifndef __ARCH_M68K_TERMBITS_H__ -#define __ARCH_M68K_TERMBITS_H__ - -#include - -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__ */ -- cgit v1.2.3 From 20e42aede9e7b78c2ffd8a03501e3090fbb78811 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 30 Oct 2012 16:24:37 +1000 Subject: m68k: switch to using the asm-generic termios.h We don't need a local termios.h, switch to using the asm-generic versions. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/termios.h | 50 ------------------------------------ arch/m68k/include/uapi/asm/Kbuild | 2 +- arch/m68k/include/uapi/asm/termios.h | 44 ------------------------------- 4 files changed, 2 insertions(+), 95 deletions(-) delete mode 100644 arch/m68k/include/asm/termios.h delete mode 100644 arch/m68k/include/uapi/asm/termios.h (limited to 'arch') diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 6c882877eda3..d62e01f869f5 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -26,6 +26,7 @@ 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 += types.h generic-y += word-at-a-time.h diff --git a/arch/m68k/include/asm/termios.h b/arch/m68k/include/asm/termios.h deleted file mode 100644 index ad8efb098663..000000000000 --- a/arch/m68k/include/asm/termios.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _M68K_TERMIOS_H -#define _M68K_TERMIOS_H - -#include - -/* 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 */ diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index 931454eabd20..1fef45ada097 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -8,6 +8,7 @@ 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 += byteorder.h @@ -23,5 +24,4 @@ header-y += sigcontext.h header-y += signal.h header-y += stat.h header-y += swab.h -header-y += termios.h header-y += unistd.h diff --git a/arch/m68k/include/uapi/asm/termios.h b/arch/m68k/include/uapi/asm/termios.h deleted file mode 100644 index ce2142c9ac1d..000000000000 --- a/arch/m68k/include/uapi/asm/termios.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _UAPI_M68K_TERMIOS_H -#define _UAPI_M68K_TERMIOS_H - -#include -#include - -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 */ -- cgit v1.2.3 From dd1cb3a7c43508c29e17836628090c0735bd3137 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Wed, 24 Oct 2012 22:36:27 +1000 Subject: m68k: merge MMU and non-MMU versions of mm/init.c Some of the code in the existing mm/init_mm.c and mm/init_no.c files is the same, and if we merge them back to a single file we can save some code duplication. Although the old mem_init() code for non-MMU was a little different than the MMU version, it turns out we can use the same code. So I now we just use the MMU mem_init() code for all. It also means we now get identical console info messages for this code on kernel boot up. So merge the two files back into a single file. Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/mm/init.c | 230 ++++++++++++++++++++++++++++++++++++++++++++++++- arch/m68k/mm/init_mm.c | 176 ------------------------------------- arch/m68k/mm/init_no.c | 145 ------------------------------- 3 files changed, 228 insertions(+), 323 deletions(-) delete mode 100644 arch/m68k/mm/init_mm.c delete mode 100644 arch/m68k/mm/init_no.c (limited to 'arch') diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index 27b5ce089a34..b0f201a409f3 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c @@ -1,5 +1,231 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#ifdef CONFIG_ATARI +#include +#endif +#include +#include + +/* + * 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 -#include "init_mm.c" + +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); +} + +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 +} + +#endif /* CONFIG_MMU */ + +#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE) +#define VECTORS &vectors[0] #else -#include "init_no.c" +#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 diff --git a/arch/m68k/mm/init_mm.c b/arch/m68k/mm/init_mm.c deleted file mode 100644 index 282f9de68966..000000000000 --- a/arch/m68k/mm/init_mm.c +++ /dev/null @@ -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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_ATARI -#include -#endif -#include -#include - -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 diff --git a/arch/m68k/mm/init_no.c b/arch/m68k/mm/init_no.c deleted file mode 100644 index 688e3664aea0..000000000000 --- a/arch/m68k/mm/init_no.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * linux/arch/m68knommu/mm/init.c - * - * Copyright (C) 1998 D. Jeff Dionne , - * Kenneth Albanowski , - * 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 - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/* - * 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 -} - -- cgit v1.2.3 From f50bf88df3ccda3e88e28f81d366dc79266a16c8 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 23 Oct 2012 13:40:36 +1000 Subject: m68k: move to a single instance of free_initmem() Currently each sub-architecture has its own implementation if init_freemem(). There is two different cases that the various implementations deal with. They either free the init memory, or they don't. We only need a single instance to cover all cases. The non-MMU version did some page alignment twidling, but this is not neccessary. The current linker script enforces page alignment. It also checked for CONFIG_RAMKERNEL, but this also is not necessary, the linker script always keeps the init sections in RAM. The MMU ColdFire version of free_initmem() was empty. There is no reason it can't carry out the freeing of the init memory. So it is now changed and tested to do this. For the other MMU cases the code is the same. For the general Motorola MMU case we free the init memory. For the SUN3 case we do nothing (though I think it could safely free the init memory as well). Signed-off-by: Greg Ungerer Signed-off-by: Geert Uytterhoeven --- arch/m68k/mm/init.c | 22 ++++++++-------------- arch/m68k/mm/mcfmmu.c | 4 ---- arch/m68k/mm/motorola.c | 14 -------------- arch/m68k/mm/sun3mmu.c | 4 ---- 4 files changed, 8 insertions(+), 36 deletions(-) (limited to 'arch') diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index b0f201a409f3..f0e05bce92f2 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c @@ -103,32 +103,26 @@ void __init paging_init(void) free_area_init(zones_size); } +#endif /* CONFIG_MMU */ + void free_initmem(void) { -#ifdef CONFIG_RAMKERNEL +#ifndef CONFIG_MMU_SUN3 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) { + 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 - PAGE_ALIGN((unsigned long) __init_begin)) >> 10, - (int)(PAGE_ALIGN((unsigned long) __init_begin)), - (int)(addr - PAGE_SIZE)); -#endif + (addr - (unsigned long) __init_begin) >> 10, + (unsigned int) __init_begin, (unsigned int) __init_end); +#endif /* CONFIG_MMU_SUN3 */ } -#endif /* CONFIG_MMU */ - #if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE) #define VECTORS &vectors[0] #else diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c index 875b800ef0dd..f58fafe7e4c9 100644 --- a/arch/m68k/mm/mcfmmu.c +++ b/arch/m68k/mm/mcfmmu.c @@ -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. */ diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 0dafa693515b..251c5437787b 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -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++; - } -} - - diff --git a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c index e0804060501e..269f81158a33 100644 --- a/arch/m68k/mm/sun3mmu.c +++ b/arch/m68k/mm/sun3mmu.c @@ -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 */ -- cgit v1.2.3 From 7f88d2c0ad7995ab862ee6da5c77c37cf447b1b3 Mon Sep 17 00:00:00 2001 From: Thomas Bogendoerfer Date: Sun, 11 Nov 2012 13:28:33 +0100 Subject: m68k/sun3: Get interrupts working again SUN3 Intregister is not for enabling individual interrupts, but to enable special interrupts. So using it for interrupt enable/disable was wrong. The clock interrupt needs some special treatment to keep ticking. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Geert Uytterhoeven --- arch/m68k/sun3/sun3ints.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'arch') diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index 78b60f53e90a..6bbca30c9188 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c @@ -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"); -- cgit v1.2.3 From 5fec45a20db3656ce36fac24639aac76c6641215 Mon Sep 17 00:00:00 2001 From: Thomas Bogendoerfer Date: Sun, 11 Nov 2012 13:28:37 +0100 Subject: m68k/sun3: Fix instruction faults We need to bring in the page where the instruction fault happened. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Geert Uytterhoeven --- arch/m68k/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index 388e5cc89599..cbc624af4494 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c @@ -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 -- cgit v1.2.3