Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
27e0f0fe
Commit
27e0f0fe
authored
Jan 31, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://gkernel.bkbits.net/net-drivers-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
parents
5f99d385
d113a0e9
Changes
64
Hide whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
1311 additions
and
962 deletions
+1311
-962
arch/i386/defconfig
arch/i386/defconfig
+250
-174
arch/ppc/boot/simple/embed_config.c
arch/ppc/boot/simple/embed_config.c
+13
-3
arch/ppc64/defconfig
arch/ppc64/defconfig
+106
-96
arch/ppc64/kernel/asm-offsets.c
arch/ppc64/kernel/asm-offsets.c
+1
-0
arch/ppc64/kernel/head.S
arch/ppc64/kernel/head.S
+90
-67
arch/ppc64/kernel/iSeries_VpdInfo.c
arch/ppc64/kernel/iSeries_VpdInfo.c
+1
-0
arch/ppc64/kernel/lparcfg.c
arch/ppc64/kernel/lparcfg.c
+112
-6
arch/ppc64/kernel/pacaData.c
arch/ppc64/kernel/pacaData.c
+0
-1
arch/ppc64/kernel/ppc_ksyms.c
arch/ppc64/kernel/ppc_ksyms.c
+2
-2
arch/ppc64/kernel/proc_ppc64.c
arch/ppc64/kernel/proc_ppc64.c
+1
-0
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+24
-0
arch/ppc64/kernel/prom.c
arch/ppc64/kernel/prom.c
+12
-0
arch/ppc64/kernel/rtas_flash.c
arch/ppc64/kernel/rtas_flash.c
+0
-2
arch/ppc64/kernel/setup.c
arch/ppc64/kernel/setup.c
+52
-1
arch/ppc64/kernel/signal.c
arch/ppc64/kernel/signal.c
+1
-0
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/signal32.c
+1
-0
arch/ppc64/kernel/stab.c
arch/ppc64/kernel/stab.c
+245
-191
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+2
-0
arch/ppc64/kernel/viopath.c
arch/ppc64/kernel/viopath.c
+0
-1
arch/ppc64/mm/hash_low.S
arch/ppc64/mm/hash_low.S
+0
-1
arch/ppc64/mm/hugetlbpage.c
arch/ppc64/mm/hugetlbpage.c
+4
-5
arch/ppc64/xmon/start.c
arch/ppc64/xmon/start.c
+9
-0
arch/s390/Makefile
arch/s390/Makefile
+5
-0
arch/s390/defconfig
arch/s390/defconfig
+1
-0
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_linux.c
+2
-1
arch/s390/kernel/s390_ksyms.c
arch/s390/kernel/s390_ksyms.c
+2
-0
arch/s390/mm/init.c
arch/s390/mm/init.c
+0
-2
drivers/md/raid6x86.h
drivers/md/raid6x86.h
+8
-5
drivers/s390/char/sclp.c
drivers/s390/char/sclp.c
+3
-2
drivers/s390/char/sclp_con.c
drivers/s390/char/sclp_con.c
+2
-1
drivers/s390/char/sclp_rw.c
drivers/s390/char/sclp_rw.c
+1
-1
drivers/s390/char/sclp_tty.c
drivers/s390/char/sclp_tty.c
+18
-6
drivers/s390/cio/device.c
drivers/s390/cio/device.c
+1
-0
drivers/s390/net/ctctty.c
drivers/s390/net/ctctty.c
+2
-4
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-hub.c
+1
-1
include/asm-ppc/todc.h
include/asm-ppc/todc.h
+2
-2
include/asm-ppc64/bugs.h
include/asm-ppc64/bugs.h
+4
-0
include/asm-ppc64/cputable.h
include/asm-ppc64/cputable.h
+10
-1
include/asm-ppc64/hvcall.h
include/asm-ppc64/hvcall.h
+4
-0
include/asm-ppc64/mmu.h
include/asm-ppc64/mmu.h
+1
-8
include/asm-ppc64/mmu_context.h
include/asm-ppc64/mmu_context.h
+11
-1
include/asm-ppc64/paca.h
include/asm-ppc64/paca.h
+9
-14
include/asm-ppc64/percpu.h
include/asm-ppc64/percpu.h
+3
-3
include/asm-ppc64/pgtable.h
include/asm-ppc64/pgtable.h
+1
-0
include/asm-ppc64/ppc_asm.h
include/asm-ppc64/ppc_asm.h
+4
-0
include/asm-ppc64/processor.h
include/asm-ppc64/processor.h
+1
-0
include/asm-ppc64/ptrace-common.h
include/asm-ppc64/ptrace-common.h
+4
-0
include/asm-ppc64/serial.h
include/asm-ppc64/serial.h
+5
-1
include/asm-s390/atomic.h
include/asm-s390/atomic.h
+13
-8
include/asm-s390/bitops.h
include/asm-s390/bitops.h
+57
-166
include/asm-s390/byteorder.h
include/asm-s390/byteorder.h
+3
-3
include/asm-s390/checksum.h
include/asm-s390/checksum.h
+2
-2
include/asm-s390/div64.h
include/asm-s390/div64.h
+2
-2
include/asm-s390/pgtable.h
include/asm-s390/pgtable.h
+6
-2
include/asm-s390/processor.h
include/asm-s390/processor.h
+22
-17
include/asm-s390/rwsem.h
include/asm-s390/rwsem.h
+74
-73
include/asm-s390/semaphore.h
include/asm-s390/semaphore.h
+3
-3
include/asm-s390/spinlock.h
include/asm-s390/spinlock.h
+34
-30
include/asm-s390/system.h
include/asm-s390/system.h
+50
-47
include/asm-s390/timex.h
include/asm-s390/timex.h
+2
-2
include/asm-s390/tlbflush.h
include/asm-s390/tlbflush.h
+1
-1
include/asm-s390/uaccess.h
include/asm-s390/uaccess.h
+2
-2
include/linux/proc_fs.h
include/linux/proc_fs.h
+7
-1
kernel/exit.c
kernel/exit.c
+2
-0
No files found.
arch/i386/defconfig
View file @
27e0f0fe
...
...
@@ -10,7 +10,8 @@ CONFIG_GENERIC_ISA_DMA=y
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
# CONFIG_BROKEN is not set
CONFIG_CLEAN_COMPILE=y
CONFIG_STANDALONE=y
#
# General setup
...
...
@@ -20,6 +21,7 @@ CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=15
# CONFIG_IKCONFIG is not set
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
CONFIG_FUTEX=y
...
...
@@ -27,6 +29,7 @@ CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
#
# Loadable module support
...
...
@@ -79,7 +82,8 @@ CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_HPET_TIMER is not set
# CONFIG_HPET_EMULATE_RTC is not set
CONFIG_SMP=y
CONFIG_NR_CPUS=8
CONFIG_PREEMPT=y
...
...
@@ -100,20 +104,22 @@ CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM64G is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
CONFIG_HAVE_DEC_LOCK=y
#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_SOFTWARE_SUSPEND is not set
CONFIG_SOFTWARE_SUSPEND=y
# CONFIG_PM_DISK is not set
#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI_HT=y
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_AC=y
...
...
@@ -126,11 +132,11 @@ CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_ACPI_RELAXED_AML is not set
#
# APM (Advanced Power Management) BIOS Support
...
...
@@ -151,6 +157,7 @@ CONFIG_PCI=y
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_USE_VECTOR is not set
CONFIG_PCI_LEGACY_PROC=y
CONFIG_PCI_NAMES=y
CONFIG_ISA=y
...
...
@@ -173,12 +180,14 @@ CONFIG_PCMCIA_PROBE=y
#
# Executable file formats
#
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=y
#
# Device Drivers
#
#
# Generic Driver Options
#
...
...
@@ -262,7 +271,6 @@ CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDE_TCQ is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
...
...
@@ -300,6 +308,7 @@ CONFIG_IDEDMA_AUTO=y
# SCSI device support
#
CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
...
...
@@ -330,11 +339,14 @@ CONFIG_SCSI_REPORT_LUNS=y
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
CONFIG_SCSI_SATA=y
# CONFIG_SCSI_SATA_SVW is not set
CONFIG_SCSI_ATA_PIIX=y
# CONFIG_SCSI_SATA_PROMISE is not set
# CONFIG_SCSI_SATA_VIA is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
...
...
@@ -346,22 +358,21 @@ CONFIG_SCSI_REPORT_LUNS=y
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_SYM53C8XX is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_SEAGATE is not set
CONFIG_SCSI_QLA2XXX_CONFIG=y
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA23XX is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
...
...
@@ -402,7 +413,7 @@ CONFIG_IEEE1394=y
#
#
# Texas Instruments PCILynx requires I2C
bit-banging
# Texas Instruments PCILynx requires I2C
#
CONFIG_IEEE1394_OHCI1394=y
...
...
@@ -447,10 +458,67 @@ CONFIG_IP_MULTICAST=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
#
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_NETFILTER is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=y
# CONFIG_IP_NF_FTP is not set
# CONFIG_IP_NF_IRC is not set
# CONFIG_IP_NF_TFTP is not set
# CONFIG_IP_NF_AMANDA is not set
CONFIG_IP_NF_QUEUE=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=y
CONFIG_IP_NF_MATCH_IPRANGE=y
CONFIG_IP_NF_MATCH_MAC=y
CONFIG_IP_NF_MATCH_PKTTYPE=y
CONFIG_IP_NF_MATCH_MARK=y
CONFIG_IP_NF_MATCH_MULTIPORT=y
CONFIG_IP_NF_MATCH_TOS=y
CONFIG_IP_NF_MATCH_RECENT=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_DSCP=y
CONFIG_IP_NF_MATCH_AH_ESP=y
CONFIG_IP_NF_MATCH_LENGTH=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_MATCH_TCPMSS=y
CONFIG_IP_NF_MATCH_HELPER=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_MATCH_CONNTRACK=y
CONFIG_IP_NF_MATCH_OWNER=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_TARGET_NETMAP=y
CONFIG_IP_NF_TARGET_SAME=y
# CONFIG_IP_NF_NAT_LOCAL is not set
# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_TOS=y
CONFIG_IP_NF_TARGET_ECN=y
CONFIG_IP_NF_TARGET_DSCP=y
CONFIG_IP_NF_TARGET_MARK=y
CONFIG_IP_NF_TARGET_CLASSIFY=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
CONFIG_IP_NF_TARGET_TCPMSS=y
CONFIG_IP_NF_ARPTABLES=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
#
# SCTP Configuration (EXPERIMENTAL)
...
...
@@ -459,7 +527,9 @@ CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
...
...
@@ -487,14 +557,13 @@ CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_MII is not set
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
...
...
@@ -517,6 +586,7 @@ CONFIG_NET_PCI=y
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_CS89x0 is not set
# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
...
...
@@ -567,8 +637,9 @@ CONFIG_8139TOO=y
# CONFIG_NET_RADIO is not set
#
# Token Ring devices
(depends on LLC=y)
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
...
...
@@ -588,6 +659,11 @@ CONFIG_8139TOO=y
#
# CONFIG_IRDA is not set
#
# Bluetooth support
#
# CONFIG_BT is not set
#
# ISDN subsystem
#
...
...
@@ -659,6 +735,7 @@ CONFIG_HW_CONSOLE=y
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_CONSOLE is not set
# CONFIG_SERIAL_8250_ACPI is not set
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
#
...
...
@@ -672,20 +749,6 @@ CONFIG_PRINTER=y
# CONFIG_PPDEV is not set
# CONFIG_TIPAR is not set
#
# I2C support
#
# CONFIG_I2C is not set
#
# I2C Hardware Sensors Mainboard support
#
#
# I2C Hardware Sensors Chip support
#
# CONFIG_I2C_SENSOR is not set
#
# Mice
#
...
...
@@ -713,7 +776,6 @@ CONFIG_PRINTER=y
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
CONFIG_AGP=y
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
...
...
@@ -732,10 +794,16 @@ CONFIG_DRM=y
# CONFIG_DRM_I810 is not set
CONFIG_DRM_I830=y
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HANGCHECK_TIMER is not set
#
# I2C support
#
# CONFIG_I2C is not set
#
# Multimedia devices
#
...
...
@@ -746,138 +814,6 @@ CONFIG_DRM_I830=y
#
# CONFIG_DVB is not set
#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=y
#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
# CONFIG_NTFS_FS is not set
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
CONFIG_RAMFS=y
#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_TCP is not set
CONFIG_LOCKD=y
CONFIG_EXPORTFS=y
CONFIG_SUNRPC=y
# CONFIG_SUNRPC_GSS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
#
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
# Graphics support
#
...
...
@@ -1057,7 +993,6 @@ CONFIG_USB_HIDINPUT=y
#
# USB Network adaptors
#
# CONFIG_USB_AX8817X is not set
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
...
...
@@ -1077,30 +1012,170 @@ CONFIG_USB_HIDINPUT=y
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_TIGL is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_BRLVGER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_TEST is not set
#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
#
Bluetooth support
#
File systems
#
# CONFIG_BT is not set
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=y
#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
# CONFIG_NTFS_FS is not set
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_TCP is not set
CONFIG_LOCKD=y
CONFIG_EXPORTFS=y
CONFIG_SUNRPC=y
# CONFIG_SUNRPC_GSS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
# Profiling support
#
# CONFIG_PROFILING is not set
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
#
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_FRAME_POINTER=y
# CONFIG_FRAME_POINTER is not set
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y
...
...
@@ -1117,8 +1192,9 @@ CONFIG_X86_MPPARSE=y
#
# Library routines
#
# CONFIG_CRC32 is not set
CONFIG_CRC32=y
CONFIG_X86_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_X86_TRAMPOLINE=y
CONFIG_PC=y
arch/ppc/boot/simple/embed_config.c
View file @
27e0f0fe
...
...
@@ -50,7 +50,7 @@ embed_config(bd_t **bdp)
{
u_char
*
mp
;
u_char
eebuf
[
128
];
int
i
;
int
i
=
8
;
bd_t
*
bd
;
bd
=
*
bdp
;
...
...
@@ -62,11 +62,21 @@ embed_config(bd_t **bdp)
/* All we are looking for is the Ethernet MAC address. The
* first 8 bytes are 'MOTOROLA', so check for part of that.
* Next, the VPD describes a MAC 'packet' as being of type 08
* and size 06. So we look for that and the MAC must follow.
* If there are more than one, we still only care about the first.
* If it's there, assume we have a valid MAC address. If not,
* grab our default one.
*/
if
((
*
(
uint
*
)
eebuf
)
==
0x4d4f544f
)
mp
=
&
eebuf
[
0x4c
];
if
((
*
(
uint
*
)
eebuf
)
==
0x4d4f544f
)
{
while
(
i
<
127
&&
!
(
eebuf
[
i
]
==
0x08
&&
eebuf
[
i
+
1
]
==
0x06
))
i
+=
eebuf
[
i
+
1
]
+
2
;
/* skip this packet */
if
(
i
==
127
)
/* Couldn't find. */
mp
=
(
u_char
*
)
def_enet_addr
;
else
mp
=
&
eebuf
[
i
+
2
];
}
else
mp
=
(
u_char
*
)
def_enet_addr
;
...
...
arch/ppc64/defconfig
View file @
27e0f0fe
#
# Automatically generated make config: don't edit
#
CONFIG_64BIT=y
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_ISA_DMA=y
...
...
@@ -14,7 +15,8 @@ CONFIG_FORCE_MAX_ZONEORDER=13
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
# CONFIG_BROKEN is not set
CONFIG_CLEAN_COMPILE=y
CONFIG_STANDALONE=y
#
# General setup
...
...
@@ -33,6 +35,7 @@ CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
#
# Loadable module support
...
...
@@ -51,21 +54,23 @@ CONFIG_OBSOLETE_MODPARM=y
CONFIG_PPC_PSERIES=y
CONFIG_PPC=y
CONFIG_PPC64=y
CONFIG_ALTIVEC=y
# CONFIG_POWER4_ONLY is not set
CONFIG_SMP=y
CONFIG_IRQ_ALL_CPUS=y
CONFIG_NR_CPUS=32
# CONFIG_HMT is not set
# CONFIG_DISCONTIGMEM is not set
# CONFIG_RTAS_FLASH is not set
CONFIG_SCANLOG=y
CONFIG_PPC_RTAS=y
CONFIG_RTAS_FLASH=m
CONFIG_SCANLOG=m
CONFIG_LPARCFG=y
#
# General setup
#
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
CONFIG_PCI_LEGACY_PROC=y
...
...
@@ -74,6 +79,10 @@ CONFIG_PCI_NAMES=y
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
#
# Device Drivers
#
#
# Generic Driver Options
#
...
...
@@ -117,6 +126,7 @@ CONFIG_BLK_DEV_INITRD=y
# SCSI device support
#
CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
...
...
@@ -145,9 +155,9 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
...
...
@@ -155,18 +165,21 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_I
NITIO
is not set
# CONFIG_SCSI_I
PS
is not set
# CONFIG_SCSI_INIA100 is not set
CONFIG_SCSI_SYM53C8XX_2=y
CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
CONFIG_SCSI_QLA2XXX_CONFIG=y
CONFIG_SCSI_QLA2XXX=y
CONFIG_SCSI_QLA21XX=y
CONFIG_SCSI_QLA22XX=y
CONFIG_SCSI_QLA23XX=y
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_NSP32 is not set
...
...
@@ -181,6 +194,7 @@ CONFIG_MD_LINEAR=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID5=y
# CONFIG_MD_RAID6 is not set
# CONFIG_MD_MULTIPATH is not set
CONFIG_BLK_DEV_DM=y
CONFIG_DM_IOCTL_V4=y
...
...
@@ -240,7 +254,9 @@ CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
...
...
@@ -268,7 +284,6 @@ CONFIG_DUMMY=m
CONFIG_BONDING=m
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
# CONFIG_ETHERTAP is not set
#
# Ethernet (10 or 100Mbit)
...
...
@@ -292,6 +307,7 @@ CONFIG_PCNET32=y
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
CONFIG_E100=y
...
...
@@ -303,7 +319,6 @@ CONFIG_E100=y
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
#
...
...
@@ -344,10 +359,10 @@ CONFIG_PPPOE=m
# CONFIG_NET_RADIO is not set
#
# Token Ring devices
(depends on LLC=y)
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
#
...
...
@@ -365,6 +380,11 @@ CONFIG_PPPOE=m
#
# CONFIG_IRDA is not set
#
# Bluetooth support
#
# CONFIG_BT is not set
#
# ISDN subsystem
#
...
...
@@ -433,6 +453,7 @@ CONFIG_HW_CONSOLE=y
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
#
...
...
@@ -444,20 +465,6 @@ CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_HVC_CONSOLE=y
#
# I2C support
#
# CONFIG_I2C is not set
#
# I2C Hardware Sensors Mainboard support
#
#
# I2C Hardware Sensors Chip support
#
# CONFIG_I2C_SENSOR is not set
#
# Mice
#
...
...
@@ -483,11 +490,15 @@ CONFIG_HVC_CONSOLE=y
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
CONFIG_RAW_DRIVER=y
# CONFIG_HANGCHECK_TIMER is not set
CONFIG_MAX_RAW_DEVS=256
#
# I2C support
#
# CONFIG_I2C is not set
#
# Multimedia devices
...
...
@@ -499,6 +510,67 @@ CONFIG_RAW_DRIVER=y
#
# CONFIG_DVB is not set
#
# Graphics support
#
CONFIG_FB=y
# CONFIG_FB_CYBER2000 is not set
CONFIG_FB_OF=y
# CONFIG_FB_CT65550 is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_S3TRIO is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_RIVA is not set
CONFIG_FB_MATROX=y
CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_FB_MATROX_G450=y
CONFIG_FB_MATROX_G100=y
CONFIG_FB_MATROX_MULTIHEAD=y
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_VIRTUAL is not set
#
# Console display driver support
#
# CONFIG_VGA_CONSOLE is not set
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_PCI_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
#
# Logo configuration
#
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_GADGET is not set
#
# File systems
#
...
...
@@ -551,11 +623,14 @@ CONFIG_VFAT_FS=y
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
CONFIG_DEVPTS_FS_XATTR=y
# CONFIG_DEVPTS_FS_SECURITY is not set
CONFIG_TMPFS=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_RAMFS=y
#
...
...
@@ -580,6 +655,7 @@ CONFIG_CRAMFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V4=y
...
...
@@ -602,11 +678,11 @@ CONFIG_CIFS=m
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
...
...
@@ -646,72 +722,6 @@ CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
# Graphics support
#
CONFIG_FB=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
CONFIG_FB_OF=y
# CONFIG_FB_CT65550 is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_S3TRIO is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_RIVA is not set
CONFIG_FB_MATROX=y
CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_FB_MATROX_G450=y
CONFIG_FB_MATROX_G100=y
CONFIG_FB_MATROX_MULTIHEAD=y
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_VIRTUAL is not set
#
# Console display driver support
#
# CONFIG_VGA_CONSOLE is not set
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_PCI_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
#
# Logo configuration
#
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
# CONFIG_USB_GADGET is not set
#
# Bluetooth support
#
# CONFIG_BT is not set
#
# Profiling support
#
...
...
arch/ppc64/kernel/asm-offsets.c
View file @
27e0f0fe
...
...
@@ -13,6 +13,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kernel.h>
...
...
arch/ppc64/kernel/head.S
View file @
27e0f0fe
...
...
@@ -646,12 +646,14 @@ fast_exception_return:
*/
.
globl
DataAccess_common
DataAccess_common
:
BEGIN_FTR_SECTION
mfspr
r22
,
DAR
srdi
r22
,
r22
,
60
cmpi
0
,
r22
,
0xc
/
*
Segment
fault
on
a
bolted
segment
.
Go
off
and
map
that
segment
.
*/
beq
-
.
do_stab_bolted
END_FTR_SECTION_IFCLR
(
CPU_FTR_SLB
)
stab_bolted_user_return
:
EXCEPTION_PROLOG_COMMON
ld
r3
,
_DSISR
(
r1
)
...
...
@@ -661,10 +663,12 @@ stab_bolted_user_return:
rlwinm
r4
,
r3
,
32
-
23
,
29
,
29
/*
DSISR_STORE
->
_PAGE_RW
*/
ld
r3
,
_DAR
(
r1
)
/*
into
the
hash
table
*/
BEGIN_FTR_SECTION
beq
+
2
f
/*
If
so
handle
it
*/
li
r4
,
0x300
/*
Trap
number
*/
bl
.
do_stab_SI
b
1
f
END_FTR_SECTION_IFCLR
(
CPU_FTR_SLB
)
2
:
li
r5
,
0x300
bl
.
do_hash_page_DSI
/*
Try
to
handle
as
hpte
fault
*/
...
...
@@ -690,7 +694,7 @@ DataAccessSLB_common:
EXCEPTION_PROLOG_COMMON
ld
r3
,
_DAR
(
r1
)
li
r4
,
0x380
/*
Exception
vector
*/
bl
.
s
te
_allocate
bl
.
s
lb
_allocate
or
.
r3
,
r3
,
r3
/*
Check
return
code
*/
beq
fast_exception_return
/*
Return
if
we
succeeded
*/
addi
r3
,
r1
,
STACK_FRAME_OVERHEAD
...
...
@@ -705,12 +709,14 @@ DataAccessSLB_common:
InstructionAccess_common
:
EXCEPTION_PROLOG_COMMON
BEGIN_FTR_SECTION
andis
.
r0
,
r23
,
0x0020
/*
no
ste
found
?
*/
beq
+
2
f
mr
r3
,
r22
/*
SRR0
at
interrupt
*/
li
r4
,
0x400
/*
Trap
number
*/
bl
.
do_stab_SI
b
1
f
END_FTR_SECTION_IFCLR
(
CPU_FTR_SLB
)
2
:
mr
r3
,
r22
li
r5
,
0x400
...
...
@@ -730,7 +736,7 @@ InstructionAccessSLB_common:
EXCEPTION_PROLOG_COMMON
mr
r3
,
r22
/*
SRR0
=
NIA
*/
li
r4
,
0x480
/*
Exception
vector
*/
bl
.
s
te
_allocate
bl
.
s
lb
_allocate
or
.
r3
,
r3
,
r3
/*
Check
return
code
*/
beq
+
fast_exception_return
/*
Return
if
we
succeeded
*/
...
...
@@ -1006,48 +1012,27 @@ _GLOBAL(do_stab_bolted)
*
r20
-
r23
,
SRR0
and
SRR1
are
saved
in
the
exception
frame
.
*
We
assume
we
aren
't going to take any exceptions during this procedure.
*/
/*
XXX
note
fix
masking
in
get_kernel_vsid
to
match
*/
_GLOBAL
(
do_slb_bolted
)
stw
r23
,
EX_CCR
(
r21
)
/*
save
CR
in
exc
.
frame
*/
stw
r23
,
EX_CCR
(
r21
)
/*
save
CR
in
exc
.
frame
*/
/
*
(((
ea
>>
28
)
&
0x1fff
)
<<
15
)
|
(
ea
>>
60
)
*/
mfspr
r21
,
DAR
rldicl
r20
,
r21
,
36
,
32
/*
Permits
a
full
32
b
of
ESID
*/
rldicr
r20
,
r20
,
15
,
48
rldicl
r21
,
r21
,
4
,
60
or
r20
,
r20
,
r21
li
r21
,
9
/*
VSID_RANDOMIZER
*/
sldi
r21
,
r21
,
32
oris
r21
,
r21
,
58231
ori
r21
,
r21
,
39831
mulld
r20
,
r20
,
r21
clrldi
r20
,
r20
,
28
/*
r20
=
vsid
*/
/
*
Search
the
SLB
for
a
free
entry
*/
li
r22
,
1
1
:
slbmfee
r23
,
r22
rldicl
r23
,
r23
,
37
,
63
cmpwi
r23
,
0
beq
4
f
/*
Found
an
invalid
entry
*/
addi
r22
,
r22
,
1
cmpldi
r22
,
64
blt
1
b
/
*
*
We
take
the
next
entry
,
round
robin
.
Previously
we
tried
*
to
find
a
free
slot
first
but
that
took
too
long
.
Unfortunately
*
we
dont
have
any
LRU
information
to
help
us
choose
a
slot
.
*/
/
*
No
free
entry
-
just
take
the
next
entry
,
round
-
robin
*/
/
*
XXX
we
should
get
the
number
of
SLB
entries
from
the
naca
*/
/
*
r20
=
paca
*/
/
*
use
a
cpu
feature
mask
if
we
ever
change
our
slb
size
*/
SLB_NUM_ENTRIES
=
64
2
:
mfspr
r21
,
SPRG3
ld
r22
,
PACASTABRR
(
r21
)
addi
r23
,
r22
,
1
cmpdi
r23
,
SLB_NUM_ENTRIES
blt
3
f
li
r23
,
1
3
:
std
r23
,
PACASTABRR
(
r21
)
1
:
ld
r22
,
PACASTABRR
(
r20
)
addi
r21
,
r22
,
1
cmpdi
r21
,
SLB_NUM_ENTRIES
blt
+
2
f
li
r21
,
1
/*
dont
touch
bolted
slot
0
*/
2
:
std
r21
,
PACASTABRR
(
r20
)
/
*
r20
=
vsid
,
r22
=
entry
*/
/
*
r20
=
paca
,
r22
=
entry
*/
/
*
*
Never
cast
out
the
segment
for
our
kernel
stack
.
Since
we
...
...
@@ -1056,48 +1041,86 @@ SLB_NUM_ENTRIES = 64
*
which
gets
invalidated
due
to
a
tlbie
from
another
cpu
at
a
*
non
recoverable
point
(
after
setting
srr0
/
1
)
-
Anton
*/
slbmfee
r2
3
,
r22
srdi
r2
3
,
r23
,
28
slbmfee
r2
1
,
r22
srdi
r2
1
,
r21
,
27
/
*
*
This
is
incorrect
(
r1
is
not
the
kernel
stack
)
if
we
entered
*
from
userspace
but
there
is
no
critical
window
from
userspace
*
so
this
should
be
OK
.
Also
if
we
cast
out
the
userspace
stack
*
segment
while
in
userspace
we
will
fault
it
straight
back
in
.
*/
srdi
r21
,
r1
,
28
cmpd
r21
,
r23
beq
-
2
b
/
*
Put
together
the
vsid
portion
of
the
entry
.
*/
4
:
li
r21
,
0
rldimi
r21
,
r20
,
12
,
0
ori
r20
,
r21
,
1024
ori
r20
,
r20
,
128
/*
set
class
bit
for
kernel
region
*/
#ifndef CONFIG_PPC_ISERIES
ori
r20
,
r20
,
256
/*
map
kernel
region
with
large
ptes
*/
#endif
srdi
r23
,
r1
,
27
ori
r23
,
r23
,
1
cmpd
r23
,
r21
beq
-
1
b
/
*
r20
=
paca
,
r22
=
entry
*/
/
*
(((
ea
>>
28
)
&
0x1fff
)
<<
15
)
|
(
ea
>>
60
)
*/
mfspr
r21
,
DAR
rldicl
r23
,
r21
,
36
,
51
sldi
r23
,
r23
,
15
srdi
r21
,
r21
,
60
or
r23
,
r23
,
r21
/
*
VSID_RANDOMIZER
*/
li
r21
,
9
sldi
r21
,
r21
,
32
oris
r21
,
r21
,
58231
ori
r21
,
r21
,
39831
/
*
vsid
=
(
ordinal
*
VSID_RANDOMIZER
)
&
VSID_MASK
*/
mulld
r23
,
r23
,
r21
clrldi
r23
,
r23
,
28
/
*
r20
=
paca
,
r22
=
entry
,
r23
=
vsid
*/
/
*
Put
together
slb
word1
*/
sldi
r23
,
r23
,
12
BEGIN_FTR_SECTION
/
*
set
kp
and
c
bits
*/
ori
r23
,
r23
,
0x480
END_FTR_SECTION_IFCLR
(
CPU_FTR_16M_PAGE
)
BEGIN_FTR_SECTION
/
*
set
kp
,
l
and
c
bits
*/
ori
r23
,
r23
,
0x580
END_FTR_SECTION_IFSET
(
CPU_FTR_16M_PAGE
)
/
*
r20
=
paca
,
r22
=
entry
,
r23
=
slb
word1
*/
/
*
Put
together
slb
word0
*/
mfspr
r21
,
DAR
rldicr
r21
,
r21
,
0
,
35
/*
get
the
new
esid
*/
oris
r21
,
r21
,
2048
/*
set
valid
bit
*/
rldimi
r21
,
r22
,
0
,
52
/*
insert
entry
*/
/
*
Put
together
the
esid
portion
of
the
entry
.
*/
mfspr
r21
,
DAR
/*
Get
the
new
esid
*/
rldicl
r21
,
r21
,
36
,
28
/*
Permits
a
full
36
b
of
ESID
*/
li
r23
,
0
rldimi
r23
,
r21
,
28
,
0
/*
Insert
esid
*/
oris
r21
,
r23
,
2048
/*
valid
bit
*/
rldimi
r21
,
r22
,
0
,
52
/*
Insert
entry
*/
/
*
r20
=
paca
,
r21
=
slb
word0
,
r23
=
slb
word1
*/
/
*
*
No
need
for
an
isync
before
or
after
this
slbmte
.
The
exception
*
we
enter
with
and
the
rfid
we
exit
with
are
context
synchronizing
.
*/
slbmte
r20
,
r21
slbmte
r23
,
r21
/
*
All
done
--
return
from
exception
.
*/
mfsprg
r20
,
3
/*
Load
the
PACA
pointer
*/
ld
r21
,
PACAEXCSP
(
r20
)
/*
Get
the
exception
frame
pointer
*/
addi
r21
,
r21
,
EXC_FRAME_SIZE
ld
r21
,
PACAEXCSP
(
r20
)
/*
Get
the
exception
frame
pointer
*/
addi
r21
,
r21
,
EXC_FRAME_SIZE
lwz
r23
,
EX_CCR
(
r21
)
/*
get
saved
CR
*/
/
*
note
that
this
is
almost
identical
to
maskable_exception_exit
*/
mtcr
r23
/*
restore
CR
*/
/
*
*
Until
everyone
updates
binutils
hardwire
the
POWER4
optimised
*
single
field
mtcrf
*/
#if 0
.
machine
push
.
machine
"power4"
mtcrf
0x80
,
r23
.
machine
pop
#else
.
long
0x7ef80120
#endif
mfmsr
r22
li
r23
,
MSR_RI
...
...
@@ -1107,10 +1130,10 @@ SLB_NUM_ENTRIES = 64
ld
r22
,
EX_SRR0
(
r21
)
/*
Get
SRR0
from
exc
.
frame
*/
ld
r23
,
EX_SRR1
(
r21
)
/*
Get
SRR1
from
exc
.
frame
*/
mtspr
SRR0
,
r22
mtspr
SRR1
,
r23
mtspr
SRR1
,
r23
ld
r22
,
EX_R22
(
r21
)
/*
restore
r22
and
r23
*/
ld
r23
,
EX_R23
(
r21
)
mfspr
r20
,
SPRG2
ld
r20
,
EX_R20
(
r21
)
mfspr
r21
,
SPRG1
rfid
...
...
arch/ppc64/kernel/iSeries_VpdInfo.c
View file @
27e0f0fe
...
...
@@ -25,6 +25,7 @@
/* Ported to ppc64, August 20, 2001 */
/* End Change Activity */
/************************************************************************/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <asm/types.h>
...
...
arch/ppc64/kernel/lparcfg.c
View file @
27e0f0fe
...
...
@@ -5,6 +5,8 @@
* Copyright (c) 2003 Dave Engebretsen
* Will Schmidt willschm@us.ibm.com
* SPLPAR updates, Copyright (c) 2003 Will Schmidt IBM Corporation.
* Nathan Lynch nathanl@austin.ibm.com
* Added lparcfg_write, Copyright (C) 2004 Nathan Lynch IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -15,6 +17,7 @@
* keyword - value pairs that specify the configuration of the partition.
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
...
...
@@ -33,6 +36,9 @@ static struct proc_dir_entry *proc_ppc64_lparcfg;
#define LPARCFG_BUFF_SIZE 4096
#ifdef CONFIG_PPC_ISERIES
#define lparcfg_write NULL
static
unsigned
char
e2a
(
unsigned
char
x
)
{
switch
(
x
)
{
...
...
@@ -326,7 +332,7 @@ static int lparcfg_data(unsigned char *buf, unsigned long size)
system_potential_processors
=
get_splpar_potential_characteristics
();
n
+=
snprintf
(
buf
+
n
,
LPARCFG_BUFF_SIZE
-
n
,
"system_active_processors=%d
\n
"
,
(
h_resource
>>
2
*
8
)
&
&
0xffff
);
(
h_resource
>>
2
*
8
)
&
0xffff
);
n
+=
snprintf
(
buf
+
n
,
LPARCFG_BUFF_SIZE
-
n
,
"system_potential_processors=%d
\n
"
,
system_potential_processors
);
...
...
@@ -367,22 +373,115 @@ static int lparcfg_data(unsigned char *buf, unsigned long size)
if
(
cur_cpu_spec
->
firmware_features
&
FW_FEATURE_SPLPAR
)
{
n
+=
snprintf
(
buf
+
n
,
LPARCFG_BUFF_SIZE
-
n
,
"pool=%d
\n
"
,
(
h_aggregation
>>
0
*
8
)
&
&
0xffff
);
"pool=%d
\n
"
,
(
h_aggregation
>>
0
*
8
)
&
0xffff
);
n
+=
snprintf
(
buf
+
n
,
LPARCFG_BUFF_SIZE
-
n
,
"pool_capacity=%d
\n
"
,
(
h_resource
>>
3
*
8
)
&
&
0xffff
);
"pool_capacity=%d
\n
"
,
(
h_resource
>>
3
*
8
)
&
0xffff
);
n
+=
snprintf
(
buf
+
n
,
LPARCFG_BUFF_SIZE
-
n
,
"group=%d
\n
"
,
(
h_aggregation
>>
2
*
8
)
&
&
0xffff
);
"group=%d
\n
"
,
(
h_aggregation
>>
2
*
8
)
&
0xffff
);
n
+=
snprintf
(
buf
+
n
,
LPARCFG_BUFF_SIZE
-
n
,
"capped=%d
\n
"
,
(
h_resource
>>
6
*
8
)
&
&
0x40
);
"capped=%d
\n
"
,
(
h_resource
>>
6
*
8
)
&
0x40
);
n
+=
snprintf
(
buf
+
n
,
LPARCFG_BUFF_SIZE
-
n
,
"capacity_weight=%d
\n
"
,
(
int
)(
h_resource
>>
5
*
8
)
&
0xFF
);
}
return
0
;
}
/*
* Interface for changing system parameters (variable capacity weight
* and entitled capacity). Format of input is "param_name=value";
* anything after value is ignored. Valid parameters at this time are
* "partition_entitled_capacity" and "capacity_weight". We use
* H_SET_PPP to alter parameters.
*
* This function should be invoked only on systems with
* FW_FEATURE_SPLPAR.
*/
static
ssize_t
lparcfg_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
off
)
{
char
*
kbuf
;
char
*
tmp
;
u64
new_entitled
,
*
new_entitled_ptr
=
&
new_entitled
;
u8
new_weight
,
*
new_weight_ptr
=
&
new_weight
;
unsigned
long
current_entitled
;
/* parameters for h_get_ppp */
unsigned
long
dummy
;
unsigned
long
resource
;
u8
current_weight
;
ssize_t
retval
=
-
ENOMEM
;
kbuf
=
kmalloc
(
count
,
GFP_KERNEL
);
if
(
!
kbuf
)
goto
out
;
retval
=
-
EFAULT
;
if
(
copy_from_user
(
kbuf
,
buf
,
count
))
goto
out
;
retval
=
-
EINVAL
;
kbuf
[
count
-
1
]
=
'\0'
;
tmp
=
strchr
(
kbuf
,
'='
);
if
(
!
tmp
)
goto
out
;
*
tmp
++
=
'\0'
;
if
(
!
strcmp
(
kbuf
,
"partition_entitled_capacity"
))
{
char
*
endp
;
*
new_entitled_ptr
=
(
u64
)
simple_strtoul
(
tmp
,
&
endp
,
10
);
if
(
endp
==
tmp
)
goto
out
;
new_weight_ptr
=
&
current_weight
;
}
else
if
(
!
strcmp
(
kbuf
,
"capacity_weight"
))
{
char
*
endp
;
*
new_weight_ptr
=
(
u8
)
simple_strtoul
(
tmp
,
&
endp
,
10
);
if
(
endp
==
tmp
)
goto
out
;
new_entitled_ptr
=
&
current_entitled
;
}
else
goto
out
;
/* Get our current parameters */
retval
=
h_get_ppp
(
&
current_entitled
,
&
dummy
,
&
dummy
,
&
resource
);
if
(
retval
)
{
retval
=
-
EIO
;
goto
out
;
}
current_weight
=
(
resource
>>
5
*
8
)
&
0xFF
;
pr_debug
(
"%s: current_entitled = %lu, current_weight = %lu
\n
"
,
__FUNCTION__
,
current_entitled
,
current_weight
);
pr_debug
(
"%s: new_entitled = %lu, new_weight = %lu
\n
"
,
__FUNCTION__
,
*
new_entitled_ptr
,
*
new_weight_ptr
);
retval
=
plpar_hcall_norets
(
H_SET_PPP
,
*
new_entitled_ptr
,
*
new_weight_ptr
);
if
(
retval
==
H_Success
||
retval
==
H_Constrained
)
{
retval
=
count
;
}
else
if
(
retval
==
H_Busy
)
{
retval
=
-
EBUSY
;
}
else
if
(
retval
==
H_Hardware
)
{
retval
=
-
EIO
;
}
else
if
(
retval
==
H_Parameter
)
{
retval
=
-
EINVAL
;
}
else
{
printk
(
KERN_WARNING
"%s: received unknown hv return code %ld"
,
__FUNCTION__
,
retval
);
retval
=
-
EIO
;
}
out:
kfree
(
kbuf
);
return
retval
;
}
#endif
/* CONFIG_PPC_PSERIES */
...
...
@@ -442,8 +541,15 @@ struct file_operations lparcfg_fops = {
int
__init
lparcfg_init
(
void
)
{
struct
proc_dir_entry
*
ent
;
mode_t
mode
=
S_IRUSR
;
/* Allow writing if we have FW_FEATURE_SPLPAR */
if
(
cur_cpu_spec
->
firmware_features
&
FW_FEATURE_SPLPAR
)
{
lparcfg_fops
.
write
=
lparcfg_write
;
mode
|=
S_IWUSR
;
}
ent
=
create_proc_entry
(
"ppc64/lparcfg"
,
S_IRUSR
,
NULL
);
ent
=
create_proc_entry
(
"ppc64/lparcfg"
,
mode
,
NULL
);
if
(
ent
)
{
ent
->
proc_fops
=
&
lparcfg_fops
;
ent
->
data
=
kmalloc
(
LPARCFG_BUFF_SIZE
,
GFP_KERNEL
);
...
...
arch/ppc64/kernel/pacaData.c
View file @
27e0f0fe
...
...
@@ -41,7 +41,6 @@ struct systemcfg *systemcfg;
.xStab_data = { \
.real = (asrr),
/* Real pointer to segment table */
\
.virt = (asrv),
/* Virt pointer to segment table */
\
.next_round_robin = 1
/* Round robin index */
\
}, \
.lpQueuePtr = (lpq),
/* &xItLpQueue, */
\
/* .xRtas = { \
...
...
arch/ppc64/kernel/ppc_ksyms.c
View file @
27e0f0fe
...
...
@@ -83,7 +83,7 @@ EXPORT_SYMBOL(__up);
EXPORT_SYMBOL
(
naca
);
EXPORT_SYMBOL
(
__down
);
/* EXPORT_SYMBOL(csum_partial); already in net/netsyms.c */
EXPORT_SYMBOL
(
csum_partial
);
EXPORT_SYMBOL
(
csum_partial_copy_generic
);
EXPORT_SYMBOL
(
ip_fast_csum
);
EXPORT_SYMBOL
(
csum_tcpudp_magic
);
...
...
@@ -191,12 +191,12 @@ EXPORT_SYMBOL(find_all_nodes);
EXPORT_SYMBOL
(
get_property
);
#endif
EXPORT_SYMBOL_NOVERS
(
memcpy
);
EXPORT_SYMBOL_NOVERS
(
memset
);
EXPORT_SYMBOL_NOVERS
(
memmove
);
EXPORT_SYMBOL_NOVERS
(
memscan
);
EXPORT_SYMBOL_NOVERS
(
memcmp
);
EXPORT_SYMBOL_NOVERS
(
memchr
);
EXPORT_SYMBOL
(
abs
);
...
...
arch/ppc64/kernel/proc_ppc64.c
View file @
27e0f0fe
...
...
@@ -27,6 +27,7 @@
* End Change Activity
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/proc_fs.h>
...
...
arch/ppc64/kernel/process.c
View file @
27e0f0fe
...
...
@@ -151,7 +151,31 @@ struct task_struct *__switch_to(struct task_struct *prev,
local_irq_save
(
flags
);
last
=
_switch
(
old_thread
,
new_thread
);
/*
* force our kernel stack out of the ERAT and SLB, this is to
* avoid the race where we it hangs around in the ERAT but not the
* SLB and the ERAT gets invalidated at just the wrong moment by
* another CPU doing a tlbie.
*
* We definitely dont want to flush our bolted segment, so check
* for that first.
*/
if
((
cur_cpu_spec
->
cpu_features
&
CPU_FTR_SLB
)
&&
GET_ESID
((
unsigned
long
)
_get_SP
())
!=
GET_ESID
(
PAGE_OFFSET
))
{
union
{
unsigned
long
word0
;
slb_dword0
data
;
}
esid_data
;
esid_data
.
word0
=
0
;
/* class bit is in valid field for slbie instruction */
esid_data
.
data
.
v
=
1
;
esid_data
.
data
.
esid
=
GET_ESID
((
unsigned
long
)
_get_SP
());
asm
volatile
(
"isync; slbie %0; isync"
:
:
"r"
(
esid_data
));
}
local_irq_restore
(
flags
);
return
last
;
}
...
...
arch/ppc64/kernel/prom.c
View file @
27e0f0fe
...
...
@@ -2560,6 +2560,7 @@ int of_remove_node(struct device_node *np)
return
0
;
}
#ifdef CONFIG_PROC_DEVICETREE
/*
* Add a node to /proc/device-tree.
*/
...
...
@@ -2592,6 +2593,17 @@ static void remove_node_proc_entries(struct device_node *np)
if
(
np
->
pde
)
remove_proc_entry
(
np
->
pde
->
name
,
parent
->
pde
);
}
#else
/* !CONFIG_PROC_DEVICETREE */
static
void
add_node_proc_entries
(
struct
device_node
*
np
)
{
return
;
}
static
void
remove_node_proc_entries
(
struct
device_node
*
np
)
{
return
;
}
#endif
/* CONFIG_PROC_DEVICETREE */
/*
* Fix up the uninitialized fields in a new device node:
...
...
arch/ppc64/kernel/rtas_flash.c
View file @
27e0f0fe
...
...
@@ -14,8 +14,6 @@
*/
#include <linux/module.h>
#include <linux/config.h>
#include <linux/init.h>
#include <asm/proc_fs.h>
#include <asm/delay.h>
...
...
arch/ppc64/kernel/setup.c
View file @
27e0f0fe
...
...
@@ -38,6 +38,7 @@
#include <asm/paca.h>
#include <asm/ppcdebug.h>
#include <asm/time.h>
#include <asm/cputable.h>
#include <asm/sections.h>
extern
unsigned
long
klimit
;
...
...
@@ -430,8 +431,58 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
}
}
#ifdef CONFIG_PPC_PSERIES
static
int
__init
set_preferred_console
(
void
)
{
struct
device_node
*
prom_stdout
;
char
*
name
;
/* The user has requested a console so this is already set up. */
if
(
strstr
(
cmd_line
,
"console="
))
return
-
EBUSY
;
prom_stdout
=
find_path_device
(
of_stdout_device
);
if
(
!
prom_stdout
)
return
-
ENODEV
;
name
=
(
char
*
)
get_property
(
prom_stdout
,
"name"
,
NULL
);
if
(
!
name
)
return
-
ENODEV
;
if
(
strcmp
(
name
,
"serial"
)
==
0
)
{
int
i
;
u32
*
reg
=
(
u32
*
)
get_property
(
prom_stdout
,
"reg"
,
&
i
);
if
(
i
>
8
)
{
int
offset
;
switch
(
reg
[
1
])
{
case
0x3f8
:
offset
=
0
;
break
;
case
0x2f8
:
offset
=
1
;
break
;
case
0x898
:
offset
=
2
;
break
;
case
0x890
:
offset
=
3
;
break
;
default:
/* We dont recognise the serial port */
return
-
ENODEV
;
}
return
add_preferred_console
(
"ttyS"
,
offset
,
NULL
);
}
}
else
if
(
strcmp
(
name
,
"vty"
)
==
0
)
{
/* pSeries LPAR virtual console */
return
add_preferred_console
(
"hvc"
,
0
,
NULL
);
}
return
-
ENODEV
;
}
console_initcall
(
set_preferred_console
);
int
parse_bootinfo
(
void
)
{
struct
bi_record
*
rec
;
...
...
arch/ppc64/kernel/signal.c
View file @
27e0f0fe
...
...
@@ -14,6 +14,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include <linux/config.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/smp.h>
...
...
arch/ppc64/kernel/signal32.c
View file @
27e0f0fe
...
...
@@ -14,6 +14,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include <linux/config.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/smp.h>
...
...
arch/ppc64/kernel/stab.c
View file @
27e0f0fe
...
...
@@ -12,8 +12,6 @@
* 2 of the License, or (at your option) any later version.
*/
/* XXX Note: Changes for bolted region have not been merged - Anton */
#include <linux/config.h>
#include <asm/pgtable.h>
#include <asm/mmu.h>
...
...
@@ -59,6 +57,15 @@ void stab_initialize(unsigned long stab)
}
}
/* Both the segment table and SLB code uses the following cache */
#define NR_STAB_CACHE_ENTRIES 8
DEFINE_PER_CPU
(
long
,
stab_cache_ptr
);
DEFINE_PER_CPU
(
long
,
stab_cache
[
NR_STAB_CACHE_ENTRIES
]);
/*
* Segment table stuff
*/
/*
* Create a segment table entry for the given esid/vsid pair.
*/
...
...
@@ -91,14 +98,8 @@ int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid)
/*
* Could not find empty entry, pick one with a round robin selection.
* Search all entries in the two groups. Note that the first time
* we get here, we start with entry 1 so the initializer
* can be common with the SLB castout code.
* Search all entries in the two groups.
*/
/* This assumes we never castout when initializing the stab. */
PMC_SW_PROCESSOR
(
stab_capacity_castouts
);
castout_entry
=
get_paca
()
->
xStab_data
.
next_round_robin
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
if
(
castout_entry
<
8
)
{
...
...
@@ -123,23 +124,169 @@ int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid)
/* Modify the old entry to the new value. */
/* Force previous translations to complete. DRENG */
asm
volatile
(
"isync"
:
:
:
"memory"
);
asm
volatile
(
"isync"
:
:
:
"memory"
);
castout_ste
->
dw0
.
dw0
.
v
=
0
;
asm
volatile
(
"sync"
:
:
:
"memory"
);
/* Order update */
asm
volatile
(
"sync"
:
:
:
"memory"
);
/* Order update */
castout_ste
->
dw1
.
dw1
.
vsid
=
vsid
;
old_esid
=
castout_ste
->
dw0
.
dw0
.
esid
;
castout_ste
->
dw0
.
dw0
.
esid
=
esid
;
castout_ste
->
dw0
.
dw0
.
kp
=
1
;
asm
volatile
(
"eieio"
:
:
:
"memory"
);
/* Order update */
asm
volatile
(
"eieio"
:
:
:
"memory"
);
/* Order update */
castout_ste
->
dw0
.
dw0
.
v
=
1
;
asm
volatile
(
"slbie %0"
:
:
"r"
(
old_esid
<<
SID_SHIFT
));
/* Ensure completion of slbie */
asm
volatile
(
"sync"
:
:
:
"memory"
);
asm
volatile
(
"sync"
:
:
:
"memory"
);
return
(
global_entry
|
(
castout_entry
&
0x7
));
}
static
inline
void
__ste_allocate
(
unsigned
long
esid
,
unsigned
long
vsid
,
mm_context_t
context
)
{
unsigned
char
stab_entry
;
unsigned
long
*
offset
;
int
region_id
=
REGION_ID
(
esid
<<
SID_SHIFT
);
stab_entry
=
make_ste
(
get_paca
()
->
xStab_data
.
virt
,
esid
,
vsid
);
if
(
region_id
!=
USER_REGION_ID
)
return
;
offset
=
&
__get_cpu_var
(
stab_cache_ptr
);
if
(
*
offset
<
NR_STAB_CACHE_ENTRIES
)
{
__get_cpu_var
(
stab_cache
[
*
offset
])
=
stab_entry
;
}
(
*
offset
)
++
;
}
/*
* Allocate a segment table entry for the given ea.
*/
int
ste_allocate
(
unsigned
long
ea
)
{
unsigned
long
vsid
,
esid
;
mm_context_t
context
;
/* Check for invalid effective addresses. */
if
(
!
IS_VALID_EA
(
ea
))
return
1
;
/* Kernel or user address? */
if
(
REGION_ID
(
ea
)
>=
KERNEL_REGION_ID
)
{
vsid
=
get_kernel_vsid
(
ea
);
context
=
REGION_ID
(
ea
);
}
else
{
if
(
!
current
->
mm
)
return
1
;
context
=
current
->
mm
->
context
;
vsid
=
get_vsid
(
context
,
ea
);
}
esid
=
GET_ESID
(
ea
);
__ste_allocate
(
esid
,
vsid
,
context
);
/* Order update */
asm
volatile
(
"sync"
:::
"memory"
);
return
0
;
}
/*
* preload some userspace segments into the segment table.
*/
static
void
preload_stab
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
)
{
unsigned
long
pc
=
KSTK_EIP
(
tsk
);
unsigned
long
stack
=
KSTK_ESP
(
tsk
);
unsigned
long
unmapped_base
;
unsigned
long
pc_esid
=
GET_ESID
(
pc
);
unsigned
long
stack_esid
=
GET_ESID
(
stack
);
unsigned
long
unmapped_base_esid
;
unsigned
long
vsid
;
if
(
test_tsk_thread_flag
(
tsk
,
TIF_32BIT
))
unmapped_base
=
TASK_UNMAPPED_BASE_USER32
;
else
unmapped_base
=
TASK_UNMAPPED_BASE_USER64
;
unmapped_base_esid
=
GET_ESID
(
unmapped_base
);
if
(
!
IS_VALID_EA
(
pc
)
||
(
REGION_ID
(
pc
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
pc
);
__ste_allocate
(
pc_esid
,
vsid
,
mm
->
context
);
if
(
pc_esid
==
stack_esid
)
return
;
if
(
!
IS_VALID_EA
(
stack
)
||
(
REGION_ID
(
stack
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
stack
);
__ste_allocate
(
stack_esid
,
vsid
,
mm
->
context
);
if
(
pc_esid
==
unmapped_base_esid
||
stack_esid
==
unmapped_base_esid
)
return
;
if
(
!
IS_VALID_EA
(
unmapped_base
)
||
(
REGION_ID
(
unmapped_base
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
unmapped_base
);
__ste_allocate
(
unmapped_base_esid
,
vsid
,
mm
->
context
);
/* Order update */
asm
volatile
(
"sync"
:
:
:
"memory"
);
}
/* Flush all user entries from the segment table of the current processor. */
void
flush_stab
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
)
{
STE
*
stab
=
(
STE
*
)
get_paca
()
->
xStab_data
.
virt
;
STE
*
ste
;
unsigned
long
*
offset
=
&
__get_cpu_var
(
stab_cache_ptr
);
/* Force previous translations to complete. DRENG */
asm
volatile
(
"isync"
:
:
:
"memory"
);
if
(
*
offset
<=
NR_STAB_CACHE_ENTRIES
)
{
int
i
;
for
(
i
=
0
;
i
<
*
offset
;
i
++
)
{
ste
=
stab
+
__get_cpu_var
(
stab_cache
[
i
]);
ste
->
dw0
.
dw0
.
v
=
0
;
}
asm
volatile
(
"sync; slbia; sync"
:::
"memory"
);
}
else
{
unsigned
long
entry
;
/* Invalidate all entries. */
ste
=
stab
;
/* Never flush the first entry. */
ste
+=
1
;
for
(
entry
=
1
;
entry
<
(
PAGE_SIZE
/
sizeof
(
STE
));
entry
++
,
ste
++
)
{
unsigned
long
ea
;
ea
=
ste
->
dw0
.
dw0
.
esid
<<
SID_SHIFT
;
if
(
ea
<
KERNELBASE
)
{
ste
->
dw0
.
dw0
.
v
=
0
;
}
}
asm
volatile
(
"sync; slbia; sync"
:::
"memory"
);
}
*
offset
=
0
;
preload_stab
(
tsk
,
mm
);
}
/*
* SLB stuff
*/
/*
* Create a segment buffer entry for the given esid/vsid pair.
*
...
...
@@ -160,22 +307,11 @@ void make_slbe(unsigned long esid, unsigned long vsid, int large,
}
vsid_data
;
/*
* Find an empty entry, if one exists. Must start at 0 because
* we use this code to load SLB entry 0 at boot.
*/
for
(
entry
=
0
;
entry
<
naca
->
slb_size
;
entry
++
)
{
asm
volatile
(
"slbmfee %0,%1"
:
"=r"
(
esid_data
)
:
"r"
(
entry
));
if
(
!
esid_data
.
data
.
v
)
goto
write_entry
;
}
/*
* Could not find empty entry, pick one with a round robin selection.
* We take the next entry, round robin. Previously we tried
* to find a free slot first but that took too long. Unfortunately
* we dont have any LRU information to help us choose a slot.
*/
PMC_SW_PROCESSOR
(
stab_capacity_castouts
);
/*
* Never cast out the segment for our kernel stack. Since we
* dont invalidate the ERAT we could have a valid translation
...
...
@@ -190,13 +326,13 @@ void make_slbe(unsigned long esid, unsigned long vsid, int large,
if
(
castout_entry
>=
naca
->
slb_size
)
castout_entry
=
1
;
asm
volatile
(
"slbmfee %0,%1"
:
"=r"
(
esid_data
)
:
"r"
(
entry
));
}
while
(
esid_data
.
data
.
esid
==
GET_ESID
((
unsigned
long
)
_get_SP
()));
}
while
(
esid_data
.
data
.
v
&&
esid_data
.
data
.
esid
==
GET_ESID
((
unsigned
long
)
_get_SP
()));
get_paca
()
->
xStab_data
.
next_round_robin
=
castout_entry
;
/* slbie not needed as the previous mapping is still valid. */
write_entry:
/*
* Write the new SLB entry.
*/
...
...
@@ -220,211 +356,129 @@ void make_slbe(unsigned long esid, unsigned long vsid, int large,
asm
volatile
(
"slbmte %0,%1"
:
:
"r"
(
vsid_data
),
"r"
(
esid_data
));
}
static
inline
void
__s
te
_allocate
(
unsigned
long
esid
,
unsigned
long
vsid
,
int
kernel_segment
,
mm_context_t
context
)
static
inline
void
__s
lb
_allocate
(
unsigned
long
esid
,
unsigned
long
vsid
,
mm_context_t
context
)
{
if
(
cur_cpu_spec
->
cpu_features
&
CPU_FTR_SLB
)
{
int
large
=
0
;
int
large
=
0
;
int
region_id
=
REGION_ID
(
esid
<<
SID_SHIFT
);
unsigned
long
*
offset
;
#ifndef CONFIG_PPC_ISERIES
if
(
REGION_ID
(
esid
<<
SID_SHIFT
)
==
KERNEL_REGION_ID
)
if
(
cur_cpu_spec
->
cpu_features
&
CPU_FTR_16M_PAGE
)
{
if
(
region_id
==
KERNEL_REGION_ID
)
large
=
1
;
else
if
(
REGION_ID
(
esid
<<
SID_SHIFT
)
==
USER_REGION_ID
)
else
if
(
region_id
==
USER_REGION_ID
)
large
=
in_hugepage_area
(
context
,
esid
<<
SID_SHIFT
);
#endif
make_slbe
(
esid
,
vsid
,
large
,
kernel_segment
);
}
else
{
unsigned
char
top_entry
,
stab_entry
,
*
segments
;
stab_entry
=
make_ste
(
get_paca
()
->
xStab_data
.
virt
,
esid
,
vsid
);
PMC_SW_PROCESSOR_A
(
stab_entry_use
,
stab_entry
&
0xf
);
segments
=
get_paca
()
->
xSegments
;
top_entry
=
get_paca
()
->
stab_cache_pointer
;
if
(
!
kernel_segment
&&
top_entry
<
STAB_CACHE_SIZE
)
{
segments
[
top_entry
]
=
stab_entry
;
if
(
top_entry
==
STAB_CACHE_SIZE
)
top_entry
=
0xff
;
top_entry
++
;
get_paca
()
->
stab_cache_pointer
=
top_entry
;
}
}
make_slbe
(
esid
,
vsid
,
large
,
region_id
!=
USER_REGION_ID
);
if
(
region_id
!=
USER_REGION_ID
)
return
;
offset
=
&
__get_cpu_var
(
stab_cache_ptr
);
if
(
*
offset
<
NR_STAB_CACHE_ENTRIES
)
{
__get_cpu_var
(
stab_cache
[
*
offset
])
=
esid
;
}
(
*
offset
)
++
;
}
/*
* Allocate a segment table entry for the given ea.
*/
int
s
te
_allocate
(
unsigned
long
ea
)
int
s
lb
_allocate
(
unsigned
long
ea
)
{
unsigned
long
vsid
,
esid
;
int
kernel_segment
=
0
;
mm_context_t
context
;
PMC_SW_PROCESSOR
(
stab_faults
);
/* Check for invalid effective addresses. */
if
(
!
IS_VALID_EA
(
ea
))
if
(
unlikely
(
!
IS_VALID_EA
(
ea
)
))
return
1
;
/* Kernel or user address? */
if
(
REGION_ID
(
ea
)
>=
KERNEL_REGION_ID
)
{
kernel_segment
=
1
;
vsid
=
get_kernel_vsid
(
ea
);
context
=
REGION_ID
(
ea
);
vsid
=
get_kernel_vsid
(
ea
);
}
else
{
if
(
!
current
->
mm
)
if
(
unlikely
(
!
current
->
mm
)
)
return
1
;
context
=
current
->
mm
->
context
;
vsid
=
get_vsid
(
context
,
ea
);
}
esid
=
GET_ESID
(
ea
);
__ste_allocate
(
esid
,
vsid
,
kernel_segment
,
context
);
if
(
!
(
cur_cpu_spec
->
cpu_features
&
CPU_FTR_SLB
))
{
/* Order update */
asm
volatile
(
"sync"
:::
"memory"
);
}
__slb_allocate
(
esid
,
vsid
,
context
);
return
0
;
}
unsigned
long
ppc64_preload_all_segments
;
unsigned
long
ppc64_stab_preload
=
1
;
#define STAB_PRESSURE 0
#define USE_SLBIE_ON_STAB 0
/*
* preload all 16 segments for a 32 bit process and the PC and SP segments
* for a 64 bit process.
* preload some userspace segments into the SLB.
*/
static
void
preload_s
ta
b
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
)
static
void
preload_s
l
b
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
)
{
if
(
ppc64_preload_all_segments
&&
test_tsk_thread_flag
(
tsk
,
TIF_32BIT
))
{
unsigned
long
esid
,
vsid
;
for
(
esid
=
0
;
esid
<
16
;
esid
++
)
{
unsigned
long
ea
=
esid
<<
SID_SHIFT
;
vsid
=
get_vsid
(
mm
->
context
,
ea
);
__ste_allocate
(
esid
,
vsid
,
0
,
mm
->
context
);
}
}
else
{
unsigned
long
pc
=
KSTK_EIP
(
tsk
);
unsigned
long
stack
=
KSTK_ESP
(
tsk
);
unsigned
long
pc_segment
=
pc
&
~
SID_MASK
;
unsigned
long
stack_segment
=
stack
&
~
SID_MASK
;
unsigned
long
vsid
;
if
(
pc
)
{
if
(
!
IS_VALID_EA
(
pc
)
||
(
REGION_ID
(
pc
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
pc
);
__ste_allocate
(
GET_ESID
(
pc
),
vsid
,
0
,
mm
->
context
);
}
if
(
stack
&&
(
pc_segment
!=
stack_segment
))
{
if
(
!
IS_VALID_EA
(
stack
)
||
(
REGION_ID
(
stack
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
stack
);
__ste_allocate
(
GET_ESID
(
stack
),
vsid
,
0
,
mm
->
context
);
}
}
if
(
!
(
cur_cpu_spec
->
cpu_features
&
CPU_FTR_SLB
))
{
/* Order update */
asm
volatile
(
"sync"
:
:
:
"memory"
);
}
unsigned
long
pc
=
KSTK_EIP
(
tsk
);
unsigned
long
stack
=
KSTK_ESP
(
tsk
);
unsigned
long
unmapped_base
;
unsigned
long
pc_esid
=
GET_ESID
(
pc
);
unsigned
long
stack_esid
=
GET_ESID
(
stack
);
unsigned
long
unmapped_base_esid
;
unsigned
long
vsid
;
if
(
test_tsk_thread_flag
(
tsk
,
TIF_32BIT
))
unmapped_base
=
TASK_UNMAPPED_BASE_USER32
;
else
unmapped_base
=
TASK_UNMAPPED_BASE_USER64
;
unmapped_base_esid
=
GET_ESID
(
unmapped_base
);
if
(
!
IS_VALID_EA
(
pc
)
||
(
REGION_ID
(
pc
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
pc
);
__slb_allocate
(
pc_esid
,
vsid
,
mm
->
context
);
if
(
pc_esid
==
stack_esid
)
return
;
if
(
!
IS_VALID_EA
(
stack
)
||
(
REGION_ID
(
stack
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
stack
);
__slb_allocate
(
stack_esid
,
vsid
,
mm
->
context
);
if
(
pc_esid
==
unmapped_base_esid
||
stack_esid
==
unmapped_base_esid
)
return
;
if
(
!
IS_VALID_EA
(
unmapped_base
)
||
(
REGION_ID
(
unmapped_base
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
unmapped_base
);
__slb_allocate
(
unmapped_base_esid
,
vsid
,
mm
->
context
);
}
/* Flush all user entries from the segment table of the current processor. */
void
flush_s
ta
b
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
)
void
flush_s
l
b
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
)
{
if
(
cur_cpu_spec
->
cpu_features
&
CPU_FTR_SLB
)
{
/*
* XXX disable 32bit slb invalidate optimisation until we fix
* the issue where a 32bit app execed out of a 64bit app can
* cause segments above 4GB not to be flushed - Anton
*/
if
(
0
&&
!
STAB_PRESSURE
&&
test_thread_flag
(
TIF_32BIT
))
{
union
{
unsigned
long
word0
;
slb_dword0
data
;
}
esid_data
;
unsigned
long
esid
;
asm
volatile
(
"isync"
:
:
:
"memory"
);
for
(
esid
=
0
;
esid
<
16
;
esid
++
)
{
esid_data
.
word0
=
0
;
esid_data
.
data
.
esid
=
esid
;
asm
volatile
(
"slbie %0"
:
:
"r"
(
esid_data
));
}
asm
volatile
(
"isync"
:
:
:
"memory"
);
}
else
{
asm
volatile
(
"isync; slbia; isync"
:::
"memory"
);
}
unsigned
long
*
offset
=
&
__get_cpu_var
(
stab_cache_ptr
);
PMC_SW_PROCESSOR
(
stab_invalidations
);
}
else
{
STE
*
stab
=
(
STE
*
)
get_paca
()
->
xStab_data
.
virt
;
STE
*
ste
;
unsigned
long
flags
;
if
(
*
offset
<=
NR_STAB_CACHE_ENTRIES
)
{
int
i
;
union
{
unsigned
long
word0
;
slb_dword0
data
;
}
esid_data
;
/* Force previous translations to complete. DRENG */
asm
volatile
(
"isync"
:
:
:
"memory"
);
local_irq_save
(
flags
);
if
(
get_paca
()
->
stab_cache_pointer
!=
0xff
&&
!
STAB_PRESSURE
)
{
int
i
;
unsigned
char
*
segments
=
get_paca
()
->
xSegments
;
for
(
i
=
0
;
i
<
get_paca
()
->
stab_cache_pointer
;
i
++
)
{
ste
=
stab
+
segments
[
i
];
ste
->
dw0
.
dw0
.
v
=
0
;
PMC_SW_PROCESSOR
(
stab_invalidations
);
}
#if USE_SLBIE_ON_STAB
asm
volatile
(
"sync"
:::
"memory"
);
for
(
i
=
0
;
i
<
get_paca
()
->
stab_cache_pointer
;
i
++
)
{
ste
=
stab
+
segments
[
i
];
asm
volatile
(
"slbie %0"
:
:
"r"
(
ste
->
dw0
.
dw0
.
esid
<<
SID_SHIFT
));
}
asm
volatile
(
"sync"
:::
"memory"
);
#else
asm
volatile
(
"sync; slbia; sync"
:::
"memory"
);
#endif
}
else
{
unsigned
long
entry
;
/* Invalidate all entries. */
ste
=
stab
;
/* Never flush the first entry. */
ste
+=
1
;
for
(
entry
=
1
;
entry
<
(
PAGE_SIZE
/
sizeof
(
STE
));
entry
++
,
ste
++
)
{
unsigned
long
ea
;
ea
=
ste
->
dw0
.
dw0
.
esid
<<
SID_SHIFT
;
if
(
STAB_PRESSURE
||
ea
<
KERNELBASE
)
{
ste
->
dw0
.
dw0
.
v
=
0
;
PMC_SW_PROCESSOR
(
stab_invalidations
);
}
}
asm
volatile
(
"sync; slbia; sync"
:::
"memory"
);
for
(
i
=
0
;
i
<
*
offset
;
i
++
)
{
esid_data
.
word0
=
0
;
esid_data
.
data
.
esid
=
__get_cpu_var
(
stab_cache
[
i
]);
asm
volatile
(
"slbie %0"
:
:
"r"
(
esid_data
));
}
get_paca
()
->
stab_cache_pointer
=
0
;
local_irq_restore
(
flags
);
asm
volatile
(
"isync"
:
:
:
"memory"
);
}
else
{
asm
volatile
(
"isync; slbia; isync"
:
:
:
"memory"
);
}
if
(
ppc64_stab_preload
)
preload_stab
(
tsk
,
mm
);
*
offset
=
0
;
preload_slb
(
tsk
,
mm
);
}
arch/ppc64/kernel/sys_ppc32.c
View file @
27e0f0fe
...
...
@@ -14,6 +14,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include <linux/config.h>
#include <asm/ptrace.h>
#include <linux/kernel.h>
#include <linux/sched.h>
...
...
@@ -2845,6 +2846,7 @@ long ppc32_timer_create(clockid_t clock,
return
-
EFAULT
;
savefs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_timer_create
(
clock
,
&
event
,
&
t
);
set_fs
(
savefs
);
...
...
arch/ppc64/kernel/viopath.c
View file @
27e0f0fe
...
...
@@ -28,7 +28,6 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <linux/config.h>
#include <asm/uaccess.h>
#include <linux/module.h>
#include <linux/kernel.h>
...
...
arch/ppc64/mm/hash_low.S
View file @
27e0f0fe
...
...
@@ -10,7 +10,6 @@
*
described
in
the
kernel
's COPYING file.
*/
#include <linux/config.h>
#include <asm/processor.h>
#include <asm/pgtable.h>
#include <asm/mmu.h>
...
...
arch/ppc64/mm/hugetlbpage.c
View file @
27e0f0fe
...
...
@@ -7,7 +7,6 @@
* Copyright (C) 2002, Rohit Seth <rohit.seth@intel.com>
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/mm.h>
...
...
@@ -655,10 +654,9 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
unsigned
long
hpteflags
,
prpn
,
flags
;
long
slot
;
ea
&=
~
(
HPAGE_SIZE
-
1
);
/* We have to find the first hugepte in the batch, since
* that's the one that will store the HPTE flags */
ea
&=
HPAGE_MASK
;
ptep
=
hugepte_offset
(
mm
,
ea
);
/* Search the Linux page table for a match with va */
...
...
@@ -886,10 +884,11 @@ static int __init hugetlb_init(void)
spin_unlock
(
&
htlbpage_lock
);
}
htlbpage_max
=
htlbpage_free
=
htlbpage_total
=
i
;
printk
(
"Total HugeTLB memory allocated, %d
\n
"
,
htlbpage_free
);
printk
(
KERN_INFO
"Total HugeTLB memory allocated, %d
\n
"
,
htlbpage_free
);
}
else
{
htlbpage_max
=
0
;
printk
(
"CPU does not support HugeTLB
\n
"
);
printk
(
KERN_INFO
"CPU does not support HugeTLB
\n
"
);
}
return
0
;
...
...
arch/ppc64/xmon/start.c
View file @
27e0f0fe
...
...
@@ -6,8 +6,10 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/config.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/sysrq.h>
#include <asm/machdep.h>
#include <asm/io.h>
...
...
@@ -28,11 +30,14 @@ static inline unsigned int readtb(void)
return
ret
;
}
#ifdef CONFIG_MAGIC_SYSRQ
static
void
sysrq_handle_xmon
(
int
key
,
struct
pt_regs
*
pt_regs
,
struct
tty_struct
*
tty
)
{
xmon
(
pt_regs
);
}
static
struct
sysrq_key_op
sysrq_xmon_op
=
{
.
handler
=
sysrq_handle_xmon
,
...
...
@@ -40,11 +45,15 @@ static struct sysrq_key_op sysrq_xmon_op =
.
action_msg
=
"Entering xmon
\n
"
,
};
#endif
/* CONFIG_MAGIC_SYSRQ */
void
xmon_map_scc
(
void
)
{
#ifdef CONFIG_MAGIC_SYSRQ
/* This maybe isn't the best place to register sysrq 'x' */
__sysrq_put_key_op
(
'x'
,
&
sysrq_xmon_op
);
#endif
/* CONFIG_MAGIC_SYSRQ */
}
int
...
...
arch/s390/Makefile
View file @
27e0f0fe
...
...
@@ -70,3 +70,8 @@ include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
$(
call
filechk,gen-asm-offsets
)
CLEAN_FILES
+=
include/asm-
$(ARCH)
/offsets.h
# Don't use tabs in echo arguments
define
archhelp
echo
'* image - Kernel image for IPL ($(boot)/image)'
endef
arch/s390/defconfig
View file @
27e0f0fe
...
...
@@ -147,6 +147,7 @@ CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID5=m
# CONFIG_MD_RAID6 is not set
CONFIG_MD_MULTIPATH=m
# CONFIG_BLK_DEV_DM is not set
...
...
arch/s390/kernel/compat_linux.c
View file @
27e0f0fe
...
...
@@ -1912,7 +1912,8 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
security_bprm_free
(
&
bprm
);
out_mm:
mmdrop
(
bprm
.
mm
);
if
(
bprm
.
mm
)
mmdrop
(
bprm
.
mm
);
out_file:
if
(
bprm
.
file
)
{
...
...
arch/s390/kernel/s390_ksyms.c
View file @
27e0f0fe
...
...
@@ -9,6 +9,7 @@
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/interrupt.h>
#include <linux/ioctl32.h>
#include <asm/checksum.h>
#include <asm/cpcmd.h>
#include <asm/delay.h>
...
...
@@ -74,4 +75,5 @@ EXPORT_SYMBOL(console_device);
EXPORT_SYMBOL_NOVERS
(
do_call_softirq
);
EXPORT_SYMBOL
(
sys_wait4
);
EXPORT_SYMBOL
(
cpcmd
);
EXPORT_SYMBOL
(
sys_ioctl
);
arch/s390/mm/init.c
View file @
27e0f0fe
...
...
@@ -79,8 +79,6 @@ extern unsigned long __init_end;
* paging_init() sets up the page tables
*/
unsigned
long
last_valid_pfn
;
#ifndef CONFIG_ARCH_S390X
void
__init
paging_init
(
void
)
{
...
...
drivers/md/raid6x86.h
View file @
27e0f0fe
...
...
@@ -32,18 +32,20 @@ typedef struct {
/* N.B.: For SSE we only save %xmm0-%xmm7 even for x86-64, since
the code doesn't know about the additional x86-64 registers */
typedef
struct
{
unsigned
int
sarea
[
8
*
4
];
unsigned
int
cr0
;
unsigned
int
sarea
[
8
*
4
+
2
];
unsigned
long
cr0
;
}
raid6_sse_save_t
__attribute__
((
aligned
(
16
)));
/* This is for x86-64-specific code which uses all 16 XMM registers */
typedef
struct
{
unsigned
int
sarea
[
16
*
4
];
unsigned
int
sarea
[
16
*
4
+
2
];
unsigned
long
cr0
;
}
raid6_sse16_save_t
__attribute__
((
aligned
(
16
)));
/* On x86-64 the stack is 16-byte aligned */
#define SAREA(x) (x->sarea)
/* On x86-64 the stack *SHOULD* be 16-byte aligned, but currently this
is buggy in the kernel and it's only 8-byte aligned in places, so
we need to do this anyway. Sigh. */
#define SAREA(x) ((unsigned int *)((((unsigned long)&(x)->sarea)+15) & ~15))
#else
/* __i386__ */
...
...
@@ -60,6 +62,7 @@ typedef struct {
unsigned
long
cr0
;
}
raid6_sse_save_t
;
/* Find the 16-byte aligned save area */
#define SAREA(x) ((unsigned int *)((((unsigned long)&(x)->sarea)+15) & ~15))
#endif
...
...
drivers/s390/char/sclp.c
View file @
27e0f0fe
...
...
@@ -315,8 +315,9 @@ sclp_interrupt_handler(struct pt_regs *regs, __u16 code)
/* Head queue a read sccb if an event buffer is pending */
if
(
evbuf_pending
)
__sclp_unconditional_read
();
/* Now clear the running bit */
clear_bit
(
SCLP_RUNNING
,
&
sclp_status
);
/* Now clear the running bit if SCLP indicated a finished SCCB */
if
(
finished_sccb
!=
0U
)
clear_bit
(
SCLP_RUNNING
,
&
sclp_status
);
spin_unlock
(
&
sclp_lock
);
/* and start next request on the queue */
sclp_start_request
();
...
...
drivers/s390/char/sclp_con.c
View file @
27e0f0fe
...
...
@@ -149,7 +149,8 @@ sclp_console_write(struct console *console, const char *message,
count
-=
written
;
}
while
(
count
>
0
);
/* Setup timer to output current console buffer after 1/10 second */
if
(
sclp_conbuf
!=
NULL
&&
!
timer_pending
(
&
sclp_con_timer
))
{
if
(
sclp_conbuf
!=
NULL
&&
sclp_chars_in_buffer
(
sclp_conbuf
)
!=
0
&&
!
timer_pending
(
&
sclp_con_timer
))
{
init_timer
(
&
sclp_con_timer
);
sclp_con_timer
.
function
=
sclp_console_timeout
;
sclp_con_timer
.
data
=
0UL
;
...
...
drivers/s390/char/sclp_rw.c
View file @
27e0f0fe
...
...
@@ -274,7 +274,7 @@ sclp_write(struct sclp_buffer *buffer, const unsigned char *msg, int count)
if
(
buffer
->
current_line
!=
NULL
)
sclp_finalize_mto
(
buffer
);
/* skip the rest of the message including the 0 byte */
i_msg
=
count
;
i_msg
=
count
-
1
;
break
;
default:
/* no escape character */
/* do not output unprintable characters */
...
...
drivers/s390/char/sclp_tty.c
View file @
27e0f0fe
...
...
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/uaccess.h>
#include "ctrlchar.h"
...
...
@@ -337,8 +338,11 @@ sclp_tty_write_string(const unsigned char *str, int count)
if
(
sclp_ttybuf
==
NULL
)
{
while
(
list_empty
(
&
sclp_tty_pages
))
{
spin_unlock_irqrestore
(
&
sclp_tty_lock
,
flags
);
wait_event
(
sclp_tty_waitq
,
!
list_empty
(
&
sclp_tty_pages
));
if
(
in_interrupt
())
sclp_sync_wait
();
else
wait_event
(
sclp_tty_waitq
,
!
list_empty
(
&
sclp_tty_pages
));
spin_lock_irqsave
(
&
sclp_tty_lock
,
flags
);
}
page
=
sclp_tty_pages
.
next
;
...
...
@@ -366,7 +370,9 @@ sclp_tty_write_string(const unsigned char *str, int count)
}
while
(
count
>
0
);
/* Setup timer to output current console buffer after 1/10 second */
if
(
sclp_ioctls
.
final_nl
)
{
if
(
sclp_ttybuf
!=
NULL
&&
!
timer_pending
(
&
sclp_tty_timer
))
{
if
(
sclp_ttybuf
!=
NULL
&&
sclp_chars_in_buffer
(
sclp_ttybuf
)
!=
0
&&
!
timer_pending
(
&
sclp_tty_timer
))
{
init_timer
(
&
sclp_tty_timer
);
sclp_tty_timer
.
function
=
sclp_tty_timeout
;
sclp_tty_timer
.
data
=
0UL
;
...
...
@@ -374,8 +380,14 @@ sclp_tty_write_string(const unsigned char *str, int count)
add_timer
(
&
sclp_tty_timer
);
}
}
else
{
__sclp_ttybuf_emit
(
sclp_ttybuf
);
sclp_ttybuf
=
NULL
;
if
(
sclp_ttybuf
!=
NULL
&&
sclp_chars_in_buffer
(
sclp_ttybuf
)
!=
0
)
{
buf
=
sclp_ttybuf
;
sclp_ttybuf
=
NULL
;
spin_unlock_irqrestore
(
&
sclp_tty_lock
,
flags
);
__sclp_ttybuf_emit
(
buf
);
spin_lock_irqsave
(
&
sclp_tty_lock
,
flags
);
}
}
spin_unlock_irqrestore
(
&
sclp_tty_lock
,
flags
);
}
...
...
@@ -471,7 +483,7 @@ sclp_tty_chars_in_buffer(struct tty_struct *tty)
count
=
sclp_chars_in_buffer
(
sclp_ttybuf
);
list_for_each
(
l
,
&
sclp_tty_outqueue
)
{
t
=
list_entry
(
l
,
struct
sclp_buffer
,
list
);
count
+=
sclp_chars_in_buffer
(
sclp_ttybuf
);
count
+=
sclp_chars_in_buffer
(
t
);
}
spin_unlock_irqrestore
(
&
sclp_tty_lock
,
flags
);
return
count
;
...
...
drivers/s390/cio/device.c
View file @
27e0f0fe
...
...
@@ -908,3 +908,4 @@ EXPORT_SYMBOL(ccw_driver_register);
EXPORT_SYMBOL
(
ccw_driver_unregister
);
EXPORT_SYMBOL
(
get_ccwdev_by_busid
);
EXPORT_SYMBOL
(
ccw_bus_type
);
EXPORT_SYMBOL
(
ccw_device_work
);
drivers/s390/net/ctctty.c
View file @
27e0f0fe
/*
* $Id: ctctty.c,v 1.1
4 2003/10/06 11:33:33
mschwide Exp $
* $Id: ctctty.c,v 1.1
5 2004/01/26 10:21:01
mschwide Exp $
*
* CTC / ESCON network driver, tty interface.
*
...
...
@@ -759,9 +759,7 @@ ctc_tty_ioctl(struct tty_struct *tty, struct file *file,
info
->
line
);
#endif
error
=
put_user
(
C_CLOCAL
(
tty
)
?
1
:
0
,
(
ulong
*
)
arg
);
if
(
error
)
return
error
;
return
0
;
return
error
;
case
TIOCSSOFTCAR
:
#ifdef CTC_DEBUG_MODEM_IOCTL
printk
(
KERN_DEBUG
"%s%d ioctl TIOCSSOFTCAR
\n
"
,
CTC_TTY_NAME
,
...
...
drivers/usb/host/ehci-hub.c
View file @
27e0f0fe
...
...
@@ -113,7 +113,7 @@ ehci_hub_descriptor (
u16
temp
;
desc
->
bDescriptorType
=
0x29
;
desc
->
bPwrOn2PwrGood
=
0
;
/* FIXME: f(system power) */
desc
->
bPwrOn2PwrGood
=
1
0
;
/* FIXME: f(system power) */
desc
->
bHubContrCurrent
=
0
;
desc
->
bNbrPorts
=
ports
;
...
...
include/asm-ppc/todc.h
View file @
27e0f0fe
...
...
@@ -290,8 +290,8 @@ typedef struct {
#define TODC_TYPE_MC146818_SECONDS 0x00
#define TODC_TYPE_MC146818_CNTL_B 0x0a
#define TODC_TYPE_MC146818_CNTL_A 0x0b
/* control_a R/W regs */
#define TODC_TYPE_MC146818_WATCHDOG 0
x0c
#define TODC_TYPE_MC146818_INTERRUPTS 0x0
d
#define TODC_TYPE_MC146818_WATCHDOG 0
#define TODC_TYPE_MC146818_INTERRUPTS 0x0
c
#define TODC_TYPE_MC146818_ALARM_DATE 0xff
#define TODC_TYPE_MC146818_ALARM_HOUR 0x05
#define TODC_TYPE_MC146818_ALARM_MINUTES 0x03
...
...
include/asm-ppc64/bugs.h
View file @
27e0f0fe
...
...
@@ -3,6 +3,10 @@
* bugs.
*
*/
#ifndef _ASM_PPC64_BUGS_H
#define _ASM_PPC64_BUGS_H
static
void
check_bugs
(
void
)
{
}
#endif
/* _ASM_PPC64_BUGS_H */
include/asm-ppc64/cputable.h
View file @
27e0f0fe
...
...
@@ -15,6 +15,8 @@
#ifndef __ASM_PPC_CPUTABLE_H
#define __ASM_PPC_CPUTABLE_H
#include <linux/config.h>
/* Exposed to userland CPU features - Must match ppc32 definitions */
#define PPC_FEATURE_32 0x80000000
#define PPC_FEATURE_64 0x40000000
...
...
@@ -133,10 +135,17 @@ extern firmware_feature_t firmware_features_table[];
#define COMMON_USER_PPC64 (PPC_FEATURE_32 | PPC_FEATURE_64 | \
PPC_FEATURE_HAS_FPU | PPC_FEATURE_HAS_MMU)
#define CPU_FTR_PPCAS_ARCH_V2
(CPU_FTR_SLB | CPU_FTR_16M_PAGE
| \
#define CPU_FTR_PPCAS_ARCH_V2
_BASE (CPU_FTR_SLB
| \
CPU_FTR_TLBIEL | CPU_FTR_NOEXECUTE | \
CPU_FTR_NODSISRALIGN)
/* iSeries doesn't support large pages */
#ifdef CONFIG_PPC_ISERIES
#define CPU_FTR_PPCAS_ARCH_V2 (CPU_FTR_PPCAS_ARCH_V2_BASE)
#else
#define CPU_FTR_PPCAS_ARCH_V2 (CPU_FTR_PPCAS_ARCH_V2_BASE | CPU_FTR_16M_PAGE)
#endif
#define COMMON_PPC64_FW (0)
#endif
...
...
include/asm-ppc64/hvcall.h
View file @
27e0f0fe
#ifndef _PPC64_HVCALL_H
#define _PPC64_HVCALL_H
#define H_Success 0
#define H_Busy 1
/* Hardware busy -- retry later */
#define H_Constrained 4
/* Resource request constrained to max allowed */
#define H_Hardware -1
/* Hardware error */
#define H_Function -2
/* Function not supported */
#define H_Privilege -3
/* Caller not privileged */
...
...
@@ -138,3 +141,4 @@ long plpar_hcall_4out(unsigned long opcode,
unsigned
long
*
out3
,
unsigned
long
*
out4
);
#endif
/* _PPC64_HVCALL_H */
include/asm-ppc64/mmu.h
View file @
27e0f0fe
...
...
@@ -13,6 +13,7 @@
#ifndef _PPC64_MMU_H_
#define _PPC64_MMU_H_
#include <linux/config.h>
#include <asm/page.h>
#ifndef __ASSEMBLY__
...
...
@@ -26,14 +27,6 @@ typedef unsigned long mm_context_t;
#define CONTEXT_LOW_HPAGES 0
#endif
/*
* Define the size of the cache used for segment table entries. The first
* entry is used as a cache pointer, therefore the actual number of entries
* stored is one less than defined here. Do not change this value without
* considering the impact it will have on the layout of the paca in paca.h.
*/
#define STAB_CACHE_SIZE 16
/*
* Hardware Segment Lookaside Buffer Entry
* This structure has been padded out to two 64b doublewords (actual SLBE's are
...
...
include/asm-ppc64/mmu_context.h
View file @
27e0f0fe
#ifndef __PPC64_MMU_CONTEXT_H
#define __PPC64_MMU_CONTEXT_H
#include <linux/config.h>
#include <linux/spinlock.h>
#include <linux/kernel.h>
#include <linux/mm.h>
...
...
@@ -138,6 +139,7 @@ destroy_context(struct mm_struct *mm)
}
extern
void
flush_stab
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
);
extern
void
flush_slb
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
);
/*
* switch_mm is the entry point called from the architecture independent
...
...
@@ -153,7 +155,15 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
END_FTR_SECTION_IFSET
(
CPU_FTR_ALTIVEC
)
:
:
);
#endif
/* CONFIG_ALTIVEC */
flush_stab
(
tsk
,
next
);
/* No need to flush userspace segments if the mm doesnt change */
if
(
prev
==
next
)
return
;
if
(
cur_cpu_spec
->
cpu_features
&
CPU_FTR_SLB
)
flush_slb
(
tsk
,
next
);
else
flush_stab
(
tsk
,
next
);
cpu_set
(
smp_processor_id
(),
next
->
cpu_vm_mask
);
}
...
...
include/asm-ppc64/paca.h
View file @
27e0f0fe
...
...
@@ -63,20 +63,15 @@ struct paca_struct {
u16
xPacaIndex
;
/* Logical processor number 0x18 */
u16
xHwProcNum
;
/* Physical processor number 0x1A */
u32
default_decr
;
/* Default decrementer value 0x1c */
u64
unused1
;
u64
xKsave
;
/* Saved Kernel stack addr or zero 0x28 */
u64
pvr
;
/* Processor version register 0x30 */
u8
*
exception_sp
;
/* 0x38 */
struct
ItLpQueue
*
lpQueuePtr
;
/* LpQueue handled by this processor 0x40 */
u64
xTOC
;
/* Kernel TOC address 0x48 */
STAB
xStab_data
;
/* Segment table information 0x50,0x58,0x60 */
u8
xSegments
[
STAB_CACHE_SIZE
];
/* Cache of used stab entries 0x68,0x70 */
u8
xProcEnabled
;
/* 1=soft enabled 0x78 */
u8
unused2
;
u8
prof_enabled
;
/* 1=iSeries profiling enabled 0x7A */
u8
stab_cache_pointer
;
u8
resv1
[
4
];
/* 0x7B-0x7F */
u64
xKsave
;
/* Saved Kernel stack addr or zero 0x20 */
u64
pvr
;
/* Processor version register 0x28 */
struct
ItLpQueue
*
lpQueuePtr
;
/* LpQueue handled by this processor 0x30 */
u64
xTOC
;
/* Kernel TOC address 0x38 */
STAB
xStab_data
;
/* Segment table information 0x40,0x48,0x50 */
u8
*
exception_sp
;
/* 0x58 */
u8
xProcEnabled
;
/* 0x59 */
u8
prof_enabled
;
/* 1=iSeries profiling enabled 0x60 */
u8
resv1
[
30
];
/* 0x61-0x7F */
/*=====================================================================================
* CACHE_LINE_2 0x0080 - 0x00FF
...
...
include/asm-ppc64/percpu.h
View file @
27e0f0fe
#ifndef __ARCH_
I386
_PERCPU__
#define __ARCH_
I386
_PERCPU__
#ifndef __ARCH_
PPC64
_PERCPU__
#define __ARCH_
PPC64
_PERCPU__
#include <asm-generic/percpu.h>
#endif
/* __ARCH_
I386
_PERCPU__ */
#endif
/* __ARCH_
PPC64
_PERCPU__ */
include/asm-ppc64/pgtable.h
View file @
27e0f0fe
...
...
@@ -7,6 +7,7 @@
*/
#ifndef __ASSEMBLY__
#include <linux/config.h>
#include <linux/stddef.h>
#include <asm/processor.h>
/* For TASK_SIZE */
#include <asm/mmu.h>
...
...
include/asm-ppc64/ppc_asm.h
View file @
27e0f0fe
...
...
@@ -11,6 +11,8 @@
* 2 of the License, or (at your option) any later version.
*/
#ifndef _PPC64_PPC_ASM_H
#define _PPC64_PPC_ASM_H
/*
* Macros for storing registers into and loading registers from
* exception frames.
...
...
@@ -238,3 +240,5 @@
#define vr29 29
#define vr30 30
#define vr31 31
#endif
/* _PPC64_PPC_ASM_H */
include/asm-ppc64/processor.h
View file @
27e0f0fe
...
...
@@ -12,6 +12,7 @@
#include <linux/stringify.h>
#ifndef __ASSEMBLY__
#include <linux/config.h>
#include <asm/atomic.h>
#include <asm/ppcdebug.h>
#include <asm/a.out.h>
...
...
include/asm-ppc64/ptrace-common.h
View file @
27e0f0fe
...
...
@@ -9,6 +9,8 @@
* this archive for more details.
*/
#ifndef _PPC64_PTRACE_COMMON_H
#define _PPC64_PTRACE_COMMON_H
/*
* Set of msr bits that gdb can change on behalf of a process.
*/
...
...
@@ -64,3 +66,5 @@ static inline void clear_single_step(struct task_struct *task)
if
(
regs
!=
NULL
)
regs
->
msr
&=
~
MSR_SE
;
}
#endif
/* _PPC64_PTRACE_COMMON_H */
include/asm-ppc64/serial.h
View file @
27e0f0fe
/*
* include/asm-ppc/serial.h
* include/asm-ppc
64
/serial.h
*/
#ifndef _PPC64_SERIAL_H
#define _PPC64_SERIAL_H
#include <linux/config.h>
...
...
@@ -124,3 +126,5 @@
EXTRA_SERIAL_PORT_DEFNS \
HUB6_SERIAL_PORT_DFNS \
MCA_SERIAL_PORT_DFNS
#endif
/* _PPC64_SERIAL_H */
include/asm-s390/atomic.h
View file @
27e0f0fe
#ifndef __ARCH_S390_ATOMIC__
#define __ARCH_S390_ATOMIC__
#ifdef __KERNEL__
/*
* include/asm-s390/atomic.h
*
...
...
@@ -27,6 +26,8 @@ typedef struct {
}
__attribute__
((
aligned
(
4
)))
atomic_t
;
#define ATOMIC_INIT(i) { (i) }
#ifdef __KERNEL__
#define __CS_LOOP(ptr, op_val, op_string) ({ \
typeof(ptr->counter) old_val, new_val; \
__asm__ __volatile__(" l %0,0(%3)\n" \
...
...
@@ -35,8 +36,10 @@ typedef struct {
" cs %0,%1,0(%3)\n" \
" jl 0b" \
: "=&d" (old_val), "=&d" (new_val), \
"+m" (((atomic_t *)(ptr))->counter) \
: "a" (ptr), "d" (op_val) : "cc" ); \
"=m" (((atomic_t *)(ptr))->counter) \
: "a" (ptr), "d" (op_val), \
"m" (((atomic_t *)(ptr))->counter) \
: "cc", "memory" ); \
new_val; \
})
#define atomic_read(v) ((v)->counter)
...
...
@@ -106,8 +109,10 @@ typedef struct {
" csg %0,%1,0(%3)\n" \
" jl 0b" \
: "=&d" (old_val), "=&d" (new_val), \
"+m" (((atomic_t *)(ptr))->counter) \
: "a" (ptr), "d" (op_val) : "cc" ); \
"=m" (((atomic_t *)(ptr))->counter) \
: "a" (ptr), "d" (op_val), \
"m" (((atomic_t *)(ptr))->counter) \
: "cc", "memory" ); \
new_val; \
})
#define atomic64_read(v) ((v)->counter)
...
...
@@ -182,9 +187,9 @@ atomic_compare_and_swap(int expected_oldval,int new_val,atomic_t *v)
" ipm %0
\n
"
" srl %0,28
\n
"
"0:"
:
"=&d"
(
retval
),
"
+
m"
(
v
->
counter
)
:
"a"
(
v
),
"d"
(
expected_oldval
)
,
"d"
(
new_val
)
:
"cc
"
);
:
"=&d"
(
retval
),
"
=
m"
(
v
->
counter
)
:
"a"
(
v
),
"d"
(
expected_oldval
)
,
"d"
(
new_val
)
,
"m"
(
v
->
counter
)
:
"cc"
,
"memory
"
);
return
retval
;
}
...
...
include/asm-s390/bitops.h
View file @
27e0f0fe
...
...
@@ -13,6 +13,7 @@
*
*/
#include <linux/config.h>
#include <linux/compiler.h>
/*
* 32 bit bitops format:
...
...
@@ -109,6 +110,8 @@ extern const char _sb_findmap[];
#endif
/* __s390x__ */
#define __BITOPS_BARRIER() __asm__ __volatile__ ( "" : : : "memory" )
#ifdef CONFIG_SMP
/*
* SMP safe set_bit routine based on compare and swap (CS)
...
...
@@ -189,6 +192,7 @@ test_and_set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
mask
=
1UL
<<
(
nr
&
(
__BITOPS_WORDSIZE
-
1
));
/* Do the atomic update. */
__BITOPS_LOOP
(
old
,
new
,
addr
,
mask
,
__BITOPS_OR
);
__BITOPS_BARRIER
();
return
(
old
&
mask
)
!=
0
;
}
...
...
@@ -211,6 +215,7 @@ test_and_clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
mask
=
~
(
1UL
<<
(
nr
&
(
__BITOPS_WORDSIZE
-
1
)));
/* Do the atomic update. */
__BITOPS_LOOP
(
old
,
new
,
addr
,
mask
,
__BITOPS_AND
);
__BITOPS_BARRIER
();
return
(
old
^
new
)
!=
0
;
}
...
...
@@ -233,6 +238,7 @@ test_and_change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
mask
=
1UL
<<
(
nr
&
(
__BITOPS_WORDSIZE
-
1
));
/* Do the atomic update. */
__BITOPS_LOOP
(
old
,
new
,
addr
,
mask
,
__BITOPS_XOR
);
__BITOPS_BARRIER
();
return
(
old
&
mask
)
!=
0
;
}
#endif
/* CONFIG_SMP */
...
...
@@ -435,7 +441,7 @@ test_and_set_bit_simple(unsigned long nr, volatile unsigned long *ptr)
asm
volatile
(
"oc 0(1,%1),0(%2)"
:
"=m"
(
*
(
char
*
)
addr
)
:
"a"
(
addr
),
"a"
(
_oi_bitmap
+
(
nr
&
7
)),
"m"
(
*
(
char
*
)
addr
)
:
"cc"
);
"m"
(
*
(
char
*
)
addr
)
:
"cc"
,
"memory"
);
return
(
ch
>>
(
nr
&
7
))
&
1
;
}
#define __test_and_set_bit(X,Y) test_and_set_bit_simple(X,Y)
...
...
@@ -454,7 +460,7 @@ test_and_clear_bit_simple(unsigned long nr, volatile unsigned long *ptr)
asm
volatile
(
"nc 0(1,%1),0(%2)"
:
"=m"
(
*
(
char
*
)
addr
)
:
"a"
(
addr
),
"a"
(
_ni_bitmap
+
(
nr
&
7
)),
"m"
(
*
(
char
*
)
addr
)
:
"cc"
);
"m"
(
*
(
char
*
)
addr
)
:
"cc"
,
"memory"
);
return
(
ch
>>
(
nr
&
7
))
&
1
;
}
#define __test_and_clear_bit(X,Y) test_and_clear_bit_simple(X,Y)
...
...
@@ -473,7 +479,7 @@ test_and_change_bit_simple(unsigned long nr, volatile unsigned long *ptr)
asm
volatile
(
"xc 0(1,%1),0(%2)"
:
"=m"
(
*
(
char
*
)
addr
)
:
"a"
(
addr
),
"a"
(
_oi_bitmap
+
(
nr
&
7
)),
"m"
(
*
(
char
*
)
addr
)
:
"cc"
);
"m"
(
*
(
char
*
)
addr
)
:
"cc"
,
"memory"
);
return
(
ch
>>
(
nr
&
7
))
&
1
;
}
#define __test_and_change_bit(X,Y) test_and_change_bit_simple(X,Y)
...
...
@@ -681,59 +687,6 @@ find_next_bit (unsigned long * addr, int size, int offset)
return
(
offset
+
res
);
}
/*
* ffz = Find First Zero in word. Undefined if no zero exists,
* so code should check against ~0UL first..
*/
static
inline
unsigned
long
ffz
(
unsigned
long
word
)
{
unsigned
long
reg
;
int
result
;
__asm__
(
" slr %0,%0
\n
"
" lhi %2,0xff
\n
"
" tml %1,0xffff
\n
"
" jno 0f
\n
"
" ahi %0,16
\n
"
" srl %1,16
\n
"
"0: tml %1,0x00ff
\n
"
" jno 1f
\n
"
" ahi %0,8
\n
"
" srl %1,8
\n
"
"1: nr %1,%2
\n
"
" ic %1,0(%1,%3)
\n
"
" alr %0,%1"
:
"=&d"
(
result
),
"+a"
(
word
),
"=&d"
(
reg
)
:
"a"
(
&
_zb_findmap
)
:
"cc"
);
return
result
;
}
/*
* __ffs = find first bit in word. Undefined if no bit exists,
* so code should check against 0UL first..
*/
static
inline
unsigned
long
__ffs
(
unsigned
long
word
)
{
unsigned
long
reg
,
result
;
__asm__
(
" slr %0,%0
\n
"
" lhi %2,0xff
\n
"
" tml %1,0xffff
\n
"
" jnz 0f
\n
"
" ahi %0,16
\n
"
" srl %1,16
\n
"
"0: tml %1,0x00ff
\n
"
" jnz 1f
\n
"
" ahi %0,8
\n
"
" srl %1,8
\n
"
"1: nr %1,%2
\n
"
" ic %1,0(%1,%3)
\n
"
" alr %0,%1"
:
"=&d"
(
result
),
"+a"
(
word
),
"=&d"
(
reg
)
:
"a"
(
&
_sb_findmap
)
:
"cc"
);
return
result
;
}
#else
/* __s390x__ */
/*
...
...
@@ -910,35 +863,31 @@ find_next_bit (unsigned long * addr, unsigned long size, unsigned long offset)
return
(
offset
+
res
);
}
#endif
/* __s390x__ */
/*
* ffz = Find First Zero in word. Undefined if no zero exists,
* so code should check against ~0UL first..
*/
static
inline
unsigned
long
ffz
(
unsigned
long
word
)
{
unsigned
long
reg
,
result
;
__asm__
(
" lhi %2,-1
\n
"
" slgr %0,%0
\n
"
" clr %1,%2
\n
"
" jne 0f
\n
"
" aghi %0,32
\n
"
" srlg %1,%1,32
\n
"
"0: lghi %2,0xff
\n
"
" tmll %1,0xffff
\n
"
" jno 1f
\n
"
" aghi %0,16
\n
"
" srlg %1,%1,16
\n
"
"1: tmll %1,0x00ff
\n
"
" jno 2f
\n
"
" aghi %0,8
\n
"
" srlg %1,%1,8
\n
"
"2: ngr %1,%2
\n
"
" ic %1,0(%1,%3)
\n
"
" algr %0,%1"
:
"=&d"
(
result
),
"+a"
(
word
),
"=&d"
(
reg
)
:
"a"
(
&
_zb_findmap
)
:
"cc"
);
return
result
;
unsigned
long
bit
=
0
;
#ifdef __s390x__
if
(
likely
((
word
&
0xffffffff
)
==
0xffffffff
))
{
word
>>=
32
;
bit
+=
32
;
}
#endif
if
(
likely
((
word
&
0xffff
)
==
0xffff
))
{
word
>>=
16
;
bit
+=
16
;
}
if
(
likely
((
word
&
0xff
)
==
0xff
))
{
word
>>=
8
;
bit
+=
8
;
}
return
bit
+
_zb_findmap
[
word
&
0xff
];
}
/*
...
...
@@ -947,31 +896,24 @@ static inline unsigned long ffz(unsigned long word)
*/
static
inline
unsigned
long
__ffs
(
unsigned
long
word
)
{
unsigned
long
reg
,
result
;
__asm__
(
" slgr %0,%0
\n
"
" ltr %1,%1
\n
"
" jnz 0f
\n
"
" aghi %0,32
\n
"
" srlg %1,%1,32
\n
"
"0: lghi %2,0xff
\n
"
" tmll %1,0xffff
\n
"
" jnz 1f
\n
"
" aghi %0,16
\n
"
" srlg %1,%1,16
\n
"
"1: tmll %1,0x00ff
\n
"
" jnz 2f
\n
"
" aghi %0,8
\n
"
" srlg %1,%1,8
\n
"
"2: ngr %1,%2
\n
"
" ic %1,0(%1,%3)
\n
"
" algr %0,%1"
:
"=&d"
(
result
),
"+a"
(
word
),
"=&d"
(
reg
)
:
"a"
(
&
_sb_findmap
)
:
"cc"
);
return
result
;
}
unsigned
long
bit
=
0
;
#endif
/* __s390x__ */
#ifdef __s390x__
if
(
likely
((
word
&
0xffffffff
)
==
0
))
{
word
>>=
32
;
bit
+=
32
;
}
#endif
if
(
likely
((
word
&
0xffff
)
==
0
))
{
word
>>=
16
;
bit
+=
16
;
}
if
(
likely
((
word
&
0xff
)
==
0
))
{
word
>>=
8
;
bit
+=
8
;
}
return
bit
+
_sb_findmap
[
word
&
0xff
];
}
/*
* Every architecture must define this function. It's the fastest
...
...
@@ -989,68 +931,12 @@ static inline int sched_find_first_bit(unsigned long *b)
* the libc and compiler builtin ffs routines, therefore
* differs in spirit from the above ffz (man ffs).
*/
extern
inline
int
ffs
(
int
x
)
{
int
r
=
1
;
if
(
x
==
0
)
return
0
;
__asm__
(
" tml %1,0xffff
\n
"
" jnz 0f
\n
"
" srl %1,16
\n
"
" ahi %0,16
\n
"
"0: tml %1,0x00ff
\n
"
" jnz 1f
\n
"
" srl %1,8
\n
"
" ahi %0,8
\n
"
"1: tml %1,0x000f
\n
"
" jnz 2f
\n
"
" srl %1,4
\n
"
" ahi %0,4
\n
"
"2: tml %1,0x0003
\n
"
" jnz 3f
\n
"
" srl %1,2
\n
"
" ahi %0,2
\n
"
"3: tml %1,0x0001
\n
"
" jnz 4f
\n
"
" ahi %0,1
\n
"
"4:"
:
"=&d"
(
r
),
"+d"
(
x
)
:
:
"cc"
);
return
r
;
}
#define ffs(x) generic_ffs(x)
/*
* fls: find last bit set.
*/
static
__inline__
int
fls
(
int
x
)
{
int
r
=
32
;
if
(
x
==
0
)
return
0
;
__asm__
(
" tmh %1,0xffff
\n
"
" jz 0f
\n
"
" sll %1,16
\n
"
" ahi %0,-16
\n
"
"0: tmh %1,0xff00
\n
"
" jz 1f
\n
"
" sll %1,8
\n
"
" ahi %0,-8
\n
"
"1: tmh %1,0xf000
\n
"
" jz 2f
\n
"
" sll %1,4
\n
"
" ahi %0,-4
\n
"
"2: tmh %1,0xc000
\n
"
" jz 3f
\n
"
" sll %1,2
\n
"
" ahi %0,-2
\n
"
"3: tmh %1,0x8000
\n
"
" jz 4f
\n
"
" ahi %0,-1
\n
"
"4:"
:
"+d"
(
r
),
"+d"
(
x
)
:
:
"cc"
);
return
r
;
}
#define fls(x) generic_fls(x)
/*
* hweightN: returns the hamming weight (i.e. the number
...
...
@@ -1273,11 +1159,16 @@ ext2_find_next_zero_bit(void *vaddr, unsigned long size, unsigned long offset)
/* Bitmap functions for the minix filesystem. */
/* FIXME !!! */
#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
#define minix_set_bit(nr,addr) set_bit(nr,addr)
#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
#define minix_test_and_set_bit(nr,addr) \
test_and_set_bit(nr,(unsigned long *)addr)
#define minix_set_bit(nr,addr) \
set_bit(nr,(unsigned long *)addr)
#define minix_test_and_clear_bit(nr,addr) \
test_and_clear_bit(nr,(unsigned long *)addr)
#define minix_test_bit(nr,addr) \
test_bit(nr,(unsigned long *)addr)
#define minix_find_first_zero_bit(addr,size) \
find_first_zero_bit(addr,size)
#endif
/* __KERNEL__ */
...
...
include/asm-s390/byteorder.h
View file @
27e0f0fe
...
...
@@ -50,7 +50,7 @@ static __inline__ __u32 ___arch__swab32p(__u32 *x)
" icm %0,4,2(%1)
\n
"
" icm %0,2,1(%1)
\n
"
" ic %0,0(%1)"
:
"=&d"
(
result
)
:
"a"
(
x
)
:
"cc"
);
:
"=&d"
(
result
)
:
"a"
(
x
)
,
"m"
(
*
x
)
:
"cc"
);
#else
/* __s390x__ */
" lrv %0,%1"
:
"=d"
(
result
)
:
"m"
(
*
x
)
);
...
...
@@ -67,7 +67,7 @@ static __inline__ __u32 ___arch__swab32(__u32 x)
__asm__
__volatile__
(
" lrvr %0,%1"
:
"=d"
(
result
)
:
"d"
(
x
)
);
:
"=d"
(
result
)
:
"d"
(
x
)
,
"m"
(
x
)
);
return
result
;
#endif
/* __s390x__ */
}
...
...
@@ -85,7 +85,7 @@ static __inline__ __u16 ___arch__swab16p(__u16 *x)
#ifndef __s390x__
" icm %0,2,1(%1)
\n
"
" ic %0,0(%1)
\n
"
:
"=&d"
(
result
)
:
"a"
(
x
)
:
"cc"
);
:
"=&d"
(
result
)
:
"a"
(
x
)
,
"m"
(
*
x
)
:
"cc"
);
#else
/* __s390x__ */
" lrvh %0,%1"
:
"=d"
(
result
)
:
"m"
(
*
x
)
);
...
...
include/asm-s390/checksum.h
View file @
27e0f0fe
...
...
@@ -42,7 +42,7 @@ csum_partial(const unsigned char * buff, int len, unsigned int sum)
__asm__
__volatile__
(
"0: cksm %0,%1
\n
"
/* do checksum on longs */
" jo 0b
\n
"
:
"+&d"
(
sum
),
"+&a"
(
rp
)
:
:
"cc"
);
:
"+&d"
(
sum
),
"+&a"
(
rp
)
:
:
"cc"
,
"memory"
);
#else
/* __s390x__ */
__asm__
__volatile__
(
" lgr 2,%1
\n
"
/* address in gpr 2 */
...
...
@@ -51,7 +51,7 @@ csum_partial(const unsigned char * buff, int len, unsigned int sum)
" jo 0b
\n
"
:
"+&d"
(
sum
)
:
"d"
(
buff
),
"d"
(
len
)
:
"cc"
,
"2"
,
"3"
);
:
"cc"
,
"
memory"
,
"
2"
,
"3"
);
#endif
/* __s390x__ */
return
sum
;
}
...
...
include/asm-s390/div64.h
View file @
27e0f0fe
...
...
@@ -36,8 +36,8 @@
" ahi 1,1\n" \
"1: st 1,4+%1\n" \
" lr %0,0" \
: "=d" (__r), "
+
m" (__n) \
: "d" (base)
: "0", "1", "2", "cc" );
\
: "=d" (__r), "
=
m" (__n) \
: "d" (base)
, "m" (__n) : "0", "1", "2", "cc" );
\
(n) = (__n); \
__r; \
})
...
...
include/asm-s390/pgtable.h
View file @
27e0f0fe
...
...
@@ -553,11 +553,15 @@ ptep_clear_flush(struct vm_area_struct *vma,
if
(
!
(
pte_val
(
pte
)
&
_PAGE_INVALID
))
{
/* S390 has 1mb segments, we are emulating 4MB segments */
pte_t
*
pto
=
(
pte_t
*
)
(((
unsigned
long
)
ptep
)
&
0x7ffffc00
);
__asm__
__volatile__
(
"ipte %0,%1"
:
:
"a"
(
pto
),
"a"
(
address
));
__asm__
__volatile__
(
"ipte %2,%3"
:
"=m"
(
*
ptep
)
:
"m"
(
*
ptep
),
"a"
(
pto
),
"a"
(
address
)
);
}
#else
/* __s390x__ */
if
(
!
(
pte_val
(
pte
)
&
_PAGE_INVALID
))
__asm__
__volatile__
(
"ipte %0,%1"
:
:
"a"
(
ptep
),
"a"
(
address
));
__asm__
__volatile__
(
"ipte %2,%3"
:
"=m"
(
*
ptep
)
:
"m"
(
*
ptep
),
"a"
(
ptep
),
"a"
(
address
)
);
#endif
/* __s390x__ */
pte_clear
(
ptep
);
return
pte
;
...
...
include/asm-s390/processor.h
View file @
27e0f0fe
...
...
@@ -66,7 +66,7 @@ extern struct task_struct *last_task_used_math;
#else
/* __s390x__ */
# define TASK_SIZE (0x
2
0000000000UL)
# define TASK_SIZE (0x
4
0000000000UL)
# define TASK31_SIZE (0x80000000UL)
# define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \
(TASK31_SIZE / 2) : (TASK_SIZE / 2))
...
...
@@ -200,14 +200,14 @@ static inline void __load_psw_mask (unsigned long mask)
" st %0,4(%1)
\n
"
" lpsw 0(%1)
\n
"
"1:"
:
"=&d"
(
addr
)
:
"a"
(
&
psw
)
:
"memory"
,
"cc"
);
:
"=&d"
(
addr
)
:
"a"
(
&
psw
)
,
"m"
(
psw
)
:
"memory"
,
"cc"
);
#else
/* __s390x__ */
asm
volatile
(
" larl %0,1f
\n
"
" stg %0,8(%1)
\n
"
" lpswe 0(%1)
\n
"
"1:"
:
"=&d"
(
addr
)
:
"a"
(
&
psw
)
:
"memory"
,
"cc"
);
:
"=&d"
(
addr
)
:
"a"
(
&
psw
)
,
"m"
(
psw
)
:
"memory"
,
"cc"
);
#endif
/* __s390x__ */
}
...
...
@@ -229,14 +229,16 @@ static inline void enabled_wait(void)
" oi 4(%1),0x80
\n
"
" lpsw 0(%1)
\n
"
"1:"
:
"=&a"
(
reg
)
:
"a"
(
&
wait_psw
)
:
"memory"
,
"cc"
);
:
"=&a"
(
reg
)
:
"a"
(
&
wait_psw
),
"m"
(
wait_psw
)
:
"memory"
,
"cc"
);
#else
/* __s390x__ */
asm
volatile
(
" larl %0,0f
\n
"
" stg %0,8(%1)
\n
"
" lpswe 0(%1)
\n
"
"0:"
:
"=&a"
(
reg
)
:
"a"
(
&
wait_psw
)
:
"memory"
,
"cc"
);
:
"=&a"
(
reg
)
:
"a"
(
&
wait_psw
),
"m"
(
wait_psw
)
:
"memory"
,
"cc"
);
#endif
/* __s390x__ */
}
...
...
@@ -247,7 +249,7 @@ static inline void enabled_wait(void)
static
inline
void
disabled_wait
(
unsigned
long
code
)
{
char
psw_buffer
[
2
*
sizeof
(
psw_t
)];
char
ctl_buf
[
4
]
;
unsigned
long
ctl_buf
;
psw_t
*
dw_psw
=
(
psw_t
*
)(((
unsigned
long
)
&
psw_buffer
+
sizeof
(
psw_t
)
-
1
)
&
-
sizeof
(
psw_t
));
...
...
@@ -258,9 +260,9 @@ static inline void disabled_wait(unsigned long code)
* the processor is dead afterwards
*/
#ifndef __s390x__
asm
volatile
(
" stctl 0,0,0(%
1
)
\n
"
" ni 0(%
1
),0xef
\n
"
/* switch off protection */
" lctl 0,0,0(%
1
)
\n
"
asm
volatile
(
" stctl 0,0,0(%
2
)
\n
"
" ni 0(%
2
),0xef
\n
"
/* switch off protection */
" lctl 0,0,0(%
2
)
\n
"
" stpt 0xd8
\n
"
/* store timer */
" stckc 0xe0
\n
"
/* store clock comparator */
" stpx 0x108
\n
"
/* store prefix register */
...
...
@@ -271,13 +273,14 @@ static inline void disabled_wait(unsigned long code)
" std 6,0x178
\n
"
/* store f6 */
" stm 0,15,0x180
\n
"
/* store general registers */
" stctl 0,15,0x1c0
\n
"
/* store control registers */
" oi 0(%1),0x10
\n
"
/* fake protection bit */
" lpsw 0(%0)"
:
:
"a"
(
dw_psw
),
"a"
(
&
ctl_buf
)
:
"cc"
);
" oi 0x1c0,0x10
\n
"
/* fake protection bit */
" lpsw 0(%1)"
:
"=m"
(
ctl_buf
)
:
"a"
(
dw_psw
),
"a"
(
&
ctl_buf
),
"m"
(
dw_psw
)
:
"cc"
);
#else
/* __s390x__ */
asm
volatile
(
" stctg 0,0,0(%
1
)
\n
"
" ni 4(%
1
),0xef
\n
"
/* switch off protection */
" lctlg 0,0,0(%
1
)
\n
"
asm
volatile
(
" stctg 0,0,0(%
2
)
\n
"
" ni 4(%
2
),0xef
\n
"
/* switch off protection */
" lctlg 0,0,0(%
2
)
\n
"
" lghi 1,0x1000
\n
"
" stpt 0x328(1)
\n
"
/* store timer */
" stckc 0x330(1)
\n
"
/* store clock comparator */
...
...
@@ -303,8 +306,10 @@ static inline void disabled_wait(unsigned long code)
" stmg 0,15,0x280(1)
\n
"
/* store general registers */
" stctg 0,15,0x380(1)
\n
"
/* store control registers */
" oi 0x384(1),0x10
\n
"
/* fake protection bit */
" lpswe 0(%0)"
:
:
"a"
(
dw_psw
),
"a"
(
&
ctl_buf
)
:
"cc"
,
"0"
,
"1"
);
" lpswe 0(%1)"
:
"=m"
(
ctl_buf
)
:
"a"
(
dw_psw
),
"a"
(
&
ctl_buf
),
"m"
(
dw_psw
)
:
"cc"
,
"0"
,
"1"
);
#endif
/* __s390x__ */
}
...
...
include/asm-s390/rwsem.h
View file @
27e0f0fe
...
...
@@ -102,21 +102,21 @@ static inline void __down_read(struct rw_semaphore *sem)
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: lr %1,%0
\n
"
" ahi %1,%
3
\n
"
" cs %0,%1,0(%
2
)
\n
"
" ahi %1,%
5
\n
"
" cs %0,%1,0(%
3
)
\n
"
" jl 0b"
#else
/* __s390x__ */
" lg %0,0(%
2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: lgr %1,%0
\n
"
" aghi %1,%
3
\n
"
" csg %0,%1,0(%
2
)
\n
"
" aghi %1,%
5
\n
"
" csg %0,%1,0(%
3
)
\n
"
" jl 0b"
#endif
/* __s390x__ */
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"
i"
(
RWSEM_ACTIVE_READ_BIAS
)
:
"cc"
,
"memory"
);
:
"=&d"
(
old
),
"=&d"
(
new
)
,
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"
m"
(
sem
->
count
),
"i"
(
RWSEM_ACTIVE_READ_BIAS
)
:
"cc"
,
"memory"
);
if
(
old
<
0
)
rwsem_down_read_failed
(
sem
);
}
...
...
@@ -130,25 +130,25 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: ltr %1,%0
\n
"
" jm 1f
\n
"
" ahi %1,%
3
\n
"
" cs %0,%1,0(%
2
)
\n
"
" ahi %1,%
5
\n
"
" cs %0,%1,0(%
3
)
\n
"
" jl 0b
\n
"
"1:"
#else
/* __s390x__ */
" lg %0,0(%
2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: ltgr %1,%0
\n
"
" jm 1f
\n
"
" aghi %1,%
3
\n
"
" csg %0,%1,0(%
2
)
\n
"
" aghi %1,%
5
\n
"
" csg %0,%1,0(%
3
)
\n
"
" jl 0b
\n
"
"1:"
#endif
/* __s390x__ */
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"
i"
(
RWSEM_ACTIVE_READ_BIAS
)
:
"cc"
,
"memory"
);
:
"=&d"
(
old
),
"=&d"
(
new
)
,
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"
m"
(
sem
->
count
),
"i"
(
RWSEM_ACTIVE_READ_BIAS
)
:
"cc"
,
"memory"
);
return
old
>=
0
?
1
:
0
;
}
...
...
@@ -162,20 +162,20 @@ static inline void __down_write(struct rw_semaphore *sem)
tmp
=
RWSEM_ACTIVE_WRITE_BIAS
;
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: lr %1,%0
\n
"
" a %1,%
3
\n
"
" cs %0,%1,0(%
2
)
\n
"
" a %1,%
5
\n
"
" cs %0,%1,0(%
3
)
\n
"
" jl 0b"
#else
/* __s390x__ */
" lg %0,0(%
2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: lgr %1,%0
\n
"
" ag %1,%
3
\n
"
" csg %0,%1,0(%
2
)
\n
"
" ag %1,%
5
\n
"
" csg %0,%1,0(%
3
)
\n
"
" jl 0b"
#endif
/* __s390x__ */
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"m"
(
tmp
)
:
"=&d"
(
old
),
"=&d"
(
new
)
,
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"m"
(
sem
->
count
),
"m"
(
tmp
)
:
"cc"
,
"memory"
);
if
(
old
!=
0
)
rwsem_down_write_failed
(
sem
);
...
...
@@ -190,22 +190,22 @@ static inline int __down_write_trylock(struct rw_semaphore *sem)
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
1
)
\n
"
" l %0,0(%
2
)
\n
"
"0: ltr %0,%0
\n
"
" jnz 1f
\n
"
" cs %0,%
2,0(%1
)
\n
"
" cs %0,%
4,0(%2
)
\n
"
" jl 0b
\n
"
#else
/* __s390x__ */
" lg %0,0(%
1
)
\n
"
" lg %0,0(%
2
)
\n
"
"0: ltgr %0,%0
\n
"
" jnz 1f
\n
"
" csg %0,%
2,0(%1
)
\n
"
" csg %0,%
4,0(%2
)
\n
"
" jl 0b
\n
"
#endif
/* __s390x__ */
"1:"
:
"=&d"
(
old
)
:
"a"
(
&
sem
->
count
),
"
d"
(
RWSEM_ACTIVE_WRITE_BIAS
)
:
"cc"
,
"memory"
);
:
"=&d"
(
old
)
,
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"
m"
(
sem
->
count
),
"d"
(
RWSEM_ACTIVE_WRITE_BIAS
)
:
"cc"
,
"memory"
);
return
(
old
==
RWSEM_UNLOCKED_VALUE
)
?
1
:
0
;
}
...
...
@@ -218,20 +218,21 @@ static inline void __up_read(struct rw_semaphore *sem)
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: lr %1,%0
\n
"
" ahi %1,%
3
\n
"
" cs %0,%1,0(%
2
)
\n
"
" ahi %1,%
5
\n
"
" cs %0,%1,0(%
3
)
\n
"
" jl 0b"
#else
/* __s390x__ */
" lg %0,0(%
2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: lgr %1,%0
\n
"
" aghi %1,%
3
\n
"
" csg %0,%1,0(%
2
)
\n
"
" aghi %1,%
5
\n
"
" csg %0,%1,0(%
3
)
\n
"
" jl 0b"
#endif
/* __s390x__ */
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"i"
(
-
RWSEM_ACTIVE_READ_BIAS
)
:
"=&d"
(
old
),
"=&d"
(
new
),
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"m"
(
sem
->
count
),
"i"
(
-
RWSEM_ACTIVE_READ_BIAS
)
:
"cc"
,
"memory"
);
if
(
new
<
0
)
if
((
new
&
RWSEM_ACTIVE_MASK
)
==
0
)
...
...
@@ -248,20 +249,20 @@ static inline void __up_write(struct rw_semaphore *sem)
tmp
=
-
RWSEM_ACTIVE_WRITE_BIAS
;
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: lr %1,%0
\n
"
" a %1,%
3
\n
"
" cs %0,%1,0(%
2
)
\n
"
" a %1,%
5
\n
"
" cs %0,%1,0(%
3
)
\n
"
" jl 0b"
#else
/* __s390x__ */
" lg %0,0(%
2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: lgr %1,%0
\n
"
" ag %1,%
3
\n
"
" csg %0,%1,0(%
2
)
\n
"
" ag %1,%
5
\n
"
" csg %0,%1,0(%
3
)
\n
"
" jl 0b"
#endif
/* __s390x__ */
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"m"
(
tmp
)
:
"=&d"
(
old
),
"=&d"
(
new
)
,
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"m"
(
sem
->
count
),
"m"
(
tmp
)
:
"cc"
,
"memory"
);
if
(
new
<
0
)
if
((
new
&
RWSEM_ACTIVE_MASK
)
==
0
)
...
...
@@ -278,20 +279,20 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
tmp
=
-
RWSEM_WAITING_BIAS
;
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: lr %1,%0
\n
"
" a %1,%
3
\n
"
" cs %0,%1,0(%
2
)
\n
"
" a %1,%
5
\n
"
" cs %0,%1,0(%
3
)
\n
"
" jl 0b"
#else
/* __s390x__ */
" lg %0,0(%
2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: lgr %1,%0
\n
"
" ag %1,%
3
\n
"
" csg %0,%1,0(%
2
)
\n
"
" ag %1,%
5
\n
"
" csg %0,%1,0(%
3
)
\n
"
" jl 0b"
#endif
/* __s390x__ */
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"m"
(
tmp
)
:
"=&d"
(
old
),
"=&d"
(
new
)
,
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"m"
(
sem
->
count
),
"m"
(
tmp
)
:
"cc"
,
"memory"
);
if
(
new
>
1
)
rwsem_downgrade_wake
(
sem
);
...
...
@@ -306,20 +307,20 @@ static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: lr %1,%0
\n
"
" ar %1,%
3
\n
"
" cs %0,%1,0(%
2
)
\n
"
" ar %1,%
5
\n
"
" cs %0,%1,0(%
3
)
\n
"
" jl 0b"
#else
/* __s390x__ */
" lg %0,0(%
2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: lgr %1,%0
\n
"
" agr %1,%
3
\n
"
" csg %0,%1,0(%
2
)
\n
"
" agr %1,%
5
\n
"
" csg %0,%1,0(%
3
)
\n
"
" jl 0b"
#endif
/* __s390x__ */
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"d"
(
delta
)
:
"=&d"
(
old
),
"=&d"
(
new
)
,
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"
m"
(
sem
->
count
),
"
d"
(
delta
)
:
"cc"
,
"memory"
);
}
...
...
@@ -332,20 +333,20 @@ static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
__asm__
__volatile__
(
#ifndef __s390x__
" l %0,0(%
2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: lr %1,%0
\n
"
" ar %1,%
3
\n
"
" cs %0,%1,0(%
2
)
\n
"
" ar %1,%
5
\n
"
" cs %0,%1,0(%
3
)
\n
"
" jl 0b"
#else
/* __s390x__ */
" lg %0,0(%
2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: lgr %1,%0
\n
"
" agr %1,%
3
\n
"
" csg %0,%1,0(%
2
)
\n
"
" agr %1,%
5
\n
"
" csg %0,%1,0(%
3
)
\n
"
" jl 0b"
#endif
/* __s390x__ */
:
"=&d"
(
old
),
"=&d"
(
new
)
:
"a"
(
&
sem
->
count
),
"d"
(
delta
)
:
"=&d"
(
old
),
"=&d"
(
new
)
,
"=m"
(
sem
->
count
)
:
"a"
(
&
sem
->
count
),
"
m"
(
sem
->
count
),
"
d"
(
delta
)
:
"cc"
,
"memory"
);
return
new
;
}
...
...
include/asm-s390/semaphore.h
View file @
27e0f0fe
...
...
@@ -95,9 +95,9 @@ static inline int down_trylock(struct semaphore * sem)
" cs %0,%1,0(%3)
\n
"
" jl 0b
\n
"
"1:"
:
"=&d"
(
old_val
),
"=&d"
(
new_val
),
"+
m"
(
sem
->
count
.
counter
)
:
"
a"
(
&
sem
->
count
.
counter
)
:
"cc
"
);
:
"=&d"
(
old_val
),
"=&d"
(
new_val
),
"=m"
(
sem
->
count
.
counter
)
:
"a"
(
&
sem
->
count
.
counter
),
"
m"
(
sem
->
count
.
counter
)
:
"
cc"
,
"memory
"
);
return
old_val
<=
0
;
}
...
...
include/asm-s390/spinlock.h
View file @
27e0f0fe
...
...
@@ -57,8 +57,9 @@ extern inline void _raw_spin_lock(spinlock_t *lp)
"1: slr %1,%1
\n
"
" cs %1,%0,0(%3)
\n
"
" jl 0b
\n
"
:
"=&d"
(
reg1
),
"=&d"
(
reg2
),
"+m"
(
lp
->
lock
)
:
"a"
(
&
lp
->
lock
)
:
"cc"
);
:
"=&d"
(
reg1
),
"=&d"
(
reg2
),
"=m"
(
lp
->
lock
)
:
"a"
(
&
lp
->
lock
),
"m"
(
lp
->
lock
)
:
"cc"
,
"memory"
);
#else
/* __s390x__ */
unsigned
long
reg1
,
reg2
;
__asm__
__volatile
(
" bras %1,1f
\n
"
...
...
@@ -66,9 +67,9 @@ extern inline void _raw_spin_lock(spinlock_t *lp)
"1: slr %0,%0
\n
"
" cs %0,%1,0(%3)
\n
"
" jl 0b
\n
"
:
"=&d"
(
reg1
),
"=&d"
(
reg2
),
"
+
m"
(
lp
->
lock
)
:
"a"
(
&
lp
->
lock
),
"i"
(
__DIAG44_OPERAND
)
:
"cc
"
);
:
"=&d"
(
reg1
),
"=&d"
(
reg2
),
"
=
m"
(
lp
->
lock
)
:
"a"
(
&
lp
->
lock
),
"i"
(
__DIAG44_OPERAND
),
"m"
(
lp
->
lock
)
:
"cc"
,
"memory
"
);
#endif
/* __s390x__ */
}
...
...
@@ -82,8 +83,9 @@ extern inline int _raw_spin_trylock(spinlock_t *lp)
__asm__
__volatile
(
" slr %0,%0
\n
"
" basr %1,0
\n
"
"0: cs %0,%1,0(%3)"
:
"=&d"
(
result
),
"=&d"
(
reg
),
"+m"
(
lp
->
lock
)
:
"a"
(
&
lp
->
lock
)
:
"cc"
);
:
"=&d"
(
result
),
"=&d"
(
reg
),
"=m"
(
lp
->
lock
)
:
"a"
(
&
lp
->
lock
),
"m"
(
lp
->
lock
)
:
"cc"
,
"memory"
);
return
!
result
;
}
...
...
@@ -93,7 +95,8 @@ extern inline void _raw_spin_unlock(spinlock_t *lp)
__asm__
__volatile
(
"cs %0,%3,0(%4)"
:
"=d"
(
old
),
"=m"
(
lp
->
lock
)
:
"0"
(
lp
->
lock
),
"d"
(
0
),
"a"
(
lp
)
:
"cc"
);
:
"0"
(
lp
->
lock
),
"d"
(
0
),
"a"
(
lp
)
:
"cc"
,
"memory"
);
}
/*
...
...
@@ -126,8 +129,8 @@ typedef struct {
" la 3,1(2)\n"
/* one more reader */
\
" cs 2,3,0(%1)\n"
/* try to write new value */
\
" jl 0b" \
: "
+m" ((rw)->lock) : "a" (&(rw)->lock)
\
: "2", "3", "cc
" )
: "
=m" ((rw)->lock) : "a" (&(rw)->lock),
\
"m" ((rw)->lock) : "2", "3", "cc", "memory
" )
#else
/* __s390x__ */
#define _raw_read_lock(rw) \
asm volatile(" lg 2,0(%1)\n" \
...
...
@@ -137,9 +140,9 @@ typedef struct {
" la 3,1(2)\n"
/* one more reader */
\
" csg 2,3,0(%1)\n"
/* try to write new value */
\
" jl 0b" \
: "
+
m" ((rw)->lock) \
: "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \
: "2", "3", "cc
" )
: "
=
m" ((rw)->lock) \
: "a" (&(rw)->lock), "i" (__DIAG44_OPERAND)
,
\
"m" ((rw)->lock) : "2", "3", "cc", "memory
" )
#endif
/* __s390x__ */
#ifndef __s390x__
...
...
@@ -151,8 +154,8 @@ typedef struct {
" ahi 3,-1\n"
/* one less reader */
\
" cs 2,3,0(%1)\n" \
" jl 0b" \
: "
+m" ((rw)->lock) : "a" (&(rw)->lock)
\
: "2", "3", "cc
" )
: "
=m" ((rw)->lock) : "a" (&(rw)->lock),
\
"m" ((rw)->lock) : "2", "3", "cc", "memory
" )
#else
/* __s390x__ */
#define _raw_read_unlock(rw) \
asm volatile(" lg 2,0(%1)\n" \
...
...
@@ -162,9 +165,9 @@ typedef struct {
" bctgr 3,0\n"
/* one less reader */
\
" csg 2,3,0(%1)\n" \
" jl 0b" \
: "
+
m" ((rw)->lock) \
: "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \
: "2", "3", "cc
" )
: "
=
m" ((rw)->lock) \
: "a" (&(rw)->lock), "i" (__DIAG44_OPERAND)
,
\
"m" ((rw)->lock) : "2", "3", "cc", "memory
" )
#endif
/* __s390x__ */
#ifndef __s390x__
...
...
@@ -176,8 +179,8 @@ typedef struct {
"1: slr 2,2\n"
/* old lock value must be 0 */
\
" cs 2,3,0(%1)\n" \
" jl 0b" \
: "
+m" ((rw)->lock) : "a" (&(rw)->lock)
\
: "2", "3", "cc
" )
: "
=m" ((rw)->lock) : "a" (&(rw)->lock),
\
"m" ((rw)->lock) : "2", "3", "cc", "memory
" )
#else
/* __s390x__ */
#define _raw_write_lock(rw) \
asm volatile(" llihh 3,0x8000\n"
/* new lock value = 0x80...0 */
\
...
...
@@ -186,9 +189,9 @@ typedef struct {
"1: slgr 2,2\n"
/* old lock value must be 0 */
\
" csg 2,3,0(%1)\n" \
" jl 0b" \
: "
+
m" ((rw)->lock) \
: "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \
: "2", "3", "cc
" )
: "
=
m" ((rw)->lock) \
: "a" (&(rw)->lock), "i" (__DIAG44_OPERAND)
,
\
"m" ((rw)->lock) : "2", "3", "cc", "memory
" )
#endif
/* __s390x__ */
#ifndef __s390x__
...
...
@@ -200,8 +203,8 @@ typedef struct {
" sll 2,31\n"
/* old lock value must be 0x80000000 */
\
" cs 2,3,0(%1)\n" \
" jl 0b" \
: "
+m" ((rw)->lock) : "a" (&(rw)->lock)
\
: "2", "3", "cc
" )
: "
=m" ((rw)->lock) : "a" (&(rw)->lock),
\
"m" ((rw)->lock) : "2", "3", "cc", "memory
" )
#else
/* __s390x__ */
#define _raw_write_unlock(rw) \
asm volatile(" slgr 3,3\n"
/* new lock value = 0 */
\
...
...
@@ -210,9 +213,9 @@ typedef struct {
"1: llihh 2,0x8000\n"
/* old lock value must be 0x8..0 */
\
" csg 2,3,0(%1)\n" \
" jl 0b" \
: "
+
m" ((rw)->lock) \
: "a" (&(rw)->lock), "i" (__DIAG44_OPERAND) \
: "2", "3", "cc
" )
: "
=
m" ((rw)->lock) \
: "a" (&(rw)->lock), "i" (__DIAG44_OPERAND)
,
\
"m" ((rw)->lock) : "2", "3", "cc", "memory
" )
#endif
/* __s390x__ */
extern
inline
int
_raw_write_trylock
(
rwlock_t
*
rw
)
...
...
@@ -230,8 +233,9 @@ extern inline int _raw_write_trylock(rwlock_t *rw)
" llihh %1,0x8000
\n
"
"0: csg %0,%1,0(%3)
\n
"
#endif
/* __s390x__ */
:
"=&d"
(
result
),
"=&d"
(
reg
),
"+m"
(
rw
->
lock
)
:
"a"
(
&
rw
->
lock
)
:
"cc"
);
:
"=&d"
(
result
),
"=&d"
(
reg
),
"=m"
(
rw
->
lock
)
:
"a"
(
&
rw
->
lock
),
"m"
(
rw
->
lock
)
:
"cc"
,
"memory"
);
return
result
==
0
;
}
...
...
include/asm-s390/system.h
View file @
27e0f0fe
...
...
@@ -32,28 +32,28 @@ extern struct task_struct *__switch_to(void *, void *);
static
inline
void
save_fp_regs
(
s390_fp_regs
*
fpregs
)
{
asm
volatile
(
" std 0,8(%
0
)
\n
"
" std 2,24(%
0
)
\n
"
" std 4,40(%
0
)
\n
"
" std 6,56(%
0
)"
:
:
"a"
(
fpregs
)
:
"memory"
);
" std 0,8(%
1
)
\n
"
" std 2,24(%
1
)
\n
"
" std 4,40(%
1
)
\n
"
" std 6,56(%
1
)"
:
"=m"
(
*
fpregs
)
:
"a"
(
fpregs
),
"m"
(
*
fpregs
)
:
"memory"
);
if
(
!
MACHINE_HAS_IEEE
)
return
;
asm
volatile
(
" stfpc 0(%
0
)
\n
"
" std 1,16(%
0
)
\n
"
" std 3,32(%
0
)
\n
"
" std 5,48(%
0
)
\n
"
" std 7,64(%
0
)
\n
"
" std 8,72(%
0
)
\n
"
" std 9,80(%
0
)
\n
"
" std 10,88(%
0
)
\n
"
" std 11,96(%
0
)
\n
"
" std 12,104(%
0
)
\n
"
" std 13,112(%
0
)
\n
"
" std 14,120(%
0
)
\n
"
" std 15,128(%
0
)
\n
"
:
:
"a"
(
fpregs
)
:
"memory"
);
" stfpc 0(%
1
)
\n
"
" std 1,16(%
1
)
\n
"
" std 3,32(%
1
)
\n
"
" std 5,48(%
1
)
\n
"
" std 7,64(%
1
)
\n
"
" std 8,72(%
1
)
\n
"
" std 9,80(%
1
)
\n
"
" std 10,88(%
1
)
\n
"
" std 11,96(%
1
)
\n
"
" std 12,104(%
1
)
\n
"
" std 13,112(%
1
)
\n
"
" std 14,120(%
1
)
\n
"
" std 15,128(%
1
)
\n
"
:
"=m"
(
*
fpregs
)
:
"a"
(
fpregs
),
"m"
(
*
fpregs
)
:
"memory"
);
}
static
inline
void
restore_fp_regs
(
s390_fp_regs
*
fpregs
)
...
...
@@ -63,7 +63,7 @@ static inline void restore_fp_regs(s390_fp_regs *fpregs)
" ld 2,24(%0)
\n
"
" ld 4,40(%0)
\n
"
" ld 6,56(%0)"
:
:
"a"
(
fpregs
));
:
:
"a"
(
fpregs
)
,
"m"
(
*
fpregs
)
);
if
(
!
MACHINE_HAS_IEEE
)
return
;
asm
volatile
(
...
...
@@ -80,7 +80,7 @@ static inline void restore_fp_regs(s390_fp_regs *fpregs)
" ld 13,112(%0)
\n
"
" ld 14,120(%0)
\n
"
" ld 15,128(%0)
\n
"
:
:
"a"
(
fpregs
));
:
:
"a"
(
fpregs
)
,
"m"
(
*
fpregs
)
);
}
#define switch_to(prev,next,last) do { \
...
...
@@ -107,15 +107,15 @@ static inline unsigned long __xchg(unsigned long x, void * ptr, int size)
shift
=
(
3
^
(
addr
&
3
))
<<
3
;
addr
^=
addr
&
3
;
asm
volatile
(
" l %0,0(%
3
)
\n
"
" l %0,0(%
4
)
\n
"
"0: lr 0,%0
\n
"
" nr 0,%
2
\n
"
" or 0,%
1
\n
"
" cs %0,0,0(%
3
)
\n
"
" nr 0,%
3
\n
"
" or 0,%
2
\n
"
" cs %0,0,0(%
4
)
\n
"
" jl 0b
\n
"
:
"=&d"
(
old
)
:
"d"
(
x
<<
shift
),
"d"
(
~
(
255
<<
shift
)),
"a"
(
addr
)
:
"memory"
,
"cc"
,
"0"
);
:
"=&d"
(
old
)
,
"=m"
(
*
(
int
*
)
addr
)
:
"d"
(
x
<<
shift
),
"d"
(
~
(
255
<<
shift
)),
"a"
(
addr
)
,
"m"
(
*
(
int
*
)
addr
)
:
"memory"
,
"cc"
,
"0"
);
x
=
old
>>
shift
;
break
;
case
2
:
...
...
@@ -123,34 +123,36 @@ static inline unsigned long __xchg(unsigned long x, void * ptr, int size)
shift
=
(
2
^
(
addr
&
2
))
<<
3
;
addr
^=
addr
&
2
;
asm
volatile
(
" l %0,0(%
3
)
\n
"
" l %0,0(%
4
)
\n
"
"0: lr 0,%0
\n
"
" nr 0,%
2
\n
"
" or 0,%
1
\n
"
" cs %0,0,0(%
3
)
\n
"
" nr 0,%
3
\n
"
" or 0,%
2
\n
"
" cs %0,0,0(%
4
)
\n
"
" jl 0b
\n
"
:
"=&d"
(
old
)
:
"d"
(
x
<<
shift
),
"d"
(
~
(
65535
<<
shift
)),
"a"
(
addr
)
:
"memory"
,
"cc"
,
"0"
);
:
"=&d"
(
old
)
,
"=m"
(
*
(
int
*
)
addr
)
:
"d"
(
x
<<
shift
),
"d"
(
~
(
65535
<<
shift
)),
"a"
(
addr
)
,
"m"
(
*
(
int
*
)
addr
)
:
"memory"
,
"cc"
,
"0"
);
x
=
old
>>
shift
;
break
;
case
4
:
asm
volatile
(
" l %0,0(%
2
)
\n
"
"0: cs %0,%
1,0(%2
)
\n
"
" l %0,0(%
3
)
\n
"
"0: cs %0,%
2,0(%3
)
\n
"
" jl 0b
\n
"
:
"=&d"
(
old
)
:
"d"
(
x
),
"a"
(
ptr
)
:
"memory"
,
"cc"
,
"0"
);
:
"=&d"
(
old
),
"=m"
(
*
(
int
*
)
ptr
)
:
"d"
(
x
),
"a"
(
ptr
),
"m"
(
*
(
int
*
)
ptr
)
:
"memory"
,
"cc"
);
x
=
old
;
break
;
#ifdef __s390x__
case
8
:
asm
volatile
(
" lg %0,0(%
2
)
\n
"
"0: csg %0,%
1,0(%2
)
\n
"
" lg %0,0(%
3
)
\n
"
"0: csg %0,%
2,0(%3
)
\n
"
" jl 0b
\n
"
:
"=&d"
(
old
)
:
"d"
(
x
),
"a"
(
ptr
)
:
"memory"
,
"cc"
,
"0"
);
:
"=&d"
(
old
),
"=m"
(
*
(
long
*
)
ptr
)
:
"d"
(
x
),
"a"
(
ptr
),
"m"
(
*
(
long
*
)
ptr
)
:
"memory"
,
"cc"
);
x
=
old
;
break
;
#endif
/* __s390x__ */
...
...
@@ -268,7 +270,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
#define local_irq_enable() ({ \
unsigned long __dummy; \
__asm__ __volatile__ ( \
"stosm 0(%1),0x03" : "=m" (__dummy) : "a" (&__dummy) ); \
"stosm 0(%1),0x03" \
: "=m" (__dummy) : "a" (&__dummy) : "memory" ); \
})
#define local_irq_disable() ({ \
...
...
@@ -279,10 +282,10 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
})
#define local_save_flags(x) \
__asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x) )
__asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x)
, "m" (x)
)
#define local_irq_restore(x) \
__asm__ __volatile__("ssm 0(%0)" : : "a" (&x) : "memory")
__asm__ __volatile__("ssm 0(%0)" : : "a" (&x)
, "m" (x)
: "memory")
#define irqs_disabled() \
({ \
...
...
@@ -294,7 +297,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
#ifdef __s390x__
#define __load_psw(psw) \
__asm__ __volatile__("lpswe 0(%0)" : : "a" (&psw) : "cc" );
__asm__ __volatile__("lpswe 0(%0)" : : "a" (&psw)
, "m" (psw)
: "cc" );
#define __ctl_load(array, low, high) ({ \
__asm__ __volatile__ ( \
...
...
include/asm-s390/timex.h
View file @
27e0f0fe
...
...
@@ -25,7 +25,7 @@ static inline cycles_t get_cycles(void)
{
cycles_t
cycles
;
__asm__
(
"stck 0(%
0)"
:
:
"a"
(
&
(
cycles
))
:
"memory"
,
"cc"
);
__asm__
(
"stck 0(%
1)"
:
"=m"
(
cycles
)
:
"a"
(
&
cycles
)
:
"cc"
);
return
cycles
>>
2
;
}
...
...
@@ -33,7 +33,7 @@ static inline unsigned long long get_clock (void)
{
unsigned
long
long
clk
;
__asm__
(
"stck 0(%
0)"
:
:
"a"
(
&
(
clk
))
:
"memory"
,
"cc"
);
__asm__
(
"stck 0(%
1)"
:
"=m"
(
clk
)
:
"a"
(
&
clk
)
:
"cc"
);
return
clk
;
}
...
...
include/asm-s390/tlbflush.h
View file @
27e0f0fe
...
...
@@ -85,7 +85,7 @@ static inline void global_flush_tlb(void)
" slr 2,2
\n
"
" slr 3,3
\n
"
" csp 2,%0"
:
:
"a"
(
addr
)
:
"cc"
,
"2"
,
"3"
);
:
:
"a"
(
addr
)
,
"m"
(
dummy
)
:
"cc"
,
"2"
,
"3"
);
}
}
...
...
include/asm-s390/uaccess.h
View file @
27e0f0fe
...
...
@@ -124,8 +124,8 @@ struct exception_table_entry
"1:\n" \
__uaccess_fixup \
: "=&d" (err) \
: "a" (__to),"a" (__from),"K" (-EFAULT),"0" (0)
\
: "cc" );
\
: "a" (__to),"a" (__from),"K" (-EFAULT),"0" (0)
,
\
"m" (x) : "cc" );
\
})
#else
/* __s390x__ */
...
...
include/linux/proc_fs.h
View file @
27e0f0fe
...
...
@@ -133,8 +133,14 @@ extern void proc_tty_unregister_driver(struct tty_driver *driver);
*/
struct
device_node
;
extern
void
proc_device_tree_init
(
void
);
#ifdef CONFIG_PROC_DEVICETREE
extern
void
proc_device_tree_add_node
(
struct
device_node
*
,
struct
proc_dir_entry
*
);
#else
/* !CONFIG_PROC_DEVICETREE */
static
inline
void
proc_device_tree_add_node
(
struct
device_node
*
np
,
struct
proc_dir_entry
*
pde
)
{
return
;
}
#endif
/* CONFIG_PROC_DEVICETREE */
/*
* proc_rtas.c
*/
...
...
kernel/exit.c
View file @
27e0f0fe
...
...
@@ -403,6 +403,8 @@ void put_files_struct(struct files_struct *files)
}
}
EXPORT_SYMBOL
(
put_files_struct
);
static
inline
void
__exit_files
(
struct
task_struct
*
tsk
)
{
struct
files_struct
*
files
=
tsk
->
files
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment