提交 ec98c6b9 编写于 作者: D David S. Miller

[SPARC]: Remove SunOS and Solaris binary support.

As per Documentation/feature-removal-schedule.txt
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3925e6fc
......@@ -261,17 +261,6 @@ Who: Michael Buesch <mb@bu3sch.de>
---------------------------
What: Solaris/SunOS syscall and binary support on Sparc
When: 2.6.26
Why: Largely unmaintained and almost entirely unused. File system
layering used to divert library and dynamic linker searches to
/usr/gnemul is extremely buggy and unfixable. Making it work
is largely pointless as without a lot of work only the most
trivial of Solaris binaries can work with the emulation code.
Who: David S. Miller <davem@davemloft.net>
---------------------------
What: init_mm export
When: 2.6.26
Why: Not used in-tree. The current out-of-tree users used it to
......
......@@ -28,8 +28,6 @@ What's left to be done for 32-bit UIDs on all Linux architectures:
uses the 32-bit UID system calls properly otherwise.
This affects at least:
SunOS emulation
Solaris emulation
iBCS on Intel
sparc32 emulation on sparc64
......
......@@ -95,7 +95,6 @@ RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c
USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h
CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h
A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h
SOLARIS_SOCKET_MAGIC 0x000ADDED sol_socket_struct arch/sparc64/solaris/socksys.h
RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h
LSEMAGIC 0x05091998 lse drivers/fc4/fc.c
GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h
......
......@@ -27,9 +27,6 @@ config ARCH_NO_VIRT_TO_BUS
config OF
def_bool y
config ARCH_SUPPORTS_AOUT
def_bool y
config HZ
int
default 100
......@@ -257,15 +254,6 @@ config SPARC_LED
source "fs/Kconfig.binfmt"
config SUNOS_EMUL
bool "SunOS binary emulation"
help
This allows you to run most SunOS binaries. If you want to do this,
say Y here and place appropriate files in /usr/gnemul/sunos. See
<http://www.ultralinux.org/faq.html> for more information. If you
want to run SunOS binaries on an Ultra you must also say Y to
"Kernel support for 32-bit a.out binaries" above.
source "mm/Kconfig"
endmenu
......
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.23-rc1
# Wed Jul 25 15:30:21 2007
# Linux kernel version: 2.6.25
# Sun Apr 20 01:49:51 2008
#
CONFIG_MMU=y
CONFIG_HIGHMEM=y
......@@ -9,18 +9,15 @@ CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_ARCH_NO_VIRT_TO_BUS=y
CONFIG_OF=y
CONFIG_HZ=100
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
# Code maturity level options
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
......@@ -29,12 +26,23 @@ CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_USER_NS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_CGROUPS is not set
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_USER_SCHED=y
# CONFIG_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
......@@ -49,6 +57,7 @@ CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_COMPAT_BRK=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
......@@ -61,6 +70,13 @@ CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
# CONFIG_MARKERS is not set
CONFIG_HAVE_OPROFILE=y
# CONFIG_HAVE_KPROBES is not set
# CONFIG_HAVE_KRETPROBES is not set
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
......@@ -88,6 +104,7 @@ CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_CLASSIC_RCU=y
#
# General machine setup
......@@ -113,14 +130,13 @@ CONFIG_SUN_PM=y
CONFIG_PCI=y
CONFIG_PCI_SYSCALL=y
# CONFIG_ARCH_SUPPORTS_MSI is not set
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_NO_DMA is not set
CONFIG_SUN_OPENPROMFS=m
# CONFIG_SPARC_LED is not set
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=m
CONFIG_SUNOS_EMUL=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
......@@ -128,6 +144,7 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
......@@ -148,6 +165,7 @@ CONFIG_XFRM=y
CONFIG_XFRM_USER=m
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
CONFIG_NET_KEY=m
# CONFIG_NET_KEY_MIGRATE is not set
CONFIG_INET=y
......@@ -170,6 +188,7 @@ CONFIG_INET_TUNNEL=y
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=y
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
......@@ -191,8 +210,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
CONFIG_INET6_XFRM_MODE_BEET=m
# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
CONFIG_IPV6_SIT=m
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_IPV6_MROUTE is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
......@@ -214,10 +235,6 @@ CONFIG_SCTP_HMAC_MD5=y
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
......@@ -225,6 +242,7 @@ CONFIG_SCTP_HMAC_MD5=y
#
CONFIG_NET_PKTGEN=m
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_AF_RXRPC=m
......@@ -248,6 +266,7 @@ CONFIG_AF_RXRPC=m
#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
......@@ -271,7 +290,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
# CONFIG_BLK_DEV_XIP is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_MISC_DEVICES=y
......@@ -279,6 +298,8 @@ CONFIG_MISC_DEVICES=y
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ENCLOSURE_SERVICES is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
#
......@@ -318,6 +339,7 @@ CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
......@@ -338,6 +360,7 @@ CONFIG_SCSI_LOWLEVEL=y
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
......@@ -353,14 +376,7 @@ CONFIG_SCSI_SUNESP=y
# CONFIG_SCSI_SRP is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
# CONFIG_FUSION_SPI is not set
# CONFIG_FUSION_FC is not set
# CONFIG_FUSION_SAS is not set
#
# IEEE 1394 (FireWire) support
......@@ -375,6 +391,7 @@ CONFIG_DUMMY=m
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
# CONFIG_VETH is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
......@@ -388,11 +405,20 @@ CONFIG_SUNQE=m
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_NET_PCI is not set
# CONFIG_B44 is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_E1000E is not set
# CONFIG_E1000E_ENABLED is not set
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_MYRI_SBUS is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
......@@ -409,11 +435,15 @@ CONFIG_NETDEV_1000=y
CONFIG_NETDEV_10000=y
# CONFIG_CHELSIO_T1 is not set
# CONFIG_CHELSIO_T3 is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
# CONFIG_MYRI10GE is not set
# CONFIG_NETXEN_NIC is not set
# CONFIG_NIU is not set
# CONFIG_MLX4_CORE is not set
# CONFIG_TEHUTI is not set
# CONFIG_BNX2X is not set
# CONFIG_TR is not set
#
......@@ -421,13 +451,13 @@ CONFIG_NETDEV_10000=y
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set
# CONFIG_IWLWIFI_LEDS is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
......@@ -449,7 +479,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
# CONFIG_INPUT_TSDEV is not set
CONFIG_INPUT_EVDEV=m
CONFIG_INPUT_EVBUG=m
......@@ -498,6 +527,7 @@ CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set
#
# Serial drivers
......@@ -519,7 +549,6 @@ CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_IPMI_HANDLER is not set
# CONFIG_WATCHDOG is not set
CONFIG_HW_RANDOM=m
CONFIG_JS_RTC=m
# CONFIG_R3964 is not set
......@@ -538,9 +567,9 @@ CONFIG_DEVPORT=y
# CONFIG_POWER_SUPPLY is not set
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
......@@ -553,6 +582,14 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
# CONFIG_THERMAL is not set
# CONFIG_WATCHDOG is not set
#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set
#
# Multifunction device drivers
......@@ -569,15 +606,15 @@ CONFIG_HWMON=y
#
# Graphics support
#
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
#
# Console display driver support
......@@ -592,6 +629,7 @@ CONFIG_DUMMY_CONSOLE=y
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
# CONFIG_HIDRAW is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
......@@ -601,33 +639,13 @@ CONFIG_USB_ARCH_HAS_EHCI=y
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#
#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_INFINIBAND is not set
#
# Real Time Clock
#
# CONFIG_RTC_CLASS is not set
#
# DMA Engine support
#
# CONFIG_DMA_ENGINE is not set
#
# DMA Clients
#
#
# DMA Devices
#
#
# Userspace I/O
#
......@@ -664,18 +682,14 @@ CONFIG_FS_MBCACHE=y
CONFIG_FS_POSIX_ACL=y
CONFIG_XFS_FS=m
CONFIG_XFS_QUOTA=y
CONFIG_XFS_SECURITY=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_MINIX_FS is not set
CONFIG_ROMFS_FS=m
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
CONFIG_QUOTACTL=y
CONFIG_DNOTIFY=y
CONFIG_AUTOFS_FS=m
CONFIG_AUTOFS4_FS=m
# CONFIG_FUSE_FS is not set
......@@ -704,7 +718,6 @@ CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
# CONFIG_TMPFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
# CONFIG_CONFIGFS_FS is not set
#
......@@ -721,14 +734,13 @@ CONFIG_BEFS_FS=m
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
CONFIG_ROMFS_FS=m
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
......@@ -760,10 +772,6 @@ CONFIG_AFS_FS=m
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_SUN_PARTITION=y
#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
......@@ -804,21 +812,14 @@ CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
# Distributed Lock Manager
#
# CONFIG_DLM is not set
#
# Instrumentation Support
#
# CONFIG_PROFILING is not set
#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
# CONFIG_PRINTK_TIME is not set
# CONFIG_ENABLE_WARN_DEPRECATED is not set
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
......@@ -842,9 +843,12 @@ CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_LIST is not set
CONFIG_FORCED_INLINING=y
# CONFIG_DEBUG_SG is not set
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_SAMPLES is not set
# CONFIG_DEBUG_STACK_USAGE is not set
#
......@@ -853,9 +857,12 @@ CONFIG_FORCED_INLINING=y
CONFIG_KEYS=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_BLKCIPHER=y
# CONFIG_CRYPTO_SEQIV is not set
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_HMAC=y
......@@ -873,6 +880,10 @@ CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
......@@ -887,11 +898,15 @@ CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_ARC4=m
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_ANUBIS is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SALSA20 is not set
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_TEST is not set
CONFIG_CRYPTO_AUTHENC=y
# CONFIG_CRYPTO_LZO is not set
# CONFIG_CRYPTO_HW is not set
#
......
......@@ -9,9 +9,9 @@ EXTRA_AFLAGS := -ansi
IRQ_OBJS := irq.o sun4m_irq.o sun4c_irq.o sun4d_irq.o
obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \
process.o signal.o ioport.o setup.o idprom.o \
sys_sparc.o sunos_asm.o systbls.o \
time.o windows.o cpu.o devices.o sclow.o \
tadpole.o tick14.o ptrace.o sys_solaris.o \
sys_sparc.o systbls.o \
time.o windows.o cpu.o devices.o \
tadpole.o tick14.o ptrace.o \
unaligned.o una_asm.o muldiv.o \
prom.o of_device.o devres.o
......@@ -25,7 +25,3 @@ obj-$(CONFIG_PCI) += ebus.o
obj-$(CONFIG_SUN_PM) += apc.o pmc.o
obj-$(CONFIG_MODULES) += module.o sparc_ksyms.o
obj-$(CONFIG_SPARC_LED) += led.o
ifdef CONFIG_SUNOS_EMUL
obj-y += sys_sunos.o sunos_ioctl.o
endif
......@@ -1186,36 +1186,6 @@ srmmu_fault:
RESTORE_ALL
#ifdef CONFIG_SUNOS_EMUL
/* SunOS uses syscall zero as the 'indirect syscall' it looks
* like indir_syscall(scall_num, arg0, arg1, arg2...); etc.
* This is complete brain damage.
*/
.globl sunos_indir
sunos_indir:
mov %o7, %l4
cmp %o0, NR_SYSCALLS
blu,a 1f
sll %o0, 0x2, %o0
sethi %hi(sunos_nosys), %l6
b 2f
or %l6, %lo(sunos_nosys), %l6
1:
set sunos_sys_table, %l7
ld [%l7 + %o0], %l6
2:
mov %o1, %o0
mov %o2, %o1
mov %o3, %o2
mov %o4, %o3
mov %o5, %o4
call %l6
mov %l4, %o7
#endif
.align 4
.globl sys_nis_syscall
sys_nis_syscall:
......@@ -1232,6 +1202,16 @@ sys_execve:
call sparc_execve
mov %l5, %o7
.globl sunos_execv
sunos_execv:
st %g0, [%sp + STACKFRAME_SZ + PT_I2]
call sparc_execve
add %sp, STACKFRAME_SZ, %o0
b ret_sys_call
ld [%sp + STACKFRAME_SZ + PT_I0], %o0
.align 4
.globl sys_pipe
sys_pipe:
......@@ -1394,7 +1374,7 @@ ret_from_fork:
b ret_sys_call
ld [%sp + STACKFRAME_SZ + PT_I0], %o0
/* Linux native and SunOS system calls enter here... */
/* Linux native system calls enter here... */
.align 4
.globl linux_sparc_syscall
linux_sparc_syscall:
......@@ -1472,170 +1452,6 @@ linux_syscall_trace2:
st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
/*
* Solaris system calls and indirect system calls enter here.
*
* I have named the solaris indirect syscalls like that because
* it seems like Solaris has some fast path syscalls that can
* be handled as indirect system calls. - mig
*/
linux_syscall_for_solaris:
sethi %hi(sys_call_table), %l7
b linux_sparc_syscall
or %l7, %lo(sys_call_table), %l7
.align 4
.globl solaris_syscall
solaris_syscall:
cmp %g1,59
be linux_syscall_for_solaris
cmp %g1,2
be linux_syscall_for_solaris
cmp %g1,42
be linux_syscall_for_solaris
cmp %g1,119
be,a linux_syscall_for_solaris
mov 2, %g1
1:
SAVE_ALL_HEAD
rd %wim, %l3
wr %l0, PSR_ET, %psr
nop
nop
mov %i0, %l5
call do_solaris_syscall
add %sp, STACKFRAME_SZ, %o0
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
set PSR_C, %g2
cmp %o0, -ERESTART_RESTARTBLOCK
bgeu 1f
ld [%sp + STACKFRAME_SZ + PT_PSR], %g3
/* System call success, clear Carry condition code. */
andn %g3, %g2, %g3
clr %l6
b 2f
st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
1:
/* System call failure, set Carry condition code.
* Also, get abs(errno) to return to the process.
*/
sub %g0, %o0, %o0
mov 1, %l6
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
or %g3, %g2, %g3
st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
/* Advance the pc and npc over the trap instruction.
* If the npc is unaligned (has a 1 in the lower byte), it means
* the kernel does not want us to play magic (ie, skipping over
* traps). Mainly when the Solaris code wants to set some PC and
* nPC (setcontext).
*/
2:
ld [%sp + STACKFRAME_SZ + PT_NPC], %l1 /* pc = npc */
andcc %l1, 1, %g0
bne 1f
add %l1, 0x4, %l2 /* npc = npc+4 */
st %l1, [%sp + STACKFRAME_SZ + PT_PC]
b ret_trap_entry
st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
/* kernel knows what it is doing, fixup npc and continue */
1:
sub %l1, 1, %l1
b ret_trap_entry
st %l1, [%sp + STACKFRAME_SZ + PT_NPC]
#ifndef CONFIG_SUNOS_EMUL
.align 4
.globl sunos_syscall
sunos_syscall:
SAVE_ALL_HEAD
rd %wim, %l3
wr %l0, PSR_ET, %psr
nop
nop
mov %i0, %l5
call do_sunos_syscall
add %sp, STACKFRAME_SZ, %o0
#endif
/* {net, open}bsd system calls enter here... */
.align 4
.globl bsd_syscall
bsd_syscall:
/* Direct access to user regs, must faster. */
cmp %g1, NR_SYSCALLS
blu,a 1f
sll %g1, 2, %l4
set sys_ni_syscall, %l7
b bsd_is_too_hard
nop
1:
ld [%l7 + %l4], %l7
.globl bsd_is_too_hard
bsd_is_too_hard:
rd %wim, %l3
SAVE_ALL
wr %l0, PSR_ET, %psr
WRITE_PAUSE
2:
mov %i0, %o0
mov %i1, %o1
mov %i2, %o2
mov %i0, %l5
mov %i3, %o3
mov %i4, %o4
call %l7
mov %i5, %o5
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
set PSR_C, %g2
cmp %o0, -ERESTART_RESTARTBLOCK
bgeu 1f
ld [%sp + STACKFRAME_SZ + PT_PSR], %g3
/* System call success, clear Carry condition code. */
andn %g3, %g2, %g3
clr %l6
b 2f
st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
1:
/* System call failure, set Carry condition code.
* Also, get abs(errno) to return to the process.
*/
sub %g0, %o0, %o0
#if 0 /* XXX todo XXX */
sethi %hi(bsd_xlatb_rorl), %o3
or %o3, %lo(bsd_xlatb_rorl), %o3
sll %o0, 2, %o0
ld [%o3 + %o0], %o0
#endif
mov 1, %l6
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
or %g3, %g2, %g3
st %g3, [%sp + STACKFRAME_SZ + PT_PSR]
/* Advance the pc and npc over the trap instruction. */
2:
ld [%sp + STACKFRAME_SZ + PT_NPC], %l1 /* pc = npc */
add %l1, 0x4, %l2 /* npc = npc+4 */
st %l1, [%sp + STACKFRAME_SZ + PT_PC]
b ret_trap_entry
st %l2, [%sp + STACKFRAME_SZ + PT_NPC]
/* Saving and restoring the FPU state is best done from lowlevel code.
*
* void fpsave(unsigned long *fpregs, unsigned long *fsr,
......
/* errtbls.c: Error number conversion tables.
*
* Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
*
* Based upon preliminary work which is:
*
* Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
*/
#include <asm/solerrno.h> /* Solaris errnos */
/* Here is the table which converts between Linux error number values
* to the equivalent under Solaris. Note that since the Linux ones
* have been set up to match exactly those of SunOS, no translation
* table is needed for that OS.
*/
int solaris_errno[] = {
0,
SOL_EPERM,
SOL_ENOENT,
SOL_ESRCH,
SOL_EINTR,
SOL_EIO,
SOL_ENXIO,
SOL_E2BIG,
SOL_ENOEXEC,
SOL_EBADF,
SOL_ECHILD,
SOL_EAGAIN,
SOL_ENOMEM,
SOL_EACCES,
SOL_EFAULT,
SOL_NOTBLK,
SOL_EBUSY,
SOL_EEXIST,
SOL_EXDEV,
SOL_ENODEV,
SOL_ENOTDIR,
SOL_EISDIR,
SOL_EINVAL,
SOL_ENFILE,
SOL_EMFILE,
SOL_ENOTTY,
SOL_ETXTBSY,
SOL_EFBIG,
SOL_ENOSPC,
SOL_ESPIPE,
SOL_EROFS,
SOL_EMLINK,
SOL_EPIPE,
SOL_EDOM,
SOL_ERANGE,
SOL_EWOULDBLOCK,
SOL_EINPROGRESS,
SOL_EALREADY,
SOL_ENOTSOCK,
SOL_EDESTADDRREQ,
SOL_EMSGSIZE,
SOL_EPROTOTYPE,
SOL_ENOPROTOOPT,
SOL_EPROTONOSUPPORT,
SOL_ESOCKTNOSUPPORT,
SOL_EOPNOTSUPP,
SOL_EPFNOSUPPORT,
SOL_EAFNOSUPPORT,
SOL_EADDRINUSE,
SOL_EADDRNOTAVAIL,
SOL_ENETDOWN,
SOL_ENETUNREACH,
SOL_ENETRESET,
SOL_ECONNABORTED,
SOL_ECONNRESET,
SOL_ENOBUFS,
SOL_EISCONN,
SOL_ENOTONN,
SOL_ESHUTDOWN,
SOL_ETOOMANYREFS,
SOL_ETIMEDOUT,
SOL_ECONNREFUSED,
SOL_ELOOP,
SOL_ENAMETOOLONG,
SOL_EHOSTDOWN,
SOL_EHOSTUNREACH,
SOL_ENOTEMPTY,
SOL_EPROCLIM,
SOL_EUSERS,
SOL_EDQUOT,
SOL_ESTALE,
SOL_EREMOTE,
SOL_ENOSTR,
SOL_ETIME,
SOL_ENOSR,
SOL_ENOMSG,
SOL_EBADMSG,
SOL_IDRM,
SOL_EDEADLK,
SOL_ENOLCK,
SOL_ENONET,
SOL_ERREMOTE,
SOL_ENOLINK,
SOL_EADV,
SOL_ESRMNT,
SOL_ECOMM,
SOL_EPROTO,
SOL_EMULTIHOP,
SOL_EINVAL, /* EDOTDOT XXX??? */
SOL_REMCHG,
SOL_NOSYS,
SOL_STRPIPE,
SOL_EOVERFLOW,
SOL_EBADFD,
SOL_ECHRNG,
SOL_EL2NSYNC,
SOL_EL3HLT,
SOL_EL3RST,
SOL_NRNG,
SOL_EUNATCH,
SOL_ENOCSI,
SOL_EL2HLT,
SOL_EBADE,
SOL_EBADR,
SOL_EXFULL,
SOL_ENOANO,
SOL_EBADRQC,
SOL_EBADSLT,
SOL_EDEADLOCK,
SOL_EBFONT,
SOL_ELIBEXEC,
SOL_ENODATA,
SOL_ELIBBAD,
SOL_ENOPKG,
SOL_ELIBACC,
SOL_ENOTUNIQ,
SOL_ERESTART,
SOL_EUCLEAN,
SOL_ENOTNAM,
SOL_ENAVAIL,
SOL_EISNAM,
SOL_EREMOTEIO,
SOL_EILSEQ,
SOL_ELIBMAX,
SOL_ELIBSCN,
};
......@@ -78,11 +78,6 @@ sun4e_notsup:
.asciz "Sparc-Linux sun4e support does not exist\n\n"
.align 4
#ifndef CONFIG_SUNOS_EMUL
#undef SUNOS_SYSCALL_TRAP
#define SUNOS_SYSCALL_TRAP SUNOS_NO_SYSCALL_TRAP
#endif
/* The Sparc trap table, bootloader gives us control at _start. */
.text
.globl start, _stext, _start, __stext
......@@ -158,7 +153,7 @@ t_bad6f:BAD_TRAP(0x6f) BAD_TRAP(0x70) BAD_TRAP(0x71) BAD_TRAP(0x72) BAD_TRAP(0x7
t_bad74:BAD_TRAP(0x74) BAD_TRAP(0x75) BAD_TRAP(0x76) BAD_TRAP(0x77) BAD_TRAP(0x78)
t_bad79:BAD_TRAP(0x79) BAD_TRAP(0x7a) BAD_TRAP(0x7b) BAD_TRAP(0x7c) BAD_TRAP(0x7d)
t_bad7e:BAD_TRAP(0x7e) BAD_TRAP(0x7f)
t_sunos:SUNOS_SYSCALL_TRAP /* SunOS System Call */
t_bad80:BAD_TRAP(0x80) /* SunOS System Call */
t_sbkpt:BREAKPOINT_TRAP /* Software Breakpoint/KGDB */
t_divz: TRAP_ENTRY(0x82, do_hw_divzero) /* Divide by zero trap */
t_flwin:TRAP_ENTRY(0x83, do_flush_windows) /* Flush Windows Trap */
......@@ -166,8 +161,8 @@ t_clwin:BAD_TRAP(0x84) /* Clean Windows Trap */
t_rchk: BAD_TRAP(0x85) /* Range Check */
t_funal:BAD_TRAP(0x86) /* Fix Unaligned Access Trap */
t_iovf: BAD_TRAP(0x87) /* Integer Overflow Trap */
t_slowl:SOLARIS_SYSCALL_TRAP /* Slowaris System Call */
t_netbs:NETBSD_SYSCALL_TRAP /* Net-B.S. System Call */
t_bad88:BAD_TRAP(0x88) /* Slowaris System Call */
t_bad89:BAD_TRAP(0x89) /* Net-B.S. System Call */
t_bad8a:BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c) BAD_TRAP(0x8d) BAD_TRAP(0x8e)
t_bad8f:BAD_TRAP(0x8f)
t_linux:LINUX_SYSCALL_TRAP /* Linux System Call */
......@@ -178,7 +173,7 @@ t_getcc:GETCC_TRAP /* Get Condition Codes */
t_setcc:SETCC_TRAP /* Set Condition Codes */
t_getpsr:GETPSR_TRAP /* Get PSR Register */
t_bada3:BAD_TRAP(0xa3) BAD_TRAP(0xa4) BAD_TRAP(0xa5) BAD_TRAP(0xa6)
t_slowi:INDIRECT_SOLARIS_SYSCALL(156)
t_bada7:BAD_TRAP(0xa7)
t_bada8:BAD_TRAP(0xa8) BAD_TRAP(0xa9) BAD_TRAP(0xaa) BAD_TRAP(0xab)
t_badac:BAD_TRAP(0xac) BAD_TRAP(0xad) BAD_TRAP(0xae) BAD_TRAP(0xaf) BAD_TRAP(0xb0)
t_badb1:BAD_TRAP(0xb1) BAD_TRAP(0xb2) BAD_TRAP(0xb3) BAD_TRAP(0xb4) BAD_TRAP(0xb5)
......@@ -243,19 +238,19 @@ trapbase_cpu1:
BAD_TRAP(0x74) BAD_TRAP(0x75) BAD_TRAP(0x76) BAD_TRAP(0x77) BAD_TRAP(0x78)
BAD_TRAP(0x79) BAD_TRAP(0x7a) BAD_TRAP(0x7b) BAD_TRAP(0x7c) BAD_TRAP(0x7d)
BAD_TRAP(0x7e) BAD_TRAP(0x7f)
SUNOS_SYSCALL_TRAP
BAD_TRAP(0x80)
BREAKPOINT_TRAP
TRAP_ENTRY(0x82, do_hw_divzero)
TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85)
BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP
NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
BAD_TRAP(0x86) BAD_TRAP(0x87) BAD_TRAP(0x88)
BAD_TRAP(0x89) BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
BAD_TRAP(0x8d) BAD_TRAP(0x8e) BAD_TRAP(0x8f)
LINUX_SYSCALL_TRAP BAD_TRAP(0x91) BAD_TRAP(0x92) BAD_TRAP(0x93) BAD_TRAP(0x94)
BAD_TRAP(0x95) BAD_TRAP(0x96) BAD_TRAP(0x97) BAD_TRAP(0x98) BAD_TRAP(0x99)
BAD_TRAP(0x9a) BAD_TRAP(0x9b) BAD_TRAP(0x9c) BAD_TRAP(0x9d) BAD_TRAP(0x9e)
BAD_TRAP(0x9f) GETCC_TRAP SETCC_TRAP GETPSR_TRAP
BAD_TRAP(0xa3) BAD_TRAP(0xa4) BAD_TRAP(0xa5) BAD_TRAP(0xa6)
INDIRECT_SOLARIS_SYSCALL(156) BAD_TRAP(0xa8) BAD_TRAP(0xa9) BAD_TRAP(0xaa) BAD_TRAP(0xab)
BAD_TRAP(0xa7) BAD_TRAP(0xa8) BAD_TRAP(0xa9) BAD_TRAP(0xaa) BAD_TRAP(0xab)
BAD_TRAP(0xac) BAD_TRAP(0xad) BAD_TRAP(0xae) BAD_TRAP(0xaf) BAD_TRAP(0xb0)
BAD_TRAP(0xb1) BAD_TRAP(0xb2) BAD_TRAP(0xb3) BAD_TRAP(0xb4) BAD_TRAP(0xb5)
BAD_TRAP(0xb6) BAD_TRAP(0xb7) BAD_TRAP(0xb8) BAD_TRAP(0xb9) BAD_TRAP(0xba)
......@@ -311,19 +306,19 @@ trapbase_cpu2:
BAD_TRAP(0x74) BAD_TRAP(0x75) BAD_TRAP(0x76) BAD_TRAP(0x77) BAD_TRAP(0x78)
BAD_TRAP(0x79) BAD_TRAP(0x7a) BAD_TRAP(0x7b) BAD_TRAP(0x7c) BAD_TRAP(0x7d)
BAD_TRAP(0x7e) BAD_TRAP(0x7f)
SUNOS_SYSCALL_TRAP
BAD_TRAP(0x80)
BREAKPOINT_TRAP
TRAP_ENTRY(0x82, do_hw_divzero)
TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85)
BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP
NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
BAD_TRAP(0x86) BAD_TRAP(0x87) BAD_TRAP(0x88)
BAD_TRAP(0x89) BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
BAD_TRAP(0x8d) BAD_TRAP(0x8e) BAD_TRAP(0x8f)
LINUX_SYSCALL_TRAP BAD_TRAP(0x91) BAD_TRAP(0x92) BAD_TRAP(0x93) BAD_TRAP(0x94)
BAD_TRAP(0x95) BAD_TRAP(0x96) BAD_TRAP(0x97) BAD_TRAP(0x98) BAD_TRAP(0x99)
BAD_TRAP(0x9a) BAD_TRAP(0x9b) BAD_TRAP(0x9c) BAD_TRAP(0x9d) BAD_TRAP(0x9e)
BAD_TRAP(0x9f) GETCC_TRAP SETCC_TRAP GETPSR_TRAP
BAD_TRAP(0xa3) BAD_TRAP(0xa4) BAD_TRAP(0xa5) BAD_TRAP(0xa6)
INDIRECT_SOLARIS_SYSCALL(156) BAD_TRAP(0xa8) BAD_TRAP(0xa9) BAD_TRAP(0xaa) BAD_TRAP(0xab)
BAD_TRAP(0xa7) BAD_TRAP(0xa8) BAD_TRAP(0xa9) BAD_TRAP(0xaa) BAD_TRAP(0xab)
BAD_TRAP(0xac) BAD_TRAP(0xad) BAD_TRAP(0xae) BAD_TRAP(0xaf) BAD_TRAP(0xb0)
BAD_TRAP(0xb1) BAD_TRAP(0xb2) BAD_TRAP(0xb3) BAD_TRAP(0xb4) BAD_TRAP(0xb5)
BAD_TRAP(0xb6) BAD_TRAP(0xb7) BAD_TRAP(0xb8) BAD_TRAP(0xb9) BAD_TRAP(0xba)
......@@ -379,19 +374,19 @@ trapbase_cpu3:
BAD_TRAP(0x74) BAD_TRAP(0x75) BAD_TRAP(0x76) BAD_TRAP(0x77) BAD_TRAP(0x78)
BAD_TRAP(0x79) BAD_TRAP(0x7a) BAD_TRAP(0x7b) BAD_TRAP(0x7c) BAD_TRAP(0x7d)
BAD_TRAP(0x7e) BAD_TRAP(0x7f)
SUNOS_SYSCALL_TRAP
BAD_TRAP(0x80)
BREAKPOINT_TRAP
TRAP_ENTRY(0x82, do_hw_divzero)
TRAP_ENTRY(0x83, do_flush_windows) BAD_TRAP(0x84) BAD_TRAP(0x85)
BAD_TRAP(0x86) BAD_TRAP(0x87) SOLARIS_SYSCALL_TRAP
NETBSD_SYSCALL_TRAP BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
BAD_TRAP(0x86) BAD_TRAP(0x87) BAD_TRAP(0x88)
BAD_TRAP(0x89) BAD_TRAP(0x8a) BAD_TRAP(0x8b) BAD_TRAP(0x8c)
BAD_TRAP(0x8d) BAD_TRAP(0x8e) BAD_TRAP(0x8f)
LINUX_SYSCALL_TRAP BAD_TRAP(0x91) BAD_TRAP(0x92) BAD_TRAP(0x93) BAD_TRAP(0x94)
BAD_TRAP(0x95) BAD_TRAP(0x96) BAD_TRAP(0x97) BAD_TRAP(0x98) BAD_TRAP(0x99)
BAD_TRAP(0x9a) BAD_TRAP(0x9b) BAD_TRAP(0x9c) BAD_TRAP(0x9d) BAD_TRAP(0x9e)
BAD_TRAP(0x9f) GETCC_TRAP SETCC_TRAP GETPSR_TRAP
BAD_TRAP(0xa3) BAD_TRAP(0xa4) BAD_TRAP(0xa5) BAD_TRAP(0xa6)
INDIRECT_SOLARIS_SYSCALL(156) BAD_TRAP(0xa8) BAD_TRAP(0xa9) BAD_TRAP(0xaa) BAD_TRAP(0xab)
BAD_TRAP(0xa7) BAD_TRAP(0xa8) BAD_TRAP(0xa9) BAD_TRAP(0xaa) BAD_TRAP(0xab)
BAD_TRAP(0xac) BAD_TRAP(0xad) BAD_TRAP(0xae) BAD_TRAP(0xaf) BAD_TRAP(0xb0)
BAD_TRAP(0xb1) BAD_TRAP(0xb2) BAD_TRAP(0xb3) BAD_TRAP(0xb4) BAD_TRAP(0xb5)
BAD_TRAP(0xb6) BAD_TRAP(0xb7) BAD_TRAP(0xb8) BAD_TRAP(0xb9) BAD_TRAP(0xba)
......
/* sclow.S: Low level special syscall handling.
* Basically these are cases where we can completely
* handle the system call without saving any state
* because we know that the process will not sleep.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/ptrace.h>
#include <asm/asm-offsets.h>
#include <asm/errno.h>
#include <asm/winmacro.h>
#include <asm/thread_info.h>
#include <asm/psr.h>
#include <asm/page.h>
#define CC_AND_RETT \
set PSR_C, %l4; \
andn %l0, %l4, %l4; \
wr %l4, 0x0, %psr; \
nop; nop; nop; \
jmp %l2; \
rett %l2 + 4;
#define SC_AND_RETT \
set PSR_C, %l4; \
or %l0, %l4, %l4; \
wr %l4, 0x0, %psr; \
nop; nop; nop; \
jmp %l2; \
rett %l2 + 4;
#define LABEL(func) func##_low
.globl LABEL(sunosnop)
LABEL(sunosnop):
CC_AND_RETT
#if (ASIZ_task_uid == 2 && ASIZ_task_euid == 2)
.globl LABEL(sunosgetuid)
LABEL(sunosgetuid):
LOAD_CURRENT(l4, l5)
ld [%l4 + TI_TASK], %l4
lduh [%l4 + AOFF_task_uid], %i0
lduh [%l4 + AOFF_task_euid], %i1
CC_AND_RETT
#endif
#if (ASIZ_task_gid == 2 && ASIZ_task_egid == 2)
.globl LABEL(sunosgetgid)
LABEL(sunosgetgid):
LOAD_CURRENT(l4, l5)
ld [%l4 + TI_TASK], %l4
lduh [%l4 + AOFF_task_gid], %i0
lduh [%l4 + AOFF_task_egid], %i1
CC_AND_RETT
#endif
.globl LABEL(sunosmctl)
LABEL(sunosmctl):
mov 0, %i0
CC_AND_RETT
.globl LABEL(sunosgdtsize)
LABEL(sunosgdtsize):
mov 256, %i0
CC_AND_RETT
.globl LABEL(getpagesize)
LABEL(getpagesize):
set PAGE_SIZE, %i0
CC_AND_RETT
/* XXX sys_nice() XXX */
/* XXX sys_setpriority() XXX */
/* XXX sys_getpriority() XXX */
/* XXX sys_setregid() XXX */
/* XXX sys_setgid() XXX */
/* XXX sys_setreuid() XXX */
/* XXX sys_setuid() XXX */
/* XXX sys_setfsuid() XXX */
/* XXX sys_setfsgid() XXX */
/* XXX sys_setpgid() XXX */
/* XXX sys_getpgid() XXX */
/* XXX sys_setsid() XXX */
/* XXX sys_getsid() XXX */
......@@ -22,7 +22,6 @@
#include <asm/uaccess.h>
#include <asm/ptrace.h>
#include <asm/svr4.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/cacheflush.h> /* flush_sig_insns */
......@@ -454,7 +453,6 @@ setup_frame(struct sigaction *sa, struct pt_regs *regs, int signr, sigset_t *old
break;
case SIGSYS:
if (info->si_code == (__SI_FAULT|0x100)) {
/* See sys_sunos.c */
sig_code = info->si_trapno;
break;
}
......@@ -676,291 +674,17 @@ new_setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
force_sigsegv(signo, current);
}
/* Setup a Solaris stack frame */
static inline void
setup_svr4_frame(struct sigaction *sa, unsigned long pc, unsigned long npc,
struct pt_regs *regs, int signr, sigset_t *oldset)
{
svr4_signal_frame_t __user *sfp;
svr4_gregset_t __user *gr;
svr4_siginfo_t __user *si;
svr4_mcontext_t __user *mc;
svr4_gwindows_t __user *gw;
svr4_ucontext_t __user *uc;
svr4_sigset_t setv;
struct thread_info *tp = current_thread_info();
int window = 0, err;
synchronize_user_stack();
sfp = (svr4_signal_frame_t __user *)
get_sigframe(sa, regs, SVR4_SF_ALIGNED + sizeof(struct reg_window));
if (invalid_frame_pointer(sfp, sizeof(*sfp)))
goto sigill_and_return;
/* Start with a clean frame pointer and fill it */
err = __clear_user(sfp, sizeof(*sfp));
/* Setup convenience variables */
si = &sfp->si;
uc = &sfp->uc;
gw = &sfp->gw;
mc = &uc->mcontext;
gr = &mc->greg;
/* FIXME: where am I supposed to put this?
* sc->sigc_onstack = old_status;
* anyways, it does not look like it is used for anything at all.
*/
setv.sigbits[0] = oldset->sig[0];
setv.sigbits[1] = oldset->sig[1];
if (_NSIG_WORDS >= 4) {
setv.sigbits[2] = oldset->sig[2];
setv.sigbits[3] = oldset->sig[3];
err |= __copy_to_user(&uc->sigmask, &setv, sizeof(svr4_sigset_t));
} else
err |= __copy_to_user(&uc->sigmask, &setv,
2 * sizeof(unsigned int));
/* Store registers */
err |= __put_user(regs->pc, &((*gr)[SVR4_PC]));
err |= __put_user(regs->npc, &((*gr)[SVR4_NPC]));
err |= __put_user(regs->psr, &((*gr)[SVR4_PSR]));
err |= __put_user(regs->y, &((*gr)[SVR4_Y]));
/* Copy g[1..7] and o[0..7] registers */
err |= __copy_to_user(&(*gr)[SVR4_G1], &regs->u_regs[UREG_G1],
sizeof(long) * 7);
err |= __copy_to_user(&(*gr)[SVR4_O0], &regs->u_regs[UREG_I0],
sizeof(long) * 8);
/* Setup sigaltstack */
err |= __put_user(current->sas_ss_sp, &uc->stack.sp);
err |= __put_user(sas_ss_flags(regs->u_regs[UREG_FP]), &uc->stack.flags);
err |= __put_user(current->sas_ss_size, &uc->stack.size);
/* Save the currently window file: */
/* 1. Link sfp->uc->gwins to our windows */
err |= __put_user(gw, &mc->gwin);
/* 2. Number of windows to restore at setcontext(): */
err |= __put_user(tp->w_saved, &gw->count);
/* 3. Save each valid window
* Currently, it makes a copy of the windows from the kernel copy.
* David's code for SunOS, makes the copy but keeps the pointer to
* the kernel. My version makes the pointer point to a userland
* copy of those. Mhm, I wonder if I shouldn't just ignore those
* on setcontext and use those that are on the kernel, the signal
* handler should not be modyfing those, mhm.
*
* These windows are just used in case synchronize_user_stack failed
* to flush the user windows.
*/
for (window = 0; window < tp->w_saved; window++) {
err |= __put_user((int __user *) &(gw->win[window]), &gw->winptr[window]);
err |= __copy_to_user(&gw->win[window],
&tp->reg_window[window],
sizeof(svr4_rwindow_t));
err |= __put_user(0, gw->winptr[window]);
}
/* 4. We just pay attention to the gw->count field on setcontext */
tp->w_saved = 0; /* So process is allowed to execute. */
/* Setup the signal information. Solaris expects a bunch of
* information to be passed to the signal handler, we don't provide
* that much currently, should use siginfo.
*/
err |= __put_user(signr, &si->siginfo.signo);
err |= __put_user(SVR4_SINOINFO, &si->siginfo.code);
if (err)
goto sigsegv;
regs->u_regs[UREG_FP] = (unsigned long) sfp;
regs->pc = (unsigned long) sa->sa_handler;
regs->npc = (regs->pc + 4);
/* Arguments passed to signal handler */
if (regs->u_regs[14]){
struct reg_window __user *rw = (struct reg_window __user *)
regs->u_regs[14];
err |= __put_user(signr, &rw->ins[0]);
err |= __put_user(si, &rw->ins[1]);
err |= __put_user(uc, &rw->ins[2]);
err |= __put_user(sfp, &rw->ins[6]); /* frame pointer */
if (err)
goto sigsegv;
regs->u_regs[UREG_I0] = signr;
regs->u_regs[UREG_I1] = (unsigned long) si;
regs->u_regs[UREG_I2] = (unsigned long) uc;
}
return;
sigill_and_return:
do_exit(SIGILL);
sigsegv:
force_sigsegv(signr, current);
}
asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs)
{
svr4_gregset_t __user *gr;
svr4_mcontext_t __user *mc;
svr4_sigset_t setv;
int err = 0;
synchronize_user_stack();
if (current_thread_info()->w_saved)
return -EFAULT;
err = clear_user(uc, sizeof(*uc));
if (err)
return -EFAULT;
/* Setup convenience variables */
mc = &uc->mcontext;
gr = &mc->greg;
setv.sigbits[0] = current->blocked.sig[0];
setv.sigbits[1] = current->blocked.sig[1];
if (_NSIG_WORDS >= 4) {
setv.sigbits[2] = current->blocked.sig[2];
setv.sigbits[3] = current->blocked.sig[3];
err |= __copy_to_user(&uc->sigmask, &setv, sizeof(svr4_sigset_t));
} else
err |= __copy_to_user(&uc->sigmask, &setv,
2 * sizeof(unsigned int));
/* Store registers */
err |= __put_user(regs->pc, &uc->mcontext.greg[SVR4_PC]);
err |= __put_user(regs->npc, &uc->mcontext.greg[SVR4_NPC]);
err |= __put_user(regs->psr, &uc->mcontext.greg[SVR4_PSR]);
err |= __put_user(regs->y, &uc->mcontext.greg[SVR4_Y]);
/* Copy g[1..7] and o[0..7] registers */
err |= __copy_to_user(&(*gr)[SVR4_G1], &regs->u_regs[UREG_G1],
sizeof(uint) * 7);
err |= __copy_to_user(&(*gr)[SVR4_O0], &regs->u_regs[UREG_I0],
sizeof(uint) * 8);
/* Setup sigaltstack */
err |= __put_user(current->sas_ss_sp, &uc->stack.sp);
err |= __put_user(sas_ss_flags(regs->u_regs[UREG_FP]), &uc->stack.flags);
err |= __put_user(current->sas_ss_size, &uc->stack.size);
/* The register file is not saved
* we have already stuffed all of it with sync_user_stack
*/
return (err ? -EFAULT : 0);
}
/* Set the context for a svr4 application, this is Solaris way to sigreturn */
asmlinkage int svr4_setcontext(svr4_ucontext_t __user *c, struct pt_regs *regs)
{
svr4_gregset_t __user *gr;
unsigned long pc, npc, psr;
mm_segment_t old_fs;
sigset_t set;
svr4_sigset_t setv;
int err;
stack_t st;
/* Fixme: restore windows, or is this already taken care of in
* svr4_setup_frame when sync_user_windows is done?
*/
flush_user_windows();
if (current_thread_info()->w_saved)
goto sigsegv_and_return;
if (((unsigned long) c) & 3)
goto sigsegv_and_return;
if (!__access_ok((unsigned long)c, sizeof(*c)))
goto sigsegv_and_return;
/* Check for valid PC and nPC */
gr = &c->mcontext.greg;
err = __get_user(pc, &((*gr)[SVR4_PC]));
err |= __get_user(npc, &((*gr)[SVR4_NPC]));
if ((pc | npc) & 3)
goto sigsegv_and_return;
/* Retrieve information from passed ucontext */
/* note that nPC is ored a 1, this is used to inform entry.S */
/* that we don't want it to mess with our PC and nPC */
/* This is pretty much atomic, no amount locking would prevent
* the races which exist anyways.
*/
err |= __copy_from_user(&setv, &c->sigmask, sizeof(svr4_sigset_t));
err |= __get_user(st.ss_sp, &c->stack.sp);
err |= __get_user(st.ss_flags, &c->stack.flags);
err |= __get_user(st.ss_size, &c->stack.size);
if (err)
goto sigsegv_and_return;
/* It is more difficult to avoid calling this function than to
call it and ignore errors. */
old_fs = get_fs();
set_fs(KERNEL_DS);
do_sigaltstack((const stack_t __user *) &st, NULL,
regs->u_regs[UREG_I6]);
set_fs(old_fs);
set.sig[0] = setv.sigbits[0];
set.sig[1] = setv.sigbits[1];
if (_NSIG_WORDS >= 4) {
set.sig[2] = setv.sigbits[2];
set.sig[3] = setv.sigbits[3];
}
sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
regs->pc = pc;
regs->npc = npc | 1;
err |= __get_user(regs->y, &((*gr)[SVR4_Y]));
err |= __get_user(psr, &((*gr)[SVR4_PSR]));
regs->psr &= ~(PSR_ICC);
regs->psr |= (psr & PSR_ICC);
/* Restore g[1..7] and o[0..7] registers */
err |= __copy_from_user(&regs->u_regs[UREG_G1], &(*gr)[SVR4_G1],
sizeof(long) * 7);
err |= __copy_from_user(&regs->u_regs[UREG_I0], &(*gr)[SVR4_O0],
sizeof(long) * 8);
return (err ? -EFAULT : 0);
sigsegv_and_return:
force_sig(SIGSEGV, current);
return -EFAULT;
}
static inline void
handle_signal(unsigned long signr, struct k_sigaction *ka,
siginfo_t *info, sigset_t *oldset, struct pt_regs *regs,
int svr4_signal)
siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
{
if (svr4_signal)
setup_svr4_frame(&ka->sa, regs->pc, regs->npc, regs, signr, oldset);
else {
if (ka->sa.sa_flags & SA_SIGINFO)
new_setup_rt_frame(ka, regs, signr, oldset, info);
else if (current->thread.new_signal)
new_setup_frame(ka, regs, signr, oldset);
else
setup_frame(&ka->sa, regs, signr, oldset, info);
}
if (ka->sa.sa_flags & SA_SIGINFO)
new_setup_rt_frame(ka, regs, signr, oldset, info);
else if (current->thread.new_signal)
new_setup_frame(ka, regs, signr, oldset);
else
setup_frame(&ka->sa, regs, signr, oldset, info);
spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NOMASK))
......@@ -1002,17 +726,6 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0, int rest
int signr;
sigset_t *oldset;
/*
* XXX Disable svr4 signal handling until solaris emulation works.
* It is buggy - Anton
*/
#define SVR4_SIGNAL_BROKEN 1
#ifdef SVR4_SIGNAL_BROKEN
int svr4_signal = 0;
#else
int svr4_signal = current->personality == PER_SVR4;
#endif
cookie.restart_syscall = restart_syscall;
cookie.orig_i0 = orig_i0;
......@@ -1025,8 +738,8 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0, int rest
if (signr > 0) {
if (cookie.restart_syscall)
syscall_restart(cookie.orig_i0, regs, &ka.sa);
handle_signal(signr, &ka, &info, oldset,
regs, svr4_signal);
handle_signal(signr, &ka, &info, oldset, regs);
/* a signal was successfully delivered; the saved
* sigmask will have been stored in the signal frame,
* and will be restored by sigreturn, so we can simply
......
......@@ -36,12 +36,10 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/idprom.h>
#include <asm/svr4.h>
#include <asm/head.h>
#include <asm/smp.h>
#include <asm/mostek.h>
#include <asm/ptrace.h>
#include <asm/user.h>
#include <asm/uaccess.h>
#include <asm/checksum.h>
#ifdef CONFIG_SBUS
......@@ -62,8 +60,6 @@ struct poll {
short revents;
};
extern int svr4_getcontext (svr4_ucontext_t *, struct pt_regs *);
extern int svr4_setcontext (svr4_ucontext_t *, struct pt_regs *);
extern void (*__copy_1page)(void *, const void *);
extern void __memmove(void *, const void *, __kernel_size_t);
extern void (*bzero_1page)(void *);
......@@ -204,10 +200,6 @@ EXPORT_SYMBOL(kmap_atomic);
EXPORT_SYMBOL(kunmap_atomic);
#endif
/* Solaris/SunOS binary compatibility */
EXPORT_SYMBOL(svr4_setcontext);
EXPORT_SYMBOL(svr4_getcontext);
/* prom symbols */
EXPORT_SYMBOL(idprom);
EXPORT_SYMBOL(prom_root_node);
......
/* $Id: sunos_asm.S,v 1.15 2000/01/11 17:33:21 jj Exp $
* sunos_asm.S: SunOS system calls which must have a low-level
* entry point to operate correctly.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*
* Based upon preliminary work which is:
*
* Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
*/
#include <asm/ptrace.h>
.text
.align 4
/* When calling ret_sys_call, %o0 should contain the same
* value as in [%sp + STACKFRAME_SZ + PT_I0] */
/* SunOS getpid() returns pid in %o0 and ppid in %o1 */
.globl sunos_getpid
sunos_getpid:
call sys_getppid
nop
call sys_getpid
st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS getuid() returns uid in %o0 and euid in %o1 */
.globl sunos_getuid
sunos_getuid:
call sys_geteuid16
nop
call sys_getuid16
st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS getgid() returns gid in %o0 and egid in %o1 */
.globl sunos_getgid
sunos_getgid:
call sys_getegid16
nop
call sys_getgid16
st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS's execv() call only specifies the argv argument, the
* environment settings are the same as the calling processes.
*/
.globl sunos_execv
sunos_execv:
st %g0, [%sp + STACKFRAME_SZ + PT_I2]
call sparc_execve
add %sp, STACKFRAME_SZ, %o0
b ret_sys_call
ld [%sp + STACKFRAME_SZ + PT_I0], %o0
/* $Id: sunos_ioctl.c,v 1.34 2000/09/03 14:10:56 anton Exp $
* sunos_ioctl.c: The Linux Operating system: SunOS ioctl compatibility.
*
* Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx)
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/uaccess.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/termios.h>
#include <linux/tty.h>
#include <linux/ioctl.h>
#include <linux/route.h>
#include <linux/sockios.h>
#include <linux/if.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/syscalls.h>
#include <linux/file.h>
#if 0
extern char sunkbd_type;
extern char sunkbd_layout;
#endif
/* NR_OPEN is now larger and dynamic in recent kernels. */
#define SUNOS_NR_OPEN 256
asmlinkage int sunos_ioctl (int fd, unsigned long cmd, unsigned long arg)
{
int ret = -EBADF;
if (fd >= SUNOS_NR_OPEN || !fcheck(fd))
goto out;
/* First handle an easy compat. case for tty ldisc. */
if (cmd == TIOCSETD) {
int __user *p;
int ntty = N_TTY, tmp;
mm_segment_t oldfs;
p = (int __user *) arg;
ret = -EFAULT;
if (get_user(tmp, p))
goto out;
if (tmp == 2) {
oldfs = get_fs();
set_fs(KERNEL_DS);
ret = sys_ioctl(fd, cmd, (unsigned long) &ntty);
set_fs(oldfs);
ret = (ret == -EINVAL ? -EOPNOTSUPP : ret);
goto out;
}
}
/* Binary compatibility is good American knowhow fuckin' up. */
if (cmd == TIOCNOTTY) {
ret = sys_setsid();
goto out;
}
/* SunOS networking ioctls. */
switch (cmd) {
case _IOW('r', 10, struct rtentry):
ret = sys_ioctl(fd, SIOCADDRT, arg);
goto out;
case _IOW('r', 11, struct rtentry):
ret = sys_ioctl(fd, SIOCDELRT, arg);
goto out;
case _IOW('i', 12, struct ifreq):
ret = sys_ioctl(fd, SIOCSIFADDR, arg);
goto out;
case _IOWR('i', 13, struct ifreq):
ret = sys_ioctl(fd, SIOCGIFADDR, arg);
goto out;
case _IOW('i', 14, struct ifreq):
ret = sys_ioctl(fd, SIOCSIFDSTADDR, arg);
goto out;
case _IOWR('i', 15, struct ifreq):
ret = sys_ioctl(fd, SIOCGIFDSTADDR, arg);
goto out;
case _IOW('i', 16, struct ifreq):
ret = sys_ioctl(fd, SIOCSIFFLAGS, arg);
goto out;
case _IOWR('i', 17, struct ifreq):
ret = sys_ioctl(fd, SIOCGIFFLAGS, arg);
goto out;
case _IOW('i', 18, struct ifreq):
ret = sys_ioctl(fd, SIOCSIFMEM, arg);
goto out;
case _IOWR('i', 19, struct ifreq):
ret = sys_ioctl(fd, SIOCGIFMEM, arg);
goto out;
case _IOWR('i', 20, struct ifconf):
ret = sys_ioctl(fd, SIOCGIFCONF, arg);
goto out;
case _IOW('i', 21, struct ifreq): /* SIOCSIFMTU */
ret = sys_ioctl(fd, SIOCSIFMTU, arg);
goto out;
case _IOWR('i', 22, struct ifreq): /* SIOCGIFMTU */
ret = sys_ioctl(fd, SIOCGIFMTU, arg);
goto out;
case _IOWR('i', 23, struct ifreq):
ret = sys_ioctl(fd, SIOCGIFBRDADDR, arg);
goto out;
case _IOW('i', 24, struct ifreq):
ret = sys_ioctl(fd, SIOCSIFBRDADDR, arg);
goto out;
case _IOWR('i', 25, struct ifreq):
ret = sys_ioctl(fd, SIOCGIFNETMASK, arg);
goto out;
case _IOW('i', 26, struct ifreq):
ret = sys_ioctl(fd, SIOCSIFNETMASK, arg);
goto out;
case _IOWR('i', 27, struct ifreq):
ret = sys_ioctl(fd, SIOCGIFMETRIC, arg);
goto out;
case _IOW('i', 28, struct ifreq):
ret = sys_ioctl(fd, SIOCSIFMETRIC, arg);
goto out;
case _IOW('i', 30, struct arpreq):
ret = sys_ioctl(fd, SIOCSARP, arg);
goto out;
case _IOWR('i', 31, struct arpreq):
ret = sys_ioctl(fd, SIOCGARP, arg);
goto out;
case _IOW('i', 32, struct arpreq):
ret = sys_ioctl(fd, SIOCDARP, arg);
goto out;
case _IOW('i', 40, struct ifreq): /* SIOCUPPER */
case _IOW('i', 41, struct ifreq): /* SIOCLOWER */
case _IOW('i', 44, struct ifreq): /* SIOCSETSYNC */
case _IOW('i', 45, struct ifreq): /* SIOCGETSYNC */
case _IOW('i', 46, struct ifreq): /* SIOCSSDSTATS */
case _IOW('i', 47, struct ifreq): /* SIOCSSESTATS */
case _IOW('i', 48, struct ifreq): /* SIOCSPROMISC */
ret = -EOPNOTSUPP;
goto out;
case _IOW('i', 49, struct ifreq):
ret = sys_ioctl(fd, SIOCADDMULTI, arg);
goto out;
case _IOW('i', 50, struct ifreq):
ret = sys_ioctl(fd, SIOCDELMULTI, arg);
goto out;
/* FDDI interface ioctls, unsupported. */
case _IOW('i', 51, struct ifreq): /* SIOCFDRESET */
case _IOW('i', 52, struct ifreq): /* SIOCFDSLEEP */
case _IOW('i', 53, struct ifreq): /* SIOCSTRTFMWAR */
case _IOW('i', 54, struct ifreq): /* SIOCLDNSTRTFW */
case _IOW('i', 55, struct ifreq): /* SIOCGETFDSTAT */
case _IOW('i', 56, struct ifreq): /* SIOCFDNMIINT */
case _IOW('i', 57, struct ifreq): /* SIOCFDEXUSER */
case _IOW('i', 58, struct ifreq): /* SIOCFDGNETMAP */
case _IOW('i', 59, struct ifreq): /* SIOCFDGIOCTL */
printk("FDDI ioctl, returning EOPNOTSUPP\n");
ret = -EOPNOTSUPP;
goto out;
case _IOW('t', 125, int):
/* More stupid tty sunos ioctls, just
* say it worked.
*/
ret = 0;
goto out;
/* Non posix grp */
case _IOW('t', 118, int): {
int oldval, newval, __user *ptr;
cmd = TIOCSPGRP;
ptr = (int __user *) arg;
ret = -EFAULT;
if (get_user(oldval, ptr))
goto out;
ret = sys_ioctl(fd, cmd, arg);
__get_user(newval, ptr);
if (newval == -1) {
__put_user(oldval, ptr);
ret = -EIO;
}
if (ret == -ENOTTY)
ret = -EIO;
goto out;
}
case _IOR('t', 119, int): {
int oldval, newval, __user *ptr;
cmd = TIOCGPGRP;
ptr = (int __user *) arg;
ret = -EFAULT;
if (get_user(oldval, ptr))
goto out;
ret = sys_ioctl(fd, cmd, arg);
__get_user(newval, ptr);
if (newval == -1) {
__put_user(oldval, ptr);
ret = -EIO;
}
if (ret == -ENOTTY)
ret = -EIO;
goto out;
}
}
#if 0
if ((cmd & 0xff00) == ('k' << 8)) {
printk ("[[KBIO: %8.8x\n", (unsigned int) cmd);
}
#endif
ret = sys_ioctl(fd, cmd, arg);
/* so stupid... */
ret = (ret == -EINVAL ? -EOPNOTSUPP : ret);
out:
return ret;
}
/*
* linux/arch/sparc/kernel/sys_solaris.c
*
* Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
*/
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/personality.h>
#include <linux/ptrace.h>
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/module.h>
asmlinkage int
do_solaris_syscall (struct pt_regs *regs)
{
static int cnt = 0;
if (++cnt < 10) printk ("No solaris handler\n");
force_sig(SIGSEGV, current);
return 0;
}
#ifndef CONFIG_SUNOS_EMUL
asmlinkage int
do_sunos_syscall (struct pt_regs *regs)
{
static int cnt = 0;
if (++cnt < 10) printk ("SunOS binary emulation not compiled in\n");
force_sig (SIGSEGV, current);
return 0;
}
#endif
此差异已折叠。
......@@ -81,124 +81,3 @@ sys_call_table:
/*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
/*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
/*315*/ .long sys_timerfd_settime, sys_timerfd_gettime
#ifdef CONFIG_SUNOS_EMUL
/* Now the SunOS syscall table. */
.align 4
.globl sunos_sys_table
sunos_sys_table:
/*0*/ .long sunos_indir, sys_exit, sys_fork
.long sunos_read, sunos_write, sys_open
.long sys_close, sunos_wait4, sys_creat
.long sys_link, sys_unlink, sunos_execv
.long sys_chdir, sunos_nosys, sys_mknod
.long sys_chmod, sys_lchown16, sunos_brk
.long sunos_nosys, sys_lseek, sunos_getpid
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_getuid, sunos_nosys, sys_ptrace
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sys_access, sunos_nosys, sunos_nosys
.long sys_sync, sys_kill, sys_newstat
.long sunos_nosys, sys_newlstat, sys_dup
.long sys_pipe, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_getgid
.long sunos_nosys, sunos_nosys
/*50*/ .long sunos_nosys, sys_acct, sunos_nosys
.long sunos_mctl, sunos_ioctl, sys_reboot
.long sunos_nosys, sys_symlink, sys_readlink
.long sys_execve, sys_umask, sys_chroot
.long sys_newfstat, sunos_nosys, sys_getpagesize
.long sys_msync, sys_vfork, sunos_nosys
.long sunos_nosys, sunos_sbrk, sunos_sstk
.long sunos_mmap, sunos_vadvise, sys_munmap
.long sys_mprotect, sys_madvise, sys_vhangup
.long sunos_nosys, sys_mincore, sys_getgroups16
.long sys_setgroups16, sys_getpgrp, sunos_setpgrp
.long sys_setitimer, sunos_nosys, sys_swapon
.long sys_getitimer, sys_gethostname, sys_sethostname
.long sunos_getdtablesize, sys_dup2, sunos_nop
.long sys_fcntl, sunos_select, sunos_nop
.long sys_fsync, sys_setpriority, sys_socket
.long sys_connect, sunos_accept
/*100*/ .long sys_getpriority, sunos_send, sunos_recv
.long sunos_nosys, sys_bind, sunos_setsockopt
.long sys_listen, sunos_nosys, sunos_sigaction
.long sunos_sigblock, sunos_sigsetmask, sys_sigpause
.long sys_sigstack, sys_recvmsg, sys_sendmsg
.long sunos_nosys, sys_gettimeofday, sys_getrusage
.long sunos_getsockopt, sunos_nosys, sunos_readv
.long sunos_writev, sys_settimeofday, sys_fchown16
.long sys_fchmod, sys_recvfrom, sys_setreuid16
.long sys_setregid16, sys_rename, sys_truncate
.long sys_ftruncate, sys_flock, sunos_nosys
.long sys_sendto, sys_shutdown, sys_socketpair
.long sys_mkdir, sys_rmdir, sys_utimes
.long sys_sigreturn, sunos_nosys, sys_getpeername
.long sunos_gethostid, sunos_nosys, sys_getrlimit
.long sys_setrlimit, sunos_killpg, sunos_nosys
.long sunos_nosys, sunos_nosys
/*150*/ .long sys_getsockname, sunos_nosys, sunos_nosys
.long sys_poll, sunos_nosys, sunos_nosys
.long sunos_getdirentries, sys_statfs, sys_fstatfs
.long sys_oldumount, sunos_nosys, sunos_nosys
.long sys_getdomainname, sys_setdomainname
.long sunos_nosys, sys_quotactl, sunos_nosys
.long sunos_mount, sys_ustat, sunos_semsys
.long sunos_msgsys, sunos_shmsys, sunos_audit
.long sunos_nosys, sunos_getdents, sys_setsid
.long sys_fchdir, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sys_sigpending, sunos_nosys
.long sys_setpgid, sunos_pathconf, sunos_fpathconf
.long sunos_sysconf, sunos_uname, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
/*200*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys
/*250*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
/*260*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
/*270*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
/*280*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
/*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
/*300*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
/*310*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
#endif
......@@ -87,9 +87,6 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
bool
def_bool y
config ARCH_SUPPORTS_AOUT
def_bool y
choice
prompt "Kernel page size"
default SPARC64_PAGE_SIZE_8KB
......@@ -147,11 +144,6 @@ config HOTPLUG_CPU
source "init/Kconfig"
config SYSVIPC_COMPAT
bool
depends on COMPAT && SYSVIPC
default y
config GENERIC_HARDIRQS
bool
default y
......@@ -379,6 +371,10 @@ config SUN_OPENPROMFS
To compile the /proc/openprom support as a module, choose M here: the
module will be called openpromfs. If unsure, choose M.
menu "Executable file formats"
source "fs/Kconfig.binfmt"
config SPARC32_COMPAT
bool "Kernel support for Linux/Sparc 32bit binary compatibility"
help
......@@ -391,37 +387,10 @@ config COMPAT
default y
select COMPAT_BINFMT_ELF
config BINFMT_AOUT32
bool "Kernel support for 32-bit (ie. SunOS) a.out binaries"
depends on SPARC32_COMPAT && ARCH_SUPPORTS_AOUT
help
This allows you to run 32-bit a.out format binaries on your Ultra.
If you want to run SunOS binaries (see SunOS binary emulation below)
or other a.out binaries, say Y. If unsure, say N.
menu "Executable file formats"
source "fs/Kconfig.binfmt"
config SUNOS_EMUL
bool "SunOS binary emulation"
depends on BINFMT_AOUT32
help
This allows you to run most SunOS binaries. If you want to do this,
say Y here and place appropriate files in /usr/gnemul/sunos. See
<http://www.ultralinux.org/faq.html> for more information. If you
want to run SunOS binaries on an Ultra you must also say Y to
"Kernel support for 32-bit a.out binaries" above.
config SOLARIS_EMUL
tristate "Solaris binary emulation (EXPERIMENTAL)"
depends on SPARC32_COMPAT && NET && EXPERIMENTAL
help
This is experimental code which will enable you to run (many)
Solaris binaries on your SPARC Linux machine.
To compile this code as a module, choose M here: the
module will be called solaris.
config SYSVIPC_COMPAT
bool
depends on COMPAT && SYSVIPC
default y
endmenu
......
......@@ -27,7 +27,6 @@ endif
head-y := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
core-y += arch/sparc64/kernel/ arch/sparc64/mm/
core-$(CONFIG_SOLARIS_EMUL) += arch/sparc64/solaris/
core-y += arch/sparc64/math-emu/
libs-y += arch/sparc64/prom/ arch/sparc64/lib/
drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/
......
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.25-rc3
# Wed Mar 26 04:33:35 2008
# Linux kernel version: 2.6.25
# Sun Apr 20 01:33:21 2008
#
CONFIG_SPARC=y
CONFIG_SPARC64=y
......@@ -22,7 +22,6 @@ CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_ARCH_NO_VIRT_TO_BUS=y
CONFIG_OF=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_SPARC64_PAGE_SIZE_8KB=y
# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
# CONFIG_SPARC64_PAGE_SIZE_512KB is not set
......@@ -61,6 +60,7 @@ CONFIG_RT_GROUP_SCHED=y
CONFIG_USER_SCHED=y
# CONFIG_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_RELAY=y
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
......@@ -100,7 +100,9 @@ CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_HAVE_OPROFILE=y
CONFIG_KPROBES=y
CONFIG_KRETPROBES=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
......@@ -131,8 +133,6 @@ CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
CONFIG_CLASSIC_RCU=y
# CONFIG_PREEMPT_RCU is not set
CONFIG_SYSVIPC_COMPAT=y
CONFIG_GENERIC_HARDIRQS=y
#
......@@ -182,9 +182,6 @@ CONFIG_PCI_MSI=y
# CONFIG_PCI_LEGACY is not set
# CONFIG_PCI_DEBUG is not set
CONFIG_SUN_OPENPROMFS=m
CONFIG_SPARC32_COMPAT=y
CONFIG_COMPAT=y
# CONFIG_BINFMT_AOUT32 is not set
#
# Executable file formats
......@@ -192,13 +189,14 @@ CONFIG_COMPAT=y
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
CONFIG_SOLARIS_EMUL=y
CONFIG_SPARC32_COMPAT=y
CONFIG_COMPAT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
# CONFIG_RCU_TRACE is not set
# CONFIG_CMDLINE_BOOL is not set
#
......@@ -263,8 +261,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
CONFIG_INET6_XFRM_MODE_BEET=m
# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
CONFIG_IPV6_SIT=m
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_IPV6_MROUTE is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETFILTER is not set
CONFIG_IP_DCCP=m
......@@ -368,7 +368,7 @@ CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives
# Please see Documentation/ide/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
......@@ -384,7 +384,6 @@ CONFIG_IDE_PROC_FS=y
#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_PLATFORM is not set
CONFIG_BLK_DEV_IDEDMA_SFF=y
......@@ -422,7 +421,7 @@ CONFIG_BLK_DEV_ALI15X3=y
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDE_ARCH_OBSOLETE_INIT=y
# CONFIG_BLK_DEV_HD_ONLY is not set
# CONFIG_BLK_DEV_HD is not set
#
......@@ -588,7 +587,6 @@ CONFIG_E1000_NAPI=y
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
CONFIG_TIGON3=m
CONFIG_BNX2=m
......@@ -613,6 +611,7 @@ CONFIG_NIU=m
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set
# CONFIG_IWLWIFI_LEDS is not set
#
# USB Network Adapters
......@@ -1472,7 +1471,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_AUTHENC=m
CONFIG_CRYPTO_AUTHENC=y
# CONFIG_CRYPTO_LZO is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
......
......@@ -21,7 +21,6 @@ obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o \
obj-$(CONFIG_PCI_MSI) += pci_msi.o
obj-$(CONFIG_SMP) += smp.o trampoline.o hvtramp.o
obj-$(CONFIG_SPARC32_COMPAT) += sys32.o sys_sparc32.o signal32.o
obj-$(CONFIG_BINFMT_AOUT32) += binfmt_aout32.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o
obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o
......@@ -30,11 +29,3 @@ obj-$(CONFIG_SUN_LDOMS) += ldc.o vio.o viohs.o ds.o
obj-$(CONFIG_AUDIT) += audit.o
obj-$(CONFIG_AUDIT)$(CONFIG_SPARC32_COMPAT) += compat_audit.o
obj-y += $(obj-yy)
ifdef CONFIG_SUNOS_EMUL
obj-y += sys_sunos32.o sunos_ioctl32.o
else
ifdef CONFIG_SOLARIS_EMUL
obj-y += sys_sunos32.o sunos_ioctl32.o
endif
endif
/*
* linux/fs/binfmt_aout.c
*
* Copyright (C) 1991, 1992, 1996 Linus Torvalds
*
* Hacked a bit by DaveM to make it work with 32-bit SunOS
* binaries on the sparc64 port.
*/
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/a.out.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/slab.h>
#include <linux/binfmts.h>
#include <linux/personality.h>
#include <linux/init.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/pgalloc.h>
#include <asm/mmu_context.h>
#include <asm/a.out-core.h>
static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs);
static int load_aout32_library(struct file*);
static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit);
static struct linux_binfmt aout32_format = {
.module = THIS_MODULE,
.load_binary = load_aout32_binary,
.load_shlib = load_aout32_library,
.core_dump = aout32_core_dump,
.min_coredump = PAGE_SIZE,
};
static void set_brk(unsigned long start, unsigned long end)
{
start = PAGE_ALIGN(start);
end = PAGE_ALIGN(end);
if (end <= start)
return;
down_write(&current->mm->mmap_sem);
do_brk(start, end - start);
up_write(&current->mm->mmap_sem);
}
/*
* These are the only things you should do on a core-file: use only these
* macros to write out all the necessary info.
*/
static int dump_write(struct file *file, const void *addr, int nr)
{
return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
}
#define DUMP_WRITE(addr, nr) \
if (!dump_write(file, (void *)(addr), (nr))) \
goto end_coredump;
#define DUMP_SEEK(offset) \
if (file->f_op->llseek) { \
if (file->f_op->llseek(file,(offset),0) != (offset)) \
goto end_coredump; \
} else file->f_pos = (offset)
/*
* Routine writes a core dump image in the current directory.
* Currently only a stub-function.
*
* Note that setuid/setgid files won't make a core-dump if the uid/gid
* changed due to the set[u|g]id. It's enforced by the "current->mm->dumpable"
* field, which also makes sure the core-dumps won't be recursive if the
* dumping of the process results in another error..
*/
static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit)
{
mm_segment_t fs;
int has_dumped = 0;
unsigned long dump_start, dump_size;
struct user dump;
# define START_DATA(u) (u.u_tsize)
# define START_STACK(u) ((regs->u_regs[UREG_FP]) & ~(PAGE_SIZE - 1))
fs = get_fs();
set_fs(KERNEL_DS);
has_dumped = 1;
current->flags |= PF_DUMPCORE;
strncpy(dump.u_comm, current->comm, sizeof(dump.u_comm));
dump.signal = signr;
aout_dump_thread(regs, &dump);
/* If the size of the dump file exceeds the rlimit, then see what would happen
if we wrote the stack, but not the data area. */
if (dump.u_dsize + dump.u_ssize > limit)
dump.u_dsize = 0;
/* Make sure we have enough room to write the stack and data areas. */
if (dump.u_ssize > limit)
dump.u_ssize = 0;
/* make sure we actually have a data and stack area to dump */
set_fs(USER_DS);
if (!access_ok(VERIFY_READ, (void __user *) START_DATA(dump), dump.u_dsize))
dump.u_dsize = 0;
if (!access_ok(VERIFY_READ, (void __user *) START_STACK(dump), dump.u_ssize))
dump.u_ssize = 0;
set_fs(KERNEL_DS);
/* struct user */
DUMP_WRITE(&dump,sizeof(dump));
/* now we start writing out the user space info */
set_fs(USER_DS);
/* Dump the data area */
if (dump.u_dsize != 0) {
dump_start = START_DATA(dump);
dump_size = dump.u_dsize;
DUMP_WRITE(dump_start,dump_size);
}
/* Now prepare to dump the stack area */
if (dump.u_ssize != 0) {
dump_start = START_STACK(dump);
dump_size = dump.u_ssize;
DUMP_WRITE(dump_start,dump_size);
}
/* Finally dump the task struct. Not be used by gdb, but could be useful */
set_fs(KERNEL_DS);
DUMP_WRITE(current,sizeof(*current));
end_coredump:
set_fs(fs);
return has_dumped;
}
/*
* create_aout32_tables() parses the env- and arg-strings in new user
* memory and creates the pointer tables from them, and puts their
* addresses on the "stack", returning the new stack pointer value.
*/
static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bprm)
{
u32 __user *argv;
u32 __user *envp;
u32 __user *sp;
int argc = bprm->argc;
int envc = bprm->envc;
sp = (u32 __user *)((-(unsigned long)sizeof(char *))&(unsigned long)p);
/* This imposes the proper stack alignment for a new process. */
sp = (u32 __user *) (((unsigned long) sp) & ~7);
if ((envc+argc+3)&1)
--sp;
sp -= envc+1;
envp = sp;
sp -= argc+1;
argv = sp;
put_user(argc,--sp);
current->mm->arg_start = (unsigned long) p;
while (argc-->0) {
char c;
put_user(((u32)(unsigned long)(p)),argv++);
do {
get_user(c,p++);
} while (c);
}
put_user(0,argv);
current->mm->arg_end = current->mm->env_start = (unsigned long) p;
while (envc-->0) {
char c;
put_user(((u32)(unsigned long)(p)),envp++);
do {
get_user(c,p++);
} while (c);
}
put_user(0,envp);
current->mm->env_end = (unsigned long) p;
return sp;
}
/*
* These are the functions used to load a.out style executables and shared
* libraries. There is no binary dependent code anywhere else.
*/
static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs)
{
struct exec ex;
unsigned long error;
unsigned long fd_offset;
unsigned long rlim;
unsigned long orig_thr_flags;
int retval;
ex = *((struct exec *) bprm->buf); /* exec-header */
if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&
N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) ||
N_TRSIZE(ex) || N_DRSIZE(ex) ||
bprm->file->f_path.dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
return -ENOEXEC;
}
fd_offset = N_TXTOFF(ex);
/* Check initial limits. This avoids letting people circumvent
* size limits imposed on them by creating programs with large
* arrays in the data or bss.
*/
rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur;
if (rlim >= RLIM_INFINITY)
rlim = ~0;
if (ex.a_data + ex.a_bss > rlim)
return -ENOMEM;
/* Flush all traces of the currently running executable */
retval = flush_old_exec(bprm);
if (retval)
return retval;
/* OK, This is the point of no return */
set_personality(PER_SUNOS);
current->mm->end_code = ex.a_text +
(current->mm->start_code = N_TXTADDR(ex));
current->mm->end_data = ex.a_data +
(current->mm->start_data = N_DATADDR(ex));
current->mm->brk = ex.a_bss +
(current->mm->start_brk = N_BSSADDR(ex));
current->mm->free_area_cache = current->mm->mmap_base;
current->mm->cached_hole_size = 0;
current->mm->mmap = NULL;
compute_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
if (N_MAGIC(ex) == NMAGIC) {
loff_t pos = fd_offset;
/* Fuck me plenty... */
down_write(&current->mm->mmap_sem);
error = do_brk(N_TXTADDR(ex), ex.a_text);
up_write(&current->mm->mmap_sem);
bprm->file->f_op->read(bprm->file, (char __user *)N_TXTADDR(ex),
ex.a_text, &pos);
down_write(&current->mm->mmap_sem);
error = do_brk(N_DATADDR(ex), ex.a_data);
up_write(&current->mm->mmap_sem);
bprm->file->f_op->read(bprm->file, (char __user *)N_DATADDR(ex),
ex.a_data, &pos);
goto beyond_if;
}
if (N_MAGIC(ex) == OMAGIC) {
loff_t pos = fd_offset;
down_write(&current->mm->mmap_sem);
do_brk(N_TXTADDR(ex) & PAGE_MASK,
ex.a_text+ex.a_data + PAGE_SIZE - 1);
up_write(&current->mm->mmap_sem);
bprm->file->f_op->read(bprm->file, (char __user *)N_TXTADDR(ex),
ex.a_text+ex.a_data, &pos);
} else {
static unsigned long error_time;
if ((ex.a_text & 0xfff || ex.a_data & 0xfff) &&
(N_MAGIC(ex) != NMAGIC) && (jiffies-error_time) > 5*HZ)
{
printk(KERN_NOTICE "executable not page aligned\n");
error_time = jiffies;
}
if (!bprm->file->f_op->mmap) {
loff_t pos = fd_offset;
down_write(&current->mm->mmap_sem);
do_brk(0, ex.a_text+ex.a_data);
up_write(&current->mm->mmap_sem);
bprm->file->f_op->read(bprm->file,
(char __user *)N_TXTADDR(ex),
ex.a_text+ex.a_data, &pos);
goto beyond_if;
}
down_write(&current->mm->mmap_sem);
error = do_mmap(bprm->file, N_TXTADDR(ex), ex.a_text,
PROT_READ | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset);
up_write(&current->mm->mmap_sem);
if (error != N_TXTADDR(ex)) {
send_sig(SIGKILL, current, 0);
return error;
}
down_write(&current->mm->mmap_sem);
error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset + ex.a_text);
up_write(&current->mm->mmap_sem);
if (error != N_DATADDR(ex)) {
send_sig(SIGKILL, current, 0);
return error;
}
}
beyond_if:
set_binfmt(&aout32_format);
set_brk(current->mm->start_brk, current->mm->brk);
/* Make sure STACK_TOP returns the right thing. */
orig_thr_flags = current_thread_info()->flags;
current_thread_info()->flags |= _TIF_32BIT;
retval = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
if (retval < 0) {
current_thread_info()->flags = orig_thr_flags;
/* Someone check-me: is this error path enough? */
send_sig(SIGKILL, current, 0);
return retval;
}
current->mm->start_stack =
(unsigned long) create_aout32_tables((char __user *)bprm->p, bprm);
tsb_context_switch(current->mm);
start_thread32(regs, ex.a_entry, current->mm->start_stack);
if (current->ptrace & PT_PTRACED)
send_sig(SIGTRAP, current, 0);
return 0;
}
/* N.B. Move to .h file and use code in fs/binfmt_aout.c? */
static int load_aout32_library(struct file *file)
{
struct inode * inode;
unsigned long bss, start_addr, len;
unsigned long error;
int retval;
struct exec ex;
inode = file->f_path.dentry->d_inode;
retval = -ENOEXEC;
error = kernel_read(file, 0, (char *) &ex, sizeof(ex));
if (error != sizeof(ex))
goto out;
/* We come in here for the regular a.out style of shared libraries */
if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != QMAGIC) || N_TRSIZE(ex) ||
N_DRSIZE(ex) || ((ex.a_entry & 0xfff) && N_MAGIC(ex) == ZMAGIC) ||
inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
goto out;
}
if (N_MAGIC(ex) == ZMAGIC && N_TXTOFF(ex) &&
(N_TXTOFF(ex) < inode->i_sb->s_blocksize)) {
printk("N_TXTOFF < BLOCK_SIZE. Please convert library\n");
goto out;
}
if (N_FLAGS(ex))
goto out;
/* For QMAGIC, the starting address is 0x20 into the page. We mask
this off to get the starting address for the page */
start_addr = ex.a_entry & 0xfffff000;
/* Now use mmap to map the library into memory. */
down_write(&current->mm->mmap_sem);
error = do_mmap(file, start_addr, ex.a_text + ex.a_data,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE,
N_TXTOFF(ex));
up_write(&current->mm->mmap_sem);
retval = error;
if (error != start_addr)
goto out;
len = PAGE_ALIGN(ex.a_text + ex.a_data);
bss = ex.a_text + ex.a_data + ex.a_bss;
if (bss > len) {
down_write(&current->mm->mmap_sem);
error = do_brk(start_addr + len, bss - len);
up_write(&current->mm->mmap_sem);
retval = error;
if (error != start_addr + len)
goto out;
}
retval = 0;
out:
return retval;
}
static int __init init_aout32_binfmt(void)
{
return register_binfmt(&aout32_format);
}
static void __exit exit_aout32_binfmt(void)
{
unregister_binfmt(&aout32_format);
}
module_init(init_aout32_binfmt);
module_exit(exit_aout32_binfmt);
......@@ -1353,63 +1353,6 @@ breakpoint_trap:
ba,pt %xcc, rtrap
nop
#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \
defined(CONFIG_SOLARIS_EMUL_MODULE)
/* SunOS uses syscall zero as the 'indirect syscall' it looks
* like indir_syscall(scall_num, arg0, arg1, arg2...); etc.
* This is complete brain damage.
*/
.globl sunos_indir
sunos_indir:
srl %o0, 0, %o0
mov %o7, %l4
cmp %o0, NR_SYSCALLS
blu,a,pt %icc, 1f
sll %o0, 0x2, %o0
sethi %hi(sunos_nosys), %l6
b,pt %xcc, 2f
or %l6, %lo(sunos_nosys), %l6
1: sethi %hi(sunos_sys_table), %l7
or %l7, %lo(sunos_sys_table), %l7
lduw [%l7 + %o0], %l6
2: mov %o1, %o0
mov %o2, %o1
mov %o3, %o2
mov %o4, %o3
mov %o5, %o4
call %l6
mov %l4, %o7
.globl sunos_getpid
sunos_getpid:
call sys_getppid
nop
call sys_getpid
stx %o0, [%sp + PTREGS_OFF + PT_V9_I1]
b,pt %xcc, ret_sys_call
stx %o0, [%sp + PTREGS_OFF + PT_V9_I0]
/* SunOS getuid() returns uid in %o0 and euid in %o1 */
.globl sunos_getuid
sunos_getuid:
call sys32_geteuid16
nop
call sys32_getuid16
stx %o0, [%sp + PTREGS_OFF + PT_V9_I1]
b,pt %xcc, ret_sys_call
stx %o0, [%sp + PTREGS_OFF + PT_V9_I0]
/* SunOS getgid() returns gid in %o0 and egid in %o1 */
.globl sunos_getgid
sunos_getgid:
call sys32_getegid16
nop
call sys32_getgid16
stx %o0, [%sp + PTREGS_OFF + PT_V9_I1]
b,pt %xcc, ret_sys_call
stx %o0, [%sp + PTREGS_OFF + PT_V9_I0]
#endif
/* SunOS's execv() call only specifies the argv argument, the
* environment settings are the same as the calling processes.
*/
......@@ -1591,7 +1534,7 @@ linux_syscall_trace:
mov %i4, %o4
/* Linux 32-bit and SunOS system calls enter here... */
/* Linux 32-bit system calls enter here... */
.align 32
.globl linux_sparc_syscall32
linux_sparc_syscall32:
......@@ -1614,7 +1557,7 @@ linux_sparc_syscall32:
srl %i3, 0, %o3 ! IEU0
ba,a,pt %xcc, 3f
/* Linux native and SunOS system calls enter here... */
/* Linux native system calls enter here... */
.align 32
.globl linux_sparc_syscall, ret_sys_call
linux_sparc_syscall:
......
......@@ -25,7 +25,6 @@
#include <asm/uaccess.h>
#include <asm/ptrace.h>
#include <asm/svr4.h>
#include <asm/pgtable.h>
#include <asm/fpumacro.h>
#include <asm/uctx.h>
......
......@@ -23,7 +23,6 @@
#include <asm/uaccess.h>
#include <asm/ptrace.h>
#include <asm/svr4.h>
#include <asm/pgtable.h>
#include <asm/psrcompat.h>
#include <asm/fpumacro.h>
......@@ -798,281 +797,6 @@ static void new_setup_frame32(struct k_sigaction *ka, struct pt_regs *regs,
force_sigsegv(signo, current);
}
/* Setup a Solaris stack frame */
static void
setup_svr4_frame32(struct sigaction *sa, unsigned long pc, unsigned long npc,
struct pt_regs *regs, int signr, sigset_t *oldset)
{
svr4_signal_frame_t __user *sfp;
svr4_gregset_t __user *gr;
svr4_siginfo_t __user *si;
svr4_mcontext_t __user *mc;
svr4_gwindows_t __user *gw;
svr4_ucontext_t __user *uc;
svr4_sigset_t setv;
unsigned int psr;
int i, err;
synchronize_user_stack();
save_and_clear_fpu();
regs->u_regs[UREG_FP] &= 0x00000000ffffffffUL;
sfp = (svr4_signal_frame_t __user *)
get_sigframe(sa, regs,
sizeof(struct reg_window32) + SVR4_SF_ALIGNED);
if (invalid_frame_pointer(sfp, sizeof(*sfp)))
do_exit(SIGILL);
/* Start with a clean frame pointer and fill it */
err = clear_user(sfp, sizeof(*sfp));
/* Setup convenience variables */
si = &sfp->si;
uc = &sfp->uc;
gw = &sfp->gw;
mc = &uc->mcontext;
gr = &mc->greg;
/* FIXME: where am I supposed to put this?
* sc->sigc_onstack = old_status;
* anyways, it does not look like it is used for anything at all.
*/
setv.sigbits[0] = oldset->sig[0];
setv.sigbits[1] = (oldset->sig[0] >> 32);
if (_NSIG_WORDS >= 2) {
setv.sigbits[2] = oldset->sig[1];
setv.sigbits[3] = (oldset->sig[1] >> 32);
err |= __copy_to_user(&uc->sigmask, &setv, sizeof(svr4_sigset_t));
} else
err |= __copy_to_user(&uc->sigmask, &setv,
2 * sizeof(unsigned int));
/* Store registers */
if (test_thread_flag(TIF_32BIT)) {
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
err |= __put_user(regs->tpc, &((*gr)[SVR4_PC]));
err |= __put_user(regs->tnpc, &((*gr)[SVR4_NPC]));
psr = tstate_to_psr(regs->tstate);
if (current_thread_info()->fpsaved[0] & FPRS_FEF)
psr |= PSR_EF;
err |= __put_user(psr, &((*gr)[SVR4_PSR]));
err |= __put_user(regs->y, &((*gr)[SVR4_Y]));
/* Copy g[1..7] and o[0..7] registers */
for (i = 0; i < 7; i++)
err |= __put_user(regs->u_regs[UREG_G1+i], (&(*gr)[SVR4_G1])+i);
for (i = 0; i < 8; i++)
err |= __put_user(regs->u_regs[UREG_I0+i], (&(*gr)[SVR4_O0])+i);
/* Setup sigaltstack */
err |= __put_user(current->sas_ss_sp, &uc->stack.sp);
err |= __put_user(sas_ss_flags(regs->u_regs[UREG_FP]), &uc->stack.flags);
err |= __put_user(current->sas_ss_size, &uc->stack.size);
/* Save the currently window file: */
/* 1. Link sfp->uc->gwins to our windows */
err |= __put_user(ptr_to_compat(gw), &mc->gwin);
/* 2. Number of windows to restore at setcontext (): */
err |= __put_user(get_thread_wsaved(), &gw->count);
/* 3. We just pay attention to the gw->count field on setcontext */
set_thread_wsaved(0); /* So process is allowed to execute. */
/* Setup the signal information. Solaris expects a bunch of
* information to be passed to the signal handler, we don't provide
* that much currently, should use siginfo.
*/
err |= __put_user(signr, &si->siginfo.signo);
err |= __put_user(SVR4_SINOINFO, &si->siginfo.code);
if (err)
goto sigsegv;
regs->u_regs[UREG_FP] = (unsigned long) sfp;
regs->tpc = (unsigned long) sa->sa_handler;
regs->tnpc = (regs->tpc + 4);
if (test_thread_flag(TIF_32BIT)) {
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
/* Arguments passed to signal handler */
if (regs->u_regs[14]){
struct reg_window32 __user *rw = (struct reg_window32 __user *)
(regs->u_regs[14] & 0x00000000ffffffffUL);
err |= __put_user(signr, &rw->ins[0]);
err |= __put_user((u64)si, &rw->ins[1]);
err |= __put_user((u64)uc, &rw->ins[2]);
err |= __put_user((u64)sfp, &rw->ins[6]); /* frame pointer */
if (err)
goto sigsegv;
regs->u_regs[UREG_I0] = signr;
regs->u_regs[UREG_I1] = (u32)(u64) si;
regs->u_regs[UREG_I2] = (u32)(u64) uc;
}
return;
sigsegv:
force_sigsegv(signr, current);
}
asmlinkage int
svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs)
{
svr4_gregset_t __user *gr;
svr4_mcontext_t __user *mc;
svr4_sigset_t setv;
int i, err;
u32 psr;
synchronize_user_stack();
save_and_clear_fpu();
if (get_thread_wsaved())
do_exit(SIGSEGV);
err = clear_user(uc, sizeof(*uc));
/* Setup convenience variables */
mc = &uc->mcontext;
gr = &mc->greg;
setv.sigbits[0] = current->blocked.sig[0];
setv.sigbits[1] = (current->blocked.sig[0] >> 32);
if (_NSIG_WORDS >= 2) {
setv.sigbits[2] = current->blocked.sig[1];
setv.sigbits[3] = (current->blocked.sig[1] >> 32);
err |= __copy_to_user(&uc->sigmask, &setv, sizeof(svr4_sigset_t));
} else
err |= __copy_to_user(&uc->sigmask, &setv, 2 * sizeof(unsigned));
/* Store registers */
if (test_thread_flag(TIF_32BIT)) {
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
err |= __put_user(regs->tpc, &uc->mcontext.greg[SVR4_PC]);
err |= __put_user(regs->tnpc, &uc->mcontext.greg[SVR4_NPC]);
psr = tstate_to_psr(regs->tstate) & ~PSR_EF;
if (current_thread_info()->fpsaved[0] & FPRS_FEF)
psr |= PSR_EF;
err |= __put_user(psr, &uc->mcontext.greg[SVR4_PSR]);
err |= __put_user(regs->y, &uc->mcontext.greg[SVR4_Y]);
/* Copy g[1..7] and o[0..7] registers */
for (i = 0; i < 7; i++)
err |= __put_user(regs->u_regs[UREG_G1+i], (&(*gr)[SVR4_G1])+i);
for (i = 0; i < 8; i++)
err |= __put_user(regs->u_regs[UREG_I0+i], (&(*gr)[SVR4_O0])+i);
/* Setup sigaltstack */
err |= __put_user(current->sas_ss_sp, &uc->stack.sp);
err |= __put_user(sas_ss_flags(regs->u_regs[UREG_FP]), &uc->stack.flags);
err |= __put_user(current->sas_ss_size, &uc->stack.size);
/* The register file is not saved
* we have already stuffed all of it with sync_user_stack
*/
return (err ? -EFAULT : 0);
}
/* Set the context for a svr4 application, this is Solaris way to sigreturn */
asmlinkage int svr4_setcontext(svr4_ucontext_t __user *c, struct pt_regs *regs)
{
svr4_gregset_t __user *gr;
mm_segment_t old_fs;
u32 pc, npc, psr, u_ss_sp;
sigset_t set;
svr4_sigset_t setv;
int i, err;
stack_t st;
/* Fixme: restore windows, or is this already taken care of in
* svr4_setup_frame when sync_user_windows is done?
*/
flush_user_windows();
if (get_thread_wsaved())
goto sigsegv;
if (((unsigned long) c) & 3){
printk("Unaligned structure passed\n");
goto sigsegv;
}
if (!__access_ok(c, sizeof(*c))) {
/* Miguel, add nice debugging msg _here_. ;-) */
goto sigsegv;
}
/* Check for valid PC and nPC */
gr = &c->mcontext.greg;
err = __get_user(pc, &((*gr)[SVR4_PC]));
err |= __get_user(npc, &((*gr)[SVR4_NPC]));
if ((pc | npc) & 3)
goto sigsegv;
/* Retrieve information from passed ucontext */
/* note that nPC is ored a 1, this is used to inform entry.S */
/* that we don't want it to mess with our PC and nPC */
err |= copy_from_user(&setv, &c->sigmask, sizeof(svr4_sigset_t));
set.sig[0] = setv.sigbits[0] | (((long)setv.sigbits[1]) << 32);
if (_NSIG_WORDS >= 2)
set.sig[1] = setv.sigbits[2] | (((long)setv.sigbits[3]) << 32);
err |= __get_user(u_ss_sp, &c->stack.sp);
st.ss_sp = compat_ptr(u_ss_sp);
err |= __get_user(st.ss_flags, &c->stack.flags);
err |= __get_user(st.ss_size, &c->stack.size);
if (err)
goto sigsegv;
/* It is more difficult to avoid calling this function than to
call it and ignore errors. */
old_fs = get_fs();
set_fs(KERNEL_DS);
do_sigaltstack((stack_t __user *) &st, NULL, regs->u_regs[UREG_I6]);
set_fs(old_fs);
sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
regs->tpc = pc;
regs->tnpc = npc | 1;
if (test_thread_flag(TIF_32BIT)) {
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
err |= __get_user(regs->y, &((*gr)[SVR4_Y]));
err |= __get_user(psr, &((*gr)[SVR4_PSR]));
regs->tstate &= ~(TSTATE_ICC|TSTATE_XCC);
regs->tstate |= psr_to_tstate_icc(psr);
/* Restore g[1..7] and o[0..7] registers */
for (i = 0; i < 7; i++)
err |= __get_user(regs->u_regs[UREG_G1+i], (&(*gr)[SVR4_G1])+i);
for (i = 0; i < 8; i++)
err |= __get_user(regs->u_regs[UREG_I0+i], (&(*gr)[SVR4_O0])+i);
if (err)
goto sigsegv;
return -EINTR;
sigsegv:
return -EFAULT;
}
static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs,
unsigned long signr, sigset_t *oldset,
siginfo_t *info)
......@@ -1216,20 +940,14 @@ static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs,
static inline void handle_signal32(unsigned long signr, struct k_sigaction *ka,
siginfo_t *info,
sigset_t *oldset, struct pt_regs *regs,
int svr4_signal)
sigset_t *oldset, struct pt_regs *regs)
{
if (svr4_signal)
setup_svr4_frame32(&ka->sa, regs->tpc, regs->tnpc,
regs, signr, oldset);
else {
if (ka->sa.sa_flags & SA_SIGINFO)
setup_rt_frame32(ka, regs, signr, oldset, info);
else if (test_thread_flag(TIF_NEWSIGNALS))
new_setup_frame32(ka, regs, signr, oldset);
else
setup_frame32(&ka->sa, regs, signr, oldset, info);
}
if (ka->sa.sa_flags & SA_SIGINFO)
setup_rt_frame32(ka, regs, signr, oldset, info);
else if (test_thread_flag(TIF_NEWSIGNALS))
new_setup_frame32(ka, regs, signr, oldset);
else
setup_frame32(&ka->sa, regs, signr, oldset, info);
spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NOMASK))
......@@ -1270,7 +988,6 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs,
struct signal_deliver_cookie cookie;
struct k_sigaction ka;
int signr;
int svr4_signal = current->personality == PER_SVR4;
cookie.restart_syscall = restart_syscall;
cookie.orig_i0 = orig_i0;
......@@ -1279,8 +996,7 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs,
if (signr > 0) {
if (cookie.restart_syscall)
syscall_restart32(orig_i0, regs, &ka.sa);
handle_signal32(signr, &ka, &info, oldset,
regs, svr4_signal);
handle_signal32(signr, &ka, &info, oldset, regs);
/* a signal was successfully delivered; the saved
* sigmask will have been stored in the signal frame,
......
......@@ -33,13 +33,11 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/idprom.h>
#include <asm/svr4.h>
#include <asm/elf.h>
#include <asm/head.h>
#include <asm/smp.h>
#include <asm/mostek.h>
#include <asm/ptrace.h>
#include <asm/user.h>
#include <asm/uaccess.h>
#include <asm/checksum.h>
#include <asm/fpumacro.h>
......@@ -73,13 +71,8 @@ extern __kernel_size_t strlen(const char *);
extern void linux_sparc_syscall(void);
extern void rtrap(void);
extern void show_regs(struct pt_regs *);
extern void solaris_syscall(void);
extern void syscall_trace(struct pt_regs *, int);
extern u32 sunos_sys_table[], sys_call_table32[];
extern void tl0_solaris(void);
extern void sys_sigsuspend(void);
extern int svr4_getcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
extern long sparc32_open(const char __user * filename, int flags, int mode);
......@@ -90,8 +83,6 @@ extern int __ashrdi3(int, int);
extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
extern unsigned int sys_call_table[];
extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
unsigned long *);
......@@ -213,11 +204,6 @@ EXPORT_SYMBOL(pci_dma_supported);
/* I/O device mmaping on Sparc64. */
EXPORT_SYMBOL(io_remap_pfn_range);
#if defined(CONFIG_COMPAT) && defined(CONFIG_NET)
/* Solaris/SunOS binary compatibility */
EXPORT_SYMBOL(verify_compat_iovec);
#endif
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(put_fs_struct);
......@@ -254,30 +240,6 @@ EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(__strlen_user);
EXPORT_SYMBOL(__strnlen_user);
#ifdef CONFIG_SOLARIS_EMUL_MODULE
EXPORT_SYMBOL(linux_sparc_syscall);
EXPORT_SYMBOL(rtrap);
EXPORT_SYMBOL(show_regs);
EXPORT_SYMBOL(solaris_syscall);
EXPORT_SYMBOL(syscall_trace);
EXPORT_SYMBOL(sunos_sys_table);
EXPORT_SYMBOL(sys_call_table32);
EXPORT_SYMBOL(tl0_solaris);
EXPORT_SYMBOL(sys_sigsuspend);
EXPORT_SYMBOL(sys_getppid);
EXPORT_SYMBOL(sys_getpid);
EXPORT_SYMBOL(sys_geteuid);
EXPORT_SYMBOL(sys_getuid);
EXPORT_SYMBOL(sys_getegid);
EXPORT_SYMBOL(sysctl_nr_open);
EXPORT_SYMBOL(sys_getgid);
EXPORT_SYMBOL(svr4_getcontext);
EXPORT_SYMBOL(svr4_setcontext);
EXPORT_SYMBOL(compat_sys_ioctl);
EXPORT_SYMBOL(sys_ioctl);
EXPORT_SYMBOL(sparc32_open);
#endif
/* Special internal versions of library functions. */
EXPORT_SYMBOL(_clear_page);
EXPORT_SYMBOL(clear_user_page);
......@@ -334,9 +296,6 @@ EXPORT_SYMBOL(do_BUG);
/* for ns8703 */
EXPORT_SYMBOL(ns87303_lock);
/* for solaris compat module */
EXPORT_SYMBOL_GPL(sys_call_table);
EXPORT_SYMBOL(tick_ops);
EXPORT_SYMBOL(xor_vis_2);
......
/* $Id: sunos_ioctl32.c,v 1.11 2000/07/30 23:12:24 davem Exp $
* sunos_ioctl32.c: SunOS ioctl compatibility on sparc64.
*
* Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx)
* Copyright (C) 1995, 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/uaccess.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/termios.h>
#include <linux/tty.h>
#include <linux/ioctl.h>
#include <linux/route.h>
#include <linux/sockios.h>
#include <linux/if.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/syscalls.h>
#include <linux/compat.h>
#define SUNOS_NR_OPEN 256
struct rtentry32 {
u32 rt_pad1;
struct sockaddr rt_dst; /* target address */
struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */
struct sockaddr rt_genmask; /* target network mask (IP) */
unsigned short rt_flags;
short rt_pad2;
u32 rt_pad3;
unsigned char rt_tos;
unsigned char rt_class;
short rt_pad4;
short rt_metric; /* +1 for binary compatibility! */
/* char * */ u32 rt_dev; /* forcing the device at add */
u32 rt_mtu; /* per route MTU/Window */
u32 rt_window; /* Window clamping */
unsigned short rt_irtt; /* Initial RTT */
};
struct ifmap32 {
u32 mem_start;
u32 mem_end;
unsigned short base_addr;
unsigned char irq;
unsigned char dma;
unsigned char port;
};
struct ifreq32 {
#define IFHWADDRLEN 6
#define IFNAMSIZ 16
union {
char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
} ifr_ifrn;
union {
struct sockaddr ifru_addr;
struct sockaddr ifru_dstaddr;
struct sockaddr ifru_broadaddr;
struct sockaddr ifru_netmask;
struct sockaddr ifru_hwaddr;
short ifru_flags;
int ifru_ivalue;
int ifru_mtu;
struct ifmap32 ifru_map;
char ifru_slave[IFNAMSIZ]; /* Just fits the size */
compat_caddr_t ifru_data;
} ifr_ifru;
};
struct ifconf32 {
int ifc_len; /* size of buffer */
compat_caddr_t ifcbuf;
};
extern asmlinkage int compat_sys_ioctl(unsigned int, unsigned int, u32);
asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg)
{
int ret = -EBADF;
if(fd >= SUNOS_NR_OPEN)
goto out;
if(!fcheck(fd))
goto out;
if(cmd == TIOCSETD) {
mm_segment_t old_fs = get_fs();
int __user *p;
int ntty = N_TTY;
int tmp;
p = (int __user *) (unsigned long) arg;
ret = -EFAULT;
if(get_user(tmp, p))
goto out;
if(tmp == 2) {
set_fs(KERNEL_DS);
ret = sys_ioctl(fd, cmd, (unsigned long) &ntty);
set_fs(old_fs);
ret = (ret == -EINVAL ? -EOPNOTSUPP : ret);
goto out;
}
}
if(cmd == TIOCNOTTY) {
ret = sys_setsid();
goto out;
}
switch(cmd) {
case _IOW('r', 10, struct rtentry32):
ret = compat_sys_ioctl(fd, SIOCADDRT, arg);
goto out;
case _IOW('r', 11, struct rtentry32):
ret = compat_sys_ioctl(fd, SIOCDELRT, arg);
goto out;
case _IOW('i', 12, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCSIFADDR, arg);
goto out;
case _IOWR('i', 13, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCGIFADDR, arg);
goto out;
case _IOW('i', 14, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCSIFDSTADDR, arg);
goto out;
case _IOWR('i', 15, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCGIFDSTADDR, arg);
goto out;
case _IOW('i', 16, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCSIFFLAGS, arg);
goto out;
case _IOWR('i', 17, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCGIFFLAGS, arg);
goto out;
case _IOW('i', 18, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCSIFMEM, arg);
goto out;
case _IOWR('i', 19, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCGIFMEM, arg);
goto out;
case _IOWR('i', 20, struct ifconf32):
ret = compat_sys_ioctl(fd, SIOCGIFCONF, arg);
goto out;
case _IOW('i', 21, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCSIFMTU, arg);
goto out;
case _IOWR('i', 22, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCGIFMTU, arg);
goto out;
case _IOWR('i', 23, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCGIFBRDADDR, arg);
goto out;
case _IOW('i', 24, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCSIFBRDADDR, arg);
goto out;
case _IOWR('i', 25, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCGIFNETMASK, arg);
goto out;
case _IOW('i', 26, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCSIFNETMASK, arg);
goto out;
case _IOWR('i', 27, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCGIFMETRIC, arg);
goto out;
case _IOW('i', 28, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCSIFMETRIC, arg);
goto out;
case _IOW('i', 30, struct arpreq):
ret = compat_sys_ioctl(fd, SIOCSARP, arg);
goto out;
case _IOWR('i', 31, struct arpreq):
ret = compat_sys_ioctl(fd, SIOCGARP, arg);
goto out;
case _IOW('i', 32, struct arpreq):
ret = compat_sys_ioctl(fd, SIOCDARP, arg);
goto out;
case _IOW('i', 40, struct ifreq32): /* SIOCUPPER */
case _IOW('i', 41, struct ifreq32): /* SIOCLOWER */
case _IOW('i', 44, struct ifreq32): /* SIOCSETSYNC */
case _IOW('i', 45, struct ifreq32): /* SIOCGETSYNC */
case _IOW('i', 46, struct ifreq32): /* SIOCSSDSTATS */
case _IOW('i', 47, struct ifreq32): /* SIOCSSESTATS */
case _IOW('i', 48, struct ifreq32): /* SIOCSPROMISC */
ret = -EOPNOTSUPP;
goto out;
case _IOW('i', 49, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCADDMULTI, arg);
goto out;
case _IOW('i', 50, struct ifreq32):
ret = compat_sys_ioctl(fd, SIOCDELMULTI, arg);
goto out;
/* FDDI interface ioctls, unsupported. */
case _IOW('i', 51, struct ifreq32): /* SIOCFDRESET */
case _IOW('i', 52, struct ifreq32): /* SIOCFDSLEEP */
case _IOW('i', 53, struct ifreq32): /* SIOCSTRTFMWAR */
case _IOW('i', 54, struct ifreq32): /* SIOCLDNSTRTFW */
case _IOW('i', 55, struct ifreq32): /* SIOCGETFDSTAT */
case _IOW('i', 56, struct ifreq32): /* SIOCFDNMIINT */
case _IOW('i', 57, struct ifreq32): /* SIOCFDEXUSER */
case _IOW('i', 58, struct ifreq32): /* SIOCFDGNETMAP */
case _IOW('i', 59, struct ifreq32): /* SIOCFDGIOCTL */
printk("FDDI ioctl, returning EOPNOTSUPP\n");
ret = -EOPNOTSUPP;
goto out;
case _IOW('t', 125, int):
/* More stupid tty sunos ioctls, just
* say it worked.
*/
ret = 0;
goto out;
/* Non posix grp */
case _IOW('t', 118, int): {
int oldval, newval, __user *ptr;
cmd = TIOCSPGRP;
ptr = (int __user *) (unsigned long) arg;
ret = -EFAULT;
if(get_user(oldval, ptr))
goto out;
ret = compat_sys_ioctl(fd, cmd, arg);
__get_user(newval, ptr);
if(newval == -1) {
__put_user(oldval, ptr);
ret = -EIO;
}
if(ret == -ENOTTY)
ret = -EIO;
goto out;
}
case _IOR('t', 119, int): {
int oldval, newval, __user *ptr;
cmd = TIOCGPGRP;
ptr = (int __user *) (unsigned long) arg;
ret = -EFAULT;
if(get_user(oldval, ptr))
goto out;
ret = compat_sys_ioctl(fd, cmd, arg);
__get_user(newval, ptr);
if(newval == -1) {
__put_user(oldval, ptr);
ret = -EIO;
}
if(ret == -ENOTTY)
ret = -EIO;
goto out;
}
};
ret = compat_sys_ioctl(fd, cmd, arg);
/* so stupid... */
ret = (ret == -EINVAL ? -EOPNOTSUPP : ret);
out:
return ret;
}
......@@ -720,44 +720,6 @@ asmlinkage long sys_getdomainname(char __user *name, int len)
return err;
}
asmlinkage long solaris_syscall(struct pt_regs *regs)
{
static int count;
regs->tpc = regs->tnpc;
regs->tnpc += 4;
if (test_thread_flag(TIF_32BIT)) {
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
if (++count <= 5) {
printk ("For Solaris binary emulation you need solaris module loaded\n");
show_regs (regs);
}
send_sig(SIGSEGV, current, 1);
return -ENOSYS;
}
#ifndef CONFIG_SUNOS_EMUL
asmlinkage long sunos_syscall(struct pt_regs *regs)
{
static int count;
regs->tpc = regs->tnpc;
regs->tnpc += 4;
if (test_thread_flag(TIF_32BIT)) {
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
if (++count <= 20)
printk ("SunOS binary emulation not compiled in\n");
force_sig(SIGSEGV, current);
return -ENOSYS;
}
#endif
asmlinkage long sys_utrap_install(utrap_entry_t type,
utrap_handler_t new_p,
utrap_handler_t new_d,
......
此差异已折叠。
......@@ -155,125 +155,3 @@ sys_call_table:
.word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
/*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
.word sys_timerfd_settime, sys_timerfd_gettime
#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \
defined(CONFIG_SOLARIS_EMUL_MODULE)
/* Now the 32-bit SunOS syscall table. */
.align 4
.globl sunos_sys_table
sunos_sys_table:
/*0*/ .word sunos_indir, sys32_exit, sys_fork
.word sunos_read, sunos_write, sunos_open
.word sys_close, sunos_wait4, sys_creat
.word sys_link, sys_unlink, sunos_execv
.word sys_chdir, sunos_nosys, sys32_mknod
.word sys_chmod, sys32_lchown16, sunos_brk
.word sunos_nosys, sys32_lseek, sunos_getpid
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_getuid, sunos_nosys, sys_ptrace
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sys_access, sunos_nosys, sunos_nosys
.word sys_sync, sys_kill, compat_sys_newstat
.word sunos_nosys, compat_sys_newlstat, sys_dup
.word sys_pipe, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_getgid
.word sunos_nosys, sunos_nosys
/*50*/ .word sunos_nosys, sys_acct, sunos_nosys
.word sunos_mctl, sunos_ioctl, sys_reboot
.word sunos_nosys, sys_symlink, sys_readlink
.word sys32_execve, sys_umask, sys_chroot
.word compat_sys_newfstat, sunos_nosys, sys_getpagesize
.word sys_msync, sys_vfork, sunos_nosys
.word sunos_nosys, sunos_sbrk, sunos_sstk
.word sunos_mmap, sunos_vadvise, sys_munmap
.word sys_mprotect, sys_madvise, sys_vhangup
.word sunos_nosys, sys_mincore, sys32_getgroups16
.word sys32_setgroups16, sys_getpgrp, sunos_setpgrp
.word compat_sys_setitimer, sunos_nosys, sys_swapon
.word compat_sys_getitimer, sys_gethostname, sys_sethostname
.word sunos_getdtablesize, sys_dup2, sunos_nop
.word compat_sys_fcntl, sunos_select, sunos_nop
.word sys_fsync, sys32_setpriority, sys32_socket
.word sys32_connect, sunos_accept
/*100*/ .word sys_getpriority, sunos_send, sunos_recv
.word sunos_nosys, sys32_bind, sunos_setsockopt
.word sys32_listen, sunos_nosys, sunos_sigaction
.word sunos_sigblock, sunos_sigsetmask, sys_sigpause
.word sys32_sigstack, sys32_recvmsg, sys32_sendmsg
.word sunos_nosys, sys32_gettimeofday, compat_sys_getrusage
.word sunos_getsockopt, sunos_nosys, sunos_readv
.word sunos_writev, sys32_settimeofday, sys32_fchown16
.word sys_fchmod, sys32_recvfrom, sys32_setreuid16
.word sys32_setregid16, sys_rename, sys_truncate
.word sys_ftruncate, sys_flock, sunos_nosys
.word sys32_sendto, sys32_shutdown, sys32_socketpair
.word sys_mkdir, sys_rmdir, sys32_utimes
.word sys32_sigreturn, sunos_nosys, sys32_getpeername
.word sunos_gethostid, sunos_nosys, compat_sys_getrlimit
.word compat_sys_setrlimit, sunos_killpg, sunos_nosys
.word sunos_nosys, sunos_nosys
/*150*/ .word sys32_getsockname, sunos_nosys, sunos_nosys
.word sys_poll, sunos_nosys, sunos_nosys
.word sunos_getdirentries, compat_sys_statfs, compat_sys_fstatfs
.word sys_oldumount, sunos_nosys, sunos_nosys
.word sys_getdomainname, sys_setdomainname
.word sunos_nosys, sys_quotactl, sunos_nosys
.word sunos_nosys, sys_ustat, sunos_semsys
.word sunos_nosys, sunos_shmsys, sunos_audit
.word sunos_nosys, sunos_getdents, sys_setsid
.word sys_fchdir, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, compat_sys_sigpending, sunos_nosys
.word sys_setpgid, sunos_pathconf, sunos_fpathconf
.word sunos_sysconf, sunos_uname, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
/*200*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys
/*250*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys
/*260*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys
/*270*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys
/*280*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys
/*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys
/*300*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys
/*310*/ .word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys
#endif
......@@ -27,8 +27,6 @@ extern asmlinkage unsigned long sys64_mremap(unsigned long addr,
unsigned long new_addr);
extern asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs);
extern asmlinkage long sys_getdomainname(char __user *name, int len);
extern asmlinkage long solaris_syscall(struct pt_regs *regs);
extern asmlinkage long sunos_syscall(struct pt_regs *regs);
extern asmlinkage long sys_utrap_install(utrap_entry_t type,
utrap_handler_t new_p,
utrap_handler_t new_d,
......
......@@ -117,16 +117,13 @@ tl0_f4o: FILL_4_OTHER
tl0_f5o: FILL_5_OTHER
tl0_f6o: FILL_6_OTHER
tl0_f7o: FILL_7_OTHER
tl0_sunos: SUNOS_SYSCALL_TRAP
tl0_resv100: BTRAP(0x100)
tl0_bkpt: BREAKPOINT_TRAP
tl0_divz: TRAP(do_div0)
tl0_flushw: FLUSH_WINDOW_TRAP
tl0_resv104: BTRAP(0x104) BTRAP(0x105) BTRAP(0x106) BTRAP(0x107)
.globl tl0_solaris
tl0_solaris: SOLARIS_SYSCALL_TRAP
tl0_resv109: BTRAP(0x109)
tl0_resv10a: BTRAP(0x10a) BTRAP(0x10b) BTRAP(0x10c) BTRAP(0x10d) BTRAP(0x10e)
tl0_resv10f: BTRAP(0x10f)
tl0_resv104: BTRAP(0x104) BTRAP(0x105) BTRAP(0x106) BTRAP(0x107) BTRAP(0x108)
tl0_resv109: BTRAP(0x109) BTRAP(0x10a) BTRAP(0x10b) BTRAP(0x10c) BTRAP(0x10d)
tl0_resv10e: BTRAP(0x10e) BTRAP(0x10f)
tl0_linux32: LINUX_32BIT_SYSCALL_TRAP
tl0_oldlinux64: LINUX_64BIT_SYSCALL_TRAP
tl0_resv112: TRAP_UTRAP(UT_TRAP_INSTRUCTION_18,0x112) TRAP_UTRAP(UT_TRAP_INSTRUCTION_19,0x113)
......@@ -139,8 +136,7 @@ tl0_resv11e: TRAP_UTRAP(UT_TRAP_INSTRUCTION_30,0x11e) TRAP_UTRAP(UT_TRAP_INSTRUC
tl0_getcc: GETCC_TRAP
tl0_setcc: SETCC_TRAP
tl0_getpsr: TRAP(do_getpsr)
tl0_resv123: BTRAP(0x123) BTRAP(0x124) BTRAP(0x125) BTRAP(0x126)
tl0_solindir: INDIRECT_SOLARIS_SYSCALL(156)
tl0_resv123: BTRAP(0x123) BTRAP(0x124) BTRAP(0x125) BTRAP(0x126) BTRAP(0x127)
tl0_resv128: BTRAP(0x128) BTRAP(0x129) BTRAP(0x12a) BTRAP(0x12b) BTRAP(0x12c)
tl0_resv12d: BTRAP(0x12d) BTRAP(0x12e) BTRAP(0x12f) BTRAP(0x130) BTRAP(0x131)
tl0_resv132: BTRAP(0x132) BTRAP(0x133) BTRAP(0x134) BTRAP(0x135) BTRAP(0x136)
......
#
# Makefile for the Solaris binary emulation.
#
EXTRA_AFLAGS := -ansi
solaris-objs := entry64.o fs.o misc.o signal.o systbl.o socket.o \
ioctl.o ipc.o socksys.o timod.o
obj-$(CONFIG_SOLARIS_EMUL) += solaris.o
/* $Id: conv.h,v 1.4 1998/08/15 20:42:51 davem Exp $
* conv.h: Utility macros for Solaris emulation
*
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/
/* #define DEBUG_SOLARIS */
#define DEBUG_SOLARIS_KMALLOC
#ifndef __ASSEMBLY__
#include <asm/unistd.h>
/* Use this to get at 32-bit user passed pointers. */
#define A(__x) \
({ unsigned long __ret; \
__asm__ ("srl %0, 0, %0" \
: "=r" (__ret) \
: "0" (__x)); \
(void __user *)__ret; \
})
extern unsigned sys_call_table[];
extern unsigned sys_call_table32[];
extern unsigned sunos_sys_table[];
#define SYS(name) ((long)sys_call_table[__NR_##name])
#define SUNOS(x) ((long)sunos_sys_table[x])
#ifdef DEBUG_SOLARIS
#define SOLD(s) printk("%s,%d,%s(): %s\n",__FILE__,__LINE__,__func__,(s))
#define SOLDD(s) printk("solaris: "); printk s
#else
#define SOLD(s)
#define SOLDD(s)
#endif
#endif /* __ASSEMBLY__ */
此差异已折叠。
此差异已折叠。
此差异已折叠。
/* $Id: ipc.c,v 1.5 1999/12/09 00:41:00 davem Exp $
* ipc.c: Solaris IPC emulation
*
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <linux/mm.h>
#include <linux/shm.h>
#include <linux/sem.h>
#include <linux/msg.h>
#include <linux/ipc.h>
#include <asm/uaccess.h>
#include <asm/string.h>
#include "conv.h"
struct solaris_ipc_perm {
s32 uid;
s32 gid;
s32 cuid;
s32 cgid;
u32 mode;
u32 seq;
int key;
s32 pad[4];
};
struct solaris_shmid_ds {
struct solaris_ipc_perm shm_perm;
int shm_segsz;
u32 shm_amp;
unsigned short shm_lkcnt;
char __padxx[2];
s32 shm_lpid;
s32 shm_cpid;
u32 shm_nattch;
u32 shm_cnattch;
s32 shm_atime;
s32 shm_pad1;
s32 shm_dtime;
s32 shm_pad2;
s32 shm_ctime;
s32 shm_pad3;
unsigned short shm_cv;
char shm_pad4[2];
u32 shm_sptas;
s32 shm_pad5[2];
};
asmlinkage long solaris_shmsys(int cmd, u32 arg1, u32 arg2, u32 arg3)
{
int (*sys_ipc)(unsigned,int,int,unsigned long,void __user *,long) =
(int (*)(unsigned,int,int,unsigned long,void __user *,long))SYS(ipc);
mm_segment_t old_fs;
unsigned long raddr;
int ret;
switch (cmd) {
case 0: /* shmat */
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_ipc(SHMAT, arg1, arg3 & ~0x4000, (unsigned long)&raddr, A(arg2), 0);
set_fs(old_fs);
if (ret >= 0) return (u32)raddr;
else return ret;
case 1: /* shmctl */
switch (arg2) {
case 3: /* SHM_LOCK */
case 4: /* SHM_UNLOCK */
return sys_ipc(SHMCTL, arg1, (arg2 == 3) ? SHM_LOCK : SHM_UNLOCK, 0, NULL, 0);
case 10: /* IPC_RMID */
return sys_ipc(SHMCTL, arg1, IPC_RMID, 0, NULL, 0);
case 11: /* IPC_SET */
{
struct shmid_ds s;
struct solaris_shmid_ds __user *p = A(arg3);
if (get_user (s.shm_perm.uid, &p->shm_perm.uid) ||
__get_user (s.shm_perm.gid, &p->shm_perm.gid) ||
__get_user (s.shm_perm.mode, &p->shm_perm.mode))
return -EFAULT;
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_ipc(SHMCTL, arg1, IPC_SET, 0, &s, 0);
set_fs(old_fs);
return ret;
}
case 12: /* IPC_STAT */
{
struct shmid_ds s;
struct solaris_shmid_ds __user *p = A(arg3);
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = sys_ipc(SHMCTL, arg1, IPC_SET, 0, &s, 0);
set_fs(old_fs);
if (put_user (s.shm_perm.uid, &(p->shm_perm.uid)) ||
__put_user (s.shm_perm.gid, &(p->shm_perm.gid)) ||
__put_user (s.shm_perm.cuid, &(p->shm_perm.cuid)) ||
__put_user (s.shm_perm.cgid, &(p->shm_perm.cgid)) ||
__put_user (s.shm_perm.mode, &(p->shm_perm.mode)) ||
__put_user (s.shm_perm.seq, &(p->shm_perm.seq)) ||
__put_user (s.shm_perm.key, &(p->shm_perm.key)) ||
__put_user (s.shm_segsz, &(p->shm_segsz)) ||
__put_user (s.shm_lpid, &(p->shm_lpid)) ||
__put_user (s.shm_cpid, &(p->shm_cpid)) ||
__put_user (s.shm_nattch, &(p->shm_nattch)) ||
__put_user (s.shm_atime, &(p->shm_atime)) ||
__put_user (s.shm_dtime, &(p->shm_dtime)) ||
__put_user (s.shm_ctime, &(p->shm_ctime)))
return -EFAULT;
return ret;
}
default: return -EINVAL;
}
case 2: /* shmdt */
return sys_ipc(SHMDT, 0, 0, 0, A(arg1), 0);
case 3: /* shmget */
return sys_ipc(SHMGET, arg1, arg2, arg3, NULL, 0);
}
return -EINVAL;
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -62,7 +62,7 @@ config BINFMT_SHARED_FLAT
config BINFMT_AOUT
tristate "Kernel support for a.out and ECOFF binaries"
depends on ARCH_SUPPORTS_AOUT && \
(X86_32 || ALPHA || ARM || M68K || SPARC32)
(X86_32 || ALPHA || ARM || M68K)
---help---
A.out (Assembler.OUTput) is a set of formats for libraries and
executables used in the earliest versions of UNIX. Linux used
......
......@@ -5,7 +5,6 @@ header-y += asi.h
header-y += bpp.h
header-y += jsflash.h
header-y += openpromio.h
header-y += pconf.h
header-y += reg.h
header-y += traps.h
header-y += vfc_ioctls.h
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -43,8 +43,6 @@
#define __TIOCSETX _IOW('t', 34, int) /* SunOS Specific */
#define __TIOCGETX _IOR('t', 35, int) /* SunOS Specific */
#define TIOCCONS _IO('t', 36)
#define __TIOCSSIZE _IOW('t', 37, struct sunos_ttysize) /* SunOS Specific */
#define __TIOCGSIZE _IOR('t', 38, struct sunos_ttysize) /* SunOS Specific */
#define TIOCGSOFTCAR _IOR('t', 100, int)
#define TIOCSSOFTCAR _IOW('t', 101, int)
#define __TIOCUCNTL _IOW('t', 102, int) /* SunOS Specific */
......
......@@ -22,19 +22,6 @@
#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
/* XXX Need to add flags to SunOS's mctl, mlockall, and madvise system
* XXX calls.
*/
/* SunOS sys_mctl() stuff... */
#define MC_SYNC 1 /* Sync pages in memory with storage (usu. a file) */
#define MC_LOCK 2 /* Lock pages into core ram, do not allow swapping of them */
#define MC_UNLOCK 3 /* Unlock pages locked via previous mctl() with MC_LOCK arg */
#define MC_LOCKAS 5 /* Lock an entire address space of the calling process */
#define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */
#define MADV_FREE 0x5 /* (Solaris) contents can be freed */
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
#define arch_mmap_check sparc_mmap_check
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -24,9 +24,6 @@
#define SO_SNDTIMEO 0x4000
#define SO_ACCEPTCONN 0x8000
/* wha!??? */
#define SO_DONTLINGER (~SO_LINGER) /* Older SunOS compat. hack */
#define SO_SNDBUF 0x1001
#define SO_RCVBUF 0x1002
#define SO_SNDBUFFORCE 0x100a
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册