Commit c51fcfae authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] misc PA updates

 - Remove obsolete documentation
 - Update arch/parisc/lib
 - Remove arch/parisc/tools, we use asm-offsets.c these days
 - Update arch/parisc/Makefile, defconfig & vmlinux.lds.S
parent ff3f38bc
Some notes on IODC, its general brokenness, and how to work around it.
Short Version
IODC is HP's pre-PCI standard for device identification (a la PCI vendor,
device IDs), detection, configuration, initialization and so on.
It also can provide firmware function to do the actual IO, which are slow,
not really defined for runtime usage and generally not desirable. (There
are other firmware standards, such as STI, to do real IO).
Usually, there are two parts to IODC. The actual ROMs, which are laid out,
detected aso in a bus-specific manner (IO_DC_ADDRESS / IO_DC_DATA on
GSC/Runway, PCI spec - compliant ROMs for PCI, God-only-knows how on EISA),
and the slightly cooked data read by PDC_IODC.
The ROM layout is generally icky (only one byte out of every 4-byte-word
might be valid, and many devices don't implement required options), so
using PDC_IODC is highly recommended. (In fact, you should use the device
lists set up by the kernel proper instead of calling PDC_IODC yourself).
Now, let's have a look at what the cooked ROM looks like (see iodc.pdf for
the details, this is the simplified version).
Basically, the first 8 bytes of IODC contain two 32-bit ids called HVERSION
and SVERSION. Those are further split up into bit fields, and
unfortunately just ignoring this split up isn't an option.
SVERSION consists of a 4-bit revision field, a 20-bit model field and a
8-bit opt field. Now, forget the revision and opt fields exist. Basically,
the model field is equivalent to a PCI device id (there is no vendor id.
this is proprietary hardware we're talking about). That is, all your
driver cares for, in 90 % of the cases, is to find all devices that match
the model field.
The rev field is - you guessed it - roughly equivalent to the revision
byte for PCI, with the exception that higher revisions should be strict
supersets of lower revisions.
The last byte of HVERSION, "type", and the last byte of SVERSION, "opt",
belong together; type gives a very rough indication of what the device
is supposed to do, and opt contains some type-specific information. (For
example, the "bus converter" (ie bus bridge) type encodes the kind of
bus behind the bridge in the opt field.
The rest of HVERSION contains, in most cases, a number identifying the
machine the chip was used in, or a revision indicator that just fixed
bugs and didn't add any features (or was done in a shrinked process or
whatever).
So, here's the interface you actually should use to find your devices:
/* Find a device, matching the model field of sversion only (from=NULL
* for the first call */
struct iodc_dev *iodc_find_device(u32 sversion, struct iodc_dev *from);
Here's a function you should use if you have special requirements, such
as finding devices by type rather than by model. Generally, if you're
using this, you should be me).
/* Find a device, masking out bits as specified */
struct iodc_dev *iodc_find_device_mask(u32 hversion, u32 sversion,
u32 hversion_mask, u32 sversion_mask, struct iodc_dev *from);
Philipp Rumpf <prumpf@tux.org>
......@@ -17,6 +17,19 @@
# Mike Shaver, Helge Deller and Martin K. Petersen
#
ifdef CONFIG_PARISC64
CROSS_COMPILE := hppa64-linux-
UTS_MACHINE := parisc64
#CFLAGS += -b hppa64-linux
else
MACHINE := $(subst 64,,$(shell uname -m))
ifneq (${MACHINE},parisc)
# cross compilation
CROSS_COMPILE := hppa-linux-
endif
endif
FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
......@@ -29,29 +42,63 @@ CFLAGS := $(CFLAGS) -D__linux__ $(CFLAGS_PIPE) $(CFLAGS_NSR)
# enable them by default.
CFLAGS += -mno-space-regs -mfast-indirect-calls
# If we become able to compile for specific platforms, this should be
# conditional on that.
CFLAGS += -mschedule=7200
# No fixed-point multiply
CFLAGS += -mdisable-fpregs
HEAD = arch/parisc/kernel/head.o
# Without this, "ld -r" results in .text sections that are too big
# (> 0x40000) for branches to reach stubs.
CFLAGS += -ffunction-sections
# select which processor to optimise for
ifdef CONFIG_PA7100
CFLAGS += -march=1.1 -mschedule=7100
endif
ifdef CONFIG_PA7200
CFLAGS += -march=1.1 -mschedule=7200
endif
ifdef CONFIG_PA7100LC
CFLAGS += -march=1.1 -mschedule=7100LC
endif
ifdef CONFIG_PA8X00
CFLAGS += -march=2.0 -mschedule=8000
endif
HEAD := arch/parisc/kernel/head.o
ifdef CONFIG_PARISC64
HEAD := arch/parisc/kernel/head64.o
endif
SUBDIRS += arch/parisc/tools
core-y += arch/parisc/kernel/pdc_cons.o \
arch/parisc/kernel/process.o \
arch/parisc/mm/ \
arch/parisc/kernel/ \
arch/parisc/hpux/ \
arch/parisc/math-emu/ \
arch/parisc/kernel/init_task.o
libs-y += arch/parisc/lib/lib.a \
libs-y += arch/parisc/lib/ \
`$(CC) -print-libgcc-file-name`
drivers-$(CONFIG_MATH_EMULATION) += arch/parisc/math-emu/
drivers-$(CONFIG_KWDB) += arch/parisc/kdb/
palo: vmlinux
export TOPDIR=`pwd`; export CONFIG_STI_CONSOLE=$(CONFIG_STI_CONSOLE); \
@if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \
echo 'ERROR: Please install palo first (apt-get install palo)';\
echo 'or build it from source and install it somewhere in your $$PATH';\
false; \
fi
@if [ ! -f ./palo.conf ]; then \
cp arch/parisc/defpalo.conf palo.conf; \
echo 'A generic palo config file (./palo.conf) has been created for you.'; \
echo 'You should check it and re-run "make palo".'; \
echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
false; \
fi
palo -f ./palo.conf
oldpalo: vmlinux
export TOPDIR=`pwd`; \
unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
Image: palo
......@@ -68,6 +115,19 @@ compressed: zImage
install:
archmrproper:
archclean:
archmrproper:
prepare: include/asm-$(ARCH)/offsets.h
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER
include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
@echo -n ' Generating $@'
@$(update-if-changed)
#
# Automatically generated by make menuconfig: don't edit
# Automatically generated make config: don't edit
#
CONFIG_PARISC=y
# CONFIG_UID16 is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
CONFIG_GENERIC_ISA_DMA=y
# CONFIG_PM is not set
#
# Code maturity level options
......@@ -10,44 +14,71 @@ CONFIG_PARISC=y
CONFIG_EXPERIMENTAL=y
#
# General options
# General setup
#
CONFIG_NET=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
#
# Processor type and features
#
CONFIG_PA7100=y
# CONFIG_PA7200 is not set
# CONFIG_PA7100LC is not set
# CONFIG_PA8X00 is not set
CONFIG_PA11=y
# CONFIG_SMP is not set
# CONFIG_KWDB is not set
CONFIG_GSC=y
# CONFIG_PREEMPT is not set
CONFIG_CHASSIS_LCD_LED=y
#
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#
CONFIG_IOMMU_CCIO=y
CONFIG_GSC=y
CONFIG_GSC_LASI=y
CONFIG_GSC_WAX=y
CONFIG_EISA=y
CONFIG_ISA=y
CONFIG_PCI=y
CONFIG_GSC_DINO=y
CONFIG_PCI_LBA=y
CONFIG_IOSAPIC=y
CONFIG_IOMMU_SBA=y
CONFIG_SUPERIO=y
CONFIG_PCI_NAMES=y
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
#
# General setup
# Executable file formats
#
CONFIG_NET=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_SOM=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_BINFMT_JAVA is not set
#
# Parallel port support
#
CONFIG_PARPORT=y
# CONFIG_PARPORT_PC is not set
CONFIG_PARPORT_PC=y
CONFIG_PARPORT_PC_CML1=y
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_AMIGA is not set
# CONFIG_PARPORT_MFC3 is not set
# CONFIG_PARPORT_ATARI is not set
CONFIG_PARPORT_GSC=y
# CONFIG_PARPORT_SUNBPP is not set
# CONFIG_PARPORT_OTHER is not set
# CONFIG_PARPORT_1284 is not set
......@@ -59,41 +90,157 @@ CONFIG_PARPORT_GSC=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_CISS_SCSI_TAPE is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
#
# Multi-device support (RAID and LVM)
#
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_LINEAR=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID5=y
# CONFIG_MD_MULTIPATH is not set
# CONFIG_BLK_DEV_LVM is not set
#
# ATA/IDE/MFM/RLL support
#
# CONFIG_IDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
# CONFIG_BLK_DEV_HD is not set
#
# SCSI support
#
CONFIG_SCSI=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS=40
CONFIG_CHR_DEV_ST=y
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=y
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_SR_EXTRA_DEVS=2
CONFIG_CHR_DEV_SG=y
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_REPORT_LUNS is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD 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_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_DMA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 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_LASI700=y
CONFIG_53C700_MEM_MAPPED=y
CONFIG_53C700_LE_ON_BE=y
CONFIG_53C700_USE_CONSISTENT=y
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_ASK_ZALON is not set
# CONFIG_ASK_NCR53C8XX is not set
# CONFIG_ASK_SYM53C8XX is not set
CONFIG_SCSI_ZALON=y
CONFIG_ASK_ZALON=y
CONFIG_SCSI_SYM53C8XX=y
CONFIG_ASK_SYM53C8XX=y
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
CONFIG_SCSI_NCR53C8XX_SYNC=20
# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT 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_SIM710 is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_DEBUG is not set
#
# Networking options
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_NETLINK_DEV=y
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_PNP=y
# CONFIG_IP_PNP_DHCP is not set
CONFIG_IP_PNP_BOOTP=y
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
......@@ -105,37 +252,10 @@ CONFIG_IP_PNP_BOOTP=y
#
# CONFIG_NET_SCHED is not set
#
# SCSI support
#
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS=40
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_SR_EXTRA_DEVS=2
CONFIG_CHR_DEV_SG=y
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
#
# SCSI low-level drivers
#
CONFIG_SCSI_LASI=y
CONFIG_SCSI_ZALON=y
CONFIG_SCSI_SYM53C8XX=y
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
CONFIG_SCSI_NCR53C8XX_SYNC=20
# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
#
# Network device support
#
CONFIG_NETDEVICES=y
CONFIG_LASI_82596=y
#
# ARCnet devices
......@@ -145,12 +265,18 @@ CONFIG_LASI_82596=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ETHERTAP is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_LASI_82596=y
# CONFIG_SUNLANCE is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNBMAC is not set
# CONFIG_SUNQE is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
......@@ -165,33 +291,41 @@ CONFIG_NET_PCI=y
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
# CONFIG_DE4X5 is not set
CONFIG_TULIP=y
# CONFIG_DGRS is not set
# CONFIG_DM9102 is not set
# CONFIG_EEPRO100 is not set
# CONFIG_E100 is not set
# CONFIG_LNE390 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_NE3210 is not set
# CONFIG_ES3210 is not set
# CONFIG_RTL8129 is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_NEW_RX_RESET is not set
# 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
# CONFIG_WINBOND_840 is not set
# CONFIG_VIA_RHINE_MMIO is not set
# CONFIG_NET_POCKET is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_MYRI_SBUS is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
......@@ -216,18 +350,138 @@ CONFIG_TULIP=y
#
# CONFIG_WAN is not set
#
# Tulip family network device support
#
CONFIG_NET_TULIP=y
# CONFIG_DE2104X is not set
CONFIG_TULIP=y
# CONFIG_TULIP_MWI is not set
# CONFIG_TULIP_MMIO is not set
# CONFIG_DE4X5 is not set
# CONFIG_WINBOND_840 is not set
# CONFIG_DM9102 is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# Input device support
#
CONFIG_INPUT=y
#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_VORTEX is not set
# CONFIG_GAMEPORT_FM801 is not set
# CONFIG_GAMEPORT_CS461x is not set
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_I8042_REG_BASE=60
CONFIG_I8042_KBD_IRQ=1
CONFIG_I8042_AUX_IRQ=12
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
#
# HP HIL driver core support
#
CONFIG_HP_SDC=y
# CONFIG_HP_SDC_RTC is not set
CONFIG_HIL_MLC=y
CONFIG_HP_SDC_MLC=y
#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_HIL_KBD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_MOUSE_PS2 is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_INPORT is not set
# CONFIG_MOUSE_LOGIBM is not set
# CONFIG_MOUSE_PC110PAD is not set
# CONFIG_HIL_PTR is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_IFORCE is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDDLER is not set
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_INPUT_JOYDUMP is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_INPUT_MISC is not set
# CONFIG_INPUT_PCSPKR is not set
# CONFIG_INPUT_UINPUT is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_GSC_PS2=y
CONFIG_HIL=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
CONFIG_SERIAL_GSC=y
# CONFIG_SERIAL_EXTENDED is not set
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set
# CONFIG_SERIAL_8250_CONSOLE is not set
# CONFIG_SERIAL_8250_CS is not set
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_MULTIPORT is not set
# CONFIG_SERIAL_8250_RSA is not set
#
# Non-8250 serial port support
#
# CONFIG_PDC_CONSOLE is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=y
......@@ -243,22 +497,16 @@ CONFIG_PRINTER=y
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
#
# Joysticks
#
# CONFIG_JOYSTICK is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
CONFIG_GENRTC=y
# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
CONFIG_GEN_RTC=y
CONFIG_GEN_RTC_X=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
......@@ -269,29 +517,50 @@ CONFIG_GENRTC=y
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_QFMT_V1 is not set
# CONFIG_QFMT_V2 is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
CONFIG_EXT3_FS=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_JFFS2_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not set
# CONFIG_TMPFS is not set
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
# CONFIG_JFS_FS is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_STATISTICS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
......@@ -300,13 +569,12 @@ CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
# CONFIG_DEVPTS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_SYSV_FS_WRITE is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
......@@ -316,13 +584,17 @@ CONFIG_EXT2_FS=y
# Network File Systems
#
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
CONFIG_NFS_V3=y
CONFIG_ROOT_NFS=y
# CONFIG_NFSD is not set
# CONFIG_NFSD_V3 is not set
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_TCP is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
......@@ -331,22 +603,59 @@ CONFIG_LOCKD=y
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_MOUNT_SUBDIR is not set
# CONFIG_NCPFS_NDS_DOMAINS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
# CONFIG_ZISOFS_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_NLS is not set
# CONFIG_SMB_NLS is not set
CONFIG_NLS=y
#
# Sound Drivers
#
# CONFIG_SOUND is not set
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# 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 is not set
# 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
#
# Console drivers
......@@ -355,10 +664,71 @@ CONFIG_MSDOS_PARTITION=y
#
# Frame-buffer support
#
# CONFIG_FB is not set
# CONFIG_STI_CONSOLE is not set
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_CLGEN is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_STI is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 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
# CONFIG_FBCON_ADVANCED is not set
# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
# CONFIG_FBCON_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_STI_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FBCON=y
CONFIG_FBCON_FONT=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_FONT_6x11=y
CONFIG_FONT_SUN12x22=y
#
# Sound Drivers
#
CONFIG_SOUND=y
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
#
# Advanced Linux Sound Architecture
#
# CONFIG_SND is not set
#
# USB support
#
# CONFIG_USB is not set
#
# Kernel hacking
#
CONFIG_MAGIC_SYSRQ=y
#
# Security options
#
CONFIG_SECURITY_CAPABILITIES=y
#
# Library routines
#
# CONFIG_CRC32 is not set
# CONFIG_ZLIB_INFLATE is not set
# CONFIG_ZLIB_DEFLATE is not set
# This a generic Palo configuration file. For more information about how
# it works try 'palo -?'.
#
# Most people using 'make palo' want a bootable file, usable for
# network or tape booting for example.
--init-tape=lifimage
--recoverykernel=vmlinux
########## Pick your ROOT here! ##########
# You need at least one 'root='!
#
# If you want a root ramdisk, use the next 2 lines
# (Edit the ramdisk image name!!!!)
--ramdisk=ram-disk-image-file
--commandline=0/vmlinux HOME=/ root=/dev/ram initrd=0/ramdisk
# If you want NFS root, use the following command line (Edit the HOSTNAME!!!)
#--commandline=0/vmlinux HOME=/ root=/dev/nfs nfsroot=HOSTNAME ip=bootp
# If you have root on a disk partition, use this (Edit the partition name!!!)
#--commandline=0/vmlinux HOME=/ root=/dev/sda1
......@@ -2,10 +2,8 @@
# Makefile for parisc-specific library files..
#
L_TARGET = lib.a
obj-y := lusercopy.o bitops.o checksum.o
EXTRA_AFLAGS := -traditional
L_TARGET = lib.a
obj-y := lusercopy.o bitops.o checksum.o io.o memset.o
include $(TOPDIR)/Rules.make
/* atomic.c: atomic operations which got too long to be inlined all over
* the place.
/*
* bitops.c: atomic operations which got too long to be inlined all over
* the place.
*
* Copyright 1999 Philipp Rumpf (prumpf@tux.org */
* Copyright 1999 Philipp Rumpf (prumpf@tux.org)
* Copyright 2000 Grant Grundler (grundler@cup.hp.com)
*/
#include <linux/config.h>
#include <linux/kernel.h>
......@@ -17,44 +20,67 @@ spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
spinlock_t __atomic_lock = SPIN_LOCK_UNLOCKED;
#ifndef __LP64__
unsigned long __xchg(unsigned long x, unsigned long *ptr, int size)
#ifdef __LP64__
unsigned long __xchg64(unsigned long x, unsigned long *ptr)
{
unsigned long temp, flags;
if (size != sizeof x) {
printk("__xchg called with bad pointer\n");
}
spin_lock_irqsave(&__atomic_lock, flags);
SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
temp = *ptr;
*ptr = x;
spin_unlock_irqrestore(&__atomic_lock, flags);
SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
return temp;
}
#else
unsigned long __xchg(unsigned long x, unsigned long *ptr, int size)
#endif
unsigned long __xchg32(int x, int *ptr)
{
unsigned long temp, flags;
unsigned int *ptr32;
if (size == 8) {
try_long:
spin_lock_irqsave(&__atomic_lock, flags);
temp = *ptr;
*ptr = x;
spin_unlock_irqrestore(&__atomic_lock, flags);
return temp;
}
if (size == 4) {
ptr32 = (unsigned int *)ptr;
spin_lock_irqsave(&__atomic_lock, flags);
temp = (unsigned long)*ptr32;
*ptr32 = (unsigned int)x;
spin_unlock_irqrestore(&__atomic_lock, flags);
return temp;
}
printk("__xchg called with bad pointer\n");
goto try_long;
unsigned long flags;
unsigned long temp;
SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
(long) temp = (long) *ptr; /* XXX - sign extension wanted? */
*ptr = x;
SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
return temp;
}
unsigned long __xchg8(char x, char *ptr)
{
unsigned long flags;
unsigned long temp;
SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
(long) temp = (long) *ptr; /* XXX - sign extension wanted? */
*ptr = x;
SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
return temp;
}
#ifdef __LP64__
unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new)
{
unsigned long flags;
unsigned long prev;
SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
if ((prev = *ptr) == old)
*ptr = new;
SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
return prev;
}
#endif
unsigned long __cmpxchg_u32(volatile unsigned int *ptr, unsigned int old, unsigned int new)
{
unsigned long flags;
unsigned int prev;
SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
if ((prev = *ptr) == old)
*ptr = new;
SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
return (unsigned long)prev;
}
/*
* arch/parisc/lib/io.c
*
* Copyright (c) Matthew Wilcox 2001 for Hewlett-Packard
* Copyright (c) Randolph Chung 2001 <tausq@debian.org>
*
* IO accessing functions which shouldn't be inlined because they're too big
*/
#include <linux/kernel.h>
#include <asm/io.h>
/* Copies a block of memory to a device in an efficient manner.
* Assumes the device can cope with 32-bit transfers. If it can't,
* don't use this function.
*/
void memcpy_toio(unsigned long dest, const void *src, int count)
{
if ((dest & 3) != ((unsigned long)src & 3))
goto bytecopy;
while (dest & 3) {
writeb(*(char *)src, dest++);
((char *)src)++;
count--;
}
while (count > 3) {
__raw_writel(*(u32 *)src, dest);
(unsigned long) src += 4;
dest += 4;
count -= 4;
}
bytecopy:
while (count--) {
writeb(*(char *)src, dest++);
((char *)src)++;
}
}
/*
** Copies a block of memory from a device in an efficient manner.
** Assumes the device can cope with 32-bit transfers. If it can't,
** don't use this function.
**
** CR16 counts on C3000 reading 256 bytes from Symbios 896 RAM:
** 27341/64 = 427 cyc per int
** 61311/128 = 478 cyc per short
** 122637/256 = 479 cyc per byte
** Ergo bus latencies dominant (not transfer size).
** Minimize total number of transfers at cost of CPU cycles.
** TODO: only look at src alignment and adjust the stores to dest.
*/
void memcpy_fromio(void *dest, unsigned long src, int count)
{
/* first compare alignment of src/dst */
if ( (((unsigned long)dest ^ src) & 1) || (count < 2) )
goto bytecopy;
if ( (((unsigned long)dest ^ src) & 2) || (count < 4) )
goto shortcopy;
/* Then check for misaligned start address */
if (src & 1) {
*(u8 *)dest = readb(src);
((u8 *)src)++;
((u8 *)dest)++;
count--;
if (count < 2) goto bytecopy;
}
if (src & 2) {
*(u16 *)dest = __raw_readw(src);
((u16 *)src)++;
((u16 *)dest)++;
count-=2;
}
while (count > 3) {
*(u32 *)dest = __raw_readl(src);
dest += 4;
src += 4;
count -= 4;
}
shortcopy:
while (count > 1) {
*(u16 *)dest = __raw_readw(src);
((u16 *)src)++;
((u16 *)dest)++;
count-=2;
}
bytecopy:
while (count--) {
*(char *)dest = readb(src);
((char *)src)++;
((char *)dest)++;
}
}
/* Sets a block of memory on a device to a given value.
* Assumes the device can cope with 32-bit transfers. If it can't,
* don't use this function.
*/
void memset_io(unsigned long dest, char fill, int count)
{
u32 fill32 = (fill << 24) | (fill << 16) | (fill << 8) | fill;
while (dest & 3) {
writeb(fill, dest++);
count--;
}
while (count > 3) {
__raw_writel(fill32, dest);
dest += 4;
count -= 4;
}
while (count--) {
writeb(fill, dest++);
}
}
/*
* Read COUNT 8-bit bytes from port PORT into memory starting at
* SRC.
*/
void insb (unsigned long port, void *dst, unsigned long count)
{
while (((unsigned long)dst) & 0x3) {
if (!count)
return;
count--;
*(unsigned char *) dst = inb(port);
((unsigned char *) dst)++;
}
while (count >= 4) {
unsigned int w;
count -= 4;
w = inb(port) << 24;
w |= inb(port) << 16;
w |= inb(port) << 8;
w |= inb(port);
*(unsigned int *) dst = w;
((unsigned int *) dst)++;
}
while (count) {
--count;
*(unsigned char *) dst = inb(port);
((unsigned char *) dst)++;
}
}
/*
* Read COUNT 16-bit words from port PORT into memory starting at
* SRC. SRC must be at least short aligned. This is used by the
* IDE driver to read disk sectors. Performance is important, but
* the interfaces seems to be slow: just using the inlined version
* of the inw() breaks things.
*/
void insw (unsigned long port, void *dst, unsigned long count)
{
unsigned int l = 0, l2;
if (!count)
return;
switch (((unsigned long) dst) & 0x3)
{
case 0x00: /* Buffer 32-bit aligned */
while (count>=2) {
count -= 2;
l = cpu_to_le16(inw(port)) << 16;
l |= cpu_to_le16(inw(port));
*(unsigned int *) dst = l;
((unsigned int *) dst)++;
}
if (count) {
*(unsigned short *) dst = cpu_to_le16(inw(port));
}
break;
case 0x02: /* Buffer 16-bit aligned */
*(unsigned short *) dst = cpu_to_le16(inw(port));
((unsigned short *) dst)++;
count--;
while (count>=2) {
count -= 2;
l = cpu_to_le16(inw(port)) << 16;
l |= cpu_to_le16(inw(port));
*(unsigned int *) dst = l;
((unsigned int *) dst)++;
}
if (count) {
*(unsigned short *) dst = cpu_to_le16(inw(port));
}
break;
case 0x01: /* Buffer 8-bit aligned */
case 0x03:
/* I don't bother with 32bit transfers
* in this case, 16bit will have to do -- DE */
--count;
l = cpu_to_le16(inw(port));
*(unsigned char *) dst = l >> 8;
((unsigned char *) dst)++;
while (count--)
{
l2 = cpu_to_le16(inw(port));
*(unsigned short *) dst = (l & 0xff) << 8 | (l2 >> 8);
((unsigned short *) dst)++;
l = l2;
}
*(unsigned char *) dst = l & 0xff;
break;
}
}
/*
* Read COUNT 32-bit words from port PORT into memory starting at
* SRC. Now works with any alignment in SRC. Performance is important,
* but the interfaces seems to be slow: just using the inlined version
* of the inl() breaks things.
*/
void insl (unsigned long port, void *dst, unsigned long count)
{
unsigned int l = 0, l2;
if (!count)
return;
switch (((unsigned long) dst) & 0x3)
{
case 0x00: /* Buffer 32-bit aligned */
while (count--)
{
*(unsigned int *) dst = cpu_to_le32(inl(port));
((unsigned int *) dst)++;
}
break;
case 0x02: /* Buffer 16-bit aligned */
--count;
l = cpu_to_le32(inl(port));
*(unsigned short *) dst = l >> 16;
((unsigned short *) dst)++;
while (count--)
{
l2 = cpu_to_le32(inl(port));
*(unsigned int *) dst = (l & 0xffff) << 16 | (l2 >> 16);
((unsigned int *) dst)++;
l = l2;
}
*(unsigned short *) dst = l & 0xffff;
break;
case 0x01: /* Buffer 8-bit aligned */
--count;
l = cpu_to_le32(inl(port));
*(unsigned char *) dst = l >> 24;
((unsigned char *) dst)++;
*(unsigned short *) dst = (l >> 8) & 0xffff;
((unsigned short *) dst)++;
while (count--)
{
l2 = cpu_to_le32(inl(port));
*(unsigned int *) dst = (l & 0xff) << 24 | (l2 >> 8);
((unsigned int *) dst)++;
l = l2;
}
*(unsigned char *) dst = l & 0xff;
break;
case 0x03: /* Buffer 8-bit aligned */
--count;
l = cpu_to_le32(inl(port));
*(unsigned char *) dst = l >> 24;
((unsigned char *) dst)++;
while (count--)
{
l2 = cpu_to_le32(inl(port));
*(unsigned int *) dst = (l & 0xffffff) << 8 | l2 >> 24;
((unsigned int *) dst)++;
l = l2;
}
*(unsigned short *) dst = (l >> 8) & 0xffff;
((unsigned short *) dst)++;
*(unsigned char *) dst = l & 0xff;
break;
}
}
/*
* Like insb but in the opposite direction.
* Don't worry as much about doing aligned memory transfers:
* doing byte reads the "slow" way isn't nearly as slow as
* doing byte writes the slow way (no r-m-w cycle).
*/
void outsb(unsigned long port, const void * src, unsigned long count)
{
while (count) {
count--;
outb(*(char *)src, port);
((char *) src)++;
}
}
/*
* Like insw but in the opposite direction. This is used by the IDE
* driver to write disk sectors. Performance is important, but the
* interfaces seems to be slow: just using the inlined version of the
* outw() breaks things.
*/
void outsw (unsigned long port, const void *src, unsigned long count)
{
unsigned int l = 0, l2;
if (!count)
return;
switch (((unsigned long) src) & 0x3)
{
case 0x00: /* Buffer 32-bit aligned */
while (count>=2) {
count -= 2;
l = *(unsigned int *) src;
((unsigned int *) src)++;
outw(le16_to_cpu(l >> 16), port);
outw(le16_to_cpu(l & 0xffff), port);
}
if (count) {
outw(le16_to_cpu(*(unsigned short*)src), port);
}
break;
case 0x02: /* Buffer 16-bit aligned */
outw(le16_to_cpu(*(unsigned short*)src), port);
((unsigned short *) src)++;
count--;
while (count>=2) {
count -= 2;
l = *(unsigned int *) src;
((unsigned int *) src)++;
outw(le16_to_cpu(l >> 16), port);
outw(le16_to_cpu(l & 0xffff), port);
}
if (count) {
outw(le16_to_cpu(*(unsigned short*)src), port);
}
break;
case 0x01: /* Buffer 8-bit aligned */
/* I don't bother with 32bit transfers
* in this case, 16bit will have to do -- DE */
l = *(unsigned char *) src << 8;
((unsigned char *) src)++;
count--;
while (count)
{
count--;
l2 = *(unsigned short *) src;
((unsigned short *) src)++;
outw(le16_to_cpu(l | l2 >> 8), port);
l = l2 << 8;
}
l2 = *(unsigned char *) src;
outw (le16_to_cpu(l | l2>>8), port);
break;
}
}
/*
* Like insl but in the opposite direction. This is used by the IDE
* driver to write disk sectors. Works with any alignment in SRC.
* Performance is important, but the interfaces seems to be slow:
* just using the inlined version of the outl() breaks things.
*/
void outsl (unsigned long port, const void *src, unsigned long count)
{
unsigned int l = 0, l2;
if (!count)
return;
switch (((unsigned long) src) & 0x3)
{
case 0x00: /* Buffer 32-bit aligned */
while (count--)
{
outl(le32_to_cpu(*(unsigned int *) src), port);
((unsigned int *) src)++;
}
break;
case 0x02: /* Buffer 16-bit aligned */
--count;
l = *(unsigned short *) src;
((unsigned short *) src)++;
while (count--)
{
l2 = *(unsigned int *) src;
((unsigned int *) src)++;
outl (le32_to_cpu(l << 16 | l2 >> 16), port);
l = l2;
}
l2 = *(unsigned short *) src;
outl (le32_to_cpu(l << 16 | l2), port);
break;
case 0x01: /* Buffer 8-bit aligned */
--count;
l = *(unsigned char *) src << 24;
((unsigned char *) src)++;
l |= *(unsigned short *) src << 8;
((unsigned short *) src)++;
while (count--)
{
l2 = *(unsigned int *) src;
((unsigned int *) src)++;
outl (le32_to_cpu(l | l2 >> 24), port);
l = l2 << 8;
}
l2 = *(unsigned char *) src;
outl (le32_to_cpu(l | l2), port);
break;
case 0x03: /* Buffer 8-bit aligned */
--count;
l = *(unsigned char *) src << 24;
((unsigned char *) src)++;
while (count--)
{
l2 = *(unsigned int *) src;
((unsigned int *) src)++;
outl (le32_to_cpu(l | l2 >> 8), port);
l = l2 << 24;
}
l2 = *(unsigned short *) src << 16;
((unsigned short *) src)++;
l2 |= *(unsigned char *) src;
outl (le32_to_cpu(l | l2), port);
break;
}
}
/*------------------------------------------------------------------------------
* Native PARISC/Linux Project (http://www.puffingroup.com/parisc)
/*
* Linux/PA-RISC Project (http://www.parisc-linux.org/)
*
* Assembly Language User Access Routines
* Copyright (C) 2000 Hewlett-Packard (John Marvin)
......@@ -30,7 +30,6 @@
*/
.level 1.1
.text
#include <asm/assembly.h>
......@@ -42,12 +41,9 @@
* on the flag stored in the task structure.
*/
/* FIXME! depi below has hardcoded idea of kernel stack size */
.macro get_sr
copy %r30,%r1 ;! Get task structure
depi 0,31,14,%r1 ;! into r1
ldw TASK_SEGMENT(%r1),%r22
mfctl %cr30,%r1
ldw TI_SEGMENT(%r1),%r22
mfsp %sr3,%r1
or,<> %r22,%r0,%r0
copy %r0,%r1
......@@ -82,7 +78,11 @@ $lctu_done:
ldo 1(%r24),%r24
.section __ex_table,"a"
#ifdef __LP64__
.dword 1b,(2b-1b)
#else
.word 1b,(2b-1b)
#endif
.previous
.procend
......@@ -123,7 +123,11 @@ $lcfu_zero_loop:
nop
.section __ex_table,"a"
#ifdef __LP64__
.dword 1b,(2b-1b)
#else
.word 1b,(2b-1b)
#endif
.previous
.procend
......@@ -133,7 +137,7 @@ $lcfu_zero_loop:
*
* Returns -EFAULT if exception before terminator,
* N if the entire buffer filled,
* otherwise strlen + 1 (i.e. includes zero byte)
* otherwise strlen (i.e. excludes zero byte)
*/
.export lstrncpy_from_user,code
......@@ -142,7 +146,7 @@ lstrncpy_from_user:
.callinfo NO_CALLS
.entry
comib,= 0,%r24,$lsfu_done
copy %r26,%r23
copy %r24,%r23
get_sr
1: ldbs,ma 1(%sr1,%r25),%r1
$lsfu_loop:
......@@ -151,7 +155,7 @@ $lsfu_loop:
addib,<>,n -1,%r24,$lsfu_loop
2: ldbs,ma 1(%sr1,%r25),%r1
$lsfu_done:
sub %r26,%r23,%r28
sub %r23,%r24,%r28
$lsfu_exit:
bv %r0(%r2)
nop
......@@ -161,8 +165,13 @@ $lsfu_exit:
ldi -EFAULT,%r28
.section __ex_table,"a"
#ifdef __LP64__
.dword 1b,(3b-1b)
.dword 2b,(3b-2b)
#else
.word 1b,(3b-1b)
.word 2b,(2b-1b)
.word 2b,(3b-2b)
#endif
.previous
.procend
......@@ -194,7 +203,11 @@ $lclu_done:
ldo 1(%r25),%r25
.section __ex_table,"a"
#ifdef __LP64__
.dword 1b,(2b-1b)
#else
.word 1b,(2b-1b)
#endif
.previous
.procend
......@@ -233,8 +246,13 @@ $lslen_nzero:
copy %r24,%r26 /* reset r26 so 0 is returned on fault */
.section __ex_table,"a"
#ifdef __LP64__
.dword 1b,(3b-1b)
.dword 2b,(3b-2b)
#else
.word 1b,(3b-1b)
.word 2b,(2b-1b)
.word 2b,(3b-2b)
#endif
.previous
.procend
......
/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* Slight modifications for pa-risc linux - Paul Bame <bame@debian.org> */
#include <linux/types.h>
#include <asm/string.h>
#define OPSIZ (BITS_PER_LONG/8)
typedef unsigned long op_t;
void *
memset (void *dstpp, int sc, size_t len)
{
unsigned int c = sc;
long int dstp = (long int) dstpp;
if (len >= 8)
{
size_t xlen;
op_t cccc;
cccc = (unsigned char) c;
cccc |= cccc << 8;
cccc |= cccc << 16;
if (OPSIZ > 4)
/* Do the shift in two steps to avoid warning if long has 32 bits. */
cccc |= (cccc << 16) << 16;
/* There are at least some bytes to set.
No need to test for LEN == 0 in this alignment loop. */
while (dstp % OPSIZ != 0)
{
((unsigned char *) dstp)[0] = c;
dstp += 1;
len -= 1;
}
/* Write 8 `op_t' per iteration until less than 8 `op_t' remain. */
xlen = len / (OPSIZ * 8);
while (xlen > 0)
{
((op_t *) dstp)[0] = cccc;
((op_t *) dstp)[1] = cccc;
((op_t *) dstp)[2] = cccc;
((op_t *) dstp)[3] = cccc;
((op_t *) dstp)[4] = cccc;
((op_t *) dstp)[5] = cccc;
((op_t *) dstp)[6] = cccc;
((op_t *) dstp)[7] = cccc;
dstp += 8 * OPSIZ;
xlen -= 1;
}
len %= OPSIZ * 8;
/* Write 1 `op_t' per iteration until less than OPSIZ bytes remain. */
xlen = len / OPSIZ;
while (xlen > 0)
{
((op_t *) dstp)[0] = cccc;
dstp += OPSIZ;
xlen -= 1;
}
len %= OPSIZ;
}
/* Write the last few bytes. */
while (len > 0)
{
((unsigned char *) dstp)[0] = c;
dstp += 1;
len -= 1;
}
return dstpp;
}
# Makefile for MIPS kernel build tools.
#
# Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
# Copyright (C) 1997 Ralf Baechle (ralf@gnu.ai.mit.edu)
#
# $Id: Makefile,v 1.3 1999/09/29 05:19:56 grundler Exp $
#
TARGET := $(TOPDIR)/include/asm-$(ARCH)/offset.h
all: $(TARGET)
$(TARGET): offset.h
cmp -s $^ $@ || (cp $^ $(TARGET).new && mv $(TARGET).new $(TARGET))
offset.h: offset.s
sed -n '/^@@@/s///p' $^ >$@
offset.s: offset.c
clean:
rm -f offset.[hs] $(TARGET).new
include $(TOPDIR)/Rules.make
/* $Id: offset.c,v 1.2 2000/01/31 13:42:59 jsm Exp $
*
* offset.c: Calculate pt_regs and task_struct offsets.
*
* Copyright (C) 1996 David S. Miller
* Made portable by Ralf Baechle
* Adapted to parisc by Philipp Rumpf, (C) 1999 SuSE GmbH Nuernberg */
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/version.h>
#include <asm/ptrace.h>
#include <asm/processor.h>
#include <asm/hardirq.h>
#define text(t) __asm__("\n@@@" t)
#define _offset(type, member) (&(((type *)NULL)->member))
#define offset(string, ptr, member) \
__asm__("\n@@@" string "%0" : : "i" (_offset(ptr, member)))
#define size(string, size) \
__asm__("\n@@@" string "%0" : : "i" (sizeof(size)))
#define align(x,y) (((x)+(2*(y))-1)-(((x)+(y)-1)%(y)))
#define size_align(string, size, algn) \
__asm__("\n@@@" string "%0" : : "i" \
align(sizeof(size),algn))
#define linefeed text("")
text("/* DO NOT TOUCH, AUTOGENERATED BY OFFSET.C */");
linefeed;
text("#ifndef _PARISC_OFFSET_H");
text("#define _PARISC_OFFSET_H");
linefeed;
void output_task_ptreg_defines(void)
{
text("/* PA-RISC task pt_regs offsets. */");
offset("#define TASK_REGS ", struct task_struct, thread.regs);
offset("#define TASK_PT_PSW ", struct task_struct, thread.regs.gr[ 0]);
offset("#define TASK_PT_GR1 ", struct task_struct, thread.regs.gr[ 1]);
offset("#define TASK_PT_GR2 ", struct task_struct, thread.regs.gr[ 2]);
offset("#define TASK_PT_GR3 ", struct task_struct, thread.regs.gr[ 3]);
offset("#define TASK_PT_GR4 ", struct task_struct, thread.regs.gr[ 4]);
offset("#define TASK_PT_GR5 ", struct task_struct, thread.regs.gr[ 5]);
offset("#define TASK_PT_GR6 ", struct task_struct, thread.regs.gr[ 6]);
offset("#define TASK_PT_GR7 ", struct task_struct, thread.regs.gr[ 7]);
offset("#define TASK_PT_GR8 ", struct task_struct, thread.regs.gr[ 8]);
offset("#define TASK_PT_GR9 ", struct task_struct, thread.regs.gr[ 9]);
offset("#define TASK_PT_GR10 ", struct task_struct, thread.regs.gr[10]);
offset("#define TASK_PT_GR11 ", struct task_struct, thread.regs.gr[11]);
offset("#define TASK_PT_GR12 ", struct task_struct, thread.regs.gr[12]);
offset("#define TASK_PT_GR13 ", struct task_struct, thread.regs.gr[13]);
offset("#define TASK_PT_GR14 ", struct task_struct, thread.regs.gr[14]);
offset("#define TASK_PT_GR15 ", struct task_struct, thread.regs.gr[15]);
offset("#define TASK_PT_GR16 ", struct task_struct, thread.regs.gr[16]);
offset("#define TASK_PT_GR17 ", struct task_struct, thread.regs.gr[17]);
offset("#define TASK_PT_GR18 ", struct task_struct, thread.regs.gr[18]);
offset("#define TASK_PT_GR19 ", struct task_struct, thread.regs.gr[19]);
offset("#define TASK_PT_GR20 ", struct task_struct, thread.regs.gr[20]);
offset("#define TASK_PT_GR21 ", struct task_struct, thread.regs.gr[21]);
offset("#define TASK_PT_GR22 ", struct task_struct, thread.regs.gr[22]);
offset("#define TASK_PT_GR23 ", struct task_struct, thread.regs.gr[23]);
offset("#define TASK_PT_GR24 ", struct task_struct, thread.regs.gr[24]);
offset("#define TASK_PT_GR25 ", struct task_struct, thread.regs.gr[25]);
offset("#define TASK_PT_GR26 ", struct task_struct, thread.regs.gr[26]);
offset("#define TASK_PT_GR27 ", struct task_struct, thread.regs.gr[27]);
offset("#define TASK_PT_GR28 ", struct task_struct, thread.regs.gr[28]);
offset("#define TASK_PT_GR29 ", struct task_struct, thread.regs.gr[29]);
offset("#define TASK_PT_GR30 ", struct task_struct, thread.regs.gr[30]);
offset("#define TASK_PT_GR31 ", struct task_struct, thread.regs.gr[31]);
offset("#define TASK_PT_FR0 ", struct task_struct, thread.regs.fr[ 0]);
offset("#define TASK_PT_FR1 ", struct task_struct, thread.regs.fr[ 1]);
offset("#define TASK_PT_FR2 ", struct task_struct, thread.regs.fr[ 2]);
offset("#define TASK_PT_FR3 ", struct task_struct, thread.regs.fr[ 3]);
offset("#define TASK_PT_FR4 ", struct task_struct, thread.regs.fr[ 4]);
offset("#define TASK_PT_FR5 ", struct task_struct, thread.regs.fr[ 5]);
offset("#define TASK_PT_FR6 ", struct task_struct, thread.regs.fr[ 6]);
offset("#define TASK_PT_FR7 ", struct task_struct, thread.regs.fr[ 7]);
offset("#define TASK_PT_FR8 ", struct task_struct, thread.regs.fr[ 8]);
offset("#define TASK_PT_FR9 ", struct task_struct, thread.regs.fr[ 9]);
offset("#define TASK_PT_FR10 ", struct task_struct, thread.regs.fr[10]);
offset("#define TASK_PT_FR11 ", struct task_struct, thread.regs.fr[11]);
offset("#define TASK_PT_FR12 ", struct task_struct, thread.regs.fr[12]);
offset("#define TASK_PT_FR13 ", struct task_struct, thread.regs.fr[13]);
offset("#define TASK_PT_FR14 ", struct task_struct, thread.regs.fr[14]);
offset("#define TASK_PT_FR15 ", struct task_struct, thread.regs.fr[15]);
offset("#define TASK_PT_FR16 ", struct task_struct, thread.regs.fr[16]);
offset("#define TASK_PT_FR17 ", struct task_struct, thread.regs.fr[17]);
offset("#define TASK_PT_FR18 ", struct task_struct, thread.regs.fr[18]);
offset("#define TASK_PT_FR19 ", struct task_struct, thread.regs.fr[19]);
offset("#define TASK_PT_FR20 ", struct task_struct, thread.regs.fr[20]);
offset("#define TASK_PT_FR21 ", struct task_struct, thread.regs.fr[21]);
offset("#define TASK_PT_FR22 ", struct task_struct, thread.regs.fr[22]);
offset("#define TASK_PT_FR23 ", struct task_struct, thread.regs.fr[23]);
offset("#define TASK_PT_FR24 ", struct task_struct, thread.regs.fr[24]);
offset("#define TASK_PT_FR25 ", struct task_struct, thread.regs.fr[25]);
offset("#define TASK_PT_FR26 ", struct task_struct, thread.regs.fr[26]);
offset("#define TASK_PT_FR27 ", struct task_struct, thread.regs.fr[27]);
offset("#define TASK_PT_FR28 ", struct task_struct, thread.regs.fr[28]);
offset("#define TASK_PT_FR29 ", struct task_struct, thread.regs.fr[29]);
offset("#define TASK_PT_FR30 ", struct task_struct, thread.regs.fr[30]);
offset("#define TASK_PT_FR31 ", struct task_struct, thread.regs.fr[31]);
offset("#define TASK_PT_SR0 ", struct task_struct, thread.regs.sr[ 0]);
offset("#define TASK_PT_SR1 ", struct task_struct, thread.regs.sr[ 1]);
offset("#define TASK_PT_SR2 ", struct task_struct, thread.regs.sr[ 2]);
offset("#define TASK_PT_SR3 ", struct task_struct, thread.regs.sr[ 3]);
offset("#define TASK_PT_SR4 ", struct task_struct, thread.regs.sr[ 4]);
offset("#define TASK_PT_SR5 ", struct task_struct, thread.regs.sr[ 5]);
offset("#define TASK_PT_SR6 ", struct task_struct, thread.regs.sr[ 6]);
offset("#define TASK_PT_SR7 ", struct task_struct, thread.regs.sr[ 7]);
offset("#define TASK_PT_IASQ0 ", struct task_struct, thread.regs.iasq[0]);
offset("#define TASK_PT_IASQ1 ", struct task_struct, thread.regs.iasq[1]);
offset("#define TASK_PT_IAOQ0 ", struct task_struct, thread.regs.iaoq[0]);
offset("#define TASK_PT_IAOQ1 ", struct task_struct, thread.regs.iaoq[1]);
offset("#define TASK_PT_CR24 ", struct task_struct, thread.regs.cr24);
offset("#define TASK_PT_CR25 ", struct task_struct, thread.regs.cr25);
offset("#define TASK_PT_CR26 ", struct task_struct, thread.regs.cr26);
offset("#define TASK_PT_CR27 ", struct task_struct, thread.regs.cr27);
offset("#define TASK_PT_CR30 ", struct task_struct, thread.regs.cr30);
offset("#define TASK_PT_ORIG_R28 ", struct task_struct, thread.regs.orig_r28);
offset("#define TASK_PT_KSP ", struct task_struct, thread.regs.ksp);
offset("#define TASK_PT_KPC ", struct task_struct, thread.regs.kpc);
offset("#define TASK_PT_SAR ", struct task_struct, thread.regs.sar);
offset("#define TASK_PT_CR11 ", struct task_struct, thread.regs.sar);
offset("#define TASK_PT_IIR ", struct task_struct, thread.regs.iir);
offset("#define TASK_PT_ISR ", struct task_struct, thread.regs.isr);
offset("#define TASK_PT_IOR ", struct task_struct, thread.regs.ior);
offset("#define TASK_PT_CR_PID0 ", struct task_struct, thread.regs.cr_pid[0]);
offset("#define TASK_PT_CR_PID1 ", struct task_struct, thread.regs.cr_pid[1]);
offset("#define TASK_PT_CR_PID2 ", struct task_struct, thread.regs.cr_pid[2]);
offset("#define TASK_PT_CR_PID3 ", struct task_struct, thread.regs.cr_pid[3]);
size("#define TASK_SZ ", struct task_struct);
size_align("#define TASK_SZ_ALGN ", struct task_struct, 64);
linefeed;
}
void output_ptreg_defines(void)
{
text("/* PA-RISC pt_regs offsets. */");
offset("#define PT_PSW ", struct pt_regs, gr[ 0]);
offset("#define PT_GR1 ", struct pt_regs, gr[ 1]);
offset("#define PT_GR2 ", struct pt_regs, gr[ 2]);
offset("#define PT_GR3 ", struct pt_regs, gr[ 3]);
offset("#define PT_GR4 ", struct pt_regs, gr[ 4]);
offset("#define PT_GR5 ", struct pt_regs, gr[ 5]);
offset("#define PT_GR6 ", struct pt_regs, gr[ 6]);
offset("#define PT_GR7 ", struct pt_regs, gr[ 7]);
offset("#define PT_GR8 ", struct pt_regs, gr[ 8]);
offset("#define PT_GR9 ", struct pt_regs, gr[ 9]);
offset("#define PT_GR10 ", struct pt_regs, gr[10]);
offset("#define PT_GR11 ", struct pt_regs, gr[11]);
offset("#define PT_GR12 ", struct pt_regs, gr[12]);
offset("#define PT_GR13 ", struct pt_regs, gr[13]);
offset("#define PT_GR14 ", struct pt_regs, gr[14]);
offset("#define PT_GR15 ", struct pt_regs, gr[15]);
offset("#define PT_GR16 ", struct pt_regs, gr[16]);
offset("#define PT_GR17 ", struct pt_regs, gr[17]);
offset("#define PT_GR18 ", struct pt_regs, gr[18]);
offset("#define PT_GR19 ", struct pt_regs, gr[19]);
offset("#define PT_GR20 ", struct pt_regs, gr[20]);
offset("#define PT_GR21 ", struct pt_regs, gr[21]);
offset("#define PT_GR22 ", struct pt_regs, gr[22]);
offset("#define PT_GR23 ", struct pt_regs, gr[23]);
offset("#define PT_GR24 ", struct pt_regs, gr[24]);
offset("#define PT_GR25 ", struct pt_regs, gr[25]);
offset("#define PT_GR26 ", struct pt_regs, gr[26]);
offset("#define PT_GR27 ", struct pt_regs, gr[27]);
offset("#define PT_GR28 ", struct pt_regs, gr[28]);
offset("#define PT_GR29 ", struct pt_regs, gr[29]);
offset("#define PT_GR30 ", struct pt_regs, gr[30]);
offset("#define PT_GR31 ", struct pt_regs, gr[31]);
offset("#define PT_FR0 ", struct pt_regs, fr[ 0]);
offset("#define PT_FR1 ", struct pt_regs, fr[ 1]);
offset("#define PT_FR2 ", struct pt_regs, fr[ 2]);
offset("#define PT_FR3 ", struct pt_regs, fr[ 3]);
offset("#define PT_FR4 ", struct pt_regs, fr[ 4]);
offset("#define PT_FR5 ", struct pt_regs, fr[ 5]);
offset("#define PT_FR6 ", struct pt_regs, fr[ 6]);
offset("#define PT_FR7 ", struct pt_regs, fr[ 7]);
offset("#define PT_FR8 ", struct pt_regs, fr[ 8]);
offset("#define PT_FR9 ", struct pt_regs, fr[ 9]);
offset("#define PT_FR10 ", struct pt_regs, fr[10]);
offset("#define PT_FR11 ", struct pt_regs, fr[11]);
offset("#define PT_FR12 ", struct pt_regs, fr[12]);
offset("#define PT_FR13 ", struct pt_regs, fr[13]);
offset("#define PT_FR14 ", struct pt_regs, fr[14]);
offset("#define PT_FR15 ", struct pt_regs, fr[15]);
offset("#define PT_FR16 ", struct pt_regs, fr[16]);
offset("#define PT_FR17 ", struct pt_regs, fr[17]);
offset("#define PT_FR18 ", struct pt_regs, fr[18]);
offset("#define PT_FR19 ", struct pt_regs, fr[19]);
offset("#define PT_FR20 ", struct pt_regs, fr[20]);
offset("#define PT_FR21 ", struct pt_regs, fr[21]);
offset("#define PT_FR22 ", struct pt_regs, fr[22]);
offset("#define PT_FR23 ", struct pt_regs, fr[23]);
offset("#define PT_FR24 ", struct pt_regs, fr[24]);
offset("#define PT_FR25 ", struct pt_regs, fr[25]);
offset("#define PT_FR26 ", struct pt_regs, fr[26]);
offset("#define PT_FR27 ", struct pt_regs, fr[27]);
offset("#define PT_FR28 ", struct pt_regs, fr[28]);
offset("#define PT_FR29 ", struct pt_regs, fr[29]);
offset("#define PT_FR30 ", struct pt_regs, fr[30]);
offset("#define PT_FR31 ", struct pt_regs, fr[31]);
offset("#define PT_SR0 ", struct pt_regs, sr[ 0]);
offset("#define PT_SR1 ", struct pt_regs, sr[ 1]);
offset("#define PT_SR2 ", struct pt_regs, sr[ 2]);
offset("#define PT_SR3 ", struct pt_regs, sr[ 3]);
offset("#define PT_SR4 ", struct pt_regs, sr[ 4]);
offset("#define PT_SR5 ", struct pt_regs, sr[ 5]);
offset("#define PT_SR6 ", struct pt_regs, sr[ 6]);
offset("#define PT_SR7 ", struct pt_regs, sr[ 7]);
offset("#define PT_IASQ0 ", struct pt_regs, iasq[0]);
offset("#define PT_IASQ1 ", struct pt_regs, iasq[1]);
offset("#define PT_IAOQ0 ", struct pt_regs, iaoq[0]);
offset("#define PT_IAOQ1 ", struct pt_regs, iaoq[1]);
offset("#define PT_CR24 ", struct pt_regs, cr24);
offset("#define PT_CR25 ", struct pt_regs, cr25);
offset("#define PT_CR26 ", struct pt_regs, cr26);
offset("#define PT_CR27 ", struct pt_regs, cr27);
offset("#define PT_CR30 ", struct pt_regs, cr30);
offset("#define PT_ORIG_R28 ", struct pt_regs, orig_r28);
offset("#define PT_KSP ", struct pt_regs, ksp);
offset("#define PT_KPC ", struct pt_regs, kpc);
offset("#define PT_SAR ", struct pt_regs, sar);
offset("#define PT_CR11 ", struct pt_regs, sar);
offset("#define PT_IIR ", struct pt_regs, iir);
offset("#define PT_ISR ", struct pt_regs, isr);
offset("#define PT_IOR ", struct pt_regs, ior);
offset("#define PT_CR_PID0 ", struct pt_regs, cr_pid[0]);
offset("#define PT_CR_PID1 ", struct pt_regs, cr_pid[1]);
offset("#define PT_CR_PID2 ", struct pt_regs, cr_pid[2]);
offset("#define PT_CR_PID3 ", struct pt_regs, cr_pid[3]);
size("#define PT_SIZE ", struct pt_regs);
size_align("#define PT_SZ_ALGN ", struct pt_regs, 64);
linefeed;
}
void output_task_defines(void)
{
text("/* PARISC task_struct offsets. */");
offset("#define TASK_STATE ", struct task_struct, state);
offset("#define TASK_FLAGS ", struct task_struct, flags);
#error offset("#define TASK_SIGPENDING ", struct task_struct, sigpending);
offset("#define TASK_SEGMENT ", struct task_struct, addr_limit);
#error offset("#define TASK_NEED_RESCHED ", struct task_struct, need_resched);
offset("#define TASK_COUNTER ", struct task_struct, counter);
#error offset("#define TASK_PTRACE ", struct task_struct, ptrace);
offset("#define TASK_NICE ", struct task_struct, nice);
offset("#define TASK_MM ", struct task_struct, mm);
offset("#define TASK_PROCESSOR ", struct task_struct, processor);
size ("#define TASK_SZ ", struct task_struct);
size_align("#define TASK_SZ_ALGN ", struct task_struct, 64);
linefeed;
}
void output_irq_stat_defines(void)
{
text("/* PARISC irq_cpustat_t offsets. */");
offset("#define IRQSTAT_SI_ACTIVE ", irq_cpustat_t, __softirq_active);
offset("#define IRQSTAT_SI_MASK ", irq_cpustat_t, __softirq_mask);
size ("#define IRQSTAT_SZ ", irq_cpustat_t);
linefeed;
}
#ifdef PRUMPF_HAD_MORE_TIME
void output_thread_defines(void)
{
text("/* PARISC specific thread_struct offsets. */");
offset("#define THREAD_REG16 ", struct task_struct, thread.reg16);
offset("#define THREAD_REG17 ", struct task_struct, thread.reg17);
offset("#define THREAD_REG18 ", struct task_struct, thread.reg18);
offset("#define THREAD_REG19 ", struct task_struct, thread.reg19);
offset("#define THREAD_REG20 ", struct task_struct, thread.reg20);
offset("#define THREAD_REG21 ", struct task_struct, thread.reg21);
offset("#define THREAD_REG22 ", struct task_struct, thread.reg22);
offset("#define THREAD_REG23 ", struct task_struct, thread.reg23);
offset("#define THREAD_REG29 ", struct task_struct, thread.reg29);
offset("#define THREAD_REG30 ", struct task_struct, thread.reg30);
offset("#define THREAD_REG31 ", struct task_struct, thread.reg31);
offset("#define THREAD_STATUS ", struct task_struct, thread.cp0_status);
offset("#define THREAD_FPU ", struct task_struct, thread.fpu);
offset("#define THREAD_BVADDR ", struct task_struct, thread.cp0_badvaddr);
offset("#define THREAD_BUADDR ", struct task_struct, thread.cp0_baduaddr);
offset("#define THREAD_ECODE ", struct task_struct, thread.error_code);
offset("#define THREAD_TRAPNO ", struct task_struct, thread.trap_no);
offset("#define THREAD_PGDIR ", struct task_struct, thread.pg_dir);
offset("#define THREAD_MFLAGS ", struct task_struct, thread.mflags);
offset("#define THREAD_CURDS ", struct task_struct, thread.current_ds);
offset("#define THREAD_TRAMP ", struct task_struct, thread.irix_trampoline);
offset("#define THREAD_OLDCTX ", struct task_struct, thread.irix_oldctx);
linefeed;
}
void output_mm_defines(void)
{
text("/* Linux mm_struct offsets. */");
offset("#define MM_COUNT ", struct mm_struct, count);
offset("#define MM_PGD ", struct mm_struct, pgd);
offset("#define MM_CONTEXT ", struct mm_struct, context);
linefeed;
}
void output_sc_defines(void)
{
text("/* Linux sigcontext offsets. */");
offset("#define SC_REGMASK ", struct sigcontext, sc_regmask);
offset("#define SC_STATUS ", struct sigcontext, sc_status);
offset("#define SC_PC ", struct sigcontext, sc_pc);
offset("#define SC_REGS ", struct sigcontext, sc_regs);
offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs);
offset("#define SC_OWNEDFP ", struct sigcontext, sc_ownedfp);
offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr);
offset("#define SC_FPC_EIR ", struct sigcontext, sc_fpc_eir);
offset("#define SC_SSFLAGS ", struct sigcontext, sc_ssflags);
offset("#define SC_MDHI ", struct sigcontext, sc_mdhi);
offset("#define SC_MDLO ", struct sigcontext, sc_mdlo);
offset("#define SC_CAUSE ", struct sigcontext, sc_cause);
offset("#define SC_BADVADDR ", struct sigcontext, sc_badvaddr);
offset("#define SC_SIGSET ", struct sigcontext, sc_sigset);
linefeed;
}
#endif
text("#endif /* !(_PARISC_OFFSET_H) */");
#include <linux/config.h>
/* ld script to make hppa Linux kernel */
OUTPUT_FORMAT("elf32-hppa")
#ifndef CONFIG_PARISC64
OUTPUT_FORMAT("elf32-hppa-linux")
OUTPUT_ARCH(hppa)
#else
OUTPUT_FORMAT("elf64-hppa-linux")
OUTPUT_ARCH(hppa:hppa2.0w)
#endif
ENTRY(_stext)
#ifndef CONFIG_PARISC64
jiffies = jiffies_64 + 4;
#else
jiffies = jiffies_64;
#endif
SECTIONS
{
/* right now use 0x10000/0x11000, later when we don't use Console and
* Boot-Device IODC, we will change this to 0x8000 !!!
*/
. = 0xc0100000;
/* . = 0x10000; */
. = 0x10100000;
_text = .; /* Text and read-only data */
.text BLOCK(16) : {
......@@ -22,12 +29,12 @@ SECTIONS
*(.gnu.warning)
} = 0
_etext = .; /* End of text section */
. = ALIGN(16);
.rodata : { *(.rodata) *(.rodata.*) }
.kstrtab : { *(.kstrtab) }
_etext = .; /* End of text section */
.data BLOCK(8192) : { /* Data without special */
data_start = .;
*(.data)
......@@ -42,6 +49,16 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
#ifdef CONFIG_PARISC64
. = ALIGN(16); /* Linkage tables */
.opd : { *(.opd) } PROVIDE (__gp = .);
.plt : { *(.plt) }
.dlt : { *(.dlt) }
#endif
. = ALIGN(16384);
__init_begin = .;
......@@ -49,7 +66,7 @@ SECTIONS
.init.data : { *(.init.data) }
. = ALIGN(16);
__setup_start = .;
.setup.init : { *(.setup.init) }
.init.setup : { *(.init.setup) }
__setup_end = .;
__initcall_start = .;
.initcall.init : {
......@@ -62,9 +79,13 @@ SECTIONS
*(.initcall7.init)
}
__initcall_end = .;
. = ALIGN(32);
__per_cpu_start = .;
.data.percpu : { *(.data.percpu) }
__per_cpu_end = .;
. = ALIGN(4096);
__init_end = .;
init_task BLOCK(16384) : { *(init_task) } /* The initial task and kernel stack */
_edata = .; /* End of data section */
......@@ -84,5 +105,15 @@ SECTIONS
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.note 0 : { *(.note) }
#ifdef CONFIG_PARISC64
/* temporary hack until binutils is fixed to not emit these
for static binaries */
/DISCARD/ : {
*(.dynsym)
*(.dynstr)
*(.dynamic)
*(.hash)
}
#endif
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment