Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Jan 2009 19:59:27 +0000 (11:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Jan 2009 19:59:27 +0000 (11:59 -0800)
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Use snprintf to set adapter names
  Input: apanel - convert to new i2c binding
  i2c: Drop I2C_CLASS_CAM_DIGITAL
  i2c: Drop I2C_CLASS_CAM_ANALOG and I2C_CLASS_SOUND
  i2c: Drop I2C_CLASS_ALL
  i2c: Get rid of remaining bus_id access
  i2c: Replace bus_id with dev_name(), dev_set_name()

369 files changed:
CREDITS
Documentation/dell_rbu.txt
Documentation/hwmon/abituguru-datasheet
Documentation/laptops/thinkpad-acpi.txt
Documentation/networking/rxrpc.txt
Documentation/networking/tuntap.txt
Documentation/scsi/ChangeLog.lpfc
Documentation/scsi/ChangeLog.ncr53c8xx
Documentation/scsi/ChangeLog.sym53c8xx
MAINTAINERS
Makefile
arch/avr32/Kconfig
arch/avr32/Makefile
arch/avr32/boards/atngw100/setup.c
arch/avr32/boards/atstk1000/atstk1002.c
arch/avr32/boards/atstk1000/atstk1003.c
arch/avr32/boards/atstk1000/atstk1004.c
arch/avr32/boards/favr-32/setup.c
arch/avr32/boards/hammerhead/Kconfig [new file with mode: 0644]
arch/avr32/boards/hammerhead/Makefile [new file with mode: 0644]
arch/avr32/boards/hammerhead/flash.c [new file with mode: 0644]
arch/avr32/boards/hammerhead/flash.h [new file with mode: 0644]
arch/avr32/boards/hammerhead/setup.c [new file with mode: 0644]
arch/avr32/boards/mimc200/setup.c
arch/avr32/configs/atngw100_defconfig
arch/avr32/configs/atstk1002_defconfig
arch/avr32/configs/atstk1003_defconfig
arch/avr32/configs/atstk1006_defconfig
arch/avr32/configs/hammerhead_defconfig [new file with mode: 0644]
arch/avr32/include/asm/atmel-mci.h [deleted file]
arch/avr32/include/asm/kdebug.h
arch/avr32/include/asm/syscalls.h [new file with mode: 0644]
arch/avr32/kernel/process.c
arch/avr32/kernel/signal.c
arch/avr32/kernel/sys_avr32.c
arch/avr32/mach-at32ap/at32ap700x.c
arch/avr32/mach-at32ap/clock.h
arch/avr32/mach-at32ap/include/mach/at32ap700x.h
arch/avr32/mach-at32ap/include/mach/portmux.h
arch/avr32/mach-at32ap/pio.c
arch/avr32/mm/cache.c
arch/avr32/mm/init.c
arch/blackfin/kernel/kgdb.c
arch/cris/arch-v32/kernel/signal.c
arch/ia64/kernel/kprobes.c
arch/m68k/Kconfig
arch/m68k/kernel/traps.c
arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c
arch/powerpc/boot/Makefile
arch/powerpc/kernel/kprobes.c
arch/powerpc/oprofile/cell/spu_profiler.c
arch/s390/Kconfig
arch/s390/kernel/kprobes.c
arch/sparc/kernel/kprobes.c
arch/x86/kernel/kprobes.c
arch/x86/kernel/mfgpt_32.c
arch/xtensa/Makefile
arch/xtensa/boot/boot-elf/boot.lds.S
arch/xtensa/boot/boot-redboot/bootstrap.S
arch/xtensa/include/asm/Kbuild [new file with mode: 0644]
arch/xtensa/include/asm/asmmacro.h [new file with mode: 0644]
arch/xtensa/include/asm/atomic.h [new file with mode: 0644]
arch/xtensa/include/asm/auxvec.h [new file with mode: 0644]
arch/xtensa/include/asm/bitops.h [new file with mode: 0644]
arch/xtensa/include/asm/bootparam.h [new file with mode: 0644]
arch/xtensa/include/asm/bug.h [new file with mode: 0644]
arch/xtensa/include/asm/bugs.h [new file with mode: 0644]
arch/xtensa/include/asm/byteorder.h [new file with mode: 0644]
arch/xtensa/include/asm/cache.h [new file with mode: 0644]
arch/xtensa/include/asm/cacheasm.h [new file with mode: 0644]
arch/xtensa/include/asm/cacheflush.h [new file with mode: 0644]
arch/xtensa/include/asm/checksum.h [new file with mode: 0644]
arch/xtensa/include/asm/coprocessor.h [new file with mode: 0644]
arch/xtensa/include/asm/cpumask.h [new file with mode: 0644]
arch/xtensa/include/asm/cputime.h [new file with mode: 0644]
arch/xtensa/include/asm/current.h [new file with mode: 0644]
arch/xtensa/include/asm/delay.h [new file with mode: 0644]
arch/xtensa/include/asm/device.h [new file with mode: 0644]
arch/xtensa/include/asm/div64.h [new file with mode: 0644]
arch/xtensa/include/asm/dma-mapping.h [new file with mode: 0644]
arch/xtensa/include/asm/dma.h [new file with mode: 0644]
arch/xtensa/include/asm/elf.h [new file with mode: 0644]
arch/xtensa/include/asm/emergency-restart.h [new file with mode: 0644]
arch/xtensa/include/asm/errno.h [new file with mode: 0644]
arch/xtensa/include/asm/fb.h [new file with mode: 0644]
arch/xtensa/include/asm/fcntl.h [new file with mode: 0644]
arch/xtensa/include/asm/futex.h [new file with mode: 0644]
arch/xtensa/include/asm/hardirq.h [new file with mode: 0644]
arch/xtensa/include/asm/highmem.h [new file with mode: 0644]
arch/xtensa/include/asm/hw_irq.h [new file with mode: 0644]
arch/xtensa/include/asm/io.h [new file with mode: 0644]
arch/xtensa/include/asm/ioctl.h [new file with mode: 0644]
arch/xtensa/include/asm/ioctls.h [new file with mode: 0644]
arch/xtensa/include/asm/ipcbuf.h [new file with mode: 0644]
arch/xtensa/include/asm/irq.h [new file with mode: 0644]
arch/xtensa/include/asm/irq_regs.h [new file with mode: 0644]
arch/xtensa/include/asm/kdebug.h [new file with mode: 0644]
arch/xtensa/include/asm/kmap_types.h [new file with mode: 0644]
arch/xtensa/include/asm/linkage.h [new file with mode: 0644]
arch/xtensa/include/asm/local.h [new file with mode: 0644]
arch/xtensa/include/asm/mman.h [new file with mode: 0644]
arch/xtensa/include/asm/mmu.h [new file with mode: 0644]
arch/xtensa/include/asm/mmu_context.h [new file with mode: 0644]
arch/xtensa/include/asm/module.h [new file with mode: 0644]
arch/xtensa/include/asm/msgbuf.h [new file with mode: 0644]
arch/xtensa/include/asm/mutex.h [new file with mode: 0644]
arch/xtensa/include/asm/page.h [new file with mode: 0644]
arch/xtensa/include/asm/param.h [new file with mode: 0644]
arch/xtensa/include/asm/pci-bridge.h [new file with mode: 0644]
arch/xtensa/include/asm/pci.h [new file with mode: 0644]
arch/xtensa/include/asm/percpu.h [new file with mode: 0644]
arch/xtensa/include/asm/pgalloc.h [new file with mode: 0644]
arch/xtensa/include/asm/pgtable.h [new file with mode: 0644]
arch/xtensa/include/asm/platform.h [new file with mode: 0644]
arch/xtensa/include/asm/poll.h [new file with mode: 0644]
arch/xtensa/include/asm/posix_types.h [new file with mode: 0644]
arch/xtensa/include/asm/processor.h [new file with mode: 0644]
arch/xtensa/include/asm/ptrace.h [new file with mode: 0644]
arch/xtensa/include/asm/regs.h [new file with mode: 0644]
arch/xtensa/include/asm/resource.h [new file with mode: 0644]
arch/xtensa/include/asm/rmap.h [new file with mode: 0644]
arch/xtensa/include/asm/rwsem.h [new file with mode: 0644]
arch/xtensa/include/asm/scatterlist.h [new file with mode: 0644]
arch/xtensa/include/asm/sections.h [new file with mode: 0644]
arch/xtensa/include/asm/segment.h [new file with mode: 0644]
arch/xtensa/include/asm/sembuf.h [new file with mode: 0644]
arch/xtensa/include/asm/serial.h [new file with mode: 0644]
arch/xtensa/include/asm/setup.h [new file with mode: 0644]
arch/xtensa/include/asm/shmbuf.h [new file with mode: 0644]
arch/xtensa/include/asm/shmparam.h [new file with mode: 0644]
arch/xtensa/include/asm/sigcontext.h [new file with mode: 0644]
arch/xtensa/include/asm/siginfo.h [new file with mode: 0644]
arch/xtensa/include/asm/signal.h [new file with mode: 0644]
arch/xtensa/include/asm/smp.h [new file with mode: 0644]
arch/xtensa/include/asm/socket.h [new file with mode: 0644]
arch/xtensa/include/asm/sockios.h [new file with mode: 0644]
arch/xtensa/include/asm/spinlock.h [new file with mode: 0644]
arch/xtensa/include/asm/stat.h [new file with mode: 0644]
arch/xtensa/include/asm/statfs.h [new file with mode: 0644]
arch/xtensa/include/asm/string.h [new file with mode: 0644]
arch/xtensa/include/asm/syscall.h [new file with mode: 0644]
arch/xtensa/include/asm/system.h [new file with mode: 0644]
arch/xtensa/include/asm/termbits.h [new file with mode: 0644]
arch/xtensa/include/asm/termios.h [new file with mode: 0644]
arch/xtensa/include/asm/thread_info.h [new file with mode: 0644]
arch/xtensa/include/asm/timex.h [new file with mode: 0644]
arch/xtensa/include/asm/tlb.h [new file with mode: 0644]
arch/xtensa/include/asm/tlbflush.h [new file with mode: 0644]
arch/xtensa/include/asm/topology.h [new file with mode: 0644]
arch/xtensa/include/asm/types.h [new file with mode: 0644]
arch/xtensa/include/asm/uaccess.h [new file with mode: 0644]
arch/xtensa/include/asm/ucontext.h [new file with mode: 0644]
arch/xtensa/include/asm/unaligned.h [new file with mode: 0644]
arch/xtensa/include/asm/unistd.h [new file with mode: 0644]
arch/xtensa/include/asm/user.h [new file with mode: 0644]
arch/xtensa/include/asm/vga.h [new file with mode: 0644]
arch/xtensa/include/asm/xor.h [new file with mode: 0644]
arch/xtensa/kernel/entry.S
arch/xtensa/kernel/vmlinux.lds.S
arch/xtensa/lib/checksum.S
arch/xtensa/lib/memcopy.S
arch/xtensa/lib/memset.S
arch/xtensa/lib/strncpy_user.S
arch/xtensa/lib/strnlen_user.S
arch/xtensa/lib/usercopy.S
arch/xtensa/platforms/iss/console.c
arch/xtensa/platforms/iss/include/platform/hardware.h [new file with mode: 0644]
arch/xtensa/platforms/iss/include/platform/simcall.h [new file with mode: 0644]
arch/xtensa/platforms/iss/io.c
arch/xtensa/platforms/iss/network.c
arch/xtensa/platforms/xt2000/Makefile [new file with mode: 0644]
arch/xtensa/platforms/xt2000/include/platform/hardware.h [new file with mode: 0644]
arch/xtensa/platforms/xt2000/include/platform/serial.h [new file with mode: 0644]
arch/xtensa/platforms/xt2000/setup.c [new file with mode: 0644]
arch/xtensa/variants/dc232b/include/variant/core.h [new file with mode: 0644]
arch/xtensa/variants/dc232b/include/variant/tie-asm.h [new file with mode: 0644]
arch/xtensa/variants/dc232b/include/variant/tie.h [new file with mode: 0644]
arch/xtensa/variants/fsf/include/variant/core.h [new file with mode: 0644]
arch/xtensa/variants/fsf/include/variant/tie-asm.h [new file with mode: 0644]
arch/xtensa/variants/fsf/include/variant/tie.h [new file with mode: 0644]
drivers/acpi/acpi_memhotplug.c
drivers/acpi/executer/exprep.c
drivers/acpi/executer/exresolv.c
drivers/acpi/executer/exstore.c
drivers/acpi/resources/rscreate.c
drivers/acpi/utilities/utobject.c
drivers/base/Kconfig
drivers/char/epca.c
drivers/cpufreq/Kconfig
drivers/hid/usbhid/hiddev.c
drivers/hwmon/fschmd.c
drivers/infiniband/hw/mlx4/cq.c
drivers/input/keyboard/atkbd.c
drivers/input/touchscreen/da9034-ts.c
drivers/macintosh/Kconfig
drivers/message/i2o/i2o_scsi.c
drivers/misc/ibmasm/event.c
drivers/misc/phantom.c
drivers/mmc/host/atmel-mci.c
drivers/mtd/devices/pmc551.c
drivers/mtd/ubi/eba.c
drivers/mtd/ubi/io.c
drivers/mtd/ubi/scan.c
drivers/mtd/ubi/ubi-media.h
drivers/mtd/ubi/vtbl.c
drivers/mtd/ubi/wl.c
drivers/net/bnx2x_link.c
drivers/net/e1000/e1000_hw.c
drivers/net/slip.h
drivers/net/tehuti.c
drivers/net/tokenring/smctr.c
drivers/net/wireless/atmel.c
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/rt2x00/rt2x00crypto.c
drivers/net/wireless/strip.c
drivers/rtc/rtc-ds1511.c
drivers/rtc/rtc-stk17ta8.c
drivers/s390/block/dasd_eer.c
drivers/s390/char/vmlogrdr.c
drivers/scsi/a100u2w.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/megaraid.c
drivers/scsi/qla1280.c
drivers/scsi/qla4xxx/ql4_mbx.c
drivers/scsi/scsi_error.c
drivers/serial/8250.c
drivers/serial/crisv10.c
drivers/uwb/i1480/dfu/usb.c
drivers/video/console/vgacon.c
fs/gfs2/Kconfig
fs/gfs2/ops_address.c
fs/gfs2/ops_file.c
fs/ncpfs/ioctl.c
fs/ocfs2/cluster/heartbeat.c
fs/proc/task_nommu.c
fs/ubifs/Kconfig
fs/ubifs/budget.c
fs/ubifs/gc.c
fs/ubifs/journal.c
fs/ubifs/shrinker.c
fs/xfs/linux-2.6/xfs_super.c
include/acpi/acmacros.h
include/acpi/actypes.h
include/asm-xtensa/Kbuild [deleted file]
include/asm-xtensa/asmmacro.h [deleted file]
include/asm-xtensa/atomic.h [deleted file]
include/asm-xtensa/auxvec.h [deleted file]
include/asm-xtensa/bitops.h [deleted file]
include/asm-xtensa/bootparam.h [deleted file]
include/asm-xtensa/bug.h [deleted file]
include/asm-xtensa/bugs.h [deleted file]
include/asm-xtensa/byteorder.h [deleted file]
include/asm-xtensa/cache.h [deleted file]
include/asm-xtensa/cacheasm.h [deleted file]
include/asm-xtensa/cacheflush.h [deleted file]
include/asm-xtensa/checksum.h [deleted file]
include/asm-xtensa/coprocessor.h [deleted file]
include/asm-xtensa/cpumask.h [deleted file]
include/asm-xtensa/cputime.h [deleted file]
include/asm-xtensa/current.h [deleted file]
include/asm-xtensa/delay.h [deleted file]
include/asm-xtensa/device.h [deleted file]
include/asm-xtensa/div64.h [deleted file]
include/asm-xtensa/dma-mapping.h [deleted file]
include/asm-xtensa/dma.h [deleted file]
include/asm-xtensa/elf.h [deleted file]
include/asm-xtensa/emergency-restart.h [deleted file]
include/asm-xtensa/errno.h [deleted file]
include/asm-xtensa/fb.h [deleted file]
include/asm-xtensa/fcntl.h [deleted file]
include/asm-xtensa/futex.h [deleted file]
include/asm-xtensa/hardirq.h [deleted file]
include/asm-xtensa/highmem.h [deleted file]
include/asm-xtensa/hw_irq.h [deleted file]
include/asm-xtensa/io.h [deleted file]
include/asm-xtensa/ioctl.h [deleted file]
include/asm-xtensa/ioctls.h [deleted file]
include/asm-xtensa/ipcbuf.h [deleted file]
include/asm-xtensa/irq.h [deleted file]
include/asm-xtensa/irq_regs.h [deleted file]
include/asm-xtensa/kdebug.h [deleted file]
include/asm-xtensa/kmap_types.h [deleted file]
include/asm-xtensa/linkage.h [deleted file]
include/asm-xtensa/local.h [deleted file]
include/asm-xtensa/mman.h [deleted file]
include/asm-xtensa/mmu.h [deleted file]
include/asm-xtensa/mmu_context.h [deleted file]
include/asm-xtensa/module.h [deleted file]
include/asm-xtensa/msgbuf.h [deleted file]
include/asm-xtensa/mutex.h [deleted file]
include/asm-xtensa/page.h [deleted file]
include/asm-xtensa/param.h [deleted file]
include/asm-xtensa/pci-bridge.h [deleted file]
include/asm-xtensa/pci.h [deleted file]
include/asm-xtensa/percpu.h [deleted file]
include/asm-xtensa/pgalloc.h [deleted file]
include/asm-xtensa/pgtable.h [deleted file]
include/asm-xtensa/platform-iss/hardware.h [deleted file]
include/asm-xtensa/platform-iss/simcall.h [deleted file]
include/asm-xtensa/platform.h [deleted file]
include/asm-xtensa/poll.h [deleted file]
include/asm-xtensa/posix_types.h [deleted file]
include/asm-xtensa/processor.h [deleted file]
include/asm-xtensa/ptrace.h [deleted file]
include/asm-xtensa/regs.h [deleted file]
include/asm-xtensa/resource.h [deleted file]
include/asm-xtensa/rmap.h [deleted file]
include/asm-xtensa/rwsem.h [deleted file]
include/asm-xtensa/scatterlist.h [deleted file]
include/asm-xtensa/sections.h [deleted file]
include/asm-xtensa/segment.h [deleted file]
include/asm-xtensa/sembuf.h [deleted file]
include/asm-xtensa/serial.h [deleted file]
include/asm-xtensa/setup.h [deleted file]
include/asm-xtensa/shmbuf.h [deleted file]
include/asm-xtensa/shmparam.h [deleted file]
include/asm-xtensa/sigcontext.h [deleted file]
include/asm-xtensa/siginfo.h [deleted file]
include/asm-xtensa/signal.h [deleted file]
include/asm-xtensa/smp.h [deleted file]
include/asm-xtensa/socket.h [deleted file]
include/asm-xtensa/sockios.h [deleted file]
include/asm-xtensa/spinlock.h [deleted file]
include/asm-xtensa/stat.h [deleted file]
include/asm-xtensa/statfs.h [deleted file]
include/asm-xtensa/string.h [deleted file]
include/asm-xtensa/syscall.h [deleted file]
include/asm-xtensa/system.h [deleted file]
include/asm-xtensa/termbits.h [deleted file]
include/asm-xtensa/termios.h [deleted file]
include/asm-xtensa/thread_info.h [deleted file]
include/asm-xtensa/timex.h [deleted file]
include/asm-xtensa/tlb.h [deleted file]
include/asm-xtensa/tlbflush.h [deleted file]
include/asm-xtensa/topology.h [deleted file]
include/asm-xtensa/types.h [deleted file]
include/asm-xtensa/uaccess.h [deleted file]
include/asm-xtensa/ucontext.h [deleted file]
include/asm-xtensa/unaligned.h [deleted file]
include/asm-xtensa/unistd.h [deleted file]
include/asm-xtensa/user.h [deleted file]
include/asm-xtensa/variant-dc232b/core.h [deleted file]
include/asm-xtensa/variant-dc232b/tie-asm.h [deleted file]
include/asm-xtensa/variant-dc232b/tie.h [deleted file]
include/asm-xtensa/variant-fsf/core.h [deleted file]
include/asm-xtensa/variant-fsf/tie-asm.h [deleted file]
include/asm-xtensa/variant-fsf/tie.h [deleted file]
include/asm-xtensa/vga.h [deleted file]
include/asm-xtensa/xor.h [deleted file]
include/linux/atmel-mci.h [new file with mode: 0644]
include/linux/mtd/mtd.h
include/linux/ncp_fs.h
include/linux/spi/spi.h
include/linux/types.h
include/mtd/ubi-user.h
init/main.c
kernel/cpu.c
kernel/pid.c
kernel/printk.c
kernel/time/jiffies.c
lib/radix-tree.c
mm/slub.c
net/sctp/auth.c
net/sctp/sm_statefuns.c
net/sctp/socket.c
net/sctp/tsnmap.c
sound/oss/aedsp16.c
sound/usb/usx2y/usbusx2y.c

diff --git a/CREDITS b/CREDITS
index abe05a0be4ed0db849c9fc00818ee39cbd338857..61186c85d72839fb222170534477794cee0be8f7 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -1681,7 +1681,7 @@ E: ajoshi@shell.unixbox.com
 D: fbdev hacking
 
 N: Jesper Juhl
-E: jesper.juhl@gmail.com
+E: jj@chaosbits.net
 D: Various fixes, cleanups and minor features all over the tree.
 D: Wrote initial version of the hdaps driver (since passed on to others).
 S: Lemnosvej 1, 3.tv
index 2c0d631de0cf857d5f65c3a712f331fab84d0144..c11b931f8f980f53f1389f617b642bb90608df58 100644 (file)
@@ -81,8 +81,8 @@ Until this step is completed the driver cannot be unloaded.
 Also echoing either mono ,packet or init in to image_type will free up the
 memory allocated by the driver.
 
-If an user by accident executes steps 1 and 3 above without executing step 2;
-it will make the /sys/class/firmware/dell_rbu/ entries to disappear.
+If a user by accident executes steps 1 and 3 above without executing step 2;
+it will make the /sys/class/firmware/dell_rbu/ entries disappear.
 The entries can be recreated by doing the following
 echo init > /sys/devices/platform/dell_rbu/image_type
 NOTE: echoing init in image_type does not change it original value.
index aef5a9b368460d8fac070808bbe0cc08063dded7..4d184f2db0ea668e0ce6440693a61b28c202f98d 100644 (file)
@@ -74,7 +74,7 @@ a sensor.
 Notice that some banks have both a read and a write address this is how the
 uGuru determines if a read from or a write to the bank is taking place, thus
 when reading you should always use the read address and when writing the
-write address. The write address is always one (1) more then the read address.
+write address. The write address is always one (1) more than the read address.
 
 
 uGuru ready
@@ -224,7 +224,7 @@ Bit 3: Beep if alarm                                                        (RW)
 Bit 4: 1 if alarm cause measured temp is over the warning threshold    (R)
 Bit 5: 1 if alarm cause measured volt is over the max threshold                (R)
 Bit 6: 1 if alarm cause measured volt is under the min threshold       (R)
-Bit 7: Volt sensor: Shutdown if alarm persist for more then 4 seconds  (RW)
+Bit 7: Volt sensor: Shutdown if alarm persist for more than 4 seconds  (RW)
        Temp sensor: Shutdown if temp is over the shutdown threshold    (RW)
 
 *  This bit is only honored/used by the uGuru if a temp sensor is connected
@@ -293,7 +293,7 @@ Byte 0:
 Alarm behaviour for the selected sensor. A 1 enables the described behaviour.
 Bit 0: Give an alarm if measured rpm is under the min threshold        (RW)
 Bit 3: Beep if alarm                                           (RW)
-Bit 7: Shutdown if alarm persist for more then 4 seconds       (RW)
+Bit 7: Shutdown if alarm persist for more than 4 seconds       (RW)
 
 Byte 1:
 min threshold (scale as bank 0x26)
index 71f0fe1fc1b0f341996fa3fbef5c59b6af8ebd46..898b4987bb802926545700e445aef5489f480f78 100644 (file)
@@ -1475,7 +1475,7 @@ Sysfs interface changelog:
 
 0x020100:      Marker for thinkpad-acpi with hot key NVRAM polling
                support.  If you must, use it to know you should not
-               start an userspace NVRAM poller (allows to detect when
+               start a userspace NVRAM poller (allows to detect when
                NVRAM is compiled out by the user because it is
                unneeded/undesired in the first place).
 0x020101:      Marker for thinkpad-acpi with hot key NVRAM polling
index c3669a3fb4af284997fac1b5cd5a58d023a6be90..60d05eb77c6429f883d342e95de4546c50e759a2 100644 (file)
@@ -540,7 +540,7 @@ A client would issue an operation by:
      MSG_MORE should be set in msghdr::msg_flags on all but the last part of
      the request.  Multiple requests may be made simultaneously.
 
-     If a call is intended to go to a destination other then the default
+     If a call is intended to go to a destination other than the default
      specified through connect(), then msghdr::msg_name should be set on the
      first request message of that call.
 
index 839cbb71388b3a3c53e8bae57910ac2681de9dc2..c0aab985bad9ac4a159ea9f96e837bee28475291 100644 (file)
@@ -118,7 +118,7 @@ As mentioned above, main purpose of TUN/TAP driver is tunneling.
 It is used by VTun (http://vtun.sourceforge.net).
 
 Another interesting application using TUN/TAP is pipsecd
-(http://perso.enst.fr/~beyssac/pipsec/), an userspace IPSec
+(http://perso.enst.fr/~beyssac/pipsec/), a userspace IPSec
 implementation that can use complete kernel routing (unlike FreeS/WAN).
 
 3. How does Virtual network device actually work ? 
index ae3f962a7cfc544ed66b6d49d34101ec2d5b2c88..ff19a52fe004d00c1e94382964a22b5593f39607 100644 (file)
@@ -733,7 +733,7 @@ Changes from 20040920 to 20041018
          I/O completion path a little more, especially taking care of
          fast-pathing the non-error case.  Also removes tons of dead
          members and defines from lpfc_scsi.h - e.g. lpfc_target is down
-         to nothing more then the lpfc_nodelist pointer.
+         to nothing more than the lpfc_nodelist pointer.
        * Added binary sysfs file to issue mbox commands
        * Replaced #if __BIG_ENDIAN with #if __BIG_ENDIAN_BITFIELD for
          compatibility with the user space applications.
index a9f721aeb11c88fcb1d1af0b1607c6e969ef21d3..8b278c10edfd4ec36df7efa9dc2ca541ff5a1ee7 100644 (file)
@@ -19,7 +19,7 @@ Sun Sep 24 21:30 2000 Gerard Roudier (groudier@club-internet.fr)
 
 Wed Jul 26 23:30 2000 Gerard Roudier (groudier@club-internet.fr)
        * version ncr53c8xx-3.4.1
-       - Provide OpenFirmare path through the proc FS on PPC.
+       - Provide OpenFirmware path through the proc FS on PPC.
        - Remove trailing argument #2 from a couple of #undefs.
 
 Sun Jul 09 16:30 2000 Gerard Roudier (groudier@club-internet.fr)
index ef985ec348e60007b91f157f6015464ced29ac30..02ffbc1e8a8411f115f9cb591c40ae12c8dea188 100644 (file)
@@ -81,7 +81,7 @@ Sun Sep 24 21:30 2000 Gerard Roudier (groudier@club-internet.fr)
 
 Wed Jul 26 23:30 2000 Gerard Roudier (groudier@club-internet.fr)
        * version sym53c8xx-1.7.1
-       - Provide OpenFirmare path through the proc FS on PPC.
+       - Provide OpenFirmware path through the proc FS on PPC.
        - Download of on-chip SRAM using memcpy_toio() doesn't work 
          on PPC. Restore previous method (MEMORY MOVE from SCRIPTS).
        - Remove trailing argument #2 from a couple of #undefs.
index 094dd52d73093f4f96679315b0c172f368ff1780..06f8ff938c719311576c3bebc52566813b9e7603 100644 (file)
@@ -4229,9 +4229,10 @@ L:       tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
 S:     Maintained
 
 TRIVIAL PATCHES
-P:     Jesper Juhl
+P:     Jiri Kosina
 M:     trivial@kernel.org
 L:     linux-kernel@vger.kernel.org
+T:     git kernel.org:/pub/scm/linux/kernel/git/jikos/trivial.git
 S:     Maintained
 
 TTY LAYER
index f9006663f01e428ec13a39fb215914e750ab66de..c9ac008377874e012fc09d9bb0de8cf316474162 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1008,7 +1008,7 @@ define check-symlink
 endef
 
 # We create the target directory of the symlink if it does
-# not exist so the test in chack-symlink works and we have a
+# not exist so the test in check-symlink works and we have a
 # directory for generated filesas used by some architectures.
 define create-symlink
        if [ ! -L include/asm ]; then                                      \
index 26eca87f673592d78617d16279a63aceebe0589f..b189680d18b0493d7f9d12f265442563bec2f11d 100644 (file)
@@ -122,6 +122,24 @@ config BOARD_ATNGW100
        bool "ATNGW100 Network Gateway"
        select CPU_AT32AP7000
 
+config BOARD_HAMMERHEAD
+       bool "Hammerhead board"
+       select CPU_AT32AP7000
+       select USB_ARCH_HAS_HCD
+       help
+         The Hammerhead platform is built around a AVR32 32-bit microcontroller from Atmel.
+         It offers versatile peripherals, such as ethernet, usb device, usb host etc.
+
+         The board also incooperates a power supply and is a Power over Ethernet (PoE) Powered
+         Device (PD).
+
+         Additonally, a Cyclone III FPGA from Altera is integrated on the board. The FPGA is
+         mapped into the 32-bit AVR memory bus. The FPGA offers two DDR2 SDRAM interfaces, which
+         will cover even the most exceptional need of memory bandwidth. Together with the onboard
+         video decoder the board is ready for video processing.
+
+         For more information see: http://www.miromico.com/hammerhead
+
 config BOARD_FAVR_32
        bool "Favr-32 LCD-board"
        select CPU_AT32AP7000
@@ -133,6 +151,7 @@ endchoice
 
 source "arch/avr32/boards/atstk1000/Kconfig"
 source "arch/avr32/boards/atngw100/Kconfig"
+source "arch/avr32/boards/hammerhead/Kconfig"
 source "arch/avr32/boards/favr-32/Kconfig"
 
 choice
index b088e103e7530515aebaca2c7fa7c8ebc0fe1c30..f3ef3bbf797c7f3756b2ee0c5253daa3f1f3b9a1 100644 (file)
@@ -33,6 +33,7 @@ head-y                                        += arch/avr32/kernel/head.o
 core-y                                 += $(machdirs)
 core-$(CONFIG_BOARD_ATSTK1000)         += arch/avr32/boards/atstk1000/
 core-$(CONFIG_BOARD_ATNGW100)          += arch/avr32/boards/atngw100/
+core-$(CONFIG_BOARD_HAMMERHEAD)                += arch/avr32/boards/hammerhead/
 core-$(CONFIG_BOARD_FAVR_32)           += arch/avr32/boards/favr-32/
 core-$(CONFIG_BOARD_MIMC200)           += arch/avr32/boards/mimc200/
 core-$(CONFIG_LOADER_U_BOOT)           += arch/avr32/boot/u-boot/
index 32fb9ba0fbdfe40e6943b2c5bdebbfd706bd59ad..05d3722fff18e75474559bdbb4f0e8f7fb4785c0 100644 (file)
@@ -19,8 +19,8 @@
 #include <linux/types.h>
 #include <linux/leds.h>
 #include <linux/spi/spi.h>
+#include <linux/atmel-mci.h>
 
-#include <asm/atmel-mci.h>
 #include <asm/io.h>
 #include <asm/setup.h>
 
index 5c5cdf3b464fb8d99394e408ed49b700babc1ec4..1f33a106905cf9bf1d03400ddb6d116b2a51349d 100644 (file)
 #include <linux/types.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/at73c213.h>
+#include <linux/atmel-mci.h>
 
 #include <video/atmel_lcdc.h>
 
 #include <asm/io.h>
 #include <asm/setup.h>
-#include <asm/atmel-mci.h>
 
 #include <mach/at32ap700x.h>
 #include <mach/board.h>
@@ -287,23 +287,7 @@ static int __init atstk1002_init(void)
         * ATSTK1000 uses 32-bit SDRAM interface. Reserve the
         * SDRAM-specific pins so that nobody messes with them.
         */
-       at32_reserve_pin(GPIO_PIN_PE(0));       /* DATA[16]     */
-       at32_reserve_pin(GPIO_PIN_PE(1));       /* DATA[17]     */
-       at32_reserve_pin(GPIO_PIN_PE(2));       /* DATA[18]     */
-       at32_reserve_pin(GPIO_PIN_PE(3));       /* DATA[19]     */
-       at32_reserve_pin(GPIO_PIN_PE(4));       /* DATA[20]     */
-       at32_reserve_pin(GPIO_PIN_PE(5));       /* DATA[21]     */
-       at32_reserve_pin(GPIO_PIN_PE(6));       /* DATA[22]     */
-       at32_reserve_pin(GPIO_PIN_PE(7));       /* DATA[23]     */
-       at32_reserve_pin(GPIO_PIN_PE(8));       /* DATA[24]     */
-       at32_reserve_pin(GPIO_PIN_PE(9));       /* DATA[25]     */
-       at32_reserve_pin(GPIO_PIN_PE(10));      /* DATA[26]     */
-       at32_reserve_pin(GPIO_PIN_PE(11));      /* DATA[27]     */
-       at32_reserve_pin(GPIO_PIN_PE(12));      /* DATA[28]     */
-       at32_reserve_pin(GPIO_PIN_PE(13));      /* DATA[29]     */
-       at32_reserve_pin(GPIO_PIN_PE(14));      /* DATA[30]     */
-       at32_reserve_pin(GPIO_PIN_PE(15));      /* DATA[31]     */
-       at32_reserve_pin(GPIO_PIN_PE(26));      /* SDCS         */
+       at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL);
 
 #ifdef CONFIG_BOARD_ATSTK1006
        smc_set_timing(&nand_config, &nand_timing);
index 134b566630b0f62a75aad5832278c4dcf7aeac91..b3a23c88bcfe500ac7511017f62e46ad024736b9 100644 (file)
@@ -17,9 +17,9 @@
 
 #include <linux/spi/at73c213.h>
 #include <linux/spi/spi.h>
+#include <linux/atmel-mci.h>
 
 #include <asm/setup.h>
-#include <asm/atmel-mci.h>
 
 #include <mach/at32ap700x.h>
 #include <mach/board.h>
@@ -131,23 +131,7 @@ static int __init atstk1003_init(void)
         * ATSTK1000 uses 32-bit SDRAM interface. Reserve the
         * SDRAM-specific pins so that nobody messes with them.
         */
-       at32_reserve_pin(GPIO_PIN_PE(0));       /* DATA[16]     */
-       at32_reserve_pin(GPIO_PIN_PE(1));       /* DATA[17]     */
-       at32_reserve_pin(GPIO_PIN_PE(2));       /* DATA[18]     */
-       at32_reserve_pin(GPIO_PIN_PE(3));       /* DATA[19]     */
-       at32_reserve_pin(GPIO_PIN_PE(4));       /* DATA[20]     */
-       at32_reserve_pin(GPIO_PIN_PE(5));       /* DATA[21]     */
-       at32_reserve_pin(GPIO_PIN_PE(6));       /* DATA[22]     */
-       at32_reserve_pin(GPIO_PIN_PE(7));       /* DATA[23]     */
-       at32_reserve_pin(GPIO_PIN_PE(8));       /* DATA[24]     */
-       at32_reserve_pin(GPIO_PIN_PE(9));       /* DATA[25]     */
-       at32_reserve_pin(GPIO_PIN_PE(10));      /* DATA[26]     */
-       at32_reserve_pin(GPIO_PIN_PE(11));      /* DATA[27]     */
-       at32_reserve_pin(GPIO_PIN_PE(12));      /* DATA[28]     */
-       at32_reserve_pin(GPIO_PIN_PE(13));      /* DATA[29]     */
-       at32_reserve_pin(GPIO_PIN_PE(14));      /* DATA[30]     */
-       at32_reserve_pin(GPIO_PIN_PE(15));      /* DATA[31]     */
-       at32_reserve_pin(GPIO_PIN_PE(26));      /* SDCS         */
+       at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL);
 
 #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
        at32_add_device_usart(1);
index cb32eb844aa743ca69d7ff181353ad669330832d..29b35aca96cdeedb0ca5bb467c58d7576020e96c 100644 (file)
 
 #include <linux/spi/at73c213.h>
 #include <linux/spi/spi.h>
+#include <linux/atmel-mci.h>
 
 #include <video/atmel_lcdc.h>
 
 #include <asm/setup.h>
-#include <asm/atmel-mci.h>
 
 #include <mach/at32ap700x.h>
 #include <mach/board.h>
index 1ee4faf0742dba057a8dd6db0eb589e9758d5936..745c408c2ac5b0af4bdfe3c0a0b2f244e0842cd1 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/linkage.h>
 #include <linux/gpio.h>
 #include <linux/leds.h>
+#include <linux/atmel-mci.h>
 #include <linux/atmel-pwm-bl.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
@@ -79,6 +80,14 @@ static struct spi_board_info __initdata spi1_board_info[] = {
        },
 };
 
+static struct mci_platform_data __initdata mci0_data = {
+       .slot[0] = {
+               .bus_width      = 4,
+               .detect_pin     = -ENODEV,
+               .wp_pin         = -ENODEV,
+       },
+};
+
 static struct fb_videomode __initdata lb104v03_modes[] = {
        {
                .name           = "640x480 @ 50",
@@ -307,28 +316,10 @@ static int __init favr32_init(void)
         * Favr-32 uses 32-bit SDRAM interface. Reserve the SDRAM-specific
         * pins so that nobody messes with them.
         */
-       at32_reserve_pin(GPIO_PIN_PE(0));       /* DATA[16]     */
-       at32_reserve_pin(GPIO_PIN_PE(1));       /* DATA[17]     */
-       at32_reserve_pin(GPIO_PIN_PE(2));       /* DATA[18]     */
-       at32_reserve_pin(GPIO_PIN_PE(3));       /* DATA[19]     */
-       at32_reserve_pin(GPIO_PIN_PE(4));       /* DATA[20]     */
-       at32_reserve_pin(GPIO_PIN_PE(5));       /* DATA[21]     */
-       at32_reserve_pin(GPIO_PIN_PE(6));       /* DATA[22]     */
-       at32_reserve_pin(GPIO_PIN_PE(7));       /* DATA[23]     */
-       at32_reserve_pin(GPIO_PIN_PE(8));       /* DATA[24]     */
-       at32_reserve_pin(GPIO_PIN_PE(9));       /* DATA[25]     */
-       at32_reserve_pin(GPIO_PIN_PE(10));      /* DATA[26]     */
-       at32_reserve_pin(GPIO_PIN_PE(11));      /* DATA[27]     */
-       at32_reserve_pin(GPIO_PIN_PE(12));      /* DATA[28]     */
-       at32_reserve_pin(GPIO_PIN_PE(13));      /* DATA[29]     */
-       at32_reserve_pin(GPIO_PIN_PE(14));      /* DATA[30]     */
-       at32_reserve_pin(GPIO_PIN_PE(15));      /* DATA[31]     */
-       at32_reserve_pin(GPIO_PIN_PE(26));      /* SDCS         */
+       at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL);
 
        at32_select_gpio(GPIO_PIN_PB(3), 0);    /* IRQ from ADS7843 */
 
-       at32_add_system_devices();
-
        at32_add_device_usart(0);
 
        set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
@@ -339,7 +330,7 @@ static int __init favr32_init(void)
 
        at32_add_device_pwm(1 << atmel_pwm_bl_pdata.pwm_channel);
        at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
-       at32_add_device_mci(0, NULL);
+       at32_add_device_mci(0, &mci0_data);
        at32_add_device_usba(0, NULL);
        at32_add_device_lcdc(0, &favr32_lcdc_data, fbmem_start, fbmem_size, 0);
 
diff --git a/arch/avr32/boards/hammerhead/Kconfig b/arch/avr32/boards/hammerhead/Kconfig
new file mode 100644 (file)
index 0000000..fda2331
--- /dev/null
@@ -0,0 +1,43 @@
+# Hammerhead customization
+
+if BOARD_HAMMERHEAD
+
+config BOARD_HAMMERHEAD_USB
+       bool "Philips ISP116x-hcd USB support"
+       help
+         This enables USB support for Hammerheads internal ISP116x
+         controller from Philips.
+
+         Choose 'Y' here if you want to have your board USB driven.
+
+config BOARD_HAMMERHEAD_LCD
+       bool "Atmel AT91/AT32 LCD support"
+       help
+         This enables LCD support for the Hammerhead board. You may
+         also add support for framebuffer devices (AT91/AT32 LCD Controller)
+         and framebuffer console support to get the most out of your LCD.
+
+         Choose 'Y' here if you have ordered a Corona daugther board and
+         want to have support for your Hantronix HDA-351T-LV LCD.
+
+config BOARD_HAMMERHEAD_SND
+       bool "Atmel AC97 Sound support"
+       help
+         This enables Sound support for the Hammerhead board. You may
+         also go trough the ALSA settings to get it working.
+
+         Choose 'Y' here if you have ordered a Corona daugther board and
+         want to make your board funky.
+
+config BOARD_HAMMERHEAD_FPGA
+       bool "Hammerhead FPGA Support"
+       default y
+       help
+         This adds support for the Cyclone III FPGA from Altera
+         found on Miromico's Hammerhead board.
+
+         Choose 'Y' here if you want to have FPGA support enabled.
+         You will have to choose the "Hammerhead FPGA Device Support" in
+         Device Drivers->Misc to be able to use FPGA functionality.
+
+endif  # BOARD_ATNGW100
diff --git a/arch/avr32/boards/hammerhead/Makefile b/arch/avr32/boards/hammerhead/Makefile
new file mode 100644 (file)
index 0000000..c740aa1
--- /dev/null
@@ -0,0 +1 @@
+obj-y                          += setup.o flash.o
diff --git a/arch/avr32/boards/hammerhead/flash.c b/arch/avr32/boards/hammerhead/flash.c
new file mode 100644 (file)
index 0000000..a98c6dd
--- /dev/null
@@ -0,0 +1,377 @@
+/*
+ * Hammerhead board-specific flash initialization
+ *
+ * Copyright (C) 2008 Miromico AG
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/usb/isp116x.h>
+#include <linux/dma-mapping.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+
+#include <mach/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/smc.h>
+
+#include "../../mach-at32ap/clock.h"
+#include "flash.h"
+
+
+#define HAMMERHEAD_USB_PERIPH_GCLK0    0x40000000
+#define HAMMERHEAD_USB_PERIPH_CS2      0x02000000
+#define HAMMERHEAD_USB_PERIPH_EXTINT0  0x02000000
+
+#define HAMMERHEAD_FPGA_PERIPH_MOSI    0x00000002
+#define HAMMERHEAD_FPGA_PERIPH_SCK     0x00000020
+#define HAMMERHEAD_FPGA_PERIPH_EXTINT3 0x10000000
+
+static struct smc_timing flash_timing __initdata = {
+       .ncs_read_setup         = 0,
+       .nrd_setup              = 40,
+       .ncs_write_setup        = 0,
+       .nwe_setup              = 10,
+
+       .ncs_read_pulse         = 80,
+       .nrd_pulse              = 40,
+       .ncs_write_pulse        = 65,
+       .nwe_pulse              = 55,
+
+       .read_cycle             = 120,
+       .write_cycle            = 120,
+};
+
+static struct smc_config flash_config __initdata = {
+       .bus_width              = 2,
+       .nrd_controlled         = 1,
+       .nwe_controlled         = 1,
+       .byte_write             = 1,
+};
+
+static struct mtd_partition flash_parts[] = {
+       {
+               .name           = "u-boot",
+               .offset         = 0x00000000,
+               .size           = 0x00020000,           /* 128 KiB */
+               .mask_flags     = MTD_WRITEABLE,
+       },
+       {
+               .name           = "root",
+               .offset         = 0x00020000,
+               .size           = 0x007d0000,
+       },
+       {
+               .name           = "env",
+               .offset         = 0x007f0000,
+               .size           = 0x00010000,
+               .mask_flags     = MTD_WRITEABLE,
+       },
+};
+
+static struct physmap_flash_data flash_data = {
+       .width          = 2,
+       .nr_parts       = ARRAY_SIZE(flash_parts),
+       .parts          = flash_parts,
+};
+
+static struct resource flash_resource = {
+       .start          = 0x00000000,
+       .end            = 0x007fffff,
+       .flags          = IORESOURCE_MEM,
+};
+
+static struct platform_device flash_device = {
+       .name           = "physmap-flash",
+       .id             = 0,
+       .resource       = &flash_resource,
+       .num_resources  = 1,
+       .dev            = { .platform_data = &flash_data, },
+};
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_USB
+
+static struct smc_timing isp1160_timing __initdata = {
+       .ncs_read_setup         = 75,
+       .nrd_setup              = 75,
+       .ncs_write_setup        = 75,
+       .nwe_setup              = 75,
+
+
+       /* We use conservative timing settings, as the minimal settings aren't
+          stable. There may be room for tweaking. */
+       .ncs_read_pulse         = 75,  /* min. 33ns */
+       .nrd_pulse              = 75,  /* min. 33ns */
+       .ncs_write_pulse        = 75,  /* min. 26ns */
+       .nwe_pulse              = 75,  /* min. 26ns */
+
+       .read_cycle             = 225, /* min. 143ns */
+       .write_cycle            = 225, /* min. 136ns */
+};
+
+static struct smc_config isp1160_config __initdata = {
+       .bus_width              = 2,
+       .nrd_controlled         = 1,
+       .nwe_controlled         = 1,
+       .byte_write             = 0,
+};
+
+/*
+ * The platform delay function is only used to enforce the strange
+ * read to write delay. This can not be configured in the SMC. All other
+ * timings are controlled by the SMC (see timings obove)
+ * So in isp116x-hcd.c we should comment out USE_PLATFORM_DELAY
+ */
+void isp116x_delay(struct device *dev, int delay)
+{
+       if (delay > 150)
+               ndelay(delay - 150);
+}
+
+static struct  isp116x_platform_data isp1160_data = {
+       .sel15Kres              = 1,    /* use internal downstream resistors */
+       .oc_enable              = 0,    /* external overcurrent detection */
+       .int_edge_triggered     = 0,    /* interrupt is level triggered */
+       .int_act_high           = 0,    /* interrupt is active low */
+       .delay = isp116x_delay,         /* platform delay function */
+};
+
+static struct resource isp1160_resource[] = {
+       {
+               .start          = 0x08000000,
+               .end            = 0x08000001,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = 0x08000002,
+               .end            = 0x08000003,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = 64,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device isp1160_device = {
+       .name           = "isp116x-hcd",
+       .id             = 0,
+       .resource       = isp1160_resource,
+       .num_resources  = 3,
+       .dev            = {
+               .platform_data = &isp1160_data,
+       },
+};
+#endif
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_USB
+static int __init hammerhead_usbh_init(void)
+{
+       struct clk *gclk;
+       struct clk *osc;
+
+       int ret;
+
+       /* setup smc for usbh */
+       smc_set_timing(&isp1160_config, &isp1160_timing);
+       ret = smc_set_configuration(2, &isp1160_config);
+
+       if (ret < 0) {
+               printk(KERN_ERR
+                      "hammerhead: failed to set ISP1160 USBH timing\n");
+               return ret;
+       }
+
+       /* setup gclk0 to run from osc1 */
+       gclk = clk_get(NULL, "gclk0");
+       if (IS_ERR(gclk))
+               goto err_gclk;
+
+       osc = clk_get(NULL, "osc1");
+       if (IS_ERR(osc))
+               goto err_osc;
+
+       if (clk_set_parent(gclk, osc)) {
+               pr_debug("hammerhead: failed to set osc1 for USBH clock\n");
+               goto err_set_clk;
+       }
+
+       /* set clock to 6MHz */
+       clk_set_rate(gclk, 6000000);
+
+       /* and enable */
+       clk_enable(gclk);
+
+       /* select GCLK0 peripheral function */
+       at32_select_periph(GPIO_PIOA_BASE, HAMMERHEAD_USB_PERIPH_GCLK0,
+                          GPIO_PERIPH_A, 0);
+
+       /* enable CS2 peripheral function */
+       at32_select_periph(GPIO_PIOE_BASE, HAMMERHEAD_USB_PERIPH_CS2,
+                          GPIO_PERIPH_A, 0);
+
+       /* H_WAKEUP must be driven low */
+       at32_select_gpio(GPIO_PIN_PA(8), AT32_GPIOF_OUTPUT);
+
+       /* Select EXTINT0 for PB25 */
+       at32_select_periph(GPIO_PIOB_BASE, HAMMERHEAD_USB_PERIPH_EXTINT0,
+                          GPIO_PERIPH_A, 0);
+
+       /* register usbh device driver */
+       platform_device_register(&isp1160_device);
+
+ err_set_clk:
+       clk_put(osc);
+ err_osc:
+       clk_put(gclk);
+ err_gclk:
+       return ret;
+}
+#endif
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_FPGA
+static struct smc_timing fpga_timing __initdata = {
+       .ncs_read_setup         = 16,
+       .nrd_setup              = 32,
+       .ncs_read_pulse         = 48,
+       .nrd_pulse              = 32,
+       .read_cycle             = 64,
+
+       .ncs_write_setup        = 16,
+       .nwe_setup              = 16,
+       .ncs_write_pulse        = 32,
+       .nwe_pulse              = 32,
+       .write_cycle            = 64,
+};
+
+static struct smc_config fpga_config __initdata = {
+       .bus_width              = 4,
+       .nrd_controlled         = 1,
+       .nwe_controlled         = 1,
+       .byte_write             = 0,
+};
+
+static struct resource hh_fpga0_resource[] = {
+       {
+               .start          = 0xffe00400,
+               .end            = 0xffe00400 + 0x3ff,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = 4,
+               .end            = 4,
+               .flags          = IORESOURCE_IRQ,
+       },
+       {
+               .start          = 0x0c000000,
+               .end            = 0x0c000100,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = 67,
+               .end            = 67,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static u64 hh_fpga0_dma_mask = DMA_32BIT_MASK;
+static struct platform_device hh_fpga0_device = {
+       .name           = "hh_fpga",
+       .id             = 0,
+       .dev            = {
+               .dma_mask = &hh_fpga0_dma_mask,
+               .coherent_dma_mask = DMA_32BIT_MASK,
+       },
+       .resource       = hh_fpga0_resource,
+       .num_resources  = ARRAY_SIZE(hh_fpga0_resource),
+};
+
+static struct clk hh_fpga0_spi_clk = {
+       .name           = "spi_clk",
+       .dev            = &hh_fpga0_device.dev,
+       .mode           = pba_clk_mode,
+       .get_rate       = pba_clk_get_rate,
+       .index          = 1,
+};
+
+struct platform_device *__init at32_add_device_hh_fpga(void)
+{
+       /* Select peripheral functionallity for SPI SCK and MOSI */
+       at32_select_periph(GPIO_PIOB_BASE, HAMMERHEAD_FPGA_PERIPH_SCK,
+                          GPIO_PERIPH_B, 0);
+       at32_select_periph(GPIO_PIOB_BASE, HAMMERHEAD_FPGA_PERIPH_MOSI,
+                          GPIO_PERIPH_B, 0);
+
+       /* reserve all other needed gpio
+        * We have on board pull ups, so there is no need
+        * to enable gpio pull ups */
+       /* INIT_DONE (input) */
+       at32_select_gpio(GPIO_PIN_PB(0), 0);
+
+       /* nSTATUS (input) */
+       at32_select_gpio(GPIO_PIN_PB(2), 0);
+
+       /* nCONFIG (output, low) */
+       at32_select_gpio(GPIO_PIN_PB(3), AT32_GPIOF_OUTPUT);
+
+       /* CONF_DONE (input) */
+       at32_select_gpio(GPIO_PIN_PB(4), 0);
+
+       /* Select EXTINT3 for PB28 (Interrupt from FPGA) */
+       at32_select_periph(GPIO_PIOB_BASE, HAMMERHEAD_FPGA_PERIPH_EXTINT3,
+                          GPIO_PERIPH_A, 0);
+
+       /* Get our parent clock */
+       hh_fpga0_spi_clk.parent = clk_get(NULL, "pba");
+       clk_put(hh_fpga0_spi_clk.parent);
+
+       /* Register clock in at32 clock tree */
+       at32_clk_register(&hh_fpga0_spi_clk);
+
+       platform_device_register(&hh_fpga0_device);
+       return &hh_fpga0_device;
+}
+#endif
+
+/* This needs to be called after the SMC has been initialized */
+static int __init hammerhead_flash_init(void)
+{
+       int ret;
+
+       smc_set_timing(&flash_config, &flash_timing);
+       ret = smc_set_configuration(0, &flash_config);
+
+       if (ret < 0) {
+               printk(KERN_ERR "hammerhead: failed to set NOR flash timing\n");
+               return ret;
+       }
+
+       platform_device_register(&flash_device);
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_USB
+       hammerhead_usbh_init();
+#endif
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_FPGA
+       /* Setup SMC for FPGA interface */
+       smc_set_timing(&fpga_config, &fpga_timing);
+       ret = smc_set_configuration(3, &fpga_config);
+#endif
+
+
+       if (ret < 0) {
+               printk(KERN_ERR "hammerhead: failed to set FPGA timing\n");
+               return ret;
+       }
+
+       return 0;
+}
+
+device_initcall(hammerhead_flash_init);
diff --git a/arch/avr32/boards/hammerhead/flash.h b/arch/avr32/boards/hammerhead/flash.h
new file mode 100644 (file)
index 0000000..ea70c62
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef __BOARDS_HAMMERHEAD_FLASH_H
+#define __BOARDS_HAMMERHEAD_FLASH_H
+
+struct platform_device *at32_add_device_hh_fpga(void);
+
+#endif /* __BOARDS_HAMMERHEAD_FLASH_H */
diff --git a/arch/avr32/boards/hammerhead/setup.c b/arch/avr32/boards/hammerhead/setup.c
new file mode 100644 (file)
index 0000000..4d2fe82
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * Board-specific setup code for the Miromico Hammerhead board
+ *
+ * Copyright (C) 2008 Miromico AG
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/atmel-mci.h>
+#include <linux/clk.h>
+#include <linux/fb.h>
+#include <linux/etherdevice.h>
+#include <linux/i2c.h>
+#include <linux/i2c-gpio.h>
+#include <linux/init.h>
+#include <linux/linkage.h>
+#include <linux/platform_device.h>
+#include <linux/types.h>
+#include <linux/spi/spi.h>
+
+#include <video/atmel_lcdc.h>
+
+#include <linux/io.h>
+#include <asm/setup.h>
+
+#include <mach/at32ap700x.h>
+#include <mach/board.h>
+#include <mach/init.h>
+#include <mach/portmux.h>
+
+#include "../../mach-at32ap/clock.h"
+#include "flash.h"
+
+/* Oscillator frequencies. These are board-specific */
+unsigned long at32_board_osc_rates[3] = {
+       [0] = 32768,    /* 32.768 kHz on RTC osc */
+       [1] = 25000000, /* 25MHz on osc0 */
+       [2] = 12000000, /* 12 MHz on osc1 */
+};
+
+/* Initialized by bootloader-specific startup code. */
+struct tag *bootloader_tags __initdata;
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_LCD
+static struct fb_videomode __initdata hda350tlv_modes[] = {
+       {
+               .name           = "320x240 @ 75",
+               .refresh        = 75,
+               .xres           = 320,
+               .yres           = 240,
+               .pixclock       = KHZ2PICOS(6891),
+
+               .left_margin    = 48,
+               .right_margin   = 18,
+               .upper_margin   = 18,
+               .lower_margin   = 4,
+               .hsync_len      = 20,
+               .vsync_len      = 2,
+
+               .sync           = 0,
+               .vmode          = FB_VMODE_NONINTERLACED,
+       },
+};
+
+static struct fb_monspecs __initdata hammerhead_hda350t_monspecs = {
+       .manufacturer           = "HAN",
+       .monitor                = "HDA350T-LV",
+       .modedb                 = hda350tlv_modes,
+       .modedb_len             = ARRAY_SIZE(hda350tlv_modes),
+       .hfmin                  = 14900,
+       .hfmax                  = 22350,
+       .vfmin                  = 60,
+       .vfmax                  = 90,
+       .dclkmax                = 10000000,
+};
+
+struct atmel_lcdfb_info __initdata hammerhead_lcdc_data = {
+       .default_bpp            = 24,
+       .default_dmacon         = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
+       .default_lcdcon2        = (ATMEL_LCDC_DISTYPE_TFT
+                                  | ATMEL_LCDC_INVCLK
+                                  | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE
+                                  | ATMEL_LCDC_MEMOR_BIG),
+       .default_monspecs       = &hammerhead_hda350t_monspecs,
+       .guard_time             = 2,
+};
+#endif
+
+static struct mci_platform_data __initdata mci0_data = {
+       .slot[0] = {
+               .bus_width      = 4,
+               .detect_pin     = -ENODEV,
+               .wp_pin         = -ENODEV,
+       },
+};
+
+struct eth_addr {
+       u8 addr[6];
+};
+
+static struct eth_addr __initdata hw_addr[1];
+static struct eth_platform_data __initdata eth_data[1];
+
+/*
+ * The next two functions should go away as the boot loader is
+ * supposed to initialize the macb address registers with a valid
+ * ethernet address. But we need to keep it around for a while until
+ * we can be reasonably sure the boot loader does this.
+ *
+ * The phy_id is ignored as the driver will probe for it.
+ */
+static int __init parse_tag_ethernet(struct tag *tag)
+{
+       int i = tag->u.ethernet.mac_index;
+
+       if (i < ARRAY_SIZE(hw_addr))
+               memcpy(hw_addr[i].addr, tag->u.ethernet.hw_address,
+                      sizeof(hw_addr[i].addr));
+
+       return 0;
+}
+__tagtable(ATAG_ETHERNET, parse_tag_ethernet);
+
+static void __init set_hw_addr(struct platform_device *pdev)
+{
+       struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       const u8 *addr;
+       void __iomem *regs;
+       struct clk *pclk;
+
+       if (!res)
+               return;
+
+       if (pdev->id >= ARRAY_SIZE(hw_addr))
+               return;
+
+       addr = hw_addr[pdev->id].addr;
+
+       if (!is_valid_ether_addr(addr))
+               return;
+
+       /*
+        * Since this is board-specific code, we'll cheat and use the
+        * physical address directly as we happen to know that it's
+        * the same as the virtual address.
+        */
+       regs = (void __iomem __force *)res->start;
+       pclk = clk_get(&pdev->dev, "pclk");
+
+       if (!pclk)
+               return;
+
+       clk_enable(pclk);
+
+       __raw_writel((addr[3] << 24) | (addr[2] << 16) | (addr[1] << 8) |
+                    addr[0], regs + 0x98);
+       __raw_writel((addr[5] << 8) | addr[4], regs + 0x9c);
+
+       clk_disable(pclk);
+       clk_put(pclk);
+}
+
+void __init setup_board(void)
+{
+       at32_map_usart(1, 0);   /* USART 1: /dev/ttyS0, DB9 */
+       at32_setup_serial_console(0);
+}
+
+static struct i2c_gpio_platform_data i2c_gpio_data = {
+       .sda_pin                = GPIO_PIN_PA(6),
+       .scl_pin                = GPIO_PIN_PA(7),
+       .sda_is_open_drain      = 1,
+       .scl_is_open_drain      = 1,
+       .udelay                 = 2,    /* close to 100 kHz */
+};
+
+static struct platform_device i2c_gpio_device = {
+       .name           = "i2c-gpio",
+       .id             = 0,
+       .dev            = { .platform_data = &i2c_gpio_data, },
+};
+
+static struct i2c_board_info __initdata i2c_info[] = {};
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_SND
+static struct ac97c_platform_data ac97c_data = {
+       .reset_pin = GPIO_PIN_PA(16),
+};
+#endif
+
+static int __init hammerhead_init(void)
+{
+       /*
+        * Hammerhead uses 32-bit SDRAM interface. Reserve the
+        * SDRAM-specific pins so that nobody messes with them.
+        */
+       at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL);
+
+       at32_add_device_usart(0);
+
+       /* Reserve PB29 (GCLK3). This pin is used as clock source
+        * for ETH PHY (25MHz). GCLK3 setup is done by U-Boot.
+        */
+       at32_reserve_pin(GPIO_PIOB_BASE, (1<<29));
+
+       /*
+        * Hammerhead uses only one ethernet port, so we don't set
+        * address of second port
+        */
+       set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_FPGA
+       at32_add_device_hh_fpga();
+#endif
+       at32_add_device_mci(0, &mci0_data);
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_USB
+       at32_add_device_usba(0, NULL);
+#endif
+#ifdef CONFIG_BOARD_HAMMERHEAD_LCD
+       at32_add_device_lcdc(0, &hammerhead_lcdc_data, fbmem_start,
+                            fbmem_size, ATMEL_LCDC_PRI_24BIT);
+#endif
+
+       at32_select_gpio(i2c_gpio_data.sda_pin,
+                        AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT |
+                        AT32_GPIOF_HIGH);
+       at32_select_gpio(i2c_gpio_data.scl_pin,
+                        AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT |
+                        AT32_GPIOF_HIGH);
+       platform_device_register(&i2c_gpio_device);
+       i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info));
+
+#ifdef CONFIG_BOARD_HAMMERHEAD_SND
+       at32_add_device_ac97c(0, &ac97c_data);
+#endif
+
+       /* Select the Touchscreen interrupt pin mode */
+       at32_select_periph(GPIO_PIOB_BASE, 0x08000000, GPIO_PERIPH_A, 0);
+
+       return 0;
+}
+
+postcore_initcall(hammerhead_init);
index 397cbb8f44c892071cd8470dffc3231b9a82ae48..2b58d61f0afc3ad8cab3f2925f80bbc253d9a43b 100644 (file)
@@ -24,7 +24,7 @@ extern struct atmel_lcdfb_info mimc200_lcdc_data;
 #include <video/atmel_lcdc.h>
 #include <linux/fb.h>
 
-#include <asm/atmel-mci.h>
+#include <linux/atmel-mci.h>
 #include <linux/io.h>
 #include <asm/setup.h>
 
@@ -207,8 +207,6 @@ static int __init mimc200_init(void)
         * reserve any pins for it.
         */
 
-       at32_add_system_devices();
-
        at32_add_device_usart(0);
        at32_add_device_usart(1);
        at32_add_device_usart(2);
index 541520912c55f824e7eaf2270985dc757ca471e9..164e2814ae78704911da265b9d6d1bb44538f27a 100644 (file)
@@ -892,7 +892,7 @@ CONFIG_DMA_ENGINE=y
 # DMA Clients
 #
 # CONFIG_NET_DMA is not set
-CONFIG_DMATEST=m
+# CONFIG_DMATEST is not set
 # CONFIG_UIO is not set
 
 #
index 69fce6b6a7838424008cd385c618f6467cbdae73..c9dc64832a1934d7f278391553d481351ed7001a 100644 (file)
@@ -964,7 +964,7 @@ CONFIG_DMA_ENGINE=y
 # DMA Clients
 #
 # CONFIG_NET_DMA is not set
-CONFIG_DMATEST=m
+# CONFIG_DMATEST is not set
 # CONFIG_UIO is not set
 
 #
index 5477ed3183b4e1ba5dfd92490a70e186728502a1..29ea1327b498b617adc62bdcb31268bc92d8db73 100644 (file)
@@ -882,7 +882,7 @@ CONFIG_DMA_ENGINE=y
 # DMA Clients
 #
 # CONFIG_NET_DMA is not set
-CONFIG_DMATEST=m
+# CONFIG_DMATEST is not set
 # CONFIG_UIO is not set
 
 #
index 6c45a3b77aa3a877dc327ae0b978c7b42cae2d07..361c31c2af1025849822c3b9a9b3d251958676d1 100644 (file)
@@ -1014,7 +1014,7 @@ CONFIG_DMA_ENGINE=y
 # DMA Clients
 #
 # CONFIG_NET_DMA is not set
-CONFIG_DMATEST=m
+# CONFIG_DMATEST is not set
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 CONFIG_STAGING_EXCLUDE_BUILD=y
diff --git a/arch/avr32/configs/hammerhead_defconfig b/arch/avr32/configs/hammerhead_defconfig
new file mode 100644 (file)
index 0000000..0d3d298
--- /dev/null
@@ -0,0 +1,1467 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27
+# Tue Dec  9 15:37:30 2008
+#
+CONFIG_AVR32=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_BASE_FULL is not set
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=m
+CONFIG_HAVE_OPROFILE=y
+CONFIG_KPROBES=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_CLK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=1
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
+
+#
+# System Type and features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_SUBARCH_AVR32B=y
+CONFIG_MMU=y
+CONFIG_PERFORMANCE_COUNTERS=y
+CONFIG_PLATFORM_AT32AP=y
+CONFIG_CPU_AT32AP700X=y
+CONFIG_CPU_AT32AP7000=y
+# CONFIG_BOARD_ATSTK1000 is not set
+# CONFIG_BOARD_ATNGW100 is not set
+CONFIG_BOARD_HAMMERHEAD=y
+# CONFIG_BOARD_FAVR_32 is not set
+# CONFIG_BOARD_MIMC200 is not set
+CONFIG_BOARD_HAMMERHEAD_USB=y
+CONFIG_BOARD_HAMMERHEAD_LCD=y
+CONFIG_BOARD_HAMMERHEAD_SND=y
+# CONFIG_BOARD_HAMMERHEAD_FPGA is not set
+CONFIG_LOADER_U_BOOT=y
+
+#
+# Atmel AVR32 AP options
+#
+# CONFIG_AP700X_32_BIT_SMC is not set
+CONFIG_AP700X_16_BIT_SMC=y
+# CONFIG_AP700X_8_BIT_SMC is not set
+CONFIG_LOAD_ADDRESS=0x10000000
+CONFIG_ENTRY_ADDRESS=0x90000000
+CONFIG_PHYS_OFFSET=0x10000000
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_QUICKLIST=y
+# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
+# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
+# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_NR_QUICK=2
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+# CONFIG_OWNERSHIP_TRACE is not set
+# CONFIG_NMI_DEBUGGING is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_SCHED_HRTICK=y
+CONFIG_CMDLINE=""
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+# CONFIG_CPU_FREQ_STAT is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_AT32AP=y
+
+#
+# Bus options
+#
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=y
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=y
+CONFIG_NET_KEY=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_MULTIPLE_TABLES is not set
+# CONFIG_IP_ROUTE_MULTIPATH is not set
+# CONFIG_IP_ROUTE_VERBOSE is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+# CONFIG_IP_PIMSM_V2 is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=y
+CONFIG_INET_ESP=y
+CONFIG_INET_IPCOMP=y
+CONFIG_INET_XFRM_TUNNEL=y
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+# CONFIG_NETFILTER_ADVANCED is not set
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_XTABLES=y
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_DEFRAG_IPV4=m
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+# CONFIG_IP_NF_TARGET_ULOG is not set
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+# CONFIG_NF_NAT_TFTP is not set
+# CONFIG_NF_NAT_AMANDA is not set
+# CONFIG_NF_NAT_PPTP is not set
+# CONFIG_NF_NAT_H323 is not set
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET 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_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NET_TCPPROBE is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_OLD_REGULATORY is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x80000000
+CONFIG_MTD_PHYSMAP_LEN=0x0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+# CONFIG_MTD_DATAFLASH_OTP is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ATMEL_PWM is not set
+CONFIG_ATMEL_TCLIB=y
+CONFIG_ATMEL_TCB_CLKSRC=y
+CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ATMEL_SSC is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+CONFIG_MACB=y
+# CONFIG_ENC28J60 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=m
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_AT32PSIF is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_SERIAL_ATMEL_PDC=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=m
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_GPIO=m
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_ATMEL=y
+# CONFIG_SPI_BITBANG is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+CONFIG_SPI_SPIDEV=m
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_AT32AP700X_WDT=y
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_ATMEL=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_LOGO is not set
+CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_SEQUENCER=m
+# CONFIG_SND_SEQ_DUMMY is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+CONFIG_SND_SPI=y
+CONFIG_SND_USB=y
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+# CONFIG_SND_SOC is not set
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=m
+CONFIG_HID_APPLE=m
+CONFIG_HID_BELKIN=m
+CONFIG_HID_BRIGHT=m
+CONFIG_HID_CHERRY=m
+CONFIG_HID_CHICONY=m
+CONFIG_HID_CYPRESS=m
+CONFIG_HID_DELL=m
+CONFIG_HID_EZKEY=m
+CONFIG_HID_GYRATION=m
+CONFIG_HID_LOGITECH=m
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=m
+CONFIG_HID_MONTEREY=m
+CONFIG_HID_PANTHERLORD=m
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=m
+CONFIG_HID_SAMSUNG=m
+CONFIG_HID_SONY=m
+CONFIG_HID_SUNPLUS=m
+CONFIG_THRUSTMASTER_FF=m
+CONFIG_ZEROPLUS_FF=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_ISP116X_HCD=m
+# CONFIG_USB_ISP1760_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+CONFIG_USB_GADGET_ATMEL_USBA=y
+CONFIG_USB_ATMEL_USBA=y
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+# CONFIG_USB_CDC_COMPOSITE is not set
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+CONFIG_MMC_ATMELMCI=m
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_AT32AP700X=y
+# CONFIG_DMADEVICES is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_DNOTIFY is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=850
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 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_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+# 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_ASCII is not set
+CONFIG_NLS_ISO8859_1=m
+# 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=m
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_KPROBES_SANITY_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_LKDTM is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_AUTHENC=y
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+CONFIG_CRYPTO_SHA1=y
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=y
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_CRC7=m
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/arch/avr32/include/asm/atmel-mci.h b/arch/avr32/include/asm/atmel-mci.h
deleted file mode 100644 (file)
index 59f3fad..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef __ASM_AVR32_ATMEL_MCI_H
-#define __ASM_AVR32_ATMEL_MCI_H
-
-#define ATMEL_MCI_MAX_NR_SLOTS 2
-
-struct dma_slave;
-
-/**
- * struct mci_slot_pdata - board-specific per-slot configuration
- * @bus_width: Number of data lines wired up the slot
- * @detect_pin: GPIO pin wired to the card detect switch
- * @wp_pin: GPIO pin wired to the write protect sensor
- *
- * If a given slot is not present on the board, @bus_width should be
- * set to 0. The other fields are ignored in this case.
- *
- * Any pins that aren't available should be set to a negative value.
- *
- * Note that support for multiple slots is experimental -- some cards
- * might get upset if we don't get the clock management exactly right.
- * But in most cases, it should work just fine.
- */
-struct mci_slot_pdata {
-       unsigned int            bus_width;
-       int                     detect_pin;
-       int                     wp_pin;
-};
-
-/**
- * struct mci_platform_data - board-specific MMC/SDcard configuration
- * @dma_slave: DMA slave interface to use in data transfers, or NULL.
- * @slot: Per-slot configuration data.
- */
-struct mci_platform_data {
-       struct dma_slave        *dma_slave;
-       struct mci_slot_pdata   slot[ATMEL_MCI_MAX_NR_SLOTS];
-};
-
-#endif /* __ASM_AVR32_ATMEL_MCI_H */
index ca4f9542365afdd27a061ca22e12448afd0a6a46..f930ce28680301776264d8b0bda29b388ea532cd 100644 (file)
@@ -6,6 +6,7 @@ enum die_val {
        DIE_BREAKPOINT,
        DIE_SSTEP,
        DIE_NMI,
+       DIE_OOPS,
 };
 
 #endif /* __ASM_AVR32_KDEBUG_H */
diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
new file mode 100644 (file)
index 0000000..483d666
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * syscalls.h - Linux syscall interfaces (arch-specific)
+ *
+ * Copyright (c) 2008 Jaswinder Singh
+ *
+ * This file is released under the GPLv2.
+ * See the file COPYING for more details.
+ */
+
+#ifndef _ASM_AVR32_SYSCALLS_H
+#define _ASM_AVR32_SYSCALLS_H
+
+#include <linux/compiler.h>
+#include <linux/linkage.h>
+#include <linux/types.h>
+#include <linux/signal.h>
+
+/* kernel/process.c */
+asmlinkage int sys_fork(struct pt_regs *);
+asmlinkage int sys_clone(unsigned long, unsigned long,
+                        unsigned long, unsigned long,
+                        struct pt_regs *);
+asmlinkage int sys_vfork(struct pt_regs *);
+asmlinkage int sys_execve(char __user *, char __user *__user *,
+                         char __user *__user *, struct pt_regs *);
+
+/* kernel/signal.c */
+asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *,
+                              struct pt_regs *);
+asmlinkage int sys_rt_sigreturn(struct pt_regs *);
+
+/* kernel/sys_avr32.c */
+asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
+                         unsigned long, unsigned long, off_t);
+
+/* mm/cache.c */
+asmlinkage int sys_cacheflush(int, void __user *, size_t);
+
+#endif /* _ASM_AVR32_SYSCALLS_H */
index 134d5302b6dd21fda7f676a9bdfa3923b19e5998..43ae555ecb33995e906d3b4f5567197893b08ce9 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <asm/sysreg.h>
 #include <asm/ocd.h>
+#include <asm/syscalls.h>
 
 #include <mach/pm.h>
 
index c5b11f9067f104bf7dafca6e3bbb1ac89a38bc4f..803d7be0938f07fe96db54761e4a442f03689a4d 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/ucontext.h>
+#include <asm/syscalls.h>
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
index 8e8911e55c8f27a9a55acfa7025b1d6322aba6b1..5d2daeaf356f73331489d5e21a8be7e440cb6a45 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <asm/mman.h>
 #include <asm/uaccess.h>
+#include <asm/syscalls.h>
 
 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
                          unsigned long prot, unsigned long flags,
index 066252eebf614e98ffb96c1c58705cbb9e35840b..ea7bc1e8562be302f7d75be16bb8844ca52e3510 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/gpio.h>
 #include <linux/spi/spi.h>
 #include <linux/usb/atmel_usba_udc.h>
+#include <linux/atmel-mci.h>
 
-#include <asm/atmel-mci.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 
@@ -421,7 +421,7 @@ static unsigned long hsb_clk_get_rate(struct clk *clk)
        return bus_clk_get_rate(clk, shift);
 }
 
-static void pba_clk_mode(struct clk *clk, int enabled)
+void pba_clk_mode(struct clk *clk, int enabled)
 {
        unsigned long flags;
        u32 mask;
@@ -436,7 +436,7 @@ static void pba_clk_mode(struct clk *clk, int enabled)
        spin_unlock_irqrestore(&pm_lock, flags);
 }
 
-static unsigned long pba_clk_get_rate(struct clk *clk)
+unsigned long pba_clk_get_rate(struct clk *clk)
 {
        unsigned long cksel, shift = 0;
 
index 623bf0e9a1e7a843ff66c02ed0aa4961dc3b784d..4c7ebbdc6dfae08deb08a6ce39ee2d460ea4a3bf 100644 (file)
@@ -30,3 +30,6 @@ struct clk {
        u16             users;          /* Enabled if non-zero */
        u16             index;          /* Sibling index */
 };
+
+unsigned long pba_clk_get_rate(struct clk *clk);
+void pba_clk_mode(struct clk *clk, int enabled);
index a77d372f6f3ea8660ffeec96cc31b52381a04b77..5c4c971eed8e217c23da6127dfa791de982f599e 100644 (file)
 
 #define ATMEL_LCDC_ALT_15BIT   (ATMEL_LCDC_CONTROL | ATMEL_LCDC_ALT_15B_DATA)
 
+/* Bitmask for all EBI data (D16..D31) pins on port E */
+#define ATMEL_EBI_PE_DATA_ALL  (0x0000FFFF)
+
 #endif /* __ASM_ARCH_AT32AP700X_H__ */
index 21c79373b53f04dae129e8a3907638f180577b7e..4873024e3b961b9277d547a6e544003757e2961f 100644 (file)
@@ -25,6 +25,6 @@ void at32_select_periph(unsigned int port, unsigned int pin,
                        unsigned int periph, unsigned long flags);
 void at32_select_gpio(unsigned int pin, unsigned long flags);
 void at32_deselect_pin(unsigned int pin);
-void at32_reserve_pin(unsigned int pin);
+void at32_reserve_pin(unsigned int port, u32 pin_mask);
 
 #endif /* __ASM_ARCH_PORTMUX_H__ */
index ed81a8bcb22d44ffa733beed2b43119caca29036..09a274c9d0b72a5b336478280d4c5d9df5ec2df5 100644 (file)
@@ -167,22 +167,29 @@ void at32_deselect_pin(unsigned int pin)
 }
 
 /* Reserve a pin, preventing anyone else from changing its configuration. */
-void __init at32_reserve_pin(unsigned int pin)
+void __init at32_reserve_pin(unsigned int port, u32 pin_mask)
 {
        struct pio_device *pio;
-       unsigned int pin_index = pin & 0x1f;
 
-       pio = gpio_to_pio(pin);
+       /* assign and verify pio */
+       pio = gpio_to_pio(port);
        if (unlikely(!pio)) {
-               printk("pio: invalid pin %u\n", pin);
+               printk(KERN_WARNING "pio: invalid port %u\n", port);
                goto fail;
        }
 
-       if (unlikely(test_and_set_bit(pin_index, &pio->pinmux_mask))) {
-               printk("%s: pin %u is busy\n", pio->name, pin_index);
+       /* Test if any of the requested pins is already muxed */
+       spin_lock(&pio_lock);
+       if (unlikely(pio->pinmux_mask & pin_mask)) {
+               printk(KERN_WARNING "%s: pin(s) busy (req. 0x%x, busy 0x%x)\n",
+                      pio->name, pin_mask, pio->pinmux_mask & pin_mask);
+               spin_unlock(&pio_lock);
                goto fail;
        }
 
+       /* Reserve pins */
+       pio->pinmux_mask |= pin_mask;
+       spin_unlock(&pio_lock);
        return;
 
 fail:
index 15a4e5e142c161aeae51f61187f5f370c0e130e1..24a74d1ca7d9a73c77d77792402a1b12b65d7c89 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/cachectl.h>
 #include <asm/processor.h>
 #include <asm/uaccess.h>
+#include <asm/syscalls.h>
 
 /*
  * If you attempt to flush anything more than this, you need superuser
index fa92ff6d95f751f341d1ec4b3c1b5f643e2b2e82..e819fa69a90ea3d03e3aabae8b8009fe863009a7 100644 (file)
@@ -97,7 +97,6 @@ void __init paging_init(void)
 
        mem_map = NODE_DATA(0)->node_mem_map;
 
-       memset(zero_page, 0, PAGE_SIZE);
        empty_zero_page = virt_to_page(zero_page);
        flush_dcache_page(empty_zero_page);
 }
index b795a207742cd4ff557cc6b06a154a083b62bfd9..1c5afaeb9504e167a7e5cc666bfa80db74334190 100644 (file)
@@ -105,7 +105,7 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
  * Extracts ebp, esp and eip values understandable by gdb from the values
  * saved by switch_to.
  * thread.esp points to ebp. flags and ebp are pushed in switch_to hence esp
- * prior to entering switch_to is 8 greater then the value that is saved.
+ * prior to entering switch_to is 8 greater than the value that is saved.
  * If switch_to changes, change following code appropriately.
  */
 void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
index da7d2be000bae4c36730c47b4d2b1af7f07baade..372d0ca6efbc66cfb98fafd6720e57044dc7bcd9 100644 (file)
@@ -456,7 +456,7 @@ give_sigsegv:
        return -EFAULT;
 }
 
-/* Invoke a singal handler to, well, handle the signal. */
+/* Invoke a signal handler to, well, handle the signal. */
 static inline int
 handle_signal(int canrestart, unsigned long sig,
              siginfo_t *info, struct k_sigaction *ka,
index 097b84d54e731c6ad7a0b27f9ac081ee0a4e67b8..f90be51b1123fe12199da46e019c5c20f0b2b371 100644 (file)
@@ -434,7 +434,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
        /*
         * It is possible to have multiple instances associated with a given
         * task either because an multiple functions in the call path
-        * have a return probe installed on them, and/or more then one return
+        * have a return probe installed on them, and/or more than one return
         * return probe was registered for a target function.
         *
         * We can handle this because:
index c825bde17cb363ac510bc28b83deb631fada8e8c..fb87c08c6b57b5ca5fa126d615c93768b8e0ce7c 100644 (file)
@@ -303,7 +303,7 @@ config M68KFPU_EMU_EXTRAPREC
          correct rounding, the emulator can (often) do the same but this
          extra calculation can cost quite some time, so you can disable
          it here. The emulator will then "only" calculate with a 64 bit
-         mantissa and round slightly incorrect, what is more then enough
+         mantissa and round slightly incorrect, what is more than enough
          for normal usage.
 
 config M68KFPU_EMU_ONLY
index 6d813de2baf183472f9a95379505e602508845c7..184acc90808dd22f591f314d62c713ca9a325677 100644 (file)
@@ -401,7 +401,7 @@ static inline void do_040writebacks(struct frame *fp)
  * called from sigreturn(), must ensure userspace code didn't
  * manipulate exception frame to circumvent protection, then complete
  * pending writebacks
- * we just clear TM2 to turn it into an userspace access
+ * we just clear TM2 to turn it into a userspace access
  */
 asmlinkage void berr_040cleanup(struct frame *fp)
 {
index 97862f45496d76ce0aa72c349182b53b5a895811..caf5e9a0acc77de5b2ff40ac22aaf9615e2005db 100644 (file)
@@ -148,7 +148,7 @@ int read_eeprom(char *buffer, int eeprom_size, int size)
        send_byte(W_HEADER);
        recv_ack();
 
-       /* EEPROM with size of more then 2K need two byte addressing */
+       /* EEPROM with size of more than 2K need two byte addressing */
        if (eeprom_size > 2048) {
                send_byte(0x00);
                recv_ack();
index f32829937aad4a8a60ed5aa521d94537cfd10510..ab6dda37243870f782572c1a5d2502413d0ea528 100644 (file)
@@ -208,7 +208,7 @@ image-$(CONFIG_DEFAULT_UIMAGE)              += uImage
 #
 # Theses are default targets to build images which embed device tree blobs.
 # They are only required on boards which do not have FDT support in firmware.
-# Boards with newish u-boot firmare can use the uImage target above
+# Boards with newish u-boot firmware can use the uImage target above
 #
 
 # Board ports in arch/powerpc/platform/40x/Kconfig
index 989edcdf0297fbf5d2ec03539e000b3a01c98d5d..c9329786073b2295d53cf7707abc21ded2f0a9a0 100644 (file)
@@ -317,7 +317,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
        /*
         * It is possible to have multiple instances associated with a given
         * task either because an multiple functions in the call path
-        * have a return probe installed on them, and/or more then one return
+        * have a return probe installed on them, and/or more than one return
         * return probe was registered for a target function.
         *
         * We can handle this because:
index dd499c3e9da769cb87109b910d3b8b36c79137a1..83faa958b9d4d3d353596b55c6a51eee5452ea52 100644 (file)
@@ -49,7 +49,7 @@ void set_spu_profiling_frequency(unsigned int freq_khz, unsigned int cycles_rese
         * of precision.  This is close enough for the purpose at hand.
         *
         * The value of the timeout should be small enough that the hw
-        * trace buffer will not get more then about 1/3 full for the
+        * trace buffer will not get more than about 1/3 full for the
         * maximum user specified (the LFSR value) hw sampling frequency.
         * This is to ensure the trace buffer will never fill even if the
         * kernel thread scheduling varies under a heavy system load.
index 19577aeffd7b42799eb576d4f882fcc969a28ae2..a94a3c3ae9328ea2ab94a8534f5d1658eed1db97 100644 (file)
@@ -299,7 +299,7 @@ config WARN_STACK
          This option enables the compiler options -mwarn-framesize and
          -mwarn-dynamicstack. If the compiler supports these options it
          will generate warnings for function which either use alloca or
-         create a stack frame bigger then CONFIG_WARN_STACK_SIZE.
+         create a stack frame bigger than CONFIG_WARN_STACK_SIZE.
 
          Say N if you are unsure.
 
index 9b92856632cfdf3b44914db277adba0c09311a61..a01cf0284db2dc20b2ab7b9e6e0d299074410a49 100644 (file)
@@ -382,7 +382,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
        /*
         * It is possible to have multiple instances associated with a given
         * task either because an multiple functions in the call path
-        * have a return probe installed on them, and/or more then one return
+        * have a return probe installed on them, and/or more than one return
         * return probe was registered for a target function.
         *
         * We can handle this because:
index 201a6e547e4aa0d256d062d251525c30ca49ea8f..3bc6527c95af3ec3bec6f6c3397d46437d72aee5 100644 (file)
@@ -517,7 +517,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
        /*
         * It is possible to have multiple instances associated with a given
         * task either because an multiple functions in the call path
-        * have a return probe installed on them, and/or more then one return
+        * have a return probe installed on them, and/or more than one return
         * return probe was registered for a target function.
         *
         * We can handle this because:
index eead6f8f921850ce3c4fcc4ef3e5b6a2b8aaecc5..884d985b8b8223a0df4c566b29ed0d47204e8453 100644 (file)
@@ -695,7 +695,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs)
        /*
         * It is possible to have multiple instances associated with a given
         * task either because multiple functions in the call path have
-        * return probes installed on them, and/or more then one
+        * return probes installed on them, and/or more than one
         * return probe was registered for a target function.
         *
         * We can handle this because:
index c12314c9e86fd512367a588646770ea0c4149a5c..8815f3c7fec75e5d4a4d1cb17609ef0eed004515 100644 (file)
@@ -252,7 +252,7 @@ EXPORT_SYMBOL_GPL(geode_mfgpt_alloc_timer);
 /*
  * The MFPGT timers on the CS5536 provide us with suitable timers to use
  * as clock event sources - not as good as a HPET or APIC, but certainly
- * better then the PIT.  This isn't a general purpose MFGPT driver, but
+ * better than the PIT.  This isn't a general purpose MFGPT driver, but
  * a simplified one designed specifically to act as a clock event source.
  * For full details about the MFGPT, please consult the CS5536 data sheet.
  */
index 015b6b2a26b96676eadbae477d68ea4e82ebf340..1da55fe4beff5062cd398fb13b8b25b7d0879410 100644 (file)
@@ -33,6 +33,15 @@ KBUILD_CFLAGS += -ffreestanding
 
 KBUILD_CFLAGS += -pipe -mlongcalls
 
+vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
+plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))
+
+ifeq ($(KBUILD_SRC),)
+KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(vardirs) $(plfdirs))
+else
+KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs))
+endif
+
 KBUILD_DEFCONFIG := iss_defconfig
 
 # ramdisk/initrd support
@@ -66,21 +75,6 @@ libs-y               += arch/xtensa/lib/ $(LIBGCC)
 
 boot           := arch/xtensa/boot
 
-archinc                := include/asm-xtensa
-
-archprepare: $(archinc)/.platform
-
-# Update processor variant and platform symlinks if something which affects
-# them changed.
-
-$(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
-       @echo '  SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
-       $(Q)mkdir -p $(archinc)
-       $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
-       @echo '  SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
-       $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
-       @touch $@
-
 
 all: zImage
 
@@ -89,10 +83,6 @@ bzImage : zImage
 zImage zImage.initrd: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
 
-CLEAN_FILES    += arch/xtensa/vmlinux.lds                      \
-                  $(archinc)/platform $(archinc)/variant       \
-                  $(archinc)/.platform
-
 define archhelp
   @echo '* zImage      - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
 endef
index 849dfcafd5184a2f1014d153a044c052ff0bc5cc..4e53b74dc44b67f7e873eccae36a1152b3157c94 100644 (file)
@@ -1,4 +1,4 @@
-#include <asm/variant/core.h>
+#include <variant/core.h>
 OUTPUT_ARCH(xtensa)
 ENTRY(_ResetVector)
 
index 84848123e2a8af6d147abb9e78a2b6bbfe372bb6..5582e8cfac8f5162b4113ef286d6cc04d9d10592 100644 (file)
@@ -1,4 +1,4 @@
-#include <asm/variant/core.h>
+#include <variant/core.h>
 #include <asm/regs.h>
 #include <asm/asmmacro.h>
 #include <asm/cacheasm.h>
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
new file mode 100644 (file)
index 0000000..c68e168
--- /dev/null
@@ -0,0 +1 @@
+include include/asm-generic/Kbuild.asm
diff --git a/arch/xtensa/include/asm/asmmacro.h b/arch/xtensa/include/asm/asmmacro.h
new file mode 100644 (file)
index 0000000..755320f
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * include/asm-xtensa/asmmacro.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_ASMMACRO_H
+#define _XTENSA_ASMMACRO_H
+
+#include <variant/core.h>
+
+/*
+ * Some little helpers for loops. Use zero-overhead-loops
+ * where applicable and if supported by the processor.
+ *
+ * __loopi ar, at, size, inc
+ *         ar  register initialized with the start address
+ *        at   scratch register used by macro
+ *        size size immediate value
+ *        inc  increment
+ *
+ * __loops ar, as, at, inc_log2[, mask_log2][, cond][, ncond]
+ *        ar   register initialized with the start address
+ *        as   register initialized with the size
+ *        at   scratch register use by macro
+ *        inc_log2     increment [in log2]
+ *        mask_log2    mask [in log2]
+ *        cond         true condition (used in loop'cond')
+ *        ncond        false condition (used in b'ncond')
+ *
+ * __loop  as
+ *        restart loop. 'as' register must not have been modified!
+ *
+ * __endla ar, at, incr
+ *        ar   start address (modified)
+ *        as   scratch register used by macro
+ *        inc  increment
+ */
+
+/*
+ * loop for given size as immediate
+ */
+
+       .macro  __loopi ar, at, size, incr
+
+#if XCHAL_HAVE_LOOPS
+               movi    \at, ((\size + \incr - 1) / (\incr))
+               loop    \at, 99f
+#else
+               addi    \at, \ar, \size
+               98:
+#endif
+
+       .endm
+
+/*
+ * loop for given size in register
+ */
+
+       .macro  __loops ar, as, at, incr_log2, mask_log2, cond, ncond
+
+#if XCHAL_HAVE_LOOPS
+               .ifgt \incr_log2 - 1
+                       addi    \at, \as, (1 << \incr_log2) - 1
+                       .ifnc \mask_log2,
+                               extui   \at, \at, \incr_log2, \mask_log2
+                       .else
+                               srli    \at, \at, \incr_log2
+                       .endif
+               .endif
+               loop\cond       \at, 99f
+#else
+               .ifnc \mask_log2,
+                       extui   \at, \as, \incr_log2, \mask_log2
+               .else
+                       .ifnc \ncond,
+                               srli    \at, \as, \incr_log2
+                       .endif
+               .endif
+               .ifnc \ncond,
+                       b\ncond \at, 99f
+
+               .endif
+               .ifnc \mask_log2,
+                       slli    \at, \at, \incr_log2
+                       add     \at, \ar, \at
+               .else
+                       add     \at, \ar, \as
+               .endif
+#endif
+               98:
+
+       .endm
+
+/*
+ * loop from ar to ax
+ */
+
+       .macro  __loopt ar, as, at, incr_log2
+
+#if XCHAL_HAVE_LOOPS
+               sub     \at, \as, \ar
+               .ifgt   \incr_log2 - 1
+                       addi    \at, \at, (1 << \incr_log2) - 1
+                       srli    \at, \at, \incr_log2
+               .endif
+               loop    \at, 99f
+#else
+               98:
+#endif
+
+       .endm
+
+/*
+ * restart loop. registers must be unchanged
+ */
+
+       .macro  __loop  as
+
+#if XCHAL_HAVE_LOOPS
+               loop    \as, 99f
+#else
+               98:
+#endif
+
+       .endm
+
+/*
+ * end of loop with no increment of the address.
+ */
+
+       .macro  __endl  ar, as
+#if !XCHAL_HAVE_LOOPS
+               bltu    \ar, \as, 98b
+#endif
+               99:
+       .endm
+
+/*
+ * end of loop with increment of the address.
+ */
+
+       .macro  __endla ar, as, incr
+               addi    \ar, \ar, \incr
+               __endl  \ar \as
+       .endm
+
+
+#endif /* _XTENSA_ASMMACRO_H */
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h
new file mode 100644 (file)
index 0000000..67ad67b
--- /dev/null
@@ -0,0 +1,299 @@
+/*
+ * include/asm-xtensa/atomic.h
+ *
+ * Atomic operations that C can't guarantee us.  Useful for resource counting..
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_ATOMIC_H
+#define _XTENSA_ATOMIC_H
+
+#include <linux/stringify.h>
+#include <linux/types.h>
+
+#ifdef __KERNEL__
+#include <asm/processor.h>
+#include <asm/system.h>
+
+#define ATOMIC_INIT(i) { (i) }
+
+/*
+ * This Xtensa implementation assumes that the right mechanism
+ * for exclusion is for locking interrupts to level 1.
+ *
+ * Locking interrupts looks like this:
+ *
+ *    rsil a15, 1
+ *    <code>
+ *    wsr  a15, PS
+ *    rsync
+ *
+ * Note that a15 is used here because the register allocation
+ * done by the compiler is not guaranteed and a window overflow
+ * may not occur between the rsil and wsr instructions. By using
+ * a15 in the rsil, the machine is guaranteed to be in a state
+ * where no register reference will cause an overflow.
+ */
+
+/**
+ * atomic_read - read atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically reads the value of @v.
+ */
+#define atomic_read(v)         ((v)->counter)
+
+/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+ *
+ * Atomically sets the value of @v to @i.
+ */
+#define atomic_set(v,i)                ((v)->counter = (i))
+
+/**
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+ *
+ * Atomically adds @i to @v.
+ */
+static inline void atomic_add(int i, atomic_t * v)
+{
+    unsigned int vval;
+
+    __asm__ __volatile__(
+       "rsil    a15, "__stringify(LOCKLEVEL)"\n\t"
+       "l32i    %0, %2, 0              \n\t"
+       "add     %0, %0, %1             \n\t"
+       "s32i    %0, %2, 0              \n\t"
+       "wsr     a15, "__stringify(PS)"       \n\t"
+       "rsync                          \n"
+       : "=&a" (vval)
+       : "a" (i), "a" (v)
+       : "a15", "memory"
+       );
+}
+
+/**
+ * atomic_sub - subtract the atomic variable
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v.
+ */
+static inline void atomic_sub(int i, atomic_t *v)
+{
+    unsigned int vval;
+
+    __asm__ __volatile__(
+       "rsil    a15, "__stringify(LOCKLEVEL)"\n\t"
+       "l32i    %0, %2, 0              \n\t"
+       "sub     %0, %0, %1             \n\t"
+       "s32i    %0, %2, 0              \n\t"
+       "wsr     a15, "__stringify(PS)"       \n\t"
+       "rsync                          \n"
+       : "=&a" (vval)
+       : "a" (i), "a" (v)
+       : "a15", "memory"
+       );
+}
+
+/*
+ * We use atomic_{add|sub}_return to define other functions.
+ */
+
+static inline int atomic_add_return(int i, atomic_t * v)
+{
+     unsigned int vval;
+
+    __asm__ __volatile__(
+       "rsil    a15,"__stringify(LOCKLEVEL)"\n\t"
+       "l32i    %0, %2, 0             \n\t"
+       "add     %0, %0, %1            \n\t"
+       "s32i    %0, %2, 0             \n\t"
+       "wsr     a15, "__stringify(PS)"      \n\t"
+       "rsync                         \n"
+       : "=&a" (vval)
+       : "a" (i), "a" (v)
+       : "a15", "memory"
+       );
+
+    return vval;
+}
+
+static inline int atomic_sub_return(int i, atomic_t * v)
+{
+    unsigned int vval;
+
+    __asm__ __volatile__(
+       "rsil    a15,"__stringify(LOCKLEVEL)"\n\t"
+       "l32i    %0, %2, 0             \n\t"
+       "sub     %0, %0, %1            \n\t"
+       "s32i    %0, %2, 0             \n\t"
+       "wsr     a15, "__stringify(PS)"       \n\t"
+       "rsync                         \n"
+       : "=&a" (vval)
+       : "a" (i), "a" (v)
+       : "a15", "memory"
+       );
+
+    return vval;
+}
+
+/**
+ * atomic_sub_and_test - subtract value from variable and test result
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v and returns
+ * true if the result is zero, or false for all
+ * other cases.
+ */
+#define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0)
+
+/**
+ * atomic_inc - increment atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1.
+ */
+#define atomic_inc(v) atomic_add(1,(v))
+
+/**
+ * atomic_inc - increment atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1.
+ */
+#define atomic_inc_return(v) atomic_add_return(1,(v))
+
+/**
+ * atomic_dec - decrement atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1.
+ */
+#define atomic_dec(v) atomic_sub(1,(v))
+
+/**
+ * atomic_dec_return - decrement atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1.
+ */
+#define atomic_dec_return(v) atomic_sub_return(1,(v))
+
+/**
+ * atomic_dec_and_test - decrement and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1 and
+ * returns true if the result is 0, or false for all other
+ * cases.
+ */
+#define atomic_dec_and_test(v) (atomic_sub_return(1,(v)) == 0)
+
+/**
+ * atomic_inc_and_test - increment and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1
+ * and returns true if the result is zero, or false for all
+ * other cases.
+ */
+#define atomic_inc_and_test(v) (atomic_add_return(1,(v)) == 0)
+
+/**
+ * atomic_add_negative - add and test if negative
+ * @v: pointer of type atomic_t
+ * @i: integer value to add
+ *
+ * Atomically adds @i to @v and returns true
+ * if the result is negative, or false when
+ * result is greater than or equal to zero.
+ */
+#define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0)
+
+#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
+
+/**
+ * atomic_add_unless - add unless the number is a given value
+ * @v: pointer of type atomic_t
+ * @a: the amount to add to v...
+ * @u: ...unless v is equal to u.
+ *
+ * Atomically adds @a to @v, so long as it was not @u.
+ * Returns non-zero if @v was not @u, and zero otherwise.
+ */
+static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
+{
+       int c, old;
+       c = atomic_read(v);
+       for (;;) {
+               if (unlikely(c == (u)))
+                       break;
+               old = atomic_cmpxchg((v), c, c + (a));
+               if (likely(old == c))
+                       break;
+               c = old;
+       }
+       return c != (u);
+}
+
+#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
+
+static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
+{
+    unsigned int all_f = -1;
+    unsigned int vval;
+
+    __asm__ __volatile__(
+       "rsil    a15,"__stringify(LOCKLEVEL)"\n\t"
+       "l32i    %0, %2, 0             \n\t"
+       "xor     %1, %4, %3            \n\t"
+       "and     %0, %0, %4            \n\t"
+       "s32i    %0, %2, 0             \n\t"
+       "wsr     a15, "__stringify(PS)"      \n\t"
+       "rsync                         \n"
+       : "=&a" (vval), "=a" (mask)
+       : "a" (v), "a" (all_f), "1" (mask)
+       : "a15", "memory"
+       );
+}
+
+static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
+{
+    unsigned int vval;
+
+    __asm__ __volatile__(
+       "rsil    a15,"__stringify(LOCKLEVEL)"\n\t"
+       "l32i    %0, %2, 0             \n\t"
+       "or      %0, %0, %1            \n\t"
+       "s32i    %0, %2, 0             \n\t"
+       "wsr     a15, "__stringify(PS)"       \n\t"
+       "rsync                         \n"
+       : "=&a" (vval)
+       : "a" (mask), "a" (v)
+       : "a15", "memory"
+       );
+}
+
+/* Atomic operations are already serializing */
+#define smp_mb__before_atomic_dec()    barrier()
+#define smp_mb__after_atomic_dec()     barrier()
+#define smp_mb__before_atomic_inc()    barrier()
+#define smp_mb__after_atomic_inc()     barrier()
+
+#include <asm-generic/atomic.h>
+#endif /* __KERNEL__ */
+
+#endif /* _XTENSA_ATOMIC_H */
+
diff --git a/arch/xtensa/include/asm/auxvec.h b/arch/xtensa/include/asm/auxvec.h
new file mode 100644 (file)
index 0000000..257dec7
--- /dev/null
@@ -0,0 +1,4 @@
+#ifndef __XTENSA_AUXVEC_H
+#define __XTENSA_AUXVEC_H
+
+#endif
diff --git a/arch/xtensa/include/asm/bitops.h b/arch/xtensa/include/asm/bitops.h
new file mode 100644 (file)
index 0000000..6c39303
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * include/asm-xtensa/bitops.h
+ *
+ * Atomic operations that C can't guarantee us.Useful for resource counting etc.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_BITOPS_H
+#define _XTENSA_BITOPS_H
+
+#ifdef __KERNEL__
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
+#include <asm/processor.h>
+#include <asm/byteorder.h>
+#include <asm/system.h>
+
+#ifdef CONFIG_SMP
+# error SMP not supported on this architecture
+#endif
+
+#define smp_mb__before_clear_bit()     barrier()
+#define smp_mb__after_clear_bit()      barrier()
+
+#include <asm-generic/bitops/atomic.h>
+#include <asm-generic/bitops/non-atomic.h>
+
+#if XCHAL_HAVE_NSA
+
+static inline unsigned long __cntlz (unsigned long x)
+{
+       int lz;
+       asm ("nsau %0, %1" : "=r" (lz) : "r" (x));
+       return lz;
+}
+
+/*
+ * ffz: Find first zero in word. Undefined if no zero exists.
+ * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
+ */
+
+static inline int ffz(unsigned long x)
+{
+       return 31 - __cntlz(~x & -~x);
+}
+
+/*
+ * __ffs: Find first bit set in word. Return 0 for bit 0
+ */
+
+static inline int __ffs(unsigned long x)
+{
+       return 31 - __cntlz(x & -x);
+}
+
+/*
+ * ffs: Find first bit set in word. This is defined the same way as
+ * the libc and compiler builtin ffs routines, therefore
+ * differs in spirit from the above ffz (man ffs).
+ */
+
+static inline int ffs(unsigned long x)
+{
+       return 32 - __cntlz(x & -x);
+}
+
+/*
+ * fls: Find last (most-significant) bit set in word.
+ * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
+ */
+
+static inline int fls (unsigned int x)
+{
+       return 32 - __cntlz(x);
+}
+
+/**
+ * __fls - find last (most-significant) set bit in a long word
+ * @word: the word to search
+ *
+ * Undefined if no set bit exists, so code should check against 0 first.
+ */
+static inline unsigned long __fls(unsigned long word)
+{
+       return 31 - __cntlz(word);
+}
+#else
+
+/* Use the generic implementation if we don't have the nsa/nsau instructions. */
+
+# include <asm-generic/bitops/ffs.h>
+# include <asm-generic/bitops/__ffs.h>
+# include <asm-generic/bitops/ffz.h>
+# include <asm-generic/bitops/fls.h>
+# include <asm-generic/bitops/__fls.h>
+
+#endif
+
+#include <asm-generic/bitops/fls64.h>
+#include <asm-generic/bitops/find.h>
+#include <asm-generic/bitops/ext2-non-atomic.h>
+
+#ifdef __XTENSA_EL__
+# define ext2_set_bit_atomic(lock,nr,addr)                             \
+       test_and_set_bit((nr), (unsigned long*)(addr))
+# define ext2_clear_bit_atomic(lock,nr,addr)                           \
+       test_and_clear_bit((nr), (unsigned long*)(addr))
+#elif defined(__XTENSA_EB__)
+# define ext2_set_bit_atomic(lock,nr,addr)                             \
+       test_and_set_bit((nr) ^ 0x18, (unsigned long*)(addr))
+# define ext2_clear_bit_atomic(lock,nr,addr)                           \
+       test_and_clear_bit((nr) ^ 0x18, (unsigned long*)(addr))
+#else
+# error processor byte order undefined!
+#endif
+
+#include <asm-generic/bitops/hweight.h>
+#include <asm-generic/bitops/lock.h>
+#include <asm-generic/bitops/sched.h>
+#include <asm-generic/bitops/minix.h>
+
+#endif /* __KERNEL__ */
+
+#endif /* _XTENSA_BITOPS_H */
diff --git a/arch/xtensa/include/asm/bootparam.h b/arch/xtensa/include/asm/bootparam.h
new file mode 100644 (file)
index 0000000..9983f2c
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * include/asm-xtensa/bootparam.h
+ *
+ * Definition of the Linux/Xtensa boot parameter structure
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005  Tensilica Inc.
+ *
+ * (Concept borrowed from the 68K port)
+ */
+
+#ifndef _XTENSA_BOOTPARAM_H
+#define _XTENSA_BOOTPARAM_H
+
+#define BP_VERSION 0x0001
+
+#define BP_TAG_COMMAND_LINE    0x1001  /* command line (0-terminated string)*/
+#define BP_TAG_INITRD          0x1002  /* ramdisk addr and size (bp_meminfo) */
+#define BP_TAG_MEMORY          0x1003  /* memory addr and size (bp_meminfo) */
+#define BP_TAG_SERIAL_BAUSRATE 0x1004  /* baud rate of current console. */
+#define BP_TAG_SERIAL_PORT     0x1005  /* serial device of current console */
+
+#define BP_TAG_FIRST           0x7B0B  /* first tag with a version number */
+#define BP_TAG_LAST            0x7E0B  /* last tag */
+
+#ifndef __ASSEMBLY__
+
+/* All records are aligned to 4 bytes */
+
+typedef struct bp_tag {
+  unsigned short id;           /* tag id */
+  unsigned short size;         /* size of this record excluding the structure*/
+  unsigned long data[0];       /* data */
+} bp_tag_t;
+
+typedef struct meminfo {
+  unsigned long type;
+  unsigned long start;
+  unsigned long end;
+} meminfo_t;
+
+#define SYSMEM_BANKS_MAX 5
+
+#define MEMORY_TYPE_CONVENTIONAL       0x1000
+#define MEMORY_TYPE_NONE               0x2000
+
+typedef struct sysmem_info {
+  int nr_banks;
+  meminfo_t bank[SYSMEM_BANKS_MAX];
+} sysmem_info_t;
+
+extern sysmem_info_t sysmem;
+
+#endif
+#endif
+
+
+
diff --git a/arch/xtensa/include/asm/bug.h b/arch/xtensa/include/asm/bug.h
new file mode 100644 (file)
index 0000000..3e52d72
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * include/asm-xtensa/bug.h
+ *
+ * Macros to cause a 'bug' message.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_BUG_H
+#define _XTENSA_BUG_H
+
+#include <asm-generic/bug.h>
+
+#endif /* _XTENSA_BUG_H */
diff --git a/arch/xtensa/include/asm/bugs.h b/arch/xtensa/include/asm/bugs.h
new file mode 100644 (file)
index 0000000..69b29d1
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * include/asm-xtensa/bugs.h
+ *
+ * This is included by init/main.c to check for architecture-dependent bugs.
+ *
+ * Xtensa processors don't have any bugs.  :)
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ */
+
+#ifndef _XTENSA_BUGS_H
+#define _XTENSA_BUGS_H
+
+static void check_bugs(void) { }
+
+#endif /* _XTENSA_BUGS_H */
diff --git a/arch/xtensa/include/asm/byteorder.h b/arch/xtensa/include/asm/byteorder.h
new file mode 100644 (file)
index 0000000..07d10ad
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * include/asm-xtensa/byteorder.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_BYTEORDER_H
+#define _XTENSA_BYTEORDER_H
+
+#include <asm/types.h>
+#include <linux/compiler.h>
+
+#ifdef __XTENSA_EL__
+# define __LITTLE_ENDIAN
+#elif defined(__XTENSA_EB__)
+# define __BIG_ENDIAN
+#else
+# error processor byte order undefined!
+#endif
+
+#define __SWAB_64_THRU_32__
+
+static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
+{
+    __u32 res;
+    /* instruction sequence from Xtensa ISA release 2/2000 */
+    __asm__("ssai     8           \n\t"
+           "srli     %0, %1, 16  \n\t"
+           "src      %0, %0, %1  \n\t"
+           "src      %0, %0, %0  \n\t"
+           "src      %0, %1, %0  \n"
+           : "=&a" (res)
+           : "a" (x)
+           );
+    return res;
+}
+#define __arch_swab32 __arch_swab32
+
+static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
+{
+    /* Given that 'short' values are signed (i.e., can be negative),
+     * we cannot assume that the upper 16-bits of the register are
+     * zero.  We are careful to mask values after shifting.
+     */
+
+    /* There exists an anomaly between xt-gcc and xt-xcc.  xt-gcc
+     * inserts an extui instruction after putting this function inline
+     * to ensure that it uses only the least-significant 16 bits of
+     * the result.  xt-xcc doesn't use an extui, but assumes the
+     * __asm__ macro follows convention that the upper 16 bits of an
+     * 'unsigned short' result are still zero.  This macro doesn't
+     * follow convention; indeed, it leaves garbage in the upport 16
+     * bits of the register.
+
+     * Declaring the temporary variables 'res' and 'tmp' to be 32-bit
+     * types while the return type of the function is a 16-bit type
+     * forces both compilers to insert exactly one extui instruction
+     * (or equivalent) to mask off the upper 16 bits. */
+
+    __u32 res;
+    __u32 tmp;
+
+    __asm__("extui    %1, %2, 8, 8\n\t"
+           "slli     %0, %2, 8   \n\t"
+           "or       %0, %0, %1  \n"
+           : "=&a" (res), "=&a" (tmp)
+           : "a" (x)
+           );
+
+    return res;
+}
+#define __arch_swab16 __arch_swab16
+
+#include <linux/byteorder.h>
+
+#endif /* _XTENSA_BYTEORDER_H */
diff --git a/arch/xtensa/include/asm/cache.h b/arch/xtensa/include/asm/cache.h
new file mode 100644 (file)
index 0000000..f04c989
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * include/asm-xtensa/cache.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CACHE_H
+#define _XTENSA_CACHE_H
+
+#include <variant/core.h>
+
+#define L1_CACHE_SHIFT XCHAL_DCACHE_LINEWIDTH
+#define L1_CACHE_BYTES XCHAL_DCACHE_LINESIZE
+#define SMP_CACHE_BYTES        L1_CACHE_BYTES
+
+#define DCACHE_WAY_SIZE        (XCHAL_DCACHE_SIZE/XCHAL_DCACHE_WAYS)
+#define ICACHE_WAY_SIZE        (XCHAL_ICACHE_SIZE/XCHAL_ICACHE_WAYS)
+#define DCACHE_WAY_SHIFT (XCHAL_DCACHE_SETWIDTH + XCHAL_DCACHE_LINEWIDTH)
+#define ICACHE_WAY_SHIFT (XCHAL_ICACHE_SETWIDTH + XCHAL_ICACHE_LINEWIDTH)
+
+/* Maximum cache size per way. */
+#if DCACHE_WAY_SIZE >= ICACHE_WAY_SIZE
+# define CACHE_WAY_SIZE DCACHE_WAY_SIZE
+#else
+# define CACHE_WAY_SIZE ICACHE_WAY_SIZE
+#endif
+
+
+#endif /* _XTENSA_CACHE_H */
diff --git a/arch/xtensa/include/asm/cacheasm.h b/arch/xtensa/include/asm/cacheasm.h
new file mode 100644 (file)
index 0000000..2c20a58
--- /dev/null
@@ -0,0 +1,177 @@
+/*
+ * include/asm-xtensa/cacheasm.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2006 Tensilica Inc.
+ */
+
+#include <asm/cache.h>
+#include <asm/asmmacro.h>
+#include <linux/stringify.h>
+
+/*
+ * Define cache functions as macros here so that they can be used
+ * by the kernel and boot loader. We should consider moving them to a
+ * library that can be linked by both.
+ *
+ * Locking
+ *
+ *   ___unlock_dcache_all
+ *   ___unlock_icache_all
+ *
+ * Flush and invaldating
+ *
+ *   ___flush_invalidate_dcache_{all|range|page}
+ *   ___flush_dcache_{all|range|page}
+ *   ___invalidate_dcache_{all|range|page}
+ *   ___invalidate_icache_{all|range|page}
+ *
+ */
+
+       .macro  __loop_cache_all ar at insn size line_width
+
+       movi    \ar, 0
+
+       __loopi \ar, \at, \size, (4 << (\line_width))
+       \insn   \ar, 0 << (\line_width)
+       \insn   \ar, 1 << (\line_width)
+       \insn   \ar, 2 << (\line_width)
+       \insn   \ar, 3 << (\line_width)
+       __endla \ar, \at, 4 << (\line_width)
+
+       .endm
+
+
+       .macro  __loop_cache_range ar as at insn line_width
+
+       extui   \at, \ar, 0, \line_width
+       add     \as, \as, \at
+
+       __loops \ar, \as, \at, \line_width
+       \insn   \ar, 0
+       __endla \ar, \at, (1 << (\line_width))
+
+       .endm
+
+
+       .macro  __loop_cache_page ar at insn line_width
+
+       __loopi \ar, \at, PAGE_SIZE, 4 << (\line_width)
+       \insn   \ar, 0 << (\line_width)
+       \insn   \ar, 1 << (\line_width)
+       \insn   \ar, 2 << (\line_width)
+       \insn   \ar, 3 << (\line_width)
+       __endla \ar, \at, 4 << (\line_width)
+
+       .endm
+
+
+#if XCHAL_DCACHE_LINE_LOCKABLE
+
+       .macro  ___unlock_dcache_all ar at
+
+       __loop_cache_all \ar \at diu XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+#endif
+
+#if XCHAL_ICACHE_LINE_LOCKABLE
+
+       .macro  ___unlock_icache_all ar at
+
+       __loop_cache_all \ar \at iiu XCHAL_ICACHE_SIZE XCHAL_ICACHE_LINEWIDTH
+
+       .endm
+#endif
+
+       .macro  ___flush_invalidate_dcache_all ar at
+
+       __loop_cache_all \ar \at diwbi XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro  ___flush_dcache_all ar at
+
+       __loop_cache_all \ar \at diwb XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro  ___invalidate_dcache_all ar at
+
+       __loop_cache_all \ar \at dii __stringify(DCACHE_WAY_SIZE) \
+                        XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro  ___invalidate_icache_all ar at
+
+       __loop_cache_all \ar \at iii __stringify(ICACHE_WAY_SIZE) \
+                        XCHAL_ICACHE_LINEWIDTH
+
+       .endm
+
+
+
+       .macro  ___flush_invalidate_dcache_range ar as at
+
+       __loop_cache_range \ar \as \at dhwbi XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro  ___flush_dcache_range ar as at
+
+       __loop_cache_range \ar \as \at dhwb XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro  ___invalidate_dcache_range ar as at
+
+       __loop_cache_range \ar \as \at dhi XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro  ___invalidate_icache_range ar as at
+
+       __loop_cache_range \ar \as \at ihi XCHAL_ICACHE_LINEWIDTH
+
+       .endm
+
+
+
+       .macro  ___flush_invalidate_dcache_page ar as
+
+       __loop_cache_page \ar \as dhwbi XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro ___flush_dcache_page ar as
+
+       __loop_cache_page \ar \as dhwb XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro  ___invalidate_dcache_page ar as
+
+       __loop_cache_page \ar \as dhi XCHAL_DCACHE_LINEWIDTH
+
+       .endm
+
+
+       .macro  ___invalidate_icache_page ar as
+
+       __loop_cache_page \ar \as ihi XCHAL_ICACHE_LINEWIDTH
+
+       .endm
+
diff --git a/arch/xtensa/include/asm/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h
new file mode 100644 (file)
index 0000000..94c4c53
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * include/asm-xtensa/cacheflush.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * (C) 2001 - 2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CACHEFLUSH_H
+#define _XTENSA_CACHEFLUSH_H
+
+#ifdef __KERNEL__
+
+#include <linux/mm.h>
+#include <asm/processor.h>
+#include <asm/page.h>
+
+/*
+ * Lo-level routines for cache flushing.
+ *
+ * invalidate data or instruction cache:
+ *
+ * __invalidate_icache_all()
+ * __invalidate_icache_page(adr)
+ * __invalidate_dcache_page(adr)
+ * __invalidate_icache_range(from,size)
+ * __invalidate_dcache_range(from,size)
+ *
+ * flush data cache:
+ *
+ * __flush_dcache_page(adr)
+ *
+ * flush and invalidate data cache:
+ *
+ * __flush_invalidate_dcache_all()
+ * __flush_invalidate_dcache_page(adr)
+ * __flush_invalidate_dcache_range(from,size)
+ *
+ * specials for cache aliasing:
+ *
+ * __flush_invalidate_dcache_page_alias(vaddr,paddr)
+ * __invalidate_icache_page_alias(vaddr,paddr)
+ */
+
+extern void __invalidate_dcache_all(void);
+extern void __invalidate_icache_all(void);
+extern void __invalidate_dcache_page(unsigned long);
+extern void __invalidate_icache_page(unsigned long);
+extern void __invalidate_icache_range(unsigned long, unsigned long);
+extern void __invalidate_dcache_range(unsigned long, unsigned long);
+
+
+#if XCHAL_DCACHE_IS_WRITEBACK
+extern void __flush_invalidate_dcache_all(void);
+extern void __flush_dcache_page(unsigned long);
+extern void __flush_dcache_range(unsigned long, unsigned long);
+extern void __flush_invalidate_dcache_page(unsigned long);
+extern void __flush_invalidate_dcache_range(unsigned long, unsigned long);
+#else
+# define __flush_dcache_range(p,s)             do { } while(0)
+# define __flush_dcache_page(p)                        do { } while(0)
+# define __flush_invalidate_dcache_page(p)     __invalidate_dcache_page(p)
+# define __flush_invalidate_dcache_range(p,s)  __invalidate_dcache_range(p,s)
+#endif
+
+#if (DCACHE_WAY_SIZE > PAGE_SIZE)
+extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long);
+#endif
+#if (ICACHE_WAY_SIZE > PAGE_SIZE)
+extern void __invalidate_icache_page_alias(unsigned long, unsigned long);
+#else
+# define __invalidate_icache_page_alias(v,p)   do { } while(0)
+#endif
+
+/*
+ * We have physically tagged caches - nothing to do here -
+ * unless we have cache aliasing.
+ *
+ * Pages can get remapped. Because this might change the 'color' of that page,
+ * we have to flush the cache before the PTE is changed.
+ * (see also Documentation/cachetlb.txt)
+ */
+
+#if (DCACHE_WAY_SIZE > PAGE_SIZE)
+
+#define flush_cache_all()                                              \
+       do {                                                            \
+               __flush_invalidate_dcache_all();                        \
+               __invalidate_icache_all();                              \
+       } while (0)
+
+#define flush_cache_mm(mm)             flush_cache_all()
+#define flush_cache_dup_mm(mm)         flush_cache_mm(mm)
+
+#define flush_cache_vmap(start,end)    flush_cache_all()
+#define flush_cache_vunmap(start,end)  flush_cache_all()
+
+extern void flush_dcache_page(struct page*);
+extern void flush_cache_range(struct vm_area_struct*, ulong, ulong);
+extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned long);
+
+#else
+
+#define flush_cache_all()                              do { } while (0)
+#define flush_cache_mm(mm)                             do { } while (0)
+#define flush_cache_dup_mm(mm)                         do { } while (0)
+
+#define flush_cache_vmap(start,end)                    do { } while (0)
+#define flush_cache_vunmap(start,end)                  do { } while (0)
+
+#define flush_dcache_page(page)                                do { } while (0)
+
+#define flush_cache_page(vma,addr,pfn)                 do { } while (0)
+#define flush_cache_range(vma,start,end)               do { } while (0)
+
+#endif
+
+/* Ensure consistency between data and instruction cache. */
+#define flush_icache_range(start,end)                                  \
+       do {                                                            \
+               __flush_dcache_range(start, (end) - (start));           \
+               __invalidate_icache_range(start,(end) - (start));       \
+       } while (0)
+
+/* This is not required, see Documentation/cachetlb.txt */
+#define        flush_icache_page(vma,page)                     do { } while (0)
+
+#define flush_dcache_mmap_lock(mapping)                        do { } while (0)
+#define flush_dcache_mmap_unlock(mapping)              do { } while (0)
+
+#if (DCACHE_WAY_SIZE > PAGE_SIZE)
+
+extern void copy_to_user_page(struct vm_area_struct*, struct page*,
+               unsigned long, void*, const void*, unsigned long);
+extern void copy_from_user_page(struct vm_area_struct*, struct page*,
+               unsigned long, void*, const void*, unsigned long);
+
+#else
+
+#define copy_to_user_page(vma, page, vaddr, dst, src, len)             \
+       do {                                                            \
+               memcpy(dst, src, len);                                  \
+               __flush_dcache_range((unsigned long) dst, len);         \
+               __invalidate_icache_range((unsigned long) dst, len);    \
+       } while (0)
+
+#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
+       memcpy(dst, src, len)
+
+#endif
+
+#endif /* __KERNEL__ */
+#endif /* _XTENSA_CACHEFLUSH_H */
diff --git a/arch/xtensa/include/asm/checksum.h b/arch/xtensa/include/asm/checksum.h
new file mode 100644 (file)
index 0000000..f84d3f0
--- /dev/null
@@ -0,0 +1,250 @@
+/*
+ * include/asm-xtensa/checksum.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CHECKSUM_H
+#define _XTENSA_CHECKSUM_H
+
+#include <linux/in6.h>
+#include <variant/core.h>
+
+/*
+ * computes the checksum of a memory block at buff, length len,
+ * and adds in "sum" (32-bit)
+ *
+ * returns a 32-bit number suitable for feeding into itself
+ * or csum_tcpudp_magic
+ *
+ * this function must be called with even lengths, except
+ * for the last fragment, which may be odd
+ *
+ * it's best to have buff aligned on a 32-bit boundary
+ */
+asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
+
+/*
+ * the same as csum_partial, but copies from src while it
+ * checksums, and handles user-space pointer exceptions correctly, when needed.
+ *
+ * here even more important to align src and dst on a 32-bit (or even
+ * better 64-bit) boundary
+ */
+
+asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst, int len, __wsum sum,
+                                                  int *src_err_ptr, int *dst_err_ptr);
+
+/*
+ *     Note: when you get a NULL pointer exception here this means someone
+ *     passed in an incorrect kernel address to one of these functions.
+ *
+ *     If you use these functions directly please don't forget the access_ok().
+ */
+static inline
+__wsum csum_partial_copy_nocheck(const void *src, void *dst,
+                                       int len, __wsum sum)
+{
+       return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL);
+}
+
+static inline
+__wsum csum_partial_copy_from_user(const void __user *src, void *dst,
+                                               int len, __wsum sum, int *err_ptr)
+{
+       return csum_partial_copy_generic((__force const void *)src, dst,
+                                       len, sum, err_ptr, NULL);
+}
+
+/*
+ *     Fold a partial checksum
+ */
+
+static __inline__ __sum16 csum_fold(__wsum sum)
+{
+       unsigned int __dummy;
+       __asm__("extui  %1, %0, 16, 16\n\t"
+               "extui  %0 ,%0, 0, 16\n\t"
+               "add    %0, %0, %1\n\t"
+               "slli   %1, %0, 16\n\t"
+               "add    %0, %0, %1\n\t"
+               "extui  %0, %0, 16, 16\n\t"
+               "neg    %0, %0\n\t"
+               "addi   %0, %0, -1\n\t"
+               "extui  %0, %0, 0, 16\n\t"
+               : "=r" (sum), "=&r" (__dummy)
+               : "0" (sum));
+       return (__force __sum16)sum;
+}
+
+/*
+ *     This is a version of ip_compute_csum() optimized for IP headers,
+ *     which always checksum on 4 octet boundaries.
+ */
+static __inline__ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
+{
+       unsigned int sum, tmp, endaddr;
+
+       __asm__ __volatile__(
+               "sub            %0, %0, %0\n\t"
+#if XCHAL_HAVE_LOOPS
+               "loopgtz        %2, 2f\n\t"
+#else
+               "beqz           %2, 2f\n\t"
+               "slli           %4, %2, 2\n\t"
+               "add            %4, %4, %1\n\t"
+               "0:\t"
+#endif
+               "l32i           %3, %1, 0\n\t"
+               "add            %0, %0, %3\n\t"
+               "bgeu           %0, %3, 1f\n\t"
+               "addi           %0, %0, 1\n\t"
+               "1:\t"
+               "addi           %1, %1, 4\n\t"
+#if !XCHAL_HAVE_LOOPS
+               "blt            %1, %4, 0b\n\t"
+#endif
+               "2:\t"
+       /* Since the input registers which are loaded with iph and ihl
+          are modified, we must also specify them as outputs, or gcc
+          will assume they contain their original values. */
+               : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), "=&r" (endaddr)
+               : "1" (iph), "2" (ihl));
+
+       return  csum_fold(sum);
+}
+
+static __inline__ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
+                                                  unsigned short len,
+                                                  unsigned short proto,
+                                                  __wsum sum)
+{
+
+#ifdef __XTENSA_EL__
+       unsigned long len_proto = (len + proto) << 8;
+#elif defined(__XTENSA_EB__)
+       unsigned long len_proto = len + proto;
+#else
+# error processor byte order undefined!
+#endif
+       __asm__("add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "add    %0, %0, %2\n\t"
+               "bgeu   %0, %2, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "add    %0, %0, %3\n\t"
+               "bgeu   %0, %3, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               : "=r" (sum), "=r" (len_proto)
+               : "r" (daddr), "r" (saddr), "1" (len_proto), "0" (sum));
+       return sum;
+}
+
+/*
+ * computes the checksum of the TCP/UDP pseudo-header
+ * returns a 16-bit checksum, already complemented
+ */
+static __inline__ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
+                                                      unsigned short len,
+                                                      unsigned short proto,
+                                                      __wsum sum)
+{
+       return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
+}
+
+/*
+ * this routine is used for miscellaneous IP-like checksums, mainly
+ * in icmp.c
+ */
+
+static __inline__ __sum16 ip_compute_csum(const void *buff, int len)
+{
+    return csum_fold (csum_partial(buff, len, 0));
+}
+
+#define _HAVE_ARCH_IPV6_CSUM
+static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
+                                         const struct in6_addr *daddr,
+                                         __u32 len, unsigned short proto,
+                                         __wsum sum)
+{
+       unsigned int __dummy;
+       __asm__("l32i   %1, %2, 0\n\t"
+               "add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "l32i   %1, %2, 4\n\t"
+               "add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "l32i   %1, %2, 8\n\t"
+               "add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "l32i   %1, %2, 12\n\t"
+               "add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "l32i   %1, %3, 0\n\t"
+               "add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "l32i   %1, %3, 4\n\t"
+               "add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "l32i   %1, %3, 8\n\t"
+               "add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "l32i   %1, %3, 12\n\t"
+               "add    %0, %0, %1\n\t"
+               "bgeu   %0, %1, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "add    %0, %0, %4\n\t"
+               "bgeu   %0, %4, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               "add    %0, %0, %5\n\t"
+               "bgeu   %0, %5, 1f\n\t"
+               "addi   %0, %0, 1\n\t"
+               "1:\t"
+               : "=r" (sum), "=&r" (__dummy)
+               : "r" (saddr), "r" (daddr),
+                 "r" (htonl(len)), "r" (htonl(proto)), "0" (sum));
+
+       return csum_fold(sum);
+}
+
+/*
+ *     Copy and checksum to user
+ */
+#define HAVE_CSUM_COPY_USER
+static __inline__ __wsum csum_and_copy_to_user(const void *src, void __user *dst,
+                                   int len, __wsum sum, int *err_ptr)
+{
+       if (access_ok(VERIFY_WRITE, dst, len))
+               return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);
+
+       if (len)
+               *err_ptr = -EFAULT;
+
+       return (__force __wsum)-1; /* invalid checksum */
+}
+#endif
diff --git a/arch/xtensa/include/asm/coprocessor.h b/arch/xtensa/include/asm/coprocessor.h
new file mode 100644 (file)
index 0000000..65a285d
--- /dev/null
@@ -0,0 +1,177 @@
+/*
+ * include/asm-xtensa/coprocessor.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 - 2007 Tensilica Inc.
+ */
+
+
+#ifndef _XTENSA_COPROCESSOR_H
+#define _XTENSA_COPROCESSOR_H
+
+#include <linux/stringify.h>
+#include <variant/tie.h>
+#include <asm/types.h>
+
+#ifdef __ASSEMBLY__
+# include <variant/tie-asm.h>
+
+.macro xchal_sa_start  a b
+       .set .Lxchal_pofs_, 0
+       .set .Lxchal_ofs_, 0
+.endm
+
+.macro xchal_sa_align  ptr minofs maxofs ofsalign totalign
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + .Lxchal_pofs_ + \totalign - 1
+       .set    .Lxchal_ofs_, (.Lxchal_ofs_ & -\totalign) - .Lxchal_pofs_
+.endm
+
+#define _SELECT        (  XTHAL_SAS_TIE | XTHAL_SAS_OPT \
+                | XTHAL_SAS_CC \
+                | XTHAL_SAS_CALR | XTHAL_SAS_CALE )
+
+.macro save_xtregs_opt ptr clb at1 at2 at3 at4 offset
+       .if XTREGS_OPT_SIZE > 0
+               addi    \clb, \ptr, \offset
+               xchal_ncp_store \clb \at1 \at2 \at3 \at4 select=_SELECT
+       .endif
+.endm
+
+.macro load_xtregs_opt ptr clb at1 at2 at3 at4 offset
+       .if XTREGS_OPT_SIZE > 0
+               addi    \clb, \ptr, \offset
+               xchal_ncp_load \clb \at1 \at2 \at3 \at4 select=_SELECT
+       .endif
+.endm
+#undef _SELECT
+
+#define _SELECT        (  XTHAL_SAS_TIE | XTHAL_SAS_OPT \
+                | XTHAL_SAS_NOCC \
+                | XTHAL_SAS_CALR | XTHAL_SAS_CALE | XTHAL_SAS_GLOB )
+
+.macro save_xtregs_user ptr clb at1 at2 at3 at4 offset
+       .if XTREGS_USER_SIZE > 0
+               addi    \clb, \ptr, \offset
+               xchal_ncp_store \clb \at1 \at2 \at3 \at4 select=_SELECT
+       .endif
+.endm
+
+.macro load_xtregs_user ptr clb at1 at2 at3 at4 offset
+       .if XTREGS_USER_SIZE > 0
+               addi    \clb, \ptr, \offset
+               xchal_ncp_load \clb \at1 \at2 \at3 \at4 select=_SELECT
+       .endif
+.endm
+#undef _SELECT
+
+
+
+#endif /* __ASSEMBLY__ */
+
+/*
+ * XTENSA_HAVE_COPROCESSOR(x) returns 1 if coprocessor x is configured.
+ *
+ * XTENSA_HAVE_IO_PORT(x) returns 1 if io-port x is configured.
+ *
+ */
+
+#define XTENSA_HAVE_COPROCESSOR(x)                                     \
+       ((XCHAL_CP_MASK ^ XCHAL_CP_PORT_MASK) & (1 << (x)))
+#define XTENSA_HAVE_COPROCESSORS                                       \
+       (XCHAL_CP_MASK ^ XCHAL_CP_PORT_MASK)
+#define XTENSA_HAVE_IO_PORT(x)                                         \
+       (XCHAL_CP_PORT_MASK & (1 << (x)))
+#define XTENSA_HAVE_IO_PORTS                                           \
+       XCHAL_CP_PORT_MASK
+
+#ifndef __ASSEMBLY__
+
+
+#if XCHAL_HAVE_CP
+
+#define RSR_CPENABLE(x)        do {                                              \
+       __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \
+       } while(0);
+#define WSR_CPENABLE(x)        do {                                              \
+       __asm__ __volatile__("wsr %0," __stringify(CPENABLE) "; rsync"    \
+                            :: "a" (x));                                 \
+       } while(0);
+
+#endif /* XCHAL_HAVE_CP */
+
+
+/*
+ * Additional registers.
+ * We define three types of additional registers:
+ *  ext: extra registers that are used by the compiler
+ *  cpn: optional registers that can be used by a user application
+ *  cpX: coprocessor registers that can only be used if the corresponding
+ *       CPENABLE bit is set.
+ */
+
+#define XCHAL_SA_REG(list,cc,abi,type,y,name,z,align,size,...) \
+       __REG ## list (cc, abi, type, name, size, align)
+
+#define __REG0(cc,abi,t,name,s,a)      __REG0_ ## cc (abi,name)
+#define __REG1(cc,abi,t,name,s,a)      __REG1_ ## cc (name)
+#define __REG2(cc,abi,type,...)                __REG2_ ## type (__VA_ARGS__)
+
+#define __REG0_0(abi,name)
+#define __REG0_1(abi,name)             __REG0_1 ## abi (name)
+#define __REG0_10(name)        __u32 name;
+#define __REG0_11(name)        __u32 name;
+#define __REG0_12(name)
+
+#define __REG1_0(name) __u32 name;
+#define __REG1_1(name)
+
+#define __REG2_0(n,s,a)        __u32 name;
+#define __REG2_1(n,s,a)        unsigned char n[s] __attribute__ ((aligned(a)));
+#define __REG2_2(n,s,a) unsigned char n[s] __attribute__ ((aligned(a)));
+
+typedef struct { XCHAL_NCP_SA_LIST(0) } xtregs_opt_t
+       __attribute__ ((aligned (XCHAL_NCP_SA_ALIGN)));
+typedef struct { XCHAL_NCP_SA_LIST(1) } xtregs_user_t
+       __attribute__ ((aligned (XCHAL_NCP_SA_ALIGN)));
+
+#if XTENSA_HAVE_COPROCESSORS
+
+typedef struct { XCHAL_CP0_SA_LIST(2) } xtregs_cp0_t
+       __attribute__ ((aligned (XCHAL_CP0_SA_ALIGN)));
+typedef struct { XCHAL_CP1_SA_LIST(2) } xtregs_cp1_t
+       __attribute__ ((aligned (XCHAL_CP1_SA_ALIGN)));
+typedef struct { XCHAL_CP2_SA_LIST(2) } xtregs_cp2_t
+       __attribute__ ((aligned (XCHAL_CP2_SA_ALIGN)));
+typedef struct { XCHAL_CP3_SA_LIST(2) } xtregs_cp3_t
+       __attribute__ ((aligned (XCHAL_CP3_SA_ALIGN)));
+typedef struct { XCHAL_CP4_SA_LIST(2) } xtregs_cp4_t
+       __attribute__ ((aligned (XCHAL_CP4_SA_ALIGN)));
+typedef struct { XCHAL_CP5_SA_LIST(2) } xtregs_cp5_t
+       __attribute__ ((aligned (XCHAL_CP5_SA_ALIGN)));
+typedef struct { XCHAL_CP6_SA_LIST(2) } xtregs_cp6_t
+       __attribute__ ((aligned (XCHAL_CP6_SA_ALIGN)));
+typedef struct { XCHAL_CP7_SA_LIST(2) } xtregs_cp7_t
+       __attribute__ ((aligned (XCHAL_CP7_SA_ALIGN)));
+
+extern struct thread_info* coprocessor_owner[XCHAL_CP_MAX];
+extern void coprocessor_save(void*, int);
+extern void coprocessor_load(void*, int);
+extern void coprocessor_flush(struct thread_info*, int);
+extern void coprocessor_restore(struct thread_info*, int);
+
+extern void coprocessor_release_all(struct thread_info*);
+extern void coprocessor_flush_all(struct thread_info*);
+
+static inline void coprocessor_clear_cpenable(void)
+{
+       unsigned long i = 0;
+       WSR_CPENABLE(i);
+}
+
+#endif /* XTENSA_HAVE_COPROCESSORS */
+
+#endif /* !__ASSEMBLY__ */
+#endif /* _XTENSA_COPROCESSOR_H */
diff --git a/arch/xtensa/include/asm/cpumask.h b/arch/xtensa/include/asm/cpumask.h
new file mode 100644 (file)
index 0000000..ebeede3
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/cpumask.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CPUMASK_H
+#define _XTENSA_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _XTENSA_CPUMASK_H */
diff --git a/arch/xtensa/include/asm/cputime.h b/arch/xtensa/include/asm/cputime.h
new file mode 100644 (file)
index 0000000..a7fb864
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _XTENSA_CPUTIME_H
+#define _XTENSA_CPUTIME_H
+
+#include <asm-generic/cputime.h>
+
+#endif /* _XTENSA_CPUTIME_H */
diff --git a/arch/xtensa/include/asm/current.h b/arch/xtensa/include/asm/current.h
new file mode 100644 (file)
index 0000000..8d1eb5d
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * include/asm-xtensa/current.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CURRENT_H
+#define _XTENSA_CURRENT_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/thread_info.h>
+
+struct task_struct;
+
+static inline struct task_struct *get_current(void)
+{
+       return current_thread_info()->task;
+}
+
+#define current get_current()
+
+#else
+
+#define CURRENT_SHIFT 13
+
+#define GET_CURRENT(reg,sp)            \
+       GET_THREAD_INFO(reg,sp);        \
+       l32i reg, reg, TI_TASK          \
+
+#endif
+
+
+#endif /* XTENSA_CURRENT_H */
diff --git a/arch/xtensa/include/asm/delay.h b/arch/xtensa/include/asm/delay.h
new file mode 100644 (file)
index 0000000..e1d8c9e
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * include/asm-xtensa/delay.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ *
+ */
+
+#ifndef _XTENSA_DELAY_H
+#define _XTENSA_DELAY_H
+
+#include <asm/processor.h>
+#include <asm/param.h>
+
+extern unsigned long loops_per_jiffy;
+
+static inline void __delay(unsigned long loops)
+{
+  /* 2 cycles per loop. */
+  __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b"
+                       : "=r" (loops) : "0" (loops));
+}
+
+static __inline__ u32 xtensa_get_ccount(void)
+{
+       u32 ccount;
+       asm volatile ("rsr %0, 234; # CCOUNT\n" : "=r" (ccount));
+       return ccount;
+}
+
+/* For SMP/NUMA systems, change boot_cpu_data to something like
+ * local_cpu_data->... where local_cpu_data points to the current
+ * cpu. */
+
+static __inline__ void udelay (unsigned long usecs)
+{
+       unsigned long start = xtensa_get_ccount();
+       unsigned long cycles = usecs * (loops_per_jiffy / (1000000UL / HZ));
+
+       /* Note: all variables are unsigned (can wrap around)! */
+       while (((unsigned long)xtensa_get_ccount()) - start < cycles)
+               ;
+}
+
+#endif
+
diff --git a/arch/xtensa/include/asm/device.h b/arch/xtensa/include/asm/device.h
new file mode 100644 (file)
index 0000000..d8f9872
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Arch specific extensions to struct device
+ *
+ * This file is released under the GPLv2
+ */
+#include <asm-generic/device.h>
+
diff --git a/arch/xtensa/include/asm/div64.h b/arch/xtensa/include/asm/div64.h
new file mode 100644 (file)
index 0000000..f35678c
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/div64.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_DIV64_H
+#define _XTENSA_DIV64_H
+
+#include <asm-generic/div64.h>
+
+#endif /* _XTENSA_DIV64_H */
diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h
new file mode 100644 (file)
index 0000000..51882ae
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * include/asm-xtensa/dma-mapping.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_DMA_MAPPING_H
+#define _XTENSA_DMA_MAPPING_H
+
+#include <asm/cache.h>
+#include <asm/io.h>
+#include <linux/mm.h>
+#include <linux/scatterlist.h>
+
+/*
+ * DMA-consistent mapping functions.
+ */
+
+extern void *consistent_alloc(int, size_t, dma_addr_t, unsigned long);
+extern void consistent_free(void*, size_t, dma_addr_t);
+extern void consistent_sync(void*, size_t, int);
+
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
+#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
+
+void *dma_alloc_coherent(struct device *dev, size_t size,
+                          dma_addr_t *dma_handle, gfp_t flag);
+
+void dma_free_coherent(struct device *dev, size_t size,
+                        void *vaddr, dma_addr_t dma_handle);
+
+static inline dma_addr_t
+dma_map_single(struct device *dev, void *ptr, size_t size,
+              enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+       consistent_sync(ptr, size, direction);
+       return virt_to_phys(ptr);
+}
+
+static inline void
+dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+                enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+}
+
+static inline int
+dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+          enum dma_data_direction direction)
+{
+       int i;
+
+       BUG_ON(direction == DMA_NONE);
+
+       for (i = 0; i < nents; i++, sg++ ) {
+               BUG_ON(!sg_page(sg));
+
+               sg->dma_address = sg_phys(sg);
+               consistent_sync(sg_virt(sg), sg->length, direction);
+       }
+
+       return nents;
+}
+
+static inline dma_addr_t
+dma_map_page(struct device *dev, struct page *page, unsigned long offset,
+            size_t size, enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+       return (dma_addr_t)(page_to_pfn(page)) * PAGE_SIZE + offset;
+}
+
+static inline void
+dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
+              enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+}
+
+
+static inline void
+dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
+            enum dma_data_direction direction)
+{
+       BUG_ON(direction == DMA_NONE);
+}
+
+static inline void
+dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
+               enum dma_data_direction direction)
+{
+       consistent_sync((void *)bus_to_virt(dma_handle), size, direction);
+}
+
+static inline void
+dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
+               enum dma_data_direction direction)
+{
+       consistent_sync((void *)bus_to_virt(dma_handle), size, direction);
+}
+
+static inline void
+dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
+                     unsigned long offset, size_t size,
+                     enum dma_data_direction direction)
+{
+
+       consistent_sync((void *)bus_to_virt(dma_handle)+offset,size,direction);
+}
+
+static inline void
+dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
+                     unsigned long offset, size_t size,
+                     enum dma_data_direction direction)
+{
+
+       consistent_sync((void *)bus_to_virt(dma_handle)+offset,size,direction);
+}
+static inline void
+dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
+                enum dma_data_direction dir)
+{
+       int i;
+       for (i = 0; i < nelems; i++, sg++)
+               consistent_sync(sg_virt(sg), sg->length, dir);
+}
+
+static inline void
+dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
+                enum dma_data_direction dir)
+{
+       int i;
+       for (i = 0; i < nelems; i++, sg++)
+               consistent_sync(sg_virt(sg), sg->length, dir);
+}
+static inline int
+dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
+{
+       return 0;
+}
+
+static inline int
+dma_supported(struct device *dev, u64 mask)
+{
+       return 1;
+}
+
+static inline int
+dma_set_mask(struct device *dev, u64 mask)
+{
+       if(!dev->dma_mask || !dma_supported(dev, mask))
+               return -EIO;
+
+       *dev->dma_mask = mask;
+
+       return 0;
+}
+
+static inline int
+dma_get_cache_alignment(void)
+{
+       return L1_CACHE_BYTES;
+}
+
+#define dma_is_consistent(d, h)        (1)
+
+static inline void
+dma_cache_sync(struct device *dev, void *vaddr, size_t size,
+              enum dma_data_direction direction)
+{
+       consistent_sync(vaddr, size, direction);
+}
+
+#endif /* _XTENSA_DMA_MAPPING_H */
diff --git a/arch/xtensa/include/asm/dma.h b/arch/xtensa/include/asm/dma.h
new file mode 100644 (file)
index 0000000..e30f3ab
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * include/asm-xtensa/dma.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_DMA_H
+#define _XTENSA_DMA_H
+
+#include <asm/io.h>            /* need byte IO */
+
+/*
+ * This is only to be defined if we have PC-like DMA.
+ * By default this is not true on an Xtensa processor,
+ * however on boards with a PCI bus, such functionality
+ * might be emulated externally.
+ *
+ * NOTE:  there still exists driver code that assumes
+ * this is defined, eg. drivers/sound/soundcard.c (as of 2.4).
+ */
+#define MAX_DMA_CHANNELS       8
+
+/*
+ * The maximum virtual address to which DMA transfers
+ * can be performed on this platform.
+ *
+ * NOTE: This is board (platform) specific, not processor-specific!
+ *
+ * NOTE: This assumes DMA transfers can only be performed on
+ *     the section of physical memory contiguously mapped in virtual
+ *     space for the kernel.  For the Xtensa architecture, this
+ *     means the maximum possible size of this DMA area is
+ *     the size of the statically mapped kernel segment
+ *     (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB.
+ *
+ * NOTE: When the entire KSEG area is DMA capable, we substract
+ *     one from the max address so that the virt_to_phys() macro
+ *     works correctly on the address (otherwise the address
+ *     enters another area, and virt_to_phys() may not return
+ *     the value desired).
+ */
+
+#define MAX_DMA_ADDRESS                (PAGE_OFFSET + XCHAL_KIO_SIZE - 1)
+
+
+/* Reserve and release a DMA channel */
+extern int request_dma(unsigned int dmanr, const char * device_id);
+extern void free_dma(unsigned int dmanr);
+
+#ifdef CONFIG_PCI
+extern int isa_dma_bridge_buggy;
+#else
+#define isa_dma_bridge_buggy   (0)
+#endif
+
+
+#endif
diff --git a/arch/xtensa/include/asm/elf.h b/arch/xtensa/include/asm/elf.h
new file mode 100644 (file)
index 0000000..c3f53e7
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * include/asm-xtensa/elf.h
+ *
+ * ELF register definitions
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_ELF_H
+#define _XTENSA_ELF_H
+
+#include <asm/ptrace.h>
+
+/* Xtensa processor ELF architecture-magic number */
+
+#define EM_XTENSA      94
+#define EM_XTENSA_OLD  0xABC7
+
+/* Xtensa relocations defined by the ABIs */
+
+#define R_XTENSA_NONE           0
+#define R_XTENSA_32             1
+#define R_XTENSA_RTLD           2
+#define R_XTENSA_GLOB_DAT       3
+#define R_XTENSA_JMP_SLOT       4
+#define R_XTENSA_RELATIVE       5
+#define R_XTENSA_PLT            6
+#define R_XTENSA_OP0            8
+#define R_XTENSA_OP1            9
+#define R_XTENSA_OP2            10
+#define R_XTENSA_ASM_EXPAND    11
+#define R_XTENSA_ASM_SIMPLIFY  12
+#define R_XTENSA_GNU_VTINHERIT 15
+#define R_XTENSA_GNU_VTENTRY   16
+#define R_XTENSA_DIFF8         17
+#define R_XTENSA_DIFF16                18
+#define R_XTENSA_DIFF32                19
+#define R_XTENSA_SLOT0_OP      20
+#define R_XTENSA_SLOT1_OP      21
+#define R_XTENSA_SLOT2_OP      22
+#define R_XTENSA_SLOT3_OP      23
+#define R_XTENSA_SLOT4_OP      24
+#define R_XTENSA_SLOT5_OP      25
+#define R_XTENSA_SLOT6_OP      26
+#define R_XTENSA_SLOT7_OP      27
+#define R_XTENSA_SLOT8_OP      28
+#define R_XTENSA_SLOT9_OP      29
+#define R_XTENSA_SLOT10_OP     30
+#define R_XTENSA_SLOT11_OP     31
+#define R_XTENSA_SLOT12_OP     32
+#define R_XTENSA_SLOT13_OP     33
+#define R_XTENSA_SLOT14_OP     34
+#define R_XTENSA_SLOT0_ALT     35
+#define R_XTENSA_SLOT1_ALT     36
+#define R_XTENSA_SLOT2_ALT     37
+#define R_XTENSA_SLOT3_ALT     38
+#define R_XTENSA_SLOT4_ALT     39
+#define R_XTENSA_SLOT5_ALT     40
+#define R_XTENSA_SLOT6_ALT     41
+#define R_XTENSA_SLOT7_ALT     42
+#define R_XTENSA_SLOT8_ALT     43
+#define R_XTENSA_SLOT9_ALT     44
+#define R_XTENSA_SLOT10_ALT    45
+#define R_XTENSA_SLOT11_ALT    46
+#define R_XTENSA_SLOT12_ALT    47
+#define R_XTENSA_SLOT13_ALT    48
+#define R_XTENSA_SLOT14_ALT    49
+
+/* ELF register definitions. This is needed for core dump support.  */
+
+typedef unsigned long elf_greg_t;
+
+typedef struct {
+       elf_greg_t pc;
+       elf_greg_t ps;
+       elf_greg_t lbeg;
+       elf_greg_t lend;
+       elf_greg_t lcount;
+       elf_greg_t sar;
+       elf_greg_t windowstart;
+       elf_greg_t windowbase;
+       elf_greg_t reserved[8+48];
+       elf_greg_t a[64];
+} xtensa_gregset_t;
+
+#define ELF_NGREG      (sizeof(xtensa_gregset_t) / sizeof(elf_greg_t))
+
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+#define ELF_NFPREG     18
+
+typedef unsigned int elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+#define ELF_CORE_COPY_REGS(_eregs, _pregs)                             \
+       xtensa_elf_core_copy_regs ((xtensa_gregset_t*)&(_eregs), _pregs);
+
+extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
+
+/*
+ * This is used to ensure we don't load something for the wrong architecture.
+ */
+
+#define elf_check_arch(x) ( ( (x)->e_machine == EM_XTENSA )  || \
+                           ( (x)->e_machine == EM_XTENSA_OLD ) )
+
+/*
+ * These are used to set parameters in the core dumps.
+ */
+
+#ifdef __XTENSA_EL__
+# define ELF_DATA      ELFDATA2LSB
+#elif defined(__XTENSA_EB__)
+# define ELF_DATA      ELFDATA2MSB
+#else
+# error processor byte order undefined!
+#endif
+
+#define ELF_CLASS      ELFCLASS32
+#define ELF_ARCH       EM_XTENSA
+
+#define USE_ELF_CORE_DUMP
+#define ELF_EXEC_PAGESIZE      PAGE_SIZE
+
+/*
+ * This is the location that an ET_DYN program is loaded if exec'ed.  Typical
+ * use of this is to invoke "./ld.so someprog" to test out a new version of
+ * the loader.  We need to make sure that it is out of the way of the program
+ * that it will "exec", and that there is sufficient room for the brk.
+ */
+
+#define ELF_ET_DYN_BASE         (2 * TASK_SIZE / 3)
+
+/*
+ * This yields a mask that user programs can use to figure out what
+ * instruction set this CPU supports.  This could be done in user space,
+ * but it's not easy, and we've already done it here.
+ */
+
+#define ELF_HWCAP      (0)
+
+/*
+ * This yields a string that ld.so will use to load implementation
+ * specific libraries for optimization.  This is more specific in
+ * intent than poking at uname or /proc/cpuinfo.
+ * For the moment, we have only optimizations for the Intel generations,
+ * but that could change...
+ */
+
+#define ELF_PLATFORM  (NULL)
+
+/*
+ * The Xtensa processor ABI says that when the program starts, a2
+ * contains a pointer to a function which might be registered using
+ * `atexit'.  This provides a mean for the dynamic linker to call
+ * DT_FINI functions for shared libraries that have been loaded before
+ * the code runs.
+ *
+ * A value of 0 tells we have no such handler.
+ *
+ * We might as well make sure everything else is cleared too (except
+ * for the stack pointer in a1), just to make things more
+ * deterministic.  Also, clearing a0 terminates debugger backtraces.
+ */
+
+#define ELF_PLAT_INIT(_r, load_addr) \
+  do { _r->areg[0]=0; /*_r->areg[1]=0;*/ _r->areg[2]=0;  _r->areg[3]=0;  \
+       _r->areg[4]=0;  _r->areg[5]=0;    _r->areg[6]=0;  _r->areg[7]=0;  \
+       _r->areg[8]=0;  _r->areg[9]=0;    _r->areg[10]=0; _r->areg[11]=0; \
+       _r->areg[12]=0; _r->areg[13]=0;   _r->areg[14]=0; _r->areg[15]=0; \
+  } while (0)
+
+typedef struct {
+       xtregs_opt_t    opt;
+       xtregs_user_t   user;
+#if XTENSA_HAVE_COPROCESSORS
+       xtregs_cp0_t    cp0;
+       xtregs_cp1_t    cp1;
+       xtregs_cp2_t    cp2;
+       xtregs_cp3_t    cp3;
+       xtregs_cp4_t    cp4;
+       xtregs_cp5_t    cp5;
+       xtregs_cp6_t    cp6;
+       xtregs_cp7_t    cp7;
+#endif
+} elf_xtregs_t;
+
+#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT)
+
+struct task_struct;
+
+extern void do_copy_regs (xtensa_gregset_t*, struct pt_regs*,
+                         struct task_struct*);
+extern void do_restore_regs (xtensa_gregset_t*, struct pt_regs*,
+                            struct task_struct*);
+extern void do_save_fpregs (elf_fpregset_t*, struct pt_regs*,
+                           struct task_struct*);
+extern int do_restore_fpregs (elf_fpregset_t*, struct pt_regs*,
+                             struct task_struct*);
+
+#endif /* _XTENSA_ELF_H */
diff --git a/arch/xtensa/include/asm/emergency-restart.h b/arch/xtensa/include/asm/emergency-restart.h
new file mode 100644 (file)
index 0000000..108d8c4
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_EMERGENCY_RESTART_H
+#define _ASM_EMERGENCY_RESTART_H
+
+#include <asm-generic/emergency-restart.h>
+
+#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/arch/xtensa/include/asm/errno.h b/arch/xtensa/include/asm/errno.h
new file mode 100644 (file)
index 0000000..a0f3b96
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/errno.h
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ *
+ * Copyright (C) 2002 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_ERRNO_H
+#define _XTENSA_ERRNO_H
+
+#include <asm-generic/errno.h>
+
+#endif /* _XTENSA_ERRNO_H */
diff --git a/arch/xtensa/include/asm/fb.h b/arch/xtensa/include/asm/fb.h
new file mode 100644 (file)
index 0000000..c7df380
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _ASM_FB_H_
+#define _ASM_FB_H_
+#include <linux/fb.h>
+
+#define fb_pgprotect(...) do {} while (0)
+
+static inline int fb_is_primary_device(struct fb_info *info)
+{
+       return 0;
+}
+
+#endif /* _ASM_FB_H_ */
diff --git a/arch/xtensa/include/asm/fcntl.h b/arch/xtensa/include/asm/fcntl.h
new file mode 100644 (file)
index 0000000..46ab12d
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/fcntl.h>
diff --git a/arch/xtensa/include/asm/futex.h b/arch/xtensa/include/asm/futex.h
new file mode 100644 (file)
index 0000000..0b74582
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/futex.h>
diff --git a/arch/xtensa/include/asm/hardirq.h b/arch/xtensa/include/asm/hardirq.h
new file mode 100644 (file)
index 0000000..87cb19d
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * include/asm-xtensa/hardirq.h
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ *
+ * Copyright (C) 2002 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_HARDIRQ_H
+#define _XTENSA_HARDIRQ_H
+
+#include <linux/cache.h>
+#include <asm/irq.h>
+
+/* headers.S is sensitive to the offsets of these fields */
+typedef struct {
+       unsigned int __softirq_pending;
+       unsigned int __syscall_count;
+       struct task_struct * __ksoftirqd_task; /* waitqueue is too large */
+       unsigned int __nmi_count;              /* arch dependent */
+} ____cacheline_aligned irq_cpustat_t;
+
+void ack_bad_irq(unsigned int irq);
+#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
+
+#endif /* _XTENSA_HARDIRQ_H */
diff --git a/arch/xtensa/include/asm/highmem.h b/arch/xtensa/include/asm/highmem.h
new file mode 100644 (file)
index 0000000..0a046ca
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * include/asm-xtensa/highmem.h
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ *
+ * Copyright (C) 2003 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_HIGHMEM_H
+#define _XTENSA_HIGHMEM_H
+
+extern void flush_cache_kmaps(void);
+
+#endif
+
diff --git a/arch/xtensa/include/asm/hw_irq.h b/arch/xtensa/include/asm/hw_irq.h
new file mode 100644 (file)
index 0000000..3ddbea7
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * include/asm-xtensa/hw_irq.h
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ *
+ * Copyright (C) 2002 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_HW_IRQ_H
+#define _XTENSA_HW_IRQ_H
+
+#endif
diff --git a/arch/xtensa/include/asm/io.h b/arch/xtensa/include/asm/io.h
new file mode 100644 (file)
index 0000000..07b7299
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * include/asm-xtensa/io.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_IO_H
+#define _XTENSA_IO_H
+
+#ifdef __KERNEL__
+#include <asm/byteorder.h>
+#include <asm/page.h>
+#include <linux/kernel.h>
+
+#include <linux/types.h>
+
+#define XCHAL_KIO_CACHED_VADDR 0xe0000000
+#define XCHAL_KIO_BYPASS_VADDR 0xf0000000
+#define XCHAL_KIO_PADDR                0xf0000000
+#define XCHAL_KIO_SIZE         0x10000000
+
+#define IOADDR(x)              (XCHAL_KIO_BYPASS_VADDR + (x))
+
+/*
+ * swap functions to change byte order from little-endian to big-endian and
+ * vice versa.
+ */
+
+static inline unsigned short _swapw (unsigned short v)
+{
+       return (v << 8) | (v >> 8);
+}
+
+static inline unsigned int _swapl (unsigned int v)
+{
+       return (v << 24) | ((v & 0xff00) << 8) | ((v >> 8) & 0xff00) | (v >> 24);
+}
+
+/*
+ * Change virtual addresses to physical addresses and vv.
+ * These are trivial on the 1:1 Linux/Xtensa mapping
+ */
+
+static inline unsigned long virt_to_phys(volatile void * address)
+{
+       return __pa(address);
+}
+
+static inline void * phys_to_virt(unsigned long address)
+{
+       return __va(address);
+}
+
+/*
+ * virt_to_bus and bus_to_virt are deprecated.
+ */
+
+#define virt_to_bus(x) virt_to_phys(x)
+#define bus_to_virt(x) phys_to_virt(x)
+
+/*
+ * Return the virtual (cached) address for the specified bus memory.
+ * Note that we currently don't support any address outside the KIO segment.
+ */
+
+static inline void *ioremap(unsigned long offset, unsigned long size)
+{
+       if (offset >= XCHAL_KIO_PADDR
+           && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
+               return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR);
+
+       else
+               BUG();
+}
+
+static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
+{
+       if (offset >= XCHAL_KIO_PADDR
+           && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
+               return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR);
+       else
+               BUG();
+}
+
+static inline void iounmap(void *addr)
+{
+}
+
+/*
+ * Generic I/O
+ */
+
+#define readb(addr) \
+       ({ unsigned char __v = (*(volatile unsigned char *)(addr)); __v; })
+#define readw(addr) \
+       ({ unsigned short __v = (*(volatile unsigned short *)(addr)); __v; })
+#define readl(addr) \
+       ({ unsigned int __v = (*(volatile unsigned int *)(addr)); __v; })
+#define writeb(b, addr) (void)((*(volatile unsigned char *)(addr)) = (b))
+#define writew(b, addr) (void)((*(volatile unsigned short *)(addr)) = (b))
+#define writel(b, addr) (void)((*(volatile unsigned int *)(addr)) = (b))
+
+static inline __u8 __raw_readb(const volatile void __iomem *addr)
+{
+          return *(__force volatile __u8 *)(addr);
+}
+static inline __u16 __raw_readw(const volatile void __iomem *addr)
+{
+          return *(__force volatile __u16 *)(addr);
+}
+static inline __u32 __raw_readl(const volatile void __iomem *addr)
+{
+          return *(__force volatile __u32 *)(addr);
+}
+static inline void __raw_writeb(__u8 b, volatile void __iomem *addr)
+{
+          *(__force volatile __u8 *)(addr) = b;
+}
+static inline void __raw_writew(__u16 b, volatile void __iomem *addr)
+{
+          *(__force volatile __u16 *)(addr) = b;
+}
+static inline void __raw_writel(__u32 b, volatile void __iomem *addr)
+{
+          *(__force volatile __u32 *)(addr) = b;
+}
+
+/* These are the definitions for the x86 IO instructions
+ * inb/inw/inl/outb/outw/outl, the "string" versions
+ * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions
+ * inb_p/inw_p/...
+ * The macros don't do byte-swapping.
+ */
+
+#define inb(port)              readb((u8 *)((port)))
+#define outb(val, port)                writeb((val),(u8 *)((unsigned long)(port)))
+#define inw(port)              readw((u16 *)((port)))
+#define outw(val, port)                writew((val),(u16 *)((unsigned long)(port)))
+#define inl(port)              readl((u32 *)((port)))
+#define outl(val, port)                writel((val),(u32 *)((unsigned long)(port)))
+
+#define inb_p(port)            inb((port))
+#define outb_p(val, port)      outb((val), (port))
+#define inw_p(port)            inw((port))
+#define outw_p(val, port)      outw((val), (port))
+#define inl_p(port)            inl((port))
+#define outl_p(val, port)      outl((val), (port))
+
+extern void insb (unsigned long port, void *dst, unsigned long count);
+extern void insw (unsigned long port, void *dst, unsigned long count);
+extern void insl (unsigned long port, void *dst, unsigned long count);
+extern void outsb (unsigned long port, const void *src, unsigned long count);
+extern void outsw (unsigned long port, const void *src, unsigned long count);
+extern void outsl (unsigned long port, const void *src, unsigned long count);
+
+#define IO_SPACE_LIMIT ~0
+
+#define memset_io(a,b,c)       memset((void *)(a),(b),(c))
+#define memcpy_fromio(a,b,c)   memcpy((a),(void *)(b),(c))
+#define memcpy_toio(a,b,c)      memcpy((void *)(a),(b),(c))
+
+/* At this point the Xtensa doesn't provide byte swap instructions */
+
+#ifdef __XTENSA_EB__
+# define in_8(addr) (*(u8*)(addr))
+# define in_le16(addr) _swapw(*(u16*)(addr))
+# define in_le32(addr) _swapl(*(u32*)(addr))
+# define out_8(b, addr) *(u8*)(addr) = (b)
+# define out_le16(b, addr) *(u16*)(addr) = _swapw(b)
+# define out_le32(b, addr) *(u32*)(addr) = _swapl(b)
+#elif defined(__XTENSA_EL__)
+# define in_8(addr)  (*(u8*)(addr))
+# define in_le16(addr) (*(u16*)(addr))
+# define in_le32(addr) (*(u32*)(addr))
+# define out_8(b, addr) *(u8*)(addr) = (b)
+# define out_le16(b, addr) *(u16*)(addr) = (b)
+# define out_le32(b, addr) *(u32*)(addr) = (b)
+#else
+# error processor byte order undefined!
+#endif
+
+
+/*
+ * Convert a physical pointer to a virtual kernel pointer for /dev/mem access
+ */
+#define xlate_dev_mem_ptr(p)    __va(p)
+
+/*
+ * Convert a virtual cached pointer to an uncached pointer
+ */
+#define xlate_dev_kmem_ptr(p)   p
+
+
+#endif /* __KERNEL__ */
+
+#endif /* _XTENSA_IO_H */
diff --git a/arch/xtensa/include/asm/ioctl.h b/arch/xtensa/include/asm/ioctl.h
new file mode 100644 (file)
index 0000000..b279fe0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/ioctl.h>
diff --git a/arch/xtensa/include/asm/ioctls.h b/arch/xtensa/include/asm/ioctls.h
new file mode 100644 (file)
index 0000000..0ffa942
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * include/asm-xtensa/ioctls.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 - 2005 Tensilica Inc.
+ *
+ * Derived from "include/asm-i386/ioctls.h"
+ */
+
+#ifndef _XTENSA_IOCTLS_H
+#define _XTENSA_IOCTLS_H
+
+#include <asm/ioctl.h>
+
+#define FIOCLEX                _IO('f', 1)
+#define FIONCLEX       _IO('f', 2)
+#define FIOASYNC       _IOW('f', 125, int)
+#define FIONBIO                _IOW('f', 126, int)
+#define FIONREAD       _IOR('f', 127, int)
+#define TIOCINQ                FIONREAD
+#define FIOQSIZE       _IOR('f', 128, loff_t)
+
+#define TCGETS         0x5401
+#define TCSETS         0x5402
+#define TCSETSW                0x5403
+#define TCSETSF                0x5404
+
+#define TCGETA         _IOR('t', 23, struct termio)
+#define TCSETA         _IOW('t', 24, struct termio)
+#define TCSETAW                _IOW('t', 25, struct termio)
+#define TCSETAF                _IOW('t', 28, struct termio)
+
+#define TCSBRK         _IO('t', 29)
+#define TCXONC         _IO('t', 30)
+#define TCFLSH         _IO('t', 31)
+
+#define TIOCSWINSZ     _IOW('t', 103, struct winsize)
+#define TIOCGWINSZ     _IOR('t', 104, struct winsize)
+#define        TIOCSTART       _IO('t', 110)           /* start output, like ^Q */
+#define        TIOCSTOP        _IO('t', 111)           /* stop output, like ^S */
+#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
+
+#define TIOCSPGRP      _IOW('t', 118, int)
+#define TIOCGPGRP      _IOR('t', 119, int)
+
+#define TIOCEXCL       _IO('T', 12)
+#define TIOCNXCL       _IO('T', 13)
+#define TIOCSCTTY      _IO('T', 14)
+
+#define TIOCSTI                _IOW('T', 18, char)
+#define TIOCMGET       _IOR('T', 21, unsigned int)
+#define TIOCMBIS       _IOW('T', 22, unsigned int)
+#define TIOCMBIC       _IOW('T', 23, unsigned int)
+#define TIOCMSET       _IOW('T', 24, unsigned int)
+# define TIOCM_LE      0x001
+# define TIOCM_DTR     0x002
+# define TIOCM_RTS     0x004
+# define TIOCM_ST      0x008
+# define TIOCM_SR      0x010
+# define TIOCM_CTS     0x020
+# define TIOCM_CAR     0x040
+# define TIOCM_RNG     0x080
+# define TIOCM_DSR     0x100
+# define TIOCM_CD      TIOCM_CAR
+# define TIOCM_RI      TIOCM_RNG
+
+#define TIOCGSOFTCAR   _IOR('T', 25, unsigned int)
+#define TIOCSSOFTCAR   _IOW('T', 26, unsigned int)
+#define TIOCLINUX      _IOW('T', 28, char)
+#define TIOCCONS       _IO('T', 29)
+#define TIOCGSERIAL    _IOR('T', 30, struct serial_struct)
+#define TIOCSSERIAL    _IOW('T', 31, struct serial_struct)
+#define TIOCPKT                _IOW('T', 32, int)
+# define TIOCPKT_DATA           0
+# define TIOCPKT_FLUSHREAD      1
+# define TIOCPKT_FLUSHWRITE     2
+# define TIOCPKT_STOP           4
+# define TIOCPKT_START          8
+# define TIOCPKT_NOSTOP                16
+# define TIOCPKT_DOSTOP                32
+
+
+#define TIOCNOTTY      _IO('T', 34)
+#define TIOCSETD       _IOW('T', 35, int)
+#define TIOCGETD       _IOR('T', 36, int)
+#define TCSBRKP                _IOW('T', 37, int)   /* Needed for POSIX tcsendbreak()*/
+#define TIOCTTYGSTRUCT _IOR('T', 38, struct tty_struct) /* For debugging only*/
+#define TIOCSBRK       _IO('T', 39)         /* BSD compatibility */
+#define TIOCCBRK       _IO('T', 40)         /* BSD compatibility */
+#define TIOCGSID       _IOR('T', 41, pid_t) /* Return the session ID of FD*/
+#define TCGETS2                _IOR('T', 42, struct termios2)
+#define TCSETS2                _IOW('T', 43, struct termios2)
+#define TCSETSW2       _IOW('T', 44, struct termios2)
+#define TCSETSF2       _IOW('T', 45, struct termios2)
+#define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+#define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+
+#define TIOCSERCONFIG  _IO('T', 83)
+#define TIOCSERGWILD   _IOR('T', 84,  int)
+#define TIOCSERSWILD   _IOW('T', 85,  int)
+#define TIOCGLCKTRMIOS 0x5456
+#define TIOCSLCKTRMIOS 0x5457
+#define TIOCSERGSTRUCT 0x5458               /* For debugging only */
+#define TIOCSERGETLSR   _IOR('T', 89, unsigned int) /* Get line status reg. */
+  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+# define TIOCSER_TEMT    0x01               /* Transmitter physically empty */
+#define TIOCSERGETMULTI _IOR('T', 90, struct serial_multiport_struct) /* Get multiport config  */
+#define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* Set multiport config */
+
+#define TIOCMIWAIT     _IO('T', 92) /* wait for a change on serial input line(s) */
+#define TIOCGICOUNT    0x545D  /* read serial port inline interrupt counts */
+
+#endif /* _XTENSA_IOCTLS_H */
diff --git a/arch/xtensa/include/asm/ipcbuf.h b/arch/xtensa/include/asm/ipcbuf.h
new file mode 100644 (file)
index 0000000..c33aa6a
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * include/asm-xtensa/ipcbuf.h
+ *
+ * The ipc64_perm structure for the Xtensa architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_IPCBUF_H
+#define _XTENSA_IPCBUF_H
+
+/*
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ */
+
+struct ipc64_perm
+{
+       __kernel_key_t          key;
+       __kernel_uid32_t        uid;
+       __kernel_gid32_t        gid;
+       __kernel_uid32_t        cuid;
+       __kernel_gid32_t        cgid;
+       __kernel_mode_t         mode;
+       unsigned long           seq;
+       unsigned long           __unused1;
+       unsigned long           __unused2;
+};
+
+#endif /* _XTENSA_IPCBUF_H */
diff --git a/arch/xtensa/include/asm/irq.h b/arch/xtensa/include/asm/irq.h
new file mode 100644 (file)
index 0000000..1620d1e
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * include/asm-xtensa/irq.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_IRQ_H
+#define _XTENSA_IRQ_H
+
+#include <platform/hardware.h>
+#include <variant/core.h>
+
+#ifndef PLATFORM_NR_IRQS
+# define PLATFORM_NR_IRQS 0
+#endif
+#define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS
+#define NR_IRQS (XTENSA_NR_IRQS + PLATFORM_NR_IRQS)
+
+static __inline__ int irq_canonicalize(int irq)
+{
+       return (irq);
+}
+
+struct irqaction;
+
+#endif /* _XTENSA_IRQ_H */
diff --git a/arch/xtensa/include/asm/irq_regs.h b/arch/xtensa/include/asm/irq_regs.h
new file mode 100644 (file)
index 0000000..3dd9c0b
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/irq_regs.h>
diff --git a/arch/xtensa/include/asm/kdebug.h b/arch/xtensa/include/asm/kdebug.h
new file mode 100644 (file)
index 0000000..6ece1b0
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/kdebug.h>
diff --git a/arch/xtensa/include/asm/kmap_types.h b/arch/xtensa/include/asm/kmap_types.h
new file mode 100644 (file)
index 0000000..9e822d2
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * include/asm-xtensa/kmap_types.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_KMAP_TYPES_H
+#define _XTENSA_KMAP_TYPES_H
+
+enum km_type {
+  KM_BOUNCE_READ,
+  KM_SKB_SUNRPC_DATA,
+  KM_SKB_DATA_SOFTIRQ,
+  KM_USER0,
+  KM_USER1,
+  KM_BIO_SRC_IRQ,
+  KM_BIO_DST_IRQ,
+  KM_PTE0,
+  KM_PTE1,
+  KM_IRQ0,
+  KM_IRQ1,
+  KM_SOFTIRQ0,
+  KM_SOFTIRQ1,
+  KM_TYPE_NR
+};
+
+#endif /* _XTENSA_KMAP_TYPES_H */
diff --git a/arch/xtensa/include/asm/linkage.h b/arch/xtensa/include/asm/linkage.h
new file mode 100644 (file)
index 0000000..bf2128a
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/linkage.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_LINKAGE_H
+#define _XTENSA_LINKAGE_H
+
+/* Nothing to do here ... */
+
+#endif /* _XTENSA_LINKAGE_H */
diff --git a/arch/xtensa/include/asm/local.h b/arch/xtensa/include/asm/local.h
new file mode 100644 (file)
index 0000000..48723e5
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/local.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_LOCAL_H
+#define _XTENSA_LOCAL_H
+
+#include <asm-generic/local.h>
+
+#endif /* _XTENSA_LOCAL_H */
diff --git a/arch/xtensa/include/asm/mman.h b/arch/xtensa/include/asm/mman.h
new file mode 100644 (file)
index 0000000..9b92620
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * include/asm-xtensa/mman.h
+ *
+ * Xtensa Processor memory-manager definitions
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1995 by Ralf Baechle
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_MMAN_H
+#define _XTENSA_MMAN_H
+
+/*
+ * Protections are chosen from these bits, OR'd together.  The
+ * implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ * without PROT_READ.  The only guarantees are that no writing will be
+ * allowed without PROT_WRITE and no access will be allowed for PROT_NONE.
+ */
+
+#define PROT_NONE      0x0             /* page can not be accessed */
+#define PROT_READ      0x1             /* page can be read */
+#define PROT_WRITE     0x2             /* page can be written */
+#define PROT_EXEC      0x4             /* page can be executed */
+
+#define PROT_SEM       0x10            /* page may be used for atomic ops */
+#define PROT_GROWSDOWN 0x01000000      /* mprotect flag: extend change to start of growsdown vma */
+#define PROT_GROWSUP   0x02000000      /* mprotect flag: extend change to end fo growsup vma */
+
+/*
+ * Flags for mmap
+ */
+#define MAP_SHARED     0x001           /* Share changes */
+#define MAP_PRIVATE    0x002           /* Changes are private */
+#define MAP_TYPE       0x00f           /* Mask for type of mapping */
+#define MAP_FIXED      0x010           /* Interpret addr exactly */
+
+/* not used by linux, but here to make sure we don't clash with ABI defines */
+#define MAP_RENAME     0x020           /* Assign page to file */
+#define MAP_AUTOGROW   0x040           /* File may grow by writing */
+#define MAP_LOCAL      0x080           /* Copy on fork/sproc */
+#define MAP_AUTORSRV   0x100           /* Logical swap reserved on demand */
+
+/* These are linux-specific */
+#define MAP_NORESERVE  0x0400          /* don't check for reservations */
+#define MAP_ANONYMOUS  0x0800          /* don't use a file */
+#define MAP_GROWSDOWN  0x1000          /* stack-like segment */
+#define MAP_DENYWRITE  0x2000          /* ETXTBSY */
+#define MAP_EXECUTABLE 0x4000          /* mark it as an executable */
+#define MAP_LOCKED     0x8000          /* pages are locked */
+#define MAP_POPULATE   0x10000         /* populate (prefault) pagetables */
+#define MAP_NONBLOCK   0x20000         /* do not block on IO */
+
+/*
+ * Flags for msync
+ */
+#define MS_ASYNC       0x0001          /* sync memory asynchronously */
+#define MS_INVALIDATE  0x0002          /* invalidate mappings & caches */
+#define MS_SYNC                0x0004          /* synchronous memory sync */
+
+/*
+ * Flags for mlockall
+ */
+#define MCL_CURRENT    1               /* lock all current mappings */
+#define MCL_FUTURE     2               /* lock all future mappings */
+
+#define MADV_NORMAL    0               /* no further special treatment */
+#define MADV_RANDOM    1               /* expect random page references */
+#define MADV_SEQUENTIAL        2               /* expect sequential page references */
+#define MADV_WILLNEED  3               /* will need these pages */
+#define MADV_DONTNEED  4               /* don't need these pages */
+
+/* common parameters: try to keep these consistent across architectures */
+#define MADV_REMOVE    9               /* remove these pages & resources */
+#define MADV_DONTFORK  10              /* don't inherit across fork */
+#define MADV_DOFORK    11              /* do inherit across fork */
+
+/* compatibility flags */
+#define MAP_FILE       0
+
+#endif /* _XTENSA_MMAN_H */
diff --git a/arch/xtensa/include/asm/mmu.h b/arch/xtensa/include/asm/mmu.h
new file mode 100644 (file)
index 0000000..44c5bb0
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * include/asm-xtensa/mmu.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_MMU_H
+#define _XTENSA_MMU_H
+
+/* Default "unsigned long" context */
+typedef unsigned long mm_context_t;
+
+#endif /* _XTENSA_MMU_H */
diff --git a/arch/xtensa/include/asm/mmu_context.h b/arch/xtensa/include/asm/mmu_context.h
new file mode 100644 (file)
index 0000000..c0fd8e5
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * include/asm-xtensa/mmu_context.h
+ *
+ * Switch an MMU context.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_MMU_CONTEXT_H
+#define _XTENSA_MMU_CONTEXT_H
+
+#include <linux/stringify.h>
+#include <linux/sched.h>
+
+#include <asm/pgtable.h>
+#include <asm/cacheflush.h>
+#include <asm/tlbflush.h>
+#include <asm-generic/mm_hooks.h>
+
+#define XCHAL_MMU_ASID_BITS    8
+
+#if (XCHAL_HAVE_TLBS != 1)
+# error "Linux must have an MMU!"
+#endif
+
+extern unsigned long asid_cache;
+
+/*
+ * NO_CONTEXT is the invalid ASID value that we don't ever assign to
+ * any user or kernel context.
+ *
+ * 0 invalid
+ * 1 kernel
+ * 2 reserved
+ * 3 reserved
+ * 4...255 available
+ */
+
+#define NO_CONTEXT     0
+#define ASID_USER_FIRST        4
+#define ASID_MASK      ((1 << XCHAL_MMU_ASID_BITS) - 1)
+#define ASID_INSERT(x) (0x03020001 | (((x) & ASID_MASK) << 8))
+
+static inline void set_rasid_register (unsigned long val)
+{
+       __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t"
+                             " isync\n" : : "a" (val));
+}
+
+static inline unsigned long get_rasid_register (void)
+{
+       unsigned long tmp;
+       __asm__ __volatile__ (" rsr %0,"__stringify(RASID)"\n\t" : "=a" (tmp));
+       return tmp;
+}
+
+static inline void
+__get_new_mmu_context(struct mm_struct *mm)
+{
+       extern void flush_tlb_all(void);
+       if (! (++asid_cache & ASID_MASK) ) {
+               flush_tlb_all(); /* start new asid cycle */
+               asid_cache += ASID_USER_FIRST;
+       }
+       mm->context = asid_cache;
+}
+
+static inline void
+__load_mmu_context(struct mm_struct *mm)
+{
+       set_rasid_register(ASID_INSERT(mm->context));
+       invalidate_page_directory();
+}
+
+/*
+ * Initialize the context related info for a new mm_struct
+ * instance.
+ */
+
+static inline int
+init_new_context(struct task_struct *tsk, struct mm_struct *mm)
+{
+       mm->context = NO_CONTEXT;
+       return 0;
+}
+
+/*
+ * After we have set current->mm to a new value, this activates
+ * the context for the new mm so we see the new mappings.
+ */
+static inline void
+activate_mm(struct mm_struct *prev, struct mm_struct *next)
+{
+       /* Unconditionally get a new ASID.  */
+
+       __get_new_mmu_context(next);
+       __load_mmu_context(next);
+}
+
+
+static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
+                             struct task_struct *tsk)
+{
+       unsigned long asid = asid_cache;
+
+       /* Check if our ASID is of an older version and thus invalid */
+
+       if (next->context == NO_CONTEXT || ((next->context^asid) & ~ASID_MASK))
+               __get_new_mmu_context(next);
+
+       __load_mmu_context(next);
+}
+
+#define deactivate_mm(tsk, mm) do { } while(0)
+
+/*
+ * Destroy context related info for an mm_struct that is about
+ * to be put to rest.
+ */
+static inline void destroy_context(struct mm_struct *mm)
+{
+       invalidate_page_directory();
+}
+
+
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
+{
+       /* Nothing to do. */
+
+}
+
+#endif /* _XTENSA_MMU_CONTEXT_H */
diff --git a/arch/xtensa/include/asm/module.h b/arch/xtensa/include/asm/module.h
new file mode 100644 (file)
index 0000000..d9b34be
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * include/asm-xtensa/module.h
+ *
+ * This file contains the module code specific to the Xtensa architecture.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_MODULE_H
+#define _XTENSA_MODULE_H
+
+struct mod_arch_specific
+{
+       /* No special elements, yet. */
+};
+
+#define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " "
+
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Ehdr Elf32_Ehdr
+
+#endif /* _XTENSA_MODULE_H */
diff --git a/arch/xtensa/include/asm/msgbuf.h b/arch/xtensa/include/asm/msgbuf.h
new file mode 100644 (file)
index 0000000..693c967
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * include/asm-xtensa/msgbuf.h
+ *
+ * The msqid64_ds structure for the Xtensa architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ */
+
+#ifndef _XTENSA_MSGBUF_H
+#define _XTENSA_MSGBUF_H
+
+struct msqid64_ds {
+       struct ipc64_perm msg_perm;
+#ifdef __XTENSA_EB__
+       unsigned int    __unused1;
+       __kernel_time_t msg_stime;      /* last msgsnd time */
+       unsigned int    __unused2;
+       __kernel_time_t msg_rtime;      /* last msgrcv time */
+       unsigned int    __unused3;
+       __kernel_time_t msg_ctime;      /* last change time */
+#elif defined(__XTENSA_EL__)
+       __kernel_time_t msg_stime;      /* last msgsnd time */
+       unsigned int    __unused1;
+       __kernel_time_t msg_rtime;      /* last msgrcv time */
+       unsigned int    __unused2;
+       __kernel_time_t msg_ctime;      /* last change time */
+       unsigned int    __unused3;
+#else
+# error processor byte order undefined!
+#endif
+       unsigned long  msg_cbytes;      /* current number of bytes on queue */
+       unsigned long  msg_qnum;        /* number of messages in queue */
+       unsigned long  msg_qbytes;      /* max number of bytes on queue */
+       __kernel_pid_t msg_lspid;       /* pid of last msgsnd */
+       __kernel_pid_t msg_lrpid;       /* last receive pid */
+       unsigned long  __unused4;
+       unsigned long  __unused5;
+};
+
+#endif /* _XTENSA_MSGBUF_H */
diff --git a/arch/xtensa/include/asm/mutex.h b/arch/xtensa/include/asm/mutex.h
new file mode 100644 (file)
index 0000000..458c1f7
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * Pull in the generic implementation for the mutex fastpath.
+ *
+ * TODO: implement optimized primitives instead, or leave the generic
+ * implementation in place, or pick the atomic_xchg() based generic
+ * implementation. (see asm-generic/mutex-xchg.h for details)
+ */
+
+#include <asm-generic/mutex-dec.h>
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h
new file mode 100644 (file)
index 0000000..11f7dc2
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * include/asm-xtensa/page.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version2 as
+ * published by the Free Software Foundation.
+ *
+ * Copyright (C) 2001 - 2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PAGE_H
+#define _XTENSA_PAGE_H
+
+#include <asm/processor.h>
+#include <asm/types.h>
+#include <asm/cache.h>
+
+/*
+ * Fixed TLB translations in the processor.
+ */
+
+#define XCHAL_KSEG_CACHED_VADDR 0xd0000000
+#define XCHAL_KSEG_BYPASS_VADDR 0xd8000000
+#define XCHAL_KSEG_PADDR        0x00000000
+#define XCHAL_KSEG_SIZE         0x08000000
+
+/*
+ * PAGE_SHIFT determines the page size
+ */
+
+#define PAGE_SHIFT             12
+#define PAGE_SIZE              (__XTENSA_UL_CONST(1) << PAGE_SHIFT)
+#define PAGE_MASK              (~(PAGE_SIZE-1))
+
+#define PAGE_OFFSET            XCHAL_KSEG_CACHED_VADDR
+#define MAX_MEM_PFN            XCHAL_KSEG_SIZE
+#define PGTABLE_START          0x80000000
+
+/*
+ * Cache aliasing:
+ *
+ * If the cache size for one way is greater than the page size, we have to
+ * deal with cache aliasing. The cache index is wider than the page size:
+ *
+ * |    |cache| cache index
+ * | pfn  |off|        virtual address
+ * |xxxx:X|zzz|
+ * |    : |   |
+ * | \  / |   |
+ * |trans.|   |
+ * | /  \ |   |
+ * |yyyy:Y|zzz|        physical address
+ *
+ * When the page number is translated to the physical page address, the lowest
+ * bit(s) (X) that are part of the cache index are also translated (Y).
+ * If this translation changes bit(s) (X), the cache index is also afected,
+ * thus resulting in a different cache line than before.
+ * The kernel does not provide a mechanism to ensure that the page color
+ * (represented by this bit) remains the same when allocated or when pages
+ * are remapped. When user pages are mapped into kernel space, the color of
+ * the page might also change.
+ *
+ * We use the address space VMALLOC_END ... VMALLOC_END + DCACHE_WAY_SIZE * 2
+ * to temporarily map a patch so we can match the color.
+ */
+
+#if DCACHE_WAY_SIZE > PAGE_SIZE
+# define DCACHE_ALIAS_ORDER    (DCACHE_WAY_SHIFT - PAGE_SHIFT)
+# define DCACHE_ALIAS_MASK     (PAGE_MASK & (DCACHE_WAY_SIZE - 1))
+# define DCACHE_ALIAS(a)       (((a) & DCACHE_ALIAS_MASK) >> PAGE_SHIFT)
+# define DCACHE_ALIAS_EQ(a,b)  ((((a) ^ (b)) & DCACHE_ALIAS_MASK) == 0)
+#else
+# define DCACHE_ALIAS_ORDER    0
+#endif
+
+#if ICACHE_WAY_SIZE > PAGE_SIZE
+# define ICACHE_ALIAS_ORDER    (ICACHE_WAY_SHIFT - PAGE_SHIFT)
+# define ICACHE_ALIAS_MASK     (PAGE_MASK & (ICACHE_WAY_SIZE - 1))
+# define ICACHE_ALIAS(a)       (((a) & ICACHE_ALIAS_MASK) >> PAGE_SHIFT)
+# define ICACHE_ALIAS_EQ(a,b)  ((((a) ^ (b)) & ICACHE_ALIAS_MASK) == 0)
+#else
+# define ICACHE_ALIAS_ORDER    0
+#endif
+
+
+#ifdef __ASSEMBLY__
+
+#define __pgprot(x)    (x)
+
+#else
+
+/*
+ * These are used to make use of C type-checking..
+ */
+
+typedef struct { unsigned long pte; } pte_t;           /* page table entry */
+typedef struct { unsigned long pgd; } pgd_t;           /* PGD table entry */
+typedef struct { unsigned long pgprot; } pgprot_t;
+typedef struct page *pgtable_t;
+
+#define pte_val(x)     ((x).pte)
+#define pgd_val(x)     ((x).pgd)
+#define pgprot_val(x)  ((x).pgprot)
+
+#define __pte(x)       ((pte_t) { (x) } )
+#define __pgd(x)       ((pgd_t) { (x) } )
+#define __pgprot(x)    ((pgprot_t) { (x) } )
+
+/*
+ * Pure 2^n version of get_order
+ * Use 'nsau' instructions if supported by the processor or the generic version.
+ */
+
+#if XCHAL_HAVE_NSA
+
+static inline __attribute_const__ int get_order(unsigned long size)
+{
+       int lz;
+       asm ("nsau %0, %1" : "=r" (lz) : "r" ((size - 1) >> PAGE_SHIFT));
+       return 32 - lz;
+}
+
+#else
+
+# include <asm-generic/page.h>
+
+#endif
+
+struct page;
+extern void clear_page(void *page);
+extern void copy_page(void *to, void *from);
+
+/*
+ * If we have cache aliasing and writeback caches, we might have to do
+ * some extra work
+ */
+
+#if DCACHE_WAY_SIZE > PAGE_SIZE
+extern void clear_user_page(void*, unsigned long, struct page*);
+extern void copy_user_page(void*, void*, unsigned long, struct page*);
+#else
+# define clear_user_page(page, vaddr, pg)      clear_page(page)
+# define copy_user_page(to, from, vaddr, pg)   copy_page(to, from)
+#endif
+
+/*
+ * This handles the memory map.  We handle pages at
+ * XCHAL_KSEG_CACHED_VADDR for kernels with 32 bit address space.
+ * These macros are for conversion of kernel address, not user
+ * addresses.
+ */
+
+#define __pa(x)                        ((unsigned long) (x) - PAGE_OFFSET)
+#define __va(x)                        ((void *)((unsigned long) (x) + PAGE_OFFSET))
+#define pfn_valid(pfn)         ((unsigned long)pfn < max_mapnr)
+#ifdef CONFIG_DISCONTIGMEM
+# error CONFIG_DISCONTIGMEM not supported
+#endif
+
+#define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
+#define page_to_virt(page)     __va(page_to_pfn(page) << PAGE_SHIFT)
+#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+#define page_to_phys(page)     (page_to_pfn(page) << PAGE_SHIFT)
+
+#define WANT_PAGE_VIRTUAL
+
+
+#endif /* __ASSEMBLY__ */
+
+#define VM_DATA_DEFAULT_FLAGS  (VM_READ | VM_WRITE | VM_EXEC | \
+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+
+#include <asm-generic/memory_model.h>
+#endif /* _XTENSA_PAGE_H */
diff --git a/arch/xtensa/include/asm/param.h b/arch/xtensa/include/asm/param.h
new file mode 100644 (file)
index 0000000..ba03d5a
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * include/asm-xtensa/param.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PARAM_H
+#define _XTENSA_PARAM_H
+
+#ifdef __KERNEL__
+# define HZ            CONFIG_HZ       /* internal timer frequency */
+# define USER_HZ       100             /* for user interfaces in "ticks" */
+# define CLOCKS_PER_SEC (USER_HZ)      /* frequnzy at which times() counts */
+#else
+# define HZ            100
+#endif
+
+#define EXEC_PAGESIZE  4096
+
+#ifndef NGROUPS
+#define NGROUPS                32
+#endif
+
+#ifndef NOGROUP
+#define NOGROUP                (-1)
+#endif
+
+#define MAXHOSTNAMELEN 64      /* max length of hostname */
+
+#endif /* _XTENSA_PARAM_H */
diff --git a/arch/xtensa/include/asm/pci-bridge.h b/arch/xtensa/include/asm/pci-bridge.h
new file mode 100644 (file)
index 0000000..00fcbd7
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * include/asm-xtensa/pci-bridge.h
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ *
+ * Copyright (C) 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PCI_BRIDGE_H
+#define _XTENSA_PCI_BRIDGE_H
+
+#ifdef __KERNEL__
+
+struct device_node;
+struct pci_controller;
+
+/*
+ * pciauto_bus_scan() enumerates the pci space.
+ */
+
+extern int pciauto_bus_scan(struct pci_controller *, int);
+
+struct pci_space {
+       unsigned long start;
+       unsigned long end;
+       unsigned long base;
+};
+
+/*
+ * Structure of a PCI controller (host bridge)
+ */
+
+struct pci_controller {
+       int index;                      /* used for pci_controller_num */
+       struct pci_controller *next;
+        struct pci_bus *bus;
+       void *arch_data;
+
+       int first_busno;
+       int last_busno;
+
+       struct pci_ops *ops;
+       volatile unsigned int *cfg_addr;
+       volatile unsigned char *cfg_data;
+
+       /* Currently, we limit ourselves to 1 IO range and 3 mem
+        * ranges since the common pci_bus structure can't handle more
+        */
+       struct resource io_resource;
+       struct resource mem_resources[3];
+       int mem_resource_count;
+
+       /* Host bridge I/O and Memory space
+        * Used for BAR placement algorithms
+        */
+       struct pci_space io_space;
+       struct pci_space mem_space;
+
+       /* Return the interrupt number fo a device. */
+       int (*map_irq)(struct pci_dev*, u8, u8);
+
+};
+
+static inline void pcibios_init_resource(struct resource *res,
+               unsigned long start, unsigned long end, int flags, char *name)
+{
+       res->start = start;
+       res->end = end;
+       res->flags = flags;
+       res->name = name;
+       res->parent = NULL;
+       res->sibling = NULL;
+       res->child = NULL;
+}
+
+
+/* These are used for config access before all the PCI probing has been done. */
+int early_read_config_byte(struct pci_controller*, int, int, int, u8*);
+int early_read_config_word(struct pci_controller*, int, int, int, u16*);
+int early_read_config_dword(struct pci_controller*, int, int, int, u32*);
+int early_write_config_byte(struct pci_controller*, int, int, int, u8);
+int early_write_config_word(struct pci_controller*, int, int, int, u16);
+int early_write_config_dword(struct pci_controller*, int, int, int, u32);
+
+#endif /* __KERNEL__ */
+#endif /* _XTENSA_PCI_BRIDGE_H */
diff --git a/arch/xtensa/include/asm/pci.h b/arch/xtensa/include/asm/pci.h
new file mode 100644 (file)
index 0000000..66410ac
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * linux/include/asm-xtensa/pci.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PCI_H
+#define _XTENSA_PCI_H
+
+#ifdef __KERNEL__
+
+/* Can be used to override the logic in pci_scan_bus for skipping
+ * already-configured bus numbers - to be used for buggy BIOSes
+ * or architectures with incomplete PCI setup by the loader
+ */
+
+#define pcibios_assign_all_busses()    0
+
+extern struct pci_controller* pcibios_alloc_controller(void);
+
+static inline void pcibios_set_master(struct pci_dev *dev)
+{
+       /* No special bus mastering setup handling */
+}
+
+static inline void pcibios_penalize_isa_irq(int irq)
+{
+       /* We don't do dynamic PCI IRQ allocation */
+}
+
+/* Assume some values. (We should revise them, if necessary) */
+
+#define PCIBIOS_MIN_IO         0x2000
+#define PCIBIOS_MIN_MEM                0x10000000
+
+/* Dynamic DMA mapping stuff.
+ * Xtensa has everything mapped statically like x86.
+ */
+
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <asm/scatterlist.h>
+#include <linux/string.h>
+#include <asm/io.h>
+
+struct pci_dev;
+
+/* The PCI address space does equal the physical memory address space.
+ * The networking and block device layers use this boolean for bounce buffer
+ * decisions.
+ */
+
+#define PCI_DMA_BUS_IS_PHYS    (1)
+
+/* pci_unmap_{page,single} is a no-op, so */
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
+#define pci_unmap_addr(PTR, ADDR_NAME)         (0)
+#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)        do { } while (0)
+#define pci_ubnmap_len(PTR, LEN_NAME)          (0)
+#define pci_unmap_len_set(PTR, LEN_NAME, VAL)  do { } while (0)
+
+/* Map a range of PCI memory or I/O space for a device into user space */
+int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
+                        enum pci_mmap_state mmap_state, int write_combine);
+
+/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
+#define HAVE_PCI_MMAP  1
+
+#endif /* __KERNEL__ */
+
+/* Implement the pci_ DMA API in terms of the generic device dma_ one */
+#include <asm-generic/pci-dma-compat.h>
+
+/* Generic PCI */
+#include <asm-generic/pci.h>
+
+#endif /* _XTENSA_PCI_H */
diff --git a/arch/xtensa/include/asm/percpu.h b/arch/xtensa/include/asm/percpu.h
new file mode 100644 (file)
index 0000000..6d2bc2a
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * linux/include/asm-xtensa/percpu.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PERCPU__
+#define _XTENSA_PERCPU__
+
+#include <asm-generic/percpu.h>
+
+#endif /* _XTENSA_PERCPU__ */
diff --git a/arch/xtensa/include/asm/pgalloc.h b/arch/xtensa/include/asm/pgalloc.h
new file mode 100644 (file)
index 0000000..4f4a798
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * include/asm-xtensa/pgalloc.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Copyright (C) 2001-2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PGALLOC_H
+#define _XTENSA_PGALLOC_H
+
+#ifdef __KERNEL__
+
+#include <linux/highmem.h>
+
+/*
+ * Allocating and freeing a pmd is trivial: the 1-entry pmd is
+ * inside the pgd, so has no extra memory associated with it.
+ */
+
+#define pmd_populate_kernel(mm, pmdp, ptep)                                 \
+       (pmd_val(*(pmdp)) = ((unsigned long)ptep))
+#define pmd_populate(mm, pmdp, page)                                        \
+       (pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page)))
+#define pmd_pgtable(pmd) pmd_page(pmd)
+
+static inline pgd_t*
+pgd_alloc(struct mm_struct *mm)
+{
+       return (pgd_t*) __get_free_pages(GFP_KERNEL | __GFP_ZERO, PGD_ORDER);
+}
+
+static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
+{
+       free_page((unsigned long)pgd);
+}
+
+/* Use a slab cache for the pte pages (see also sparc64 implementation) */
+
+extern struct kmem_cache *pgtable_cache;
+
+static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 
+                                        unsigned long address)
+{
+       return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT);
+}
+
+static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
+                                       unsigned long addr)
+{
+       struct page *page;
+
+       page = virt_to_page(pte_alloc_one_kernel(mm, addr));
+       pgtable_page_ctor(page);
+       return page;
+}
+
+static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
+{
+       kmem_cache_free(pgtable_cache, pte);
+}
+
+static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
+{
+       pgtable_page_dtor(pte);
+       kmem_cache_free(pgtable_cache, page_address(pte));
+}
+#define pmd_pgtable(pmd) pmd_page(pmd)
+
+#endif /* __KERNEL__ */
+#endif /* _XTENSA_PGALLOC_H */
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h
new file mode 100644 (file)
index 0000000..8014d96
--- /dev/null
@@ -0,0 +1,416 @@
+/*
+ * include/asm-xtensa/pgtable.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Copyright (C) 2001 - 2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PGTABLE_H
+#define _XTENSA_PGTABLE_H
+
+#include <asm-generic/pgtable-nopmd.h>
+#include <asm/page.h>
+
+/*
+ * We only use two ring levels, user and kernel space.
+ */
+
+#define USER_RING              1       /* user ring level */
+#define KERNEL_RING            0       /* kernel ring level */
+
+/*
+ * The Xtensa architecture port of Linux has a two-level page table system,
+ * i.e. the logical three-level Linux page table layout is folded.
+ * Each task has the following memory page tables:
+ *
+ *   PGD table (page directory), ie. 3rd-level page table:
+ *     One page (4 kB) of 1024 (PTRS_PER_PGD) pointers to PTE tables
+ *     (Architectures that don't have the PMD folded point to the PMD tables)
+ *
+ *     The pointer to the PGD table for a given task can be retrieved from
+ *     the task structure (struct task_struct*) t, e.g. current():
+ *       (t->mm ? t->mm : t->active_mm)->pgd
+ *
+ *   PMD tables (page middle-directory), ie. 2nd-level page tables:
+ *     Absent for the Xtensa architecture (folded, PTRS_PER_PMD == 1).
+ *
+ *   PTE tables (page table entry), ie. 1st-level page tables:
+ *     One page (4 kB) of 1024 (PTRS_PER_PTE) PTEs with a special PTE
+ *     invalid_pte_table for absent mappings.
+ *
+ * The individual pages are 4 kB big with special pages for the empty_zero_page.
+ */
+
+#define PGDIR_SHIFT    22
+#define PGDIR_SIZE     (1UL << PGDIR_SHIFT)
+#define PGDIR_MASK     (~(PGDIR_SIZE-1))
+
+/*
+ * Entries per page directory level: we use two-level, so
+ * we don't really have any PMD directory physically.
+ */
+#define PTRS_PER_PTE           1024
+#define PTRS_PER_PTE_SHIFT     10
+#define PTRS_PER_PGD           1024
+#define PGD_ORDER              0
+#define USER_PTRS_PER_PGD      (TASK_SIZE/PGDIR_SIZE)
+#define FIRST_USER_ADDRESS     0
+#define FIRST_USER_PGD_NR      (FIRST_USER_ADDRESS >> PGDIR_SHIFT)
+
+/*
+ * Virtual memory area. We keep a distance to other memory regions to be
+ * on the safe side. We also use this area for cache aliasing.
+ */
+
+#define VMALLOC_START          0xC0000000
+#define VMALLOC_END            0xC7FEFFFF
+#define TLBTEMP_BASE_1         0xC7FF0000
+#define TLBTEMP_BASE_2         0xC7FF8000
+
+/*
+ * Xtensa Linux config PTE layout (when present):
+ *     31-12:  PPN
+ *     11-6:   Software
+ *     5-4:    RING
+ *     3-0:    CA
+ *
+ * Similar to the Alpha and MIPS ports, we need to keep track of the ref
+ * and mod bits in software.  We have a software "you can read
+ * from this page" bit, and a hardware one which actually lets the
+ * process read from the page.  On the same token we have a software
+ * writable bit and the real hardware one which actually lets the
+ * process write to the page.
+ *
+ * See further below for PTE layout for swapped-out pages.
+ */
+
+#define _PAGE_HW_EXEC          (1<<0)  /* hardware: page is executable */
+#define _PAGE_HW_WRITE         (1<<1)  /* hardware: page is writable */
+
+#define _PAGE_FILE             (1<<1)  /* non-linear mapping, if !present */
+#define _PAGE_PROTNONE         (3<<0)  /* special case for VM_PROT_NONE */
+
+/* None of these cache modes include MP coherency:  */
+#define _PAGE_CA_BYPASS                (0<<2)  /* bypass, non-speculative */
+#define _PAGE_CA_WB            (1<<2)  /* write-back */
+#define _PAGE_CA_WT            (2<<2)  /* write-through */
+#define _PAGE_CA_MASK          (3<<2)
+#define _PAGE_INVALID          (3<<2)
+
+#define _PAGE_USER             (1<<4)  /* user access (ring=1) */
+
+/* Software */
+#define _PAGE_WRITABLE_BIT     6
+#define _PAGE_WRITABLE         (1<<6)  /* software: page writable */
+#define _PAGE_DIRTY            (1<<7)  /* software: page dirty */
+#define _PAGE_ACCESSED         (1<<8)  /* software: page accessed (read) */
+
+/* On older HW revisions, we always have to set bit 0 */
+#if XCHAL_HW_VERSION_MAJOR < 2000
+# define _PAGE_VALID           (1<<0)
+#else
+# define _PAGE_VALID           0
+#endif
+
+#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+#define _PAGE_PRESENT  (_PAGE_VALID | _PAGE_CA_WB | _PAGE_ACCESSED)
+
+#ifdef CONFIG_MMU
+
+#define PAGE_NONE         __pgprot(_PAGE_INVALID | _PAGE_USER | _PAGE_PROTNONE)
+#define PAGE_COPY         __pgprot(_PAGE_PRESENT | _PAGE_USER)
+#define PAGE_COPY_EXEC    __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC)
+#define PAGE_READONLY     __pgprot(_PAGE_PRESENT | _PAGE_USER)
+#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC)
+#define PAGE_SHARED       __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE)
+#define PAGE_SHARED_EXEC \
+       __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE | _PAGE_HW_EXEC)
+#define PAGE_KERNEL       __pgprot(_PAGE_PRESENT | _PAGE_HW_WRITE)
+#define PAGE_KERNEL_EXEC   __pgprot(_PAGE_PRESENT|_PAGE_HW_WRITE|_PAGE_HW_EXEC)
+
+#if (DCACHE_WAY_SIZE > PAGE_SIZE)
+# define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED)
+#else
+# define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED | _PAGE_CA_WB)
+#endif
+
+#else /* no mmu */
+
+# define PAGE_NONE       __pgprot(0)
+# define PAGE_SHARED     __pgprot(0)
+# define PAGE_COPY       __pgprot(0)
+# define PAGE_READONLY   __pgprot(0)
+# define PAGE_KERNEL     __pgprot(0)
+
+#endif
+
+/*
+ * On certain configurations of Xtensa MMUs (eg. the initial Linux config),
+ * the MMU can't do page protection for execute, and considers that the same as
+ * read.  Also, write permissions may imply read permissions.
+ * What follows is the closest we can get by reasonable means..
+ * See linux/mm/mmap.c for protection_map[] array that uses these definitions.
+ */
+#define __P000 PAGE_NONE               /* private --- */
+#define __P001 PAGE_READONLY           /* private --r */
+#define __P010 PAGE_COPY               /* private -w- */
+#define __P011 PAGE_COPY               /* private -wr */
+#define __P100 PAGE_READONLY_EXEC      /* private x-- */
+#define __P101 PAGE_READONLY_EXEC      /* private x-r */
+#define __P110 PAGE_COPY_EXEC          /* private xw- */
+#define __P111 PAGE_COPY_EXEC          /* private xwr */
+
+#define __S000 PAGE_NONE               /* shared  --- */
+#define __S001 PAGE_READONLY           /* shared  --r */
+#define __S010 PAGE_SHARED             /* shared  -w- */
+#define __S011 PAGE_SHARED             /* shared  -wr */
+#define __S100 PAGE_READONLY_EXEC      /* shared  x-- */
+#define __S101 PAGE_READONLY_EXEC      /* shared  x-r */
+#define __S110 PAGE_SHARED_EXEC        /* shared  xw- */
+#define __S111 PAGE_SHARED_EXEC        /* shared  xwr */
+
+#ifndef __ASSEMBLY__
+
+#define pte_ERROR(e) \
+       printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
+#define pgd_ERROR(e) \
+       printk("%s:%d: bad pgd entry %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+
+extern unsigned long empty_zero_page[1024];
+
+#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
+
+extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)];
+
+/*
+ * The pmd contains the kernel virtual address of the pte page.
+ */
+#define pmd_page_vaddr(pmd) ((unsigned long)(pmd_val(pmd) & PAGE_MASK))
+#define pmd_page(pmd) virt_to_page(pmd_val(pmd))
+
+/*
+ * pte status.
+ */
+#define pte_none(pte)   (pte_val(pte) == _PAGE_INVALID)
+#define pte_present(pte)                                               \
+       (((pte_val(pte) & _PAGE_CA_MASK) != _PAGE_INVALID)              \
+        || ((pte_val(pte) & _PAGE_PROTNONE) == _PAGE_PROTNONE))
+#define pte_clear(mm,addr,ptep)                                                \
+       do { update_pte(ptep, __pte(_PAGE_INVALID)); } while(0)
+
+#define pmd_none(pmd)   (!pmd_val(pmd))
+#define pmd_present(pmd) (pmd_val(pmd) & PAGE_MASK)
+#define pmd_bad(pmd)    (pmd_val(pmd) & ~PAGE_MASK)
+#define pmd_clear(pmdp)         do { set_pmd(pmdp, __pmd(0)); } while (0)
+
+static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; }
+static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
+static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
+static inline int pte_file(pte_t pte)  { return pte_val(pte) & _PAGE_FILE; }
+static inline int pte_special(pte_t pte) { return 0; }
+
+static inline pte_t pte_wrprotect(pte_t pte)   
+       { pte_val(pte) &= ~(_PAGE_WRITABLE | _PAGE_HW_WRITE); return pte; }
+static inline pte_t pte_mkclean(pte_t pte)
+       { pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HW_WRITE); return pte; }
+static inline pte_t pte_mkold(pte_t pte)
+       { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkdirty(pte_t pte)
+       { pte_val(pte) |= _PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkyoung(pte_t pte)
+       { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkwrite(pte_t pte)
+       { pte_val(pte) |= _PAGE_WRITABLE; return pte; }
+static inline pte_t pte_mkspecial(pte_t pte)
+       { return pte; }
+
+/*
+ * Conversion functions: convert a page and protection to a page entry,
+ * and a page entry and page directory to the page they refer to.
+ */
+
+#define pte_pfn(pte)           (pte_val(pte) >> PAGE_SHIFT)
+#define pte_same(a,b)          (pte_val(a) == pte_val(b))
+#define pte_page(x)            pfn_to_page(pte_pfn(x))
+#define pfn_pte(pfn, prot)     __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define mk_pte(page, prot)     pfn_pte(page_to_pfn(page), prot)
+
+static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+{
+       return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
+}
+
+/*
+ * Certain architectures need to do special things when pte's
+ * within a page table are directly modified.  Thus, the following
+ * hook is made available.
+ */
+static inline void update_pte(pte_t *ptep, pte_t pteval)
+{
+       *ptep = pteval;
+#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
+       __asm__ __volatile__ ("dhwb %0, 0" :: "a" (ptep));
+#endif
+
+}
+
+struct mm_struct;
+
+static inline void
+set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval)
+{
+       update_pte(ptep, pteval);
+}
+
+
+static inline void
+set_pmd(pmd_t *pmdp, pmd_t pmdval)
+{
+       *pmdp = pmdval;
+}
+
+struct vm_area_struct;
+
+static inline int
+ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr,
+                         pte_t *ptep)
+{
+       pte_t pte = *ptep;
+       if (!pte_young(pte))
+               return 0;
+       update_pte(ptep, pte_mkold(pte));
+       return 1;
+}
+
+static inline pte_t
+ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
+{
+       pte_t pte = *ptep;
+       pte_clear(mm, addr, ptep);
+       return pte;
+}
+
+static inline void
+ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
+{
+       pte_t pte = *ptep;
+       update_pte(ptep, pte_wrprotect(pte));
+}
+
+/* to find an entry in a kernel page-table-directory */
+#define pgd_offset_k(address)  pgd_offset(&init_mm, address)
+
+/* to find an entry in a page-table-directory */
+#define pgd_offset(mm,address) ((mm)->pgd + pgd_index(address))
+
+#define pgd_index(address)     ((address) >> PGDIR_SHIFT)
+
+/* Find an entry in the second-level page table.. */
+#define pmd_offset(dir,address) ((pmd_t*)(dir))
+
+/* Find an entry in the third-level page table.. */
+#define pte_index(address)     (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+#define pte_offset_kernel(dir,addr)                                    \
+       ((pte_t*) pmd_page_vaddr(*(dir)) + pte_index(addr))
+#define pte_offset_map(dir,addr)       pte_offset_kernel((dir),(addr))
+#define pte_offset_map_nested(dir,addr)        pte_offset_kernel((dir),(addr))
+
+#define pte_unmap(pte)         do { } while (0)
+#define pte_unmap_nested(pte)  do { } while (0)
+
+
+/*
+ * Encode and decode a swap entry.
+ *
+ * Format of swap pte:
+ *  bit           0       MBZ
+ *  bit           1       page-file (must be zero)
+ *  bits   2 -  3  page hw access mode (must be 11: _PAGE_INVALID)
+ *  bits   4 -  5  ring protection (must be 01: _PAGE_USER)
+ *  bits   6 - 10  swap type (5 bits -> 32 types)
+ *  bits  11 - 31  swap offset / PAGE_SIZE (21 bits -> 8GB)
+ * Format of file pte:
+ *  bit           0       MBZ
+ *  bit           1       page-file (must be one: _PAGE_FILE)
+ *  bits   2 -  3  page hw access mode (must be 11: _PAGE_INVALID)
+ *  bits   4 -  5  ring protection (must be 01: _PAGE_USER)
+ *  bits   6 - 31  file offset / PAGE_SIZE
+ */
+
+#define __swp_type(entry)      (((entry).val >> 6) & 0x1f)
+#define __swp_offset(entry)    ((entry).val >> 11)
+#define __swp_entry(type,offs) \
+       ((swp_entry_t) {((type) << 6) | ((offs) << 11) | _PAGE_INVALID})
+#define __pte_to_swp_entry(pte)        ((swp_entry_t) { pte_val(pte) })
+#define __swp_entry_to_pte(x)  ((pte_t) { (x).val })
+
+#define PTE_FILE_MAX_BITS      28
+#define pte_to_pgoff(pte)      (pte_val(pte) >> 4)
+#define pgoff_to_pte(off)      \
+       ((pte_t) { ((off) << 4) | _PAGE_INVALID | _PAGE_FILE })
+
+#endif /*  !defined (__ASSEMBLY__) */
+
+
+#ifdef __ASSEMBLY__
+
+/* Assembly macro _PGD_INDEX is the same as C pgd_index(unsigned long),
+ *                _PGD_OFFSET as C pgd_offset(struct mm_struct*, unsigned long),
+ *                _PMD_OFFSET as C pmd_offset(pgd_t*, unsigned long)
+ *                _PTE_OFFSET as C pte_offset(pmd_t*, unsigned long)
+ *
+ * Note: We require an additional temporary register which can be the same as
+ *       the register that holds the address.
+ *
+ * ((pte_t*) ((unsigned long)(pmd_val(*pmd) & PAGE_MASK)) + pte_index(addr))
+ *
+ */
+#define _PGD_INDEX(rt,rs)      extui   rt, rs, PGDIR_SHIFT, 32-PGDIR_SHIFT
+#define _PTE_INDEX(rt,rs)      extui   rt, rs, PAGE_SHIFT, PTRS_PER_PTE_SHIFT
+
+#define _PGD_OFFSET(mm,adr,tmp)                l32i    mm, mm, MM_PGD;         \
+                                       _PGD_INDEX(tmp, adr);           \
+                                       addx4   mm, tmp, mm
+
+#define _PTE_OFFSET(pmd,adr,tmp)       _PTE_INDEX(tmp, adr);           \
+                                       srli    pmd, pmd, PAGE_SHIFT;   \
+                                       slli    pmd, pmd, PAGE_SHIFT;   \
+                                       addx4   pmd, tmp, pmd
+
+#else
+
+extern void paging_init(void);
+
+#define kern_addr_valid(addr)  (1)
+
+extern  void update_mmu_cache(struct vm_area_struct * vma,
+                             unsigned long address, pte_t pte);
+
+/*
+ * remap a physical page `pfn' of size `size' with page protection `prot'
+ * into virtual address `from'
+ */
+
+#define io_remap_pfn_range(vma,from,pfn,size,prot) \
+                remap_pfn_range(vma, from, pfn, size, prot)
+
+
+extern void pgtable_cache_init(void);
+
+typedef pte_t *pte_addr_t;
+
+#endif /* !defined (__ASSEMBLY__) */
+
+#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
+#define __HAVE_ARCH_PTEP_SET_WRPROTECT
+#define __HAVE_ARCH_PTEP_MKDIRTY
+#define __HAVE_ARCH_PTE_SAME
+
+#include <asm-generic/pgtable.h>
+
+#endif /* _XTENSA_PGTABLE_H */
diff --git a/arch/xtensa/include/asm/platform.h b/arch/xtensa/include/asm/platform.h
new file mode 100644 (file)
index 0000000..e3d5a48
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Platform specific functions
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PLATFORM_H
+#define _XTENSA_PLATFORM_H
+
+#include <linux/types.h>
+#include <linux/pci.h>
+
+#include <asm/bootparam.h>
+
+/*
+ * platform_init is called before the mmu is initialized to give the
+ * platform a early hook-up. bp_tag_t is a list of configuration tags
+ * passed from the boot-loader.
+ */
+extern void platform_init(bp_tag_t*);
+
+/*
+ * platform_setup is called from setup_arch with a pointer to the command-line
+ * string.
+ */
+extern void platform_setup (char **);
+
+/*
+ * platform_init_irq is called from init_IRQ.
+ */
+extern void platform_init_irq (void);
+
+/*
+ * platform_restart is called to restart the system.
+ */
+extern void platform_restart (void);
+
+/*
+ * platform_halt is called to stop the system and halt.
+ */
+extern void platform_halt (void);
+
+/*
+ * platform_power_off is called to stop the system and power it off.
+ */
+extern void platform_power_off (void);
+
+/*
+ * platform_idle is called from the idle function.
+ */
+extern void platform_idle (void);
+
+/*
+ * platform_heartbeat is called every HZ
+ */
+extern void platform_heartbeat (void);
+
+/*
+ * platform_pcibios_init is called to allow the platform to setup the pci bus.
+ */
+extern void platform_pcibios_init (void);
+
+/*
+ * platform_pcibios_fixup allows to modify the PCI configuration.
+ */
+extern int platform_pcibios_fixup (void);
+
+/*
+ * platform_calibrate_ccount calibrates cpu clock freq (CONFIG_XTENSA_CALIBRATE)
+ */
+extern void platform_calibrate_ccount (void);
+
+/*
+ * platform_get_rtc_time returns RTC seconds (returns 0 for no error)
+ */
+extern int platform_get_rtc_time(time_t*);
+
+/*
+ * platform_set_rtc_time set RTC seconds (returns 0 for no error)
+ */
+extern int platform_set_rtc_time(time_t);
+
+
+#endif /* _XTENSA_PLATFORM_H */
+
diff --git a/arch/xtensa/include/asm/poll.h b/arch/xtensa/include/asm/poll.h
new file mode 100644 (file)
index 0000000..9d2d599
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * include/asm-xtensa/poll.h
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_POLL_H
+#define _XTENSA_POLL_H
+
+#define POLLWRNORM     POLLOUT
+#define POLLWRBAND     0x0100
+#define POLLREMOVE     0x0800
+
+#include <asm-generic/poll.h>
+
+#endif /* _XTENSA_POLL_H */
diff --git a/arch/xtensa/include/asm/posix_types.h b/arch/xtensa/include/asm/posix_types.h
new file mode 100644 (file)
index 0000000..43f9dd1
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * include/asm-xtensa/posix_types.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Largely copied from include/asm-ppc/posix_types.h
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_POSIX_TYPES_H
+#define _XTENSA_POSIX_TYPES_H
+
+/*
+ * This file is generally used by user-level software, so you need to
+ * be a little careful about namespace pollution etc.  Also, we cannot
+ * assume GCC is being used.
+ */
+
+typedef unsigned long  __kernel_ino_t;
+typedef unsigned int   __kernel_mode_t;
+typedef unsigned long  __kernel_nlink_t;
+typedef long           __kernel_off_t;
+typedef int            __kernel_pid_t;
+typedef unsigned short __kernel_ipc_pid_t;
+typedef unsigned int   __kernel_uid_t;
+typedef unsigned int   __kernel_gid_t;
+typedef unsigned int   __kernel_size_t;
+typedef int            __kernel_ssize_t;
+typedef long           __kernel_ptrdiff_t;
+typedef long           __kernel_time_t;
+typedef long           __kernel_suseconds_t;
+typedef long           __kernel_clock_t;
+typedef int            __kernel_timer_t;
+typedef int            __kernel_clockid_t;
+typedef int            __kernel_daddr_t;
+typedef char *         __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int   __kernel_uid32_t;
+typedef unsigned int   __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
+typedef unsigned short __kernel_old_dev_t;
+
+#ifdef __GNUC__
+typedef long long      __kernel_loff_t;
+#endif
+
+typedef struct {
+       int     val[2];
+} __kernel_fsid_t;
+
+#ifndef __GNUC__
+
+#define        __FD_SET(d, set)        ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
+#define        __FD_CLR(d, set)        ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
+#define        __FD_ISSET(d, set)      ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
+#define        __FD_ZERO(set)  \
+  ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set)))
+
+#else /* __GNUC__ */
+
+#if defined(__KERNEL__)
+/* With GNU C, use inline functions instead so args are evaluated only once: */
+
+#undef __FD_SET
+static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
+{
+       unsigned long _tmp = fd / __NFDBITS;
+       unsigned long _rem = fd % __NFDBITS;
+       fdsetp->fds_bits[_tmp] |= (1UL<<_rem);
+}
+
+#undef __FD_CLR
+static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
+{
+       unsigned long _tmp = fd / __NFDBITS;
+       unsigned long _rem = fd % __NFDBITS;
+       fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem);
+}
+
+#undef __FD_ISSET
+static __inline__ int __FD_ISSET(unsigned long fd, __kernel_fd_set *p)
+{
+       unsigned long _tmp = fd / __NFDBITS;
+       unsigned long _rem = fd % __NFDBITS;
+       return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0;
+}
+
+/*
+ * This will unroll the loop for the normal constant case (8 ints,
+ * for a 256-bit fd_set)
+ */
+#undef __FD_ZERO
+static __inline__ void __FD_ZERO(__kernel_fd_set *p)
+{
+       unsigned int *tmp = (unsigned int *)p->fds_bits;
+       int i;
+
+       if (__builtin_constant_p(__FDSET_LONGS)) {
+               switch (__FDSET_LONGS) {
+                       case 8:
+                               tmp[0] = 0; tmp[1] = 0; tmp[2] = 0; tmp[3] = 0;
+                               tmp[4] = 0; tmp[5] = 0; tmp[6] = 0; tmp[7] = 0;
+                               return;
+               }
+       }
+       i = __FDSET_LONGS;
+       while (i) {
+               i--;
+               *tmp = 0;
+               tmp++;
+       }
+}
+
+#endif /* defined(__KERNEL__) */
+#endif /* __GNUC__ */
+#endif /* _XTENSA_POSIX_TYPES_H */
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h
new file mode 100644 (file)
index 0000000..07387d3
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * include/asm-xtensa/processor.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PROCESSOR_H
+#define _XTENSA_PROCESSOR_H
+
+#include <variant/core.h>
+#include <asm/coprocessor.h>
+
+#include <linux/compiler.h>
+#include <asm/ptrace.h>
+#include <asm/types.h>
+#include <asm/regs.h>
+
+/* Assertions. */
+
+#if (XCHAL_HAVE_WINDOWED != 1)
+# error Linux requires the Xtensa Windowed Registers Option.
+#endif
+
+/*
+ * User space process size: 1 GB.
+ * Windowed call ABI requires caller and callee to be located within the same
+ * 1 GB region. The C compiler places trampoline code on the stack for sources
+ * that take the address of a nested C function (a feature used by glibc), so
+ * the 1 GB requirement applies to the stack as well.
+ */
+
+#define TASK_SIZE      __XTENSA_UL_CONST(0x40000000)
+#define STACK_TOP      TASK_SIZE
+#define STACK_TOP_MAX  STACK_TOP
+
+/*
+ * General exception cause assigned to debug exceptions. Debug exceptions go
+ * to their own vector, rather than the general exception vectors (user,
+ * kernel, double); and their specific causes are reported via DEBUGCAUSE
+ * rather than EXCCAUSE.  However it is sometimes convenient to redirect debug
+ * exceptions to the general exception mechanism.  To do this, an otherwise
+ * unused EXCCAUSE value was assigned to debug exceptions for this purpose.
+ */
+
+#define EXCCAUSE_MAPPED_DEBUG  63
+
+/*
+ * We use DEPC also as a flag to distinguish between double and regular
+ * exceptions. For performance reasons, DEPC might contain the value of
+ * EXCCAUSE for regular exceptions, so we use this definition to mark a
+ * valid double exception address.
+ * (Note: We use it in bgeui, so it should be 64, 128, or 256)
+ */
+
+#define VALID_DOUBLE_EXCEPTION_ADDRESS 64
+
+/* LOCKLEVEL defines the interrupt level that masks all
+ * general-purpose interrupts.
+ */
+#define LOCKLEVEL 1
+
+/* WSBITS and WBBITS are the width of the WINDOWSTART and WINDOWBASE
+ * registers
+ */
+#define WSBITS  (XCHAL_NUM_AREGS / 4)      /* width of WINDOWSTART in bits */
+#define WBBITS  (XCHAL_NUM_AREGS_LOG2 - 2) /* width of WINDOWBASE in bits */
+
+#ifndef __ASSEMBLY__
+
+/* Build a valid return address for the specified call winsize.
+ * winsize must be 1 (call4), 2 (call8), or 3 (call12)
+ */
+#define MAKE_RA_FOR_CALL(ra,ws)   (((ra) & 0x3fffffff) | (ws) << 30)
+
+/* Convert return address to a valid pc
+ * Note: We assume that the stack pointer is in the same 1GB ranges as the ra
+ */
+#define MAKE_PC_FROM_RA(ra,sp)    (((ra) & 0x3fffffff) | ((sp) & 0xc0000000))
+
+typedef struct {
+    unsigned long seg;
+} mm_segment_t;
+
+struct thread_struct {
+
+       /* kernel's return address and stack pointer for context switching */
+       unsigned long ra; /* kernel's a0: return address and window call size */
+       unsigned long sp; /* kernel's a1: stack pointer */
+
+       mm_segment_t current_ds;    /* see uaccess.h for example uses */
+
+       /* struct xtensa_cpuinfo info; */
+
+       unsigned long bad_vaddr; /* last user fault */
+       unsigned long bad_uaddr; /* last kernel fault accessing user space */
+       unsigned long error_code;
+
+       unsigned long ibreak[XCHAL_NUM_IBREAK];
+       unsigned long dbreaka[XCHAL_NUM_DBREAK];
+       unsigned long dbreakc[XCHAL_NUM_DBREAK];
+
+       /* Make structure 16 bytes aligned. */
+       int align[0] __attribute__ ((aligned(16)));
+};
+
+
+/*
+ * Default implementation of macro that returns current
+ * instruction pointer ("program counter").
+ */
+#define current_text_addr()  ({ __label__ _l; _l: &&_l;})
+
+
+/* This decides where the kernel will search for a free chunk of vm
+ * space during mmap's.
+ */
+#define TASK_UNMAPPED_BASE     (TASK_SIZE / 2)
+
+#define INIT_THREAD  \
+{                                                                      \
+       ra:             0,                                              \
+       sp:             sizeof(init_stack) + (long) &init_stack,        \
+       current_ds:     {0},                                            \
+       /*info:         {0}, */                                         \
+       bad_vaddr:      0,                                              \
+       bad_uaddr:      0,                                              \
+       error_code:     0,                                              \
+}
+
+
+/*
+ * Do necessary setup to start up a newly executed thread.
+ * Note: We set-up ps as if we did a call4 to the new pc.
+ *       set_thread_state in signal.c depends on it.
+ */
+#define USER_PS_VALUE ((1 << PS_WOE_BIT) |                             \
+                       (1 << PS_CALLINC_SHIFT) |                       \
+                       (USER_RING << PS_RING_SHIFT) |                  \
+                       (1 << PS_UM_BIT) |                              \
+                       (1 << PS_EXCM_BIT))
+
+/* Clearing a0 terminates the backtrace. */
+#define start_thread(regs, new_pc, new_sp) \
+       regs->pc = new_pc; \
+       regs->ps = USER_PS_VALUE; \
+       regs->areg[1] = new_sp; \
+       regs->areg[0] = 0; \
+       regs->wmask = 1; \
+       regs->depc = 0; \
+       regs->windowbase = 0; \
+       regs->windowstart = 1;
+
+/* Forward declaration */
+struct task_struct;
+struct mm_struct;
+
+/* Free all resources held by a thread. */
+#define release_thread(thread) do { } while(0)
+
+/* Prepare to copy thread state - unlazy all lazy status */
+extern void prepare_to_copy(struct task_struct*);
+
+/* Create a kernel thread without removing it from tasklists */
+extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
+
+/* Copy and release all segment info associated with a VM */
+#define copy_segments(p, mm)   do { } while(0)
+#define release_segments(mm)   do { } while(0)
+#define forget_segments()      do { } while (0)
+
+#define thread_saved_pc(tsk)   (task_pt_regs(tsk)->pc)
+
+extern unsigned long get_wchan(struct task_struct *p);
+
+#define KSTK_EIP(tsk)          (task_pt_regs(tsk)->pc)
+#define KSTK_ESP(tsk)          (task_pt_regs(tsk)->areg[1])
+
+#define cpu_relax()  barrier()
+
+/* Special register access. */
+
+#define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v));
+#define RSR(v,sr) __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v));
+
+#define set_sr(x,sr) ({unsigned int v=(unsigned int)x; WSR(v,sr);})
+#define get_sr(sr) ({unsigned int v; RSR(v,sr); v; })
+
+#endif /* __ASSEMBLY__ */
+#endif /* _XTENSA_PROCESSOR_H */
diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h
new file mode 100644 (file)
index 0000000..905e1e6
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+ * include/asm-xtensa/ptrace.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PTRACE_H
+#define _XTENSA_PTRACE_H
+
+/*
+ * Kernel stack
+ *
+ *             +-----------------------+  -------- STACK_SIZE
+ *             |     register file     |  |
+ *             +-----------------------+  |
+ *             |    struct pt_regs     |  |
+ *             +-----------------------+  | ------ PT_REGS_OFFSET
+ * double      :  16 bytes spill area  :  |  ^
+ * excetion    :- - - - - - - - - - - -:  |  |
+ * frame       :    struct pt_regs     :  |  |
+ *             :- - - - - - - - - - - -:  |  |
+ *             |                       |  |  |
+ *             |     memory stack      |  |  |
+ *             |                       |  |  |
+ *             ~                       ~  ~  ~
+ *             ~                       ~  ~  ~
+ *             |                       |  |  |
+ *             |                       |  |  |
+ *             +-----------------------+  |  | --- STACK_BIAS
+ *             |  struct task_struct   |  |  |  ^
+ *  current --> +-----------------------+  |  |  |
+ *             |  struct thread_info   |  |  |  |
+ *             +-----------------------+ --------
+ */
+
+#define KERNEL_STACK_SIZE (2 * PAGE_SIZE)
+
+/*  Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */
+
+#define EXC_TABLE_KSTK         0x004   /* Kernel Stack */
+#define EXC_TABLE_DOUBLE_SAVE  0x008   /* Double exception save area for a0 */
+#define EXC_TABLE_FIXUP                0x00c   /* Fixup handler */
+#define EXC_TABLE_PARAM                0x010   /* For passing a parameter to fixup */
+#define EXC_TABLE_SYSCALL_SAVE 0x014   /* For fast syscall handler */
+#define EXC_TABLE_FAST_USER    0x100   /* Fast user exception handler */
+#define EXC_TABLE_FAST_KERNEL  0x200   /* Fast kernel exception handler */
+#define EXC_TABLE_DEFAULT      0x300   /* Default C-Handler */
+#define EXC_TABLE_SIZE         0x400
+
+/* Registers used by strace */
+
+#define REG_A_BASE     0x0000
+#define REG_AR_BASE    0x0100
+#define REG_PC         0x0020
+#define REG_PS         0x02e6
+#define REG_WB         0x0248
+#define REG_WS         0x0249
+#define REG_LBEG       0x0200
+#define REG_LEND       0x0201
+#define REG_LCOUNT     0x0202
+#define REG_SAR                0x0203
+
+#define SYSCALL_NR     0x00ff
+
+/* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */
+
+#define PTRACE_GETREGS         12
+#define PTRACE_SETREGS         13
+#define PTRACE_GETXTREGS       18
+#define PTRACE_SETXTREGS       19
+
+#ifdef __KERNEL__
+
+#ifndef __ASSEMBLY__
+
+/*
+ * This struct defines the way the registers are stored on the
+ * kernel stack during a system call or other kernel entry.
+ */
+struct pt_regs {
+       unsigned long pc;               /*   4 */
+       unsigned long ps;               /*   8 */
+       unsigned long depc;             /*  12 */
+       unsigned long exccause;         /*  16 */
+       unsigned long excvaddr;         /*  20 */
+       unsigned long debugcause;       /*  24 */
+       unsigned long wmask;            /*  28 */
+       unsigned long lbeg;             /*  32 */
+       unsigned long lend;             /*  36 */
+       unsigned long lcount;           /*  40 */
+       unsigned long sar;              /*  44 */
+       unsigned long windowbase;       /*  48 */
+       unsigned long windowstart;      /*  52 */
+       unsigned long syscall;          /*  56 */
+       unsigned long icountlevel;      /*  60 */
+       int reserved[1];                /*  64 */
+
+       /* Additional configurable registers that are used by the compiler. */
+       xtregs_opt_t xtregs_opt;
+
+       /* Make sure the areg field is 16 bytes aligned. */
+       int align[0] __attribute__ ((aligned(16)));
+
+       /* current register frame.
+        * Note: The ESF for kernel exceptions ends after 16 registers!
+        */
+       unsigned long areg[16];         /* 128 (64) */
+};
+
+#include <variant/core.h>
+
+# define task_pt_regs(tsk) ((struct pt_regs*) \
+  (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1)
+# define user_mode(regs) (((regs)->ps & 0x00000020)!=0)
+# define instruction_pointer(regs) ((regs)->pc)
+extern void show_regs(struct pt_regs *);
+
+# ifndef CONFIG_SMP
+#  define profile_pc(regs) instruction_pointer(regs)
+# endif
+
+#else  /* __ASSEMBLY__ */
+
+# include <asm/asm-offsets.h>
+#define PT_REGS_OFFSET   (KERNEL_STACK_SIZE - PT_USER_SIZE)
+
+#endif /* !__ASSEMBLY__ */
+
+#endif  /* __KERNEL__ */
+
+#endif /* _XTENSA_PTRACE_H */
diff --git a/arch/xtensa/include/asm/regs.h b/arch/xtensa/include/asm/regs.h
new file mode 100644 (file)
index 0000000..d4baed2
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2006 Tensilica, Inc.  All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like.  Any license provided herein, whether implied or
+ * otherwise, applies only to this software file.  Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
+ * USA.
+ */
+
+#ifndef _XTENSA_REGS_H
+#define _XTENSA_REGS_H
+
+/*  Special registers.  */
+
+#define LBEG           0
+#define LEND           1
+#define LCOUNT         2
+#define SAR            3
+#define BR             4
+#define SCOMPARE1      12
+#define ACCHI          16
+#define ACCLO          17
+#define MR             32
+#define WINDOWBASE     72
+#define WINDOWSTART    73
+#define PTEVADDR       83
+#define RASID          90
+#define ITLBCFG                91
+#define DTLBCFG                92
+#define IBREAKENABLE   96
+#define DDR            104
+#define IBREAKA                128
+#define DBREAKA                144
+#define DBREAKC                160
+#define EPC            176
+#define EPC_1          177
+#define DEPC           192
+#define EPS            192
+#define EPS_1          193
+#define EXCSAVE                208
+#define EXCSAVE_1      209
+#define INTERRUPT      226
+#define INTENABLE      228
+#define PS             230
+#define THREADPTR      231
+#define EXCCAUSE       232
+#define DEBUGCAUSE     233
+#define CCOUNT         234
+#define PRID           235
+#define ICOUNT         236
+#define ICOUNTLEVEL    237
+#define EXCVADDR       238
+#define CCOMPARE       240
+#define MISC           244
+
+/*  Special names for read-only and write-only interrupt registers.  */
+
+#define INTREAD                226
+#define INTSET         226
+#define INTCLEAR       227
+
+/*  EXCCAUSE register fields  */
+
+#define EXCCAUSE_EXCCAUSE_SHIFT        0
+#define EXCCAUSE_EXCCAUSE_MASK 0x3F
+
+#define EXCCAUSE_ILLEGAL_INSTRUCTION           0
+#define EXCCAUSE_SYSTEM_CALL                   1
+#define EXCCAUSE_INSTRUCTION_FETCH_ERROR       2
+#define EXCCAUSE_LOAD_STORE_ERROR              3
+#define EXCCAUSE_LEVEL1_INTERRUPT              4
+#define EXCCAUSE_ALLOCA                                5
+#define EXCCAUSE_INTEGER_DIVIDE_BY_ZERO                6
+#define EXCCAUSE_SPECULATION                   7
+#define EXCCAUSE_PRIVILEGED                    8
+#define EXCCAUSE_UNALIGNED                     9
+#define EXCCAUSE_ITLB_MISS                     16
+#define EXCCAUSE_ITLB_MULTIHIT                 17
+#define EXCCAUSE_ITLB_PRIVILEGE                        18
+#define EXCCAUSE_ITLB_SIZE_RESTRICTION         19
+#define EXCCAUSE_FETCH_CACHE_ATTRIBUTE         20
+#define EXCCAUSE_DTLB_MISS                     24
+#define EXCCAUSE_DTLB_MULTIHIT                 25
+#define EXCCAUSE_DTLB_PRIVILEGE                        26
+#define EXCCAUSE_DTLB_SIZE_RESTRICTION         27
+#define EXCCAUSE_LOAD_CACHE_ATTRIBUTE          28
+#define EXCCAUSE_STORE_CACHE_ATTRIBUTE         29
+#define EXCCAUSE_COPROCESSOR0_DISABLED         32
+#define EXCCAUSE_COPROCESSOR1_DISABLED         33
+#define EXCCAUSE_COPROCESSOR2_DISABLED         34
+#define EXCCAUSE_COPROCESSOR3_DISABLED         35
+#define EXCCAUSE_COPROCESSOR4_DISABLED         36
+#define EXCCAUSE_COPROCESSOR5_DISABLED         37
+#define EXCCAUSE_COPROCESSOR6_DISABLED         38
+#define EXCCAUSE_COPROCESSOR7_DISABLED         39
+
+/*  PS register fields.  */
+
+#define PS_WOE_BIT             18
+#define PS_CALLINC_SHIFT       16
+#define PS_CALLINC_MASK                0x00030000
+#define PS_OWB_SHIFT           8
+#define PS_OWB_MASK            0x00000F00
+#define PS_RING_SHIFT          6
+#define PS_RING_MASK           0x000000C0
+#define PS_UM_BIT              5
+#define PS_EXCM_BIT            4
+#define PS_INTLEVEL_SHIFT      0
+#define PS_INTLEVEL_MASK       0x0000000F
+
+/*  DBREAKCn register fields.  */
+
+#define DBREAKC_MASK_BIT               0
+#define DBREAKC_MASK_MASK              0x0000003F
+#define DBREAKC_LOAD_BIT               30
+#define DBREAKC_LOAD_MASK              0x40000000
+#define DBREAKC_STOR_BIT               31
+#define DBREAKC_STOR_MASK              0x80000000
+
+/*  DEBUGCAUSE register fields.  */
+
+#define DEBUGCAUSE_DEBUGINT_BIT                5       /* External debug interrupt */
+#define DEBUGCAUSE_BREAKN_BIT          4       /* BREAK.N instruction */
+#define DEBUGCAUSE_BREAK_BIT           3       /* BREAK instruction */
+#define DEBUGCAUSE_DBREAK_BIT          2       /* DBREAK match */
+#define DEBUGCAUSE_IBREAK_BIT          1       /* IBREAK match */
+#define DEBUGCAUSE_ICOUNT_BIT          0       /* ICOUNT would incr. to zero */
+
+#endif /* _XTENSA_SPECREG_H */
+
diff --git a/arch/xtensa/include/asm/resource.h b/arch/xtensa/include/asm/resource.h
new file mode 100644 (file)
index 0000000..17b5ab3
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/resource.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_RESOURCE_H
+#define _XTENSA_RESOURCE_H
+
+#include <asm-generic/resource.h>
+
+#endif /* _XTENSA_RESOURCE_H */
diff --git a/arch/xtensa/include/asm/rmap.h b/arch/xtensa/include/asm/rmap.h
new file mode 100644 (file)
index 0000000..649588b
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/rmap.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_RMAP_H
+#define _XTENSA_RMAP_H
+
+#include <asm-generic/rmap.h>
+
+#endif
diff --git a/arch/xtensa/include/asm/rwsem.h b/arch/xtensa/include/asm/rwsem.h
new file mode 100644 (file)
index 0000000..e39edf5
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * include/asm-xtensa/rwsem.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Largely copied from include/asm-ppc/rwsem.h
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_RWSEM_H
+#define _XTENSA_RWSEM_H
+
+#ifndef _LINUX_RWSEM_H
+#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
+#endif
+
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <asm/atomic.h>
+#include <asm/system.h>
+
+/*
+ * the semaphore definition
+ */
+struct rw_semaphore {
+       signed long             count;
+#define RWSEM_UNLOCKED_VALUE           0x00000000
+#define RWSEM_ACTIVE_BIAS              0x00000001
+#define RWSEM_ACTIVE_MASK              0x0000ffff
+#define RWSEM_WAITING_BIAS             (-0x00010000)
+#define RWSEM_ACTIVE_READ_BIAS         RWSEM_ACTIVE_BIAS
+#define RWSEM_ACTIVE_WRITE_BIAS                (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
+       spinlock_t              wait_lock;
+       struct list_head        wait_list;
+};
+
+#define __RWSEM_INITIALIZER(name) \
+       { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
+         LIST_HEAD_INIT((name).wait_list) }
+
+#define DECLARE_RWSEM(name)            \
+       struct rw_semaphore name = __RWSEM_INITIALIZER(name)
+
+extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
+
+static inline void init_rwsem(struct rw_semaphore *sem)
+{
+       sem->count = RWSEM_UNLOCKED_VALUE;
+       spin_lock_init(&sem->wait_lock);
+       INIT_LIST_HEAD(&sem->wait_list);
+}
+
+/*
+ * lock for reading
+ */
+static inline void __down_read(struct rw_semaphore *sem)
+{
+       if (atomic_add_return(1,(atomic_t *)(&sem->count)) > 0)
+               smp_wmb();
+       else
+               rwsem_down_read_failed(sem);
+}
+
+static inline int __down_read_trylock(struct rw_semaphore *sem)
+{
+       int tmp;
+
+       while ((tmp = sem->count) >= 0) {
+               if (tmp == cmpxchg(&sem->count, tmp,
+                                  tmp + RWSEM_ACTIVE_READ_BIAS)) {
+                       smp_wmb();
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+/*
+ * lock for writing
+ */
+static inline void __down_write(struct rw_semaphore *sem)
+{
+       int tmp;
+
+       tmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,
+                               (atomic_t *)(&sem->count));
+       if (tmp == RWSEM_ACTIVE_WRITE_BIAS)
+               smp_wmb();
+       else
+               rwsem_down_write_failed(sem);
+}
+
+static inline int __down_write_trylock(struct rw_semaphore *sem)
+{
+       int tmp;
+
+       tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
+                     RWSEM_ACTIVE_WRITE_BIAS);
+       smp_wmb();
+       return tmp == RWSEM_UNLOCKED_VALUE;
+}
+
+/*
+ * unlock after reading
+ */
+static inline void __up_read(struct rw_semaphore *sem)
+{
+       int tmp;
+
+       smp_wmb();
+       tmp = atomic_sub_return(1,(atomic_t *)(&sem->count));
+       if (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0)
+               rwsem_wake(sem);
+}
+
+/*
+ * unlock after writing
+ */
+static inline void __up_write(struct rw_semaphore *sem)
+{
+       smp_wmb();
+       if (atomic_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
+                             (atomic_t *)(&sem->count)) < 0)
+               rwsem_wake(sem);
+}
+
+/*
+ * implement atomic add functionality
+ */
+static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
+{
+       atomic_add(delta, (atomic_t *)(&sem->count));
+}
+
+/*
+ * downgrade write lock to read lock
+ */
+static inline void __downgrade_write(struct rw_semaphore *sem)
+{
+       int tmp;
+
+       smp_wmb();
+       tmp = atomic_add_return(-RWSEM_WAITING_BIAS, (atomic_t *)(&sem->count));
+       if (tmp < 0)
+               rwsem_downgrade_wake(sem);
+}
+
+/*
+ * implement exchange and add functionality
+ */
+static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
+{
+       smp_mb();
+       return atomic_add_return(delta, (atomic_t *)(&sem->count));
+}
+
+static inline int rwsem_is_locked(struct rw_semaphore *sem)
+{
+       return (sem->count != 0);
+}
+
+#endif /* _XTENSA_RWSEM_H */
diff --git a/arch/xtensa/include/asm/scatterlist.h b/arch/xtensa/include/asm/scatterlist.h
new file mode 100644 (file)
index 0000000..810080b
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * include/asm-xtensa/scatterlist.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SCATTERLIST_H
+#define _XTENSA_SCATTERLIST_H
+
+#include <asm/types.h>
+
+struct scatterlist {
+#ifdef CONFIG_DEBUG_SG
+       unsigned long   sg_magic;
+#endif
+       unsigned long   page_link;
+       unsigned int    offset;
+       dma_addr_t      dma_address;
+       unsigned int    length;
+};
+
+/*
+ * These macros should be used after a pci_map_sg call has been done
+ * to get bus addresses of each of the SG entries and their lengths.
+ * You should only work with the number of sg entries pci_map_sg
+ * returns, or alternatively stop on the first sg_dma_len(sg) which
+ * is 0.
+ */
+#define sg_dma_address(sg)      ((sg)->dma_address)
+#define sg_dma_len(sg)          ((sg)->length)
+
+
+#define ISA_DMA_THRESHOLD (~0UL)
+
+#endif /* _XTENSA_SCATTERLIST_H */
diff --git a/arch/xtensa/include/asm/sections.h b/arch/xtensa/include/asm/sections.h
new file mode 100644 (file)
index 0000000..40b5191
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/sections.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SECTIONS_H
+#define _XTENSA_SECTIONS_H
+
+#include <asm-generic/sections.h>
+
+#endif /* _XTENSA_SECTIONS_H */
diff --git a/arch/xtensa/include/asm/segment.h b/arch/xtensa/include/asm/segment.h
new file mode 100644 (file)
index 0000000..a2eb547
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/segment.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SEGMENT_H
+#define _XTENSA_SEGMENT_H
+
+#include <asm/uaccess.h>
+
+#endif /* _XTENSA_SEGEMENT_H */
diff --git a/arch/xtensa/include/asm/sembuf.h b/arch/xtensa/include/asm/sembuf.h
new file mode 100644 (file)
index 0000000..c158704
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * include/asm-xtensa/sembuf.h
+ *
+ * The semid64_ds structure for Xtensa architecture.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ *
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ *
+ */
+
+#ifndef _XTENSA_SEMBUF_H
+#define _XTENSA_SEMBUF_H
+
+#include <asm/byteorder.h>
+
+struct semid64_ds {
+       struct ipc64_perm sem_perm;             /* permissions .. see ipc.h */
+#ifdef __XTENSA_EL__
+       __kernel_time_t sem_otime;              /* last semop time */
+       unsigned long   __unused1;
+       __kernel_time_t sem_ctime;              /* last change time */
+       unsigned long   __unused2;
+#else
+       unsigned long   __unused1;
+       __kernel_time_t sem_otime;              /* last semop time */
+       unsigned long   __unused2;
+       __kernel_time_t sem_ctime;              /* last change time */
+#endif
+       unsigned long   sem_nsems;              /* no. of semaphores in array */
+       unsigned long   __unused3;
+       unsigned long   __unused4;
+};
+
+#endif /* __ASM_XTENSA_SEMBUF_H */
diff --git a/arch/xtensa/include/asm/serial.h b/arch/xtensa/include/asm/serial.h
new file mode 100644 (file)
index 0000000..a8a2493
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * include/asm-xtensa/serial.h
+ *
+ * Configuration details for 8250, 16450, 16550, etc. serial ports
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SERIAL_H
+#define _XTENSA_SERIAL_H
+
+#include <platform/serial.h>
+
+#endif /* _XTENSA_SERIAL_H */
diff --git a/arch/xtensa/include/asm/setup.h b/arch/xtensa/include/asm/setup.h
new file mode 100644 (file)
index 0000000..e363652
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/setup.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SETUP_H
+#define _XTENSA_SETUP_H
+
+#define COMMAND_LINE_SIZE      256
+
+#endif
diff --git a/arch/xtensa/include/asm/shmbuf.h b/arch/xtensa/include/asm/shmbuf.h
new file mode 100644 (file)
index 0000000..ad4b012
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * include/asm-xtensa/shmbuf.h
+ *
+ * The shmid64_ds structure for Xtensa architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SHMBUF_H
+#define _XTENSA_SHMBUF_H
+
+#if defined (__XTENSA_EL__)
+struct shmid64_ds {
+       struct ipc64_perm       shm_perm;       /* operation perms */
+       size_t                  shm_segsz;      /* size of segment (bytes) */
+       __kernel_time_t         shm_atime;      /* last attach time */
+       unsigned long           __unused1;
+       __kernel_time_t         shm_dtime;      /* last detach time */
+       unsigned long           __unused2;
+       __kernel_time_t         shm_ctime;      /* last change time */
+       unsigned long           __unused3;
+       __kernel_pid_t          shm_cpid;       /* pid of creator */
+       __kernel_pid_t          shm_lpid;       /* pid of last operator */
+       unsigned long           shm_nattch;     /* no. of current attaches */
+       unsigned long           __unused4;
+       unsigned long           __unused5;
+};
+#elif defined (__XTENSA_EB__)
+struct shmid64_ds {
+       struct ipc64_perm       shm_perm;       /* operation perms */
+       size_t                  shm_segsz;      /* size of segment (bytes) */
+       __kernel_time_t         shm_atime;      /* last attach time */
+       unsigned long           __unused1;
+       __kernel_time_t         shm_dtime;      /* last detach time */
+       unsigned long           __unused2;
+       __kernel_time_t         shm_ctime;      /* last change time */
+       unsigned long           __unused3;
+       __kernel_pid_t          shm_cpid;       /* pid of creator */
+       __kernel_pid_t          shm_lpid;       /* pid of last operator */
+       unsigned long           shm_nattch;     /* no. of current attaches */
+       unsigned long           __unused4;
+       unsigned long           __unused5;
+};
+#else
+# error endian order not defined
+#endif
+
+
+struct shminfo64 {
+       unsigned long   shmmax;
+       unsigned long   shmmin;
+       unsigned long   shmmni;
+       unsigned long   shmseg;
+       unsigned long   shmall;
+       unsigned long   __unused1;
+       unsigned long   __unused2;
+       unsigned long   __unused3;
+       unsigned long   __unused4;
+};
+
+#endif /* _XTENSA_SHMBUF_H */
diff --git a/arch/xtensa/include/asm/shmparam.h b/arch/xtensa/include/asm/shmparam.h
new file mode 100644 (file)
index 0000000..c8cc16c
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * include/asm-xtensa/shmparam.h
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License.  See the file "COPYING" in the main directory of
+ * this archive for more details.
+ */
+
+#ifndef _XTENSA_SHMPARAM_H
+#define _XTENSA_SHMPARAM_H
+
+/*
+ * Xtensa can have variable size caches, and if
+ * the size of single way is larger than the page size,
+ * then we have to start worrying about cache aliasing
+ * problems.
+ */
+
+#define SHMLBA ((PAGE_SIZE > DCACHE_WAY_SIZE)? PAGE_SIZE : DCACHE_WAY_SIZE)
+
+#endif /* _XTENSA_SHMPARAM_H */
diff --git a/arch/xtensa/include/asm/sigcontext.h b/arch/xtensa/include/asm/sigcontext.h
new file mode 100644 (file)
index 0000000..03383af
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * include/asm-xtensa/sigcontext.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SIGCONTEXT_H
+#define _XTENSA_SIGCONTEXT_H
+
+
+struct sigcontext {
+       unsigned long sc_pc;
+       unsigned long sc_ps;
+       unsigned long sc_lbeg;
+       unsigned long sc_lend;
+       unsigned long sc_lcount;
+       unsigned long sc_sar;
+       unsigned long sc_acclo;
+       unsigned long sc_acchi;
+       unsigned long sc_a[16];
+       void *sc_xtregs;
+};
+
+#endif /* _XTENSA_SIGCONTEXT_H */
diff --git a/arch/xtensa/include/asm/siginfo.h b/arch/xtensa/include/asm/siginfo.h
new file mode 100644 (file)
index 0000000..6916248
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/siginfo.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SIGINFO_H
+#define _XTENSA_SIGINFO_H
+
+#include <asm-generic/siginfo.h>
+
+#endif /* _XTENSA_SIGINFO_H */
diff --git a/arch/xtensa/include/asm/signal.h b/arch/xtensa/include/asm/signal.h
new file mode 100644 (file)
index 0000000..633ba73
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ * include/asm-xtensa/signal.h
+ *
+ * Swiped from SH.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SIGNAL_H
+#define _XTENSA_SIGNAL_H
+
+
+#define _NSIG          64
+#define _NSIG_BPW      32
+#define _NSIG_WORDS    (_NSIG / _NSIG_BPW)
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+
+/* Avoid too many header ordering problems.  */
+struct siginfo;
+typedef unsigned long old_sigset_t;            /* at least 32 bits */
+typedef struct {
+       unsigned long sig[_NSIG_WORDS];
+} sigset_t;
+
+#endif
+
+#define SIGHUP          1
+#define SIGINT          2
+#define SIGQUIT                 3
+#define SIGILL          4
+#define SIGTRAP                 5
+#define SIGABRT                 6
+#define SIGIOT          6
+#define SIGBUS          7
+#define SIGFPE          8
+#define SIGKILL                 9
+#define SIGUSR1                10
+#define SIGSEGV                11
+#define SIGUSR2                12
+#define SIGPIPE                13
+#define SIGALRM                14
+#define SIGTERM                15
+#define SIGSTKFLT      16
+#define SIGCHLD                17
+#define SIGCONT                18
+#define SIGSTOP                19
+#define SIGTSTP                20
+#define SIGTTIN                21
+#define SIGTTOU                22
+#define SIGURG         23
+#define SIGXCPU                24
+#define SIGXFSZ                25
+#define SIGVTALRM      26
+#define SIGPROF                27
+#define SIGWINCH       28
+#define SIGIO          29
+#define SIGPOLL                SIGIO
+/* #define SIGLOST             29 */
+#define SIGPWR         30
+#define SIGSYS         31
+#define        SIGUNUSED       31
+
+/* These should not be considered constants from userland.  */
+#define SIGRTMIN       32
+#define SIGRTMAX       (_NSIG-1)
+
+/*
+ * SA_FLAGS values:
+ *
+ * SA_ONSTACK indicates that a registered stack_t will be used.
+ * SA_RESTART flag to get restarting signals (which were the default long ago)
+ * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
+ * SA_RESETHAND clears the handler when the signal is delivered.
+ * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
+ * SA_NODEFER prevents the current signal from being masked in the handler.
+ *
+ * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
+ * Unix names RESETHAND and NODEFER respectively.
+ */
+#define SA_NOCLDSTOP   0x00000001
+#define SA_NOCLDWAIT   0x00000002 /* not supported yet */
+#define SA_SIGINFO     0x00000004
+#define SA_ONSTACK     0x08000000
+#define SA_RESTART     0x10000000
+#define SA_NODEFER     0x40000000
+#define SA_RESETHAND   0x80000000
+
+#define SA_NOMASK      SA_NODEFER
+#define SA_ONESHOT     SA_RESETHAND
+
+#define SA_RESTORER    0x04000000
+
+/*
+ * sigaltstack controls
+ */
+#define SS_ONSTACK     1
+#define SS_DISABLE     2
+
+#define MINSIGSTKSZ    2048
+#define SIGSTKSZ       8192
+
+#ifndef __ASSEMBLY__
+
+#define SIG_BLOCK          0   /* for blocking signals */
+#define SIG_UNBLOCK        1   /* for unblocking signals */
+#define SIG_SETMASK        2   /* for setting the signal mask */
+
+/* Type of a signal handler.  */
+typedef void (*__sighandler_t)(int);
+
+#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
+#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
+#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
+
+#ifdef __KERNEL__
+struct old_sigaction {
+       __sighandler_t sa_handler;
+       old_sigset_t sa_mask;
+       unsigned long sa_flags;
+       void (*sa_restorer)(void);
+};
+
+struct sigaction {
+       __sighandler_t sa_handler;
+       unsigned long sa_flags;
+       void (*sa_restorer)(void);
+       sigset_t sa_mask;               /* mask last for extensibility */
+};
+
+struct k_sigaction {
+       struct sigaction sa;
+};
+
+#else
+
+/* Here we must cater to libcs that poke about in kernel headers.  */
+
+struct sigaction {
+       union {
+         __sighandler_t _sa_handler;
+         void (*_sa_sigaction)(int, struct siginfo *, void *);
+       } _u;
+       sigset_t sa_mask;
+       unsigned long sa_flags;
+       void (*sa_restorer)(void);
+};
+
+#define sa_handler     _u._sa_handler
+#define sa_sigaction   _u._sa_sigaction
+
+#endif /* __KERNEL__ */
+
+typedef struct sigaltstack {
+       void *ss_sp;
+       int ss_flags;
+       size_t ss_size;
+} stack_t;
+
+#ifdef __KERNEL__
+#include <asm/sigcontext.h>
+#define ptrace_signal_deliver(regs, cookie) do { } while (0)
+
+#endif /* __KERNEL__ */
+#endif /* __ASSEMBLY__ */
+#endif /* _XTENSA_SIGNAL_H */
diff --git a/arch/xtensa/include/asm/smp.h b/arch/xtensa/include/asm/smp.h
new file mode 100644 (file)
index 0000000..83c569e
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * include/asm-xtensa/smp.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SMP_H
+#define _XTENSA_SMP_H
+
+extern struct xtensa_cpuinfo boot_cpu_data;
+
+#define cpu_data (&boot_cpu_data)
+#define current_cpu_data boot_cpu_data
+
+struct xtensa_cpuinfo {
+       unsigned long   *pgd_cache;
+       unsigned long   *pte_cache;
+       unsigned long   pgtable_cache_sz;
+};
+
+#define cpu_logical_map(cpu)   (cpu)
+
+#endif /* _XTENSA_SMP_H */
diff --git a/arch/xtensa/include/asm/socket.h b/arch/xtensa/include/asm/socket.h
new file mode 100644 (file)
index 0000000..6100682
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * include/asm-xtensa/socket.h
+ *
+ * Copied from i386.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#ifndef _XTENSA_SOCKET_H
+#define _XTENSA_SOCKET_H
+
+#include <asm/sockios.h>
+
+/* For setsockoptions(2) */
+#define SOL_SOCKET     1
+
+#define SO_DEBUG       1
+#define SO_REUSEADDR   2
+#define SO_TYPE                3
+#define SO_ERROR       4
+#define SO_DONTROUTE   5
+#define SO_BROADCAST   6
+#define SO_SNDBUF      7
+#define SO_RCVBUF      8
+#define SO_SNDBUFFORCE 32
+#define SO_RCVBUFFORCE 33
+#define SO_KEEPALIVE   9
+#define SO_OOBINLINE   10
+#define SO_NO_CHECK    11
+#define SO_PRIORITY    12
+#define SO_LINGER      13
+#define SO_BSDCOMPAT   14
+/* To add :#define SO_REUSEPORT 15 */
+#define SO_PASSCRED    16
+#define SO_PEERCRED    17
+#define SO_RCVLOWAT    18
+#define SO_SNDLOWAT    19
+#define SO_RCVTIMEO    20
+#define SO_SNDTIMEO    21
+
+/* Security levels - as per NRL IPv6 - don't actually do anything */
+
+#define SO_SECURITY_AUTHENTICATION             22
+#define SO_SECURITY_ENCRYPTION_TRANSPORT       23
+#define SO_SECURITY_ENCRYPTION_NETWORK         24
+
+#define SO_BINDTODEVICE        25
+
+/* Socket filtering */
+
+#define SO_ATTACH_FILTER        26
+#define SO_DETACH_FILTER        27
+
+#define SO_PEERNAME            28
+#define SO_TIMESTAMP           29
+#define SCM_TIMESTAMP          SO_TIMESTAMP
+
+#define SO_ACCEPTCONN          30
+#define SO_PEERSEC             31
+#define SO_PASSSEC             34
+#define SO_TIMESTAMPNS         35
+#define SCM_TIMESTAMPNS                SO_TIMESTAMPNS
+
+#define SO_MARK                        36
+
+#endif /* _XTENSA_SOCKET_H */
diff --git a/arch/xtensa/include/asm/sockios.h b/arch/xtensa/include/asm/sockios.h
new file mode 100644 (file)
index 0000000..efe0af3
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * include/asm-xtensa/sockios.h
+ *
+ * Socket-level I/O control calls.  Copied from MIPS.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1995 by Ralf Baechle
+ * Copyright (C) 2001 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SOCKIOS_H
+#define _XTENSA_SOCKIOS_H
+
+#include <asm/ioctl.h>
+
+/* Socket-level I/O control calls. */
+
+#define FIOGETOWN      _IOR('f', 123, int)
+#define FIOSETOWN      _IOW('f', 124, int)
+
+#define SIOCATMARK     _IOR('s', 7, int)
+#define SIOCSPGRP      _IOW('s', 8, pid_t)
+#define SIOCGPGRP      _IOR('s', 9, pid_t)
+
+#define SIOCGSTAMP     0x8906          /* Get stamp (timeval) */
+#define SIOCGSTAMPNS   0x8907          /* Get stamp (timespec) */
+
+#endif /* _XTENSA_SOCKIOS_H */
diff --git a/arch/xtensa/include/asm/spinlock.h b/arch/xtensa/include/asm/spinlock.h
new file mode 100644 (file)
index 0000000..8ff2364
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/spinlock.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SPINLOCK_H
+#define _XTENSA_SPINLOCK_H
+
+#include <linux/spinlock.h>
+
+#endif /* _XTENSA_SPINLOCK_H */
diff --git a/arch/xtensa/include/asm/stat.h b/arch/xtensa/include/asm/stat.h
new file mode 100644 (file)
index 0000000..c499203
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * include/asm-xtensa/stat.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_STAT_H
+#define _XTENSA_STAT_H
+
+#define STAT_HAVE_NSEC 1
+
+struct stat {
+       unsigned long   st_dev;
+       unsigned long   st_ino;
+       unsigned int    st_mode;
+       unsigned int    st_nlink;
+       unsigned int    st_uid;
+       unsigned int    st_gid;
+       unsigned long   st_rdev;
+       long            st_size;
+       unsigned long   st_blksize;
+       unsigned long   st_blocks;
+       unsigned long   st_atime;
+       unsigned long   st_atime_nsec;
+       unsigned long   st_mtime;
+       unsigned long   st_mtime_nsec;
+       unsigned long   st_ctime;
+       unsigned long   st_ctime_nsec;
+       unsigned long   __unused4;
+       unsigned long   __unused5;
+};
+
+struct stat64  {
+       unsigned long long st_dev;      /* Device */
+       unsigned long long st_ino;      /* File serial number */
+       unsigned int  st_mode;          /* File mode. */
+       unsigned int  st_nlink;         /* Link count. */
+       unsigned int  st_uid;           /* User ID of the file's owner. */
+       unsigned int  st_gid;           /* Group ID of the file's group. */
+       unsigned long long st_rdev;     /* Device number, if device. */
+       long long st_size;              /* Size of file, in bytes. */
+       unsigned long st_blksize;       /* Optimal block size for I/O. */
+       unsigned long __unused2;
+       unsigned long long st_blocks;   /* Number 512-byte blocks allocated. */
+       unsigned long st_atime;         /* Time of last access. */
+       unsigned long st_atime_nsec;
+       unsigned long st_mtime;         /* Time of last modification. */
+       unsigned long st_mtime_nsec;
+       unsigned long st_ctime;         /* Time of last status change. */
+       unsigned long st_ctime_nsec;
+       unsigned long __unused4;
+       unsigned long __unused5;
+};
+
+#endif /* _XTENSA_STAT_H */
diff --git a/arch/xtensa/include/asm/statfs.h b/arch/xtensa/include/asm/statfs.h
new file mode 100644 (file)
index 0000000..9c3d1a2
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * include/asm-xtensa/statfs.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_STATFS_H
+#define _XTENSA_STATFS_H
+
+#include <asm-generic/statfs.h>
+
+#endif /* _XTENSA_STATFS_H */
+
diff --git a/arch/xtensa/include/asm/string.h b/arch/xtensa/include/asm/string.h
new file mode 100644 (file)
index 0000000..5fb8c27
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * include/asm-xtensa/string.h
+ *
+ * These trivial string functions are considered part of the public domain.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+/* We should optimize these. See arch/xtensa/lib/strncpy_user.S */
+
+#ifndef _XTENSA_STRING_H
+#define _XTENSA_STRING_H
+
+#define __HAVE_ARCH_STRCPY
+static inline char *strcpy(char *__dest, const char *__src)
+{
+       register char *__xdest = __dest;
+       unsigned long __dummy;
+
+       __asm__ __volatile__("1:\n\t"
+               "l8ui   %2, %1, 0\n\t"
+               "s8i    %2, %0, 0\n\t"
+               "addi   %1, %1, 1\n\t"
+               "addi   %0, %0, 1\n\t"
+               "bnez   %2, 1b\n\t"
+               : "=r" (__dest), "=r" (__src), "=&r" (__dummy)
+               : "0" (__dest), "1" (__src)
+               : "memory");
+
+       return __xdest;
+}
+
+#define __HAVE_ARCH_STRNCPY
+static inline char *strncpy(char *__dest, const char *__src, size_t __n)
+{
+       register char *__xdest = __dest;
+       unsigned long __dummy;
+
+       if (__n == 0)
+               return __xdest;
+
+       __asm__ __volatile__(
+               "1:\n\t"
+               "l8ui   %2, %1, 0\n\t"
+               "s8i    %2, %0, 0\n\t"
+               "addi   %1, %1, 1\n\t"
+               "addi   %0, %0, 1\n\t"
+               "beqz   %2, 2f\n\t"
+               "bne    %1, %5, 1b\n"
+               "2:"
+               : "=r" (__dest), "=r" (__src), "=&r" (__dummy)
+               : "0" (__dest), "1" (__src), "r" (__src+__n)
+               : "memory");
+
+       return __xdest;
+}
+
+#define __HAVE_ARCH_STRCMP
+static inline int strcmp(const char *__cs, const char *__ct)
+{
+       register int __res;
+       unsigned long __dummy;
+
+       __asm__ __volatile__(
+               "1:\n\t"
+               "l8ui   %3, %1, 0\n\t"
+               "addi   %1, %1, 1\n\t"
+               "l8ui   %2, %0, 0\n\t"
+               "addi   %0, %0, 1\n\t"
+               "beqz   %2, 2f\n\t"
+               "beq    %2, %3, 1b\n"
+               "2:\n\t"
+               "sub    %2, %3, %2"
+               : "=r" (__cs), "=r" (__ct), "=&r" (__res), "=&r" (__dummy)
+               : "0" (__cs), "1" (__ct));
+
+       return __res;
+}
+
+#define __HAVE_ARCH_STRNCMP
+static inline int strncmp(const char *__cs, const char *__ct, size_t __n)
+{
+       register int __res;
+       unsigned long __dummy;
+
+       __asm__ __volatile__(
+               "mov    %2, %3\n"
+               "1:\n\t"
+               "beq    %0, %6, 2f\n\t"
+               "l8ui   %3, %1, 0\n\t"
+               "addi   %1, %1, 1\n\t"
+               "l8ui   %2, %0, 0\n\t"
+               "addi   %0, %0, 1\n\t"
+               "beqz   %2, 2f\n\t"
+               "beqz   %3, 2f\n\t"
+               "beq    %2, %3, 1b\n"
+               "2:\n\t"
+               "sub    %2, %3, %2"
+               : "=r" (__cs), "=r" (__ct), "=&r" (__res), "=&r" (__dummy)
+               : "0" (__cs), "1" (__ct), "r" (__cs+__n));
+
+       return __res;
+}
+
+#define __HAVE_ARCH_MEMSET
+extern void *memset(void *__s, int __c, size_t __count);
+
+#define __HAVE_ARCH_MEMCPY
+extern void *memcpy(void *__to, __const__ void *__from, size_t __n);
+
+#define __HAVE_ARCH_MEMMOVE
+extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
+
+/* Don't build bcopy at all ...  */
+#define __HAVE_ARCH_BCOPY
+
+#define __HAVE_ARCH_MEMSCAN
+#define memscan memchr
+
+#endif /* _XTENSA_STRING_H */
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h
new file mode 100644 (file)
index 0000000..05cebf8
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * include/asm-xtensa/syscall.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2007 Tensilica Inc.
+ */
+
+struct pt_regs;
+struct sigaction;
+asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*);
+asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*);
+asmlinkage long xtensa_pipe(int __user *);
+asmlinkage long xtensa_mmap2(unsigned long, unsigned long, unsigned long,
+                            unsigned long, unsigned long, unsigned long);
+asmlinkage long xtensa_ptrace(long, long, long, long);
+asmlinkage long xtensa_sigreturn(struct pt_regs*);
+asmlinkage long xtensa_rt_sigreturn(struct pt_regs*);
+asmlinkage long xtensa_sigsuspend(struct pt_regs*);
+asmlinkage long xtensa_rt_sigsuspend(struct pt_regs*);
+asmlinkage long xtensa_sigaction(int, const struct old_sigaction*,
+                                struct old_sigaction*);
+asmlinkage long xtensa_sigaltstack(struct pt_regs *regs);
+asmlinkage long sys_rt_sigaction(int,
+                                const struct sigaction __user *,
+                                struct sigaction __user *,
+                                size_t);
+asmlinkage long xtensa_shmat(int, char __user *, int);
+asmlinkage long xtensa_fadvise64_64(int, int,
+                                   unsigned long long, unsigned long long);
+
+/* Should probably move to linux/syscalls.h */
+struct pollfd;
+asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp,
+       fd_set __user *exp, struct timespec __user *tsp, void __user *sig);
+asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds,
+       struct timespec __user *tsp, const sigset_t __user *sigmask,
+       size_t sigsetsize);
+
+
diff --git a/arch/xtensa/include/asm/system.h b/arch/xtensa/include/asm/system.h
new file mode 100644 (file)
index 0000000..62b1e8f
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * include/asm-xtensa/system.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SYSTEM_H
+#define _XTENSA_SYSTEM_H
+
+#include <linux/stringify.h>
+
+#include <asm/processor.h>
+
+/* interrupt control */
+
+#define local_save_flags(x)                                            \
+       __asm__ __volatile__ ("rsr %0,"__stringify(PS) : "=a" (x));
+#define local_irq_restore(x)   do {                                    \
+       __asm__ __volatile__ ("wsr %0, "__stringify(PS)" ; rsync"       \
+                             :: "a" (x) : "memory"); } while(0);
+#define local_irq_save(x)      do {                                    \
+       __asm__ __volatile__ ("rsil %0, "__stringify(LOCKLEVEL)         \
+                             : "=a" (x) :: "memory");} while(0);
+
+static inline void local_irq_disable(void)
+{
+       unsigned long flags;
+       __asm__ __volatile__ ("rsil %0, "__stringify(LOCKLEVEL)
+                             : "=a" (flags) :: "memory");
+}
+static inline void local_irq_enable(void)
+{
+       unsigned long flags;
+       __asm__ __volatile__ ("rsil %0, 0" : "=a" (flags) :: "memory");
+
+}
+
+static inline int irqs_disabled(void)
+{
+       unsigned long flags;
+       local_save_flags(flags);
+       return flags & 0xf;
+}
+
+
+#define smp_read_barrier_depends() do { } while(0)
+#define read_barrier_depends() do { } while(0)
+
+#define mb()  barrier()
+#define rmb() mb()
+#define wmb() mb()
+
+#ifdef CONFIG_SMP
+#error smp_* not defined
+#else
+#define smp_mb()       barrier()
+#define smp_rmb()      barrier()
+#define smp_wmb()      barrier()
+#endif
+
+#define set_mb(var, value)     do { var = value; mb(); } while (0)
+
+#if !defined (__ASSEMBLY__)
+
+/* * switch_to(n) should switch tasks to task nr n, first
+ * checking that n isn't the current task, in which case it does nothing.
+ */
+extern void *_switch_to(void *last, void *next);
+
+#endif /* __ASSEMBLY__ */
+
+#define switch_to(prev,next,last)              \
+do {                                           \
+       (last) = _switch_to(prev, next);        \
+} while(0)
+
+/*
+ * cmpxchg
+ */
+
+static inline unsigned long
+__cmpxchg_u32(volatile int *p, int old, int new)
+{
+  __asm__ __volatile__("rsil    a15, "__stringify(LOCKLEVEL)"\n\t"
+                      "l32i    %0, %1, 0              \n\t"
+                      "bne     %0, %2, 1f             \n\t"
+                      "s32i    %3, %1, 0              \n\t"
+                      "1:                             \n\t"
+                      "wsr     a15, "__stringify(PS)" \n\t"
+                      "rsync                          \n\t"
+                      : "=&a" (old)
+                      : "a" (p), "a" (old), "r" (new)
+                      : "a15", "memory");
+  return old;
+}
+/* This function doesn't exist, so you'll get a linker error
+ * if something tries to do an invalid cmpxchg(). */
+
+extern void __cmpxchg_called_with_bad_pointer(void);
+
+static __inline__ unsigned long
+__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
+{
+       switch (size) {
+       case 4:  return __cmpxchg_u32(ptr, old, new);
+       default: __cmpxchg_called_with_bad_pointer();
+                return old;
+       }
+}
+
+#define cmpxchg(ptr,o,n)                                                     \
+       ({ __typeof__(*(ptr)) _o_ = (o);                                      \
+          __typeof__(*(ptr)) _n_ = (n);                                      \
+          (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,          \
+                                       (unsigned long)_n_, sizeof (*(ptr))); \
+       })
+
+#include <asm-generic/cmpxchg-local.h>
+
+static inline unsigned long __cmpxchg_local(volatile void *ptr,
+                                     unsigned long old,
+                                     unsigned long new, int size)
+{
+       switch (size) {
+       case 4:
+               return __cmpxchg_u32(ptr, old, new);
+       default:
+               return __cmpxchg_local_generic(ptr, old, new, size);
+       }
+
+       return old;
+}
+
+/*
+ * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
+ * them available.
+ */
+#define cmpxchg_local(ptr, o, n)                                              \
+       ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
+                       (unsigned long)(n), sizeof(*(ptr))))
+#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
+
+/*
+ * xchg_u32
+ *
+ * Note that a15 is used here because the register allocation
+ * done by the compiler is not guaranteed and a window overflow
+ * may not occur between the rsil and wsr instructions. By using
+ * a15 in the rsil, the machine is guaranteed to be in a state
+ * where no register reference will cause an overflow.
+ */
+
+static inline unsigned long xchg_u32(volatile int * m, unsigned long val)
+{
+  unsigned long tmp;
+  __asm__ __volatile__("rsil    a15, "__stringify(LOCKLEVEL)"\n\t"
+                      "l32i    %0, %1, 0              \n\t"
+                      "s32i    %2, %1, 0              \n\t"
+                      "wsr     a15, "__stringify(PS)" \n\t"
+                      "rsync                          \n\t"
+                      : "=&a" (tmp)
+                      : "a" (m), "a" (val)
+                      : "a15", "memory");
+  return tmp;
+}
+
+#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+
+/*
+ * This only works if the compiler isn't horribly bad at optimizing.
+ * gcc-2.5.8 reportedly can't handle this, but I define that one to
+ * be dead anyway.
+ */
+
+extern void __xchg_called_with_bad_pointer(void);
+
+static __inline__ unsigned long
+__xchg(unsigned long x, volatile void * ptr, int size)
+{
+       switch (size) {
+               case 4:
+                       return xchg_u32(ptr, x);
+       }
+       __xchg_called_with_bad_pointer();
+       return x;
+}
+
+extern void set_except_vector(int n, void *addr);
+
+static inline void spill_registers(void)
+{
+       unsigned int a0, ps;
+
+       __asm__ __volatile__ (
+               "movi   a14," __stringify (PS_EXCM_BIT) " | 1\n\t"
+               "mov    a12, a0\n\t"
+               "rsr    a13," __stringify(SAR) "\n\t"
+               "xsr    a14," __stringify(PS) "\n\t"
+               "movi   a0, _spill_registers\n\t"
+               "rsync\n\t"
+               "callx0 a0\n\t"
+               "mov    a0, a12\n\t"
+               "wsr    a13," __stringify(SAR) "\n\t"
+               "wsr    a14," __stringify(PS) "\n\t"
+               :: "a" (&a0), "a" (&ps)
+               : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory");
+}
+
+#define arch_align_stack(x) (x)
+
+#endif /* _XTENSA_SYSTEM_H */
diff --git a/arch/xtensa/include/asm/termbits.h b/arch/xtensa/include/asm/termbits.h
new file mode 100644 (file)
index 0000000..85aa6a3
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * include/asm-xtensa/termbits.h
+ *
+ * Copied from SH.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_TERMBITS_H
+#define _XTENSA_TERMBITS_H
+
+
+#include <linux/posix_types.h>
+
+typedef unsigned char  cc_t;
+typedef unsigned int   speed_t;
+typedef unsigned int   tcflag_t;
+
+#define NCCS 19
+struct termios {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+};
+
+struct termios2 {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+       speed_t c_ispeed;               /* input speed */
+       speed_t c_ospeed;               /* output speed */
+};
+
+struct ktermios {
+       tcflag_t c_iflag;               /* input mode flags */
+       tcflag_t c_oflag;               /* output mode flags */
+       tcflag_t c_cflag;               /* control mode flags */
+       tcflag_t c_lflag;               /* local mode flags */
+       cc_t c_line;                    /* line discipline */
+       cc_t c_cc[NCCS];                /* control characters */
+       speed_t c_ispeed;               /* input speed */
+       speed_t c_ospeed;               /* output speed */
+};
+
+/* c_cc characters */
+
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VEOL 11
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+#define VEOL2 16
+
+/* c_iflag bits */
+
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK  0000020
+#define ISTRIP 0000040
+#define INLCR  0000100
+#define IGNCR  0000200
+#define ICRNL  0000400
+#define IUCLC  0001000
+#define IXON   0002000
+#define IXANY  0004000
+#define IXOFF  0010000
+#define IMAXBEL        0020000
+#define IUTF8  0040000
+
+/* c_oflag bits */
+
+#define OPOST  0000001
+#define OLCUC  0000002
+#define ONLCR  0000004
+#define OCRNL  0000010
+#define ONOCR  0000020
+#define ONLRET 0000040
+#define OFILL  0000100
+#define OFDEL  0000200
+#define NLDLY  0000400
+#define   NL0  0000000
+#define   NL1  0000400
+#define CRDLY  0003000
+#define   CR0  0000000
+#define   CR1  0001000
+#define   CR2  0002000
+#define   CR3  0003000
+#define TABDLY 0014000
+#define   TAB0 0000000
+#define   TAB1 0004000
+#define   TAB2 0010000
+#define   TAB3 0014000
+#define   XTABS        0014000
+#define BSDLY  0020000
+#define   BS0  0000000
+#define   BS1  0020000
+#define VTDLY  0040000
+#define   VT0  0000000
+#define   VT1  0040000
+#define FFDLY  0100000
+#define   FF0  0000000
+#define   FF1  0100000
+
+/* c_cflag bit meaning */
+
+#define CBAUD  0010017
+#define  B0    0000000         /* hang up */
+#define  B50   0000001
+#define  B75   0000002
+#define  B110  0000003
+#define  B134  0000004
+#define  B150  0000005
+#define  B200  0000006
+#define  B300  0000007
+#define  B600  0000010
+#define  B1200 0000011
+#define  B1800 0000012
+#define  B2400 0000013
+#define  B4800 0000014
+#define  B9600 0000015
+#define  B19200        0000016
+#define  B38400        0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CSIZE  0000060
+#define   CS5  0000000
+#define   CS6  0000020
+#define   CS7  0000040
+#define   CS8  0000060
+#define CSTOPB 0000100
+#define CREAD  0000200
+#define PARENB 0000400
+#define PARODD 0001000
+#define HUPCL  0002000
+#define CLOCAL 0004000
+#define CBAUDEX 0010000
+#define           BOTHER 0010000
+#define    B57600 0010001
+#define   B115200 0010002
+#define   B230400 0010003
+#define   B460800 0010004
+#define   B500000 0010005
+#define   B576000 0010006
+#define   B921600 0010007
+#define  B1000000 0010010
+#define  B1152000 0010011
+#define  B1500000 0010012
+#define  B2000000 0010013
+#define  B2500000 0010014
+#define  B3000000 0010015
+#define  B3500000 0010016
+#define  B4000000 0010017
+#define CIBAUD   002003600000          /* input baud rate */
+#define CMSPAR   010000000000          /* mark or space (stick) parity */
+#define CRTSCTS          020000000000          /* flow control */
+
+#define IBSHIFT        16              /* Shift from CBAUD to CIBAUD */
+
+/* c_lflag bits */
+
+#define ISIG   0000001
+#define ICANON 0000002
+#define XCASE  0000004
+#define ECHO   0000010
+#define ECHOE  0000020
+#define ECHOK  0000040
+#define ECHONL 0000100
+#define NOFLSH 0000200
+#define TOSTOP 0000400
+#define ECHOCTL        0001000
+#define ECHOPRT        0002000
+#define ECHOKE 0004000
+#define FLUSHO 0010000
+#define PENDIN 0040000
+#define IEXTEN 0100000
+
+/* tcflow() and TCXONC use these */
+
+#define        TCOOFF          0
+#define        TCOON           1
+#define        TCIOFF          2
+#define        TCION           3
+
+/* tcflush() and TCFLSH use these */
+
+#define        TCIFLUSH        0
+#define        TCOFLUSH        1
+#define        TCIOFLUSH       2
+
+/* tcsetattr uses these */
+
+#define        TCSANOW         0
+#define        TCSADRAIN       1
+#define        TCSAFLUSH       2
+
+#endif /* _XTENSA_TERMBITS_H */
diff --git a/arch/xtensa/include/asm/termios.h b/arch/xtensa/include/asm/termios.h
new file mode 100644 (file)
index 0000000..4673f42
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * include/asm-xtensa/termios.h
+ *
+ * Copied from SH.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_TERMIOS_H
+#define _XTENSA_TERMIOS_H
+
+#include <asm/termbits.h>
+#include <asm/ioctls.h>
+
+struct winsize {
+       unsigned short ws_row;
+       unsigned short ws_col;
+       unsigned short ws_xpixel;
+       unsigned short ws_ypixel;
+};
+
+#define NCC 8
+struct termio {
+       unsigned short c_iflag;         /* input mode flags */
+       unsigned short c_oflag;         /* output mode flags */
+       unsigned short c_cflag;         /* control mode flags */
+       unsigned short c_lflag;         /* local mode flags */
+       unsigned char c_line;           /* line discipline */
+       unsigned char c_cc[NCC];        /* control characters */
+};
+
+/* Modem lines */
+
+#define TIOCM_LE       0x001
+#define TIOCM_DTR      0x002
+#define TIOCM_RTS      0x004
+#define TIOCM_ST       0x008
+#define TIOCM_SR       0x010
+#define TIOCM_CTS      0x020
+#define TIOCM_CAR      0x040
+#define TIOCM_RNG      0x080
+#define TIOCM_DSR      0x100
+#define TIOCM_CD       TIOCM_CAR
+#define TIOCM_RI       TIOCM_RNG
+#define TIOCM_OUT1     0x2000
+#define TIOCM_OUT2     0x4000
+#define TIOCM_LOOP     0x8000
+
+/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+
+#ifdef __KERNEL__
+
+/*     intr=^C         quit=^\         erase=del       kill=^U
+       eof=^D          vtime=\0        vmin=\1         sxtc=\0
+       start=^Q        stop=^S         susp=^Z         eol=\0
+       reprint=^R      discard=^U      werase=^W       lnext=^V
+       eol2=\0
+*/
+#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
+
+/*
+ * Translate a "termio" structure into a "termios". Ugh.
+ */
+
+#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
+       unsigned short __tmp; \
+       get_user(__tmp,&(termio)->x); \
+       *(unsigned short *) &(termios)->x = __tmp; \
+}
+
+#define user_termio_to_kernel_termios(termios, termio) \
+({ \
+       SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
+       SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
+       SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
+       SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
+       copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
+})
+
+/*
+ * Translate a "termios" structure into a "termio". Ugh.
+ */
+
+#define kernel_termios_to_user_termio(termio, termios) \
+({ \
+       put_user((termios)->c_iflag, &(termio)->c_iflag); \
+       put_user((termios)->c_oflag, &(termio)->c_oflag); \
+       put_user((termios)->c_cflag, &(termio)->c_cflag); \
+       put_user((termios)->c_lflag, &(termio)->c_lflag); \
+       put_user((termios)->c_line,  &(termio)->c_line); \
+       copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
+})
+
+#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
+#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
+#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
+#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
+
+#endif /* __KERNEL__ */
+
+#endif /* _XTENSA_TERMIOS_H */
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h
new file mode 100644 (file)
index 0000000..0f4fe1f
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * include/asm-xtensa/thread_info.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_THREAD_INFO_H
+#define _XTENSA_THREAD_INFO_H
+
+#ifdef __KERNEL__
+
+#ifndef __ASSEMBLY__
+# include <asm/processor.h>
+#endif
+
+/*
+ * low level task data that entry.S needs immediate access to
+ * - this struct should fit entirely inside of one cache line
+ * - this struct shares the supervisor stack pages
+ * - if the contents of this structure are changed, the assembly constants
+ *   must also be changed
+ */
+
+#ifndef __ASSEMBLY__
+
+#if XTENSA_HAVE_COPROCESSORS
+
+typedef struct xtregs_coprocessor {
+       xtregs_cp0_t cp0;
+       xtregs_cp1_t cp1;
+       xtregs_cp2_t cp2;
+       xtregs_cp3_t cp3;
+       xtregs_cp4_t cp4;
+       xtregs_cp5_t cp5;
+       xtregs_cp6_t cp6;
+       xtregs_cp7_t cp7;
+} xtregs_coprocessor_t;
+
+#endif
+
+struct thread_info {
+       struct task_struct      *task;          /* main task structure */
+       struct exec_domain      *exec_domain;   /* execution domain */
+       unsigned long           flags;          /* low level flags */
+       unsigned long           status;         /* thread-synchronous flags */
+       __u32                   cpu;            /* current CPU */
+       __s32                   preempt_count;  /* 0 => preemptable,< 0 => BUG*/
+
+       mm_segment_t            addr_limit;     /* thread address space */
+       struct restart_block    restart_block;
+
+       unsigned long           cpenable;
+
+       /* Allocate storage for extra user states and coprocessor states. */
+#if XTENSA_HAVE_COPROCESSORS
+       xtregs_coprocessor_t    xtregs_cp;
+#endif
+       xtregs_user_t           xtregs_user;
+};
+
+#else /* !__ASSEMBLY__ */
+
+/* offsets into the thread_info struct for assembly code access */
+#define TI_TASK                 0x00000000
+#define TI_EXEC_DOMAIN  0x00000004
+#define TI_FLAGS        0x00000008
+#define TI_STATUS       0x0000000C
+#define TI_CPU          0x00000010
+#define TI_PRE_COUNT    0x00000014
+#define TI_ADDR_LIMIT   0x00000018
+#define TI_RESTART_BLOCK 0x000001C
+
+#endif
+
+#define PREEMPT_ACTIVE         0x10000000
+
+/*
+ * macros/functions for gaining access to the thread information structure
+ *
+ * preempt_count needs to be 1 initially, until the scheduler is functional.
+ */
+
+#ifndef __ASSEMBLY__
+
+#define INIT_THREAD_INFO(tsk)                  \
+{                                              \
+       .task           = &tsk,                 \
+       .exec_domain    = &default_exec_domain, \
+       .flags          = 0,                    \
+       .cpu            = 0,                    \
+       .preempt_count  = 1,                    \
+       .addr_limit     = KERNEL_DS,            \
+       .restart_block = {                      \
+               .fn = do_no_restart_syscall,    \
+       },                                      \
+}
+
+#define init_thread_info       (init_thread_union.thread_info)
+#define init_stack             (init_thread_union.stack)
+
+/* how to get the thread information struct from C */
+static inline struct thread_info *current_thread_info(void)
+{
+       struct thread_info *ti;
+        __asm__("extui %0,a1,0,13\n\t"
+                "xor %0, a1, %0" : "=&r" (ti) : );
+       return ti;
+}
+
+#else /* !__ASSEMBLY__ */
+
+/* how to get the thread information struct from ASM */
+#define GET_THREAD_INFO(reg,sp) \
+       extui reg, sp, 0, 13; \
+       xor   reg, sp, reg
+#endif
+
+
+/*
+ * thread information flags
+ * - these are process state flags that various assembly files may need to access
+ * - pending work-to-be-done flags are in LSW
+ * - other flags in MSW
+ */
+#define TIF_SYSCALL_TRACE      0       /* syscall trace active */
+#define TIF_SIGPENDING         1       /* signal pending */
+#define TIF_NEED_RESCHED       2       /* rescheduling necessary */
+#define TIF_SINGLESTEP         3       /* restore singlestep on return to user mode */
+#define TIF_IRET               4       /* return with iret */
+#define TIF_MEMDIE             5
+#define TIF_RESTORE_SIGMASK    6       /* restore signal mask in do_signal() */
+#define TIF_POLLING_NRFLAG     16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
+#define TIF_FREEZE             17      /* is freezing for suspend */
+
+#define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)
+#define _TIF_SIGPENDING                (1<<TIF_SIGPENDING)
+#define _TIF_NEED_RESCHED      (1<<TIF_NEED_RESCHED)
+#define _TIF_SINGLESTEP                (1<<TIF_SINGLESTEP)
+#define _TIF_IRET              (1<<TIF_IRET)
+#define _TIF_POLLING_NRFLAG    (1<<TIF_POLLING_NRFLAG)
+#define _TIF_RESTORE_SIGMASK   (1<<TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE            (1<<TIF_FREEZE)
+
+#define _TIF_WORK_MASK         0x0000FFFE      /* work to do on interrupt/exception return */
+#define _TIF_ALLWORK_MASK      0x0000FFFF      /* work to do on any return to u-space */
+
+/*
+ * Thread-synchronous status.
+ *
+ * This is different from the flags in that nobody else
+ * ever touches our thread-synchronous status, so we don't
+ * have to worry about atomic accesses.
+ */
+#define TS_USEDFPU             0x0001  /* FPU was used by this task this quantum (SMP) */
+
+#define THREAD_SIZE 8192       //(2*PAGE_SIZE)
+#define THREAD_SIZE_ORDER 1
+
+#endif /* __KERNEL__ */
+#endif /* _XTENSA_THREAD_INFO */
diff --git a/arch/xtensa/include/asm/timex.h b/arch/xtensa/include/asm/timex.h
new file mode 100644 (file)
index 0000000..b83a818
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * include/asm-xtensa/timex.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_TIMEX_H
+#define _XTENSA_TIMEX_H
+
+#ifdef __KERNEL__
+
+#include <asm/processor.h>
+#include <linux/stringify.h>
+
+#define _INTLEVEL(x)   XCHAL_INT ## x ## _LEVEL
+#define INTLEVEL(x)    _INTLEVEL(x)
+
+#if INTLEVEL(XCHAL_TIMER0_INTERRUPT) == 1
+# define LINUX_TIMER     0
+# define LINUX_TIMER_INT XCHAL_TIMER0_INTERRUPT
+#elif INTLEVEL(XCHAL_TIMER1_INTERRUPT) == 1
+# define LINUX_TIMER     1
+# define LINUX_TIMER_INT XCHAL_TIMER1_INTERRUPT
+#elif INTLEVEL(XCHAL_TIMER2_INTERRUPT) == 1
+# define LINUX_TIMER     2
+# define LINUX_TIMER_INT XCHAL_TIMER2_INTERRUPT
+#else
+# error "Bad timer number for Linux configurations!"
+#endif
+
+#define LINUX_TIMER_MASK        (1L << LINUX_TIMER_INT)
+
+#define CLOCK_TICK_RATE        1193180 /* (everyone is using this value) */
+#define CLOCK_TICK_FACTOR       20 /* Factor of both 10^6 and CLOCK_TICK_RATE */
+
+#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
+extern unsigned long ccount_per_jiffy;
+extern unsigned long ccount_nsec;
+#define CCOUNT_PER_JIFFY ccount_per_jiffy
+#define NSEC_PER_CCOUNT  ccount_nsec
+#else
+#define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ))
+#define NSEC_PER_CCOUNT (1000UL / CONFIG_XTENSA_CPU_CLOCK)
+#endif
+
+
+typedef unsigned long long cycles_t;
+
+/*
+ * Only used for SMP.
+ */
+
+extern cycles_t cacheflush_time;
+
+#define get_cycles()   (0)
+
+
+/*
+ * Register access.
+ */
+
+#define WSR_CCOUNT(r)    asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r))
+#define RSR_CCOUNT(r)    asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r))
+#define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r))
+#define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r))
+
+static inline unsigned long get_ccount (void)
+{
+       unsigned long ccount;
+       RSR_CCOUNT(ccount);
+       return ccount;
+}
+
+static inline void set_ccount (unsigned long ccount)
+{
+       WSR_CCOUNT(ccount);
+}
+
+static inline unsigned long get_linux_timer (void)
+{
+       unsigned ccompare;
+       RSR_CCOMPARE(LINUX_TIMER, ccompare);
+       return ccompare;
+}
+
+static inline void set_linux_timer (unsigned long ccompare)
+{
+       WSR_CCOMPARE(LINUX_TIMER, ccompare);
+}
+
+#endif /* __KERNEL__ */
+#endif /* _XTENSA_TIMEX_H */
diff --git a/arch/xtensa/include/asm/tlb.h b/arch/xtensa/include/asm/tlb.h
new file mode 100644 (file)
index 0000000..31c220f
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * include/asm-xtensa/tlb.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_TLB_H
+#define _XTENSA_TLB_H
+
+#include <asm/cache.h>
+#include <asm/page.h>
+
+#if (DCACHE_WAY_SIZE <= PAGE_SIZE)
+
+/* Note, read http://lkml.org/lkml/2004/1/15/6 */
+
+# define tlb_start_vma(tlb,vma)                        do { } while (0)
+# define tlb_end_vma(tlb,vma)                  do { } while (0)
+
+#else
+
+# define tlb_start_vma(tlb, vma)                                             \
+       do {                                                                  \
+               if (!tlb->fullmm)                                             \
+                       flush_cache_range(vma, vma->vm_start, vma->vm_end);   \
+       } while(0)
+
+# define tlb_end_vma(tlb, vma)                                               \
+       do {                                                                  \
+               if (!tlb->fullmm)                                             \
+                       flush_tlb_range(vma, vma->vm_start, vma->vm_end);     \
+       } while(0)
+
+#endif
+
+#define __tlb_remove_tlb_entry(tlb,pte,addr)   do { } while (0)
+#define tlb_flush(tlb)                         flush_tlb_mm((tlb)->mm)
+
+#include <asm-generic/tlb.h>
+
+#define __pte_free_tlb(tlb, pte)               pte_free((tlb)->mm, pte)
+
+#endif /* _XTENSA_TLB_H */
diff --git a/arch/xtensa/include/asm/tlbflush.h b/arch/xtensa/include/asm/tlbflush.h
new file mode 100644 (file)
index 0000000..46d2400
--- /dev/null
@@ -0,0 +1,191 @@
+/*
+ * include/asm-xtensa/tlbflush.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_TLBFLUSH_H
+#define _XTENSA_TLBFLUSH_H
+
+#ifdef __KERNEL__
+
+#include <linux/stringify.h>
+#include <asm/processor.h>
+
+#define DTLB_WAY_PGD   7
+
+#define ITLB_ARF_WAYS  4
+#define DTLB_ARF_WAYS  4
+
+#define ITLB_HIT_BIT   3
+#define DTLB_HIT_BIT   4
+
+#ifndef __ASSEMBLY__
+
+/* TLB flushing:
+ *
+ *  - flush_tlb_all() flushes all processes TLB entries
+ *  - flush_tlb_mm(mm) flushes the specified mm context TLB entries
+ *  - flush_tlb_page(mm, vmaddr) flushes a single page
+ *  - flush_tlb_range(mm, start, end) flushes a range of pages
+ */
+
+extern void flush_tlb_all(void);
+extern void flush_tlb_mm(struct mm_struct*);
+extern void flush_tlb_page(struct vm_area_struct*,unsigned long);
+extern void flush_tlb_range(struct vm_area_struct*,unsigned long,unsigned long);
+
+#define flush_tlb_kernel_range(start,end) flush_tlb_all()
+
+/* TLB operations. */
+
+static inline unsigned long itlb_probe(unsigned long addr)
+{
+       unsigned long tmp;
+       __asm__ __volatile__("pitlb  %0, %1\n\t" : "=a" (tmp) : "a" (addr));
+       return tmp;
+}
+
+static inline unsigned long dtlb_probe(unsigned long addr)
+{
+       unsigned long tmp;
+       __asm__ __volatile__("pdtlb  %0, %1\n\t" : "=a" (tmp) : "a" (addr));
+       return tmp;
+}
+
+static inline void invalidate_itlb_entry (unsigned long probe)
+{
+       __asm__ __volatile__("iitlb  %0; isync\n\t" : : "a" (probe));
+}
+
+static inline void invalidate_dtlb_entry (unsigned long probe)
+{
+       __asm__ __volatile__("idtlb  %0; dsync\n\t" : : "a" (probe));
+}
+
+/* Use the .._no_isync functions with caution.  Generally, these are
+ * handy for bulk invalidates followed by a single 'isync'.  The
+ * caller must follow up with an 'isync', which can be relatively
+ * expensive on some Xtensa implementations.
+ */
+static inline void invalidate_itlb_entry_no_isync (unsigned entry)
+{
+       /* Caller must follow up with 'isync'. */
+       __asm__ __volatile__ ("iitlb  %0\n" : : "a" (entry) );
+}
+
+static inline void invalidate_dtlb_entry_no_isync (unsigned entry)
+{
+       /* Caller must follow up with 'isync'. */
+       __asm__ __volatile__ ("idtlb  %0\n" : : "a" (entry) );
+}
+
+static inline void set_itlbcfg_register (unsigned long val)
+{
+       __asm__ __volatile__("wsr  %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t"
+                            : : "a" (val));
+}
+
+static inline void set_dtlbcfg_register (unsigned long val)
+{
+       __asm__ __volatile__("wsr  %0, "__stringify(DTLBCFG)"; dsync\n\t"
+                            : : "a" (val));
+}
+
+static inline void set_ptevaddr_register (unsigned long val)
+{
+       __asm__ __volatile__(" wsr  %0, "__stringify(PTEVADDR)"; isync\n"
+                            : : "a" (val));
+}
+
+static inline unsigned long read_ptevaddr_register (void)
+{
+       unsigned long tmp;
+       __asm__ __volatile__("rsr  %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp));
+       return tmp;
+}
+
+static inline void write_dtlb_entry (pte_t entry, int way)
+{
+       __asm__ __volatile__("wdtlb  %1, %0; dsync\n\t"
+                            : : "r" (way), "r" (entry) );
+}
+
+static inline void write_itlb_entry (pte_t entry, int way)
+{
+       __asm__ __volatile__("witlb  %1, %0; isync\n\t"
+                            : : "r" (way), "r" (entry) );
+}
+
+static inline void invalidate_page_directory (void)
+{
+       invalidate_dtlb_entry (DTLB_WAY_PGD);
+       invalidate_dtlb_entry (DTLB_WAY_PGD+1);
+       invalidate_dtlb_entry (DTLB_WAY_PGD+2);
+}
+
+static inline void invalidate_itlb_mapping (unsigned address)
+{
+       unsigned long tlb_entry;
+       if (((tlb_entry = itlb_probe(address)) & (1 << ITLB_HIT_BIT)) != 0)
+               invalidate_itlb_entry(tlb_entry);
+}
+
+static inline void invalidate_dtlb_mapping (unsigned address)
+{
+       unsigned long tlb_entry;
+       if (((tlb_entry = dtlb_probe(address)) & (1 << DTLB_HIT_BIT)) != 0)
+               invalidate_dtlb_entry(tlb_entry);
+}
+
+#define check_pgt_cache()      do { } while (0)
+
+
+/*
+ * DO NOT USE THESE FUNCTIONS.  These instructions aren't part of the Xtensa
+ * ISA and exist only for test purposes..
+ * You may find it helpful for MMU debugging, however.
+ *
+ * 'at' is the unmodified input register
+ * 'as' is the output register, as follows (specific to the Linux config):
+ *
+ *      as[31..12] contain the virtual address
+ *      as[11..08] are meaningless
+ *      as[07..00] contain the asid
+ */
+
+static inline unsigned long read_dtlb_virtual (int way)
+{
+       unsigned long tmp;
+       __asm__ __volatile__("rdtlb0  %0, %1\n\t" : "=a" (tmp), "+a" (way));
+       return tmp;
+}
+
+static inline unsigned long read_dtlb_translation (int way)
+{
+       unsigned long tmp;
+       __asm__ __volatile__("rdtlb1  %0, %1\n\t" : "=a" (tmp), "+a" (way));
+       return tmp;
+}
+
+static inline unsigned long read_itlb_virtual (int way)
+{
+       unsigned long tmp;
+       __asm__ __volatile__("ritlb0  %0, %1\n\t" : "=a" (tmp), "+a" (way));
+       return tmp;
+}
+
+static inline unsigned long read_itlb_translation (int way)
+{
+       unsigned long tmp;
+       __asm__ __volatile__("ritlb1  %0, %1\n\t" : "=a" (tmp), "+a" (way));
+       return tmp;
+}
+
+#endif /* __ASSEMBLY__ */
+#endif /* __KERNEL__ */
+#endif /* _XTENSA_TLBFLUSH_H */
diff --git a/arch/xtensa/include/asm/topology.h b/arch/xtensa/include/asm/topology.h
new file mode 100644 (file)
index 0000000..7309e38
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/topology.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_TOPOLOGY_H
+#define _XTENSA_TOPOLOGY_H
+
+#include <asm-generic/topology.h>
+
+#endif /* _XTENSA_TOPOLOGY_H */
diff --git a/arch/xtensa/include/asm/types.h b/arch/xtensa/include/asm/types.h
new file mode 100644 (file)
index 0000000..c89569a
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * include/asm-xtensa/types.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_TYPES_H
+#define _XTENSA_TYPES_H
+
+#include <asm-generic/int-ll64.h>
+
+#ifdef __ASSEMBLY__
+# define __XTENSA_UL(x)                (x)
+# define __XTENSA_UL_CONST(x)  x
+#else
+# define __XTENSA_UL(x)                ((unsigned long)(x))
+# define __XTENSA_UL_CONST(x)  x##UL
+#endif
+
+#ifndef __ASSEMBLY__
+
+typedef unsigned short umode_t;
+
+/*
+ * These aren't exported outside the kernel to avoid name space clashes
+ */
+#ifdef __KERNEL__
+
+#define BITS_PER_LONG 32
+
+/* Dma addresses are 32-bits wide.  */
+
+typedef u32 dma_addr_t;
+
+#endif /* __KERNEL__ */
+#endif
+
+#endif /* _XTENSA_TYPES_H */
diff --git a/arch/xtensa/include/asm/uaccess.h b/arch/xtensa/include/asm/uaccess.h
new file mode 100644 (file)
index 0000000..b852842
--- /dev/null
@@ -0,0 +1,500 @@
+/*
+ * include/asm-xtensa/uaccess.h
+ *
+ * User space memory access functions
+ *
+ * These routines provide basic accessing functions to the user memory
+ * space for the kernel. This header file provides fuctions such as:
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_UACCESS_H
+#define _XTENSA_UACCESS_H
+
+#include <linux/errno.h>
+
+#define VERIFY_READ    0
+#define VERIFY_WRITE   1
+
+#ifdef __ASSEMBLY__
+
+#include <asm/current.h>
+#include <asm/asm-offsets.h>
+#include <asm/processor.h>
+#include <asm/types.h>
+
+/*
+ * These assembly macros mirror the C macros that follow below.  They
+ * should always have identical functionality.  See
+ * arch/xtensa/kernel/sys.S for usage.
+ */
+
+#define KERNEL_DS      0
+#define USER_DS                1
+
+#define get_ds         (KERNEL_DS)
+
+/*
+ * get_fs reads current->thread.current_ds into a register.
+ * On Entry:
+ *     <ad>    anything
+ *     <sp>    stack
+ * On Exit:
+ *     <ad>    contains current->thread.current_ds
+ */
+       .macro  get_fs  ad, sp
+       GET_CURRENT(\ad,\sp)
+       l32i    \ad, \ad, THREAD_CURRENT_DS
+       .endm
+
+/*
+ * set_fs sets current->thread.current_ds to some value.
+ * On Entry:
+ *     <at>    anything (temp register)
+ *     <av>    value to write
+ *     <sp>    stack
+ * On Exit:
+ *     <at>    destroyed (actually, current)
+ *     <av>    preserved, value to write
+ */
+       .macro  set_fs  at, av, sp
+       GET_CURRENT(\at,\sp)
+       s32i    \av, \at, THREAD_CURRENT_DS
+       .endm
+
+/*
+ * kernel_ok determines whether we should bypass addr/size checking.
+ * See the equivalent C-macro version below for clarity.
+ * On success, kernel_ok branches to a label indicated by parameter
+ * <success>.  This implies that the macro falls through to the next
+ * insruction on an error.
+ *
+ * Note that while this macro can be used independently, we designed
+ * in for optimal use in the access_ok macro below (i.e., we fall
+ * through on error).
+ *
+ * On Entry:
+ *     <at>            anything (temp register)
+ *     <success>       label to branch to on success; implies
+ *                     fall-through macro on error
+ *     <sp>            stack pointer
+ * On Exit:
+ *     <at>            destroyed (actually, current->thread.current_ds)
+ */
+
+#if ((KERNEL_DS != 0) || (USER_DS == 0))
+# error Assembly macro kernel_ok fails
+#endif
+       .macro  kernel_ok  at, sp, success
+       get_fs  \at, \sp
+       beqz    \at, \success
+       .endm
+
+/*
+ * user_ok determines whether the access to user-space memory is allowed.
+ * See the equivalent C-macro version below for clarity.
+ *
+ * On error, user_ok branches to a label indicated by parameter
+ * <error>.  This implies that the macro falls through to the next
+ * instruction on success.
+ *
+ * Note that while this macro can be used independently, we designed
+ * in for optimal use in the access_ok macro below (i.e., we fall
+ * through on success).
+ *
+ * On Entry:
+ *     <aa>    register containing memory address
+ *     <as>    register containing memory size
+ *     <at>    temp register
+ *     <error> label to branch to on error; implies fall-through
+ *             macro on success
+ * On Exit:
+ *     <aa>    preserved
+ *     <as>    preserved
+ *     <at>    destroyed (actually, (TASK_SIZE + 1 - size))
+ */
+       .macro  user_ok aa, as, at, error
+       movi    \at, __XTENSA_UL_CONST(TASK_SIZE)
+       bgeu    \as, \at, \error
+       sub     \at, \at, \as
+       bgeu    \aa, \at, \error
+       .endm
+
+/*
+ * access_ok determines whether a memory access is allowed.  See the
+ * equivalent C-macro version below for clarity.
+ *
+ * On error, access_ok branches to a label indicated by parameter
+ * <error>.  This implies that the macro falls through to the next
+ * instruction on success.
+ *
+ * Note that we assume success is the common case, and we optimize the
+ * branch fall-through case on success.
+ *
+ * On Entry:
+ *     <aa>    register containing memory address
+ *     <as>    register containing memory size
+ *     <at>    temp register
+ *     <sp>
+ *     <error> label to branch to on error; implies fall-through
+ *             macro on success
+ * On Exit:
+ *     <aa>    preserved
+ *     <as>    preserved
+ *     <at>    destroyed
+ */
+       .macro  access_ok  aa, as, at, sp, error
+       kernel_ok  \at, \sp, .Laccess_ok_\@
+       user_ok    \aa, \as, \at, \error
+.Laccess_ok_\@:
+       .endm
+
+#else /* __ASSEMBLY__ not defined */
+
+#include <linux/sched.h>
+#include <asm/types.h>
+
+/*
+ * The fs value determines whether argument validity checking should
+ * be performed or not.  If get_fs() == USER_DS, checking is
+ * performed, with get_fs() == KERNEL_DS, checking is bypassed.
+ *
+ * For historical reasons (Data Segment Register?), these macros are
+ * grossly misnamed.
+ */
+
+#define KERNEL_DS      ((mm_segment_t) { 0 })
+#define USER_DS                ((mm_segment_t) { 1 })
+
+#define get_ds()       (KERNEL_DS)
+#define get_fs()       (current->thread.current_ds)
+#define set_fs(val)    (current->thread.current_ds = (val))
+
+#define segment_eq(a,b)        ((a).seg == (b).seg)
+
+#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
+#define __user_ok(addr,size) (((size) <= TASK_SIZE)&&((addr) <= TASK_SIZE-(size)))
+#define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size)))
+#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
+
+/*
+ * These are the main single-value transfer routines.  They
+ * automatically use the right size if we just have the right pointer
+ * type.
+ *
+ * This gets kind of ugly. We want to return _two_ values in
+ * "get_user()" and yet we don't want to do any pointers, because that
+ * is too much of a performance impact. Thus we have a few rather ugly
+ * macros here, and hide all the uglyness from the user.
+ *
+ * Careful to not
+ * (a) re-use the arguments for side effects (sizeof is ok)
+ * (b) require any knowledge of processes at this stage
+ */
+#define put_user(x,ptr)        __put_user_check((x),(ptr),sizeof(*(ptr)))
+#define get_user(x,ptr) __get_user_check((x),(ptr),sizeof(*(ptr)))
+
+/*
+ * The "__xxx" versions of the user access functions are versions that
+ * do not verify the address space, that must have been done previously
+ * with a separate "access_ok()" call (this is used when we do multiple
+ * accesses to the same area of user memory).
+ */
+#define __put_user(x,ptr) __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
+#define __get_user(x,ptr) __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
+
+
+extern long __put_user_bad(void);
+
+#define __put_user_nocheck(x,ptr,size)                 \
+({                                                     \
+       long __pu_err;                                  \
+       __put_user_size((x),(ptr),(size),__pu_err);     \
+       __pu_err;                                       \
+})
+
+#define __put_user_check(x,ptr,size)                           \
+({                                                             \
+       long __pu_err = -EFAULT;                                \
+       __typeof__(*(ptr)) *__pu_addr = (ptr);                  \
+       if (access_ok(VERIFY_WRITE,__pu_addr,size))             \
+               __put_user_size((x),__pu_addr,(size),__pu_err); \
+       __pu_err;                                               \
+})
+
+#define __put_user_size(x,ptr,size,retval)                             \
+do {                                                                   \
+       int __cb;                                                       \
+       retval = 0;                                                     \
+       switch (size) {                                                 \
+        case 1: __put_user_asm(x,ptr,retval,1,"s8i",__cb);  break;     \
+        case 2: __put_user_asm(x,ptr,retval,2,"s16i",__cb); break;     \
+        case 4: __put_user_asm(x,ptr,retval,4,"s32i",__cb); break;     \
+        case 8: {                                                      \
+                    __typeof__(*ptr) __v64 = x;                        \
+                    retval = __copy_to_user(ptr,&__v64,8);             \
+                    break;                                             \
+               }                                                       \
+       default: __put_user_bad();                                      \
+       }                                                               \
+} while (0)
+
+
+/*
+ * Consider a case of a user single load/store would cause both an
+ * unaligned exception and an MMU-related exception (unaligned
+ * exceptions happen first):
+ *
+ * User code passes a bad variable ptr to a system call.
+ * Kernel tries to access the variable.
+ * Unaligned exception occurs.
+ * Unaligned exception handler tries to make aligned accesses.
+ * Double exception occurs for MMU-related cause (e.g., page not mapped).
+ * do_page_fault() thinks the fault address belongs to the kernel, not the
+ * user, and panics.
+ *
+ * The kernel currently prohibits user unaligned accesses.  We use the
+ * __check_align_* macros to check for unaligned addresses before
+ * accessing user space so we don't crash the kernel.  Both
+ * __put_user_asm and __get_user_asm use these alignment macros, so
+ * macro-specific labels such as 0f, 1f, %0, %2, and %3 must stay in
+ * sync.
+ */
+
+#define __check_align_1  ""
+
+#define __check_align_2                                \
+       "   _bbci.l %3,  0, 1f          \n"     \
+       "   movi    %0, %4              \n"     \
+       "   _j      2f                  \n"
+
+#define __check_align_4                                \
+       "   _bbsi.l %3,  0, 0f          \n"     \
+       "   _bbci.l %3,  1, 1f          \n"     \
+       "0: movi    %0, %4              \n"     \
+       "   _j      2f                  \n"
+
+
+/*
+ * We don't tell gcc that we are accessing memory, but this is OK
+ * because we do not write to any memory gcc knows about, so there
+ * are no aliasing issues.
+ *
+ * WARNING: If you modify this macro at all, verify that the
+ * __check_align_* macros still work.
+ */
+#define __put_user_asm(x, addr, err, align, insn, cb)  \
+   __asm__ __volatile__(                               \
+       __check_align_##align                           \
+       "1: "insn"  %2, %3, 0           \n"             \
+       "2:                             \n"             \
+       "   .section  .fixup,\"ax\"     \n"             \
+       "   .align 4                    \n"             \
+       "4:                             \n"             \
+       "   .long  2b                   \n"             \
+       "5:                             \n"             \
+       "   l32r   %1, 4b               \n"             \
+        "   movi   %0, %4              \n"             \
+        "   jx     %1                  \n"             \
+       "   .previous                   \n"             \
+       "   .section  __ex_table,\"a\"  \n"             \
+       "   .long       1b, 5b          \n"             \
+       "   .previous"                                  \
+       :"=r" (err), "=r" (cb)                          \
+       :"r" ((int)(x)), "r" (addr), "i" (-EFAULT), "0" (err))
+
+#define __get_user_nocheck(x,ptr,size)                         \
+({                                                             \
+       long __gu_err, __gu_val;                                \
+       __get_user_size(__gu_val,(ptr),(size),__gu_err);        \
+       (x) = (__typeof__(*(ptr)))__gu_val;                     \
+       __gu_err;                                               \
+})
+
+#define __get_user_check(x,ptr,size)                                   \
+({                                                                     \
+       long __gu_err = -EFAULT, __gu_val = 0;                          \
+       const __typeof__(*(ptr)) *__gu_addr = (ptr);                    \
+       if (access_ok(VERIFY_READ,__gu_addr,size))                      \
+               __get_user_size(__gu_val,__gu_addr,(size),__gu_err);    \
+       (x) = (__typeof__(*(ptr)))__gu_val;                             \
+       __gu_err;                                                       \
+})
+
+extern long __get_user_bad(void);
+
+#define __get_user_size(x,ptr,size,retval)                             \
+do {                                                                   \
+       int __cb;                                                       \
+       retval = 0;                                                     \
+        switch (size) {                                                        \
+          case 1: __get_user_asm(x,ptr,retval,1,"l8ui",__cb);  break;  \
+          case 2: __get_user_asm(x,ptr,retval,2,"l16ui",__cb); break;  \
+          case 4: __get_user_asm(x,ptr,retval,4,"l32i",__cb);  break;  \
+          case 8: retval = __copy_from_user(&x,ptr,8);    break;       \
+          default: (x) = __get_user_bad();                             \
+        }                                                              \
+} while (0)
+
+
+/*
+ * WARNING: If you modify this macro at all, verify that the
+ * __check_align_* macros still work.
+ */
+#define __get_user_asm(x, addr, err, align, insn, cb) \
+   __asm__ __volatile__(                       \
+       __check_align_##align                   \
+       "1: "insn"  %2, %3, 0           \n"     \
+       "2:                             \n"     \
+       "   .section  .fixup,\"ax\"     \n"     \
+       "   .align 4                    \n"     \
+       "4:                             \n"     \
+       "   .long  2b                   \n"     \
+       "5:                             \n"     \
+       "   l32r   %1, 4b               \n"     \
+       "   movi   %2, 0                \n"     \
+        "   movi   %0, %4              \n"     \
+        "   jx     %1                  \n"     \
+       "   .previous                   \n"     \
+       "   .section  __ex_table,\"a\"  \n"     \
+       "   .long       1b, 5b          \n"     \
+       "   .previous"                          \
+       :"=r" (err), "=r" (cb), "=r" (x)        \
+       :"r" (addr), "i" (-EFAULT), "0" (err))
+
+
+/*
+ * Copy to/from user space
+ */
+
+/*
+ * We use a generic, arbitrary-sized copy subroutine.  The Xtensa
+ * architecture would cause heavy code bloat if we tried to inline
+ * these functions and provide __constant_copy_* equivalents like the
+ * i386 versions.  __xtensa_copy_user is quite efficient.  See the
+ * .fixup section of __xtensa_copy_user for a discussion on the
+ * X_zeroing equivalents for Xtensa.
+ */
+
+extern unsigned __xtensa_copy_user(void *to, const void *from, unsigned n);
+#define __copy_user(to,from,size) __xtensa_copy_user(to,from,size)
+
+
+static inline unsigned long
+__generic_copy_from_user_nocheck(void *to, const void *from, unsigned long n)
+{
+       return __copy_user(to,from,n);
+}
+
+static inline unsigned long
+__generic_copy_to_user_nocheck(void *to, const void *from, unsigned long n)
+{
+       return __copy_user(to,from,n);
+}
+
+static inline unsigned long
+__generic_copy_to_user(void *to, const void *from, unsigned long n)
+{
+       prefetch(from);
+       if (access_ok(VERIFY_WRITE, to, n))
+               return __copy_user(to,from,n);
+       return n;
+}
+
+static inline unsigned long
+__generic_copy_from_user(void *to, const void *from, unsigned long n)
+{
+       prefetchw(to);
+       if (access_ok(VERIFY_READ, from, n))
+               return __copy_user(to,from,n);
+       else
+               memset(to, 0, n);
+       return n;
+}
+
+#define copy_to_user(to,from,n) __generic_copy_to_user((to),(from),(n))
+#define copy_from_user(to,from,n) __generic_copy_from_user((to),(from),(n))
+#define __copy_to_user(to,from,n) __generic_copy_to_user_nocheck((to),(from),(n))
+#define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n))
+#define __copy_to_user_inatomic __copy_to_user
+#define __copy_from_user_inatomic __copy_from_user
+
+
+/*
+ * We need to return the number of bytes not cleared.  Our memset()
+ * returns zero if a problem occurs while accessing user-space memory.
+ * In that event, return no memory cleared.  Otherwise, zero for
+ * success.
+ */
+
+static inline unsigned long
+__xtensa_clear_user(void *addr, unsigned long size)
+{
+       if ( ! memset(addr, 0, size) )
+               return size;
+       return 0;
+}
+
+static inline unsigned long
+clear_user(void *addr, unsigned long size)
+{
+       if (access_ok(VERIFY_WRITE, addr, size))
+               return __xtensa_clear_user(addr, size);
+       return size ? -EFAULT : 0;
+}
+
+#define __clear_user  __xtensa_clear_user
+
+
+extern long __strncpy_user(char *, const char *, long);
+#define __strncpy_from_user __strncpy_user
+
+static inline long
+strncpy_from_user(char *dst, const char *src, long count)
+{
+       if (access_ok(VERIFY_READ, src, 1))
+               return __strncpy_from_user(dst, src, count);
+       return -EFAULT;
+}
+
+
+#define strlen_user(str) strnlen_user((str), TASK_SIZE - 1)
+
+/*
+ * Return the size of a string (including the ending 0!)
+ */
+extern long __strnlen_user(const char *, long);
+
+static inline long strnlen_user(const char *str, long len)
+{
+       unsigned long top = __kernel_ok ? ~0UL : TASK_SIZE - 1;
+
+       if ((unsigned long)str > top)
+               return 0;
+       return __strnlen_user(str, len);
+}
+
+
+struct exception_table_entry
+{
+       unsigned long insn, fixup;
+};
+
+/* Returns 0 if exception not found and fixup.unit otherwise.  */
+
+extern unsigned long search_exception_table(unsigned long addr);
+extern void sort_exception_table(void);
+
+/* Returns the new pc */
+#define fixup_exception(map_reg, fixup_unit, pc)                \
+({                                                              \
+       fixup_unit;                                             \
+})
+
+#endif /* __ASSEMBLY__ */
+#endif /* _XTENSA_UACCESS_H */
diff --git a/arch/xtensa/include/asm/ucontext.h b/arch/xtensa/include/asm/ucontext.h
new file mode 100644 (file)
index 0000000..94c94ed
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * include/asm-xtensa/ucontext.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_UCONTEXT_H
+#define _XTENSA_UCONTEXT_H
+
+struct ucontext {
+       unsigned long     uc_flags;
+       struct ucontext  *uc_link;
+       stack_t           uc_stack;
+       struct sigcontext uc_mcontext;
+       sigset_t          uc_sigmask;   /* mask last for extensibility */
+};
+
+#endif /* _XTENSA_UCONTEXT_H */
diff --git a/arch/xtensa/include/asm/unaligned.h b/arch/xtensa/include/asm/unaligned.h
new file mode 100644 (file)
index 0000000..8e7ed04
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Xtensa doesn't handle unaligned accesses efficiently.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+#ifndef _ASM_XTENSA_UNALIGNED_H
+#define _ASM_XTENSA_UNALIGNED_H
+
+#include <asm/byteorder.h>
+
+#ifdef __LITTLE_ENDIAN
+# include <linux/unaligned/le_struct.h>
+# include <linux/unaligned/be_byteshift.h>
+# include <linux/unaligned/generic.h>
+# define get_unaligned __get_unaligned_le
+# define put_unaligned __put_unaligned_le
+#else
+# include <linux/unaligned/be_struct.h>
+# include <linux/unaligned/le_byteshift.h>
+# include <linux/unaligned/generic.h>
+# define get_unaligned __get_unaligned_be
+# define put_unaligned __put_unaligned_be
+#endif
+
+#endif /* _ASM_XTENSA_UNALIGNED_H */
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h
new file mode 100644 (file)
index 0000000..c092c8f
--- /dev/null
@@ -0,0 +1,735 @@
+/*
+ * include/asm-xtensa/unistd.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_UNISTD_H
+#define _XTENSA_UNISTD_H
+
+#ifndef __SYSCALL
+# define __SYSCALL(nr,func,nargs)
+#endif
+
+#define __NR_spill                               0
+__SYSCALL(  0, sys_ni_syscall, 0)
+#define __NR_xtensa                              1
+__SYSCALL(  1, sys_ni_syscall, 0)
+#define __NR_available4                                  2
+__SYSCALL(  2, sys_ni_syscall, 0)
+#define __NR_available5                                  3
+__SYSCALL(  3, sys_ni_syscall, 0)
+#define __NR_available6                                  4
+__SYSCALL(  4, sys_ni_syscall, 0)
+#define __NR_available7                                  5
+__SYSCALL(  5, sys_ni_syscall, 0)
+#define __NR_available8                                  6
+__SYSCALL(  6, sys_ni_syscall, 0)
+#define __NR_available9                                  7
+__SYSCALL(  7, sys_ni_syscall, 0)
+
+/* File Operations */
+
+#define __NR_open                                8
+__SYSCALL(  8, sys_open, 3)
+#define __NR_close                               9
+__SYSCALL(  9, sys_close, 1)
+#define __NR_dup                                10
+__SYSCALL( 10, sys_dup, 1)
+#define __NR_dup2                               11
+__SYSCALL( 11, sys_dup2, 2)
+#define __NR_read                               12
+__SYSCALL( 12, sys_read, 3)
+#define __NR_write                              13
+__SYSCALL( 13, sys_write, 3)
+#define __NR_select                             14
+__SYSCALL( 14, sys_select, 5)
+#define __NR_lseek                              15
+__SYSCALL( 15, sys_lseek, 3)
+#define __NR_poll                               16
+__SYSCALL( 16, sys_poll, 3)
+#define __NR__llseek                            17
+__SYSCALL( 17, sys_llseek, 5)
+#define __NR_epoll_wait                         18
+__SYSCALL( 18, sys_epoll_wait, 4)
+#define __NR_epoll_ctl                                  19
+__SYSCALL( 19, sys_epoll_ctl, 4)
+#define __NR_epoll_create                       20
+__SYSCALL( 20, sys_epoll_create, 1)
+#define __NR_creat                              21
+__SYSCALL( 21, sys_creat, 2)
+#define __NR_truncate                           22
+__SYSCALL( 22, sys_truncate, 2)
+#define __NR_ftruncate                                  23
+__SYSCALL( 23, sys_ftruncate, 2)
+#define __NR_readv                              24
+__SYSCALL( 24, sys_readv, 3)
+#define __NR_writev                             25
+__SYSCALL( 25, sys_writev, 3)
+#define __NR_fsync                              26
+__SYSCALL( 26, sys_fsync, 1)
+#define __NR_fdatasync                                  27
+__SYSCALL( 27, sys_fdatasync, 1)
+#define __NR_truncate64                         28
+__SYSCALL( 28, sys_truncate64, 2)
+#define __NR_ftruncate64                        29
+__SYSCALL( 29, sys_ftruncate64, 2)
+#define __NR_pread64                            30
+__SYSCALL( 30, sys_pread64, 6)
+#define __NR_pwrite64                           31
+__SYSCALL( 31, sys_pwrite64, 6)
+
+#define __NR_link                               32
+__SYSCALL( 32, sys_link, 2)
+#define __NR_rename                             33
+__SYSCALL( 33, sys_rename, 2)
+#define __NR_symlink                            34
+__SYSCALL( 34, sys_symlink, 2)
+#define __NR_readlink                           35
+__SYSCALL( 35, sys_readlink, 3)
+#define __NR_mknod                              36
+__SYSCALL( 36, sys_mknod, 3)
+#define __NR_pipe                               37
+__SYSCALL( 37, xtensa_pipe, 1)
+#define __NR_unlink                             38
+__SYSCALL( 38, sys_unlink, 1)
+#define __NR_rmdir                              39
+__SYSCALL( 39, sys_rmdir, 1)
+
+#define __NR_mkdir                              40
+__SYSCALL( 40, sys_mkdir, 2)
+#define __NR_chdir                              41
+__SYSCALL( 41, sys_chdir, 1)
+#define __NR_fchdir                             42
+__SYSCALL( 42, sys_fchdir, 1)
+#define __NR_getcwd                             43
+__SYSCALL( 43, sys_getcwd, 2)
+
+#define __NR_chmod                              44
+__SYSCALL( 44, sys_chmod, 2)
+#define __NR_chown                              45
+__SYSCALL( 45, sys_chown, 3)
+#define __NR_stat                               46
+__SYSCALL( 46, sys_newstat, 2)
+#define __NR_stat64                             47
+__SYSCALL( 47, sys_stat64, 2)
+
+#define __NR_lchown                             48
+__SYSCALL( 48, sys_lchown, 3)
+#define __NR_lstat                              49
+__SYSCALL( 49, sys_newlstat, 2)
+#define __NR_lstat64                            50
+__SYSCALL( 50, sys_lstat64, 2)
+#define __NR_available51                        51
+__SYSCALL( 51, sys_ni_syscall, 0)
+
+#define __NR_fchmod                             52
+__SYSCALL( 52, sys_fchmod, 2)
+#define __NR_fchown                             53
+__SYSCALL( 53, sys_fchown, 3)
+#define __NR_fstat                              54
+__SYSCALL( 54, sys_newfstat, 2)
+#define __NR_fstat64                            55
+__SYSCALL( 55, sys_fstat64, 2)
+
+#define __NR_flock                              56
+__SYSCALL( 56, sys_flock, 2)
+#define __NR_access                             57
+__SYSCALL( 57, sys_access, 2)
+#define __NR_umask                              58
+__SYSCALL( 58, sys_umask, 1)
+#define __NR_getdents                           59
+__SYSCALL( 59, sys_getdents, 3)
+#define __NR_getdents64                         60
+__SYSCALL( 60, sys_getdents64, 3)
+#define __NR_fcntl64                            61
+__SYSCALL( 61, sys_fcntl64, 3)
+#define __NR_available62                        62
+__SYSCALL( 62, sys_ni_syscall, 0)
+#define __NR_fadvise64_64                       63
+__SYSCALL( 63, xtensa_fadvise64_64, 6)
+#define __NR_utime                              64     /* glibc 2.3.3 ?? */
+__SYSCALL( 64, sys_utime, 2)
+#define __NR_utimes                             65
+__SYSCALL( 65, sys_utimes, 2)
+#define __NR_ioctl                              66
+__SYSCALL( 66, sys_ioctl, 3)
+#define __NR_fcntl                              67
+__SYSCALL( 67, sys_fcntl, 3)
+
+#define __NR_setxattr                           68
+__SYSCALL( 68, sys_setxattr, 5)
+#define __NR_getxattr                           69
+__SYSCALL( 69, sys_getxattr, 4)
+#define __NR_listxattr                                  70
+__SYSCALL( 70, sys_listxattr, 3)
+#define __NR_removexattr                        71
+__SYSCALL( 71, sys_removexattr, 2)
+#define __NR_lsetxattr                                  72
+__SYSCALL( 72, sys_lsetxattr, 5)
+#define __NR_lgetxattr                                  73
+__SYSCALL( 73, sys_lgetxattr, 4)
+#define __NR_llistxattr                         74
+__SYSCALL( 74, sys_llistxattr, 3)
+#define __NR_lremovexattr                       75
+__SYSCALL( 75, sys_lremovexattr, 2)
+#define __NR_fsetxattr                                  76
+__SYSCALL( 76, sys_fsetxattr, 5)
+#define __NR_fgetxattr                                  77
+__SYSCALL( 77, sys_fgetxattr, 4)
+#define __NR_flistxattr                         78
+__SYSCALL( 78, sys_flistxattr, 3)
+#define __NR_fremovexattr                       79
+__SYSCALL( 79, sys_fremovexattr, 2)
+
+/* File Map / Shared Memory Operations */
+
+#define __NR_mmap2                              80
+__SYSCALL( 80, xtensa_mmap2, 6)
+#define __NR_munmap                             81
+__SYSCALL( 81, sys_munmap, 2)
+#define __NR_mprotect                           82
+__SYSCALL( 82, sys_mprotect, 3)
+#define __NR_brk                                83
+__SYSCALL( 83, sys_brk, 1)
+#define __NR_mlock                              84
+__SYSCALL( 84, sys_mlock, 2)
+#define __NR_munlock                            85
+__SYSCALL( 85, sys_munlock, 2)
+#define __NR_mlockall                           86
+__SYSCALL( 86, sys_mlockall, 1)
+#define __NR_munlockall                         87
+__SYSCALL( 87, sys_munlockall, 0)
+#define __NR_mremap                             88
+__SYSCALL( 88, sys_mremap, 4)
+#define __NR_msync                              89
+__SYSCALL( 89, sys_msync, 3)
+#define __NR_mincore                            90
+__SYSCALL( 90, sys_mincore, 3)
+#define __NR_madvise                            91
+__SYSCALL( 91, sys_madvise, 3)
+#define __NR_shmget                             92
+__SYSCALL( 92, sys_shmget, 4)
+#define __NR_shmat                              93
+__SYSCALL( 93, xtensa_shmat, 4)
+#define __NR_shmctl                             94
+__SYSCALL( 94, sys_shmctl, 4)
+#define __NR_shmdt                              95
+__SYSCALL( 95, sys_shmdt, 4)
+
+/* Socket Operations */
+
+#define __NR_socket                             96
+__SYSCALL( 96, sys_socket, 3)
+#define __NR_setsockopt                         97
+__SYSCALL( 97, sys_setsockopt, 5)
+#define __NR_getsockopt                         98
+__SYSCALL( 98, sys_getsockopt, 5)
+#define __NR_shutdown                           99
+__SYSCALL( 99, sys_shutdown, 2)
+
+#define __NR_bind                              100
+__SYSCALL(100, sys_bind, 3)
+#define __NR_connect                           101
+__SYSCALL(101, sys_connect, 3)
+#define __NR_listen                            102
+__SYSCALL(102, sys_listen, 2)
+#define __NR_accept                            103
+__SYSCALL(103, sys_accept, 3)
+
+#define __NR_getsockname                       104
+__SYSCALL(104, sys_getsockname, 3)
+#define __NR_getpeername                       105
+__SYSCALL(105, sys_getpeername, 3)
+#define __NR_sendmsg                           106
+__SYSCALL(106, sys_sendmsg, 3)
+#define __NR_recvmsg                           107
+__SYSCALL(107, sys_recvmsg, 3)
+#define __NR_send                              108
+__SYSCALL(108, sys_send, 4)
+#define __NR_recv                              109
+__SYSCALL(109, sys_recv, 4)
+#define __NR_sendto                            110
+__SYSCALL(110, sys_sendto, 6)
+#define __NR_recvfrom                          111
+__SYSCALL(111, sys_recvfrom, 6)
+
+#define __NR_socketpair                        112
+__SYSCALL(112, sys_socketpair, 4)
+#define __NR_sendfile                          113
+__SYSCALL(113, sys_sendfile, 4)
+#define __NR_sendfile64                        114
+__SYSCALL(114, sys_sendfile64, 4)
+#define __NR_available115                      115
+__SYSCALL(115, sys_ni_syscall, 0)
+
+/* Process Operations */
+
+#define __NR_clone                             116
+__SYSCALL(116, xtensa_clone, 5)
+#define __NR_execve                            117
+__SYSCALL(117, xtensa_execve, 3)
+#define __NR_exit                              118
+__SYSCALL(118, sys_exit, 1)
+#define __NR_exit_group                        119
+__SYSCALL(119, sys_exit_group, 1)
+#define __NR_getpid                            120
+__SYSCALL(120, sys_getpid, 0)
+#define __NR_wait4                             121
+__SYSCALL(121, sys_wait4, 4)
+#define __NR_waitid                            122
+__SYSCALL(122, sys_waitid, 5)
+#define __NR_kill                              123
+__SYSCALL(123, sys_kill, 2)
+#define __NR_tkill                             124
+__SYSCALL(124, sys_tkill, 2)
+#define __NR_tgkill                            125
+__SYSCALL(125, sys_tgkill, 3)
+#define __NR_set_tid_address                   126
+__SYSCALL(126, sys_set_tid_address, 1)
+#define __NR_gettid                            127
+__SYSCALL(127, sys_gettid, 0)
+#define __NR_setsid                            128
+__SYSCALL(128, sys_setsid, 0)
+#define __NR_getsid                            129
+__SYSCALL(129, sys_getsid, 1)
+#define __NR_prctl                             130
+__SYSCALL(130, sys_prctl, 5)
+#define __NR_personality                       131
+__SYSCALL(131, sys_personality, 1)
+#define __NR_getpriority                       132
+__SYSCALL(132, sys_getpriority, 2)
+#define __NR_setpriority                       133
+__SYSCALL(133, sys_setpriority, 3)
+#define __NR_setitimer                                 134
+__SYSCALL(134, sys_setitimer, 3)
+#define __NR_getitimer                                 135
+__SYSCALL(135, sys_getitimer, 2)
+#define __NR_setuid                            136
+__SYSCALL(136, sys_setuid, 1)
+#define __NR_getuid                            137
+__SYSCALL(137, sys_getuid, 0)
+#define __NR_setgid                            138
+__SYSCALL(138, sys_setgid, 1)
+#define __NR_getgid                            139
+__SYSCALL(139, sys_getgid, 0)
+#define __NR_geteuid                           140
+__SYSCALL(140, sys_geteuid, 0)
+#define __NR_getegid                           141
+__SYSCALL(141, sys_getegid, 0)
+#define __NR_setreuid                          142
+__SYSCALL(142, sys_setreuid, 2)
+#define __NR_setregid                          143
+__SYSCALL(143, sys_setregid, 2)
+#define __NR_setresuid                                 144
+__SYSCALL(144, sys_setresuid, 3)
+#define __NR_getresuid                                 145
+__SYSCALL(145, sys_getresuid, 3)
+#define __NR_setresgid                                 146
+__SYSCALL(146, sys_setresgid, 3)
+#define __NR_getresgid                                 147
+__SYSCALL(147, sys_getresgid, 3)
+#define __NR_setpgid                           148
+__SYSCALL(148, sys_setpgid, 2)
+#define __NR_getpgid                           149
+__SYSCALL(149, sys_getpgid, 1)
+#define __NR_getppid                           150
+__SYSCALL(150, sys_getppid, 0)
+#define __NR_getpgrp                           151
+__SYSCALL(151, sys_getpgrp, 0)
+
+#define __NR_reserved152                       152     /* set_thread_area */
+__SYSCALL(152, sys_ni_syscall, 0)
+#define __NR_reserved153                       153     /* get_thread_area */
+__SYSCALL(153, sys_ni_syscall, 0)
+#define __NR_times                             154
+__SYSCALL(154, sys_times, 1)
+#define __NR_acct                              155
+__SYSCALL(155, sys_acct, 1)
+#define __NR_sched_setaffinity                         156
+__SYSCALL(156, sys_sched_setaffinity, 3)
+#define __NR_sched_getaffinity                         157
+__SYSCALL(157, sys_sched_getaffinity, 3)
+#define __NR_capget                            158
+__SYSCALL(158, sys_capget, 2)
+#define __NR_capset                            159
+__SYSCALL(159, sys_capset, 2)
+#define __NR_ptrace                            160
+__SYSCALL(160, sys_ptrace, 4)
+#define __NR_semtimedop                                161
+__SYSCALL(161, sys_semtimedop, 5)
+#define __NR_semget                            162
+__SYSCALL(162, sys_semget, 4)
+#define __NR_semop                             163
+__SYSCALL(163, sys_semop, 4)
+#define __NR_semctl                            164
+__SYSCALL(164, sys_semctl, 4)
+#define __NR_available165                      165
+__SYSCALL(165, sys_ni_syscall, 0)
+#define __NR_msgget                            166
+__SYSCALL(166, sys_msgget, 4)
+#define __NR_msgsnd                            167
+__SYSCALL(167, sys_msgsnd, 4)
+#define __NR_msgrcv                            168
+__SYSCALL(168, sys_msgrcv, 4)
+#define __NR_msgctl                            169
+__SYSCALL(169, sys_msgctl, 4)
+#define __NR_available170                      170
+__SYSCALL(170, sys_ni_syscall, 0)
+#define __NR_available171                      171
+__SYSCALL(171, sys_ni_syscall, 0)
+
+/* File System */
+
+#define __NR_mount                             172
+__SYSCALL(172, sys_mount, 5)
+#define __NR_swapon                            173
+__SYSCALL(173, sys_swapon, 2)
+#define __NR_chroot                            174
+__SYSCALL(174, sys_chroot, 1)
+#define __NR_pivot_root                        175
+__SYSCALL(175, sys_pivot_root, 2)
+#define __NR_umount                            176
+__SYSCALL(176, sys_umount, 2)
+#define __NR_swapoff                           177
+__SYSCALL(177, sys_swapoff, 1)
+#define __NR_sync                              178
+__SYSCALL(178, sys_sync, 0)
+#define __NR_available179                      179
+__SYSCALL(179, sys_ni_syscall, 0)
+#define __NR_setfsuid                          180
+__SYSCALL(180, sys_setfsuid, 1)
+#define __NR_setfsgid                          181
+__SYSCALL(181, sys_setfsgid, 1)
+#define __NR_sysfs                             182
+__SYSCALL(182, sys_sysfs, 3)
+#define __NR_ustat                             183
+__SYSCALL(183, sys_ustat, 2)
+#define __NR_statfs                            184
+__SYSCALL(184, sys_statfs, 2)
+#define __NR_fstatfs                           185
+__SYSCALL(185, sys_fstatfs, 2)
+#define __NR_statfs64                          186
+__SYSCALL(186, sys_statfs64, 3)
+#define __NR_fstatfs64                                 187
+__SYSCALL(187, sys_fstatfs64, 3)
+
+/* System */
+
+#define __NR_setrlimit                                 188
+__SYSCALL(188, sys_setrlimit, 2)
+#define __NR_getrlimit                                 189
+__SYSCALL(189, sys_getrlimit, 2)
+#define __NR_getrusage                                 190
+__SYSCALL(190, sys_getrusage, 2)
+#define __NR_futex                             191
+__SYSCALL(191, sys_futex, 5)
+#define __NR_gettimeofday                      192
+__SYSCALL(192, sys_gettimeofday, 2)
+#define __NR_settimeofday                      193
+__SYSCALL(193, sys_settimeofday, 2)
+#define __NR_adjtimex                          194
+__SYSCALL(194, sys_adjtimex, 1)
+#define __NR_nanosleep                         195
+__SYSCALL(195, sys_nanosleep, 2)
+#define __NR_getgroups                                 196
+__SYSCALL(196, sys_getgroups, 2)
+#define __NR_setgroups                                 197
+__SYSCALL(197, sys_setgroups, 2)
+#define __NR_sethostname                       198
+__SYSCALL(198, sys_sethostname, 2)
+#define __NR_setdomainname                     199
+__SYSCALL(199, sys_setdomainname, 2)
+#define __NR_syslog                            200
+__SYSCALL(200, sys_syslog, 3)
+#define __NR_vhangup                           201
+__SYSCALL(201, sys_vhangup, 0)
+#define __NR_uselib                            202
+__SYSCALL(202, sys_uselib, 1)
+#define __NR_reboot                            203
+__SYSCALL(203, sys_reboot, 3)
+#define __NR_quotactl                          204
+__SYSCALL(204, sys_quotactl, 4)
+#define __NR_nfsservctl                        205
+__SYSCALL(205, sys_nfsservctl, 3)
+#define __NR__sysctl                           206
+__SYSCALL(206, sys_sysctl, 1)
+#define __NR_bdflush                           207
+__SYSCALL(207, sys_bdflush, 2)
+#define __NR_uname                             208
+__SYSCALL(208, sys_newuname, 1)
+#define __NR_sysinfo                           209
+__SYSCALL(209, sys_sysinfo, 1)
+#define __NR_init_module                       210
+__SYSCALL(210, sys_init_module, 2)
+#define __NR_delete_module                     211
+__SYSCALL(211, sys_delete_module, 1)
+
+#define __NR_sched_setparam                    212
+__SYSCALL(212, sys_sched_setparam, 2)
+#define __NR_sched_getparam                    213
+__SYSCALL(213, sys_sched_getparam, 2)
+#define __NR_sched_setscheduler                214
+__SYSCALL(214, sys_sched_setscheduler, 3)
+#define __NR_sched_getscheduler                215
+__SYSCALL(215, sys_sched_getscheduler, 1)
+#define __NR_sched_get_priority_max            216
+__SYSCALL(216, sys_sched_get_priority_max, 1)
+#define __NR_sched_get_priority_min            217
+__SYSCALL(217, sys_sched_get_priority_min, 1)
+#define __NR_sched_rr_get_interval             218
+__SYSCALL(218, sys_sched_rr_get_interval, 2)
+#define __NR_sched_yield                       219
+__SYSCALL(219, sys_sched_yield, 0)
+#define __NR_available222                      222
+__SYSCALL(222, sys_ni_syscall, 0)
+
+/* Signal Handling */
+
+#define __NR_restart_syscall                   223
+__SYSCALL(223, sys_restart_syscall, 0)
+#define __NR_sigaltstack                       224
+__SYSCALL(224, xtensa_sigaltstack, 2)
+#define __NR_rt_sigreturn                      225
+__SYSCALL(225, xtensa_rt_sigreturn, 1)
+#define __NR_rt_sigaction                      226
+__SYSCALL(226, sys_rt_sigaction, 4)
+#define __NR_rt_sigprocmask                    227
+__SYSCALL(227, sys_rt_sigprocmask, 4)
+#define __NR_rt_sigpending                     228
+__SYSCALL(228, sys_rt_sigpending, 2)
+#define __NR_rt_sigtimedwait                   229
+__SYSCALL(229, sys_rt_sigtimedwait, 4)
+#define __NR_rt_sigqueueinfo                   230
+__SYSCALL(230, sys_rt_sigqueueinfo, 3)
+#define __NR_rt_sigsuspend                     231
+__SYSCALL(231, xtensa_rt_sigsuspend, 2)
+
+/* Message */
+
+#define __NR_mq_open                           232
+__SYSCALL(232, sys_mq_open, 4)
+#define __NR_mq_unlink                                 233
+__SYSCALL(233, sys_mq_unlink, 1)
+#define __NR_mq_timedsend                      234
+__SYSCALL(234, sys_mq_timedsend, 5)
+#define __NR_mq_timedreceive                   235
+__SYSCALL(235, sys_mq_timedreceive, 5)
+#define __NR_mq_notify                                 236
+__SYSCALL(236, sys_mq_notify, 2)
+#define __NR_mq_getsetattr                     237
+__SYSCALL(237, sys_mq_getsetattr, 3)
+#define __NR_available238                      238
+__SYSCALL(238, sys_ni_syscall, 0)
+
+/* IO */
+
+#define __NR_io_setup                          239
+__SYSCALL(239, sys_io_setup, 2)
+#define __NR_io_destroy                        240
+__SYSCALL(240, sys_io_destroy, 1)
+#define __NR_io_submit                                 241
+__SYSCALL(241, sys_io_submit, 3)
+#define __NR_io_getevents                      242
+__SYSCALL(242, sys_io_getevents, 5)
+#define __NR_io_cancel                                 243
+__SYSCALL(243, sys_io_cancel, 3)
+#define __NR_clock_settime                     244
+__SYSCALL(244, sys_clock_settime, 2)
+#define __NR_clock_gettime                     245
+__SYSCALL(245, sys_clock_gettime, 2)
+#define __NR_clock_getres                      246
+__SYSCALL(246, sys_clock_getres, 2)
+#define __NR_clock_nanosleep                   247
+__SYSCALL(247, sys_clock_nanosleep, 4)
+
+/* Timer */
+
+#define __NR_timer_create                      248
+__SYSCALL(248, sys_timer_create, 3)
+#define __NR_timer_delete                      249
+__SYSCALL(249, sys_timer_delete, 1)
+#define __NR_timer_settime                     250
+__SYSCALL(250, sys_timer_settime, 4)
+#define __NR_timer_gettime                     251
+__SYSCALL(251, sys_timer_gettime, 2)
+#define __NR_timer_getoverrun                  252
+__SYSCALL(252, sys_timer_getoverrun, 1)
+
+/* System */
+
+#define __NR_reserved244                       253
+__SYSCALL(253, sys_ni_syscall, 0)
+#define __NR_lookup_dcookie                    254
+__SYSCALL(254, sys_lookup_dcookie, 4)
+#define __NR_available255                      255
+__SYSCALL(255, sys_ni_syscall, 0)
+#define __NR_add_key                           256
+__SYSCALL(256, sys_add_key, 5)
+#define __NR_request_key                       257
+__SYSCALL(257, sys_request_key, 5)
+#define __NR_keyctl                            258
+__SYSCALL(258, sys_keyctl, 5)
+#define __NR_available259                      259
+__SYSCALL(259, sys_ni_syscall, 0)
+
+
+#define __NR_readahead                         260
+__SYSCALL(260, sys_readahead, 5)
+#define __NR_remap_file_pages                  261
+__SYSCALL(261, sys_remap_file_pages, 5)
+#define __NR_migrate_pages                     262
+__SYSCALL(262, sys_migrate_pages, 0)
+#define __NR_mbind                             263
+__SYSCALL(263, sys_mbind, 6)
+#define __NR_get_mempolicy                     264
+__SYSCALL(264, sys_get_mempolicy, 5)
+#define __NR_set_mempolicy                     265
+__SYSCALL(265, sys_set_mempolicy, 3)
+#define __NR_unshare                           266
+__SYSCALL(266, sys_unshare, 1)
+#define __NR_move_pages                                267
+__SYSCALL(267, sys_move_pages, 0)
+#define __NR_splice                            268
+__SYSCALL(268, sys_splice, 0)
+#define __NR_tee                               269
+__SYSCALL(269, sys_tee, 0)
+#define __NR_vmsplice                          270
+__SYSCALL(270, sys_vmsplice, 0)
+#define __NR_available271                      271
+__SYSCALL(271, sys_ni_syscall, 0)
+
+#define __NR_pselect6                          272
+__SYSCALL(272, sys_pselect6, 0)
+#define __NR_ppoll                             273
+__SYSCALL(273, sys_ppoll, 0)
+#define __NR_epoll_pwait                       274
+__SYSCALL(274, sys_epoll_pwait, 0)
+#define __NR_available275                      275
+__SYSCALL(275, sys_ni_syscall, 0)
+
+#define __NR_inotify_init                      276
+__SYSCALL(276, sys_inotify_init, 0)
+#define __NR_inotify_add_watch                 277
+__SYSCALL(277, sys_inotify_add_watch, 3)
+#define __NR_inotify_rm_watch                  278
+__SYSCALL(278, sys_inotify_rm_watch, 2)
+#define __NR_available279                      279
+__SYSCALL(279, sys_ni_syscall, 0)
+
+#define __NR_getcpu                            280
+__SYSCALL(280, sys_getcpu, 0)
+#define __NR_kexec_load                                281
+__SYSCALL(281, sys_ni_syscall, 0)
+
+#define __NR_ioprio_set                                282
+__SYSCALL(282, sys_ioprio_set, 2)
+#define __NR_ioprio_get                                283
+__SYSCALL(283, sys_ioprio_get, 3)
+
+#define __NR_set_robust_list                   284
+__SYSCALL(284, sys_set_robust_list, 3)
+#define __NR_get_robust_list                   285
+__SYSCALL(285, sys_get_robust_list, 3)
+#define __NR_reserved286                       286     /* sync_file_rangeX */
+__SYSCALL(286, sys_ni_syscall, 3)
+#define __NR_available287                      287
+__SYSCALL(287, sys_faccessat, 0)
+
+/* Relative File Operations */
+
+#define __NR_openat                            288
+__SYSCALL(288, sys_openat, 4)
+#define __NR_mkdirat                           289
+__SYSCALL(289, sys_mkdirat, 3)
+#define __NR_mknodat                           290
+__SYSCALL(290, sys_mknodat, 4)
+#define __NR_unlinkat                          291
+__SYSCALL(291, sys_unlinkat, 3)
+#define __NR_renameat                          292
+__SYSCALL(292, sys_renameat, 4)
+#define __NR_linkat                            293
+__SYSCALL(293, sys_linkat, 5)
+#define __NR_symlinkat                         294
+__SYSCALL(294, sys_symlinkat, 3)
+#define __NR_readlinkat                                295
+__SYSCALL(295, sys_readlinkat, 4)
+#define __NR_utimensat                         296
+__SYSCALL(296, sys_utimensat, 0)
+#define __NR_fchownat                          297
+__SYSCALL(297, sys_fchownat, 5)
+#define __NR_futimesat                         298
+__SYSCALL(298, sys_futimesat, 4)
+#define __NR_fstatat64                         299
+__SYSCALL(299, sys_fstatat64, 0)
+#define __NR_fchmodat                          300
+__SYSCALL(300, sys_fchmodat, 4)
+#define __NR_faccessat                         301
+__SYSCALL(301, sys_faccessat, 4)
+#define __NR_available302                      302
+__SYSCALL(302, sys_ni_syscall, 0)
+#define __NR_available303                      303
+__SYSCALL(303, sys_ni_syscall, 0)
+
+#define __NR_signalfd                          304
+__SYSCALL(304, sys_signalfd, 3)
+/*  305 was __NR_timerfd  */
+__SYSCALL(305, sys_ni_syscall, 0)
+#define __NR_eventfd                           306
+__SYSCALL(306, sys_eventfd, 1)
+
+#define __NR_syscall_count                     307
+
+/*
+ * sysxtensa syscall handler
+ *
+ * int sysxtensa (SYS_XTENSA_ATOMIC_SET,     ptr, val,    unused);
+ * int sysxtensa (SYS_XTENSA_ATOMIC_ADD,     ptr, val,    unused);
+ * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val,    unused);
+ * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval);
+ *        a2            a6                   a3    a4      a5
+ */
+
+#define SYS_XTENSA_RESERVED               0     /* don't use this */
+#define SYS_XTENSA_ATOMIC_SET             1     /* set variable */
+#define SYS_XTENSA_ATOMIC_EXG_ADD         2     /* exchange memory and add */
+#define SYS_XTENSA_ATOMIC_ADD             3     /* add to memory */
+#define SYS_XTENSA_ATOMIC_CMP_SWP         4     /* compare and swap */
+
+#define SYS_XTENSA_COUNT                  5     /* count */
+
+#ifdef __KERNEL__
+
+/*
+ * "Conditional" syscalls
+ *
+ * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
+ * but it doesn't work on all toolchains, so we just do it by hand
+ */
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+
+#define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SYS_UTIME
+#define __ARCH_WANT_SYS_LLSEEK
+#define __ARCH_WANT_SYS_RT_SIGACTION
+#define __ARCH_WANT_SYS_RT_SIGSUSPEND
+#define __ARCH_WANT_SYS_GETPGRP
+
+/* 
+ * Ignore legacy system calls in the checksyscalls.sh script
+ */
+
+#define __IGNORE_fork                          /* use clone */
+#define __IGNORE_time
+#define __IGNORE_alarm                         /* use setitimer */
+#define __IGNORE_pause
+#define __IGNORE_mmap                          /* use mmap2 */
+#define __IGNORE_vfork                         /* use clone */
+#define __IGNORE_fadvise64                     /* use fadvise64_64 */
+
+#endif /* __KERNEL__ */
+#endif /* _XTENSA_UNISTD_H */
diff --git a/arch/xtensa/include/asm/user.h b/arch/xtensa/include/asm/user.h
new file mode 100644 (file)
index 0000000..2c3ed23
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * include/asm-xtensa/user.h
+ *
+ * Xtensa Processor version.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_USER_H
+#define _XTENSA_USER_H
+
+/* This file usually defines a 'struct user' structure. However, it it only
+ * used for a.out file, which are not supported on Xtensa.
+ */
+
+#endif /* _XTENSA_USER_H */
diff --git a/arch/xtensa/include/asm/vga.h b/arch/xtensa/include/asm/vga.h
new file mode 100644 (file)
index 0000000..1fd8cab
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * include/asm-xtensa/vga.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_VGA_H
+#define _XTENSA_VGA_H
+
+#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x)
+
+#define vga_readb(x)   (*(x))
+#define vga_writeb(x,y)        (*(y) = (x))
+
+#endif
diff --git a/arch/xtensa/include/asm/xor.h b/arch/xtensa/include/asm/xor.h
new file mode 100644 (file)
index 0000000..e7b1f08
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * include/asm-xtensa/xor.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_XOR_H
+#define _XTENSA_XOR_H
+
+#include <asm-generic/xor.h>
+
+#endif
index dfd35dcc1cb553cb9105f5f824250a3b388e40fb..a51d36a27389ff9ebeb213d0707089b82faf421c 100644 (file)
@@ -25,7 +25,7 @@
 #include <asm/page.h>
 #include <asm/signal.h>
 #include <asm/tlbflush.h>
-#include <asm/variant/tie-asm.h>
+#include <variant/tie-asm.h>
 
 /* Unimplemented features. */
 
index 51f4fb6f16f9a4b9f404ed61f3996b03082f9963..d506774f4b05062fb57c999d98873538e582e8d9 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <asm-generic/vmlinux.lds.h>
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 OUTPUT_ARCH(xtensa)
 ENTRY(_start)
 
index 9d9cd990afa6ab0e40e46858cdb9d29977c4ec2c..df397f932d0e0ea28ee84b11a5b0a89c675ff885 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <asm/errno.h>
 #include <linux/linkage.h>
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * computes a partial checksum, e.g. for TCP/UDP fragments
index ddda8f4bc86266d22daec784bd3ff93bb8857bdf..ea59dcd038666da7af3004c68da1eb7d9964d9dd 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (C) 2002 - 2005 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
        .macro  src_b   r, w0, w1
 #ifdef __XTENSA_EB__
index 56a17495b2db3134c02f224c41b2c7d850e7a21d..10b8c400f175311cf0c9b2742e7faa578d58e98c 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * void *memset(void *dst, int c, size_t length)
index b2655d94558d8db837e248d09856c3246cfa78e5..9f603cdaaa6839a6820860656fb1f46dab255918 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 #include <linux/errno.h>
 
 /* Load or store instructions that may cause exceptions use the EX macro. */
index ad3f616322caaa31bd54c9a56f87b892d5e0726d..23f2a89816a14bd7a5983a7c2da2aa8d45bc6901 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /* Load or store instructions that may cause exceptions use the EX macro. */
 
index a8ab1d4fe0ae1530026d1cfe6542071c7387cf81..46d60314bb160983a0696bcaf849bb01dda0ff5e 100644 (file)
@@ -53,7 +53,7 @@
  *     a11/ original length
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 #ifdef __XTENSA_EB__
 #define ALIGN(R, W0, W1) src   R, W0, W1
index 9141e369073194115eb5ad06d1f1e22b0d230d9f..efed8897bef323079a3cc10401eaef069c4eaad3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * arch/xtensa/platform-iss/console.c
+ * arch/xtensa/platforms/iss/console.c
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
@@ -24,7 +24,7 @@
 #include <asm/uaccess.h>
 #include <asm/irq.h>
 
-#include <asm/platform/simcall.h>
+#include <platform/simcall.h>
 
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
diff --git a/arch/xtensa/platforms/iss/include/platform/hardware.h b/arch/xtensa/platforms/iss/include/platform/hardware.h
new file mode 100644 (file)
index 0000000..6930c12
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * include/asm-xtensa/platform-iss/hardware.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 Tensilica Inc.
+ */
+
+/*
+ * This file contains the default configuration of ISS.
+ */
+
+#ifndef _XTENSA_PLATFORM_ISS_HARDWARE_H
+#define _XTENSA_PLATFORM_ISS_HARDWARE_H
+
+/*
+ * Memory configuration.
+ */
+
+#define PLATFORM_DEFAULT_MEM_START     0x00000000
+#define PLATFORM_DEFAULT_MEM_SIZE      0x08000000
+
+/*
+ * Interrupt configuration.
+ */
+
+#endif /* _XTENSA_PLATFORM_ISS_HARDWARE_H */
diff --git a/arch/xtensa/platforms/iss/include/platform/simcall.h b/arch/xtensa/platforms/iss/include/platform/simcall.h
new file mode 100644 (file)
index 0000000..b7952c0
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * include/asm-xtensa/platform-iss/simcall.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_PLATFORM_ISS_SIMCALL_H
+#define _XTENSA_PLATFORM_ISS_SIMCALL_H
+
+
+/*
+ *  System call like services offered by the simulator host.
+ */
+
+#define SYS_nop                0       /* unused */
+#define SYS_exit       1       /*x*/
+#define SYS_fork       2
+#define SYS_read       3       /*x*/
+#define SYS_write      4       /*x*/
+#define SYS_open       5       /*x*/
+#define SYS_close      6       /*x*/
+#define SYS_rename     7       /*x 38 - waitpid */
+#define SYS_creat      8       /*x*/
+#define SYS_link       9       /*x (not implemented on WIN32) */
+#define SYS_unlink     10      /*x*/
+#define SYS_execv      11      /* n/a - execve */
+#define SYS_execve     12      /* 11 - chdir */
+#define SYS_pipe       13      /* 42 - time */
+#define SYS_stat       14      /* 106 - mknod */
+#define SYS_chmod      15
+#define SYS_chown      16      /* 202 - lchown */
+#define SYS_utime      17      /* 30 - break */
+#define SYS_wait       18      /* n/a - oldstat */
+#define SYS_lseek      19      /*x*/
+#define SYS_getpid     20
+#define SYS_isatty     21      /* n/a - mount */
+#define SYS_fstat      22      /* 108 - oldumount */
+#define SYS_time       23      /* 13 - setuid */
+#define SYS_gettimeofday 24    /*x 78 - getuid (not implemented on WIN32) */
+#define SYS_times      25      /*X 43 - stime (Xtensa-specific implementation) */
+#define SYS_socket      26
+#define SYS_sendto      27
+#define SYS_recvfrom    28
+#define SYS_select_one  29      /* not compitible select, one file descriptor at the time */
+#define SYS_bind        30
+#define SYS_ioctl      31
+
+/*
+ * SYS_select_one specifiers
+ */
+
+#define  XTISS_SELECT_ONE_READ    1
+#define  XTISS_SELECT_ONE_WRITE   2
+#define  XTISS_SELECT_ONE_EXCEPT  3
+
+
+#endif /* _XTENSA_PLATFORM_ISS_SIMCALL_H */
+
index 5b161a5cb65feaeeafb5beef36d110449dbf17df..571d0b24f8954beedf5ff18dc68765a6e398946f 100644 (file)
@@ -3,7 +3,7 @@
 #if 0
 
 #include <asm/io.h>
-#include <xtensa/simcall.h>
+#include <platform/platform-iss/simcall.h>
 
 extern int __simc ();
 
index 64f057d89e7302f929e535d9ca3bbcea7867d91d..edad4156d89a2ba30702bfda4f1b3c60dbad14dc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * arch/xtensa/platform-iss/network.c
+ * arch/xtensa/platforms/iss/network.c
  *
  * Platform specific initialization.
  *
@@ -33,7 +33,7 @@
 #include <linux/rtnetlink.h>
 #include <linux/platform_device.h>
 
-#include <asm/platform/simcall.h>
+#include <platform/simcall.h>
 
 #define DRIVER_NAME "iss-netdev"
 #define ETH_MAX_PACKET 1500
diff --git a/arch/xtensa/platforms/xt2000/Makefile b/arch/xtensa/platforms/xt2000/Makefile
new file mode 100644 (file)
index 0000000..54d018e
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# Makefile for the Tensilica XT2000 Emulation Board
+#
+
+obj-y                  = setup.o
diff --git a/arch/xtensa/platforms/xt2000/include/platform/hardware.h b/arch/xtensa/platforms/xt2000/include/platform/hardware.h
new file mode 100644 (file)
index 0000000..41459ad
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * platform/hardware.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 Tensilica Inc.
+ */
+
+/*
+ * This file contains the hardware configuration of the XT2000 board.
+ */
+
+#ifndef _XTENSA_XT2000_HARDWARE_H
+#define _XTENSA_XT2000_HARDWARE_H
+
+#include <variant/core.h>
+#include <asm/io.h>
+
+/* 
+ * Memory configuration.
+ */
+
+#define PLATFORM_DEFAULT_MEM_START 0x00000000
+#define PLATFORM_DEFAULT_MEM_SIZE 0x08000000
+
+/*
+ * Number of platform IRQs
+ */
+#define PLATFORM_NR_IRQS 3
+/*
+ * On-board components.
+ */
+
+#define SONIC83934_INTNUM      XCHAL_EXTINT3_NUM
+#define SONIC83934_ADDR                IOADDR(0x0d030000)
+
+/*
+ * V3-PCI
+ */
+
+/* The XT2000 uses the V3 as a cascaded interrupt controller for the PCI bus */
+
+#define IRQ_PCI_A              (XCHAL_NUM_INTERRUPTS + 0)
+#define IRQ_PCI_B              (XCHAL_NUM_INTERRUPTS + 1)
+#define IRQ_PCI_C              (XCHAL_NUM_INTERRUPTS + 2)
+
+/*
+ * Various other components.
+ */
+
+#define XT2000_LED_ADDR                IOADDR(0x0d040000)
+
+#endif /* _XTENSA_XT2000_HARDWARE_H */
diff --git a/arch/xtensa/platforms/xt2000/include/platform/serial.h b/arch/xtensa/platforms/xt2000/include/platform/serial.h
new file mode 100644 (file)
index 0000000..7226cf7
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * platform/serial.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_XT2000_SERIAL_H
+#define _XTENSA_XT2000_SERIAL_H
+
+#include <variant/core.h>
+#include <asm/io.h>
+
+/*  National-Semi PC16552D DUART:  */
+
+#define DUART16552_1_INTNUM    XCHAL_EXTINT4_NUM
+#define DUART16552_2_INTNUM    XCHAL_EXTINT5_NUM
+
+#define DUART16552_1_ADDR      IOADDR(0x0d050020)      /* channel 1 */
+#define DUART16552_2_ADDR      IOADDR(0x0d050000)      /* channel 2 */
+
+#define DUART16552_XTAL_FREQ   18432000        /* crystal frequency in Hz */
+#define BASE_BAUD ( DUART16552_XTAL_FREQ / 16 )
+
+#endif /* _XTENSA_XT2000_SERIAL_H */
diff --git a/arch/xtensa/platforms/xt2000/setup.c b/arch/xtensa/platforms/xt2000/setup.c
new file mode 100644 (file)
index 0000000..9e83940
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * arch/xtensa/platforms/xt2000/setup.c
+ *
+ * Platform specific functions for the XT2000 board.
+ *
+ * Authors:    Chris Zankel <chris@zankel.net>
+ *             Joe Taylor <joe@tensilica.com>
+ *
+ * Copyright 2001 - 2004 Tensilica Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/kdev_t.h>
+#include <linux/types.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/stringify.h>
+#include <linux/platform_device.h>
+#include <linux/serial.h>
+#include <linux/serial_8250.h>
+
+#include <asm/processor.h>
+#include <asm/platform.h>
+#include <asm/bootparam.h>
+#include <platform/hardware.h>
+#include <platform/serial.h>
+
+/* Assumes s points to an 8-chr string.  No checking for NULL. */
+
+static void led_print (int f, char *s)
+{
+       unsigned long* led_addr = (unsigned long*) (XT2000_LED_ADDR + 0xE0) + f;
+       int i;
+       for (i = f; i < 8; i++)
+               if ((*led_addr++ = *s++) == 0)
+                   break;
+}
+
+void platform_halt(void)
+{
+       led_print (0, "  HALT  ");
+       local_irq_disable();
+       while (1);
+}
+
+void platform_power_off(void)
+{
+       led_print (0, "POWEROFF");
+       local_irq_disable();
+       while (1);
+}
+
+void platform_restart(void)
+{
+       /* Flush and reset the mmu, simulate a processor reset, and
+        * jump to the reset vector. */
+
+       __asm__ __volatile__ ("movi     a2, 15\n\t"
+                             "wsr      a2, " __stringify(ICOUNTLEVEL) "\n\t"
+                             "movi     a2, 0\n\t"
+                             "wsr      a2, " __stringify(ICOUNT) "\n\t"
+                             "wsr      a2, " __stringify(IBREAKENABLE) "\n\t"
+                             "wsr      a2, " __stringify(LCOUNT) "\n\t"
+                             "movi     a2, 0x1f\n\t"
+                             "wsr      a2, " __stringify(PS) "\n\t"
+                             "isync\n\t"
+                             "jx       %0\n\t"
+                             :
+                             : "a" (XCHAL_RESET_VECTOR_VADDR)
+                             : "a2"
+                             );
+
+       /* control never gets here */
+}
+
+void __init platform_setup(char** cmdline)
+{
+       led_print (0, "LINUX   ");
+}
+
+/* early initialization */
+
+extern sysmem_info_t __initdata sysmem;
+
+void platform_init(bp_tag_t* first)
+{
+       /* Set default memory block if not provided by the bootloader. */
+
+       if (sysmem.nr_banks == 0) {
+               sysmem.nr_banks = 1;
+               sysmem.bank[0].start = PLATFORM_DEFAULT_MEM_START;
+               sysmem.bank[0].end = PLATFORM_DEFAULT_MEM_START
+                                    + PLATFORM_DEFAULT_MEM_SIZE;
+       }
+}
+
+/* Heartbeat. Let the LED blink. */
+
+void platform_heartbeat(void)
+{
+       static int i=0, t = 0;
+
+       if (--t < 0)
+       {
+               t = 59;
+               led_print(7, i ? ".": " ");
+               i ^= 1;
+       }
+}
+
+//#define RS_TABLE_SIZE 2
+//#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
+
+#define _SERIAL_PORT(_base,_irq)                                       \
+{                                                                      \
+       .mapbase        = (_base),                                      \
+       .membase        = (void*)(_base),                               \
+       .irq            = (_irq),                                       \
+       .uartclk        = DUART16552_XTAL_FREQ,                         \
+       .iotype         = UPIO_MEM,                                     \
+       .flags          = UPF_BOOT_AUTOCONF,                            \
+       .regshift       = 2,                                            \
+}
+
+static struct plat_serial8250_port xt2000_serial_data[] = {
+#if XCHAL_HAVE_BE
+       _SERIAL_PORT(DUART16552_1_ADDR + 3, DUART16552_1_INTNUM),
+       _SERIAL_PORT(DUART16552_2_ADDR + 3, DUART16552_2_INTNUM),
+#else
+       _SERIAL_PORT(DUART16552_1_ADDR, DUART16552_1_INTNUM),
+       _SERIAL_PORT(DUART16552_2_ADDR, DUART16552_2_INTNUM),
+#endif
+       { }
+};
+
+static struct platform_device xt2000_serial8250_device = {
+       .name           = "serial8250",
+       .id             = PLAT8250_DEV_PLATFORM,
+       .dev            = {
+           .platform_data = xt2000_serial_data,
+       },
+};
+
+static struct resource xt2000_sonic_res[] = {
+       {
+               .start = SONIC83934_ADDR,
+               .end   = SONIC83934_ADDR + 0xff,
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start = SONIC83934_INTNUM,
+               .end = SONIC83934_INTNUM,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device xt2000_sonic_device = {
+       .name           = "xtsonic",
+       .num_resources  = ARRAY_SIZE(xt2000_sonic_res),
+       .resource               = xt2000_sonic_res,
+};
+
+static int __init xt2000_setup_devinit(void)
+{
+       platform_device_register(&xt2000_serial8250_device);
+       platform_device_register(&xt2000_sonic_device);
+
+       return 0;
+}
+
+device_initcall(xt2000_setup_devinit);
diff --git a/arch/xtensa/variants/dc232b/include/variant/core.h b/arch/xtensa/variants/dc232b/include/variant/core.h
new file mode 100644 (file)
index 0000000..525bd3d
--- /dev/null
@@ -0,0 +1,424 @@
+/*
+ * Xtensa processor core configuration information.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (c) 1999-2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CORE_CONFIGURATION_H
+#define _XTENSA_CORE_CONFIGURATION_H
+
+
+/****************************************************************************
+           Parameters Useful for Any Code, USER or PRIVILEGED
+ ****************************************************************************/
+
+/*
+ *  Note:  Macros of the form XCHAL_HAVE_*** have a value of 1 if the option is
+ *  configured, and a value of 0 otherwise.  These macros are always defined.
+ */
+
+
+/*----------------------------------------------------------------------
+                               ISA
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_HAVE_BE                  0       /* big-endian byte ordering */
+#define XCHAL_HAVE_WINDOWED            1       /* windowed registers option */
+#define XCHAL_NUM_AREGS                        32      /* num of physical addr regs */
+#define XCHAL_NUM_AREGS_LOG2           5       /* log2(XCHAL_NUM_AREGS) */
+#define XCHAL_MAX_INSTRUCTION_SIZE     3       /* max instr bytes (3..8) */
+#define XCHAL_HAVE_DEBUG               1       /* debug option */
+#define XCHAL_HAVE_DENSITY             1       /* 16-bit instructions */
+#define XCHAL_HAVE_LOOPS               1       /* zero-overhead loops */
+#define XCHAL_HAVE_NSA                 1       /* NSA/NSAU instructions */
+#define XCHAL_HAVE_MINMAX              1       /* MIN/MAX instructions */
+#define XCHAL_HAVE_SEXT                        1       /* SEXT instruction */
+#define XCHAL_HAVE_CLAMPS              1       /* CLAMPS instruction */
+#define XCHAL_HAVE_MUL16               1       /* MUL16S/MUL16U instructions */
+#define XCHAL_HAVE_MUL32               1       /* MULL instruction */
+#define XCHAL_HAVE_MUL32_HIGH          0       /* MULUH/MULSH instructions */
+#define XCHAL_HAVE_DIV32               1       /* QUOS/QUOU/REMS/REMU instructions */
+#define XCHAL_HAVE_L32R                        1       /* L32R instruction */
+#define XCHAL_HAVE_ABSOLUTE_LITERALS   1       /* non-PC-rel (extended) L32R */
+#define XCHAL_HAVE_CONST16             0       /* CONST16 instruction */
+#define XCHAL_HAVE_ADDX                        1       /* ADDX#/SUBX# instructions */
+#define XCHAL_HAVE_WIDE_BRANCHES       0       /* B*.W18 or B*.W15 instr's */
+#define XCHAL_HAVE_PREDICTED_BRANCHES  0       /* B[EQ/EQZ/NE/NEZ]T instr's */
+#define XCHAL_HAVE_CALL4AND12          1       /* (obsolete option) */
+#define XCHAL_HAVE_ABS                 1       /* ABS instruction */
+/*#define XCHAL_HAVE_POPC              0*/     /* POPC instruction */
+/*#define XCHAL_HAVE_CRC               0*/     /* CRC instruction */
+#define XCHAL_HAVE_RELEASE_SYNC                1       /* L32AI/S32RI instructions */
+#define XCHAL_HAVE_S32C1I              1       /* S32C1I instruction */
+#define XCHAL_HAVE_SPECULATION         0       /* speculation */
+#define XCHAL_HAVE_FULL_RESET          1       /* all regs/state reset */
+#define XCHAL_NUM_CONTEXTS             1       /* */
+#define XCHAL_NUM_MISC_REGS            2       /* num of scratch regs (0..4) */
+#define XCHAL_HAVE_TAP_MASTER          0       /* JTAG TAP control instr's */
+#define XCHAL_HAVE_PRID                        1       /* processor ID register */
+#define XCHAL_HAVE_THREADPTR           1       /* THREADPTR register */
+#define XCHAL_HAVE_BOOLEANS            0       /* boolean registers */
+#define XCHAL_HAVE_CP                  1       /* CPENABLE reg (coprocessor) */
+#define XCHAL_CP_MAXCFG                        8       /* max allowed cp id plus one */
+#define XCHAL_HAVE_MAC16               1       /* MAC16 package */
+#define XCHAL_HAVE_VECTORFPU2005       0       /* vector floating-point pkg */
+#define XCHAL_HAVE_FP                  0       /* floating point pkg */
+#define XCHAL_HAVE_VECTRA1             0       /* Vectra I  pkg */
+#define XCHAL_HAVE_VECTRALX            0       /* Vectra LX pkg */
+#define XCHAL_HAVE_HIFI2               0       /* HiFi2 Audio Engine pkg */
+
+
+/*----------------------------------------------------------------------
+                               MISC
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_NUM_WRITEBUFFER_ENTRIES  8       /* size of write buffer */
+#define XCHAL_INST_FETCH_WIDTH         4       /* instr-fetch width in bytes */
+#define XCHAL_DATA_WIDTH               4       /* data width in bytes */
+/*  In T1050, applies to selected core load and store instructions (see ISA): */
+#define XCHAL_UNALIGNED_LOAD_EXCEPTION 1       /* unaligned loads cause exc. */
+#define XCHAL_UNALIGNED_STORE_EXCEPTION        1       /* unaligned stores cause exc.*/
+
+#define XCHAL_SW_VERSION               701001  /* sw version of this header */
+
+#define XCHAL_CORE_ID                  "dc232b"        /* alphanum core name
+                                                  (CoreID) set in the Xtensa
+                                                  Processor Generator */
+
+#define XCHAL_CORE_DESCRIPTION         "Diamond 232L Standard Core Rev.B (LE)"
+#define XCHAL_BUILD_UNIQUE_ID          0x0000BEEF      /* 22-bit sw build ID */
+
+/*
+ *  These definitions describe the hardware targeted by this software.
+ */
+#define XCHAL_HW_CONFIGID0             0xC56307FE      /* ConfigID hi 32 bits*/
+#define XCHAL_HW_CONFIGID1             0x0D40BEEF      /* ConfigID lo 32 bits*/
+#define XCHAL_HW_VERSION_NAME          "LX2.1.1"       /* full version name */
+#define XCHAL_HW_VERSION_MAJOR         2210    /* major ver# of targeted hw */
+#define XCHAL_HW_VERSION_MINOR         1       /* minor ver# of targeted hw */
+#define XCHAL_HW_VERSION               221001  /* major*100+minor */
+#define XCHAL_HW_REL_LX2               1
+#define XCHAL_HW_REL_LX2_1             1
+#define XCHAL_HW_REL_LX2_1_1           1
+#define XCHAL_HW_CONFIGID_RELIABLE     1
+/*  If software targets a *range* of hardware versions, these are the bounds: */
+#define XCHAL_HW_MIN_VERSION_MAJOR     2210    /* major v of earliest tgt hw */
+#define XCHAL_HW_MIN_VERSION_MINOR     1       /* minor v of earliest tgt hw */
+#define XCHAL_HW_MIN_VERSION           221001  /* earliest targeted hw */
+#define XCHAL_HW_MAX_VERSION_MAJOR     2210    /* major v of latest tgt hw */
+#define XCHAL_HW_MAX_VERSION_MINOR     1       /* minor v of latest tgt hw */
+#define XCHAL_HW_MAX_VERSION           221001  /* latest targeted hw */
+
+
+/*----------------------------------------------------------------------
+                               CACHE
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_ICACHE_LINESIZE          32      /* I-cache line size in bytes */
+#define XCHAL_DCACHE_LINESIZE          32      /* D-cache line size in bytes */
+#define XCHAL_ICACHE_LINEWIDTH         5       /* log2(I line size in bytes) */
+#define XCHAL_DCACHE_LINEWIDTH         5       /* log2(D line size in bytes) */
+
+#define XCHAL_ICACHE_SIZE              16384   /* I-cache size in bytes or 0 */
+#define XCHAL_DCACHE_SIZE              16384   /* D-cache size in bytes or 0 */
+
+#define XCHAL_DCACHE_IS_WRITEBACK      1       /* writeback feature */
+
+
+
+
+/****************************************************************************
+    Parameters Useful for PRIVILEGED (Supervisory or Non-Virtualized) Code
+ ****************************************************************************/
+
+
+#ifndef XTENSA_HAL_NON_PRIVILEGED_ONLY
+
+/*----------------------------------------------------------------------
+                               CACHE
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_HAVE_PIF                 1       /* any outbound PIF present */
+
+/*  If present, cache size in bytes == (ways * 2^(linewidth + setwidth)).  */
+
+/*  Number of cache sets in log2(lines per way):  */
+#define XCHAL_ICACHE_SETWIDTH          7
+#define XCHAL_DCACHE_SETWIDTH          7
+
+/*  Cache set associativity (number of ways):  */
+#define XCHAL_ICACHE_WAYS              4
+#define XCHAL_DCACHE_WAYS              4
+
+/*  Cache features:  */
+#define XCHAL_ICACHE_LINE_LOCKABLE     1
+#define XCHAL_DCACHE_LINE_LOCKABLE     1
+#define XCHAL_ICACHE_ECC_PARITY                0
+#define XCHAL_DCACHE_ECC_PARITY                0
+
+/*  Number of encoded cache attr bits (see <xtensa/hal.h> for decoded bits):  */
+#define XCHAL_CA_BITS                  4
+
+
+/*----------------------------------------------------------------------
+                       INTERNAL I/D RAM/ROMs and XLMI
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_NUM_INSTROM              0       /* number of core instr. ROMs */
+#define XCHAL_NUM_INSTRAM              0       /* number of core instr. RAMs */
+#define XCHAL_NUM_DATAROM              0       /* number of core data ROMs */
+#define XCHAL_NUM_DATARAM              0       /* number of core data RAMs */
+#define XCHAL_NUM_URAM                 0       /* number of core unified RAMs*/
+#define XCHAL_NUM_XLMI                 0       /* number of core XLMI ports */
+
+
+/*----------------------------------------------------------------------
+                       INTERRUPTS and TIMERS
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_HAVE_INTERRUPTS          1       /* interrupt option */
+#define XCHAL_HAVE_HIGHPRI_INTERRUPTS  1       /* med/high-pri. interrupts */
+#define XCHAL_HAVE_NMI                 1       /* non-maskable interrupt */
+#define XCHAL_HAVE_CCOUNT              1       /* CCOUNT reg. (timer option) */
+#define XCHAL_NUM_TIMERS               3       /* number of CCOMPAREn regs */
+#define XCHAL_NUM_INTERRUPTS           22      /* number of interrupts */
+#define XCHAL_NUM_INTERRUPTS_LOG2      5       /* ceil(log2(NUM_INTERRUPTS)) */
+#define XCHAL_NUM_EXTINTERRUPTS                17      /* num of external interrupts */
+#define XCHAL_NUM_INTLEVELS            6       /* number of interrupt levels
+                                                  (not including level zero) */
+#define XCHAL_EXCM_LEVEL               3       /* level masked by PS.EXCM */
+       /* (always 1 in XEA1; levels 2 .. EXCM_LEVEL are "medium priority") */
+
+/*  Masks of interrupts at each interrupt level:  */
+#define XCHAL_INTLEVEL1_MASK           0x001F80FF
+#define XCHAL_INTLEVEL2_MASK           0x00000100
+#define XCHAL_INTLEVEL3_MASK           0x00200E00
+#define XCHAL_INTLEVEL4_MASK           0x00001000
+#define XCHAL_INTLEVEL5_MASK           0x00002000
+#define XCHAL_INTLEVEL6_MASK           0x00000000
+#define XCHAL_INTLEVEL7_MASK           0x00004000
+
+/*  Masks of interrupts at each range 1..n of interrupt levels:  */
+#define XCHAL_INTLEVEL1_ANDBELOW_MASK  0x001F80FF
+#define XCHAL_INTLEVEL2_ANDBELOW_MASK  0x001F81FF
+#define XCHAL_INTLEVEL3_ANDBELOW_MASK  0x003F8FFF
+#define XCHAL_INTLEVEL4_ANDBELOW_MASK  0x003F9FFF
+#define XCHAL_INTLEVEL5_ANDBELOW_MASK  0x003FBFFF
+#define XCHAL_INTLEVEL6_ANDBELOW_MASK  0x003FBFFF
+#define XCHAL_INTLEVEL7_ANDBELOW_MASK  0x003FFFFF
+
+/*  Level of each interrupt:  */
+#define XCHAL_INT0_LEVEL               1
+#define XCHAL_INT1_LEVEL               1
+#define XCHAL_INT2_LEVEL               1
+#define XCHAL_INT3_LEVEL               1
+#define XCHAL_INT4_LEVEL               1
+#define XCHAL_INT5_LEVEL               1
+#define XCHAL_INT6_LEVEL               1
+#define XCHAL_INT7_LEVEL               1
+#define XCHAL_INT8_LEVEL               2
+#define XCHAL_INT9_LEVEL               3
+#define XCHAL_INT10_LEVEL              3
+#define XCHAL_INT11_LEVEL              3
+#define XCHAL_INT12_LEVEL              4
+#define XCHAL_INT13_LEVEL              5
+#define XCHAL_INT14_LEVEL              7
+#define XCHAL_INT15_LEVEL              1
+#define XCHAL_INT16_LEVEL              1
+#define XCHAL_INT17_LEVEL              1
+#define XCHAL_INT18_LEVEL              1
+#define XCHAL_INT19_LEVEL              1
+#define XCHAL_INT20_LEVEL              1
+#define XCHAL_INT21_LEVEL              3
+#define XCHAL_DEBUGLEVEL               6       /* debug interrupt level */
+#define XCHAL_HAVE_DEBUG_EXTERN_INT    1       /* OCD external db interrupt */
+#define XCHAL_NMILEVEL                 7       /* NMI "level" (for use with
+                                                  EXCSAVE/EPS/EPC_n, RFI n) */
+
+/*  Type of each interrupt:  */
+#define XCHAL_INT0_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT1_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT2_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT3_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT4_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT5_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT6_TYPE        XTHAL_INTTYPE_TIMER
+#define XCHAL_INT7_TYPE        XTHAL_INTTYPE_SOFTWARE
+#define XCHAL_INT8_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT9_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT10_TYPE       XTHAL_INTTYPE_TIMER
+#define XCHAL_INT11_TYPE       XTHAL_INTTYPE_SOFTWARE
+#define XCHAL_INT12_TYPE       XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT13_TYPE       XTHAL_INTTYPE_TIMER
+#define XCHAL_INT14_TYPE       XTHAL_INTTYPE_NMI
+#define XCHAL_INT15_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT16_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT17_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT18_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT19_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT20_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT21_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
+
+/*  Masks of interrupts for each type of interrupt:  */
+#define XCHAL_INTTYPE_MASK_UNCONFIGURED        0xFFC00000
+#define XCHAL_INTTYPE_MASK_SOFTWARE    0x00000880
+#define XCHAL_INTTYPE_MASK_EXTERN_EDGE 0x003F8000
+#define XCHAL_INTTYPE_MASK_EXTERN_LEVEL        0x0000133F
+#define XCHAL_INTTYPE_MASK_TIMER       0x00002440
+#define XCHAL_INTTYPE_MASK_NMI         0x00004000
+#define XCHAL_INTTYPE_MASK_WRITE_ERROR 0x00000000
+
+/*  Interrupt numbers assigned to specific interrupt sources:  */
+#define XCHAL_TIMER0_INTERRUPT         6       /* CCOMPARE0 */
+#define XCHAL_TIMER1_INTERRUPT         10      /* CCOMPARE1 */
+#define XCHAL_TIMER2_INTERRUPT         13      /* CCOMPARE2 */
+#define XCHAL_TIMER3_INTERRUPT         XTHAL_TIMER_UNCONFIGURED
+#define XCHAL_NMI_INTERRUPT            14      /* non-maskable interrupt */
+
+/*  Interrupt numbers for levels at which only one interrupt is configured:  */
+#define XCHAL_INTLEVEL2_NUM            8
+#define XCHAL_INTLEVEL4_NUM            12
+#define XCHAL_INTLEVEL5_NUM            13
+#define XCHAL_INTLEVEL7_NUM            14
+/*  (There are many interrupts each at level(s) 1, 3.)  */
+
+
+/*
+ *  External interrupt vectors/levels.
+ *  These macros describe how Xtensa processor interrupt numbers
+ *  (as numbered internally, eg. in INTERRUPT and INTENABLE registers)
+ *  map to external BInterrupt<n> pins, for those interrupts
+ *  configured as external (level-triggered, edge-triggered, or NMI).
+ *  See the Xtensa processor databook for more details.
+ */
+
+/*  Core interrupt numbers mapped to each EXTERNAL interrupt number:  */
+#define XCHAL_EXTINT0_NUM              0       /* (intlevel 1) */
+#define XCHAL_EXTINT1_NUM              1       /* (intlevel 1) */
+#define XCHAL_EXTINT2_NUM              2       /* (intlevel 1) */
+#define XCHAL_EXTINT3_NUM              3       /* (intlevel 1) */
+#define XCHAL_EXTINT4_NUM              4       /* (intlevel 1) */
+#define XCHAL_EXTINT5_NUM              5       /* (intlevel 1) */
+#define XCHAL_EXTINT6_NUM              8       /* (intlevel 2) */
+#define XCHAL_EXTINT7_NUM              9       /* (intlevel 3) */
+#define XCHAL_EXTINT8_NUM              12      /* (intlevel 4) */
+#define XCHAL_EXTINT9_NUM              14      /* (intlevel 7) */
+#define XCHAL_EXTINT10_NUM             15      /* (intlevel 1) */
+#define XCHAL_EXTINT11_NUM             16      /* (intlevel 1) */
+#define XCHAL_EXTINT12_NUM             17      /* (intlevel 1) */
+#define XCHAL_EXTINT13_NUM             18      /* (intlevel 1) */
+#define XCHAL_EXTINT14_NUM             19      /* (intlevel 1) */
+#define XCHAL_EXTINT15_NUM             20      /* (intlevel 1) */
+#define XCHAL_EXTINT16_NUM             21      /* (intlevel 3) */
+
+
+/*----------------------------------------------------------------------
+                       EXCEPTIONS and VECTORS
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_XEA_VERSION              2       /* Xtensa Exception Architecture
+                                                  number: 1 == XEA1 (old)
+                                                          2 == XEA2 (new)
+                                                          0 == XEAX (extern) */
+#define XCHAL_HAVE_XEA1                        0       /* Exception Architecture 1 */
+#define XCHAL_HAVE_XEA2                        1       /* Exception Architecture 2 */
+#define XCHAL_HAVE_XEAX                        0       /* External Exception Arch. */
+#define XCHAL_HAVE_EXCEPTIONS          1       /* exception option */
+#define XCHAL_HAVE_MEM_ECC_PARITY      0       /* local memory ECC/parity */
+#define XCHAL_HAVE_VECTOR_SELECT       1       /* relocatable vectors */
+#define XCHAL_HAVE_VECBASE             1       /* relocatable vectors */
+#define XCHAL_VECBASE_RESET_VADDR      0xD0000000  /* VECBASE reset value */
+#define XCHAL_VECBASE_RESET_PADDR      0x00000000
+#define XCHAL_RESET_VECBASE_OVERLAP    0
+
+#define XCHAL_RESET_VECTOR0_VADDR      0xFE000000
+#define XCHAL_RESET_VECTOR0_PADDR      0xFE000000
+#define XCHAL_RESET_VECTOR1_VADDR      0xD8000500
+#define XCHAL_RESET_VECTOR1_PADDR      0x00000500
+#define XCHAL_RESET_VECTOR_VADDR       0xFE000000
+#define XCHAL_RESET_VECTOR_PADDR       0xFE000000
+#define XCHAL_USER_VECOFS              0x00000340
+#define XCHAL_USER_VECTOR_VADDR                0xD0000340
+#define XCHAL_USER_VECTOR_PADDR                0x00000340
+#define XCHAL_KERNEL_VECOFS            0x00000300
+#define XCHAL_KERNEL_VECTOR_VADDR      0xD0000300
+#define XCHAL_KERNEL_VECTOR_PADDR      0x00000300
+#define XCHAL_DOUBLEEXC_VECOFS         0x000003C0
+#define XCHAL_DOUBLEEXC_VECTOR_VADDR   0xD00003C0
+#define XCHAL_DOUBLEEXC_VECTOR_PADDR   0x000003C0
+#define XCHAL_WINDOW_OF4_VECOFS                0x00000000
+#define XCHAL_WINDOW_UF4_VECOFS                0x00000040
+#define XCHAL_WINDOW_OF8_VECOFS                0x00000080
+#define XCHAL_WINDOW_UF8_VECOFS                0x000000C0
+#define XCHAL_WINDOW_OF12_VECOFS       0x00000100
+#define XCHAL_WINDOW_UF12_VECOFS       0x00000140
+#define XCHAL_WINDOW_VECTORS_VADDR     0xD0000000
+#define XCHAL_WINDOW_VECTORS_PADDR     0x00000000
+#define XCHAL_INTLEVEL2_VECOFS         0x00000180
+#define XCHAL_INTLEVEL2_VECTOR_VADDR   0xD0000180
+#define XCHAL_INTLEVEL2_VECTOR_PADDR   0x00000180
+#define XCHAL_INTLEVEL3_VECOFS         0x000001C0
+#define XCHAL_INTLEVEL3_VECTOR_VADDR   0xD00001C0
+#define XCHAL_INTLEVEL3_VECTOR_PADDR   0x000001C0
+#define XCHAL_INTLEVEL4_VECOFS         0x00000200
+#define XCHAL_INTLEVEL4_VECTOR_VADDR   0xD0000200
+#define XCHAL_INTLEVEL4_VECTOR_PADDR   0x00000200
+#define XCHAL_INTLEVEL5_VECOFS         0x00000240
+#define XCHAL_INTLEVEL5_VECTOR_VADDR   0xD0000240
+#define XCHAL_INTLEVEL5_VECTOR_PADDR   0x00000240
+#define XCHAL_INTLEVEL6_VECOFS         0x00000280
+#define XCHAL_INTLEVEL6_VECTOR_VADDR   0xD0000280
+#define XCHAL_INTLEVEL6_VECTOR_PADDR   0x00000280
+#define XCHAL_DEBUG_VECOFS             XCHAL_INTLEVEL6_VECOFS
+#define XCHAL_DEBUG_VECTOR_VADDR       XCHAL_INTLEVEL6_VECTOR_VADDR
+#define XCHAL_DEBUG_VECTOR_PADDR       XCHAL_INTLEVEL6_VECTOR_PADDR
+#define XCHAL_NMI_VECOFS               0x000002C0
+#define XCHAL_NMI_VECTOR_VADDR         0xD00002C0
+#define XCHAL_NMI_VECTOR_PADDR         0x000002C0
+#define XCHAL_INTLEVEL7_VECOFS         XCHAL_NMI_VECOFS
+#define XCHAL_INTLEVEL7_VECTOR_VADDR   XCHAL_NMI_VECTOR_VADDR
+#define XCHAL_INTLEVEL7_VECTOR_PADDR   XCHAL_NMI_VECTOR_PADDR
+
+
+/*----------------------------------------------------------------------
+                               DEBUG
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_HAVE_OCD                 1       /* OnChipDebug option */
+#define XCHAL_NUM_IBREAK               2       /* number of IBREAKn regs */
+#define XCHAL_NUM_DBREAK               2       /* number of DBREAKn regs */
+#define XCHAL_HAVE_OCD_DIR_ARRAY       1       /* faster OCD option */
+
+
+/*----------------------------------------------------------------------
+                               MMU
+  ----------------------------------------------------------------------*/
+
+/*  See core-matmap.h header file for more details.  */
+
+#define XCHAL_HAVE_TLBS                        1       /* inverse of HAVE_CACHEATTR */
+#define XCHAL_HAVE_SPANNING_WAY                0       /* one way maps I+D 4GB vaddr */
+#define XCHAL_HAVE_IDENTITY_MAP                0       /* vaddr == paddr always */
+#define XCHAL_HAVE_CACHEATTR           0       /* CACHEATTR register present */
+#define XCHAL_HAVE_MIMIC_CACHEATTR     0       /* region protection */
+#define XCHAL_HAVE_XLT_CACHEATTR       0       /* region prot. w/translation */
+#define XCHAL_HAVE_PTP_MMU             1       /* full MMU (with page table
+                                                  [autorefill] and protection)
+                                                  usable for an MMU-based OS */
+/*  If none of the above last 4 are set, it's a custom TLB configuration.  */
+#define XCHAL_ITLB_ARF_ENTRIES_LOG2    2       /* log2(autorefill way size) */
+#define XCHAL_DTLB_ARF_ENTRIES_LOG2    2       /* log2(autorefill way size) */
+
+#define XCHAL_MMU_ASID_BITS            8       /* number of bits in ASIDs */
+#define XCHAL_MMU_RINGS                        4       /* number of rings (1..4) */
+#define XCHAL_MMU_RING_BITS            2       /* num of bits in RING field */
+
+#endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
+
+
+#endif /* _XTENSA_CORE_CONFIGURATION_H */
+
diff --git a/arch/xtensa/variants/dc232b/include/variant/tie-asm.h b/arch/xtensa/variants/dc232b/include/variant/tie-asm.h
new file mode 100644 (file)
index 0000000..ed4f53f
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * This header file contains assembly-language definitions (assembly
+ * macros, etc.) for this specific Xtensa processor's TIE extensions
+ * and options.  It is customized to this Xtensa processor configuration.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1999-2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CORE_TIE_ASM_H
+#define _XTENSA_CORE_TIE_ASM_H
+
+/*  Selection parameter values for save-area save/restore macros:  */
+/*  Option vs. TIE:  */
+#define XTHAL_SAS_TIE  0x0001  /* custom extension or coprocessor */
+#define XTHAL_SAS_OPT  0x0002  /* optional (and not a coprocessor) */
+/*  Whether used automatically by compiler:  */
+#define XTHAL_SAS_NOCC 0x0004  /* not used by compiler w/o special opts/code */
+#define XTHAL_SAS_CC   0x0008  /* used by compiler without special opts/code */
+/*  ABI handling across function calls:  */
+#define XTHAL_SAS_CALR 0x0010  /* caller-saved */
+#define XTHAL_SAS_CALE 0x0020  /* callee-saved */
+#define XTHAL_SAS_GLOB 0x0040  /* global across function calls (in thread) */
+/*  Misc  */
+#define XTHAL_SAS_ALL  0xFFFF  /* include all default NCP contents */
+
+
+
+/* Macro to save all non-coprocessor (extra) custom TIE and optional state
+ * (not including zero-overhead loop registers).
+ * Save area ptr (clobbered):  ptr  (1 byte aligned)
+ * Scratch regs  (clobbered):  at1..at4  (only first XCHAL_NCP_NUM_ATMPS needed)
+ */
+       .macro xchal_ncp_store  ptr at1 at2 at3 at4  continue=0 ofs=-1 select=XTHAL_SAS_ALL
+       xchal_sa_start  \continue, \ofs
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-8, 4, 4
+       rsr     \at1, ACCLO             // MAC16 accumulator
+       rsr     \at2, ACCHI
+       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       s32i    \at2, \ptr, .Lxchal_ofs_ + 4
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 8
+       .endif
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-16, 4, 4
+       rsr     \at1, M0                // MAC16 registers
+       rsr     \at2, M1
+       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       s32i    \at2, \ptr, .Lxchal_ofs_ + 4
+       rsr     \at1, M2
+       rsr     \at2, M3
+       s32i    \at1, \ptr, .Lxchal_ofs_ + 8
+       s32i    \at2, \ptr, .Lxchal_ofs_ + 12
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 16
+       .endif
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
+       rsr     \at1, SCOMPARE1         // conditional store option
+       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
+       .endif
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
+       rur     \at1, THREADPTR         // threadptr option
+       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
+       .endif
+       .endm   // xchal_ncp_store
+
+/* Macro to save all non-coprocessor (extra) custom TIE and optional state
+ * (not including zero-overhead loop registers).
+ * Save area ptr (clobbered):  ptr  (1 byte aligned)
+ * Scratch regs  (clobbered):  at1..at4  (only first XCHAL_NCP_NUM_ATMPS needed)
+ */
+       .macro xchal_ncp_load  ptr at1 at2 at3 at4  continue=0 ofs=-1 select=XTHAL_SAS_ALL
+       xchal_sa_start  \continue, \ofs
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-8, 4, 4
+       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       l32i    \at2, \ptr, .Lxchal_ofs_ + 4
+       wsr     \at1, ACCLO             // MAC16 accumulator
+       wsr     \at2, ACCHI
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 8
+       .endif
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-16, 4, 4
+       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       l32i    \at2, \ptr, .Lxchal_ofs_ + 4
+       wsr     \at1, M0                // MAC16 registers
+       wsr     \at2, M1
+       l32i    \at1, \ptr, .Lxchal_ofs_ + 8
+       l32i    \at2, \ptr, .Lxchal_ofs_ + 12
+       wsr     \at1, M2
+       wsr     \at2, M3
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 16
+       .endif
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
+       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       wsr     \at1, SCOMPARE1         // conditional store option
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
+       .endif
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
+       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       wur     \at1, THREADPTR         // threadptr option
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
+       .endif
+       .endm   // xchal_ncp_load
+
+
+
+#define XCHAL_NCP_NUM_ATMPS    2
+
+
+#define XCHAL_SA_NUM_ATMPS     2
+
+#endif /*_XTENSA_CORE_TIE_ASM_H*/
+
diff --git a/arch/xtensa/variants/dc232b/include/variant/tie.h b/arch/xtensa/variants/dc232b/include/variant/tie.h
new file mode 100644 (file)
index 0000000..018e81a
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * This header file describes this specific Xtensa processor's TIE extensions
+ * that extend basic Xtensa core functionality.  It is customized to this
+ * Xtensa processor configuration.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1999-2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CORE_TIE_H
+#define _XTENSA_CORE_TIE_H
+
+#define XCHAL_CP_NUM                   1       /* number of coprocessors */
+#define XCHAL_CP_MAX                   8       /* max CP ID + 1 (0 if none) */
+#define XCHAL_CP_MASK                  0x80    /* bitmask of all CPs by ID */
+#define XCHAL_CP_PORT_MASK             0x80    /* bitmask of only port CPs */
+
+/*  Basic parameters of each coprocessor:  */
+#define XCHAL_CP7_NAME                 "XTIOP"
+#define XCHAL_CP7_IDENT                        XTIOP
+#define XCHAL_CP7_SA_SIZE              0       /* size of state save area */
+#define XCHAL_CP7_SA_ALIGN             1       /* min alignment of save area */
+#define XCHAL_CP_ID_XTIOP              7       /* coprocessor ID (0..7) */
+
+/*  Filler info for unassigned coprocessors, to simplify arrays etc:  */
+#define XCHAL_CP0_SA_SIZE              0
+#define XCHAL_CP0_SA_ALIGN             1
+#define XCHAL_CP1_SA_SIZE              0
+#define XCHAL_CP1_SA_ALIGN             1
+#define XCHAL_CP2_SA_SIZE              0
+#define XCHAL_CP2_SA_ALIGN             1
+#define XCHAL_CP3_SA_SIZE              0
+#define XCHAL_CP3_SA_ALIGN             1
+#define XCHAL_CP4_SA_SIZE              0
+#define XCHAL_CP4_SA_ALIGN             1
+#define XCHAL_CP5_SA_SIZE              0
+#define XCHAL_CP5_SA_ALIGN             1
+#define XCHAL_CP6_SA_SIZE              0
+#define XCHAL_CP6_SA_ALIGN             1
+
+/*  Save area for non-coprocessor optional and custom (TIE) state:  */
+#define XCHAL_NCP_SA_SIZE              32
+#define XCHAL_NCP_SA_ALIGN             4
+
+/*  Total save area for optional and custom state (NCP + CPn):  */
+#define XCHAL_TOTAL_SA_SIZE            32      /* with 16-byte align padding */
+#define XCHAL_TOTAL_SA_ALIGN           4       /* actual minimum alignment */
+
+/*
+ * Detailed contents of save areas.
+ * NOTE:  caller must define the XCHAL_SA_REG macro (not defined here)
+ * before expanding the XCHAL_xxx_SA_LIST() macros.
+ *
+ * XCHAL_SA_REG(s,ccused,abikind,kind,opt,name,galign,align,asize,
+ *             dbnum,base,regnum,bitsz,gapsz,reset,x...)
+ *
+ *     s = passed from XCHAL_*_LIST(s), eg. to select how to expand
+ *     ccused = set if used by compiler without special options or code
+ *     abikind = 0 (caller-saved), 1 (callee-saved), or 2 (thread-global)
+ *     kind = 0 (special reg), 1 (TIE user reg), or 2 (TIE regfile reg)
+ *     opt = 0 (custom TIE extension or coprocessor), or 1 (optional reg)
+ *     name = lowercase reg name (no quotes)
+ *     galign = group byte alignment (power of 2) (galign >= align)
+ *     align = register byte alignment (power of 2)
+ *     asize = allocated size in bytes (asize*8 == bitsz + gapsz + padsz)
+ *       (not including any pad bytes required to galign this or next reg)
+ *     dbnum = unique target number f/debug (see <xtensa-libdb-macros.h>)
+ *     base = reg shortname w/o index (or sr=special, ur=TIE user reg)
+ *     regnum = reg index in regfile, or special/TIE-user reg number
+ *     bitsz = number of significant bits (regfile width, or ur/sr mask bits)
+ *     gapsz = intervening bits, if bitsz bits not stored contiguously
+ *     (padsz = pad bits at end [TIE regfile] or at msbits [ur,sr] of asize)
+ *     reset = register reset value (or 0 if undefined at reset)
+ *     x = reserved for future use (0 until then)
+ *
+ *  To filter out certain registers, e.g. to expand only the non-global
+ *  registers used by the compiler, you can do something like this:
+ *
+ *  #define XCHAL_SA_REG(s,ccused,p...)        SELCC##ccused(p)
+ *  #define SELCC0(p...)
+ *  #define SELCC1(abikind,p...)       SELAK##abikind(p)
+ *  #define SELAK0(p...)               REG(p)
+ *  #define SELAK1(p...)               REG(p)
+ *  #define SELAK2(p...)
+ *  #define REG(kind,tie,name,galn,aln,asz,csz,dbnum,base,rnum,bsz,rst,x...) \
+ *             ...what you want to expand...
+ */
+
+#define XCHAL_NCP_SA_NUM       8
+#define XCHAL_NCP_SA_LIST(s)   \
+ XCHAL_SA_REG(s,1,0,0,1,          acclo, 4, 4, 4,0x0210,  sr,16 , 32,0,0,0) \
+ XCHAL_SA_REG(s,1,0,0,1,          acchi, 4, 4, 4,0x0211,  sr,17 ,  8,0,0,0) \
+ XCHAL_SA_REG(s,0,0,0,1,             m0, 4, 4, 4,0x0220,  sr,32 , 32,0,0,0) \
+ XCHAL_SA_REG(s,0,0,0,1,             m1, 4, 4, 4,0x0221,  sr,33 , 32,0,0,0) \
+ XCHAL_SA_REG(s,0,0,0,1,             m2, 4, 4, 4,0x0222,  sr,34 , 32,0,0,0) \
+ XCHAL_SA_REG(s,0,0,0,1,             m3, 4, 4, 4,0x0223,  sr,35 , 32,0,0,0) \
+ XCHAL_SA_REG(s,0,0,0,1,      scompare1, 4, 4, 4,0x020C,  sr,12 , 32,0,0,0) \
+ XCHAL_SA_REG(s,1,2,1,1,      threadptr, 4, 4, 4,0x03E7,  ur,231, 32,0,0,0)
+
+#define XCHAL_CP0_SA_NUM       0
+#define XCHAL_CP0_SA_LIST(s)   /* empty */
+
+#define XCHAL_CP1_SA_NUM       0
+#define XCHAL_CP1_SA_LIST(s)   /* empty */
+
+#define XCHAL_CP2_SA_NUM       0
+#define XCHAL_CP2_SA_LIST(s)   /* empty */
+
+#define XCHAL_CP3_SA_NUM       0
+#define XCHAL_CP3_SA_LIST(s)   /* empty */
+
+#define XCHAL_CP4_SA_NUM       0
+#define XCHAL_CP4_SA_LIST(s)   /* empty */
+
+#define XCHAL_CP5_SA_NUM       0
+#define XCHAL_CP5_SA_LIST(s)   /* empty */
+
+#define XCHAL_CP6_SA_NUM       0
+#define XCHAL_CP6_SA_LIST(s)   /* empty */
+
+#define XCHAL_CP7_SA_NUM       0
+#define XCHAL_CP7_SA_LIST(s)   /* empty */
+
+/* Byte length of instruction from its first nibble (op0 field), per FLIX.  */
+#define XCHAL_OP0_FORMAT_LENGTHS       3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3
+
+#endif /*_XTENSA_CORE_TIE_H*/
+
diff --git a/arch/xtensa/variants/fsf/include/variant/core.h b/arch/xtensa/variants/fsf/include/variant/core.h
new file mode 100644 (file)
index 0000000..2f33760
--- /dev/null
@@ -0,0 +1,359 @@
+/*
+ * Xtensa processor core configuration information.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1999-2006 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CORE_H
+#define _XTENSA_CORE_H
+
+
+/****************************************************************************
+           Parameters Useful for Any Code, USER or PRIVILEGED
+ ****************************************************************************/
+
+/*
+ *  Note:  Macros of the form XCHAL_HAVE_*** have a value of 1 if the option is
+ *  configured, and a value of 0 otherwise.  These macros are always defined.
+ */
+
+
+/*----------------------------------------------------------------------
+                               ISA
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_HAVE_BE                  1       /* big-endian byte ordering */
+#define XCHAL_HAVE_WINDOWED            1       /* windowed registers option */
+#define XCHAL_NUM_AREGS                        64      /* num of physical addr regs */
+#define XCHAL_NUM_AREGS_LOG2           6       /* log2(XCHAL_NUM_AREGS) */
+#define XCHAL_MAX_INSTRUCTION_SIZE     3       /* max instr bytes (3..8) */
+#define XCHAL_HAVE_DEBUG               1       /* debug option */
+#define XCHAL_HAVE_DENSITY             1       /* 16-bit instructions */
+#define XCHAL_HAVE_LOOPS               1       /* zero-overhead loops */
+#define XCHAL_HAVE_NSA                 1       /* NSA/NSAU instructions */
+#define XCHAL_HAVE_MINMAX              0       /* MIN/MAX instructions */
+#define XCHAL_HAVE_SEXT                        0       /* SEXT instruction */
+#define XCHAL_HAVE_CLAMPS              0       /* CLAMPS instruction */
+#define XCHAL_HAVE_MUL16               0       /* MUL16S/MUL16U instructions */
+#define XCHAL_HAVE_MUL32               0       /* MULL instruction */
+#define XCHAL_HAVE_MUL32_HIGH          0       /* MULUH/MULSH instructions */
+#define XCHAL_HAVE_L32R                        1       /* L32R instruction */
+#define XCHAL_HAVE_ABSOLUTE_LITERALS   1       /* non-PC-rel (extended) L32R */
+#define XCHAL_HAVE_CONST16             0       /* CONST16 instruction */
+#define XCHAL_HAVE_ADDX                        1       /* ADDX#/SUBX# instructions */
+#define XCHAL_HAVE_WIDE_BRANCHES       0       /* B*.W18 or B*.W15 instr's */
+#define XCHAL_HAVE_PREDICTED_BRANCHES  0       /* B[EQ/EQZ/NE/NEZ]T instr's */
+#define XCHAL_HAVE_CALL4AND12          1       /* (obsolete option) */
+#define XCHAL_HAVE_ABS                 1       /* ABS instruction */
+/*#define XCHAL_HAVE_POPC              0*/     /* POPC instruction */
+/*#define XCHAL_HAVE_CRC               0*/     /* CRC instruction */
+#define XCHAL_HAVE_RELEASE_SYNC                0       /* L32AI/S32RI instructions */
+#define XCHAL_HAVE_S32C1I              0       /* S32C1I instruction */
+#define XCHAL_HAVE_SPECULATION         0       /* speculation */
+#define XCHAL_HAVE_FULL_RESET          1       /* all regs/state reset */
+#define XCHAL_NUM_CONTEXTS             1       /* */
+#define XCHAL_NUM_MISC_REGS            2       /* num of scratch regs (0..4) */
+#define XCHAL_HAVE_TAP_MASTER          0       /* JTAG TAP control instr's */
+#define XCHAL_HAVE_PRID                        1       /* processor ID register */
+#define XCHAL_HAVE_THREADPTR           1       /* THREADPTR register */
+#define XCHAL_HAVE_BOOLEANS            0       /* boolean registers */
+#define XCHAL_HAVE_CP                  0       /* CPENABLE reg (coprocessor) */
+#define XCHAL_CP_MAXCFG                        0       /* max allowed cp id plus one */
+#define XCHAL_HAVE_MAC16               0       /* MAC16 package */
+#define XCHAL_HAVE_VECTORFPU2005       0       /* vector floating-point pkg */
+#define XCHAL_HAVE_FP                  0       /* floating point pkg */
+#define XCHAL_HAVE_VECTRA1             0       /* Vectra I  pkg */
+#define XCHAL_HAVE_VECTRALX            0       /* Vectra LX pkg */
+#define XCHAL_HAVE_HIFI2               0       /* HiFi2 Audio Engine pkg */
+
+
+/*----------------------------------------------------------------------
+                               MISC
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_NUM_WRITEBUFFER_ENTRIES  4       /* size of write buffer */
+#define XCHAL_INST_FETCH_WIDTH         4       /* instr-fetch width in bytes */
+#define XCHAL_DATA_WIDTH               4       /* data width in bytes */
+/*  In T1050, applies to selected core load and store instructions (see ISA): */
+#define XCHAL_UNALIGNED_LOAD_EXCEPTION 1       /* unaligned loads cause exc. */
+#define XCHAL_UNALIGNED_STORE_EXCEPTION        1       /* unaligned stores cause exc.*/
+
+#define XCHAL_CORE_ID                  "fsf"   /* alphanum core name
+                                                  (CoreID) set in the Xtensa
+                                                  Processor Generator */
+
+#define XCHAL_BUILD_UNIQUE_ID          0x00006700      /* 22-bit sw build ID */
+
+/*
+ *  These definitions describe the hardware targeted by this software.
+ */
+#define XCHAL_HW_CONFIGID0             0xC103C3FF      /* ConfigID hi 32 bits*/
+#define XCHAL_HW_CONFIGID1             0x0C006700      /* ConfigID lo 32 bits*/
+#define XCHAL_HW_VERSION_NAME          "LX2.0.0"       /* full version name */
+#define XCHAL_HW_VERSION_MAJOR         2200    /* major ver# of targeted hw */
+#define XCHAL_HW_VERSION_MINOR         0       /* minor ver# of targeted hw */
+#define XTHAL_HW_REL_LX2               1
+#define XTHAL_HW_REL_LX2_0             1
+#define XTHAL_HW_REL_LX2_0_0           1
+#define XCHAL_HW_CONFIGID_RELIABLE     1
+/*  If software targets a *range* of hardware versions, these are the bounds: */
+#define XCHAL_HW_MIN_VERSION_MAJOR     2200    /* major v of earliest tgt hw */
+#define XCHAL_HW_MIN_VERSION_MINOR     0       /* minor v of earliest tgt hw */
+#define XCHAL_HW_MAX_VERSION_MAJOR     2200    /* major v of latest tgt hw */
+#define XCHAL_HW_MAX_VERSION_MINOR     0       /* minor v of latest tgt hw */
+
+
+/*----------------------------------------------------------------------
+                               CACHE
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_ICACHE_LINESIZE          16      /* I-cache line size in bytes */
+#define XCHAL_DCACHE_LINESIZE          16      /* D-cache line size in bytes */
+#define XCHAL_ICACHE_LINEWIDTH         4       /* log2(I line size in bytes) */
+#define XCHAL_DCACHE_LINEWIDTH         4       /* log2(D line size in bytes) */
+
+#define XCHAL_ICACHE_SIZE              8192    /* I-cache size in bytes or 0 */
+#define XCHAL_DCACHE_SIZE              8192    /* D-cache size in bytes or 0 */
+
+#define XCHAL_DCACHE_IS_WRITEBACK      0       /* writeback feature */
+
+
+
+
+/****************************************************************************
+    Parameters Useful for PRIVILEGED (Supervisory or Non-Virtualized) Code
+ ****************************************************************************/
+
+
+#ifndef XTENSA_HAL_NON_PRIVILEGED_ONLY
+
+/*----------------------------------------------------------------------
+                               CACHE
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_HAVE_PIF                 1       /* any outbound PIF present */
+
+/*  If present, cache size in bytes == (ways * 2^(linewidth + setwidth)).  */
+
+/*  Number of cache sets in log2(lines per way):  */
+#define XCHAL_ICACHE_SETWIDTH          8
+#define XCHAL_DCACHE_SETWIDTH          8
+
+/*  Cache set associativity (number of ways):  */
+#define XCHAL_ICACHE_WAYS              2
+#define XCHAL_DCACHE_WAYS              2
+
+/*  Cache features:  */
+#define XCHAL_ICACHE_LINE_LOCKABLE     0
+#define XCHAL_DCACHE_LINE_LOCKABLE     0
+#define XCHAL_ICACHE_ECC_PARITY                0
+#define XCHAL_DCACHE_ECC_PARITY                0
+
+/*  Number of encoded cache attr bits (see <xtensa/hal.h> for decoded bits):  */
+#define XCHAL_CA_BITS                  4
+
+
+/*----------------------------------------------------------------------
+                       INTERNAL I/D RAM/ROMs and XLMI
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_NUM_INSTROM              0       /* number of core instr. ROMs */
+#define XCHAL_NUM_INSTRAM              0       /* number of core instr. RAMs */
+#define XCHAL_NUM_DATAROM              0       /* number of core data ROMs */
+#define XCHAL_NUM_DATARAM              0       /* number of core data RAMs */
+#define XCHAL_NUM_URAM                 0       /* number of core unified RAMs*/
+#define XCHAL_NUM_XLMI                 0       /* number of core XLMI ports */
+
+
+/*----------------------------------------------------------------------
+                       INTERRUPTS and TIMERS
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_HAVE_INTERRUPTS          1       /* interrupt option */
+#define XCHAL_HAVE_HIGHPRI_INTERRUPTS  1       /* med/high-pri. interrupts */
+#define XCHAL_HAVE_NMI                 0       /* non-maskable interrupt */
+#define XCHAL_HAVE_CCOUNT              1       /* CCOUNT reg. (timer option) */
+#define XCHAL_NUM_TIMERS               3       /* number of CCOMPAREn regs */
+#define XCHAL_NUM_INTERRUPTS           17      /* number of interrupts */
+#define XCHAL_NUM_INTERRUPTS_LOG2      5       /* ceil(log2(NUM_INTERRUPTS)) */
+#define XCHAL_NUM_EXTINTERRUPTS                10      /* num of external interrupts */
+#define XCHAL_NUM_INTLEVELS            4       /* number of interrupt levels
+                                                  (not including level zero) */
+#define XCHAL_EXCM_LEVEL               1       /* level masked by PS.EXCM */
+       /* (always 1 in XEA1; levels 2 .. EXCM_LEVEL are "medium priority") */
+
+/*  Masks of interrupts at each interrupt level:  */
+#define XCHAL_INTLEVEL1_MASK           0x000064F9
+#define XCHAL_INTLEVEL2_MASK           0x00008902
+#define XCHAL_INTLEVEL3_MASK           0x00011204
+#define XCHAL_INTLEVEL4_MASK           0x00000000
+#define XCHAL_INTLEVEL5_MASK           0x00000000
+#define XCHAL_INTLEVEL6_MASK           0x00000000
+#define XCHAL_INTLEVEL7_MASK           0x00000000
+
+/*  Masks of interrupts at each range 1..n of interrupt levels:  */
+#define XCHAL_INTLEVEL1_ANDBELOW_MASK  0x000064F9
+#define XCHAL_INTLEVEL2_ANDBELOW_MASK  0x0000EDFB
+#define XCHAL_INTLEVEL3_ANDBELOW_MASK  0x0001FFFF
+#define XCHAL_INTLEVEL4_ANDBELOW_MASK  0x0001FFFF
+#define XCHAL_INTLEVEL5_ANDBELOW_MASK  0x0001FFFF
+#define XCHAL_INTLEVEL6_ANDBELOW_MASK  0x0001FFFF
+#define XCHAL_INTLEVEL7_ANDBELOW_MASK  0x0001FFFF
+
+/*  Level of each interrupt:  */
+#define XCHAL_INT0_LEVEL               1
+#define XCHAL_INT1_LEVEL               2
+#define XCHAL_INT2_LEVEL               3
+#define XCHAL_INT3_LEVEL               1
+#define XCHAL_INT4_LEVEL               1
+#define XCHAL_INT5_LEVEL               1
+#define XCHAL_INT6_LEVEL               1
+#define XCHAL_INT7_LEVEL               1
+#define XCHAL_INT8_LEVEL               2
+#define XCHAL_INT9_LEVEL               3
+#define XCHAL_INT10_LEVEL              1
+#define XCHAL_INT11_LEVEL              2
+#define XCHAL_INT12_LEVEL              3
+#define XCHAL_INT13_LEVEL              1
+#define XCHAL_INT14_LEVEL              1
+#define XCHAL_INT15_LEVEL              2
+#define XCHAL_INT16_LEVEL              3
+#define XCHAL_DEBUGLEVEL               4       /* debug interrupt level */
+#define XCHAL_HAVE_DEBUG_EXTERN_INT    0       /* OCD external db interrupt */
+
+/*  Type of each interrupt:  */
+#define XCHAL_INT0_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT1_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT2_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT3_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT4_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT5_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT6_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
+#define XCHAL_INT7_TYPE        XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT8_TYPE        XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT9_TYPE        XTHAL_INTTYPE_EXTERN_EDGE
+#define XCHAL_INT10_TYPE       XTHAL_INTTYPE_TIMER
+#define XCHAL_INT11_TYPE       XTHAL_INTTYPE_TIMER
+#define XCHAL_INT12_TYPE       XTHAL_INTTYPE_TIMER
+#define XCHAL_INT13_TYPE       XTHAL_INTTYPE_SOFTWARE
+#define XCHAL_INT14_TYPE       XTHAL_INTTYPE_SOFTWARE
+#define XCHAL_INT15_TYPE       XTHAL_INTTYPE_SOFTWARE
+#define XCHAL_INT16_TYPE       XTHAL_INTTYPE_SOFTWARE
+
+/*  Masks of interrupts for each type of interrupt:  */
+#define XCHAL_INTTYPE_MASK_UNCONFIGURED        0xFFFE0000
+#define XCHAL_INTTYPE_MASK_SOFTWARE    0x0001E000
+#define XCHAL_INTTYPE_MASK_EXTERN_EDGE 0x00000380
+#define XCHAL_INTTYPE_MASK_EXTERN_LEVEL        0x0000007F
+#define XCHAL_INTTYPE_MASK_TIMER       0x00001C00
+#define XCHAL_INTTYPE_MASK_NMI         0x00000000
+#define XCHAL_INTTYPE_MASK_WRITE_ERROR 0x00000000
+
+/*  Interrupt numbers assigned to specific interrupt sources:  */
+#define XCHAL_TIMER0_INTERRUPT         10      /* CCOMPARE0 */
+#define XCHAL_TIMER1_INTERRUPT         11      /* CCOMPARE1 */
+#define XCHAL_TIMER2_INTERRUPT         12      /* CCOMPARE2 */
+#define XCHAL_TIMER3_INTERRUPT         XTHAL_TIMER_UNCONFIGURED
+
+/*  Interrupt numbers for levels at which only one interrupt is configured:  */
+/*  (There are many interrupts each at level(s) 1, 2, 3.)  */
+
+
+/*
+ *  External interrupt vectors/levels.
+ *  These macros describe how Xtensa processor interrupt numbers
+ *  (as numbered internally, eg. in INTERRUPT and INTENABLE registers)
+ *  map to external BInterrupt<n> pins, for those interrupts
+ *  configured as external (level-triggered, edge-triggered, or NMI).
+ *  See the Xtensa processor databook for more details.
+ */
+
+/*  Core interrupt numbers mapped to each EXTERNAL interrupt number:  */
+#define XCHAL_EXTINT0_NUM              0       /* (intlevel 1) */
+#define XCHAL_EXTINT1_NUM              1       /* (intlevel 2) */
+#define XCHAL_EXTINT2_NUM              2       /* (intlevel 3) */
+#define XCHAL_EXTINT3_NUM              3       /* (intlevel 1) */
+#define XCHAL_EXTINT4_NUM              4       /* (intlevel 1) */
+#define XCHAL_EXTINT5_NUM              5       /* (intlevel 1) */
+#define XCHAL_EXTINT6_NUM              6       /* (intlevel 1) */
+#define XCHAL_EXTINT7_NUM              7       /* (intlevel 1) */
+#define XCHAL_EXTINT8_NUM              8       /* (intlevel 2) */
+#define XCHAL_EXTINT9_NUM              9       /* (intlevel 3) */
+
+
+/*----------------------------------------------------------------------
+                       EXCEPTIONS and VECTORS
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_XEA_VERSION              2       /* Xtensa Exception Architecture
+                                                  number: 1 == XEA1 (old)
+                                                          2 == XEA2 (new)
+                                                          0 == XEAX (extern) */
+#define XCHAL_HAVE_XEA1                        0       /* Exception Architecture 1 */
+#define XCHAL_HAVE_XEA2                        1       /* Exception Architecture 2 */
+#define XCHAL_HAVE_XEAX                        0       /* External Exception Arch. */
+#define XCHAL_HAVE_EXCEPTIONS          1       /* exception option */
+#define XCHAL_HAVE_MEM_ECC_PARITY      0       /* local memory ECC/parity */
+
+#define XCHAL_RESET_VECTOR_VADDR       0xFE000020
+#define XCHAL_RESET_VECTOR_PADDR       0xFE000020
+#define XCHAL_USER_VECTOR_VADDR                0xD0000220
+#define XCHAL_USER_VECTOR_PADDR                0x00000220
+#define XCHAL_KERNEL_VECTOR_VADDR      0xD0000200
+#define XCHAL_KERNEL_VECTOR_PADDR      0x00000200
+#define XCHAL_DOUBLEEXC_VECTOR_VADDR   0xD0000290
+#define XCHAL_DOUBLEEXC_VECTOR_PADDR   0x00000290
+#define XCHAL_WINDOW_VECTORS_VADDR     0xD0000000
+#define XCHAL_WINDOW_VECTORS_PADDR     0x00000000
+#define XCHAL_INTLEVEL2_VECTOR_VADDR   0xD0000240
+#define XCHAL_INTLEVEL2_VECTOR_PADDR   0x00000240
+#define XCHAL_INTLEVEL3_VECTOR_VADDR   0xD0000250
+#define XCHAL_INTLEVEL3_VECTOR_PADDR   0x00000250
+#define XCHAL_INTLEVEL4_VECTOR_VADDR   0xFE000520
+#define XCHAL_INTLEVEL4_VECTOR_PADDR   0xFE000520
+#define XCHAL_DEBUG_VECTOR_VADDR       XCHAL_INTLEVEL4_VECTOR_VADDR
+#define XCHAL_DEBUG_VECTOR_PADDR       XCHAL_INTLEVEL4_VECTOR_PADDR
+
+
+/*----------------------------------------------------------------------
+                               DEBUG
+  ----------------------------------------------------------------------*/
+
+#define XCHAL_HAVE_OCD                 1       /* OnChipDebug option */
+#define XCHAL_NUM_IBREAK               2       /* number of IBREAKn regs */
+#define XCHAL_NUM_DBREAK               2       /* number of DBREAKn regs */
+#define XCHAL_HAVE_OCD_DIR_ARRAY       1       /* faster OCD option */
+
+
+/*----------------------------------------------------------------------
+                               MMU
+  ----------------------------------------------------------------------*/
+
+/*  See <xtensa/config/core-matmap.h> header file for more details.  */
+
+#define XCHAL_HAVE_TLBS                        1       /* inverse of HAVE_CACHEATTR */
+#define XCHAL_HAVE_SPANNING_WAY                0       /* one way maps I+D 4GB vaddr */
+#define XCHAL_HAVE_IDENTITY_MAP                0       /* vaddr == paddr always */
+#define XCHAL_HAVE_CACHEATTR           0       /* CACHEATTR register present */
+#define XCHAL_HAVE_MIMIC_CACHEATTR     0       /* region protection */
+#define XCHAL_HAVE_XLT_CACHEATTR       0       /* region prot. w/translation */
+#define XCHAL_HAVE_PTP_MMU             1       /* full MMU (with page table
+                                                  [autorefill] and protection)
+                                                  usable for an MMU-based OS */
+/*  If none of the above last 4 are set, it's a custom TLB configuration.  */
+#define XCHAL_ITLB_ARF_ENTRIES_LOG2    2       /* log2(autorefill way size) */
+#define XCHAL_DTLB_ARF_ENTRIES_LOG2    2       /* log2(autorefill way size) */
+
+#define XCHAL_MMU_ASID_BITS            8       /* number of bits in ASIDs */
+#define XCHAL_MMU_RINGS                        4       /* number of rings (1..4) */
+#define XCHAL_MMU_RING_BITS            2       /* num of bits in RING field */
+
+#endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
+
+
+#endif /* _XTENSA_CORE_CONFIGURATION_H */
+
diff --git a/arch/xtensa/variants/fsf/include/variant/tie-asm.h b/arch/xtensa/variants/fsf/include/variant/tie-asm.h
new file mode 100644 (file)
index 0000000..68a73bf
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * This header file contains assembly-language definitions (assembly
+ * macros, etc.) for this specific Xtensa processor's TIE extensions
+ * and options.  It is customized to this Xtensa processor configuration.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1999-2008 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CORE_TIE_ASM_H
+#define _XTENSA_CORE_TIE_ASM_H
+
+/*  Selection parameter values for save-area save/restore macros:  */
+/*  Option vs. TIE:  */
+#define XTHAL_SAS_TIE  0x0001  /* custom extension or coprocessor */
+#define XTHAL_SAS_OPT  0x0002  /* optional (and not a coprocessor) */
+/*  Whether used automatically by compiler:  */
+#define XTHAL_SAS_NOCC 0x0004  /* not used by compiler w/o special opts/code */
+#define XTHAL_SAS_CC   0x0008  /* used by compiler without special opts/code */
+/*  ABI handling across function calls:  */
+#define XTHAL_SAS_CALR 0x0010  /* caller-saved */
+#define XTHAL_SAS_CALE 0x0020  /* callee-saved */
+#define XTHAL_SAS_GLOB 0x0040  /* global across function calls (in thread) */
+/*  Misc  */
+#define XTHAL_SAS_ALL  0xFFFF  /* include all default NCP contents */
+
+
+
+/* Macro to save all non-coprocessor (extra) custom TIE and optional state
+ * (not including zero-overhead loop registers).
+ * Save area ptr (clobbered):  ptr  (1 byte aligned)
+ * Scratch regs  (clobbered):  at1..at4  (only first XCHAL_NCP_NUM_ATMPS needed)
+ */
+       .macro xchal_ncp_store  ptr at1 at2 at3 at4  continue=0 ofs=-1 select=XTHAL_SAS_ALL
+       xchal_sa_start  \continue, \ofs
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
+       rur     \at1, THREADPTR         // threadptr option
+       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
+       .endif
+       .endm   // xchal_ncp_store
+
+/* Macro to save all non-coprocessor (extra) custom TIE and optional state
+ * (not including zero-overhead loop registers).
+ * Save area ptr (clobbered):  ptr  (1 byte aligned)
+ * Scratch regs  (clobbered):  at1..at4  (only first XCHAL_NCP_NUM_ATMPS needed)
+ */
+       .macro xchal_ncp_load  ptr at1 at2 at3 at4  continue=0 ofs=-1 select=XTHAL_SAS_ALL
+       xchal_sa_start  \continue, \ofs
+       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
+       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
+       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
+       wur     \at1, THREADPTR         // threadptr option
+       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
+       .endif
+       .endm   // xchal_ncp_load
+
+
+
+#define XCHAL_NCP_NUM_ATMPS    1
+
+
+#define XCHAL_SA_NUM_ATMPS     1
+
+#endif /*_XTENSA_CORE_TIE_ASM_H*/
+
diff --git a/arch/xtensa/variants/fsf/include/variant/tie.h b/arch/xtensa/variants/fsf/include/variant/tie.h
new file mode 100644 (file)
index 0000000..bf40201
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * This header file describes this specific Xtensa processor's TIE extensions
+ * that extend basic Xtensa core functionality.  It is customized to this
+ * Xtensa processor configuration.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1999-2007 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_CORE_TIE_H
+#define _XTENSA_CORE_TIE_H
+
+#define XCHAL_CP_NUM                   0       /* number of coprocessors */
+#define XCHAL_CP_MAX                   0       /* max CP ID + 1 (0 if none) */
+#define XCHAL_CP_MASK                  0x00    /* bitmask of all CPs by ID */
+#define XCHAL_CP_PORT_MASK             0x00    /* bitmask of only port CPs */
+
+/*  Basic parameters of each coprocessor:  */
+#define XCHAL_CP7_NAME                 "XTIOP"
+#define XCHAL_CP7_IDENT                        XTIOP
+#define XCHAL_CP7_SA_SIZE              0       /* size of state save area */
+#define XCHAL_CP7_SA_ALIGN             1       /* min alignment of save area */
+#define XCHAL_CP_ID_XTIOP              7       /* coprocessor ID (0..7) */
+
+/*  Filler info for unassigned coprocessors, to simplify arrays etc:  */
+#define XCHAL_NCP_SA_SIZE              0
+#define XCHAL_NCP_SA_ALIGN             1
+#define XCHAL_CP0_SA_SIZE              0
+#define XCHAL_CP0_SA_ALIGN             1
+#define XCHAL_CP1_SA_SIZE              0
+#define XCHAL_CP1_SA_ALIGN             1
+#define XCHAL_CP2_SA_SIZE              0
+#define XCHAL_CP2_SA_ALIGN             1
+#define XCHAL_CP3_SA_SIZE              0
+#define XCHAL_CP3_SA_ALIGN             1
+#define XCHAL_CP4_SA_SIZE              0
+#define XCHAL_CP4_SA_ALIGN             1
+#define XCHAL_CP5_SA_SIZE              0
+#define XCHAL_CP5_SA_ALIGN             1
+#define XCHAL_CP6_SA_SIZE              0
+#define XCHAL_CP6_SA_ALIGN             1
+
+/*  Save area for non-coprocessor optional and custom (TIE) state:  */
+#define XCHAL_NCP_SA_SIZE              0
+#define XCHAL_NCP_SA_ALIGN             1
+
+/*  Total save area for optional and custom state (NCP + CPn):  */
+#define XCHAL_TOTAL_SA_SIZE            0       /* with 16-byte align padding */
+#define XCHAL_TOTAL_SA_ALIGN           1       /* actual minimum alignment */
+
+#define XCHAL_NCP_SA_NUM       0
+#define XCHAL_NCP_SA_LIST(s)
+#define XCHAL_CP0_SA_NUM       0
+#define XCHAL_CP0_SA_LIST(s)
+#define XCHAL_CP1_SA_NUM       0
+#define XCHAL_CP1_SA_LIST(s)
+#define XCHAL_CP2_SA_NUM       0
+#define XCHAL_CP2_SA_LIST(s)
+#define XCHAL_CP3_SA_NUM       0
+#define XCHAL_CP3_SA_LIST(s)
+#define XCHAL_CP4_SA_NUM       0
+#define XCHAL_CP4_SA_LIST(s)
+#define XCHAL_CP5_SA_NUM       0
+#define XCHAL_CP5_SA_LIST(s)
+#define XCHAL_CP6_SA_NUM       0
+#define XCHAL_CP6_SA_LIST(s)
+#define XCHAL_CP7_SA_NUM       0
+#define XCHAL_CP7_SA_LIST(s)
+
+/* Byte length of instruction from its first nibble (op0 field), per FLIX.  */
+#define XCHAL_OP0_FORMAT_LENGTHS       3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3
+
+#endif /*_XTENSA_CORE_TIE_H*/
+
index 63a17b55b39b713a667f82c33afe6ad935f0b6b6..7a0f4aa4fa1e355919301ccfb2bd82e4fac6e21b 100644 (file)
@@ -20,7 +20,7 @@
  *
  *
  * ACPI based HotPlug driver that supports Memory Hotplug
- * This driver fields notifications from firmare for memory add
+ * This driver fields notifications from firmware for memory add
  * and remove operations and alerts the VM of the affected memory
  * ranges.
  */
index 5d438c32989d892be3d41b08e738c167ff1ad3c2..a7dc87ecee37c8a1ca742d5f7870f9d72494390f 100644 (file)
@@ -404,7 +404,7 @@ acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc,
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Construct an union acpi_operand_object of type def_field and
+ * DESCRIPTION: Construct a union acpi_operand_object of type def_field and
  *              connect it to the parent Node.
  *
  ******************************************************************************/
index 89571b92a52279258812e7cc6f93ad5024acc28b..60e8c47128e956140eab026923cc7c937363df4f 100644 (file)
@@ -146,7 +146,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
 
        stack_desc = *stack_ptr;
 
-       /* This is an union acpi_operand_object    */
+       /* This is a union acpi_operand_object    */
 
        switch (ACPI_GET_OBJECT_TYPE(stack_desc)) {
        case ACPI_TYPE_LOCAL_REFERENCE:
index 3318df4cbd989191fc46de95e3cbd209ccf0f525..1c118ba78adbd657dc0f22f40dad33bd8b7391e9 100644 (file)
@@ -274,7 +274,7 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
  *
  * PARAMETERS:  *source_desc        - Value to be stored
  *              *dest_desc          - Where to store it.  Must be an NS node
- *                                    or an union acpi_operand_object of type
+ *                                    or a union acpi_operand_object of type
  *                                    Reference;
  *              walk_state          - Current walk state
  *
index c0bbfa2c419319f92d9f561a98afe0eabb296971..08b8d73e6ee56e47b11086cd2812d37237b04ebd 100644 (file)
@@ -124,7 +124,7 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer,
  *
  * FUNCTION:    acpi_rs_create_pci_routing_table
  *
- * PARAMETERS:  package_object          - Pointer to an union acpi_operand_object
+ * PARAMETERS:  package_object          - Pointer to a union acpi_operand_object
  *                                        package
  *              output_buffer           - Pointer to the user's buffer
  *
index c354e7a42bcde3ea4168ea0a0107a4b9ccfa358d..4bef3cfbaccb909bc3131b94b4546953682e4a62 100644 (file)
@@ -297,7 +297,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)
  *
  * RETURN:      TRUE if object is valid, FALSE otherwise
  *
- * DESCRIPTION: Validate a pointer to be an union acpi_operand_object
+ * DESCRIPTION: Validate a pointer to be a union acpi_operand_object
  *
  ******************************************************************************/
 
@@ -389,7 +389,7 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object)
 {
        ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object);
 
-       /* Object must be an union acpi_operand_object    */
+       /* Object must be a union acpi_operand_object    */
 
        if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) {
                ACPI_ERROR((AE_INFO,
index d8e8c49c0cbd195ec1b16d39f5b9d01a556f0fea..8f006f96ff53f8bea61a7d1b153fd16e0b2957e2 100644 (file)
@@ -54,7 +54,7 @@ config FIRMWARE_IN_KERNEL
          such firmware, and do not wish to use an initrd.
 
          This single option controls the inclusion of firmware for
-         every driver which uses request_firmare() and ships its
+         every driver which uses request_firmware() and ships its
          firmware in the kernel source tree, to avoid a proliferation
          of 'Include firmware for xxx device' options.
 
index 39ad820b2350b651437513080d3afbbc478be0fe..af7c13ca949377da39751cb78df840b21de7ff32 100644 (file)
@@ -769,7 +769,7 @@ static int pc_open(struct tty_struct *tty, struct file *filp)
        /* Check status of board configured in system.  */
 
        /*
-        * I check to see if the epca_setup routine detected an user error. It
+        * I check to see if the epca_setup routine detected a user error. It
         * might be better to put this in pc_init, but for the moment it goes
         * here.
         */
index 5f076aef74fa96d95959f84931d6ac42974d8b01..a8c8d9c19d740d4686e312be1ebbf1f4b15967e3 100644 (file)
@@ -83,7 +83,7 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE
        select CPU_FREQ_GOV_USERSPACE
        help
          Use the CPUFreq governor 'userspace' as default. This allows
-         you to set the CPU frequency manually or when an userspace 
+         you to set the CPU frequency manually or when a userspace 
          program shall be able to set the CPU dynamically without having
          to enable the userspace governor manually.
 
@@ -138,7 +138,7 @@ config CPU_FREQ_GOV_USERSPACE
        tristate "'userspace' governor for userspace frequency scaling"
        help
          Enable this cpufreq governor when you either want to set the
-         CPU frequency manually or when an userspace program shall
+         CPU frequency manually or when a userspace program shall
          be able to set the CPU dynamically, like on LART 
          <http://www.lartmaker.nl/>.
 
index 6a98f9f572b04f1033cbbf20dc27bf36747d3f7e..d73eea382ab3879c93a0c74db2833d47ead87f6f 100644 (file)
@@ -874,12 +874,14 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
        INIT_LIST_HEAD(&hiddev->list);
        spin_lock_init(&hiddev->list_lock);
        mutex_init(&hiddev->existancelock);
+       hid->hiddev = hiddev;
        hiddev->hid = hid;
        hiddev->exist = 1;
 
        retval = usb_register_dev(usbhid->intf, &hiddev_class);
        if (retval) {
                err_hid("Not able to get a minor for this device.");
+               hid->hiddev = NULL;
                kfree(hiddev);
                return -1;
        } else {
index 96717036893376dd47ae06134af682e439640b0d..8b2d756595d90db48ca8191d9ee917aadb6318a5 100644 (file)
@@ -75,7 +75,7 @@ static const u8 FSCHMD_REG_VOLT[3] = { 0x45, 0x42, 0x48 };
 
 /* minimum pwm at which the fan is driven (pwm can by increased depending on
    the temp. Notice that for the scy some fans share there minimum speed.
-   Also notice that with the scy the sensor order is different then with the
+   Also notice that with the scy the sensor order is different than with the
    other chips, this order was in the 2.4 driver and kept for consistency. */
 static const u8 FSCHMD_REG_FAN_MIN[5][6] = {
        { 0x55, 0x65 },                                 /* pos */
index a3c5af1d7ec0afa72ae6d5f64bfaa21ee90e00ad..de5263beab4a721a8c261b8c8403996bb54e26b8 100644 (file)
@@ -367,7 +367,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
                if (err)
                        goto out;
        } else {
-               /* Can't be smaller then the number of outstanding CQEs */
+               /* Can't be smaller than the number of outstanding CQEs */
                outst_cqe = mlx4_ib_get_outstanding_cqes(cq);
                if (entries < outst_cqe + 1) {
                        err = 0;
index f6e9f39a527b63d8d80b3b0448850090285b05ed..c3c8b9bc40ae6220f46a8dba295f8a87c7e1e6e3 100644 (file)
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(extra, "Enable extra LEDs and keys on IBM RapidAcces, EzKey and
 
 /*
  * Scancode to keycode tables. These are just the default setting, and
- * are loadable via an userland utility.
+ * are loadable via a userland utility.
  */
 
 static const unsigned short atkbd_set2_keycode[512] = {
index 4342e77814b57e3b30f9ef9b4276440f7d7756de..fa67d782c3c395d213813a033963f8161203530c 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
+#include <linux/workqueue.h>
 #include <linux/mfd/da903x.h>
 
 #define DA9034_MANUAL_CTRL     0x50
index b52659620d509a2ada42d856a05ec3ad05b81d12..173cf55c64d0ffb4680c77f9a5ceb8a5d1930037 100644 (file)
@@ -138,7 +138,7 @@ config PMAC_BACKLIGHT
          Say Y here to enable Macintosh specific extensions of the generic
          backlight code. With this enabled, the brightness keys on older
          PowerBooks will be enabled so you can change the screen brightness.
-         Newer models should use an userspace daemon like pbbuttonsd.
+         Newer models should use a userspace daemon like pbbuttonsd.
 
 config PMAC_BACKLIGHT_LEGACY
        bool "Provide legacy ioctl's on /dev/pmu for the backlight"
index 1bcdbbb9e7d39853015153cab1a4315a4f23c832..3d45817e6dcda66c3f132ac024c4ede18f919cc6 100644 (file)
@@ -390,7 +390,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
  *     @i2o_dev: the I2O device which was added
  *
  *     If a I2O device is added we catch the notification, because I2O classes
- *     other then SCSI peripheral will not be received through
+ *     other than SCSI peripheral will not be received through
  *     i2o_scsi_probe().
  */
 static void i2o_scsi_notify_device_add(struct i2o_device *i2o_dev)
index fda6a4d3bf23381be7dc24d77d7ca1c40ad60efc..68a0a5b9479519c140456cafcbca5471c106b5a1 100644 (file)
@@ -50,7 +50,7 @@ static void wake_up_event_readers(struct service_processor *sp)
  * Store the event in the circular event buffer, wake up any sleeping
  * event readers.
  * There is no reader marker in the buffer, therefore readers are
- * responsible for keeping up with the writer, or they will loose events.
+ * responsible for keeping up with the writer, or they will lose events.
  */
 void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size)
 {
index abdebe347383903d93f43e59365a76ef2b6db48f..fa57b67593ae5b884c42a9ae7e7704084c905004 100644 (file)
@@ -6,7 +6,7 @@
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
- *  You need an userspace library to cooperate with this driver. It (and other
+ *  You need a userspace library to cooperate with this driver. It (and other
  *  info) may be obtained here:
  *  http://www.fi.muni.cz/~xslaby/phantom.html
  *  or alternatively, you might use OpenHaptics provided by Sensable.
index 7a3f2436b0119f5a6ae49c65bf39bef0bc1fb286..1e97916914adf9b596f7dc17795979cf47b3ceff 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/stat.h>
 
 #include <linux/mmc/host.h>
+#include <linux/atmel-mci.h>
 
-#include <asm/atmel-mci.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
 
index d38bca64bb1500c93c18641ebb5d29e3749e3c41..d2fd550f7e09d291c257ab092abdf11e3ba6f36c 100644 (file)
@@ -34,7 +34,7 @@
  *     aperture size, not the dram size, and the V370PDC supplies no
  *     other method for memory size discovery.  This problem is
  *     mostly only relevant when compiled as a module, as the
- *     unloading of the module with an aperture size smaller then
+ *     unloading of the module with an aperture size smaller than
  *     the ram will cause the driver to detect the onboard memory
  *     size to be equal to the aperture size when the module is
  *     reloaded.  Soooo, to help, the module supports an msize
index 048a606cebde26018893ab87863b8440f4da5367..25def348e5ba9f93324ce1f9765af5fcf17c7807 100644 (file)
@@ -717,7 +717,7 @@ write_error:
  * to the real data size, although the @buf buffer has to contain the
  * alignment. In all other cases, @len has to be aligned.
  *
- * It is prohibited to write more then once to logical eraseblocks of static
+ * It is prohibited to write more than once to logical eraseblocks of static
  * volumes. This function returns zero in case of success and a negative error
  * code in case of failure.
  */
index a74118c05745f000fe317689a8b4824506a4f28d..fe81039f2a7c722b2b1b21bcacfc40f64cd11bed 100644 (file)
@@ -465,7 +465,7 @@ out:
  * This function synchronously erases physical eraseblock @pnum. If @torture
  * flag is not zero, the physical eraseblock is checked by means of writing
  * different patterns to it and reading them back. If the torturing is enabled,
- * the physical eraseblock is erased more then once.
+ * the physical eraseblock is erased more than once.
  *
  * This function returns the number of erasures made in case of success, %-EIO
  * if the erasure failed or the torturing test failed, and other negative error
index 41d47e1cf15c23f8c36423ae3caa4a0e2091e245..ecde202a5a12f21705731be7564ce3f2e36d9fd0 100644 (file)
@@ -478,7 +478,7 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
                        return 0;
                } else {
                        /*
-                        * This logical eraseblock is older then the one found
+                        * This logical eraseblock is older than the one found
                         * previously.
                         */
                        if (cmp_res & 4)
index 2ad94040905322528d9d36ec4edadeae15e086a8..8419fdccc79cbcbdadb639b8188c65eab18bd468 100644 (file)
@@ -135,7 +135,7 @@ enum {
  * The erase counter header takes 64 bytes and has a plenty of unused space for
  * future usage. The unused fields are zeroed. The @version field is used to
  * indicate the version of UBI implementation which is supposed to be able to
- * work with this UBI image. If @version is greater then the current UBI
+ * work with this UBI image. If @version is greater than the current UBI
  * version, the image is rejected. This may be useful in future if something
  * is changed radically. This field is duplicated in the volume identifier
  * header.
@@ -187,7 +187,7 @@ struct ubi_ec_hdr {
  * (sequence number) is used to distinguish between older and newer versions of
  * logical eraseblocks.
  *
- * There are 2 situations when there may be more then one physical eraseblock
+ * There are 2 situations when there may be more than one physical eraseblock
  * corresponding to the same logical eraseblock, i.e., having the same @vol_id
  * and @lnum values in the volume identifier header. Suppose we have a logical
  * eraseblock L and it is mapped to the physical eraseblock P.
index 333c8941552fbe3067be1a9a40fd3c0f704386ad..1afc61e7455dbfc1f4e78dceb4d0991e630e86b6 100644 (file)
@@ -577,7 +577,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
                if (vtbl[i].flags & UBI_VTBL_AUTORESIZE_FLG) {
                        /* Auto re-size flag may be set only for one volume */
                        if (ubi->autoresize_vol_id != -1) {
-                               ubi_err("more then one auto-resize volume (%d "
+                               ubi_err("more than one auto-resize volume (%d "
                                        "and %d)", ubi->autoresize_vol_id, i);
                                kfree(vol);
                                return -EINVAL;
index 14901cb82c184fb49d1c08e1713843df0171e7f5..891534f8210d595f2eea3a2b5d3a22e17facdce7 100644 (file)
  * situation when the picked physical eraseblock is constantly erased after the
  * data is written to it. So, we have a constant which limits the highest erase
  * counter of the free physical eraseblock to pick. Namely, the WL sub-system
- * does not pick eraseblocks with erase counter greater then the lowest erase
+ * does not pick eraseblocks with erase counter greater than the lowest erase
  * counter plus %WL_FREE_MAX_DIFF.
  */
 #define WL_FREE_MAX_DIFF (2*UBI_WL_THRESHOLD)
@@ -917,7 +917,7 @@ static int ensure_wear_leveling(struct ubi_device *ubi)
                /*
                 * We schedule wear-leveling only if the difference between the
                 * lowest erase counter of used physical eraseblocks and a high
-                * erase counter of free physical eraseblocks is greater then
+                * erase counter of free physical eraseblocks is greater than
                 * %UBI_WL_THRESHOLD.
                 */
                e1 = rb_entry(rb_first(&ubi->used), struct ubi_wl_entry, u.rb);
index 67de94f1f30e10c38beee7cfc0e3bdf2a5715962..fefa6ab130644b44df9ba4f87b46feb5dc35bd21 100644 (file)
@@ -3359,7 +3359,7 @@ static u8 bnx2x_format_ver(u32 num, u8 *str, u16 len)
        u8 shift = 8*4;
        u8 digit;
        if (len < 10) {
-               /* Need more then 10chars for this format */
+               /* Need more than 10chars for this format */
                *str_ptr = '\0';
                return -EINVAL;
        }
index d04eef53571e209bd0f49dafce91d89f759ccaf7..e1a3fc1303ee9c52d7a3098f1b94e60b230ac210 100644 (file)
@@ -6758,7 +6758,7 @@ static s32 e1000_get_cable_length(struct e1000_hw *hw, u16 *min_length,
  * returns: - E1000_ERR_XXX
  *            E1000_SUCCESS
  *
- * For phy's older then IGP, this function simply reads the polarity bit in the
+ * For phy's older than IGP, this function simply reads the polarity bit in the
  * Phy Status register.  For IGP phy's, this bit is valid only if link speed is
  * 10 Mbps.  If the link speed is 100 Mbps there is no polarity so this bit will
  * return 0.  If the link speed is 1000 Mbps the polarity status is in the
@@ -6834,7 +6834,7 @@ static s32 e1000_check_polarity(struct e1000_hw *hw,
  * returns: - E1000_ERR_XXX
  *            E1000_SUCCESS
  *
- * For phy's older then IGP, this function reads the Downshift bit in the Phy
+ * For phy's older than IGP, this function reads the Downshift bit in the Phy
  * Specific Status register.  For IGP phy's, it reads the Downgrade bit in the
  * Link Health register.  In IGP this bit is latched high, so the driver must
  * read it immediately after link is established.
index 853e0f6ec710f021df133da8199ba852733d2272..9ea5c11287d26594f8daee415b7b65239a9ed33e 100644 (file)
@@ -75,7 +75,7 @@ struct slip {
   unsigned long         tx_errors;      /* Planned stuff                */
   unsigned long         rx_dropped;     /* No memory for skb            */
   unsigned long         tx_dropped;     /* When MTU change              */
-  unsigned long         rx_over_errors; /* Frame bigger then SLIP buf.  */
+  unsigned long         rx_over_errors; /* Frame bigger than SLIP buf.  */
 #ifdef SL_INCLUDE_CSLIP
   unsigned long                tx_compressed;
   unsigned long                rx_compressed;
index a10a83a11d9fb07a02d10d2f8b1fad1f13c26a71..a7a4dc4d6313c1403794435a14b99a83f8029505 100644 (file)
@@ -1004,7 +1004,7 @@ static inline void bdx_rxdb_free_elem(struct rxdb *db, int n)
  * skb for rx. It assumes that Rx is desabled in HW
  * funcs are grouped for better cache usage
  *
- * RxD fifo is smaller then RxF fifo by design. Upon high load, RxD will be
+ * RxD fifo is smaller than RxF fifo by design. Upon high load, RxD will be
  * filled and packets will be dropped by nic without getting into host or
  * cousing interrupt. Anyway, in that condition, host has no chance to proccess
  * all packets, but dropping in nic is cheaper, since it takes 0 cpu cycles
@@ -1826,7 +1826,7 @@ static void bdx_tx_free(struct bdx_priv *priv)
  *
  * Pushes desc to TxD fifo and overlaps it if needed.
  * NOTE: this func does not check for available space. this is responsibility
- *    of the caller. Neither does it check that data size is smaller then
+ *    of the caller. Neither does it check that data size is smaller than
  *    fifo size.
  */
 static void bdx_tx_push_desc(struct bdx_priv *priv, void *data, int size)
index a011666342ffb62af52bdea2a8eba09980ee777f..50eb29ce3c87c5388ffa6be35e99f29b09147584 100644 (file)
@@ -3064,7 +3064,7 @@ static int smctr_load_node_addr(struct net_device *dev)
  * will consequently cause a timeout.
  *
  * NOTE 1: If the monitor_state is MS_BEACON_TEST_STATE, all transmit
- * queues other then the one used for the lobe_media_test should be
+ * queues other than the one used for the lobe_media_test should be
  * disabled.!?
  *
  * NOTE 2: If the monitor_state is MS_BEACON_TEST_STATE and the receive_mask
index 350157fcd080ae0bec9cc9734d7e65b05897caa0..4223672c4432a5784befad643e91b0f74e41cbb2 100644 (file)
@@ -3836,7 +3836,7 @@ static int reset_atmel_card(struct net_device *dev)
           This routine is also responsible for initialising some
           hardware-specific fields in the atmel_private structure,
           including a copy of the firmware's hostinfo stucture
-          which is the route into the rest of the firmare datastructures. */
+          which is the route into the rest of the firmware datastructures. */
 
        struct atmel_private *priv = netdev_priv(dev);
        u8 configuration;
index 1667065b86a7568b7212a26fb25d76924564ad21..823c2bf5e31efeacde5f3f2a1bbce9a6d70ea924 100644 (file)
@@ -1332,7 +1332,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv)
                       IPW_AUX_HOST_RESET_REG_STOP_MASTER);
 
        /* Step 2. Wait for stop Master Assert
-        *         (not more then 50us, otherwise ret error */
+        *         (not more than 50us, otherwise ret error */
        i = 5;
        do {
                udelay(IPW_WAIT_RESET_MASTER_ASSERT_COMPLETE_DELAY);
@@ -1830,7 +1830,7 @@ static void ipw2100_down(struct ipw2100_priv *priv)
                cancel_delayed_work(&priv->rf_kill);
        }
 
-       /* Kill the firmare hang check timer */
+       /* Kill the firmware hang check timer */
        if (!priv->stop_hang_check) {
                priv->stop_hang_check = 1;
                cancel_delayed_work(&priv->hang_check);
index 37ad0d2fb64c46c0210d17ee5f8fb4462187ad60..aee9cba13eb3c3e97ea816841d0ed84059b3fbca 100644 (file)
@@ -184,8 +184,8 @@ void rt2x00crypto_rx_insert_iv(struct sk_buff *skb, unsigned int align,
         * Make room for new data, note that we increase both
         * headsize and tailsize when required. The tailsize is
         * only needed when ICV data needs to be inserted and
-        * the padding is smaller then the ICV data.
-        * When alignment requirements is greater then the
+        * the padding is smaller than the ICV data.
+        * When alignment requirements is greater than the
         * ICV data we must trim the skb to the correct size
         * because we need to remove the extra bytes.
         */
index dd0de3a9ed4eef2f479b5a36aead3d580ba50d81..7015f2480550faf6145cb175780217538e6a5a88 100644 (file)
@@ -236,7 +236,7 @@ struct strip {
        unsigned long tx_errors;        /* Planned stuff                */
        unsigned long rx_dropped;       /* No memory for skb            */
        unsigned long tx_dropped;       /* When MTU change              */
-       unsigned long rx_over_errors;   /* Frame bigger then STRIP buf. */
+       unsigned long rx_over_errors;   /* Frame bigger than STRIP buf. */
 
        unsigned long pps_timer;        /* Timer to determine pps       */
        unsigned long rx_pps_count;     /* Counter to determine pps     */
index 23a07fe15a2c0faec10ee342043cba1b00030c73..0b6b7730c716ba19187607253fc782f7daa3f321 100644 (file)
@@ -630,7 +630,7 @@ ds1511_rtc_init(void)
  static void __exit
 ds1511_rtc_exit(void)
 {
-       return platform_driver_unregister(&ds1511_rtc_driver);
+       platform_driver_unregister(&ds1511_rtc_driver);
 }
 
 module_init(ds1511_rtc_init);
index dc0b6224ad9b5991e7f3a3e614276f14b2ea71e4..7d1547b0070e9027ef57fdc4a780b89f636413ee 100644 (file)
@@ -399,7 +399,7 @@ static __init int stk17ta8_init(void)
 
 static __exit void stk17ta8_exit(void)
 {
-       return platform_driver_unregister(&stk17ta8_rtc_driver);
+       platform_driver_unregister(&stk17ta8_rtc_driver);
 }
 
 module_init(stk17ta8_init);
index 892e2878d61b94a41ad036a750077a43c158db10..f8e05ce98621d41155ab9952bc5abfe6b0d192ac 100644 (file)
@@ -535,8 +535,8 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
            eerb->buffer_page_count > INT_MAX / PAGE_SIZE) {
                kfree(eerb);
                MESSAGE(KERN_WARNING, "can't open device since module "
-                       "parameter eer_pages is smaller then 1 or"
-                       " bigger then %d", (int)(INT_MAX / PAGE_SIZE));
+                       "parameter eer_pages is smaller than 1 or"
+                       " bigger than %d", (int)(INT_MAX / PAGE_SIZE));
                unlock_kernel();
                return -EINVAL;
        }
index aabbeb909cc6d4f2f18ba6b960073ee59b921145..d8a2289fcb699c8f501d510340b90bf43051a03f 100644 (file)
@@ -427,7 +427,7 @@ static int vmlogrdr_receive_data(struct vmlogrdr_priv_t *priv)
                        buffer = priv->buffer + sizeof(int);
                }
                /*
-                * If the record is bigger then our buffer, we receive only
+                * If the record is bigger than our buffer, we receive only
                 * a part of it. We can get the rest later.
                 */
                if (iucv_data_count > NET_BUFFER_SIZE)
@@ -437,7 +437,7 @@ static int vmlogrdr_receive_data(struct vmlogrdr_priv_t *priv)
                                          0, buffer, iucv_data_count,
                                          &priv->residual_length);
                spin_unlock_bh(&priv->priv_lock);
-               /* An rc of 5 indicates that the record was bigger then
+               /* An rc of 5 indicates that the record was bigger than
                 * the buffer, which is OK for us. A 9 indicates that the
                 * record was purged befor we could receive it.
                 */
index 3c298c7253eece8e742d7b9373357096f4561530..964769f66eac98e9bc4ef8423a9e99d112323739 100644 (file)
@@ -633,7 +633,7 @@ static int orc_device_reset(struct orc_host * host, struct scsi_cmnd *cmd, unsig
                return FAILED;
        }
 
-       /* Reset device is handled by the firmare, we fill in an SCB and
+       /* Reset device is handled by the firmware, we fill in an SCB and
           fire it at the controller, it does the rest */
        scb->opcode = ORC_BUSDEVRST;
        scb->target = target;
index 8c64494444bfc39769aba75384e72847fdbcdb57..311ed6dea726b49638bdcdf3d8193f4642797b56 100644 (file)
@@ -1964,10 +1964,10 @@ lpfc_set_disctmo(struct lpfc_vport *vport)
        uint32_t tmo;
 
        if (vport->port_state == LPFC_LOCAL_CFG_LINK) {
-               /* For FAN, timeout should be greater then edtov */
+               /* For FAN, timeout should be greater than edtov */
                tmo = (((phba->fc_edtov + 999) / 1000) + 1);
        } else {
-               /* Normal discovery timeout should be > then ELS/CT timeout
+               /* Normal discovery timeout should be > than ELS/CT timeout
                 * FC spec states we need 3 * ratov for CT requests
                 */
                tmo = ((phba->fc_ratov * 3) + 3);
index 01dfdc8696f8a430180be91d414817acf4ade009..a36a120561e24c37913fc11140fc5d53d8fad9c6 100644 (file)
@@ -420,7 +420,7 @@ lpfc_sli_next_iocb_slot (struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
                if (unlikely(pring->local_getidx >= max_cmd_idx)) {
                        lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
                                        "0315 Ring %d issue: portCmdGet %d "
-                                       "is bigger then cmd ring %d\n",
+                                       "is bigger than cmd ring %d\n",
                                        pring->ringno,
                                        pring->local_getidx, max_cmd_idx);
 
@@ -1628,12 +1628,12 @@ lpfc_sli_rsp_pointers_error(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
 {
        struct lpfc_pgp *pgp = &phba->port_gp[pring->ringno];
        /*
-        * Ring <ringno> handler: portRspPut <portRspPut> is bigger then
+        * Ring <ringno> handler: portRspPut <portRspPut> is bigger than
         * rsp ring <portRspMax>
         */
        lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
                        "0312 Ring %d handler: portRspPut %d "
-                       "is bigger then rsp ring %d\n",
+                       "is bigger than rsp ring %d\n",
                        pring->ringno, le32_to_cpu(pgp->rspPutInx),
                        pring->numRiocb);
 
@@ -2083,12 +2083,12 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba *phba,
        portRspPut = le32_to_cpu(pgp->rspPutInx);
        if (portRspPut >= portRspMax) {
                /*
-                * Ring <ringno> handler: portRspPut <portRspPut> is bigger then
+                * Ring <ringno> handler: portRspPut <portRspPut> is bigger than
                 * rsp ring <portRspMax>
                 */
                lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
                                "0303 Ring %d handler: portRspPut %d "
-                               "is bigger then rsp ring %d\n",
+                               "is bigger than rsp ring %d\n",
                                pring->ringno, portRspPut, portRspMax);
 
                phba->link_state = LPFC_HBA_ERROR;
index 7dc62deb4087cead7dfeed562cc3e9bc4a5c9011..9fdcd60c5493a53aee595a10eb3b47819c40c157 100644 (file)
@@ -1967,8 +1967,8 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
                        scb->state |= aor;
 
                        /*
-                        * Check if this command has firmare owenership. If
-                        * yes, we cannot reset this command. Whenever, f/w
+                        * Check if this command has firmware ownership. If
+                        * yes, we cannot reset this command. Whenever f/w
                         * completes this command, we will return appropriate
                         * status from ISR.
                         */
index 8cb9240596ab5fc5d95c47bdbc2b7e5001ef9e06..df09820e8916353b47316a9404ed6deb633f1492 100644 (file)
        - Integrate ql12160_set_target_parameters() with 1280 version
        - Make qla1280_setup() non static
        - Do not call qla1280_check_for_dead_scsi_bus() on every I/O request
-         sent to the card - this command pauses the firmare!!!
+         sent to the card - this command pauses the firmware!!!
     Rev  3.23.15 Beta March 19, 2002, Jes Sorensen
        - Clean up qla1280.h - remove obsolete QL_DEBUG_LEVEL_x definitions
        - Remove a pile of pointless and confusing (srb_t **) and
@@ -659,7 +659,7 @@ static int qla1280_read_nvram(struct scsi_qla_host *ha)
        /* The firmware interface is, um, interesting, in that the
         * actual firmware image on the chip is little endian, thus,
         * the process of taking that image to the CPU would end up
-        * little endian.  However, the firmare interface requires it
+        * little endian.  However, the firmware interface requires it
         * to be read a word (two bytes) at a time.
         *
         * The net result of this would be that the word (and
index c577d79bd7e8676faa222b6a1e1b9eaf7fc122a2..051b0f5e8c8e88cc53494ac9d1922af9e2150541 100644 (file)
@@ -392,7 +392,7 @@ int qla4xxx_get_firmware_status(struct scsi_qla_host * ha)
                ha->iocb_hiwat -= IOCB_HIWAT_CUSHION;
        else
                dev_info(&ha->pdev->dev, "WARNING!!!  You have less than %d "
-                          "firmare IOCBs available (%d).\n",
+                          "firmware IOCBs available (%d).\n",
                           IOCB_HIWAT_CUSHION, ha->iocb_hiwat);
 
        return QLA_SUCCESS;
index 381838ebd4604ece9bf95c56f0a1000bcca668ae..d86ebea9350a3e7065dd718a592067886ab923aa 100644 (file)
@@ -1650,7 +1650,7 @@ int scsi_error_handler(void *data)
         * We use TASK_INTERRUPTIBLE so that the thread is not
         * counted against the load average as a running process.
         * We never actually get interrupted because kthread_run
-        * disables singal delivery for the created thread.
+        * disables signal delivery for the created thread.
         */
        set_current_state(TASK_INTERRUPTIBLE);
        while (!kthread_should_stop()) {
index daa00567bc44115577ff012cac16985c2957b66f..1889a63ebc2293cdcaa2b1f403f41ea142caf6af 100644 (file)
@@ -3123,7 +3123,7 @@ static int __init serial8250_init(void)
        if (nr_uarts > UART_NR)
                nr_uarts = UART_NR;
 
-       printk(KERN_INFO "Serial: 8250/16550 driver"
+       printk(KERN_INFO "Serial: 8250/16550 driver"
                "%d ports, IRQ sharing %sabled\n", nr_uarts,
                share_irqs ? "en" : "dis");
 
index 8b2c619a09f2f05efb586552567e3b94d637fa72..e642c22c80e230f8ad5da30a69b9512838cc34b9 100644 (file)
@@ -1203,7 +1203,7 @@ static void e100_disable_txdma_channel(struct e100_serial *info)
        unsigned long flags;
 
        /* Disable output DMA channel for the serial port in question
-        * ( set to something other then serialX)
+        * ( set to something other than serialX)
         */
        local_irq_save(flags);
        DFLOW(DEBUG_LOG(info->line, "disable_txdma_channel %i\n", info->line));
@@ -1266,7 +1266,7 @@ static void e100_disable_rxdma_channel(struct e100_serial *info)
        unsigned long flags;
 
        /* Disable input DMA channel for the serial port in question
-        * ( set to something other then serialX)
+        * ( set to something other than serialX)
         */
        local_irq_save(flags);
        if (info->line == 0) {
index 686795e97195b41ac7c5d08bde5ded95989e6b31..c7080d497311df9b15784ce3108c6e00d6b94d7c 100644 (file)
@@ -387,7 +387,7 @@ int i1480_usb_probe(struct usb_interface *iface, const struct usb_device_id *id)
                goto error_create;
        }
 
-       /* setup the fops and upload the firmare */
+       /* setup the fops and upload the firmware */
        i1480->pre_fw_name = "i1480-pre-phy-0.0.bin";
        i1480->mac_fw_name = "i1480-usb-0.0.bin";
        i1480->mac_fw_name_deprecate = "ptc-0.0.bin";
index e6210725b9ab59615958db9796b8b301297ce1bd..d012edda6d118641e74fd9e74f39b115526cecf1 100644 (file)
@@ -1332,7 +1332,7 @@ static void vgacon_save_screen(struct vc_data *c)
                c->vc_y = screen_info.orig_y;
        }
 
-       /* We can't copy in more then the size of the video buffer,
+       /* We can't copy in more than the size of the video buffer,
         * or we'll be copying in VGA BIOS */
 
        if (!vga_is_gfx)
index ab2f57e3fb87b025668c20a5cfe66b378d7fdf5b..e563a6449811f2efd1c13206a2b69e87b17d81a5 100644 (file)
@@ -1,6 +1,6 @@
 config GFS2_FS
        tristate "GFS2 file system support"
-       depends on EXPERIMENTAL && (64BIT || (LSF && LBD))
+       depends on EXPERIMENTAL && (64BIT || LBD)
        select FS_POSIX_ACL
        select CRC32
        help
index 6e4ea36c6605af6300bbe4854497ca7f4dacd8fc..4ddab67867eb273553b6afbf0a42399f56c51735 100644 (file)
@@ -675,6 +675,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
                goto out_trans_fail;
 
        error = -ENOMEM;
+       flags |= AOP_FLAG_NOFS;
        page = grab_cache_page_write_begin(mapping, index, flags);
        *pagep = page;
        if (unlikely(!page))
index 289c5f54ba539bc1e5421c90d236091a841dd68f..93fe41b67f9749ed6ed901943ab1e7ae0808eb00 100644 (file)
@@ -342,7 +342,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page)
        struct gfs2_inode *ip = GFS2_I(inode);
        struct gfs2_sbd *sdp = GFS2_SB(inode);
        unsigned long last_index;
-       u64 pos = page->index << (PAGE_CACHE_SIZE - inode->i_blkbits);
+       u64 pos = page->index << PAGE_CACHE_SHIFT;
        unsigned int data_blocks, ind_blocks, rblocks;
        int alloc_required = 0;
        struct gfs2_holder gh;
index 6d04e050c74ed89ab7f4bbb18c28d40e002bb904..f54360f50a9c752cbf7d0bcba6eefca5e6c95268 100644 (file)
@@ -98,7 +98,7 @@ struct compat_ncp_objectname_ioctl
 {
        s32             auth_type;
        u32             object_name_len;
-       compat_caddr_t  object_name;    /* an userspace data, in most cases user name */
+       compat_caddr_t  object_name;    /* a userspace data, in most cases user name */
 };
 
 struct compat_ncp_fs_info_v2 {
index 6ebaa58e2c03a1b4b237ceb1179b3c26607e7c4d..04697ba7f73e6be8ef79904b6f21e70b70ccb287 100644 (file)
@@ -854,7 +854,7 @@ static int o2hb_thread(void *data)
 
        while (!kthread_should_stop() && !reg->hr_unclean_stop) {
                /* We track the time spent inside
-                * o2hb_do_disk_heartbeat so that we avoid more then
+                * o2hb_do_disk_heartbeat so that we avoid more than
                 * hr_timeout_ms between disk writes. On busy systems
                 * this should result in a heartbeat which is less
                 * likely to time itself out. */
index 219bd79ea894f656d57f29c9b4527c41363ab3d1..d4a8be32b902279a3f2c84b1d4d137636dd3f7de 100644 (file)
@@ -9,7 +9,7 @@
 
 /*
  * Logic: we've got two memory sums for each process, "shared", and
- * "non-shared". Shared memory may get counted more then once, for
+ * "non-shared". Shared memory may get counted more than once, for
  * each process that owns it. Non-shared memory is counted
  * accurately.
  */
index 91ceeda7e5bfef28dffb6c04329e203cdf1d5688..e35b54d5059d16226f8931fc4ed942218e5cffab 100644 (file)
@@ -40,7 +40,7 @@ config UBIFS_FS_ZLIB
        depends on UBIFS_FS
        default y
        help
-         Zlib copresses better then LZO but it is slower. Say 'Y' if unsure.
+         Zlib compresses better than LZO but it is slower. Say 'Y' if unsure.
 
 # Debugging-related stuff
 config UBIFS_FS_DEBUG
index 0e5e54d829243afba459b97a72a303aad6654e00..175f9c590b7717cbe0fc8170683a7edc9a602611 100644 (file)
@@ -142,7 +142,7 @@ static long long get_liability(struct ubifs_info *c)
  *
  * This function is called when an operation cannot be budgeted because there
  * is supposedly no free space. But in most cases there is some free space:
- *   o budgeting is pessimistic, so it always budgets more then it is actually
+ *   o budgeting is pessimistic, so it always budgets more than it is actually
  *     needed, so shrinking the liability is one way to make free space - the
  *     cached data will take less space then it was budgeted for;
  *   o GC may turn some dark space into free space (budgeting treats dark space
@@ -606,7 +606,7 @@ void ubifs_release_budget(struct ubifs_info *c, struct ubifs_budget_req *req)
  * @c: UBIFS file-system description object
  *
  * This function converts budget which was allocated for a new page of data to
- * the budget of changing an existing page of data. The latter is smaller then
+ * the budget of changing an existing page of data. The latter is smaller than
  * the former, so this function only does simple re-calculation and does not
  * involve any write-back.
  */
index 0bef6501d58a9f09967ad216df212a5fd88db3e8..9832f9abe28e08af3c444f03bb31b9bc0f84f3db 100644 (file)
@@ -45,7 +45,7 @@
 #define SMALL_NODE_WM  UBIFS_MAX_DENT_NODE_SZ
 
 /*
- * GC may need to move more then one LEB to make progress. The below constants
+ * GC may need to move more than one LEB to make progress. The below constants
  * define "soft" and "hard" limits on the number of LEBs the garbage collector
  * may move.
  */
index 10ae25b7d1dbe4e4ed84c8d6f4d835a3cd40f37c..9b7c54e0cd2ae0379bba6045d0a340a7d10bf1fd 100644 (file)
@@ -191,7 +191,7 @@ again:
        if (wbuf->lnum != -1 && avail >= len) {
                /*
                 * Someone else has switched the journal head and we have
-                * enough space now. This happens when more then one process is
+                * enough space now. This happens when more than one process is
                 * trying to write to the same journal head at the same time.
                 */
                dbg_jnl("return LEB %d back, already have LEB %d:%d",
index f248533841a2df0fb6d4fe3bce4884f5c01f8d02..e7bab52a14106230c419fb6504326dc0b3d1fb7a 100644 (file)
@@ -151,7 +151,7 @@ static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention)
  * @contention: if any contention, this is set to %1
  *
  * This function walks the list of mounted UBIFS file-systems and frees clean
- * znodes which are older then @age, until at least @nr znodes are freed.
+ * znodes which are older than @age, until at least @nr znodes are freed.
  * Returns the number of freed znodes.
  */
 static int shrink_tnc_trees(int nr, int age, int *contention)
index 36f6cc703ef25307f3de486badc7775f299aaad6..be846d606ae80a54686abb5b603d28efbdf247e7 100644 (file)
@@ -1348,7 +1348,7 @@ xfs_finish_flags(
 {
        int                     ronly = (mp->m_flags & XFS_MOUNT_RDONLY);
 
-       /* Fail a mount where the logbuf is smaller then the log stripe */
+       /* Fail a mount where the logbuf is smaller than the log stripe */
        if (xfs_sb_version_haslogv2(&mp->m_sb)) {
                if (mp->m_logbsize <= 0 &&
                    mp->m_sb.sb_logsunit > XLOG_BIG_RECORD_BSIZE) {
index a597207e28352ab4de53a69d9d6eb8d29f6c0a28..1954c9d1d012e516c011acb3ed53b4913678a818 100644 (file)
@@ -333,8 +333,8 @@ struct acpi_integer_overlay {
 #define ACPI_INSERT_BITS(target, mask, source)          target = ((target & (~(mask))) | (source & mask))
 
 /*
- * An struct acpi_namespace_node can appear in some contexts
- * where a pointer to an union acpi_operand_object can also
+ * A struct acpi_namespace_node can appear in some contexts
+ * where a pointer to a union acpi_operand_object can also
  * appear. This macro is used to distinguish them.
  *
  * The "Descriptor" field is the first field in both structures.
index 7220361790b3ce105869e2dddc65c361d27e9d14..8222e8de0d1c71446e7514004a6c0d8ef4ac0e25 100644 (file)
@@ -467,7 +467,7 @@ typedef u32 acpi_object_type;
 
 /*
  * These are special object types that never appear in
- * a Namespace node, only in an union acpi_operand_object
+ * a Namespace node, only in a union acpi_operand_object
  */
 #define ACPI_TYPE_LOCAL_EXTRA           0x1C
 #define ACPI_TYPE_LOCAL_DATA            0x1D
diff --git a/include/asm-xtensa/Kbuild b/include/asm-xtensa/Kbuild
deleted file mode 100644 (file)
index c68e168..0000000
+++ /dev/null
@@ -1 +0,0 @@
-include include/asm-generic/Kbuild.asm
diff --git a/include/asm-xtensa/asmmacro.h b/include/asm-xtensa/asmmacro.h
deleted file mode 100644 (file)
index 76915ca..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * include/asm-xtensa/asmmacro.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_ASMMACRO_H
-#define _XTENSA_ASMMACRO_H
-
-#include <asm/variant/core.h>
-
-/*
- * Some little helpers for loops. Use zero-overhead-loops
- * where applicable and if supported by the processor.
- *
- * __loopi ar, at, size, inc
- *         ar  register initialized with the start address
- *        at   scratch register used by macro
- *        size size immediate value
- *        inc  increment
- *
- * __loops ar, as, at, inc_log2[, mask_log2][, cond][, ncond]
- *        ar   register initialized with the start address
- *        as   register initialized with the size
- *        at   scratch register use by macro
- *        inc_log2     increment [in log2]
- *        mask_log2    mask [in log2]
- *        cond         true condition (used in loop'cond')
- *        ncond        false condition (used in b'ncond')
- *
- * __loop  as
- *        restart loop. 'as' register must not have been modified!
- *
- * __endla ar, at, incr
- *        ar   start address (modified)
- *        as   scratch register used by macro
- *        inc  increment
- */
-
-/*
- * loop for given size as immediate
- */
-
-       .macro  __loopi ar, at, size, incr
-
-#if XCHAL_HAVE_LOOPS
-               movi    \at, ((\size + \incr - 1) / (\incr))
-               loop    \at, 99f
-#else
-               addi    \at, \ar, \size
-               98:
-#endif
-
-       .endm
-
-/*
- * loop for given size in register
- */
-
-       .macro  __loops ar, as, at, incr_log2, mask_log2, cond, ncond
-
-#if XCHAL_HAVE_LOOPS
-               .ifgt \incr_log2 - 1
-                       addi    \at, \as, (1 << \incr_log2) - 1
-                       .ifnc \mask_log2,
-                               extui   \at, \at, \incr_log2, \mask_log2
-                       .else
-                               srli    \at, \at, \incr_log2
-                       .endif
-               .endif
-               loop\cond       \at, 99f
-#else
-               .ifnc \mask_log2,
-                       extui   \at, \as, \incr_log2, \mask_log2
-               .else
-                       .ifnc \ncond,
-                               srli    \at, \as, \incr_log2
-                       .endif
-               .endif
-               .ifnc \ncond,
-                       b\ncond \at, 99f
-
-               .endif
-               .ifnc \mask_log2,
-                       slli    \at, \at, \incr_log2
-                       add     \at, \ar, \at
-               .else
-                       add     \at, \ar, \as
-               .endif
-#endif
-               98:
-
-       .endm
-
-/*
- * loop from ar to ax
- */
-
-       .macro  __loopt ar, as, at, incr_log2
-
-#if XCHAL_HAVE_LOOPS
-               sub     \at, \as, \ar
-               .ifgt   \incr_log2 - 1
-                       addi    \at, \at, (1 << \incr_log2) - 1
-                       srli    \at, \at, \incr_log2
-               .endif
-               loop    \at, 99f
-#else
-               98:
-#endif
-
-       .endm
-
-/*
- * restart loop. registers must be unchanged
- */
-
-       .macro  __loop  as
-
-#if XCHAL_HAVE_LOOPS
-               loop    \as, 99f
-#else
-               98:
-#endif
-
-       .endm
-
-/*
- * end of loop with no increment of the address.
- */
-
-       .macro  __endl  ar, as
-#if !XCHAL_HAVE_LOOPS
-               bltu    \ar, \as, 98b
-#endif
-               99:
-       .endm
-
-/*
- * end of loop with increment of the address.
- */
-
-       .macro  __endla ar, as, incr
-               addi    \ar, \ar, \incr
-               __endl  \ar \as
-       .endm
-
-
-#endif /* _XTENSA_ASMMACRO_H */
diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h
deleted file mode 100644 (file)
index 67ad67b..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * include/asm-xtensa/atomic.h
- *
- * Atomic operations that C can't guarantee us.  Useful for resource counting..
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_ATOMIC_H
-#define _XTENSA_ATOMIC_H
-
-#include <linux/stringify.h>
-#include <linux/types.h>
-
-#ifdef __KERNEL__
-#include <asm/processor.h>
-#include <asm/system.h>
-
-#define ATOMIC_INIT(i) { (i) }
-
-/*
- * This Xtensa implementation assumes that the right mechanism
- * for exclusion is for locking interrupts to level 1.
- *
- * Locking interrupts looks like this:
- *
- *    rsil a15, 1
- *    <code>
- *    wsr  a15, PS
- *    rsync
- *
- * Note that a15 is used here because the register allocation
- * done by the compiler is not guaranteed and a window overflow
- * may not occur between the rsil and wsr instructions. By using
- * a15 in the rsil, the machine is guaranteed to be in a state
- * where no register reference will cause an overflow.
- */
-
-/**
- * atomic_read - read atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically reads the value of @v.
- */
-#define atomic_read(v)         ((v)->counter)
-
-/**
- * atomic_set - set atomic variable
- * @v: pointer of type atomic_t
- * @i: required value
- *
- * Atomically sets the value of @v to @i.
- */
-#define atomic_set(v,i)                ((v)->counter = (i))
-
-/**
- * atomic_add - add integer to atomic variable
- * @i: integer value to add
- * @v: pointer of type atomic_t
- *
- * Atomically adds @i to @v.
- */
-static inline void atomic_add(int i, atomic_t * v)
-{
-    unsigned int vval;
-
-    __asm__ __volatile__(
-       "rsil    a15, "__stringify(LOCKLEVEL)"\n\t"
-       "l32i    %0, %2, 0              \n\t"
-       "add     %0, %0, %1             \n\t"
-       "s32i    %0, %2, 0              \n\t"
-       "wsr     a15, "__stringify(PS)"       \n\t"
-       "rsync                          \n"
-       : "=&a" (vval)
-       : "a" (i), "a" (v)
-       : "a15", "memory"
-       );
-}
-
-/**
- * atomic_sub - subtract the atomic variable
- * @i: integer value to subtract
- * @v: pointer of type atomic_t
- *
- * Atomically subtracts @i from @v.
- */
-static inline void atomic_sub(int i, atomic_t *v)
-{
-    unsigned int vval;
-
-    __asm__ __volatile__(
-       "rsil    a15, "__stringify(LOCKLEVEL)"\n\t"
-       "l32i    %0, %2, 0              \n\t"
-       "sub     %0, %0, %1             \n\t"
-       "s32i    %0, %2, 0              \n\t"
-       "wsr     a15, "__stringify(PS)"       \n\t"
-       "rsync                          \n"
-       : "=&a" (vval)
-       : "a" (i), "a" (v)
-       : "a15", "memory"
-       );
-}
-
-/*
- * We use atomic_{add|sub}_return to define other functions.
- */
-
-static inline int atomic_add_return(int i, atomic_t * v)
-{
-     unsigned int vval;
-
-    __asm__ __volatile__(
-       "rsil    a15,"__stringify(LOCKLEVEL)"\n\t"
-       "l32i    %0, %2, 0             \n\t"
-       "add     %0, %0, %1            \n\t"
-       "s32i    %0, %2, 0             \n\t"
-       "wsr     a15, "__stringify(PS)"      \n\t"
-       "rsync                         \n"
-       : "=&a" (vval)
-       : "a" (i), "a" (v)
-       : "a15", "memory"
-       );
-
-    return vval;
-}
-
-static inline int atomic_sub_return(int i, atomic_t * v)
-{
-    unsigned int vval;
-
-    __asm__ __volatile__(
-       "rsil    a15,"__stringify(LOCKLEVEL)"\n\t"
-       "l32i    %0, %2, 0             \n\t"
-       "sub     %0, %0, %1            \n\t"
-       "s32i    %0, %2, 0             \n\t"
-       "wsr     a15, "__stringify(PS)"       \n\t"
-       "rsync                         \n"
-       : "=&a" (vval)
-       : "a" (i), "a" (v)
-       : "a15", "memory"
-       );
-
-    return vval;
-}
-
-/**
- * atomic_sub_and_test - subtract value from variable and test result
- * @i: integer value to subtract
- * @v: pointer of type atomic_t
- *
- * Atomically subtracts @i from @v and returns
- * true if the result is zero, or false for all
- * other cases.
- */
-#define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0)
-
-/**
- * atomic_inc - increment atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1.
- */
-#define atomic_inc(v) atomic_add(1,(v))
-
-/**
- * atomic_inc - increment atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1.
- */
-#define atomic_inc_return(v) atomic_add_return(1,(v))
-
-/**
- * atomic_dec - decrement atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically decrements @v by 1.
- */
-#define atomic_dec(v) atomic_sub(1,(v))
-
-/**
- * atomic_dec_return - decrement atomic variable
- * @v: pointer of type atomic_t
- *
- * Atomically decrements @v by 1.
- */
-#define atomic_dec_return(v) atomic_sub_return(1,(v))
-
-/**
- * atomic_dec_and_test - decrement and test
- * @v: pointer of type atomic_t
- *
- * Atomically decrements @v by 1 and
- * returns true if the result is 0, or false for all other
- * cases.
- */
-#define atomic_dec_and_test(v) (atomic_sub_return(1,(v)) == 0)
-
-/**
- * atomic_inc_and_test - increment and test
- * @v: pointer of type atomic_t
- *
- * Atomically increments @v by 1
- * and returns true if the result is zero, or false for all
- * other cases.
- */
-#define atomic_inc_and_test(v) (atomic_add_return(1,(v)) == 0)
-
-/**
- * atomic_add_negative - add and test if negative
- * @v: pointer of type atomic_t
- * @i: integer value to add
- *
- * Atomically adds @i to @v and returns true
- * if the result is negative, or false when
- * result is greater than or equal to zero.
- */
-#define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0)
-
-#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
-#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
-
-/**
- * atomic_add_unless - add unless the number is a given value
- * @v: pointer of type atomic_t
- * @a: the amount to add to v...
- * @u: ...unless v is equal to u.
- *
- * Atomically adds @a to @v, so long as it was not @u.
- * Returns non-zero if @v was not @u, and zero otherwise.
- */
-static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
-{
-       int c, old;
-       c = atomic_read(v);
-       for (;;) {
-               if (unlikely(c == (u)))
-                       break;
-               old = atomic_cmpxchg((v), c, c + (a));
-               if (likely(old == c))
-                       break;
-               c = old;
-       }
-       return c != (u);
-}
-
-#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-
-static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
-{
-    unsigned int all_f = -1;
-    unsigned int vval;
-
-    __asm__ __volatile__(
-       "rsil    a15,"__stringify(LOCKLEVEL)"\n\t"
-       "l32i    %0, %2, 0             \n\t"
-       "xor     %1, %4, %3            \n\t"
-       "and     %0, %0, %4            \n\t"
-       "s32i    %0, %2, 0             \n\t"
-       "wsr     a15, "__stringify(PS)"      \n\t"
-       "rsync                         \n"
-       : "=&a" (vval), "=a" (mask)
-       : "a" (v), "a" (all_f), "1" (mask)
-       : "a15", "memory"
-       );
-}
-
-static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
-{
-    unsigned int vval;
-
-    __asm__ __volatile__(
-       "rsil    a15,"__stringify(LOCKLEVEL)"\n\t"
-       "l32i    %0, %2, 0             \n\t"
-       "or      %0, %0, %1            \n\t"
-       "s32i    %0, %2, 0             \n\t"
-       "wsr     a15, "__stringify(PS)"       \n\t"
-       "rsync                         \n"
-       : "=&a" (vval)
-       : "a" (mask), "a" (v)
-       : "a15", "memory"
-       );
-}
-
-/* Atomic operations are already serializing */
-#define smp_mb__before_atomic_dec()    barrier()
-#define smp_mb__after_atomic_dec()     barrier()
-#define smp_mb__before_atomic_inc()    barrier()
-#define smp_mb__after_atomic_inc()     barrier()
-
-#include <asm-generic/atomic.h>
-#endif /* __KERNEL__ */
-
-#endif /* _XTENSA_ATOMIC_H */
-
diff --git a/include/asm-xtensa/auxvec.h b/include/asm-xtensa/auxvec.h
deleted file mode 100644 (file)
index 257dec7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef __XTENSA_AUXVEC_H
-#define __XTENSA_AUXVEC_H
-
-#endif
diff --git a/include/asm-xtensa/bitops.h b/include/asm-xtensa/bitops.h
deleted file mode 100644 (file)
index 6c39303..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * include/asm-xtensa/bitops.h
- *
- * Atomic operations that C can't guarantee us.Useful for resource counting etc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_BITOPS_H
-#define _XTENSA_BITOPS_H
-
-#ifdef __KERNEL__
-
-#ifndef _LINUX_BITOPS_H
-#error only <linux/bitops.h> can be included directly
-#endif
-
-#include <asm/processor.h>
-#include <asm/byteorder.h>
-#include <asm/system.h>
-
-#ifdef CONFIG_SMP
-# error SMP not supported on this architecture
-#endif
-
-#define smp_mb__before_clear_bit()     barrier()
-#define smp_mb__after_clear_bit()      barrier()
-
-#include <asm-generic/bitops/atomic.h>
-#include <asm-generic/bitops/non-atomic.h>
-
-#if XCHAL_HAVE_NSA
-
-static inline unsigned long __cntlz (unsigned long x)
-{
-       int lz;
-       asm ("nsau %0, %1" : "=r" (lz) : "r" (x));
-       return lz;
-}
-
-/*
- * ffz: Find first zero in word. Undefined if no zero exists.
- * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
- */
-
-static inline int ffz(unsigned long x)
-{
-       return 31 - __cntlz(~x & -~x);
-}
-
-/*
- * __ffs: Find first bit set in word. Return 0 for bit 0
- */
-
-static inline int __ffs(unsigned long x)
-{
-       return 31 - __cntlz(x & -x);
-}
-
-/*
- * ffs: Find first bit set in word. This is defined the same way as
- * the libc and compiler builtin ffs routines, therefore
- * differs in spirit from the above ffz (man ffs).
- */
-
-static inline int ffs(unsigned long x)
-{
-       return 32 - __cntlz(x & -x);
-}
-
-/*
- * fls: Find last (most-significant) bit set in word.
- * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
- */
-
-static inline int fls (unsigned int x)
-{
-       return 32 - __cntlz(x);
-}
-
-/**
- * __fls - find last (most-significant) set bit in a long word
- * @word: the word to search
- *
- * Undefined if no set bit exists, so code should check against 0 first.
- */
-static inline unsigned long __fls(unsigned long word)
-{
-       return 31 - __cntlz(word);
-}
-#else
-
-/* Use the generic implementation if we don't have the nsa/nsau instructions. */
-
-# include <asm-generic/bitops/ffs.h>
-# include <asm-generic/bitops/__ffs.h>
-# include <asm-generic/bitops/ffz.h>
-# include <asm-generic/bitops/fls.h>
-# include <asm-generic/bitops/__fls.h>
-
-#endif
-
-#include <asm-generic/bitops/fls64.h>
-#include <asm-generic/bitops/find.h>
-#include <asm-generic/bitops/ext2-non-atomic.h>
-
-#ifdef __XTENSA_EL__
-# define ext2_set_bit_atomic(lock,nr,addr)                             \
-       test_and_set_bit((nr), (unsigned long*)(addr))
-# define ext2_clear_bit_atomic(lock,nr,addr)                           \
-       test_and_clear_bit((nr), (unsigned long*)(addr))
-#elif defined(__XTENSA_EB__)
-# define ext2_set_bit_atomic(lock,nr,addr)                             \
-       test_and_set_bit((nr) ^ 0x18, (unsigned long*)(addr))
-# define ext2_clear_bit_atomic(lock,nr,addr)                           \
-       test_and_clear_bit((nr) ^ 0x18, (unsigned long*)(addr))
-#else
-# error processor byte order undefined!
-#endif
-
-#include <asm-generic/bitops/hweight.h>
-#include <asm-generic/bitops/lock.h>
-#include <asm-generic/bitops/sched.h>
-#include <asm-generic/bitops/minix.h>
-
-#endif /* __KERNEL__ */
-
-#endif /* _XTENSA_BITOPS_H */
diff --git a/include/asm-xtensa/bootparam.h b/include/asm-xtensa/bootparam.h
deleted file mode 100644 (file)
index 9983f2c..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * include/asm-xtensa/bootparam.h
- *
- * Definition of the Linux/Xtensa boot parameter structure
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005  Tensilica Inc.
- *
- * (Concept borrowed from the 68K port)
- */
-
-#ifndef _XTENSA_BOOTPARAM_H
-#define _XTENSA_BOOTPARAM_H
-
-#define BP_VERSION 0x0001
-
-#define BP_TAG_COMMAND_LINE    0x1001  /* command line (0-terminated string)*/
-#define BP_TAG_INITRD          0x1002  /* ramdisk addr and size (bp_meminfo) */
-#define BP_TAG_MEMORY          0x1003  /* memory addr and size (bp_meminfo) */
-#define BP_TAG_SERIAL_BAUSRATE 0x1004  /* baud rate of current console. */
-#define BP_TAG_SERIAL_PORT     0x1005  /* serial device of current console */
-
-#define BP_TAG_FIRST           0x7B0B  /* first tag with a version number */
-#define BP_TAG_LAST            0x7E0B  /* last tag */
-
-#ifndef __ASSEMBLY__
-
-/* All records are aligned to 4 bytes */
-
-typedef struct bp_tag {
-  unsigned short id;           /* tag id */
-  unsigned short size;         /* size of this record excluding the structure*/
-  unsigned long data[0];       /* data */
-} bp_tag_t;
-
-typedef struct meminfo {
-  unsigned long type;
-  unsigned long start;
-  unsigned long end;
-} meminfo_t;
-
-#define SYSMEM_BANKS_MAX 5
-
-#define MEMORY_TYPE_CONVENTIONAL       0x1000
-#define MEMORY_TYPE_NONE               0x2000
-
-typedef struct sysmem_info {
-  int nr_banks;
-  meminfo_t bank[SYSMEM_BANKS_MAX];
-} sysmem_info_t;
-
-extern sysmem_info_t sysmem;
-
-#endif
-#endif
-
-
-
diff --git a/include/asm-xtensa/bug.h b/include/asm-xtensa/bug.h
deleted file mode 100644 (file)
index 3e52d72..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * include/asm-xtensa/bug.h
- *
- * Macros to cause a 'bug' message.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_BUG_H
-#define _XTENSA_BUG_H
-
-#include <asm-generic/bug.h>
-
-#endif /* _XTENSA_BUG_H */
diff --git a/include/asm-xtensa/bugs.h b/include/asm-xtensa/bugs.h
deleted file mode 100644 (file)
index 69b29d1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * include/asm-xtensa/bugs.h
- *
- * This is included by init/main.c to check for architecture-dependent bugs.
- *
- * Xtensa processors don't have any bugs.  :)
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- */
-
-#ifndef _XTENSA_BUGS_H
-#define _XTENSA_BUGS_H
-
-static void check_bugs(void) { }
-
-#endif /* _XTENSA_BUGS_H */
diff --git a/include/asm-xtensa/byteorder.h b/include/asm-xtensa/byteorder.h
deleted file mode 100644 (file)
index 765edf1..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * include/asm-xtensa/byteorder.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_BYTEORDER_H
-#define _XTENSA_BYTEORDER_H
-
-#include <asm/types.h>
-#include <linux/compiler.h>
-
-static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
-{
-    __u32 res;
-    /* instruction sequence from Xtensa ISA release 2/2000 */
-    __asm__("ssai     8           \n\t"
-           "srli     %0, %1, 16  \n\t"
-           "src      %0, %0, %1  \n\t"
-           "src      %0, %0, %0  \n\t"
-           "src      %0, %1, %0  \n"
-           : "=&a" (res)
-           : "a" (x)
-           );
-    return res;
-}
-
-static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x)
-{
-    /* Given that 'short' values are signed (i.e., can be negative),
-     * we cannot assume that the upper 16-bits of the register are
-     * zero.  We are careful to mask values after shifting.
-     */
-
-    /* There exists an anomaly between xt-gcc and xt-xcc.  xt-gcc
-     * inserts an extui instruction after putting this function inline
-     * to ensure that it uses only the least-significant 16 bits of
-     * the result.  xt-xcc doesn't use an extui, but assumes the
-     * __asm__ macro follows convention that the upper 16 bits of an
-     * 'unsigned short' result are still zero.  This macro doesn't
-     * follow convention; indeed, it leaves garbage in the upport 16
-     * bits of the register.
-
-     * Declaring the temporary variables 'res' and 'tmp' to be 32-bit
-     * types while the return type of the function is a 16-bit type
-     * forces both compilers to insert exactly one extui instruction
-     * (or equivalent) to mask off the upper 16 bits. */
-
-    __u32 res;
-    __u32 tmp;
-
-    __asm__("extui    %1, %2, 8, 8\n\t"
-           "slli     %0, %2, 8   \n\t"
-           "or       %0, %0, %1  \n"
-           : "=&a" (res), "=&a" (tmp)
-           : "a" (x)
-           );
-
-    return res;
-}
-
-#define __arch__swab32(x) ___arch__swab32(x)
-#define __arch__swab16(x) ___arch__swab16(x)
-
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-#  define __BYTEORDER_HAS_U64__
-#  define __SWAB_64_THRU_32__
-#endif
-
-#ifdef __XTENSA_EL__
-# include <linux/byteorder/little_endian.h>
-#elif defined(__XTENSA_EB__)
-# include <linux/byteorder/big_endian.h>
-#else
-# error processor byte order undefined!
-#endif
-
-#endif /* _XTENSA_BYTEORDER_H */
diff --git a/include/asm-xtensa/cache.h b/include/asm-xtensa/cache.h
deleted file mode 100644 (file)
index 3bba2a5..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * include/asm-xtensa/cache.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CACHE_H
-#define _XTENSA_CACHE_H
-
-#include <asm/variant/core.h>
-
-#define L1_CACHE_SHIFT XCHAL_DCACHE_LINEWIDTH
-#define L1_CACHE_BYTES XCHAL_DCACHE_LINESIZE
-#define SMP_CACHE_BYTES        L1_CACHE_BYTES
-
-#define DCACHE_WAY_SIZE        (XCHAL_DCACHE_SIZE/XCHAL_DCACHE_WAYS)
-#define ICACHE_WAY_SIZE        (XCHAL_ICACHE_SIZE/XCHAL_ICACHE_WAYS)
-#define DCACHE_WAY_SHIFT (XCHAL_DCACHE_SETWIDTH + XCHAL_DCACHE_LINEWIDTH)
-#define ICACHE_WAY_SHIFT (XCHAL_ICACHE_SETWIDTH + XCHAL_ICACHE_LINEWIDTH)
-
-/* Maximum cache size per way. */
-#if DCACHE_WAY_SIZE >= ICACHE_WAY_SIZE
-# define CACHE_WAY_SIZE DCACHE_WAY_SIZE
-#else
-# define CACHE_WAY_SIZE ICACHE_WAY_SIZE
-#endif
-
-
-#endif /* _XTENSA_CACHE_H */
diff --git a/include/asm-xtensa/cacheasm.h b/include/asm-xtensa/cacheasm.h
deleted file mode 100644 (file)
index 2c20a58..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * include/asm-xtensa/cacheasm.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2006 Tensilica Inc.
- */
-
-#include <asm/cache.h>
-#include <asm/asmmacro.h>
-#include <linux/stringify.h>
-
-/*
- * Define cache functions as macros here so that they can be used
- * by the kernel and boot loader. We should consider moving them to a
- * library that can be linked by both.
- *
- * Locking
- *
- *   ___unlock_dcache_all
- *   ___unlock_icache_all
- *
- * Flush and invaldating
- *
- *   ___flush_invalidate_dcache_{all|range|page}
- *   ___flush_dcache_{all|range|page}
- *   ___invalidate_dcache_{all|range|page}
- *   ___invalidate_icache_{all|range|page}
- *
- */
-
-       .macro  __loop_cache_all ar at insn size line_width
-
-       movi    \ar, 0
-
-       __loopi \ar, \at, \size, (4 << (\line_width))
-       \insn   \ar, 0 << (\line_width)
-       \insn   \ar, 1 << (\line_width)
-       \insn   \ar, 2 << (\line_width)
-       \insn   \ar, 3 << (\line_width)
-       __endla \ar, \at, 4 << (\line_width)
-
-       .endm
-
-
-       .macro  __loop_cache_range ar as at insn line_width
-
-       extui   \at, \ar, 0, \line_width
-       add     \as, \as, \at
-
-       __loops \ar, \as, \at, \line_width
-       \insn   \ar, 0
-       __endla \ar, \at, (1 << (\line_width))
-
-       .endm
-
-
-       .macro  __loop_cache_page ar at insn line_width
-
-       __loopi \ar, \at, PAGE_SIZE, 4 << (\line_width)
-       \insn   \ar, 0 << (\line_width)
-       \insn   \ar, 1 << (\line_width)
-       \insn   \ar, 2 << (\line_width)
-       \insn   \ar, 3 << (\line_width)
-       __endla \ar, \at, 4 << (\line_width)
-
-       .endm
-
-
-#if XCHAL_DCACHE_LINE_LOCKABLE
-
-       .macro  ___unlock_dcache_all ar at
-
-       __loop_cache_all \ar \at diu XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-#endif
-
-#if XCHAL_ICACHE_LINE_LOCKABLE
-
-       .macro  ___unlock_icache_all ar at
-
-       __loop_cache_all \ar \at iiu XCHAL_ICACHE_SIZE XCHAL_ICACHE_LINEWIDTH
-
-       .endm
-#endif
-
-       .macro  ___flush_invalidate_dcache_all ar at
-
-       __loop_cache_all \ar \at diwbi XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro  ___flush_dcache_all ar at
-
-       __loop_cache_all \ar \at diwb XCHAL_DCACHE_SIZE XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro  ___invalidate_dcache_all ar at
-
-       __loop_cache_all \ar \at dii __stringify(DCACHE_WAY_SIZE) \
-                        XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro  ___invalidate_icache_all ar at
-
-       __loop_cache_all \ar \at iii __stringify(ICACHE_WAY_SIZE) \
-                        XCHAL_ICACHE_LINEWIDTH
-
-       .endm
-
-
-
-       .macro  ___flush_invalidate_dcache_range ar as at
-
-       __loop_cache_range \ar \as \at dhwbi XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro  ___flush_dcache_range ar as at
-
-       __loop_cache_range \ar \as \at dhwb XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro  ___invalidate_dcache_range ar as at
-
-       __loop_cache_range \ar \as \at dhi XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro  ___invalidate_icache_range ar as at
-
-       __loop_cache_range \ar \as \at ihi XCHAL_ICACHE_LINEWIDTH
-
-       .endm
-
-
-
-       .macro  ___flush_invalidate_dcache_page ar as
-
-       __loop_cache_page \ar \as dhwbi XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro ___flush_dcache_page ar as
-
-       __loop_cache_page \ar \as dhwb XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro  ___invalidate_dcache_page ar as
-
-       __loop_cache_page \ar \as dhi XCHAL_DCACHE_LINEWIDTH
-
-       .endm
-
-
-       .macro  ___invalidate_icache_page ar as
-
-       __loop_cache_page \ar \as ihi XCHAL_ICACHE_LINEWIDTH
-
-       .endm
-
diff --git a/include/asm-xtensa/cacheflush.h b/include/asm-xtensa/cacheflush.h
deleted file mode 100644 (file)
index 94c4c53..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * include/asm-xtensa/cacheflush.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * (C) 2001 - 2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CACHEFLUSH_H
-#define _XTENSA_CACHEFLUSH_H
-
-#ifdef __KERNEL__
-
-#include <linux/mm.h>
-#include <asm/processor.h>
-#include <asm/page.h>
-
-/*
- * Lo-level routines for cache flushing.
- *
- * invalidate data or instruction cache:
- *
- * __invalidate_icache_all()
- * __invalidate_icache_page(adr)
- * __invalidate_dcache_page(adr)
- * __invalidate_icache_range(from,size)
- * __invalidate_dcache_range(from,size)
- *
- * flush data cache:
- *
- * __flush_dcache_page(adr)
- *
- * flush and invalidate data cache:
- *
- * __flush_invalidate_dcache_all()
- * __flush_invalidate_dcache_page(adr)
- * __flush_invalidate_dcache_range(from,size)
- *
- * specials for cache aliasing:
- *
- * __flush_invalidate_dcache_page_alias(vaddr,paddr)
- * __invalidate_icache_page_alias(vaddr,paddr)
- */
-
-extern void __invalidate_dcache_all(void);
-extern void __invalidate_icache_all(void);
-extern void __invalidate_dcache_page(unsigned long);
-extern void __invalidate_icache_page(unsigned long);
-extern void __invalidate_icache_range(unsigned long, unsigned long);
-extern void __invalidate_dcache_range(unsigned long, unsigned long);
-
-
-#if XCHAL_DCACHE_IS_WRITEBACK
-extern void __flush_invalidate_dcache_all(void);
-extern void __flush_dcache_page(unsigned long);
-extern void __flush_dcache_range(unsigned long, unsigned long);
-extern void __flush_invalidate_dcache_page(unsigned long);
-extern void __flush_invalidate_dcache_range(unsigned long, unsigned long);
-#else
-# define __flush_dcache_range(p,s)             do { } while(0)
-# define __flush_dcache_page(p)                        do { } while(0)
-# define __flush_invalidate_dcache_page(p)     __invalidate_dcache_page(p)
-# define __flush_invalidate_dcache_range(p,s)  __invalidate_dcache_range(p,s)
-#endif
-
-#if (DCACHE_WAY_SIZE > PAGE_SIZE)
-extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long);
-#endif
-#if (ICACHE_WAY_SIZE > PAGE_SIZE)
-extern void __invalidate_icache_page_alias(unsigned long, unsigned long);
-#else
-# define __invalidate_icache_page_alias(v,p)   do { } while(0)
-#endif
-
-/*
- * We have physically tagged caches - nothing to do here -
- * unless we have cache aliasing.
- *
- * Pages can get remapped. Because this might change the 'color' of that page,
- * we have to flush the cache before the PTE is changed.
- * (see also Documentation/cachetlb.txt)
- */
-
-#if (DCACHE_WAY_SIZE > PAGE_SIZE)
-
-#define flush_cache_all()                                              \
-       do {                                                            \
-               __flush_invalidate_dcache_all();                        \
-               __invalidate_icache_all();                              \
-       } while (0)
-
-#define flush_cache_mm(mm)             flush_cache_all()
-#define flush_cache_dup_mm(mm)         flush_cache_mm(mm)
-
-#define flush_cache_vmap(start,end)    flush_cache_all()
-#define flush_cache_vunmap(start,end)  flush_cache_all()
-
-extern void flush_dcache_page(struct page*);
-extern void flush_cache_range(struct vm_area_struct*, ulong, ulong);
-extern void flush_cache_page(struct vm_area_struct*, unsigned long, unsigned long);
-
-#else
-
-#define flush_cache_all()                              do { } while (0)
-#define flush_cache_mm(mm)                             do { } while (0)
-#define flush_cache_dup_mm(mm)                         do { } while (0)
-
-#define flush_cache_vmap(start,end)                    do { } while (0)
-#define flush_cache_vunmap(start,end)                  do { } while (0)
-
-#define flush_dcache_page(page)                                do { } while (0)
-
-#define flush_cache_page(vma,addr,pfn)                 do { } while (0)
-#define flush_cache_range(vma,start,end)               do { } while (0)
-
-#endif
-
-/* Ensure consistency between data and instruction cache. */
-#define flush_icache_range(start,end)                                  \
-       do {                                                            \
-               __flush_dcache_range(start, (end) - (start));           \
-               __invalidate_icache_range(start,(end) - (start));       \
-       } while (0)
-
-/* This is not required, see Documentation/cachetlb.txt */
-#define        flush_icache_page(vma,page)                     do { } while (0)
-
-#define flush_dcache_mmap_lock(mapping)                        do { } while (0)
-#define flush_dcache_mmap_unlock(mapping)              do { } while (0)
-
-#if (DCACHE_WAY_SIZE > PAGE_SIZE)
-
-extern void copy_to_user_page(struct vm_area_struct*, struct page*,
-               unsigned long, void*, const void*, unsigned long);
-extern void copy_from_user_page(struct vm_area_struct*, struct page*,
-               unsigned long, void*, const void*, unsigned long);
-
-#else
-
-#define copy_to_user_page(vma, page, vaddr, dst, src, len)             \
-       do {                                                            \
-               memcpy(dst, src, len);                                  \
-               __flush_dcache_range((unsigned long) dst, len);         \
-               __invalidate_icache_range((unsigned long) dst, len);    \
-       } while (0)
-
-#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
-       memcpy(dst, src, len)
-
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* _XTENSA_CACHEFLUSH_H */
diff --git a/include/asm-xtensa/checksum.h b/include/asm-xtensa/checksum.h
deleted file mode 100644 (file)
index 23534c6..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * include/asm-xtensa/checksum.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CHECKSUM_H
-#define _XTENSA_CHECKSUM_H
-
-#include <linux/in6.h>
-#include <asm/variant/core.h>
-
-/*
- * computes the checksum of a memory block at buff, length len,
- * and adds in "sum" (32-bit)
- *
- * returns a 32-bit number suitable for feeding into itself
- * or csum_tcpudp_magic
- *
- * this function must be called with even lengths, except
- * for the last fragment, which may be odd
- *
- * it's best to have buff aligned on a 32-bit boundary
- */
-asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
-
-/*
- * the same as csum_partial, but copies from src while it
- * checksums, and handles user-space pointer exceptions correctly, when needed.
- *
- * here even more important to align src and dst on a 32-bit (or even
- * better 64-bit) boundary
- */
-
-asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst, int len, __wsum sum,
-                                                  int *src_err_ptr, int *dst_err_ptr);
-
-/*
- *     Note: when you get a NULL pointer exception here this means someone
- *     passed in an incorrect kernel address to one of these functions.
- *
- *     If you use these functions directly please don't forget the access_ok().
- */
-static inline
-__wsum csum_partial_copy_nocheck(const void *src, void *dst,
-                                       int len, __wsum sum)
-{
-       return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL);
-}
-
-static inline
-__wsum csum_partial_copy_from_user(const void __user *src, void *dst,
-                                               int len, __wsum sum, int *err_ptr)
-{
-       return csum_partial_copy_generic((__force const void *)src, dst,
-                                       len, sum, err_ptr, NULL);
-}
-
-/*
- *     Fold a partial checksum
- */
-
-static __inline__ __sum16 csum_fold(__wsum sum)
-{
-       unsigned int __dummy;
-       __asm__("extui  %1, %0, 16, 16\n\t"
-               "extui  %0 ,%0, 0, 16\n\t"
-               "add    %0, %0, %1\n\t"
-               "slli   %1, %0, 16\n\t"
-               "add    %0, %0, %1\n\t"
-               "extui  %0, %0, 16, 16\n\t"
-               "neg    %0, %0\n\t"
-               "addi   %0, %0, -1\n\t"
-               "extui  %0, %0, 0, 16\n\t"
-               : "=r" (sum), "=&r" (__dummy)
-               : "0" (sum));
-       return (__force __sum16)sum;
-}
-
-/*
- *     This is a version of ip_compute_csum() optimized for IP headers,
- *     which always checksum on 4 octet boundaries.
- */
-static __inline__ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
-{
-       unsigned int sum, tmp, endaddr;
-
-       __asm__ __volatile__(
-               "sub            %0, %0, %0\n\t"
-#if XCHAL_HAVE_LOOPS
-               "loopgtz        %2, 2f\n\t"
-#else
-               "beqz           %2, 2f\n\t"
-               "slli           %4, %2, 2\n\t"
-               "add            %4, %4, %1\n\t"
-               "0:\t"
-#endif
-               "l32i           %3, %1, 0\n\t"
-               "add            %0, %0, %3\n\t"
-               "bgeu           %0, %3, 1f\n\t"
-               "addi           %0, %0, 1\n\t"
-               "1:\t"
-               "addi           %1, %1, 4\n\t"
-#if !XCHAL_HAVE_LOOPS
-               "blt            %1, %4, 0b\n\t"
-#endif
-               "2:\t"
-       /* Since the input registers which are loaded with iph and ihl
-          are modified, we must also specify them as outputs, or gcc
-          will assume they contain their original values. */
-               : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), "=&r" (endaddr)
-               : "1" (iph), "2" (ihl));
-
-       return  csum_fold(sum);
-}
-
-static __inline__ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
-                                                  unsigned short len,
-                                                  unsigned short proto,
-                                                  __wsum sum)
-{
-
-#ifdef __XTENSA_EL__
-       unsigned long len_proto = (len + proto) << 8;
-#elif defined(__XTENSA_EB__)
-       unsigned long len_proto = len + proto;
-#else
-# error processor byte order undefined!
-#endif
-       __asm__("add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "add    %0, %0, %2\n\t"
-               "bgeu   %0, %2, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "add    %0, %0, %3\n\t"
-               "bgeu   %0, %3, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               : "=r" (sum), "=r" (len_proto)
-               : "r" (daddr), "r" (saddr), "1" (len_proto), "0" (sum));
-       return sum;
-}
-
-/*
- * computes the checksum of the TCP/UDP pseudo-header
- * returns a 16-bit checksum, already complemented
- */
-static __inline__ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
-                                                      unsigned short len,
-                                                      unsigned short proto,
-                                                      __wsum sum)
-{
-       return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
-}
-
-/*
- * this routine is used for miscellaneous IP-like checksums, mainly
- * in icmp.c
- */
-
-static __inline__ __sum16 ip_compute_csum(const void *buff, int len)
-{
-    return csum_fold (csum_partial(buff, len, 0));
-}
-
-#define _HAVE_ARCH_IPV6_CSUM
-static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
-                                         const struct in6_addr *daddr,
-                                         __u32 len, unsigned short proto,
-                                         __wsum sum)
-{
-       unsigned int __dummy;
-       __asm__("l32i   %1, %2, 0\n\t"
-               "add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "l32i   %1, %2, 4\n\t"
-               "add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "l32i   %1, %2, 8\n\t"
-               "add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "l32i   %1, %2, 12\n\t"
-               "add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "l32i   %1, %3, 0\n\t"
-               "add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "l32i   %1, %3, 4\n\t"
-               "add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "l32i   %1, %3, 8\n\t"
-               "add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "l32i   %1, %3, 12\n\t"
-               "add    %0, %0, %1\n\t"
-               "bgeu   %0, %1, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "add    %0, %0, %4\n\t"
-               "bgeu   %0, %4, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               "add    %0, %0, %5\n\t"
-               "bgeu   %0, %5, 1f\n\t"
-               "addi   %0, %0, 1\n\t"
-               "1:\t"
-               : "=r" (sum), "=&r" (__dummy)
-               : "r" (saddr), "r" (daddr),
-                 "r" (htonl(len)), "r" (htonl(proto)), "0" (sum));
-
-       return csum_fold(sum);
-}
-
-/*
- *     Copy and checksum to user
- */
-#define HAVE_CSUM_COPY_USER
-static __inline__ __wsum csum_and_copy_to_user(const void *src, void __user *dst,
-                                   int len, __wsum sum, int *err_ptr)
-{
-       if (access_ok(VERIFY_WRITE, dst, len))
-               return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);
-
-       if (len)
-               *err_ptr = -EFAULT;
-
-       return (__force __wsum)-1; /* invalid checksum */
-}
-#endif
diff --git a/include/asm-xtensa/coprocessor.h b/include/asm-xtensa/coprocessor.h
deleted file mode 100644 (file)
index 1cbcf90..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * include/asm-xtensa/coprocessor.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2003 - 2007 Tensilica Inc.
- */
-
-
-#ifndef _XTENSA_COPROCESSOR_H
-#define _XTENSA_COPROCESSOR_H
-
-#include <linux/stringify.h>
-#include <asm/variant/tie.h>
-#include <asm/types.h>
-
-#ifdef __ASSEMBLY__
-# include <asm/variant/tie-asm.h>
-
-.macro xchal_sa_start  a b
-       .set .Lxchal_pofs_, 0
-       .set .Lxchal_ofs_, 0
-.endm
-
-.macro xchal_sa_align  ptr minofs maxofs ofsalign totalign
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + .Lxchal_pofs_ + \totalign - 1
-       .set    .Lxchal_ofs_, (.Lxchal_ofs_ & -\totalign) - .Lxchal_pofs_
-.endm
-
-#define _SELECT        (  XTHAL_SAS_TIE | XTHAL_SAS_OPT \
-                | XTHAL_SAS_CC \
-                | XTHAL_SAS_CALR | XTHAL_SAS_CALE )
-
-.macro save_xtregs_opt ptr clb at1 at2 at3 at4 offset
-       .if XTREGS_OPT_SIZE > 0
-               addi    \clb, \ptr, \offset
-               xchal_ncp_store \clb \at1 \at2 \at3 \at4 select=_SELECT
-       .endif
-.endm
-
-.macro load_xtregs_opt ptr clb at1 at2 at3 at4 offset
-       .if XTREGS_OPT_SIZE > 0
-               addi    \clb, \ptr, \offset
-               xchal_ncp_load \clb \at1 \at2 \at3 \at4 select=_SELECT
-       .endif
-.endm
-#undef _SELECT
-
-#define _SELECT        (  XTHAL_SAS_TIE | XTHAL_SAS_OPT \
-                | XTHAL_SAS_NOCC \
-                | XTHAL_SAS_CALR | XTHAL_SAS_CALE | XTHAL_SAS_GLOB )
-
-.macro save_xtregs_user ptr clb at1 at2 at3 at4 offset
-       .if XTREGS_USER_SIZE > 0
-               addi    \clb, \ptr, \offset
-               xchal_ncp_store \clb \at1 \at2 \at3 \at4 select=_SELECT
-       .endif
-.endm
-
-.macro load_xtregs_user ptr clb at1 at2 at3 at4 offset
-       .if XTREGS_USER_SIZE > 0
-               addi    \clb, \ptr, \offset
-               xchal_ncp_load \clb \at1 \at2 \at3 \at4 select=_SELECT
-       .endif
-.endm
-#undef _SELECT
-
-
-
-#endif /* __ASSEMBLY__ */
-
-/*
- * XTENSA_HAVE_COPROCESSOR(x) returns 1 if coprocessor x is configured.
- *
- * XTENSA_HAVE_IO_PORT(x) returns 1 if io-port x is configured.
- *
- */
-
-#define XTENSA_HAVE_COPROCESSOR(x)                                     \
-       ((XCHAL_CP_MASK ^ XCHAL_CP_PORT_MASK) & (1 << (x)))
-#define XTENSA_HAVE_COPROCESSORS                                       \
-       (XCHAL_CP_MASK ^ XCHAL_CP_PORT_MASK)
-#define XTENSA_HAVE_IO_PORT(x)                                         \
-       (XCHAL_CP_PORT_MASK & (1 << (x)))
-#define XTENSA_HAVE_IO_PORTS                                           \
-       XCHAL_CP_PORT_MASK
-
-#ifndef __ASSEMBLY__
-
-
-#if XCHAL_HAVE_CP
-
-#define RSR_CPENABLE(x)        do {                                              \
-       __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \
-       } while(0);
-#define WSR_CPENABLE(x)        do {                                              \
-       __asm__ __volatile__("wsr %0," __stringify(CPENABLE) "; rsync"    \
-                            :: "a" (x));                                 \
-       } while(0);
-
-#endif /* XCHAL_HAVE_CP */
-
-
-/*
- * Additional registers.
- * We define three types of additional registers:
- *  ext: extra registers that are used by the compiler
- *  cpn: optional registers that can be used by a user application
- *  cpX: coprocessor registers that can only be used if the corresponding
- *       CPENABLE bit is set.
- */
-
-#define XCHAL_SA_REG(list,cc,abi,type,y,name,z,align,size,...) \
-       __REG ## list (cc, abi, type, name, size, align)
-
-#define __REG0(cc,abi,t,name,s,a)      __REG0_ ## cc (abi,name)
-#define __REG1(cc,abi,t,name,s,a)      __REG1_ ## cc (name)
-#define __REG2(cc,abi,type,...)                __REG2_ ## type (__VA_ARGS__)
-
-#define __REG0_0(abi,name)
-#define __REG0_1(abi,name)             __REG0_1 ## abi (name)
-#define __REG0_10(name)        __u32 name;
-#define __REG0_11(name)        __u32 name;
-#define __REG0_12(name)
-
-#define __REG1_0(name) __u32 name;
-#define __REG1_1(name)
-
-#define __REG2_0(n,s,a)        __u32 name;
-#define __REG2_1(n,s,a)        unsigned char n[s] __attribute__ ((aligned(a)));
-#define __REG2_2(n,s,a) unsigned char n[s] __attribute__ ((aligned(a)));
-
-typedef struct { XCHAL_NCP_SA_LIST(0) } xtregs_opt_t
-       __attribute__ ((aligned (XCHAL_NCP_SA_ALIGN)));
-typedef struct { XCHAL_NCP_SA_LIST(1) } xtregs_user_t
-       __attribute__ ((aligned (XCHAL_NCP_SA_ALIGN)));
-
-#if XTENSA_HAVE_COPROCESSORS
-
-typedef struct { XCHAL_CP0_SA_LIST(2) } xtregs_cp0_t
-       __attribute__ ((aligned (XCHAL_CP0_SA_ALIGN)));
-typedef struct { XCHAL_CP1_SA_LIST(2) } xtregs_cp1_t
-       __attribute__ ((aligned (XCHAL_CP1_SA_ALIGN)));
-typedef struct { XCHAL_CP2_SA_LIST(2) } xtregs_cp2_t
-       __attribute__ ((aligned (XCHAL_CP2_SA_ALIGN)));
-typedef struct { XCHAL_CP3_SA_LIST(2) } xtregs_cp3_t
-       __attribute__ ((aligned (XCHAL_CP3_SA_ALIGN)));
-typedef struct { XCHAL_CP4_SA_LIST(2) } xtregs_cp4_t
-       __attribute__ ((aligned (XCHAL_CP4_SA_ALIGN)));
-typedef struct { XCHAL_CP5_SA_LIST(2) } xtregs_cp5_t
-       __attribute__ ((aligned (XCHAL_CP5_SA_ALIGN)));
-typedef struct { XCHAL_CP6_SA_LIST(2) } xtregs_cp6_t
-       __attribute__ ((aligned (XCHAL_CP6_SA_ALIGN)));
-typedef struct { XCHAL_CP7_SA_LIST(2) } xtregs_cp7_t
-       __attribute__ ((aligned (XCHAL_CP7_SA_ALIGN)));
-
-extern struct thread_info* coprocessor_owner[XCHAL_CP_MAX];
-extern void coprocessor_save(void*, int);
-extern void coprocessor_load(void*, int);
-extern void coprocessor_flush(struct thread_info*, int);
-extern void coprocessor_restore(struct thread_info*, int);
-
-extern void coprocessor_release_all(struct thread_info*);
-extern void coprocessor_flush_all(struct thread_info*);
-
-static inline void coprocessor_clear_cpenable(void)
-{
-       unsigned long i = 0;
-       WSR_CPENABLE(i);
-}
-
-#endif /* XTENSA_HAVE_COPROCESSORS */
-
-#endif /* !__ASSEMBLY__ */
-#endif /* _XTENSA_COPROCESSOR_H */
diff --git a/include/asm-xtensa/cpumask.h b/include/asm-xtensa/cpumask.h
deleted file mode 100644 (file)
index ebeede3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/cpumask.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CPUMASK_H
-#define _XTENSA_CPUMASK_H
-
-#include <asm-generic/cpumask.h>
-
-#endif /* _XTENSA_CPUMASK_H */
diff --git a/include/asm-xtensa/cputime.h b/include/asm-xtensa/cputime.h
deleted file mode 100644 (file)
index a7fb864..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _XTENSA_CPUTIME_H
-#define _XTENSA_CPUTIME_H
-
-#include <asm-generic/cputime.h>
-
-#endif /* _XTENSA_CPUTIME_H */
diff --git a/include/asm-xtensa/current.h b/include/asm-xtensa/current.h
deleted file mode 100644 (file)
index 8d1eb5d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * include/asm-xtensa/current.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CURRENT_H
-#define _XTENSA_CURRENT_H
-
-#ifndef __ASSEMBLY__
-
-#include <linux/thread_info.h>
-
-struct task_struct;
-
-static inline struct task_struct *get_current(void)
-{
-       return current_thread_info()->task;
-}
-
-#define current get_current()
-
-#else
-
-#define CURRENT_SHIFT 13
-
-#define GET_CURRENT(reg,sp)            \
-       GET_THREAD_INFO(reg,sp);        \
-       l32i reg, reg, TI_TASK          \
-
-#endif
-
-
-#endif /* XTENSA_CURRENT_H */
diff --git a/include/asm-xtensa/delay.h b/include/asm-xtensa/delay.h
deleted file mode 100644 (file)
index e1d8c9e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * include/asm-xtensa/delay.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- *
- */
-
-#ifndef _XTENSA_DELAY_H
-#define _XTENSA_DELAY_H
-
-#include <asm/processor.h>
-#include <asm/param.h>
-
-extern unsigned long loops_per_jiffy;
-
-static inline void __delay(unsigned long loops)
-{
-  /* 2 cycles per loop. */
-  __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b"
-                       : "=r" (loops) : "0" (loops));
-}
-
-static __inline__ u32 xtensa_get_ccount(void)
-{
-       u32 ccount;
-       asm volatile ("rsr %0, 234; # CCOUNT\n" : "=r" (ccount));
-       return ccount;
-}
-
-/* For SMP/NUMA systems, change boot_cpu_data to something like
- * local_cpu_data->... where local_cpu_data points to the current
- * cpu. */
-
-static __inline__ void udelay (unsigned long usecs)
-{
-       unsigned long start = xtensa_get_ccount();
-       unsigned long cycles = usecs * (loops_per_jiffy / (1000000UL / HZ));
-
-       /* Note: all variables are unsigned (can wrap around)! */
-       while (((unsigned long)xtensa_get_ccount()) - start < cycles)
-               ;
-}
-
-#endif
-
diff --git a/include/asm-xtensa/device.h b/include/asm-xtensa/device.h
deleted file mode 100644 (file)
index d8f9872..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Arch specific extensions to struct device
- *
- * This file is released under the GPLv2
- */
-#include <asm-generic/device.h>
-
diff --git a/include/asm-xtensa/div64.h b/include/asm-xtensa/div64.h
deleted file mode 100644 (file)
index f35678c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/div64.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_DIV64_H
-#define _XTENSA_DIV64_H
-
-#include <asm-generic/div64.h>
-
-#endif /* _XTENSA_DIV64_H */
diff --git a/include/asm-xtensa/dma-mapping.h b/include/asm-xtensa/dma-mapping.h
deleted file mode 100644 (file)
index 51882ae..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * include/asm-xtensa/dma-mapping.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2003 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_DMA_MAPPING_H
-#define _XTENSA_DMA_MAPPING_H
-
-#include <asm/cache.h>
-#include <asm/io.h>
-#include <linux/mm.h>
-#include <linux/scatterlist.h>
-
-/*
- * DMA-consistent mapping functions.
- */
-
-extern void *consistent_alloc(int, size_t, dma_addr_t, unsigned long);
-extern void consistent_free(void*, size_t, dma_addr_t);
-extern void consistent_sync(void*, size_t, int);
-
-#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
-#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
-
-void *dma_alloc_coherent(struct device *dev, size_t size,
-                          dma_addr_t *dma_handle, gfp_t flag);
-
-void dma_free_coherent(struct device *dev, size_t size,
-                        void *vaddr, dma_addr_t dma_handle);
-
-static inline dma_addr_t
-dma_map_single(struct device *dev, void *ptr, size_t size,
-              enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-       consistent_sync(ptr, size, direction);
-       return virt_to_phys(ptr);
-}
-
-static inline void
-dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-static inline int
-dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-          enum dma_data_direction direction)
-{
-       int i;
-
-       BUG_ON(direction == DMA_NONE);
-
-       for (i = 0; i < nents; i++, sg++ ) {
-               BUG_ON(!sg_page(sg));
-
-               sg->dma_address = sg_phys(sg);
-               consistent_sync(sg_virt(sg), sg->length, direction);
-       }
-
-       return nents;
-}
-
-static inline dma_addr_t
-dma_map_page(struct device *dev, struct page *page, unsigned long offset,
-            size_t size, enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-       return (dma_addr_t)(page_to_pfn(page)) * PAGE_SIZE + offset;
-}
-
-static inline void
-dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
-              enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-
-static inline void
-dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
-            enum dma_data_direction direction)
-{
-       BUG_ON(direction == DMA_NONE);
-}
-
-static inline void
-dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
-               enum dma_data_direction direction)
-{
-       consistent_sync((void *)bus_to_virt(dma_handle), size, direction);
-}
-
-static inline void
-dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
-               enum dma_data_direction direction)
-{
-       consistent_sync((void *)bus_to_virt(dma_handle), size, direction);
-}
-
-static inline void
-dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
-                     unsigned long offset, size_t size,
-                     enum dma_data_direction direction)
-{
-
-       consistent_sync((void *)bus_to_virt(dma_handle)+offset,size,direction);
-}
-
-static inline void
-dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
-                     unsigned long offset, size_t size,
-                     enum dma_data_direction direction)
-{
-
-       consistent_sync((void *)bus_to_virt(dma_handle)+offset,size,direction);
-}
-static inline void
-dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
-                enum dma_data_direction dir)
-{
-       int i;
-       for (i = 0; i < nelems; i++, sg++)
-               consistent_sync(sg_virt(sg), sg->length, dir);
-}
-
-static inline void
-dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
-                enum dma_data_direction dir)
-{
-       int i;
-       for (i = 0; i < nelems; i++, sg++)
-               consistent_sync(sg_virt(sg), sg->length, dir);
-}
-static inline int
-dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
-{
-       return 0;
-}
-
-static inline int
-dma_supported(struct device *dev, u64 mask)
-{
-       return 1;
-}
-
-static inline int
-dma_set_mask(struct device *dev, u64 mask)
-{
-       if(!dev->dma_mask || !dma_supported(dev, mask))
-               return -EIO;
-
-       *dev->dma_mask = mask;
-
-       return 0;
-}
-
-static inline int
-dma_get_cache_alignment(void)
-{
-       return L1_CACHE_BYTES;
-}
-
-#define dma_is_consistent(d, h)        (1)
-
-static inline void
-dma_cache_sync(struct device *dev, void *vaddr, size_t size,
-              enum dma_data_direction direction)
-{
-       consistent_sync(vaddr, size, direction);
-}
-
-#endif /* _XTENSA_DMA_MAPPING_H */
diff --git a/include/asm-xtensa/dma.h b/include/asm-xtensa/dma.h
deleted file mode 100644 (file)
index e30f3ab..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * include/asm-xtensa/dma.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2003 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_DMA_H
-#define _XTENSA_DMA_H
-
-#include <asm/io.h>            /* need byte IO */
-
-/*
- * This is only to be defined if we have PC-like DMA.
- * By default this is not true on an Xtensa processor,
- * however on boards with a PCI bus, such functionality
- * might be emulated externally.
- *
- * NOTE:  there still exists driver code that assumes
- * this is defined, eg. drivers/sound/soundcard.c (as of 2.4).
- */
-#define MAX_DMA_CHANNELS       8
-
-/*
- * The maximum virtual address to which DMA transfers
- * can be performed on this platform.
- *
- * NOTE: This is board (platform) specific, not processor-specific!
- *
- * NOTE: This assumes DMA transfers can only be performed on
- *     the section of physical memory contiguously mapped in virtual
- *     space for the kernel.  For the Xtensa architecture, this
- *     means the maximum possible size of this DMA area is
- *     the size of the statically mapped kernel segment
- *     (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB.
- *
- * NOTE: When the entire KSEG area is DMA capable, we substract
- *     one from the max address so that the virt_to_phys() macro
- *     works correctly on the address (otherwise the address
- *     enters another area, and virt_to_phys() may not return
- *     the value desired).
- */
-
-#define MAX_DMA_ADDRESS                (PAGE_OFFSET + XCHAL_KIO_SIZE - 1)
-
-
-/* Reserve and release a DMA channel */
-extern int request_dma(unsigned int dmanr, const char * device_id);
-extern void free_dma(unsigned int dmanr);
-
-#ifdef CONFIG_PCI
-extern int isa_dma_bridge_buggy;
-#else
-#define isa_dma_bridge_buggy   (0)
-#endif
-
-
-#endif
diff --git a/include/asm-xtensa/elf.h b/include/asm-xtensa/elf.h
deleted file mode 100644 (file)
index c3f53e7..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * include/asm-xtensa/elf.h
- *
- * ELF register definitions
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_ELF_H
-#define _XTENSA_ELF_H
-
-#include <asm/ptrace.h>
-
-/* Xtensa processor ELF architecture-magic number */
-
-#define EM_XTENSA      94
-#define EM_XTENSA_OLD  0xABC7
-
-/* Xtensa relocations defined by the ABIs */
-
-#define R_XTENSA_NONE           0
-#define R_XTENSA_32             1
-#define R_XTENSA_RTLD           2
-#define R_XTENSA_GLOB_DAT       3
-#define R_XTENSA_JMP_SLOT       4
-#define R_XTENSA_RELATIVE       5
-#define R_XTENSA_PLT            6
-#define R_XTENSA_OP0            8
-#define R_XTENSA_OP1            9
-#define R_XTENSA_OP2            10
-#define R_XTENSA_ASM_EXPAND    11
-#define R_XTENSA_ASM_SIMPLIFY  12
-#define R_XTENSA_GNU_VTINHERIT 15
-#define R_XTENSA_GNU_VTENTRY   16
-#define R_XTENSA_DIFF8         17
-#define R_XTENSA_DIFF16                18
-#define R_XTENSA_DIFF32                19
-#define R_XTENSA_SLOT0_OP      20
-#define R_XTENSA_SLOT1_OP      21
-#define R_XTENSA_SLOT2_OP      22
-#define R_XTENSA_SLOT3_OP      23
-#define R_XTENSA_SLOT4_OP      24
-#define R_XTENSA_SLOT5_OP      25
-#define R_XTENSA_SLOT6_OP      26
-#define R_XTENSA_SLOT7_OP      27
-#define R_XTENSA_SLOT8_OP      28
-#define R_XTENSA_SLOT9_OP      29
-#define R_XTENSA_SLOT10_OP     30
-#define R_XTENSA_SLOT11_OP     31
-#define R_XTENSA_SLOT12_OP     32
-#define R_XTENSA_SLOT13_OP     33
-#define R_XTENSA_SLOT14_OP     34
-#define R_XTENSA_SLOT0_ALT     35
-#define R_XTENSA_SLOT1_ALT     36
-#define R_XTENSA_SLOT2_ALT     37
-#define R_XTENSA_SLOT3_ALT     38
-#define R_XTENSA_SLOT4_ALT     39
-#define R_XTENSA_SLOT5_ALT     40
-#define R_XTENSA_SLOT6_ALT     41
-#define R_XTENSA_SLOT7_ALT     42
-#define R_XTENSA_SLOT8_ALT     43
-#define R_XTENSA_SLOT9_ALT     44
-#define R_XTENSA_SLOT10_ALT    45
-#define R_XTENSA_SLOT11_ALT    46
-#define R_XTENSA_SLOT12_ALT    47
-#define R_XTENSA_SLOT13_ALT    48
-#define R_XTENSA_SLOT14_ALT    49
-
-/* ELF register definitions. This is needed for core dump support.  */
-
-typedef unsigned long elf_greg_t;
-
-typedef struct {
-       elf_greg_t pc;
-       elf_greg_t ps;
-       elf_greg_t lbeg;
-       elf_greg_t lend;
-       elf_greg_t lcount;
-       elf_greg_t sar;
-       elf_greg_t windowstart;
-       elf_greg_t windowbase;
-       elf_greg_t reserved[8+48];
-       elf_greg_t a[64];
-} xtensa_gregset_t;
-
-#define ELF_NGREG      (sizeof(xtensa_gregset_t) / sizeof(elf_greg_t))
-
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-#define ELF_NFPREG     18
-
-typedef unsigned int elf_fpreg_t;
-typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
-
-#define ELF_CORE_COPY_REGS(_eregs, _pregs)                             \
-       xtensa_elf_core_copy_regs ((xtensa_gregset_t*)&(_eregs), _pregs);
-
-extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
-
-/*
- * This is used to ensure we don't load something for the wrong architecture.
- */
-
-#define elf_check_arch(x) ( ( (x)->e_machine == EM_XTENSA )  || \
-                           ( (x)->e_machine == EM_XTENSA_OLD ) )
-
-/*
- * These are used to set parameters in the core dumps.
- */
-
-#ifdef __XTENSA_EL__
-# define ELF_DATA      ELFDATA2LSB
-#elif defined(__XTENSA_EB__)
-# define ELF_DATA      ELFDATA2MSB
-#else
-# error processor byte order undefined!
-#endif
-
-#define ELF_CLASS      ELFCLASS32
-#define ELF_ARCH       EM_XTENSA
-
-#define USE_ELF_CORE_DUMP
-#define ELF_EXEC_PAGESIZE      PAGE_SIZE
-
-/*
- * This is the location that an ET_DYN program is loaded if exec'ed.  Typical
- * use of this is to invoke "./ld.so someprog" to test out a new version of
- * the loader.  We need to make sure that it is out of the way of the program
- * that it will "exec", and that there is sufficient room for the brk.
- */
-
-#define ELF_ET_DYN_BASE         (2 * TASK_SIZE / 3)
-
-/*
- * This yields a mask that user programs can use to figure out what
- * instruction set this CPU supports.  This could be done in user space,
- * but it's not easy, and we've already done it here.
- */
-
-#define ELF_HWCAP      (0)
-
-/*
- * This yields a string that ld.so will use to load implementation
- * specific libraries for optimization.  This is more specific in
- * intent than poking at uname or /proc/cpuinfo.
- * For the moment, we have only optimizations for the Intel generations,
- * but that could change...
- */
-
-#define ELF_PLATFORM  (NULL)
-
-/*
- * The Xtensa processor ABI says that when the program starts, a2
- * contains a pointer to a function which might be registered using
- * `atexit'.  This provides a mean for the dynamic linker to call
- * DT_FINI functions for shared libraries that have been loaded before
- * the code runs.
- *
- * A value of 0 tells we have no such handler.
- *
- * We might as well make sure everything else is cleared too (except
- * for the stack pointer in a1), just to make things more
- * deterministic.  Also, clearing a0 terminates debugger backtraces.
- */
-
-#define ELF_PLAT_INIT(_r, load_addr) \
-  do { _r->areg[0]=0; /*_r->areg[1]=0;*/ _r->areg[2]=0;  _r->areg[3]=0;  \
-       _r->areg[4]=0;  _r->areg[5]=0;    _r->areg[6]=0;  _r->areg[7]=0;  \
-       _r->areg[8]=0;  _r->areg[9]=0;    _r->areg[10]=0; _r->areg[11]=0; \
-       _r->areg[12]=0; _r->areg[13]=0;   _r->areg[14]=0; _r->areg[15]=0; \
-  } while (0)
-
-typedef struct {
-       xtregs_opt_t    opt;
-       xtregs_user_t   user;
-#if XTENSA_HAVE_COPROCESSORS
-       xtregs_cp0_t    cp0;
-       xtregs_cp1_t    cp1;
-       xtregs_cp2_t    cp2;
-       xtregs_cp3_t    cp3;
-       xtregs_cp4_t    cp4;
-       xtregs_cp5_t    cp5;
-       xtregs_cp6_t    cp6;
-       xtregs_cp7_t    cp7;
-#endif
-} elf_xtregs_t;
-
-#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT)
-
-struct task_struct;
-
-extern void do_copy_regs (xtensa_gregset_t*, struct pt_regs*,
-                         struct task_struct*);
-extern void do_restore_regs (xtensa_gregset_t*, struct pt_regs*,
-                            struct task_struct*);
-extern void do_save_fpregs (elf_fpregset_t*, struct pt_regs*,
-                           struct task_struct*);
-extern int do_restore_fpregs (elf_fpregset_t*, struct pt_regs*,
-                             struct task_struct*);
-
-#endif /* _XTENSA_ELF_H */
diff --git a/include/asm-xtensa/emergency-restart.h b/include/asm-xtensa/emergency-restart.h
deleted file mode 100644 (file)
index 108d8c4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_EMERGENCY_RESTART_H
-#define _ASM_EMERGENCY_RESTART_H
-
-#include <asm-generic/emergency-restart.h>
-
-#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-xtensa/errno.h b/include/asm-xtensa/errno.h
deleted file mode 100644 (file)
index a0f3b96..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/errno.h
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- *
- * Copyright (C) 2002 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_ERRNO_H
-#define _XTENSA_ERRNO_H
-
-#include <asm-generic/errno.h>
-
-#endif /* _XTENSA_ERRNO_H */
diff --git a/include/asm-xtensa/fb.h b/include/asm-xtensa/fb.h
deleted file mode 100644 (file)
index c7df380..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-#include <linux/fb.h>
-
-#define fb_pgprotect(...) do {} while (0)
-
-static inline int fb_is_primary_device(struct fb_info *info)
-{
-       return 0;
-}
-
-#endif /* _ASM_FB_H_ */
diff --git a/include/asm-xtensa/fcntl.h b/include/asm-xtensa/fcntl.h
deleted file mode 100644 (file)
index 46ab12d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/fcntl.h>
diff --git a/include/asm-xtensa/futex.h b/include/asm-xtensa/futex.h
deleted file mode 100644 (file)
index 0b74582..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/futex.h>
diff --git a/include/asm-xtensa/hardirq.h b/include/asm-xtensa/hardirq.h
deleted file mode 100644 (file)
index 87cb19d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * include/asm-xtensa/hardirq.h
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- *
- * Copyright (C) 2002 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_HARDIRQ_H
-#define _XTENSA_HARDIRQ_H
-
-#include <linux/cache.h>
-#include <asm/irq.h>
-
-/* headers.S is sensitive to the offsets of these fields */
-typedef struct {
-       unsigned int __softirq_pending;
-       unsigned int __syscall_count;
-       struct task_struct * __ksoftirqd_task; /* waitqueue is too large */
-       unsigned int __nmi_count;              /* arch dependent */
-} ____cacheline_aligned irq_cpustat_t;
-
-void ack_bad_irq(unsigned int irq);
-#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
-
-#endif /* _XTENSA_HARDIRQ_H */
diff --git a/include/asm-xtensa/highmem.h b/include/asm-xtensa/highmem.h
deleted file mode 100644 (file)
index 0a046ca..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * include/asm-xtensa/highmem.h
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- *
- * Copyright (C) 2003 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_HIGHMEM_H
-#define _XTENSA_HIGHMEM_H
-
-extern void flush_cache_kmaps(void);
-
-#endif
-
diff --git a/include/asm-xtensa/hw_irq.h b/include/asm-xtensa/hw_irq.h
deleted file mode 100644 (file)
index 3ddbea7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * include/asm-xtensa/hw_irq.h
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- *
- * Copyright (C) 2002 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_HW_IRQ_H
-#define _XTENSA_HW_IRQ_H
-
-#endif
diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h
deleted file mode 100644 (file)
index 07b7299..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * include/asm-xtensa/io.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_IO_H
-#define _XTENSA_IO_H
-
-#ifdef __KERNEL__
-#include <asm/byteorder.h>
-#include <asm/page.h>
-#include <linux/kernel.h>
-
-#include <linux/types.h>
-
-#define XCHAL_KIO_CACHED_VADDR 0xe0000000
-#define XCHAL_KIO_BYPASS_VADDR 0xf0000000
-#define XCHAL_KIO_PADDR                0xf0000000
-#define XCHAL_KIO_SIZE         0x10000000
-
-#define IOADDR(x)              (XCHAL_KIO_BYPASS_VADDR + (x))
-
-/*
- * swap functions to change byte order from little-endian to big-endian and
- * vice versa.
- */
-
-static inline unsigned short _swapw (unsigned short v)
-{
-       return (v << 8) | (v >> 8);
-}
-
-static inline unsigned int _swapl (unsigned int v)
-{
-       return (v << 24) | ((v & 0xff00) << 8) | ((v >> 8) & 0xff00) | (v >> 24);
-}
-
-/*
- * Change virtual addresses to physical addresses and vv.
- * These are trivial on the 1:1 Linux/Xtensa mapping
- */
-
-static inline unsigned long virt_to_phys(volatile void * address)
-{
-       return __pa(address);
-}
-
-static inline void * phys_to_virt(unsigned long address)
-{
-       return __va(address);
-}
-
-/*
- * virt_to_bus and bus_to_virt are deprecated.
- */
-
-#define virt_to_bus(x) virt_to_phys(x)
-#define bus_to_virt(x) phys_to_virt(x)
-
-/*
- * Return the virtual (cached) address for the specified bus memory.
- * Note that we currently don't support any address outside the KIO segment.
- */
-
-static inline void *ioremap(unsigned long offset, unsigned long size)
-{
-       if (offset >= XCHAL_KIO_PADDR
-           && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
-               return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR);
-
-       else
-               BUG();
-}
-
-static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
-{
-       if (offset >= XCHAL_KIO_PADDR
-           && offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
-               return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR);
-       else
-               BUG();
-}
-
-static inline void iounmap(void *addr)
-{
-}
-
-/*
- * Generic I/O
- */
-
-#define readb(addr) \
-       ({ unsigned char __v = (*(volatile unsigned char *)(addr)); __v; })
-#define readw(addr) \
-       ({ unsigned short __v = (*(volatile unsigned short *)(addr)); __v; })
-#define readl(addr) \
-       ({ unsigned int __v = (*(volatile unsigned int *)(addr)); __v; })
-#define writeb(b, addr) (void)((*(volatile unsigned char *)(addr)) = (b))
-#define writew(b, addr) (void)((*(volatile unsigned short *)(addr)) = (b))
-#define writel(b, addr) (void)((*(volatile unsigned int *)(addr)) = (b))
-
-static inline __u8 __raw_readb(const volatile void __iomem *addr)
-{
-          return *(__force volatile __u8 *)(addr);
-}
-static inline __u16 __raw_readw(const volatile void __iomem *addr)
-{
-          return *(__force volatile __u16 *)(addr);
-}
-static inline __u32 __raw_readl(const volatile void __iomem *addr)
-{
-          return *(__force volatile __u32 *)(addr);
-}
-static inline void __raw_writeb(__u8 b, volatile void __iomem *addr)
-{
-          *(__force volatile __u8 *)(addr) = b;
-}
-static inline void __raw_writew(__u16 b, volatile void __iomem *addr)
-{
-          *(__force volatile __u16 *)(addr) = b;
-}
-static inline void __raw_writel(__u32 b, volatile void __iomem *addr)
-{
-          *(__force volatile __u32 *)(addr) = b;
-}
-
-/* These are the definitions for the x86 IO instructions
- * inb/inw/inl/outb/outw/outl, the "string" versions
- * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions
- * inb_p/inw_p/...
- * The macros don't do byte-swapping.
- */
-
-#define inb(port)              readb((u8 *)((port)))
-#define outb(val, port)                writeb((val),(u8 *)((unsigned long)(port)))
-#define inw(port)              readw((u16 *)((port)))
-#define outw(val, port)                writew((val),(u16 *)((unsigned long)(port)))
-#define inl(port)              readl((u32 *)((port)))
-#define outl(val, port)                writel((val),(u32 *)((unsigned long)(port)))
-
-#define inb_p(port)            inb((port))
-#define outb_p(val, port)      outb((val), (port))
-#define inw_p(port)            inw((port))
-#define outw_p(val, port)      outw((val), (port))
-#define inl_p(port)            inl((port))
-#define outl_p(val, port)      outl((val), (port))
-
-extern void insb (unsigned long port, void *dst, unsigned long count);
-extern void insw (unsigned long port, void *dst, unsigned long count);
-extern void insl (unsigned long port, void *dst, unsigned long count);
-extern void outsb (unsigned long port, const void *src, unsigned long count);
-extern void outsw (unsigned long port, const void *src, unsigned long count);
-extern void outsl (unsigned long port, const void *src, unsigned long count);
-
-#define IO_SPACE_LIMIT ~0
-
-#define memset_io(a,b,c)       memset((void *)(a),(b),(c))
-#define memcpy_fromio(a,b,c)   memcpy((a),(void *)(b),(c))
-#define memcpy_toio(a,b,c)      memcpy((void *)(a),(b),(c))
-
-/* At this point the Xtensa doesn't provide byte swap instructions */
-
-#ifdef __XTENSA_EB__
-# define in_8(addr) (*(u8*)(addr))
-# define in_le16(addr) _swapw(*(u16*)(addr))
-# define in_le32(addr) _swapl(*(u32*)(addr))
-# define out_8(b, addr) *(u8*)(addr) = (b)
-# define out_le16(b, addr) *(u16*)(addr) = _swapw(b)
-# define out_le32(b, addr) *(u32*)(addr) = _swapl(b)
-#elif defined(__XTENSA_EL__)
-# define in_8(addr)  (*(u8*)(addr))
-# define in_le16(addr) (*(u16*)(addr))
-# define in_le32(addr) (*(u32*)(addr))
-# define out_8(b, addr) *(u8*)(addr) = (b)
-# define out_le16(b, addr) *(u16*)(addr) = (b)
-# define out_le32(b, addr) *(u32*)(addr) = (b)
-#else
-# error processor byte order undefined!
-#endif
-
-
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem access
- */
-#define xlate_dev_mem_ptr(p)    __va(p)
-
-/*
- * Convert a virtual cached pointer to an uncached pointer
- */
-#define xlate_dev_kmem_ptr(p)   p
-
-
-#endif /* __KERNEL__ */
-
-#endif /* _XTENSA_IO_H */
diff --git a/include/asm-xtensa/ioctl.h b/include/asm-xtensa/ioctl.h
deleted file mode 100644 (file)
index b279fe0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/ioctl.h>
diff --git a/include/asm-xtensa/ioctls.h b/include/asm-xtensa/ioctls.h
deleted file mode 100644 (file)
index 0ffa942..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * include/asm-xtensa/ioctls.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2003 - 2005 Tensilica Inc.
- *
- * Derived from "include/asm-i386/ioctls.h"
- */
-
-#ifndef _XTENSA_IOCTLS_H
-#define _XTENSA_IOCTLS_H
-
-#include <asm/ioctl.h>
-
-#define FIOCLEX                _IO('f', 1)
-#define FIONCLEX       _IO('f', 2)
-#define FIOASYNC       _IOW('f', 125, int)
-#define FIONBIO                _IOW('f', 126, int)
-#define FIONREAD       _IOR('f', 127, int)
-#define TIOCINQ                FIONREAD
-#define FIOQSIZE       _IOR('f', 128, loff_t)
-
-#define TCGETS         0x5401
-#define TCSETS         0x5402
-#define TCSETSW                0x5403
-#define TCSETSF                0x5404
-
-#define TCGETA         _IOR('t', 23, struct termio)
-#define TCSETA         _IOW('t', 24, struct termio)
-#define TCSETAW                _IOW('t', 25, struct termio)
-#define TCSETAF                _IOW('t', 28, struct termio)
-
-#define TCSBRK         _IO('t', 29)
-#define TCXONC         _IO('t', 30)
-#define TCFLSH         _IO('t', 31)
-
-#define TIOCSWINSZ     _IOW('t', 103, struct winsize)
-#define TIOCGWINSZ     _IOR('t', 104, struct winsize)
-#define        TIOCSTART       _IO('t', 110)           /* start output, like ^Q */
-#define        TIOCSTOP        _IO('t', 111)           /* stop output, like ^S */
-#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
-
-#define TIOCSPGRP      _IOW('t', 118, int)
-#define TIOCGPGRP      _IOR('t', 119, int)
-
-#define TIOCEXCL       _IO('T', 12)
-#define TIOCNXCL       _IO('T', 13)
-#define TIOCSCTTY      _IO('T', 14)
-
-#define TIOCSTI                _IOW('T', 18, char)
-#define TIOCMGET       _IOR('T', 21, unsigned int)
-#define TIOCMBIS       _IOW('T', 22, unsigned int)
-#define TIOCMBIC       _IOW('T', 23, unsigned int)
-#define TIOCMSET       _IOW('T', 24, unsigned int)
-# define TIOCM_LE      0x001
-# define TIOCM_DTR     0x002
-# define TIOCM_RTS     0x004
-# define TIOCM_ST      0x008
-# define TIOCM_SR      0x010
-# define TIOCM_CTS     0x020
-# define TIOCM_CAR     0x040
-# define TIOCM_RNG     0x080
-# define TIOCM_DSR     0x100
-# define TIOCM_CD      TIOCM_CAR
-# define TIOCM_RI      TIOCM_RNG
-
-#define TIOCGSOFTCAR   _IOR('T', 25, unsigned int)
-#define TIOCSSOFTCAR   _IOW('T', 26, unsigned int)
-#define TIOCLINUX      _IOW('T', 28, char)
-#define TIOCCONS       _IO('T', 29)
-#define TIOCGSERIAL    _IOR('T', 30, struct serial_struct)
-#define TIOCSSERIAL    _IOW('T', 31, struct serial_struct)
-#define TIOCPKT                _IOW('T', 32, int)
-# define TIOCPKT_DATA           0
-# define TIOCPKT_FLUSHREAD      1
-# define TIOCPKT_FLUSHWRITE     2
-# define TIOCPKT_STOP           4
-# define TIOCPKT_START          8
-# define TIOCPKT_NOSTOP                16
-# define TIOCPKT_DOSTOP                32
-
-
-#define TIOCNOTTY      _IO('T', 34)
-#define TIOCSETD       _IOW('T', 35, int)
-#define TIOCGETD       _IOR('T', 36, int)
-#define TCSBRKP                _IOW('T', 37, int)   /* Needed for POSIX tcsendbreak()*/
-#define TIOCTTYGSTRUCT _IOR('T', 38, struct tty_struct) /* For debugging only*/
-#define TIOCSBRK       _IO('T', 39)         /* BSD compatibility */
-#define TIOCCBRK       _IO('T', 40)         /* BSD compatibility */
-#define TIOCGSID       _IOR('T', 41, pid_t) /* Return the session ID of FD*/
-#define TCGETS2                _IOR('T', 42, struct termios2)
-#define TCSETS2                _IOW('T', 43, struct termios2)
-#define TCSETSW2       _IOW('T', 44, struct termios2)
-#define TCSETSF2       _IOW('T', 45, struct termios2)
-#define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
-#define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
-
-#define TIOCSERCONFIG  _IO('T', 83)
-#define TIOCSERGWILD   _IOR('T', 84,  int)
-#define TIOCSERSWILD   _IOW('T', 85,  int)
-#define TIOCGLCKTRMIOS 0x5456
-#define TIOCSLCKTRMIOS 0x5457
-#define TIOCSERGSTRUCT 0x5458               /* For debugging only */
-#define TIOCSERGETLSR   _IOR('T', 89, unsigned int) /* Get line status reg. */
-  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-# define TIOCSER_TEMT    0x01               /* Transmitter physically empty */
-#define TIOCSERGETMULTI _IOR('T', 90, struct serial_multiport_struct) /* Get multiport config  */
-#define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* Set multiport config */
-
-#define TIOCMIWAIT     _IO('T', 92) /* wait for a change on serial input line(s) */
-#define TIOCGICOUNT    0x545D  /* read serial port inline interrupt counts */
-
-#endif /* _XTENSA_IOCTLS_H */
diff --git a/include/asm-xtensa/ipcbuf.h b/include/asm-xtensa/ipcbuf.h
deleted file mode 100644 (file)
index c33aa6a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * include/asm-xtensa/ipcbuf.h
- *
- * The ipc64_perm structure for the Xtensa architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_IPCBUF_H
-#define _XTENSA_IPCBUF_H
-
-/*
- * Pad space is left for:
- * - 32-bit mode_t and seq
- * - 2 miscellaneous 32-bit values
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- */
-
-struct ipc64_perm
-{
-       __kernel_key_t          key;
-       __kernel_uid32_t        uid;
-       __kernel_gid32_t        gid;
-       __kernel_uid32_t        cuid;
-       __kernel_gid32_t        cgid;
-       __kernel_mode_t         mode;
-       unsigned long           seq;
-       unsigned long           __unused1;
-       unsigned long           __unused2;
-};
-
-#endif /* _XTENSA_IPCBUF_H */
diff --git a/include/asm-xtensa/irq.h b/include/asm-xtensa/irq.h
deleted file mode 100644 (file)
index fc73b7f..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * include/asm-xtensa/irq.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_IRQ_H
-#define _XTENSA_IRQ_H
-
-#include <asm/platform/hardware.h>
-#include <asm/variant/core.h>
-
-#ifndef PLATFORM_NR_IRQS
-# define PLATFORM_NR_IRQS 0
-#endif
-#define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS
-#define NR_IRQS (XTENSA_NR_IRQS + PLATFORM_NR_IRQS)
-
-static __inline__ int irq_canonicalize(int irq)
-{
-       return (irq);
-}
-
-struct irqaction;
-
-#endif /* _XTENSA_IRQ_H */
diff --git a/include/asm-xtensa/irq_regs.h b/include/asm-xtensa/irq_regs.h
deleted file mode 100644 (file)
index 3dd9c0b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/irq_regs.h>
diff --git a/include/asm-xtensa/kdebug.h b/include/asm-xtensa/kdebug.h
deleted file mode 100644 (file)
index 6ece1b0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/kdebug.h>
diff --git a/include/asm-xtensa/kmap_types.h b/include/asm-xtensa/kmap_types.h
deleted file mode 100644 (file)
index 9e822d2..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * include/asm-xtensa/kmap_types.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_KMAP_TYPES_H
-#define _XTENSA_KMAP_TYPES_H
-
-enum km_type {
-  KM_BOUNCE_READ,
-  KM_SKB_SUNRPC_DATA,
-  KM_SKB_DATA_SOFTIRQ,
-  KM_USER0,
-  KM_USER1,
-  KM_BIO_SRC_IRQ,
-  KM_BIO_DST_IRQ,
-  KM_PTE0,
-  KM_PTE1,
-  KM_IRQ0,
-  KM_IRQ1,
-  KM_SOFTIRQ0,
-  KM_SOFTIRQ1,
-  KM_TYPE_NR
-};
-
-#endif /* _XTENSA_KMAP_TYPES_H */
diff --git a/include/asm-xtensa/linkage.h b/include/asm-xtensa/linkage.h
deleted file mode 100644 (file)
index bf2128a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/linkage.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_LINKAGE_H
-#define _XTENSA_LINKAGE_H
-
-/* Nothing to do here ... */
-
-#endif /* _XTENSA_LINKAGE_H */
diff --git a/include/asm-xtensa/local.h b/include/asm-xtensa/local.h
deleted file mode 100644 (file)
index 48723e5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/local.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_LOCAL_H
-#define _XTENSA_LOCAL_H
-
-#include <asm-generic/local.h>
-
-#endif /* _XTENSA_LOCAL_H */
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h
deleted file mode 100644 (file)
index 9b92620..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * include/asm-xtensa/mman.h
- *
- * Xtensa Processor memory-manager definitions
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1995 by Ralf Baechle
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_MMAN_H
-#define _XTENSA_MMAN_H
-
-/*
- * Protections are chosen from these bits, OR'd together.  The
- * implementation does not necessarily support PROT_EXEC or PROT_WRITE
- * without PROT_READ.  The only guarantees are that no writing will be
- * allowed without PROT_WRITE and no access will be allowed for PROT_NONE.
- */
-
-#define PROT_NONE      0x0             /* page can not be accessed */
-#define PROT_READ      0x1             /* page can be read */
-#define PROT_WRITE     0x2             /* page can be written */
-#define PROT_EXEC      0x4             /* page can be executed */
-
-#define PROT_SEM       0x10            /* page may be used for atomic ops */
-#define PROT_GROWSDOWN 0x01000000      /* mprotect flag: extend change to start of growsdown vma */
-#define PROT_GROWSUP   0x02000000      /* mprotect flag: extend change to end fo growsup vma */
-
-/*
- * Flags for mmap
- */
-#define MAP_SHARED     0x001           /* Share changes */
-#define MAP_PRIVATE    0x002           /* Changes are private */
-#define MAP_TYPE       0x00f           /* Mask for type of mapping */
-#define MAP_FIXED      0x010           /* Interpret addr exactly */
-
-/* not used by linux, but here to make sure we don't clash with ABI defines */
-#define MAP_RENAME     0x020           /* Assign page to file */
-#define MAP_AUTOGROW   0x040           /* File may grow by writing */
-#define MAP_LOCAL      0x080           /* Copy on fork/sproc */
-#define MAP_AUTORSRV   0x100           /* Logical swap reserved on demand */
-
-/* These are linux-specific */
-#define MAP_NORESERVE  0x0400          /* don't check for reservations */
-#define MAP_ANONYMOUS  0x0800          /* don't use a file */
-#define MAP_GROWSDOWN  0x1000          /* stack-like segment */
-#define MAP_DENYWRITE  0x2000          /* ETXTBSY */
-#define MAP_EXECUTABLE 0x4000          /* mark it as an executable */
-#define MAP_LOCKED     0x8000          /* pages are locked */
-#define MAP_POPULATE   0x10000         /* populate (prefault) pagetables */
-#define MAP_NONBLOCK   0x20000         /* do not block on IO */
-
-/*
- * Flags for msync
- */
-#define MS_ASYNC       0x0001          /* sync memory asynchronously */
-#define MS_INVALIDATE  0x0002          /* invalidate mappings & caches */
-#define MS_SYNC                0x0004          /* synchronous memory sync */
-
-/*
- * Flags for mlockall
- */
-#define MCL_CURRENT    1               /* lock all current mappings */
-#define MCL_FUTURE     2               /* lock all future mappings */
-
-#define MADV_NORMAL    0               /* no further special treatment */
-#define MADV_RANDOM    1               /* expect random page references */
-#define MADV_SEQUENTIAL        2               /* expect sequential page references */
-#define MADV_WILLNEED  3               /* will need these pages */
-#define MADV_DONTNEED  4               /* don't need these pages */
-
-/* common parameters: try to keep these consistent across architectures */
-#define MADV_REMOVE    9               /* remove these pages & resources */
-#define MADV_DONTFORK  10              /* don't inherit across fork */
-#define MADV_DOFORK    11              /* do inherit across fork */
-
-/* compatibility flags */
-#define MAP_FILE       0
-
-#endif /* _XTENSA_MMAN_H */
diff --git a/include/asm-xtensa/mmu.h b/include/asm-xtensa/mmu.h
deleted file mode 100644 (file)
index 44c5bb0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * include/asm-xtensa/mmu.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_MMU_H
-#define _XTENSA_MMU_H
-
-/* Default "unsigned long" context */
-typedef unsigned long mm_context_t;
-
-#endif /* _XTENSA_MMU_H */
diff --git a/include/asm-xtensa/mmu_context.h b/include/asm-xtensa/mmu_context.h
deleted file mode 100644 (file)
index c0fd8e5..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * include/asm-xtensa/mmu_context.h
- *
- * Switch an MMU context.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_MMU_CONTEXT_H
-#define _XTENSA_MMU_CONTEXT_H
-
-#include <linux/stringify.h>
-#include <linux/sched.h>
-
-#include <asm/pgtable.h>
-#include <asm/cacheflush.h>
-#include <asm/tlbflush.h>
-#include <asm-generic/mm_hooks.h>
-
-#define XCHAL_MMU_ASID_BITS    8
-
-#if (XCHAL_HAVE_TLBS != 1)
-# error "Linux must have an MMU!"
-#endif
-
-extern unsigned long asid_cache;
-
-/*
- * NO_CONTEXT is the invalid ASID value that we don't ever assign to
- * any user or kernel context.
- *
- * 0 invalid
- * 1 kernel
- * 2 reserved
- * 3 reserved
- * 4...255 available
- */
-
-#define NO_CONTEXT     0
-#define ASID_USER_FIRST        4
-#define ASID_MASK      ((1 << XCHAL_MMU_ASID_BITS) - 1)
-#define ASID_INSERT(x) (0x03020001 | (((x) & ASID_MASK) << 8))
-
-static inline void set_rasid_register (unsigned long val)
-{
-       __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t"
-                             " isync\n" : : "a" (val));
-}
-
-static inline unsigned long get_rasid_register (void)
-{
-       unsigned long tmp;
-       __asm__ __volatile__ (" rsr %0,"__stringify(RASID)"\n\t" : "=a" (tmp));
-       return tmp;
-}
-
-static inline void
-__get_new_mmu_context(struct mm_struct *mm)
-{
-       extern void flush_tlb_all(void);
-       if (! (++asid_cache & ASID_MASK) ) {
-               flush_tlb_all(); /* start new asid cycle */
-               asid_cache += ASID_USER_FIRST;
-       }
-       mm->context = asid_cache;
-}
-
-static inline void
-__load_mmu_context(struct mm_struct *mm)
-{
-       set_rasid_register(ASID_INSERT(mm->context));
-       invalidate_page_directory();
-}
-
-/*
- * Initialize the context related info for a new mm_struct
- * instance.
- */
-
-static inline int
-init_new_context(struct task_struct *tsk, struct mm_struct *mm)
-{
-       mm->context = NO_CONTEXT;
-       return 0;
-}
-
-/*
- * After we have set current->mm to a new value, this activates
- * the context for the new mm so we see the new mappings.
- */
-static inline void
-activate_mm(struct mm_struct *prev, struct mm_struct *next)
-{
-       /* Unconditionally get a new ASID.  */
-
-       __get_new_mmu_context(next);
-       __load_mmu_context(next);
-}
-
-
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
-                             struct task_struct *tsk)
-{
-       unsigned long asid = asid_cache;
-
-       /* Check if our ASID is of an older version and thus invalid */
-
-       if (next->context == NO_CONTEXT || ((next->context^asid) & ~ASID_MASK))
-               __get_new_mmu_context(next);
-
-       __load_mmu_context(next);
-}
-
-#define deactivate_mm(tsk, mm) do { } while(0)
-
-/*
- * Destroy context related info for an mm_struct that is about
- * to be put to rest.
- */
-static inline void destroy_context(struct mm_struct *mm)
-{
-       invalidate_page_directory();
-}
-
-
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
-{
-       /* Nothing to do. */
-
-}
-
-#endif /* _XTENSA_MMU_CONTEXT_H */
diff --git a/include/asm-xtensa/module.h b/include/asm-xtensa/module.h
deleted file mode 100644 (file)
index d9b34be..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * include/asm-xtensa/module.h
- *
- * This file contains the module code specific to the Xtensa architecture.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_MODULE_H
-#define _XTENSA_MODULE_H
-
-struct mod_arch_specific
-{
-       /* No special elements, yet. */
-};
-
-#define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " "
-
-#define Elf_Shdr Elf32_Shdr
-#define Elf_Sym Elf32_Sym
-#define Elf_Ehdr Elf32_Ehdr
-
-#endif /* _XTENSA_MODULE_H */
diff --git a/include/asm-xtensa/msgbuf.h b/include/asm-xtensa/msgbuf.h
deleted file mode 100644 (file)
index 693c967..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * include/asm-xtensa/msgbuf.h
- *
- * The msqid64_ds structure for the Xtensa architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- */
-
-#ifndef _XTENSA_MSGBUF_H
-#define _XTENSA_MSGBUF_H
-
-struct msqid64_ds {
-       struct ipc64_perm msg_perm;
-#ifdef __XTENSA_EB__
-       unsigned int    __unused1;
-       __kernel_time_t msg_stime;      /* last msgsnd time */
-       unsigned int    __unused2;
-       __kernel_time_t msg_rtime;      /* last msgrcv time */
-       unsigned int    __unused3;
-       __kernel_time_t msg_ctime;      /* last change time */
-#elif defined(__XTENSA_EL__)
-       __kernel_time_t msg_stime;      /* last msgsnd time */
-       unsigned int    __unused1;
-       __kernel_time_t msg_rtime;      /* last msgrcv time */
-       unsigned int    __unused2;
-       __kernel_time_t msg_ctime;      /* last change time */
-       unsigned int    __unused3;
-#else
-# error processor byte order undefined!
-#endif
-       unsigned long  msg_cbytes;      /* current number of bytes on queue */
-       unsigned long  msg_qnum;        /* number of messages in queue */
-       unsigned long  msg_qbytes;      /* max number of bytes on queue */
-       __kernel_pid_t msg_lspid;       /* pid of last msgsnd */
-       __kernel_pid_t msg_lrpid;       /* last receive pid */
-       unsigned long  __unused4;
-       unsigned long  __unused5;
-};
-
-#endif /* _XTENSA_MSGBUF_H */
diff --git a/include/asm-xtensa/mutex.h b/include/asm-xtensa/mutex.h
deleted file mode 100644 (file)
index 458c1f7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Pull in the generic implementation for the mutex fastpath.
- *
- * TODO: implement optimized primitives instead, or leave the generic
- * implementation in place, or pick the atomic_xchg() based generic
- * implementation. (see asm-generic/mutex-xchg.h for details)
- */
-
-#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-xtensa/page.h b/include/asm-xtensa/page.h
deleted file mode 100644 (file)
index 11f7dc2..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * include/asm-xtensa/page.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version2 as
- * published by the Free Software Foundation.
- *
- * Copyright (C) 2001 - 2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PAGE_H
-#define _XTENSA_PAGE_H
-
-#include <asm/processor.h>
-#include <asm/types.h>
-#include <asm/cache.h>
-
-/*
- * Fixed TLB translations in the processor.
- */
-
-#define XCHAL_KSEG_CACHED_VADDR 0xd0000000
-#define XCHAL_KSEG_BYPASS_VADDR 0xd8000000
-#define XCHAL_KSEG_PADDR        0x00000000
-#define XCHAL_KSEG_SIZE         0x08000000
-
-/*
- * PAGE_SHIFT determines the page size
- */
-
-#define PAGE_SHIFT             12
-#define PAGE_SIZE              (__XTENSA_UL_CONST(1) << PAGE_SHIFT)
-#define PAGE_MASK              (~(PAGE_SIZE-1))
-
-#define PAGE_OFFSET            XCHAL_KSEG_CACHED_VADDR
-#define MAX_MEM_PFN            XCHAL_KSEG_SIZE
-#define PGTABLE_START          0x80000000
-
-/*
- * Cache aliasing:
- *
- * If the cache size for one way is greater than the page size, we have to
- * deal with cache aliasing. The cache index is wider than the page size:
- *
- * |    |cache| cache index
- * | pfn  |off|        virtual address
- * |xxxx:X|zzz|
- * |    : |   |
- * | \  / |   |
- * |trans.|   |
- * | /  \ |   |
- * |yyyy:Y|zzz|        physical address
- *
- * When the page number is translated to the physical page address, the lowest
- * bit(s) (X) that are part of the cache index are also translated (Y).
- * If this translation changes bit(s) (X), the cache index is also afected,
- * thus resulting in a different cache line than before.
- * The kernel does not provide a mechanism to ensure that the page color
- * (represented by this bit) remains the same when allocated or when pages
- * are remapped. When user pages are mapped into kernel space, the color of
- * the page might also change.
- *
- * We use the address space VMALLOC_END ... VMALLOC_END + DCACHE_WAY_SIZE * 2
- * to temporarily map a patch so we can match the color.
- */
-
-#if DCACHE_WAY_SIZE > PAGE_SIZE
-# define DCACHE_ALIAS_ORDER    (DCACHE_WAY_SHIFT - PAGE_SHIFT)
-# define DCACHE_ALIAS_MASK     (PAGE_MASK & (DCACHE_WAY_SIZE - 1))
-# define DCACHE_ALIAS(a)       (((a) & DCACHE_ALIAS_MASK) >> PAGE_SHIFT)
-# define DCACHE_ALIAS_EQ(a,b)  ((((a) ^ (b)) & DCACHE_ALIAS_MASK) == 0)
-#else
-# define DCACHE_ALIAS_ORDER    0
-#endif
-
-#if ICACHE_WAY_SIZE > PAGE_SIZE
-# define ICACHE_ALIAS_ORDER    (ICACHE_WAY_SHIFT - PAGE_SHIFT)
-# define ICACHE_ALIAS_MASK     (PAGE_MASK & (ICACHE_WAY_SIZE - 1))
-# define ICACHE_ALIAS(a)       (((a) & ICACHE_ALIAS_MASK) >> PAGE_SHIFT)
-# define ICACHE_ALIAS_EQ(a,b)  ((((a) ^ (b)) & ICACHE_ALIAS_MASK) == 0)
-#else
-# define ICACHE_ALIAS_ORDER    0
-#endif
-
-
-#ifdef __ASSEMBLY__
-
-#define __pgprot(x)    (x)
-
-#else
-
-/*
- * These are used to make use of C type-checking..
- */
-
-typedef struct { unsigned long pte; } pte_t;           /* page table entry */
-typedef struct { unsigned long pgd; } pgd_t;           /* PGD table entry */
-typedef struct { unsigned long pgprot; } pgprot_t;
-typedef struct page *pgtable_t;
-
-#define pte_val(x)     ((x).pte)
-#define pgd_val(x)     ((x).pgd)
-#define pgprot_val(x)  ((x).pgprot)
-
-#define __pte(x)       ((pte_t) { (x) } )
-#define __pgd(x)       ((pgd_t) { (x) } )
-#define __pgprot(x)    ((pgprot_t) { (x) } )
-
-/*
- * Pure 2^n version of get_order
- * Use 'nsau' instructions if supported by the processor or the generic version.
- */
-
-#if XCHAL_HAVE_NSA
-
-static inline __attribute_const__ int get_order(unsigned long size)
-{
-       int lz;
-       asm ("nsau %0, %1" : "=r" (lz) : "r" ((size - 1) >> PAGE_SHIFT));
-       return 32 - lz;
-}
-
-#else
-
-# include <asm-generic/page.h>
-
-#endif
-
-struct page;
-extern void clear_page(void *page);
-extern void copy_page(void *to, void *from);
-
-/*
- * If we have cache aliasing and writeback caches, we might have to do
- * some extra work
- */
-
-#if DCACHE_WAY_SIZE > PAGE_SIZE
-extern void clear_user_page(void*, unsigned long, struct page*);
-extern void copy_user_page(void*, void*, unsigned long, struct page*);
-#else
-# define clear_user_page(page, vaddr, pg)      clear_page(page)
-# define copy_user_page(to, from, vaddr, pg)   copy_page(to, from)
-#endif
-
-/*
- * This handles the memory map.  We handle pages at
- * XCHAL_KSEG_CACHED_VADDR for kernels with 32 bit address space.
- * These macros are for conversion of kernel address, not user
- * addresses.
- */
-
-#define __pa(x)                        ((unsigned long) (x) - PAGE_OFFSET)
-#define __va(x)                        ((void *)((unsigned long) (x) + PAGE_OFFSET))
-#define pfn_valid(pfn)         ((unsigned long)pfn < max_mapnr)
-#ifdef CONFIG_DISCONTIGMEM
-# error CONFIG_DISCONTIGMEM not supported
-#endif
-
-#define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
-#define page_to_virt(page)     __va(page_to_pfn(page) << PAGE_SHIFT)
-#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
-#define page_to_phys(page)     (page_to_pfn(page) << PAGE_SHIFT)
-
-#define WANT_PAGE_VIRTUAL
-
-
-#endif /* __ASSEMBLY__ */
-
-#define VM_DATA_DEFAULT_FLAGS  (VM_READ | VM_WRITE | VM_EXEC | \
-                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
-
-#include <asm-generic/memory_model.h>
-#endif /* _XTENSA_PAGE_H */
diff --git a/include/asm-xtensa/param.h b/include/asm-xtensa/param.h
deleted file mode 100644 (file)
index ba03d5a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * include/asm-xtensa/param.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PARAM_H
-#define _XTENSA_PARAM_H
-
-#ifdef __KERNEL__
-# define HZ            CONFIG_HZ       /* internal timer frequency */
-# define USER_HZ       100             /* for user interfaces in "ticks" */
-# define CLOCKS_PER_SEC (USER_HZ)      /* frequnzy at which times() counts */
-#else
-# define HZ            100
-#endif
-
-#define EXEC_PAGESIZE  4096
-
-#ifndef NGROUPS
-#define NGROUPS                32
-#endif
-
-#ifndef NOGROUP
-#define NOGROUP                (-1)
-#endif
-
-#define MAXHOSTNAMELEN 64      /* max length of hostname */
-
-#endif /* _XTENSA_PARAM_H */
diff --git a/include/asm-xtensa/pci-bridge.h b/include/asm-xtensa/pci-bridge.h
deleted file mode 100644 (file)
index 00fcbd7..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * include/asm-xtensa/pci-bridge.h
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- *
- * Copyright (C) 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PCI_BRIDGE_H
-#define _XTENSA_PCI_BRIDGE_H
-
-#ifdef __KERNEL__
-
-struct device_node;
-struct pci_controller;
-
-/*
- * pciauto_bus_scan() enumerates the pci space.
- */
-
-extern int pciauto_bus_scan(struct pci_controller *, int);
-
-struct pci_space {
-       unsigned long start;
-       unsigned long end;
-       unsigned long base;
-};
-
-/*
- * Structure of a PCI controller (host bridge)
- */
-
-struct pci_controller {
-       int index;                      /* used for pci_controller_num */
-       struct pci_controller *next;
-        struct pci_bus *bus;
-       void *arch_data;
-
-       int first_busno;
-       int last_busno;
-
-       struct pci_ops *ops;
-       volatile unsigned int *cfg_addr;
-       volatile unsigned char *cfg_data;
-
-       /* Currently, we limit ourselves to 1 IO range and 3 mem
-        * ranges since the common pci_bus structure can't handle more
-        */
-       struct resource io_resource;
-       struct resource mem_resources[3];
-       int mem_resource_count;
-
-       /* Host bridge I/O and Memory space
-        * Used for BAR placement algorithms
-        */
-       struct pci_space io_space;
-       struct pci_space mem_space;
-
-       /* Return the interrupt number fo a device. */
-       int (*map_irq)(struct pci_dev*, u8, u8);
-
-};
-
-static inline void pcibios_init_resource(struct resource *res,
-               unsigned long start, unsigned long end, int flags, char *name)
-{
-       res->start = start;
-       res->end = end;
-       res->flags = flags;
-       res->name = name;
-       res->parent = NULL;
-       res->sibling = NULL;
-       res->child = NULL;
-}
-
-
-/* These are used for config access before all the PCI probing has been done. */
-int early_read_config_byte(struct pci_controller*, int, int, int, u8*);
-int early_read_config_word(struct pci_controller*, int, int, int, u16*);
-int early_read_config_dword(struct pci_controller*, int, int, int, u32*);
-int early_write_config_byte(struct pci_controller*, int, int, int, u8);
-int early_write_config_word(struct pci_controller*, int, int, int, u16);
-int early_write_config_dword(struct pci_controller*, int, int, int, u32);
-
-#endif /* __KERNEL__ */
-#endif /* _XTENSA_PCI_BRIDGE_H */
diff --git a/include/asm-xtensa/pci.h b/include/asm-xtensa/pci.h
deleted file mode 100644 (file)
index 66410ac..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * linux/include/asm-xtensa/pci.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PCI_H
-#define _XTENSA_PCI_H
-
-#ifdef __KERNEL__
-
-/* Can be used to override the logic in pci_scan_bus for skipping
- * already-configured bus numbers - to be used for buggy BIOSes
- * or architectures with incomplete PCI setup by the loader
- */
-
-#define pcibios_assign_all_busses()    0
-
-extern struct pci_controller* pcibios_alloc_controller(void);
-
-static inline void pcibios_set_master(struct pci_dev *dev)
-{
-       /* No special bus mastering setup handling */
-}
-
-static inline void pcibios_penalize_isa_irq(int irq)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
-/* Assume some values. (We should revise them, if necessary) */
-
-#define PCIBIOS_MIN_IO         0x2000
-#define PCIBIOS_MIN_MEM                0x10000000
-
-/* Dynamic DMA mapping stuff.
- * Xtensa has everything mapped statically like x86.
- */
-
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <asm/scatterlist.h>
-#include <linux/string.h>
-#include <asm/io.h>
-
-struct pci_dev;
-
-/* The PCI address space does equal the physical memory address space.
- * The networking and block device layers use this boolean for bounce buffer
- * decisions.
- */
-
-#define PCI_DMA_BUS_IS_PHYS    (1)
-
-/* pci_unmap_{page,single} is a no-op, so */
-#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
-#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
-#define pci_unmap_addr(PTR, ADDR_NAME)         (0)
-#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)        do { } while (0)
-#define pci_ubnmap_len(PTR, LEN_NAME)          (0)
-#define pci_unmap_len_set(PTR, LEN_NAME, VAL)  do { } while (0)
-
-/* Map a range of PCI memory or I/O space for a device into user space */
-int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
-                        enum pci_mmap_state mmap_state, int write_combine);
-
-/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
-#define HAVE_PCI_MMAP  1
-
-#endif /* __KERNEL__ */
-
-/* Implement the pci_ DMA API in terms of the generic device dma_ one */
-#include <asm-generic/pci-dma-compat.h>
-
-/* Generic PCI */
-#include <asm-generic/pci.h>
-
-#endif /* _XTENSA_PCI_H */
diff --git a/include/asm-xtensa/percpu.h b/include/asm-xtensa/percpu.h
deleted file mode 100644 (file)
index 6d2bc2a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * linux/include/asm-xtensa/percpu.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PERCPU__
-#define _XTENSA_PERCPU__
-
-#include <asm-generic/percpu.h>
-
-#endif /* _XTENSA_PERCPU__ */
diff --git a/include/asm-xtensa/pgalloc.h b/include/asm-xtensa/pgalloc.h
deleted file mode 100644 (file)
index 4f4a798..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * include/asm-xtensa/pgalloc.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Copyright (C) 2001-2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PGALLOC_H
-#define _XTENSA_PGALLOC_H
-
-#ifdef __KERNEL__
-
-#include <linux/highmem.h>
-
-/*
- * Allocating and freeing a pmd is trivial: the 1-entry pmd is
- * inside the pgd, so has no extra memory associated with it.
- */
-
-#define pmd_populate_kernel(mm, pmdp, ptep)                                 \
-       (pmd_val(*(pmdp)) = ((unsigned long)ptep))
-#define pmd_populate(mm, pmdp, page)                                        \
-       (pmd_val(*(pmdp)) = ((unsigned long)page_to_virt(page)))
-#define pmd_pgtable(pmd) pmd_page(pmd)
-
-static inline pgd_t*
-pgd_alloc(struct mm_struct *mm)
-{
-       return (pgd_t*) __get_free_pages(GFP_KERNEL | __GFP_ZERO, PGD_ORDER);
-}
-
-static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
-{
-       free_page((unsigned long)pgd);
-}
-
-/* Use a slab cache for the pte pages (see also sparc64 implementation) */
-
-extern struct kmem_cache *pgtable_cache;
-
-static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 
-                                        unsigned long address)
-{
-       return kmem_cache_alloc(pgtable_cache, GFP_KERNEL|__GFP_REPEAT);
-}
-
-static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
-                                       unsigned long addr)
-{
-       struct page *page;
-
-       page = virt_to_page(pte_alloc_one_kernel(mm, addr));
-       pgtable_page_ctor(page);
-       return page;
-}
-
-static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
-{
-       kmem_cache_free(pgtable_cache, pte);
-}
-
-static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
-{
-       pgtable_page_dtor(pte);
-       kmem_cache_free(pgtable_cache, page_address(pte));
-}
-#define pmd_pgtable(pmd) pmd_page(pmd)
-
-#endif /* __KERNEL__ */
-#endif /* _XTENSA_PGALLOC_H */
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h
deleted file mode 100644 (file)
index 8014d96..0000000
+++ /dev/null
@@ -1,416 +0,0 @@
-/*
- * include/asm-xtensa/pgtable.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Copyright (C) 2001 - 2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PGTABLE_H
-#define _XTENSA_PGTABLE_H
-
-#include <asm-generic/pgtable-nopmd.h>
-#include <asm/page.h>
-
-/*
- * We only use two ring levels, user and kernel space.
- */
-
-#define USER_RING              1       /* user ring level */
-#define KERNEL_RING            0       /* kernel ring level */
-
-/*
- * The Xtensa architecture port of Linux has a two-level page table system,
- * i.e. the logical three-level Linux page table layout is folded.
- * Each task has the following memory page tables:
- *
- *   PGD table (page directory), ie. 3rd-level page table:
- *     One page (4 kB) of 1024 (PTRS_PER_PGD) pointers to PTE tables
- *     (Architectures that don't have the PMD folded point to the PMD tables)
- *
- *     The pointer to the PGD table for a given task can be retrieved from
- *     the task structure (struct task_struct*) t, e.g. current():
- *       (t->mm ? t->mm : t->active_mm)->pgd
- *
- *   PMD tables (page middle-directory), ie. 2nd-level page tables:
- *     Absent for the Xtensa architecture (folded, PTRS_PER_PMD == 1).
- *
- *   PTE tables (page table entry), ie. 1st-level page tables:
- *     One page (4 kB) of 1024 (PTRS_PER_PTE) PTEs with a special PTE
- *     invalid_pte_table for absent mappings.
- *
- * The individual pages are 4 kB big with special pages for the empty_zero_page.
- */
-
-#define PGDIR_SHIFT    22
-#define PGDIR_SIZE     (1UL << PGDIR_SHIFT)
-#define PGDIR_MASK     (~(PGDIR_SIZE-1))
-
-/*
- * Entries per page directory level: we use two-level, so
- * we don't really have any PMD directory physically.
- */
-#define PTRS_PER_PTE           1024
-#define PTRS_PER_PTE_SHIFT     10
-#define PTRS_PER_PGD           1024
-#define PGD_ORDER              0
-#define USER_PTRS_PER_PGD      (TASK_SIZE/PGDIR_SIZE)
-#define FIRST_USER_ADDRESS     0
-#define FIRST_USER_PGD_NR      (FIRST_USER_ADDRESS >> PGDIR_SHIFT)
-
-/*
- * Virtual memory area. We keep a distance to other memory regions to be
- * on the safe side. We also use this area for cache aliasing.
- */
-
-#define VMALLOC_START          0xC0000000
-#define VMALLOC_END            0xC7FEFFFF
-#define TLBTEMP_BASE_1         0xC7FF0000
-#define TLBTEMP_BASE_2         0xC7FF8000
-
-/*
- * Xtensa Linux config PTE layout (when present):
- *     31-12:  PPN
- *     11-6:   Software
- *     5-4:    RING
- *     3-0:    CA
- *
- * Similar to the Alpha and MIPS ports, we need to keep track of the ref
- * and mod bits in software.  We have a software "you can read
- * from this page" bit, and a hardware one which actually lets the
- * process read from the page.  On the same token we have a software
- * writable bit and the real hardware one which actually lets the
- * process write to the page.
- *
- * See further below for PTE layout for swapped-out pages.
- */
-
-#define _PAGE_HW_EXEC          (1<<0)  /* hardware: page is executable */
-#define _PAGE_HW_WRITE         (1<<1)  /* hardware: page is writable */
-
-#define _PAGE_FILE             (1<<1)  /* non-linear mapping, if !present */
-#define _PAGE_PROTNONE         (3<<0)  /* special case for VM_PROT_NONE */
-
-/* None of these cache modes include MP coherency:  */
-#define _PAGE_CA_BYPASS                (0<<2)  /* bypass, non-speculative */
-#define _PAGE_CA_WB            (1<<2)  /* write-back */
-#define _PAGE_CA_WT            (2<<2)  /* write-through */
-#define _PAGE_CA_MASK          (3<<2)
-#define _PAGE_INVALID          (3<<2)
-
-#define _PAGE_USER             (1<<4)  /* user access (ring=1) */
-
-/* Software */
-#define _PAGE_WRITABLE_BIT     6
-#define _PAGE_WRITABLE         (1<<6)  /* software: page writable */
-#define _PAGE_DIRTY            (1<<7)  /* software: page dirty */
-#define _PAGE_ACCESSED         (1<<8)  /* software: page accessed (read) */
-
-/* On older HW revisions, we always have to set bit 0 */
-#if XCHAL_HW_VERSION_MAJOR < 2000
-# define _PAGE_VALID           (1<<0)
-#else
-# define _PAGE_VALID           0
-#endif
-
-#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
-#define _PAGE_PRESENT  (_PAGE_VALID | _PAGE_CA_WB | _PAGE_ACCESSED)
-
-#ifdef CONFIG_MMU
-
-#define PAGE_NONE         __pgprot(_PAGE_INVALID | _PAGE_USER | _PAGE_PROTNONE)
-#define PAGE_COPY         __pgprot(_PAGE_PRESENT | _PAGE_USER)
-#define PAGE_COPY_EXEC    __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC)
-#define PAGE_READONLY     __pgprot(_PAGE_PRESENT | _PAGE_USER)
-#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC)
-#define PAGE_SHARED       __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE)
-#define PAGE_SHARED_EXEC \
-       __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE | _PAGE_HW_EXEC)
-#define PAGE_KERNEL       __pgprot(_PAGE_PRESENT | _PAGE_HW_WRITE)
-#define PAGE_KERNEL_EXEC   __pgprot(_PAGE_PRESENT|_PAGE_HW_WRITE|_PAGE_HW_EXEC)
-
-#if (DCACHE_WAY_SIZE > PAGE_SIZE)
-# define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED)
-#else
-# define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED | _PAGE_CA_WB)
-#endif
-
-#else /* no mmu */
-
-# define PAGE_NONE       __pgprot(0)
-# define PAGE_SHARED     __pgprot(0)
-# define PAGE_COPY       __pgprot(0)
-# define PAGE_READONLY   __pgprot(0)
-# define PAGE_KERNEL     __pgprot(0)
-
-#endif
-
-/*
- * On certain configurations of Xtensa MMUs (eg. the initial Linux config),
- * the MMU can't do page protection for execute, and considers that the same as
- * read.  Also, write permissions may imply read permissions.
- * What follows is the closest we can get by reasonable means..
- * See linux/mm/mmap.c for protection_map[] array that uses these definitions.
- */
-#define __P000 PAGE_NONE               /* private --- */
-#define __P001 PAGE_READONLY           /* private --r */
-#define __P010 PAGE_COPY               /* private -w- */
-#define __P011 PAGE_COPY               /* private -wr */
-#define __P100 PAGE_READONLY_EXEC      /* private x-- */
-#define __P101 PAGE_READONLY_EXEC      /* private x-r */
-#define __P110 PAGE_COPY_EXEC          /* private xw- */
-#define __P111 PAGE_COPY_EXEC          /* private xwr */
-
-#define __S000 PAGE_NONE               /* shared  --- */
-#define __S001 PAGE_READONLY           /* shared  --r */
-#define __S010 PAGE_SHARED             /* shared  -w- */
-#define __S011 PAGE_SHARED             /* shared  -wr */
-#define __S100 PAGE_READONLY_EXEC      /* shared  x-- */
-#define __S101 PAGE_READONLY_EXEC      /* shared  x-r */
-#define __S110 PAGE_SHARED_EXEC        /* shared  xw- */
-#define __S111 PAGE_SHARED_EXEC        /* shared  xwr */
-
-#ifndef __ASSEMBLY__
-
-#define pte_ERROR(e) \
-       printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
-#define pgd_ERROR(e) \
-       printk("%s:%d: bad pgd entry %08lx.\n", __FILE__, __LINE__, pgd_val(e))
-
-extern unsigned long empty_zero_page[1024];
-
-#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
-
-extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)];
-
-/*
- * The pmd contains the kernel virtual address of the pte page.
- */
-#define pmd_page_vaddr(pmd) ((unsigned long)(pmd_val(pmd) & PAGE_MASK))
-#define pmd_page(pmd) virt_to_page(pmd_val(pmd))
-
-/*
- * pte status.
- */
-#define pte_none(pte)   (pte_val(pte) == _PAGE_INVALID)
-#define pte_present(pte)                                               \
-       (((pte_val(pte) & _PAGE_CA_MASK) != _PAGE_INVALID)              \
-        || ((pte_val(pte) & _PAGE_PROTNONE) == _PAGE_PROTNONE))
-#define pte_clear(mm,addr,ptep)                                                \
-       do { update_pte(ptep, __pte(_PAGE_INVALID)); } while(0)
-
-#define pmd_none(pmd)   (!pmd_val(pmd))
-#define pmd_present(pmd) (pmd_val(pmd) & PAGE_MASK)
-#define pmd_bad(pmd)    (pmd_val(pmd) & ~PAGE_MASK)
-#define pmd_clear(pmdp)         do { set_pmd(pmdp, __pmd(0)); } while (0)
-
-static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; }
-static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
-static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
-static inline int pte_file(pte_t pte)  { return pte_val(pte) & _PAGE_FILE; }
-static inline int pte_special(pte_t pte) { return 0; }
-
-static inline pte_t pte_wrprotect(pte_t pte)   
-       { pte_val(pte) &= ~(_PAGE_WRITABLE | _PAGE_HW_WRITE); return pte; }
-static inline pte_t pte_mkclean(pte_t pte)
-       { pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HW_WRITE); return pte; }
-static inline pte_t pte_mkold(pte_t pte)
-       { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
-static inline pte_t pte_mkdirty(pte_t pte)
-       { pte_val(pte) |= _PAGE_DIRTY; return pte; }
-static inline pte_t pte_mkyoung(pte_t pte)
-       { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
-static inline pte_t pte_mkwrite(pte_t pte)
-       { pte_val(pte) |= _PAGE_WRITABLE; return pte; }
-static inline pte_t pte_mkspecial(pte_t pte)
-       { return pte; }
-
-/*
- * Conversion functions: convert a page and protection to a page entry,
- * and a page entry and page directory to the page they refer to.
- */
-
-#define pte_pfn(pte)           (pte_val(pte) >> PAGE_SHIFT)
-#define pte_same(a,b)          (pte_val(a) == pte_val(b))
-#define pte_page(x)            pfn_to_page(pte_pfn(x))
-#define pfn_pte(pfn, prot)     __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
-#define mk_pte(page, prot)     pfn_pte(page_to_pfn(page), prot)
-
-static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
-{
-       return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
-}
-
-/*
- * Certain architectures need to do special things when pte's
- * within a page table are directly modified.  Thus, the following
- * hook is made available.
- */
-static inline void update_pte(pte_t *ptep, pte_t pteval)
-{
-       *ptep = pteval;
-#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
-       __asm__ __volatile__ ("dhwb %0, 0" :: "a" (ptep));
-#endif
-
-}
-
-struct mm_struct;
-
-static inline void
-set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval)
-{
-       update_pte(ptep, pteval);
-}
-
-
-static inline void
-set_pmd(pmd_t *pmdp, pmd_t pmdval)
-{
-       *pmdp = pmdval;
-}
-
-struct vm_area_struct;
-
-static inline int
-ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr,
-                         pte_t *ptep)
-{
-       pte_t pte = *ptep;
-       if (!pte_young(pte))
-               return 0;
-       update_pte(ptep, pte_mkold(pte));
-       return 1;
-}
-
-static inline pte_t
-ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
-{
-       pte_t pte = *ptep;
-       pte_clear(mm, addr, ptep);
-       return pte;
-}
-
-static inline void
-ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
-{
-       pte_t pte = *ptep;
-       update_pte(ptep, pte_wrprotect(pte));
-}
-
-/* to find an entry in a kernel page-table-directory */
-#define pgd_offset_k(address)  pgd_offset(&init_mm, address)
-
-/* to find an entry in a page-table-directory */
-#define pgd_offset(mm,address) ((mm)->pgd + pgd_index(address))
-
-#define pgd_index(address)     ((address) >> PGDIR_SHIFT)
-
-/* Find an entry in the second-level page table.. */
-#define pmd_offset(dir,address) ((pmd_t*)(dir))
-
-/* Find an entry in the third-level page table.. */
-#define pte_index(address)     (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
-#define pte_offset_kernel(dir,addr)                                    \
-       ((pte_t*) pmd_page_vaddr(*(dir)) + pte_index(addr))
-#define pte_offset_map(dir,addr)       pte_offset_kernel((dir),(addr))
-#define pte_offset_map_nested(dir,addr)        pte_offset_kernel((dir),(addr))
-
-#define pte_unmap(pte)         do { } while (0)
-#define pte_unmap_nested(pte)  do { } while (0)
-
-
-/*
- * Encode and decode a swap entry.
- *
- * Format of swap pte:
- *  bit           0       MBZ
- *  bit           1       page-file (must be zero)
- *  bits   2 -  3  page hw access mode (must be 11: _PAGE_INVALID)
- *  bits   4 -  5  ring protection (must be 01: _PAGE_USER)
- *  bits   6 - 10  swap type (5 bits -> 32 types)
- *  bits  11 - 31  swap offset / PAGE_SIZE (21 bits -> 8GB)
- * Format of file pte:
- *  bit           0       MBZ
- *  bit           1       page-file (must be one: _PAGE_FILE)
- *  bits   2 -  3  page hw access mode (must be 11: _PAGE_INVALID)
- *  bits   4 -  5  ring protection (must be 01: _PAGE_USER)
- *  bits   6 - 31  file offset / PAGE_SIZE
- */
-
-#define __swp_type(entry)      (((entry).val >> 6) & 0x1f)
-#define __swp_offset(entry)    ((entry).val >> 11)
-#define __swp_entry(type,offs) \
-       ((swp_entry_t) {((type) << 6) | ((offs) << 11) | _PAGE_INVALID})
-#define __pte_to_swp_entry(pte)        ((swp_entry_t) { pte_val(pte) })
-#define __swp_entry_to_pte(x)  ((pte_t) { (x).val })
-
-#define PTE_FILE_MAX_BITS      28
-#define pte_to_pgoff(pte)      (pte_val(pte) >> 4)
-#define pgoff_to_pte(off)      \
-       ((pte_t) { ((off) << 4) | _PAGE_INVALID | _PAGE_FILE })
-
-#endif /*  !defined (__ASSEMBLY__) */
-
-
-#ifdef __ASSEMBLY__
-
-/* Assembly macro _PGD_INDEX is the same as C pgd_index(unsigned long),
- *                _PGD_OFFSET as C pgd_offset(struct mm_struct*, unsigned long),
- *                _PMD_OFFSET as C pmd_offset(pgd_t*, unsigned long)
- *                _PTE_OFFSET as C pte_offset(pmd_t*, unsigned long)
- *
- * Note: We require an additional temporary register which can be the same as
- *       the register that holds the address.
- *
- * ((pte_t*) ((unsigned long)(pmd_val(*pmd) & PAGE_MASK)) + pte_index(addr))
- *
- */
-#define _PGD_INDEX(rt,rs)      extui   rt, rs, PGDIR_SHIFT, 32-PGDIR_SHIFT
-#define _PTE_INDEX(rt,rs)      extui   rt, rs, PAGE_SHIFT, PTRS_PER_PTE_SHIFT
-
-#define _PGD_OFFSET(mm,adr,tmp)                l32i    mm, mm, MM_PGD;         \
-                                       _PGD_INDEX(tmp, adr);           \
-                                       addx4   mm, tmp, mm
-
-#define _PTE_OFFSET(pmd,adr,tmp)       _PTE_INDEX(tmp, adr);           \
-                                       srli    pmd, pmd, PAGE_SHIFT;   \
-                                       slli    pmd, pmd, PAGE_SHIFT;   \
-                                       addx4   pmd, tmp, pmd
-
-#else
-
-extern void paging_init(void);
-
-#define kern_addr_valid(addr)  (1)
-
-extern  void update_mmu_cache(struct vm_area_struct * vma,
-                             unsigned long address, pte_t pte);
-
-/*
- * remap a physical page `pfn' of size `size' with page protection `prot'
- * into virtual address `from'
- */
-
-#define io_remap_pfn_range(vma,from,pfn,size,prot) \
-                remap_pfn_range(vma, from, pfn, size, prot)
-
-
-extern void pgtable_cache_init(void);
-
-typedef pte_t *pte_addr_t;
-
-#endif /* !defined (__ASSEMBLY__) */
-
-#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
-#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
-#define __HAVE_ARCH_PTEP_SET_WRPROTECT
-#define __HAVE_ARCH_PTEP_MKDIRTY
-#define __HAVE_ARCH_PTE_SAME
-
-#include <asm-generic/pgtable.h>
-
-#endif /* _XTENSA_PGTABLE_H */
diff --git a/include/asm-xtensa/platform-iss/hardware.h b/include/asm-xtensa/platform-iss/hardware.h
deleted file mode 100644 (file)
index 6930c12..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * include/asm-xtensa/platform-iss/hardware.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 Tensilica Inc.
- */
-
-/*
- * This file contains the default configuration of ISS.
- */
-
-#ifndef _XTENSA_PLATFORM_ISS_HARDWARE_H
-#define _XTENSA_PLATFORM_ISS_HARDWARE_H
-
-/*
- * Memory configuration.
- */
-
-#define PLATFORM_DEFAULT_MEM_START     0x00000000
-#define PLATFORM_DEFAULT_MEM_SIZE      0x08000000
-
-/*
- * Interrupt configuration.
- */
-
-#endif /* _XTENSA_PLATFORM_ISS_HARDWARE_H */
diff --git a/include/asm-xtensa/platform-iss/simcall.h b/include/asm-xtensa/platform-iss/simcall.h
deleted file mode 100644 (file)
index b7952c0..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * include/asm-xtensa/platform-iss/simcall.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PLATFORM_ISS_SIMCALL_H
-#define _XTENSA_PLATFORM_ISS_SIMCALL_H
-
-
-/*
- *  System call like services offered by the simulator host.
- */
-
-#define SYS_nop                0       /* unused */
-#define SYS_exit       1       /*x*/
-#define SYS_fork       2
-#define SYS_read       3       /*x*/
-#define SYS_write      4       /*x*/
-#define SYS_open       5       /*x*/
-#define SYS_close      6       /*x*/
-#define SYS_rename     7       /*x 38 - waitpid */
-#define SYS_creat      8       /*x*/
-#define SYS_link       9       /*x (not implemented on WIN32) */
-#define SYS_unlink     10      /*x*/
-#define SYS_execv      11      /* n/a - execve */
-#define SYS_execve     12      /* 11 - chdir */
-#define SYS_pipe       13      /* 42 - time */
-#define SYS_stat       14      /* 106 - mknod */
-#define SYS_chmod      15
-#define SYS_chown      16      /* 202 - lchown */
-#define SYS_utime      17      /* 30 - break */
-#define SYS_wait       18      /* n/a - oldstat */
-#define SYS_lseek      19      /*x*/
-#define SYS_getpid     20
-#define SYS_isatty     21      /* n/a - mount */
-#define SYS_fstat      22      /* 108 - oldumount */
-#define SYS_time       23      /* 13 - setuid */
-#define SYS_gettimeofday 24    /*x 78 - getuid (not implemented on WIN32) */
-#define SYS_times      25      /*X 43 - stime (Xtensa-specific implementation) */
-#define SYS_socket      26
-#define SYS_sendto      27
-#define SYS_recvfrom    28
-#define SYS_select_one  29      /* not compitible select, one file descriptor at the time */
-#define SYS_bind        30
-#define SYS_ioctl      31
-
-/*
- * SYS_select_one specifiers
- */
-
-#define  XTISS_SELECT_ONE_READ    1
-#define  XTISS_SELECT_ONE_WRITE   2
-#define  XTISS_SELECT_ONE_EXCEPT  3
-
-
-#endif /* _XTENSA_PLATFORM_ISS_SIMCALL_H */
-
diff --git a/include/asm-xtensa/platform.h b/include/asm-xtensa/platform.h
deleted file mode 100644 (file)
index 48135a9..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * include/asm-xtensa/platform.h
- *
- * Platform specific functions
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PLATFORM_H
-#define _XTENSA_PLATFORM_H
-
-#include <linux/types.h>
-#include <linux/pci.h>
-
-#include <asm/bootparam.h>
-
-/*
- * platform_init is called before the mmu is initialized to give the
- * platform a early hook-up. bp_tag_t is a list of configuration tags
- * passed from the boot-loader.
- */
-extern void platform_init(bp_tag_t*);
-
-/*
- * platform_setup is called from setup_arch with a pointer to the command-line
- * string.
- */
-extern void platform_setup (char **);
-
-/*
- * platform_init_irq is called from init_IRQ.
- */
-extern void platform_init_irq (void);
-
-/*
- * platform_restart is called to restart the system.
- */
-extern void platform_restart (void);
-
-/*
- * platform_halt is called to stop the system and halt.
- */
-extern void platform_halt (void);
-
-/*
- * platform_power_off is called to stop the system and power it off.
- */
-extern void platform_power_off (void);
-
-/*
- * platform_idle is called from the idle function.
- */
-extern void platform_idle (void);
-
-/*
- * platform_heartbeat is called every HZ
- */
-extern void platform_heartbeat (void);
-
-/*
- * platform_pcibios_init is called to allow the platform to setup the pci bus.
- */
-extern void platform_pcibios_init (void);
-
-/*
- * platform_pcibios_fixup allows to modify the PCI configuration.
- */
-extern int platform_pcibios_fixup (void);
-
-/*
- * platform_calibrate_ccount calibrates cpu clock freq (CONFIG_XTENSA_CALIBRATE)
- */
-extern void platform_calibrate_ccount (void);
-
-/*
- * platform_get_rtc_time returns RTC seconds (returns 0 for no error)
- */
-extern int platform_get_rtc_time(time_t*);
-
-/*
- * platform_set_rtc_time set RTC seconds (returns 0 for no error)
- */
-extern int platform_set_rtc_time(time_t);
-
-
-#endif /* _XTENSA_PLATFORM_H */
-
diff --git a/include/asm-xtensa/poll.h b/include/asm-xtensa/poll.h
deleted file mode 100644 (file)
index 9d2d599..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * include/asm-xtensa/poll.h
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_POLL_H
-#define _XTENSA_POLL_H
-
-#define POLLWRNORM     POLLOUT
-#define POLLWRBAND     0x0100
-#define POLLREMOVE     0x0800
-
-#include <asm-generic/poll.h>
-
-#endif /* _XTENSA_POLL_H */
diff --git a/include/asm-xtensa/posix_types.h b/include/asm-xtensa/posix_types.h
deleted file mode 100644 (file)
index 43f9dd1..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * include/asm-xtensa/posix_types.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Largely copied from include/asm-ppc/posix_types.h
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_POSIX_TYPES_H
-#define _XTENSA_POSIX_TYPES_H
-
-/*
- * This file is generally used by user-level software, so you need to
- * be a little careful about namespace pollution etc.  Also, we cannot
- * assume GCC is being used.
- */
-
-typedef unsigned long  __kernel_ino_t;
-typedef unsigned int   __kernel_mode_t;
-typedef unsigned long  __kernel_nlink_t;
-typedef long           __kernel_off_t;
-typedef int            __kernel_pid_t;
-typedef unsigned short __kernel_ipc_pid_t;
-typedef unsigned int   __kernel_uid_t;
-typedef unsigned int   __kernel_gid_t;
-typedef unsigned int   __kernel_size_t;
-typedef int            __kernel_ssize_t;
-typedef long           __kernel_ptrdiff_t;
-typedef long           __kernel_time_t;
-typedef long           __kernel_suseconds_t;
-typedef long           __kernel_clock_t;
-typedef int            __kernel_timer_t;
-typedef int            __kernel_clockid_t;
-typedef int            __kernel_daddr_t;
-typedef char *         __kernel_caddr_t;
-typedef unsigned short __kernel_uid16_t;
-typedef unsigned short __kernel_gid16_t;
-typedef unsigned int   __kernel_uid32_t;
-typedef unsigned int   __kernel_gid32_t;
-
-typedef unsigned short __kernel_old_uid_t;
-typedef unsigned short __kernel_old_gid_t;
-typedef unsigned short __kernel_old_dev_t;
-
-#ifdef __GNUC__
-typedef long long      __kernel_loff_t;
-#endif
-
-typedef struct {
-       int     val[2];
-} __kernel_fsid_t;
-
-#ifndef __GNUC__
-
-#define        __FD_SET(d, set)        ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
-#define        __FD_CLR(d, set)        ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
-#define        __FD_ISSET(d, set)      ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
-#define        __FD_ZERO(set)  \
-  ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set)))
-
-#else /* __GNUC__ */
-
-#if defined(__KERNEL__)
-/* With GNU C, use inline functions instead so args are evaluated only once: */
-
-#undef __FD_SET
-static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
-{
-       unsigned long _tmp = fd / __NFDBITS;
-       unsigned long _rem = fd % __NFDBITS;
-       fdsetp->fds_bits[_tmp] |= (1UL<<_rem);
-}
-
-#undef __FD_CLR
-static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
-{
-       unsigned long _tmp = fd / __NFDBITS;
-       unsigned long _rem = fd % __NFDBITS;
-       fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem);
-}
-
-#undef __FD_ISSET
-static __inline__ int __FD_ISSET(unsigned long fd, __kernel_fd_set *p)
-{
-       unsigned long _tmp = fd / __NFDBITS;
-       unsigned long _rem = fd % __NFDBITS;
-       return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0;
-}
-
-/*
- * This will unroll the loop for the normal constant case (8 ints,
- * for a 256-bit fd_set)
- */
-#undef __FD_ZERO
-static __inline__ void __FD_ZERO(__kernel_fd_set *p)
-{
-       unsigned int *tmp = (unsigned int *)p->fds_bits;
-       int i;
-
-       if (__builtin_constant_p(__FDSET_LONGS)) {
-               switch (__FDSET_LONGS) {
-                       case 8:
-                               tmp[0] = 0; tmp[1] = 0; tmp[2] = 0; tmp[3] = 0;
-                               tmp[4] = 0; tmp[5] = 0; tmp[6] = 0; tmp[7] = 0;
-                               return;
-               }
-       }
-       i = __FDSET_LONGS;
-       while (i) {
-               i--;
-               *tmp = 0;
-               tmp++;
-       }
-}
-
-#endif /* defined(__KERNEL__) */
-#endif /* __GNUC__ */
-#endif /* _XTENSA_POSIX_TYPES_H */
diff --git a/include/asm-xtensa/processor.h b/include/asm-xtensa/processor.h
deleted file mode 100644 (file)
index 4918a4e..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * include/asm-xtensa/processor.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PROCESSOR_H
-#define _XTENSA_PROCESSOR_H
-
-#include <asm/variant/core.h>
-#include <asm/coprocessor.h>
-
-#include <linux/compiler.h>
-#include <asm/ptrace.h>
-#include <asm/types.h>
-#include <asm/regs.h>
-
-/* Assertions. */
-
-#if (XCHAL_HAVE_WINDOWED != 1)
-# error Linux requires the Xtensa Windowed Registers Option.
-#endif
-
-/*
- * User space process size: 1 GB.
- * Windowed call ABI requires caller and callee to be located within the same
- * 1 GB region. The C compiler places trampoline code on the stack for sources
- * that take the address of a nested C function (a feature used by glibc), so
- * the 1 GB requirement applies to the stack as well.
- */
-
-#define TASK_SIZE      __XTENSA_UL_CONST(0x40000000)
-#define STACK_TOP      TASK_SIZE
-#define STACK_TOP_MAX  STACK_TOP
-
-/*
- * General exception cause assigned to debug exceptions. Debug exceptions go
- * to their own vector, rather than the general exception vectors (user,
- * kernel, double); and their specific causes are reported via DEBUGCAUSE
- * rather than EXCCAUSE.  However it is sometimes convenient to redirect debug
- * exceptions to the general exception mechanism.  To do this, an otherwise
- * unused EXCCAUSE value was assigned to debug exceptions for this purpose.
- */
-
-#define EXCCAUSE_MAPPED_DEBUG  63
-
-/*
- * We use DEPC also as a flag to distinguish between double and regular
- * exceptions. For performance reasons, DEPC might contain the value of
- * EXCCAUSE for regular exceptions, so we use this definition to mark a
- * valid double exception address.
- * (Note: We use it in bgeui, so it should be 64, 128, or 256)
- */
-
-#define VALID_DOUBLE_EXCEPTION_ADDRESS 64
-
-/* LOCKLEVEL defines the interrupt level that masks all
- * general-purpose interrupts.
- */
-#define LOCKLEVEL 1
-
-/* WSBITS and WBBITS are the width of the WINDOWSTART and WINDOWBASE
- * registers
- */
-#define WSBITS  (XCHAL_NUM_AREGS / 4)      /* width of WINDOWSTART in bits */
-#define WBBITS  (XCHAL_NUM_AREGS_LOG2 - 2) /* width of WINDOWBASE in bits */
-
-#ifndef __ASSEMBLY__
-
-/* Build a valid return address for the specified call winsize.
- * winsize must be 1 (call4), 2 (call8), or 3 (call12)
- */
-#define MAKE_RA_FOR_CALL(ra,ws)   (((ra) & 0x3fffffff) | (ws) << 30)
-
-/* Convert return address to a valid pc
- * Note: We assume that the stack pointer is in the same 1GB ranges as the ra
- */
-#define MAKE_PC_FROM_RA(ra,sp)    (((ra) & 0x3fffffff) | ((sp) & 0xc0000000))
-
-typedef struct {
-    unsigned long seg;
-} mm_segment_t;
-
-struct thread_struct {
-
-       /* kernel's return address and stack pointer for context switching */
-       unsigned long ra; /* kernel's a0: return address and window call size */
-       unsigned long sp; /* kernel's a1: stack pointer */
-
-       mm_segment_t current_ds;    /* see uaccess.h for example uses */
-
-       /* struct xtensa_cpuinfo info; */
-
-       unsigned long bad_vaddr; /* last user fault */
-       unsigned long bad_uaddr; /* last kernel fault accessing user space */
-       unsigned long error_code;
-
-       unsigned long ibreak[XCHAL_NUM_IBREAK];
-       unsigned long dbreaka[XCHAL_NUM_DBREAK];
-       unsigned long dbreakc[XCHAL_NUM_DBREAK];
-
-       /* Make structure 16 bytes aligned. */
-       int align[0] __attribute__ ((aligned(16)));
-};
-
-
-/*
- * Default implementation of macro that returns current
- * instruction pointer ("program counter").
- */
-#define current_text_addr()  ({ __label__ _l; _l: &&_l;})
-
-
-/* This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE     (TASK_SIZE / 2)
-
-#define INIT_THREAD  \
-{                                                                      \
-       ra:             0,                                              \
-       sp:             sizeof(init_stack) + (long) &init_stack,        \
-       current_ds:     {0},                                            \
-       /*info:         {0}, */                                         \
-       bad_vaddr:      0,                                              \
-       bad_uaddr:      0,                                              \
-       error_code:     0,                                              \
-}
-
-
-/*
- * Do necessary setup to start up a newly executed thread.
- * Note: We set-up ps as if we did a call4 to the new pc.
- *       set_thread_state in signal.c depends on it.
- */
-#define USER_PS_VALUE ((1 << PS_WOE_BIT) |                             \
-                       (1 << PS_CALLINC_SHIFT) |                       \
-                       (USER_RING << PS_RING_SHIFT) |                  \
-                       (1 << PS_UM_BIT) |                              \
-                       (1 << PS_EXCM_BIT))
-
-/* Clearing a0 terminates the backtrace. */
-#define start_thread(regs, new_pc, new_sp) \
-       regs->pc = new_pc; \
-       regs->ps = USER_PS_VALUE; \
-       regs->areg[1] = new_sp; \
-       regs->areg[0] = 0; \
-       regs->wmask = 1; \
-       regs->depc = 0; \
-       regs->windowbase = 0; \
-       regs->windowstart = 1;
-
-/* Forward declaration */
-struct task_struct;
-struct mm_struct;
-
-/* Free all resources held by a thread. */
-#define release_thread(thread) do { } while(0)
-
-/* Prepare to copy thread state - unlazy all lazy status */
-extern void prepare_to_copy(struct task_struct*);
-
-/* Create a kernel thread without removing it from tasklists */
-extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
-
-/* Copy and release all segment info associated with a VM */
-#define copy_segments(p, mm)   do { } while(0)
-#define release_segments(mm)   do { } while(0)
-#define forget_segments()      do { } while (0)
-
-#define thread_saved_pc(tsk)   (task_pt_regs(tsk)->pc)
-
-extern unsigned long get_wchan(struct task_struct *p);
-
-#define KSTK_EIP(tsk)          (task_pt_regs(tsk)->pc)
-#define KSTK_ESP(tsk)          (task_pt_regs(tsk)->areg[1])
-
-#define cpu_relax()  barrier()
-
-/* Special register access. */
-
-#define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v));
-#define RSR(v,sr) __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v));
-
-#define set_sr(x,sr) ({unsigned int v=(unsigned int)x; WSR(v,sr);})
-#define get_sr(sr) ({unsigned int v; RSR(v,sr); v; })
-
-#endif /* __ASSEMBLY__ */
-#endif /* _XTENSA_PROCESSOR_H */
diff --git a/include/asm-xtensa/ptrace.h b/include/asm-xtensa/ptrace.h
deleted file mode 100644 (file)
index 089b0db..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * include/asm-xtensa/ptrace.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_PTRACE_H
-#define _XTENSA_PTRACE_H
-
-/*
- * Kernel stack
- *
- *             +-----------------------+  -------- STACK_SIZE
- *             |     register file     |  |
- *             +-----------------------+  |
- *             |    struct pt_regs     |  |
- *             +-----------------------+  | ------ PT_REGS_OFFSET
- * double      :  16 bytes spill area  :  |  ^
- * excetion    :- - - - - - - - - - - -:  |  |
- * frame       :    struct pt_regs     :  |  |
- *             :- - - - - - - - - - - -:  |  |
- *             |                       |  |  |
- *             |     memory stack      |  |  |
- *             |                       |  |  |
- *             ~                       ~  ~  ~
- *             ~                       ~  ~  ~
- *             |                       |  |  |
- *             |                       |  |  |
- *             +-----------------------+  |  | --- STACK_BIAS
- *             |  struct task_struct   |  |  |  ^
- *  current --> +-----------------------+  |  |  |
- *             |  struct thread_info   |  |  |  |
- *             +-----------------------+ --------
- */
-
-#define KERNEL_STACK_SIZE (2 * PAGE_SIZE)
-
-/*  Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */
-
-#define EXC_TABLE_KSTK         0x004   /* Kernel Stack */
-#define EXC_TABLE_DOUBLE_SAVE  0x008   /* Double exception save area for a0 */
-#define EXC_TABLE_FIXUP                0x00c   /* Fixup handler */
-#define EXC_TABLE_PARAM                0x010   /* For passing a parameter to fixup */
-#define EXC_TABLE_SYSCALL_SAVE 0x014   /* For fast syscall handler */
-#define EXC_TABLE_FAST_USER    0x100   /* Fast user exception handler */
-#define EXC_TABLE_FAST_KERNEL  0x200   /* Fast kernel exception handler */
-#define EXC_TABLE_DEFAULT      0x300   /* Default C-Handler */
-#define EXC_TABLE_SIZE         0x400
-
-/* Registers used by strace */
-
-#define REG_A_BASE     0x0000
-#define REG_AR_BASE    0x0100
-#define REG_PC         0x0020
-#define REG_PS         0x02e6
-#define REG_WB         0x0248
-#define REG_WS         0x0249
-#define REG_LBEG       0x0200
-#define REG_LEND       0x0201
-#define REG_LCOUNT     0x0202
-#define REG_SAR                0x0203
-
-#define SYSCALL_NR     0x00ff
-
-/* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */
-
-#define PTRACE_GETREGS         12
-#define PTRACE_SETREGS         13
-#define PTRACE_GETXTREGS       18
-#define PTRACE_SETXTREGS       19
-
-#ifdef __KERNEL__
-
-#ifndef __ASSEMBLY__
-
-/*
- * This struct defines the way the registers are stored on the
- * kernel stack during a system call or other kernel entry.
- */
-struct pt_regs {
-       unsigned long pc;               /*   4 */
-       unsigned long ps;               /*   8 */
-       unsigned long depc;             /*  12 */
-       unsigned long exccause;         /*  16 */
-       unsigned long excvaddr;         /*  20 */
-       unsigned long debugcause;       /*  24 */
-       unsigned long wmask;            /*  28 */
-       unsigned long lbeg;             /*  32 */
-       unsigned long lend;             /*  36 */
-       unsigned long lcount;           /*  40 */
-       unsigned long sar;              /*  44 */
-       unsigned long windowbase;       /*  48 */
-       unsigned long windowstart;      /*  52 */
-       unsigned long syscall;          /*  56 */
-       unsigned long icountlevel;      /*  60 */
-       int reserved[1];                /*  64 */
-
-       /* Additional configurable registers that are used by the compiler. */
-       xtregs_opt_t xtregs_opt;
-
-       /* Make sure the areg field is 16 bytes aligned. */
-       int align[0] __attribute__ ((aligned(16)));
-
-       /* current register frame.
-        * Note: The ESF for kernel exceptions ends after 16 registers!
-        */
-       unsigned long areg[16];         /* 128 (64) */
-};
-
-#include <asm/variant/core.h>
-
-# define task_pt_regs(tsk) ((struct pt_regs*) \
-  (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1)
-# define user_mode(regs) (((regs)->ps & 0x00000020)!=0)
-# define instruction_pointer(regs) ((regs)->pc)
-extern void show_regs(struct pt_regs *);
-
-# ifndef CONFIG_SMP
-#  define profile_pc(regs) instruction_pointer(regs)
-# endif
-
-#else  /* __ASSEMBLY__ */
-
-# include <asm/asm-offsets.h>
-#define PT_REGS_OFFSET   (KERNEL_STACK_SIZE - PT_USER_SIZE)
-
-#endif /* !__ASSEMBLY__ */
-
-#endif  /* __KERNEL__ */
-
-#endif /* _XTENSA_PTRACE_H */
diff --git a/include/asm-xtensa/regs.h b/include/asm-xtensa/regs.h
deleted file mode 100644 (file)
index d4baed2..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2006 Tensilica, Inc.  All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2.1 of the GNU Lesser General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
- * USA.
- */
-
-#ifndef _XTENSA_REGS_H
-#define _XTENSA_REGS_H
-
-/*  Special registers.  */
-
-#define LBEG           0
-#define LEND           1
-#define LCOUNT         2
-#define SAR            3
-#define BR             4
-#define SCOMPARE1      12
-#define ACCHI          16
-#define ACCLO          17
-#define MR             32
-#define WINDOWBASE     72
-#define WINDOWSTART    73
-#define PTEVADDR       83
-#define RASID          90
-#define ITLBCFG                91
-#define DTLBCFG                92
-#define IBREAKENABLE   96
-#define DDR            104
-#define IBREAKA                128
-#define DBREAKA                144
-#define DBREAKC                160
-#define EPC            176
-#define EPC_1          177
-#define DEPC           192
-#define EPS            192
-#define EPS_1          193
-#define EXCSAVE                208
-#define EXCSAVE_1      209
-#define INTERRUPT      226
-#define INTENABLE      228
-#define PS             230
-#define THREADPTR      231
-#define EXCCAUSE       232
-#define DEBUGCAUSE     233
-#define CCOUNT         234
-#define PRID           235
-#define ICOUNT         236
-#define ICOUNTLEVEL    237
-#define EXCVADDR       238
-#define CCOMPARE       240
-#define MISC           244
-
-/*  Special names for read-only and write-only interrupt registers.  */
-
-#define INTREAD                226
-#define INTSET         226
-#define INTCLEAR       227
-
-/*  EXCCAUSE register fields  */
-
-#define EXCCAUSE_EXCCAUSE_SHIFT        0
-#define EXCCAUSE_EXCCAUSE_MASK 0x3F
-
-#define EXCCAUSE_ILLEGAL_INSTRUCTION           0
-#define EXCCAUSE_SYSTEM_CALL                   1
-#define EXCCAUSE_INSTRUCTION_FETCH_ERROR       2
-#define EXCCAUSE_LOAD_STORE_ERROR              3
-#define EXCCAUSE_LEVEL1_INTERRUPT              4
-#define EXCCAUSE_ALLOCA                                5
-#define EXCCAUSE_INTEGER_DIVIDE_BY_ZERO                6
-#define EXCCAUSE_SPECULATION                   7
-#define EXCCAUSE_PRIVILEGED                    8
-#define EXCCAUSE_UNALIGNED                     9
-#define EXCCAUSE_ITLB_MISS                     16
-#define EXCCAUSE_ITLB_MULTIHIT                 17
-#define EXCCAUSE_ITLB_PRIVILEGE                        18
-#define EXCCAUSE_ITLB_SIZE_RESTRICTION         19
-#define EXCCAUSE_FETCH_CACHE_ATTRIBUTE         20
-#define EXCCAUSE_DTLB_MISS                     24
-#define EXCCAUSE_DTLB_MULTIHIT                 25
-#define EXCCAUSE_DTLB_PRIVILEGE                        26
-#define EXCCAUSE_DTLB_SIZE_RESTRICTION         27
-#define EXCCAUSE_LOAD_CACHE_ATTRIBUTE          28
-#define EXCCAUSE_STORE_CACHE_ATTRIBUTE         29
-#define EXCCAUSE_COPROCESSOR0_DISABLED         32
-#define EXCCAUSE_COPROCESSOR1_DISABLED         33
-#define EXCCAUSE_COPROCESSOR2_DISABLED         34
-#define EXCCAUSE_COPROCESSOR3_DISABLED         35
-#define EXCCAUSE_COPROCESSOR4_DISABLED         36
-#define EXCCAUSE_COPROCESSOR5_DISABLED         37
-#define EXCCAUSE_COPROCESSOR6_DISABLED         38
-#define EXCCAUSE_COPROCESSOR7_DISABLED         39
-
-/*  PS register fields.  */
-
-#define PS_WOE_BIT             18
-#define PS_CALLINC_SHIFT       16
-#define PS_CALLINC_MASK                0x00030000
-#define PS_OWB_SHIFT           8
-#define PS_OWB_MASK            0x00000F00
-#define PS_RING_SHIFT          6
-#define PS_RING_MASK           0x000000C0
-#define PS_UM_BIT              5
-#define PS_EXCM_BIT            4
-#define PS_INTLEVEL_SHIFT      0
-#define PS_INTLEVEL_MASK       0x0000000F
-
-/*  DBREAKCn register fields.  */
-
-#define DBREAKC_MASK_BIT               0
-#define DBREAKC_MASK_MASK              0x0000003F
-#define DBREAKC_LOAD_BIT               30
-#define DBREAKC_LOAD_MASK              0x40000000
-#define DBREAKC_STOR_BIT               31
-#define DBREAKC_STOR_MASK              0x80000000
-
-/*  DEBUGCAUSE register fields.  */
-
-#define DEBUGCAUSE_DEBUGINT_BIT                5       /* External debug interrupt */
-#define DEBUGCAUSE_BREAKN_BIT          4       /* BREAK.N instruction */
-#define DEBUGCAUSE_BREAK_BIT           3       /* BREAK instruction */
-#define DEBUGCAUSE_DBREAK_BIT          2       /* DBREAK match */
-#define DEBUGCAUSE_IBREAK_BIT          1       /* IBREAK match */
-#define DEBUGCAUSE_ICOUNT_BIT          0       /* ICOUNT would incr. to zero */
-
-#endif /* _XTENSA_SPECREG_H */
-
diff --git a/include/asm-xtensa/resource.h b/include/asm-xtensa/resource.h
deleted file mode 100644 (file)
index 17b5ab3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/resource.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_RESOURCE_H
-#define _XTENSA_RESOURCE_H
-
-#include <asm-generic/resource.h>
-
-#endif /* _XTENSA_RESOURCE_H */
diff --git a/include/asm-xtensa/rmap.h b/include/asm-xtensa/rmap.h
deleted file mode 100644 (file)
index 649588b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/rmap.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_RMAP_H
-#define _XTENSA_RMAP_H
-
-#include <asm-generic/rmap.h>
-
-#endif
diff --git a/include/asm-xtensa/rwsem.h b/include/asm-xtensa/rwsem.h
deleted file mode 100644 (file)
index e39edf5..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * include/asm-xtensa/rwsem.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Largely copied from include/asm-ppc/rwsem.h
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_RWSEM_H
-#define _XTENSA_RWSEM_H
-
-#ifndef _LINUX_RWSEM_H
-#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
-#endif
-
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <asm/atomic.h>
-#include <asm/system.h>
-
-/*
- * the semaphore definition
- */
-struct rw_semaphore {
-       signed long             count;
-#define RWSEM_UNLOCKED_VALUE           0x00000000
-#define RWSEM_ACTIVE_BIAS              0x00000001
-#define RWSEM_ACTIVE_MASK              0x0000ffff
-#define RWSEM_WAITING_BIAS             (-0x00010000)
-#define RWSEM_ACTIVE_READ_BIAS         RWSEM_ACTIVE_BIAS
-#define RWSEM_ACTIVE_WRITE_BIAS                (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
-       spinlock_t              wait_lock;
-       struct list_head        wait_list;
-};
-
-#define __RWSEM_INITIALIZER(name) \
-       { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
-         LIST_HEAD_INIT((name).wait_list) }
-
-#define DECLARE_RWSEM(name)            \
-       struct rw_semaphore name = __RWSEM_INITIALIZER(name)
-
-extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
-extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
-
-static inline void init_rwsem(struct rw_semaphore *sem)
-{
-       sem->count = RWSEM_UNLOCKED_VALUE;
-       spin_lock_init(&sem->wait_lock);
-       INIT_LIST_HEAD(&sem->wait_list);
-}
-
-/*
- * lock for reading
- */
-static inline void __down_read(struct rw_semaphore *sem)
-{
-       if (atomic_add_return(1,(atomic_t *)(&sem->count)) > 0)
-               smp_wmb();
-       else
-               rwsem_down_read_failed(sem);
-}
-
-static inline int __down_read_trylock(struct rw_semaphore *sem)
-{
-       int tmp;
-
-       while ((tmp = sem->count) >= 0) {
-               if (tmp == cmpxchg(&sem->count, tmp,
-                                  tmp + RWSEM_ACTIVE_READ_BIAS)) {
-                       smp_wmb();
-                       return 1;
-               }
-       }
-       return 0;
-}
-
-/*
- * lock for writing
- */
-static inline void __down_write(struct rw_semaphore *sem)
-{
-       int tmp;
-
-       tmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,
-                               (atomic_t *)(&sem->count));
-       if (tmp == RWSEM_ACTIVE_WRITE_BIAS)
-               smp_wmb();
-       else
-               rwsem_down_write_failed(sem);
-}
-
-static inline int __down_write_trylock(struct rw_semaphore *sem)
-{
-       int tmp;
-
-       tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
-                     RWSEM_ACTIVE_WRITE_BIAS);
-       smp_wmb();
-       return tmp == RWSEM_UNLOCKED_VALUE;
-}
-
-/*
- * unlock after reading
- */
-static inline void __up_read(struct rw_semaphore *sem)
-{
-       int tmp;
-
-       smp_wmb();
-       tmp = atomic_sub_return(1,(atomic_t *)(&sem->count));
-       if (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0)
-               rwsem_wake(sem);
-}
-
-/*
- * unlock after writing
- */
-static inline void __up_write(struct rw_semaphore *sem)
-{
-       smp_wmb();
-       if (atomic_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
-                             (atomic_t *)(&sem->count)) < 0)
-               rwsem_wake(sem);
-}
-
-/*
- * implement atomic add functionality
- */
-static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
-{
-       atomic_add(delta, (atomic_t *)(&sem->count));
-}
-
-/*
- * downgrade write lock to read lock
- */
-static inline void __downgrade_write(struct rw_semaphore *sem)
-{
-       int tmp;
-
-       smp_wmb();
-       tmp = atomic_add_return(-RWSEM_WAITING_BIAS, (atomic_t *)(&sem->count));
-       if (tmp < 0)
-               rwsem_downgrade_wake(sem);
-}
-
-/*
- * implement exchange and add functionality
- */
-static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
-{
-       smp_mb();
-       return atomic_add_return(delta, (atomic_t *)(&sem->count));
-}
-
-static inline int rwsem_is_locked(struct rw_semaphore *sem)
-{
-       return (sem->count != 0);
-}
-
-#endif /* _XTENSA_RWSEM_H */
diff --git a/include/asm-xtensa/scatterlist.h b/include/asm-xtensa/scatterlist.h
deleted file mode 100644 (file)
index 810080b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * include/asm-xtensa/scatterlist.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SCATTERLIST_H
-#define _XTENSA_SCATTERLIST_H
-
-#include <asm/types.h>
-
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
-       unsigned long   sg_magic;
-#endif
-       unsigned long   page_link;
-       unsigned int    offset;
-       dma_addr_t      dma_address;
-       unsigned int    length;
-};
-
-/*
- * These macros should be used after a pci_map_sg call has been done
- * to get bus addresses of each of the SG entries and their lengths.
- * You should only work with the number of sg entries pci_map_sg
- * returns, or alternatively stop on the first sg_dma_len(sg) which
- * is 0.
- */
-#define sg_dma_address(sg)      ((sg)->dma_address)
-#define sg_dma_len(sg)          ((sg)->length)
-
-
-#define ISA_DMA_THRESHOLD (~0UL)
-
-#endif /* _XTENSA_SCATTERLIST_H */
diff --git a/include/asm-xtensa/sections.h b/include/asm-xtensa/sections.h
deleted file mode 100644 (file)
index 40b5191..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/sections.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SECTIONS_H
-#define _XTENSA_SECTIONS_H
-
-#include <asm-generic/sections.h>
-
-#endif /* _XTENSA_SECTIONS_H */
diff --git a/include/asm-xtensa/segment.h b/include/asm-xtensa/segment.h
deleted file mode 100644 (file)
index a2eb547..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/segment.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SEGMENT_H
-#define _XTENSA_SEGMENT_H
-
-#include <asm/uaccess.h>
-
-#endif /* _XTENSA_SEGEMENT_H */
diff --git a/include/asm-xtensa/sembuf.h b/include/asm-xtensa/sembuf.h
deleted file mode 100644 (file)
index c158704..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * include/asm-xtensa/sembuf.h
- *
- * The semid64_ds structure for Xtensa architecture.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- *
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- *
- */
-
-#ifndef _XTENSA_SEMBUF_H
-#define _XTENSA_SEMBUF_H
-
-#include <asm/byteorder.h>
-
-struct semid64_ds {
-       struct ipc64_perm sem_perm;             /* permissions .. see ipc.h */
-#ifdef __XTENSA_EL__
-       __kernel_time_t sem_otime;              /* last semop time */
-       unsigned long   __unused1;
-       __kernel_time_t sem_ctime;              /* last change time */
-       unsigned long   __unused2;
-#else
-       unsigned long   __unused1;
-       __kernel_time_t sem_otime;              /* last semop time */
-       unsigned long   __unused2;
-       __kernel_time_t sem_ctime;              /* last change time */
-#endif
-       unsigned long   sem_nsems;              /* no. of semaphores in array */
-       unsigned long   __unused3;
-       unsigned long   __unused4;
-};
-
-#endif /* __ASM_XTENSA_SEMBUF_H */
diff --git a/include/asm-xtensa/serial.h b/include/asm-xtensa/serial.h
deleted file mode 100644 (file)
index ec04114..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * include/asm-xtensa/serial.h
- *
- * Configuration details for 8250, 16450, 16550, etc. serial ports
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SERIAL_H
-#define _XTENSA_SERIAL_H
-
-#include <asm/platform/serial.h>
-
-#endif /* _XTENSA_SERIAL_H */
diff --git a/include/asm-xtensa/setup.h b/include/asm-xtensa/setup.h
deleted file mode 100644 (file)
index e363652..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/setup.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SETUP_H
-#define _XTENSA_SETUP_H
-
-#define COMMAND_LINE_SIZE      256
-
-#endif
diff --git a/include/asm-xtensa/shmbuf.h b/include/asm-xtensa/shmbuf.h
deleted file mode 100644 (file)
index ad4b012..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * include/asm-xtensa/shmbuf.h
- *
- * The shmid64_ds structure for Xtensa architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SHMBUF_H
-#define _XTENSA_SHMBUF_H
-
-#if defined (__XTENSA_EL__)
-struct shmid64_ds {
-       struct ipc64_perm       shm_perm;       /* operation perms */
-       size_t                  shm_segsz;      /* size of segment (bytes) */
-       __kernel_time_t         shm_atime;      /* last attach time */
-       unsigned long           __unused1;
-       __kernel_time_t         shm_dtime;      /* last detach time */
-       unsigned long           __unused2;
-       __kernel_time_t         shm_ctime;      /* last change time */
-       unsigned long           __unused3;
-       __kernel_pid_t          shm_cpid;       /* pid of creator */
-       __kernel_pid_t          shm_lpid;       /* pid of last operator */
-       unsigned long           shm_nattch;     /* no. of current attaches */
-       unsigned long           __unused4;
-       unsigned long           __unused5;
-};
-#elif defined (__XTENSA_EB__)
-struct shmid64_ds {
-       struct ipc64_perm       shm_perm;       /* operation perms */
-       size_t                  shm_segsz;      /* size of segment (bytes) */
-       __kernel_time_t         shm_atime;      /* last attach time */
-       unsigned long           __unused1;
-       __kernel_time_t         shm_dtime;      /* last detach time */
-       unsigned long           __unused2;
-       __kernel_time_t         shm_ctime;      /* last change time */
-       unsigned long           __unused3;
-       __kernel_pid_t          shm_cpid;       /* pid of creator */
-       __kernel_pid_t          shm_lpid;       /* pid of last operator */
-       unsigned long           shm_nattch;     /* no. of current attaches */
-       unsigned long           __unused4;
-       unsigned long           __unused5;
-};
-#else
-# error endian order not defined
-#endif
-
-
-struct shminfo64 {
-       unsigned long   shmmax;
-       unsigned long   shmmin;
-       unsigned long   shmmni;
-       unsigned long   shmseg;
-       unsigned long   shmall;
-       unsigned long   __unused1;
-       unsigned long   __unused2;
-       unsigned long   __unused3;
-       unsigned long   __unused4;
-};
-
-#endif /* _XTENSA_SHMBUF_H */
diff --git a/include/asm-xtensa/shmparam.h b/include/asm-xtensa/shmparam.h
deleted file mode 100644 (file)
index c8cc16c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * include/asm-xtensa/shmparam.h
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file "COPYING" in the main directory of
- * this archive for more details.
- */
-
-#ifndef _XTENSA_SHMPARAM_H
-#define _XTENSA_SHMPARAM_H
-
-/*
- * Xtensa can have variable size caches, and if
- * the size of single way is larger than the page size,
- * then we have to start worrying about cache aliasing
- * problems.
- */
-
-#define SHMLBA ((PAGE_SIZE > DCACHE_WAY_SIZE)? PAGE_SIZE : DCACHE_WAY_SIZE)
-
-#endif /* _XTENSA_SHMPARAM_H */
diff --git a/include/asm-xtensa/sigcontext.h b/include/asm-xtensa/sigcontext.h
deleted file mode 100644 (file)
index 03383af..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * include/asm-xtensa/sigcontext.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SIGCONTEXT_H
-#define _XTENSA_SIGCONTEXT_H
-
-
-struct sigcontext {
-       unsigned long sc_pc;
-       unsigned long sc_ps;
-       unsigned long sc_lbeg;
-       unsigned long sc_lend;
-       unsigned long sc_lcount;
-       unsigned long sc_sar;
-       unsigned long sc_acclo;
-       unsigned long sc_acchi;
-       unsigned long sc_a[16];
-       void *sc_xtregs;
-};
-
-#endif /* _XTENSA_SIGCONTEXT_H */
diff --git a/include/asm-xtensa/siginfo.h b/include/asm-xtensa/siginfo.h
deleted file mode 100644 (file)
index 6916248..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/siginfo.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SIGINFO_H
-#define _XTENSA_SIGINFO_H
-
-#include <asm-generic/siginfo.h>
-
-#endif /* _XTENSA_SIGINFO_H */
diff --git a/include/asm-xtensa/signal.h b/include/asm-xtensa/signal.h
deleted file mode 100644 (file)
index 633ba73..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * include/asm-xtensa/signal.h
- *
- * Swiped from SH.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SIGNAL_H
-#define _XTENSA_SIGNAL_H
-
-
-#define _NSIG          64
-#define _NSIG_BPW      32
-#define _NSIG_WORDS    (_NSIG / _NSIG_BPW)
-
-#ifndef __ASSEMBLY__
-
-#include <linux/types.h>
-
-/* Avoid too many header ordering problems.  */
-struct siginfo;
-typedef unsigned long old_sigset_t;            /* at least 32 bits */
-typedef struct {
-       unsigned long sig[_NSIG_WORDS];
-} sigset_t;
-
-#endif
-
-#define SIGHUP          1
-#define SIGINT          2
-#define SIGQUIT                 3
-#define SIGILL          4
-#define SIGTRAP                 5
-#define SIGABRT                 6
-#define SIGIOT          6
-#define SIGBUS          7
-#define SIGFPE          8
-#define SIGKILL                 9
-#define SIGUSR1                10
-#define SIGSEGV                11
-#define SIGUSR2                12
-#define SIGPIPE                13
-#define SIGALRM                14
-#define SIGTERM                15
-#define SIGSTKFLT      16
-#define SIGCHLD                17
-#define SIGCONT                18
-#define SIGSTOP                19
-#define SIGTSTP                20
-#define SIGTTIN                21
-#define SIGTTOU                22
-#define SIGURG         23
-#define SIGXCPU                24
-#define SIGXFSZ                25
-#define SIGVTALRM      26
-#define SIGPROF                27
-#define SIGWINCH       28
-#define SIGIO          29
-#define SIGPOLL                SIGIO
-/* #define SIGLOST             29 */
-#define SIGPWR         30
-#define SIGSYS         31
-#define        SIGUNUSED       31
-
-/* These should not be considered constants from userland.  */
-#define SIGRTMIN       32
-#define SIGRTMAX       (_NSIG-1)
-
-/*
- * SA_FLAGS values:
- *
- * SA_ONSTACK indicates that a registered stack_t will be used.
- * SA_RESTART flag to get restarting signals (which were the default long ago)
- * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
- * SA_RESETHAND clears the handler when the signal is delivered.
- * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
- * SA_NODEFER prevents the current signal from being masked in the handler.
- *
- * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
- * Unix names RESETHAND and NODEFER respectively.
- */
-#define SA_NOCLDSTOP   0x00000001
-#define SA_NOCLDWAIT   0x00000002 /* not supported yet */
-#define SA_SIGINFO     0x00000004
-#define SA_ONSTACK     0x08000000
-#define SA_RESTART     0x10000000
-#define SA_NODEFER     0x40000000
-#define SA_RESETHAND   0x80000000
-
-#define SA_NOMASK      SA_NODEFER
-#define SA_ONESHOT     SA_RESETHAND
-
-#define SA_RESTORER    0x04000000
-
-/*
- * sigaltstack controls
- */
-#define SS_ONSTACK     1
-#define SS_DISABLE     2
-
-#define MINSIGSTKSZ    2048
-#define SIGSTKSZ       8192
-
-#ifndef __ASSEMBLY__
-
-#define SIG_BLOCK          0   /* for blocking signals */
-#define SIG_UNBLOCK        1   /* for unblocking signals */
-#define SIG_SETMASK        2   /* for setting the signal mask */
-
-/* Type of a signal handler.  */
-typedef void (*__sighandler_t)(int);
-
-#define SIG_DFL        ((__sighandler_t)0)     /* default signal handling */
-#define SIG_IGN        ((__sighandler_t)1)     /* ignore signal */
-#define SIG_ERR        ((__sighandler_t)-1)    /* error return from signal */
-
-#ifdef __KERNEL__
-struct old_sigaction {
-       __sighandler_t sa_handler;
-       old_sigset_t sa_mask;
-       unsigned long sa_flags;
-       void (*sa_restorer)(void);
-};
-
-struct sigaction {
-       __sighandler_t sa_handler;
-       unsigned long sa_flags;
-       void (*sa_restorer)(void);
-       sigset_t sa_mask;               /* mask last for extensibility */
-};
-
-struct k_sigaction {
-       struct sigaction sa;
-};
-
-#else
-
-/* Here we must cater to libcs that poke about in kernel headers.  */
-
-struct sigaction {
-       union {
-         __sighandler_t _sa_handler;
-         void (*_sa_sigaction)(int, struct siginfo *, void *);
-       } _u;
-       sigset_t sa_mask;
-       unsigned long sa_flags;
-       void (*sa_restorer)(void);
-};
-
-#define sa_handler     _u._sa_handler
-#define sa_sigaction   _u._sa_sigaction
-
-#endif /* __KERNEL__ */
-
-typedef struct sigaltstack {
-       void *ss_sp;
-       int ss_flags;
-       size_t ss_size;
-} stack_t;
-
-#ifdef __KERNEL__
-#include <asm/sigcontext.h>
-#define ptrace_signal_deliver(regs, cookie) do { } while (0)
-
-#endif /* __KERNEL__ */
-#endif /* __ASSEMBLY__ */
-#endif /* _XTENSA_SIGNAL_H */
diff --git a/include/asm-xtensa/smp.h b/include/asm-xtensa/smp.h
deleted file mode 100644 (file)
index 83c569e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * include/asm-xtensa/smp.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SMP_H
-#define _XTENSA_SMP_H
-
-extern struct xtensa_cpuinfo boot_cpu_data;
-
-#define cpu_data (&boot_cpu_data)
-#define current_cpu_data boot_cpu_data
-
-struct xtensa_cpuinfo {
-       unsigned long   *pgd_cache;
-       unsigned long   *pte_cache;
-       unsigned long   pgtable_cache_sz;
-};
-
-#define cpu_logical_map(cpu)   (cpu)
-
-#endif /* _XTENSA_SMP_H */
diff --git a/include/asm-xtensa/socket.h b/include/asm-xtensa/socket.h
deleted file mode 100644 (file)
index 6100682..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * include/asm-xtensa/socket.h
- *
- * Copied from i386.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-
-#ifndef _XTENSA_SOCKET_H
-#define _XTENSA_SOCKET_H
-
-#include <asm/sockios.h>
-
-/* For setsockoptions(2) */
-#define SOL_SOCKET     1
-
-#define SO_DEBUG       1
-#define SO_REUSEADDR   2
-#define SO_TYPE                3
-#define SO_ERROR       4
-#define SO_DONTROUTE   5
-#define SO_BROADCAST   6
-#define SO_SNDBUF      7
-#define SO_RCVBUF      8
-#define SO_SNDBUFFORCE 32
-#define SO_RCVBUFFORCE 33
-#define SO_KEEPALIVE   9
-#define SO_OOBINLINE   10
-#define SO_NO_CHECK    11
-#define SO_PRIORITY    12
-#define SO_LINGER      13
-#define SO_BSDCOMPAT   14
-/* To add :#define SO_REUSEPORT 15 */
-#define SO_PASSCRED    16
-#define SO_PEERCRED    17
-#define SO_RCVLOWAT    18
-#define SO_SNDLOWAT    19
-#define SO_RCVTIMEO    20
-#define SO_SNDTIMEO    21
-
-/* Security levels - as per NRL IPv6 - don't actually do anything */
-
-#define SO_SECURITY_AUTHENTICATION             22
-#define SO_SECURITY_ENCRYPTION_TRANSPORT       23
-#define SO_SECURITY_ENCRYPTION_NETWORK         24
-
-#define SO_BINDTODEVICE        25
-
-/* Socket filtering */
-
-#define SO_ATTACH_FILTER        26
-#define SO_DETACH_FILTER        27
-
-#define SO_PEERNAME            28
-#define SO_TIMESTAMP           29
-#define SCM_TIMESTAMP          SO_TIMESTAMP
-
-#define SO_ACCEPTCONN          30
-#define SO_PEERSEC             31
-#define SO_PASSSEC             34
-#define SO_TIMESTAMPNS         35
-#define SCM_TIMESTAMPNS                SO_TIMESTAMPNS
-
-#define SO_MARK                        36
-
-#endif /* _XTENSA_SOCKET_H */
diff --git a/include/asm-xtensa/sockios.h b/include/asm-xtensa/sockios.h
deleted file mode 100644 (file)
index efe0af3..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * include/asm-xtensa/sockios.h
- *
- * Socket-level I/O control calls.  Copied from MIPS.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1995 by Ralf Baechle
- * Copyright (C) 2001 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SOCKIOS_H
-#define _XTENSA_SOCKIOS_H
-
-#include <asm/ioctl.h>
-
-/* Socket-level I/O control calls. */
-
-#define FIOGETOWN      _IOR('f', 123, int)
-#define FIOSETOWN      _IOW('f', 124, int)
-
-#define SIOCATMARK     _IOR('s', 7, int)
-#define SIOCSPGRP      _IOW('s', 8, pid_t)
-#define SIOCGPGRP      _IOR('s', 9, pid_t)
-
-#define SIOCGSTAMP     0x8906          /* Get stamp (timeval) */
-#define SIOCGSTAMPNS   0x8907          /* Get stamp (timespec) */
-
-#endif /* _XTENSA_SOCKIOS_H */
diff --git a/include/asm-xtensa/spinlock.h b/include/asm-xtensa/spinlock.h
deleted file mode 100644 (file)
index 8ff2364..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/spinlock.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SPINLOCK_H
-#define _XTENSA_SPINLOCK_H
-
-#include <linux/spinlock.h>
-
-#endif /* _XTENSA_SPINLOCK_H */
diff --git a/include/asm-xtensa/stat.h b/include/asm-xtensa/stat.h
deleted file mode 100644 (file)
index c499203..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * include/asm-xtensa/stat.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_STAT_H
-#define _XTENSA_STAT_H
-
-#define STAT_HAVE_NSEC 1
-
-struct stat {
-       unsigned long   st_dev;
-       unsigned long   st_ino;
-       unsigned int    st_mode;
-       unsigned int    st_nlink;
-       unsigned int    st_uid;
-       unsigned int    st_gid;
-       unsigned long   st_rdev;
-       long            st_size;
-       unsigned long   st_blksize;
-       unsigned long   st_blocks;
-       unsigned long   st_atime;
-       unsigned long   st_atime_nsec;
-       unsigned long   st_mtime;
-       unsigned long   st_mtime_nsec;
-       unsigned long   st_ctime;
-       unsigned long   st_ctime_nsec;
-       unsigned long   __unused4;
-       unsigned long   __unused5;
-};
-
-struct stat64  {
-       unsigned long long st_dev;      /* Device */
-       unsigned long long st_ino;      /* File serial number */
-       unsigned int  st_mode;          /* File mode. */
-       unsigned int  st_nlink;         /* Link count. */
-       unsigned int  st_uid;           /* User ID of the file's owner. */
-       unsigned int  st_gid;           /* Group ID of the file's group. */
-       unsigned long long st_rdev;     /* Device number, if device. */
-       long long st_size;              /* Size of file, in bytes. */
-       unsigned long st_blksize;       /* Optimal block size for I/O. */
-       unsigned long __unused2;
-       unsigned long long st_blocks;   /* Number 512-byte blocks allocated. */
-       unsigned long st_atime;         /* Time of last access. */
-       unsigned long st_atime_nsec;
-       unsigned long st_mtime;         /* Time of last modification. */
-       unsigned long st_mtime_nsec;
-       unsigned long st_ctime;         /* Time of last status change. */
-       unsigned long st_ctime_nsec;
-       unsigned long __unused4;
-       unsigned long __unused5;
-};
-
-#endif /* _XTENSA_STAT_H */
diff --git a/include/asm-xtensa/statfs.h b/include/asm-xtensa/statfs.h
deleted file mode 100644 (file)
index 9c3d1a2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * include/asm-xtensa/statfs.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_STATFS_H
-#define _XTENSA_STATFS_H
-
-#include <asm-generic/statfs.h>
-
-#endif /* _XTENSA_STATFS_H */
-
diff --git a/include/asm-xtensa/string.h b/include/asm-xtensa/string.h
deleted file mode 100644 (file)
index 5fb8c27..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * include/asm-xtensa/string.h
- *
- * These trivial string functions are considered part of the public domain.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-/* We should optimize these. See arch/xtensa/lib/strncpy_user.S */
-
-#ifndef _XTENSA_STRING_H
-#define _XTENSA_STRING_H
-
-#define __HAVE_ARCH_STRCPY
-static inline char *strcpy(char *__dest, const char *__src)
-{
-       register char *__xdest = __dest;
-       unsigned long __dummy;
-
-       __asm__ __volatile__("1:\n\t"
-               "l8ui   %2, %1, 0\n\t"
-               "s8i    %2, %0, 0\n\t"
-               "addi   %1, %1, 1\n\t"
-               "addi   %0, %0, 1\n\t"
-               "bnez   %2, 1b\n\t"
-               : "=r" (__dest), "=r" (__src), "=&r" (__dummy)
-               : "0" (__dest), "1" (__src)
-               : "memory");
-
-       return __xdest;
-}
-
-#define __HAVE_ARCH_STRNCPY
-static inline char *strncpy(char *__dest, const char *__src, size_t __n)
-{
-       register char *__xdest = __dest;
-       unsigned long __dummy;
-
-       if (__n == 0)
-               return __xdest;
-
-       __asm__ __volatile__(
-               "1:\n\t"
-               "l8ui   %2, %1, 0\n\t"
-               "s8i    %2, %0, 0\n\t"
-               "addi   %1, %1, 1\n\t"
-               "addi   %0, %0, 1\n\t"
-               "beqz   %2, 2f\n\t"
-               "bne    %1, %5, 1b\n"
-               "2:"
-               : "=r" (__dest), "=r" (__src), "=&r" (__dummy)
-               : "0" (__dest), "1" (__src), "r" (__src+__n)
-               : "memory");
-
-       return __xdest;
-}
-
-#define __HAVE_ARCH_STRCMP
-static inline int strcmp(const char *__cs, const char *__ct)
-{
-       register int __res;
-       unsigned long __dummy;
-
-       __asm__ __volatile__(
-               "1:\n\t"
-               "l8ui   %3, %1, 0\n\t"
-               "addi   %1, %1, 1\n\t"
-               "l8ui   %2, %0, 0\n\t"
-               "addi   %0, %0, 1\n\t"
-               "beqz   %2, 2f\n\t"
-               "beq    %2, %3, 1b\n"
-               "2:\n\t"
-               "sub    %2, %3, %2"
-               : "=r" (__cs), "=r" (__ct), "=&r" (__res), "=&r" (__dummy)
-               : "0" (__cs), "1" (__ct));
-
-       return __res;
-}
-
-#define __HAVE_ARCH_STRNCMP
-static inline int strncmp(const char *__cs, const char *__ct, size_t __n)
-{
-       register int __res;
-       unsigned long __dummy;
-
-       __asm__ __volatile__(
-               "mov    %2, %3\n"
-               "1:\n\t"
-               "beq    %0, %6, 2f\n\t"
-               "l8ui   %3, %1, 0\n\t"
-               "addi   %1, %1, 1\n\t"
-               "l8ui   %2, %0, 0\n\t"
-               "addi   %0, %0, 1\n\t"
-               "beqz   %2, 2f\n\t"
-               "beqz   %3, 2f\n\t"
-               "beq    %2, %3, 1b\n"
-               "2:\n\t"
-               "sub    %2, %3, %2"
-               : "=r" (__cs), "=r" (__ct), "=&r" (__res), "=&r" (__dummy)
-               : "0" (__cs), "1" (__ct), "r" (__cs+__n));
-
-       return __res;
-}
-
-#define __HAVE_ARCH_MEMSET
-extern void *memset(void *__s, int __c, size_t __count);
-
-#define __HAVE_ARCH_MEMCPY
-extern void *memcpy(void *__to, __const__ void *__from, size_t __n);
-
-#define __HAVE_ARCH_MEMMOVE
-extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
-
-/* Don't build bcopy at all ...  */
-#define __HAVE_ARCH_BCOPY
-
-#define __HAVE_ARCH_MEMSCAN
-#define memscan memchr
-
-#endif /* _XTENSA_STRING_H */
diff --git a/include/asm-xtensa/syscall.h b/include/asm-xtensa/syscall.h
deleted file mode 100644 (file)
index 05cebf8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * include/asm-xtensa/syscall.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2007 Tensilica Inc.
- */
-
-struct pt_regs;
-struct sigaction;
-asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*);
-asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*);
-asmlinkage long xtensa_pipe(int __user *);
-asmlinkage long xtensa_mmap2(unsigned long, unsigned long, unsigned long,
-                            unsigned long, unsigned long, unsigned long);
-asmlinkage long xtensa_ptrace(long, long, long, long);
-asmlinkage long xtensa_sigreturn(struct pt_regs*);
-asmlinkage long xtensa_rt_sigreturn(struct pt_regs*);
-asmlinkage long xtensa_sigsuspend(struct pt_regs*);
-asmlinkage long xtensa_rt_sigsuspend(struct pt_regs*);
-asmlinkage long xtensa_sigaction(int, const struct old_sigaction*,
-                                struct old_sigaction*);
-asmlinkage long xtensa_sigaltstack(struct pt_regs *regs);
-asmlinkage long sys_rt_sigaction(int,
-                                const struct sigaction __user *,
-                                struct sigaction __user *,
-                                size_t);
-asmlinkage long xtensa_shmat(int, char __user *, int);
-asmlinkage long xtensa_fadvise64_64(int, int,
-                                   unsigned long long, unsigned long long);
-
-/* Should probably move to linux/syscalls.h */
-struct pollfd;
-asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp,
-       fd_set __user *exp, struct timespec __user *tsp, void __user *sig);
-asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds,
-       struct timespec __user *tsp, const sigset_t __user *sigmask,
-       size_t sigsetsize);
-
-
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h
deleted file mode 100644 (file)
index 62b1e8f..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * include/asm-xtensa/system.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_SYSTEM_H
-#define _XTENSA_SYSTEM_H
-
-#include <linux/stringify.h>
-
-#include <asm/processor.h>
-
-/* interrupt control */
-
-#define local_save_flags(x)                                            \
-       __asm__ __volatile__ ("rsr %0,"__stringify(PS) : "=a" (x));
-#define local_irq_restore(x)   do {                                    \
-       __asm__ __volatile__ ("wsr %0, "__stringify(PS)" ; rsync"       \
-                             :: "a" (x) : "memory"); } while(0);
-#define local_irq_save(x)      do {                                    \
-       __asm__ __volatile__ ("rsil %0, "__stringify(LOCKLEVEL)         \
-                             : "=a" (x) :: "memory");} while(0);
-
-static inline void local_irq_disable(void)
-{
-       unsigned long flags;
-       __asm__ __volatile__ ("rsil %0, "__stringify(LOCKLEVEL)
-                             : "=a" (flags) :: "memory");
-}
-static inline void local_irq_enable(void)
-{
-       unsigned long flags;
-       __asm__ __volatile__ ("rsil %0, 0" : "=a" (flags) :: "memory");
-
-}
-
-static inline int irqs_disabled(void)
-{
-       unsigned long flags;
-       local_save_flags(flags);
-       return flags & 0xf;
-}
-
-
-#define smp_read_barrier_depends() do { } while(0)
-#define read_barrier_depends() do { } while(0)
-
-#define mb()  barrier()
-#define rmb() mb()
-#define wmb() mb()
-
-#ifdef CONFIG_SMP
-#error smp_* not defined
-#else
-#define smp_mb()       barrier()
-#define smp_rmb()      barrier()
-#define smp_wmb()      barrier()
-#endif
-
-#define set_mb(var, value)     do { var = value; mb(); } while (0)
-
-#if !defined (__ASSEMBLY__)
-
-/* * switch_to(n) should switch tasks to task nr n, first
- * checking that n isn't the current task, in which case it does nothing.
- */
-extern void *_switch_to(void *last, void *next);
-
-#endif /* __ASSEMBLY__ */
-
-#define switch_to(prev,next,last)              \
-do {                                           \
-       (last) = _switch_to(prev, next);        \
-} while(0)
-
-/*
- * cmpxchg
- */
-
-static inline unsigned long
-__cmpxchg_u32(volatile int *p, int old, int new)
-{
-  __asm__ __volatile__("rsil    a15, "__stringify(LOCKLEVEL)"\n\t"
-                      "l32i    %0, %1, 0              \n\t"
-                      "bne     %0, %2, 1f             \n\t"
-                      "s32i    %3, %1, 0              \n\t"
-                      "1:                             \n\t"
-                      "wsr     a15, "__stringify(PS)" \n\t"
-                      "rsync                          \n\t"
-                      : "=&a" (old)
-                      : "a" (p), "a" (old), "r" (new)
-                      : "a15", "memory");
-  return old;
-}
-/* This function doesn't exist, so you'll get a linker error
- * if something tries to do an invalid cmpxchg(). */
-
-extern void __cmpxchg_called_with_bad_pointer(void);
-
-static __inline__ unsigned long
-__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
-{
-       switch (size) {
-       case 4:  return __cmpxchg_u32(ptr, old, new);
-       default: __cmpxchg_called_with_bad_pointer();
-                return old;
-       }
-}
-
-#define cmpxchg(ptr,o,n)                                                     \
-       ({ __typeof__(*(ptr)) _o_ = (o);                                      \
-          __typeof__(*(ptr)) _n_ = (n);                                      \
-          (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,          \
-                                       (unsigned long)_n_, sizeof (*(ptr))); \
-       })
-
-#include <asm-generic/cmpxchg-local.h>
-
-static inline unsigned long __cmpxchg_local(volatile void *ptr,
-                                     unsigned long old,
-                                     unsigned long new, int size)
-{
-       switch (size) {
-       case 4:
-               return __cmpxchg_u32(ptr, old, new);
-       default:
-               return __cmpxchg_local_generic(ptr, old, new, size);
-       }
-
-       return old;
-}
-
-/*
- * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
- * them available.
- */
-#define cmpxchg_local(ptr, o, n)                                              \
-       ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
-                       (unsigned long)(n), sizeof(*(ptr))))
-#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
-
-/*
- * xchg_u32
- *
- * Note that a15 is used here because the register allocation
- * done by the compiler is not guaranteed and a window overflow
- * may not occur between the rsil and wsr instructions. By using
- * a15 in the rsil, the machine is guaranteed to be in a state
- * where no register reference will cause an overflow.
- */
-
-static inline unsigned long xchg_u32(volatile int * m, unsigned long val)
-{
-  unsigned long tmp;
-  __asm__ __volatile__("rsil    a15, "__stringify(LOCKLEVEL)"\n\t"
-                      "l32i    %0, %1, 0              \n\t"
-                      "s32i    %2, %1, 0              \n\t"
-                      "wsr     a15, "__stringify(PS)" \n\t"
-                      "rsync                          \n\t"
-                      : "=&a" (tmp)
-                      : "a" (m), "a" (val)
-                      : "a15", "memory");
-  return tmp;
-}
-
-#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
-
-/*
- * This only works if the compiler isn't horribly bad at optimizing.
- * gcc-2.5.8 reportedly can't handle this, but I define that one to
- * be dead anyway.
- */
-
-extern void __xchg_called_with_bad_pointer(void);
-
-static __inline__ unsigned long
-__xchg(unsigned long x, volatile void * ptr, int size)
-{
-       switch (size) {
-               case 4:
-                       return xchg_u32(ptr, x);
-       }
-       __xchg_called_with_bad_pointer();
-       return x;
-}
-
-extern void set_except_vector(int n, void *addr);
-
-static inline void spill_registers(void)
-{
-       unsigned int a0, ps;
-
-       __asm__ __volatile__ (
-               "movi   a14," __stringify (PS_EXCM_BIT) " | 1\n\t"
-               "mov    a12, a0\n\t"
-               "rsr    a13," __stringify(SAR) "\n\t"
-               "xsr    a14," __stringify(PS) "\n\t"
-               "movi   a0, _spill_registers\n\t"
-               "rsync\n\t"
-               "callx0 a0\n\t"
-               "mov    a0, a12\n\t"
-               "wsr    a13," __stringify(SAR) "\n\t"
-               "wsr    a14," __stringify(PS) "\n\t"
-               :: "a" (&a0), "a" (&ps)
-               : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory");
-}
-
-#define arch_align_stack(x) (x)
-
-#endif /* _XTENSA_SYSTEM_H */
diff --git a/include/asm-xtensa/termbits.h b/include/asm-xtensa/termbits.h
deleted file mode 100644 (file)
index 85aa6a3..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * include/asm-xtensa/termbits.h
- *
- * Copied from SH.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_TERMBITS_H
-#define _XTENSA_TERMBITS_H
-
-
-#include <linux/posix_types.h>
-
-typedef unsigned char  cc_t;
-typedef unsigned int   speed_t;
-typedef unsigned int   tcflag_t;
-
-#define NCCS 19
-struct termios {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-};
-
-struct termios2 {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-       speed_t c_ispeed;               /* input speed */
-       speed_t c_ospeed;               /* output speed */
-};
-
-struct ktermios {
-       tcflag_t c_iflag;               /* input mode flags */
-       tcflag_t c_oflag;               /* output mode flags */
-       tcflag_t c_cflag;               /* control mode flags */
-       tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-       speed_t c_ispeed;               /* input speed */
-       speed_t c_ospeed;               /* output speed */
-};
-
-/* c_cc characters */
-
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VTIME 5
-#define VMIN 6
-#define VSWTC 7
-#define VSTART 8
-#define VSTOP 9
-#define VSUSP 10
-#define VEOL 11
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE 14
-#define VLNEXT 15
-#define VEOL2 16
-
-/* c_iflag bits */
-
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK  0000020
-#define ISTRIP 0000040
-#define INLCR  0000100
-#define IGNCR  0000200
-#define ICRNL  0000400
-#define IUCLC  0001000
-#define IXON   0002000
-#define IXANY  0004000
-#define IXOFF  0010000
-#define IMAXBEL        0020000
-#define IUTF8  0040000
-
-/* c_oflag bits */
-
-#define OPOST  0000001
-#define OLCUC  0000002
-#define ONLCR  0000004
-#define OCRNL  0000010
-#define ONOCR  0000020
-#define ONLRET 0000040
-#define OFILL  0000100
-#define OFDEL  0000200
-#define NLDLY  0000400
-#define   NL0  0000000
-#define   NL1  0000400
-#define CRDLY  0003000
-#define   CR0  0000000
-#define   CR1  0001000
-#define   CR2  0002000
-#define   CR3  0003000
-#define TABDLY 0014000
-#define   TAB0 0000000
-#define   TAB1 0004000
-#define   TAB2 0010000
-#define   TAB3 0014000
-#define   XTABS        0014000
-#define BSDLY  0020000
-#define   BS0  0000000
-#define   BS1  0020000
-#define VTDLY  0040000
-#define   VT0  0000000
-#define   VT1  0040000
-#define FFDLY  0100000
-#define   FF0  0000000
-#define   FF1  0100000
-
-/* c_cflag bit meaning */
-
-#define CBAUD  0010017
-#define  B0    0000000         /* hang up */
-#define  B50   0000001
-#define  B75   0000002
-#define  B110  0000003
-#define  B134  0000004
-#define  B150  0000005
-#define  B200  0000006
-#define  B300  0000007
-#define  B600  0000010
-#define  B1200 0000011
-#define  B1800 0000012
-#define  B2400 0000013
-#define  B4800 0000014
-#define  B9600 0000015
-#define  B19200        0000016
-#define  B38400        0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CSIZE  0000060
-#define   CS5  0000000
-#define   CS6  0000020
-#define   CS7  0000040
-#define   CS8  0000060
-#define CSTOPB 0000100
-#define CREAD  0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL  0002000
-#define CLOCAL 0004000
-#define CBAUDEX 0010000
-#define           BOTHER 0010000
-#define    B57600 0010001
-#define   B115200 0010002
-#define   B230400 0010003
-#define   B460800 0010004
-#define   B500000 0010005
-#define   B576000 0010006
-#define   B921600 0010007
-#define  B1000000 0010010
-#define  B1152000 0010011
-#define  B1500000 0010012
-#define  B2000000 0010013
-#define  B2500000 0010014
-#define  B3000000 0010015
-#define  B3500000 0010016
-#define  B4000000 0010017
-#define CIBAUD   002003600000          /* input baud rate */
-#define CMSPAR   010000000000          /* mark or space (stick) parity */
-#define CRTSCTS          020000000000          /* flow control */
-
-#define IBSHIFT        16              /* Shift from CBAUD to CIBAUD */
-
-/* c_lflag bits */
-
-#define ISIG   0000001
-#define ICANON 0000002
-#define XCASE  0000004
-#define ECHO   0000010
-#define ECHOE  0000020
-#define ECHOK  0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define TOSTOP 0000400
-#define ECHOCTL        0001000
-#define ECHOPRT        0002000
-#define ECHOKE 0004000
-#define FLUSHO 0010000
-#define PENDIN 0040000
-#define IEXTEN 0100000
-
-/* tcflow() and TCXONC use these */
-
-#define        TCOOFF          0
-#define        TCOON           1
-#define        TCIOFF          2
-#define        TCION           3
-
-/* tcflush() and TCFLSH use these */
-
-#define        TCIFLUSH        0
-#define        TCOFLUSH        1
-#define        TCIOFLUSH       2
-
-/* tcsetattr uses these */
-
-#define        TCSANOW         0
-#define        TCSADRAIN       1
-#define        TCSAFLUSH       2
-
-#endif /* _XTENSA_TERMBITS_H */
diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h
deleted file mode 100644 (file)
index 4673f42..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * include/asm-xtensa/termios.h
- *
- * Copied from SH.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_TERMIOS_H
-#define _XTENSA_TERMIOS_H
-
-#include <asm/termbits.h>
-#include <asm/ioctls.h>
-
-struct winsize {
-       unsigned short ws_row;
-       unsigned short ws_col;
-       unsigned short ws_xpixel;
-       unsigned short ws_ypixel;
-};
-
-#define NCC 8
-struct termio {
-       unsigned short c_iflag;         /* input mode flags */
-       unsigned short c_oflag;         /* output mode flags */
-       unsigned short c_cflag;         /* control mode flags */
-       unsigned short c_lflag;         /* local mode flags */
-       unsigned char c_line;           /* line discipline */
-       unsigned char c_cc[NCC];        /* control characters */
-};
-
-/* Modem lines */
-
-#define TIOCM_LE       0x001
-#define TIOCM_DTR      0x002
-#define TIOCM_RTS      0x004
-#define TIOCM_ST       0x008
-#define TIOCM_SR       0x010
-#define TIOCM_CTS      0x020
-#define TIOCM_CAR      0x040
-#define TIOCM_RNG      0x080
-#define TIOCM_DSR      0x100
-#define TIOCM_CD       TIOCM_CAR
-#define TIOCM_RI       TIOCM_RNG
-#define TIOCM_OUT1     0x2000
-#define TIOCM_OUT2     0x4000
-#define TIOCM_LOOP     0x8000
-
-/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-
-#ifdef __KERNEL__
-
-/*     intr=^C         quit=^\         erase=del       kill=^U
-       eof=^D          vtime=\0        vmin=\1         sxtc=\0
-       start=^Q        stop=^S         susp=^Z         eol=\0
-       reprint=^R      discard=^U      werase=^W       lnext=^V
-       eol2=\0
-*/
-#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
-
-/*
- * Translate a "termio" structure into a "termios". Ugh.
- */
-
-#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
-       unsigned short __tmp; \
-       get_user(__tmp,&(termio)->x); \
-       *(unsigned short *) &(termios)->x = __tmp; \
-}
-
-#define user_termio_to_kernel_termios(termios, termio) \
-({ \
-       SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
-       SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
-       SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
-       SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
-       copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
-})
-
-/*
- * Translate a "termios" structure into a "termio". Ugh.
- */
-
-#define kernel_termios_to_user_termio(termio, termios) \
-({ \
-       put_user((termios)->c_iflag, &(termio)->c_iflag); \
-       put_user((termios)->c_oflag, &(termio)->c_oflag); \
-       put_user((termios)->c_cflag, &(termio)->c_cflag); \
-       put_user((termios)->c_lflag, &(termio)->c_lflag); \
-       put_user((termios)->c_line,  &(termio)->c_line); \
-       copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
-})
-
-#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
-#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
-#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
-#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
-
-#endif /* __KERNEL__ */
-
-#endif /* _XTENSA_TERMIOS_H */
diff --git a/include/asm-xtensa/thread_info.h b/include/asm-xtensa/thread_info.h
deleted file mode 100644 (file)
index 0f4fe1f..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * include/asm-xtensa/thread_info.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_THREAD_INFO_H
-#define _XTENSA_THREAD_INFO_H
-
-#ifdef __KERNEL__
-
-#ifndef __ASSEMBLY__
-# include <asm/processor.h>
-#endif
-
-/*
- * low level task data that entry.S needs immediate access to
- * - this struct should fit entirely inside of one cache line
- * - this struct shares the supervisor stack pages
- * - if the contents of this structure are changed, the assembly constants
- *   must also be changed
- */
-
-#ifndef __ASSEMBLY__
-
-#if XTENSA_HAVE_COPROCESSORS
-
-typedef struct xtregs_coprocessor {
-       xtregs_cp0_t cp0;
-       xtregs_cp1_t cp1;
-       xtregs_cp2_t cp2;
-       xtregs_cp3_t cp3;
-       xtregs_cp4_t cp4;
-       xtregs_cp5_t cp5;
-       xtregs_cp6_t cp6;
-       xtregs_cp7_t cp7;
-} xtregs_coprocessor_t;
-
-#endif
-
-struct thread_info {
-       struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
-       unsigned long           flags;          /* low level flags */
-       unsigned long           status;         /* thread-synchronous flags */
-       __u32                   cpu;            /* current CPU */
-       __s32                   preempt_count;  /* 0 => preemptable,< 0 => BUG*/
-
-       mm_segment_t            addr_limit;     /* thread address space */
-       struct restart_block    restart_block;
-
-       unsigned long           cpenable;
-
-       /* Allocate storage for extra user states and coprocessor states. */
-#if XTENSA_HAVE_COPROCESSORS
-       xtregs_coprocessor_t    xtregs_cp;
-#endif
-       xtregs_user_t           xtregs_user;
-};
-
-#else /* !__ASSEMBLY__ */
-
-/* offsets into the thread_info struct for assembly code access */
-#define TI_TASK                 0x00000000
-#define TI_EXEC_DOMAIN  0x00000004
-#define TI_FLAGS        0x00000008
-#define TI_STATUS       0x0000000C
-#define TI_CPU          0x00000010
-#define TI_PRE_COUNT    0x00000014
-#define TI_ADDR_LIMIT   0x00000018
-#define TI_RESTART_BLOCK 0x000001C
-
-#endif
-
-#define PREEMPT_ACTIVE         0x10000000
-
-/*
- * macros/functions for gaining access to the thread information structure
- *
- * preempt_count needs to be 1 initially, until the scheduler is functional.
- */
-
-#ifndef __ASSEMBLY__
-
-#define INIT_THREAD_INFO(tsk)                  \
-{                                              \
-       .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
-       .flags          = 0,                    \
-       .cpu            = 0,                    \
-       .preempt_count  = 1,                    \
-       .addr_limit     = KERNEL_DS,            \
-       .restart_block = {                      \
-               .fn = do_no_restart_syscall,    \
-       },                                      \
-}
-
-#define init_thread_info       (init_thread_union.thread_info)
-#define init_stack             (init_thread_union.stack)
-
-/* how to get the thread information struct from C */
-static inline struct thread_info *current_thread_info(void)
-{
-       struct thread_info *ti;
-        __asm__("extui %0,a1,0,13\n\t"
-                "xor %0, a1, %0" : "=&r" (ti) : );
-       return ti;
-}
-
-#else /* !__ASSEMBLY__ */
-
-/* how to get the thread information struct from ASM */
-#define GET_THREAD_INFO(reg,sp) \
-       extui reg, sp, 0, 13; \
-       xor   reg, sp, reg
-#endif
-
-
-/*
- * thread information flags
- * - these are process state flags that various assembly files may need to access
- * - pending work-to-be-done flags are in LSW
- * - other flags in MSW
- */
-#define TIF_SYSCALL_TRACE      0       /* syscall trace active */
-#define TIF_SIGPENDING         1       /* signal pending */
-#define TIF_NEED_RESCHED       2       /* rescheduling necessary */
-#define TIF_SINGLESTEP         3       /* restore singlestep on return to user mode */
-#define TIF_IRET               4       /* return with iret */
-#define TIF_MEMDIE             5
-#define TIF_RESTORE_SIGMASK    6       /* restore signal mask in do_signal() */
-#define TIF_POLLING_NRFLAG     16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
-#define TIF_FREEZE             17      /* is freezing for suspend */
-
-#define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)
-#define _TIF_SIGPENDING                (1<<TIF_SIGPENDING)
-#define _TIF_NEED_RESCHED      (1<<TIF_NEED_RESCHED)
-#define _TIF_SINGLESTEP                (1<<TIF_SINGLESTEP)
-#define _TIF_IRET              (1<<TIF_IRET)
-#define _TIF_POLLING_NRFLAG    (1<<TIF_POLLING_NRFLAG)
-#define _TIF_RESTORE_SIGMASK   (1<<TIF_RESTORE_SIGMASK)
-#define _TIF_FREEZE            (1<<TIF_FREEZE)
-
-#define _TIF_WORK_MASK         0x0000FFFE      /* work to do on interrupt/exception return */
-#define _TIF_ALLWORK_MASK      0x0000FFFF      /* work to do on any return to u-space */
-
-/*
- * Thread-synchronous status.
- *
- * This is different from the flags in that nobody else
- * ever touches our thread-synchronous status, so we don't
- * have to worry about atomic accesses.
- */
-#define TS_USEDFPU             0x0001  /* FPU was used by this task this quantum (SMP) */
-
-#define THREAD_SIZE 8192       //(2*PAGE_SIZE)
-#define THREAD_SIZE_ORDER 1
-
-#endif /* __KERNEL__ */
-#endif /* _XTENSA_THREAD_INFO */
diff --git a/include/asm-xtensa/timex.h b/include/asm-xtensa/timex.h
deleted file mode 100644 (file)
index b83a818..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * include/asm-xtensa/timex.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_TIMEX_H
-#define _XTENSA_TIMEX_H
-
-#ifdef __KERNEL__
-
-#include <asm/processor.h>
-#include <linux/stringify.h>
-
-#define _INTLEVEL(x)   XCHAL_INT ## x ## _LEVEL
-#define INTLEVEL(x)    _INTLEVEL(x)
-
-#if INTLEVEL(XCHAL_TIMER0_INTERRUPT) == 1
-# define LINUX_TIMER     0
-# define LINUX_TIMER_INT XCHAL_TIMER0_INTERRUPT
-#elif INTLEVEL(XCHAL_TIMER1_INTERRUPT) == 1
-# define LINUX_TIMER     1
-# define LINUX_TIMER_INT XCHAL_TIMER1_INTERRUPT
-#elif INTLEVEL(XCHAL_TIMER2_INTERRUPT) == 1
-# define LINUX_TIMER     2
-# define LINUX_TIMER_INT XCHAL_TIMER2_INTERRUPT
-#else
-# error "Bad timer number for Linux configurations!"
-#endif
-
-#define LINUX_TIMER_MASK        (1L << LINUX_TIMER_INT)
-
-#define CLOCK_TICK_RATE        1193180 /* (everyone is using this value) */
-#define CLOCK_TICK_FACTOR       20 /* Factor of both 10^6 and CLOCK_TICK_RATE */
-
-#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
-extern unsigned long ccount_per_jiffy;
-extern unsigned long ccount_nsec;
-#define CCOUNT_PER_JIFFY ccount_per_jiffy
-#define NSEC_PER_CCOUNT  ccount_nsec
-#else
-#define CCOUNT_PER_JIFFY (CONFIG_XTENSA_CPU_CLOCK*(1000000UL/HZ))
-#define NSEC_PER_CCOUNT (1000UL / CONFIG_XTENSA_CPU_CLOCK)
-#endif
-
-
-typedef unsigned long long cycles_t;
-
-/*
- * Only used for SMP.
- */
-
-extern cycles_t cacheflush_time;
-
-#define get_cycles()   (0)
-
-
-/*
- * Register access.
- */
-
-#define WSR_CCOUNT(r)    asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r))
-#define RSR_CCOUNT(r)    asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r))
-#define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r))
-#define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r))
-
-static inline unsigned long get_ccount (void)
-{
-       unsigned long ccount;
-       RSR_CCOUNT(ccount);
-       return ccount;
-}
-
-static inline void set_ccount (unsigned long ccount)
-{
-       WSR_CCOUNT(ccount);
-}
-
-static inline unsigned long get_linux_timer (void)
-{
-       unsigned ccompare;
-       RSR_CCOMPARE(LINUX_TIMER, ccompare);
-       return ccompare;
-}
-
-static inline void set_linux_timer (unsigned long ccompare)
-{
-       WSR_CCOMPARE(LINUX_TIMER, ccompare);
-}
-
-#endif /* __KERNEL__ */
-#endif /* _XTENSA_TIMEX_H */
diff --git a/include/asm-xtensa/tlb.h b/include/asm-xtensa/tlb.h
deleted file mode 100644 (file)
index 31c220f..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * include/asm-xtensa/tlb.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_TLB_H
-#define _XTENSA_TLB_H
-
-#include <asm/cache.h>
-#include <asm/page.h>
-
-#if (DCACHE_WAY_SIZE <= PAGE_SIZE)
-
-/* Note, read http://lkml.org/lkml/2004/1/15/6 */
-
-# define tlb_start_vma(tlb,vma)                        do { } while (0)
-# define tlb_end_vma(tlb,vma)                  do { } while (0)
-
-#else
-
-# define tlb_start_vma(tlb, vma)                                             \
-       do {                                                                  \
-               if (!tlb->fullmm)                                             \
-                       flush_cache_range(vma, vma->vm_start, vma->vm_end);   \
-       } while(0)
-
-# define tlb_end_vma(tlb, vma)                                               \
-       do {                                                                  \
-               if (!tlb->fullmm)                                             \
-                       flush_tlb_range(vma, vma->vm_start, vma->vm_end);     \
-       } while(0)
-
-#endif
-
-#define __tlb_remove_tlb_entry(tlb,pte,addr)   do { } while (0)
-#define tlb_flush(tlb)                         flush_tlb_mm((tlb)->mm)
-
-#include <asm-generic/tlb.h>
-
-#define __pte_free_tlb(tlb, pte)               pte_free((tlb)->mm, pte)
-
-#endif /* _XTENSA_TLB_H */
diff --git a/include/asm-xtensa/tlbflush.h b/include/asm-xtensa/tlbflush.h
deleted file mode 100644 (file)
index 46d2400..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * include/asm-xtensa/tlbflush.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_TLBFLUSH_H
-#define _XTENSA_TLBFLUSH_H
-
-#ifdef __KERNEL__
-
-#include <linux/stringify.h>
-#include <asm/processor.h>
-
-#define DTLB_WAY_PGD   7
-
-#define ITLB_ARF_WAYS  4
-#define DTLB_ARF_WAYS  4
-
-#define ITLB_HIT_BIT   3
-#define DTLB_HIT_BIT   4
-
-#ifndef __ASSEMBLY__
-
-/* TLB flushing:
- *
- *  - flush_tlb_all() flushes all processes TLB entries
- *  - flush_tlb_mm(mm) flushes the specified mm context TLB entries
- *  - flush_tlb_page(mm, vmaddr) flushes a single page
- *  - flush_tlb_range(mm, start, end) flushes a range of pages
- */
-
-extern void flush_tlb_all(void);
-extern void flush_tlb_mm(struct mm_struct*);
-extern void flush_tlb_page(struct vm_area_struct*,unsigned long);
-extern void flush_tlb_range(struct vm_area_struct*,unsigned long,unsigned long);
-
-#define flush_tlb_kernel_range(start,end) flush_tlb_all()
-
-/* TLB operations. */
-
-static inline unsigned long itlb_probe(unsigned long addr)
-{
-       unsigned long tmp;
-       __asm__ __volatile__("pitlb  %0, %1\n\t" : "=a" (tmp) : "a" (addr));
-       return tmp;
-}
-
-static inline unsigned long dtlb_probe(unsigned long addr)
-{
-       unsigned long tmp;
-       __asm__ __volatile__("pdtlb  %0, %1\n\t" : "=a" (tmp) : "a" (addr));
-       return tmp;
-}
-
-static inline void invalidate_itlb_entry (unsigned long probe)
-{
-       __asm__ __volatile__("iitlb  %0; isync\n\t" : : "a" (probe));
-}
-
-static inline void invalidate_dtlb_entry (unsigned long probe)
-{
-       __asm__ __volatile__("idtlb  %0; dsync\n\t" : : "a" (probe));
-}
-
-/* Use the .._no_isync functions with caution.  Generally, these are
- * handy for bulk invalidates followed by a single 'isync'.  The
- * caller must follow up with an 'isync', which can be relatively
- * expensive on some Xtensa implementations.
- */
-static inline void invalidate_itlb_entry_no_isync (unsigned entry)
-{
-       /* Caller must follow up with 'isync'. */
-       __asm__ __volatile__ ("iitlb  %0\n" : : "a" (entry) );
-}
-
-static inline void invalidate_dtlb_entry_no_isync (unsigned entry)
-{
-       /* Caller must follow up with 'isync'. */
-       __asm__ __volatile__ ("idtlb  %0\n" : : "a" (entry) );
-}
-
-static inline void set_itlbcfg_register (unsigned long val)
-{
-       __asm__ __volatile__("wsr  %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t"
-                            : : "a" (val));
-}
-
-static inline void set_dtlbcfg_register (unsigned long val)
-{
-       __asm__ __volatile__("wsr  %0, "__stringify(DTLBCFG)"; dsync\n\t"
-                            : : "a" (val));
-}
-
-static inline void set_ptevaddr_register (unsigned long val)
-{
-       __asm__ __volatile__(" wsr  %0, "__stringify(PTEVADDR)"; isync\n"
-                            : : "a" (val));
-}
-
-static inline unsigned long read_ptevaddr_register (void)
-{
-       unsigned long tmp;
-       __asm__ __volatile__("rsr  %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp));
-       return tmp;
-}
-
-static inline void write_dtlb_entry (pte_t entry, int way)
-{
-       __asm__ __volatile__("wdtlb  %1, %0; dsync\n\t"
-                            : : "r" (way), "r" (entry) );
-}
-
-static inline void write_itlb_entry (pte_t entry, int way)
-{
-       __asm__ __volatile__("witlb  %1, %0; isync\n\t"
-                            : : "r" (way), "r" (entry) );
-}
-
-static inline void invalidate_page_directory (void)
-{
-       invalidate_dtlb_entry (DTLB_WAY_PGD);
-       invalidate_dtlb_entry (DTLB_WAY_PGD+1);
-       invalidate_dtlb_entry (DTLB_WAY_PGD+2);
-}
-
-static inline void invalidate_itlb_mapping (unsigned address)
-{
-       unsigned long tlb_entry;
-       if (((tlb_entry = itlb_probe(address)) & (1 << ITLB_HIT_BIT)) != 0)
-               invalidate_itlb_entry(tlb_entry);
-}
-
-static inline void invalidate_dtlb_mapping (unsigned address)
-{
-       unsigned long tlb_entry;
-       if (((tlb_entry = dtlb_probe(address)) & (1 << DTLB_HIT_BIT)) != 0)
-               invalidate_dtlb_entry(tlb_entry);
-}
-
-#define check_pgt_cache()      do { } while (0)
-
-
-/*
- * DO NOT USE THESE FUNCTIONS.  These instructions aren't part of the Xtensa
- * ISA and exist only for test purposes..
- * You may find it helpful for MMU debugging, however.
- *
- * 'at' is the unmodified input register
- * 'as' is the output register, as follows (specific to the Linux config):
- *
- *      as[31..12] contain the virtual address
- *      as[11..08] are meaningless
- *      as[07..00] contain the asid
- */
-
-static inline unsigned long read_dtlb_virtual (int way)
-{
-       unsigned long tmp;
-       __asm__ __volatile__("rdtlb0  %0, %1\n\t" : "=a" (tmp), "+a" (way));
-       return tmp;
-}
-
-static inline unsigned long read_dtlb_translation (int way)
-{
-       unsigned long tmp;
-       __asm__ __volatile__("rdtlb1  %0, %1\n\t" : "=a" (tmp), "+a" (way));
-       return tmp;
-}
-
-static inline unsigned long read_itlb_virtual (int way)
-{
-       unsigned long tmp;
-       __asm__ __volatile__("ritlb0  %0, %1\n\t" : "=a" (tmp), "+a" (way));
-       return tmp;
-}
-
-static inline unsigned long read_itlb_translation (int way)
-{
-       unsigned long tmp;
-       __asm__ __volatile__("ritlb1  %0, %1\n\t" : "=a" (tmp), "+a" (way));
-       return tmp;
-}
-
-#endif /* __ASSEMBLY__ */
-#endif /* __KERNEL__ */
-#endif /* _XTENSA_TLBFLUSH_H */
diff --git a/include/asm-xtensa/topology.h b/include/asm-xtensa/topology.h
deleted file mode 100644 (file)
index 7309e38..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/topology.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_TOPOLOGY_H
-#define _XTENSA_TOPOLOGY_H
-
-#include <asm-generic/topology.h>
-
-#endif /* _XTENSA_TOPOLOGY_H */
diff --git a/include/asm-xtensa/types.h b/include/asm-xtensa/types.h
deleted file mode 100644 (file)
index c89569a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * include/asm-xtensa/types.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_TYPES_H
-#define _XTENSA_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-#ifdef __ASSEMBLY__
-# define __XTENSA_UL(x)                (x)
-# define __XTENSA_UL_CONST(x)  x
-#else
-# define __XTENSA_UL(x)                ((unsigned long)(x))
-# define __XTENSA_UL_CONST(x)  x##UL
-#endif
-
-#ifndef __ASSEMBLY__
-
-typedef unsigned short umode_t;
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-#ifdef __KERNEL__
-
-#define BITS_PER_LONG 32
-
-/* Dma addresses are 32-bits wide.  */
-
-typedef u32 dma_addr_t;
-
-#endif /* __KERNEL__ */
-#endif
-
-#endif /* _XTENSA_TYPES_H */
diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h
deleted file mode 100644 (file)
index b852842..0000000
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- * include/asm-xtensa/uaccess.h
- *
- * User space memory access functions
- *
- * These routines provide basic accessing functions to the user memory
- * space for the kernel. This header file provides fuctions such as:
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_UACCESS_H
-#define _XTENSA_UACCESS_H
-
-#include <linux/errno.h>
-
-#define VERIFY_READ    0
-#define VERIFY_WRITE   1
-
-#ifdef __ASSEMBLY__
-
-#include <asm/current.h>
-#include <asm/asm-offsets.h>
-#include <asm/processor.h>
-#include <asm/types.h>
-
-/*
- * These assembly macros mirror the C macros that follow below.  They
- * should always have identical functionality.  See
- * arch/xtensa/kernel/sys.S for usage.
- */
-
-#define KERNEL_DS      0
-#define USER_DS                1
-
-#define get_ds         (KERNEL_DS)
-
-/*
- * get_fs reads current->thread.current_ds into a register.
- * On Entry:
- *     <ad>    anything
- *     <sp>    stack
- * On Exit:
- *     <ad>    contains current->thread.current_ds
- */
-       .macro  get_fs  ad, sp
-       GET_CURRENT(\ad,\sp)
-       l32i    \ad, \ad, THREAD_CURRENT_DS
-       .endm
-
-/*
- * set_fs sets current->thread.current_ds to some value.
- * On Entry:
- *     <at>    anything (temp register)
- *     <av>    value to write
- *     <sp>    stack
- * On Exit:
- *     <at>    destroyed (actually, current)
- *     <av>    preserved, value to write
- */
-       .macro  set_fs  at, av, sp
-       GET_CURRENT(\at,\sp)
-       s32i    \av, \at, THREAD_CURRENT_DS
-       .endm
-
-/*
- * kernel_ok determines whether we should bypass addr/size checking.
- * See the equivalent C-macro version below for clarity.
- * On success, kernel_ok branches to a label indicated by parameter
- * <success>.  This implies that the macro falls through to the next
- * insruction on an error.
- *
- * Note that while this macro can be used independently, we designed
- * in for optimal use in the access_ok macro below (i.e., we fall
- * through on error).
- *
- * On Entry:
- *     <at>            anything (temp register)
- *     <success>       label to branch to on success; implies
- *                     fall-through macro on error
- *     <sp>            stack pointer
- * On Exit:
- *     <at>            destroyed (actually, current->thread.current_ds)
- */
-
-#if ((KERNEL_DS != 0) || (USER_DS == 0))
-# error Assembly macro kernel_ok fails
-#endif
-       .macro  kernel_ok  at, sp, success
-       get_fs  \at, \sp
-       beqz    \at, \success
-       .endm
-
-/*
- * user_ok determines whether the access to user-space memory is allowed.
- * See the equivalent C-macro version below for clarity.
- *
- * On error, user_ok branches to a label indicated by parameter
- * <error>.  This implies that the macro falls through to the next
- * instruction on success.
- *
- * Note that while this macro can be used independently, we designed
- * in for optimal use in the access_ok macro below (i.e., we fall
- * through on success).
- *
- * On Entry:
- *     <aa>    register containing memory address
- *     <as>    register containing memory size
- *     <at>    temp register
- *     <error> label to branch to on error; implies fall-through
- *             macro on success
- * On Exit:
- *     <aa>    preserved
- *     <as>    preserved
- *     <at>    destroyed (actually, (TASK_SIZE + 1 - size))
- */
-       .macro  user_ok aa, as, at, error
-       movi    \at, __XTENSA_UL_CONST(TASK_SIZE)
-       bgeu    \as, \at, \error
-       sub     \at, \at, \as
-       bgeu    \aa, \at, \error
-       .endm
-
-/*
- * access_ok determines whether a memory access is allowed.  See the
- * equivalent C-macro version below for clarity.
- *
- * On error, access_ok branches to a label indicated by parameter
- * <error>.  This implies that the macro falls through to the next
- * instruction on success.
- *
- * Note that we assume success is the common case, and we optimize the
- * branch fall-through case on success.
- *
- * On Entry:
- *     <aa>    register containing memory address
- *     <as>    register containing memory size
- *     <at>    temp register
- *     <sp>
- *     <error> label to branch to on error; implies fall-through
- *             macro on success
- * On Exit:
- *     <aa>    preserved
- *     <as>    preserved
- *     <at>    destroyed
- */
-       .macro  access_ok  aa, as, at, sp, error
-       kernel_ok  \at, \sp, .Laccess_ok_\@
-       user_ok    \aa, \as, \at, \error
-.Laccess_ok_\@:
-       .endm
-
-#else /* __ASSEMBLY__ not defined */
-
-#include <linux/sched.h>
-#include <asm/types.h>
-
-/*
- * The fs value determines whether argument validity checking should
- * be performed or not.  If get_fs() == USER_DS, checking is
- * performed, with get_fs() == KERNEL_DS, checking is bypassed.
- *
- * For historical reasons (Data Segment Register?), these macros are
- * grossly misnamed.
- */
-
-#define KERNEL_DS      ((mm_segment_t) { 0 })
-#define USER_DS                ((mm_segment_t) { 1 })
-
-#define get_ds()       (KERNEL_DS)
-#define get_fs()       (current->thread.current_ds)
-#define set_fs(val)    (current->thread.current_ds = (val))
-
-#define segment_eq(a,b)        ((a).seg == (b).seg)
-
-#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
-#define __user_ok(addr,size) (((size) <= TASK_SIZE)&&((addr) <= TASK_SIZE-(size)))
-#define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size)))
-#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
-
-/*
- * These are the main single-value transfer routines.  They
- * automatically use the right size if we just have the right pointer
- * type.
- *
- * This gets kind of ugly. We want to return _two_ values in
- * "get_user()" and yet we don't want to do any pointers, because that
- * is too much of a performance impact. Thus we have a few rather ugly
- * macros here, and hide all the uglyness from the user.
- *
- * Careful to not
- * (a) re-use the arguments for side effects (sizeof is ok)
- * (b) require any knowledge of processes at this stage
- */
-#define put_user(x,ptr)        __put_user_check((x),(ptr),sizeof(*(ptr)))
-#define get_user(x,ptr) __get_user_check((x),(ptr),sizeof(*(ptr)))
-
-/*
- * The "__xxx" versions of the user access functions are versions that
- * do not verify the address space, that must have been done previously
- * with a separate "access_ok()" call (this is used when we do multiple
- * accesses to the same area of user memory).
- */
-#define __put_user(x,ptr) __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
-#define __get_user(x,ptr) __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
-
-
-extern long __put_user_bad(void);
-
-#define __put_user_nocheck(x,ptr,size)                 \
-({                                                     \
-       long __pu_err;                                  \
-       __put_user_size((x),(ptr),(size),__pu_err);     \
-       __pu_err;                                       \
-})
-
-#define __put_user_check(x,ptr,size)                           \
-({                                                             \
-       long __pu_err = -EFAULT;                                \
-       __typeof__(*(ptr)) *__pu_addr = (ptr);                  \
-       if (access_ok(VERIFY_WRITE,__pu_addr,size))             \
-               __put_user_size((x),__pu_addr,(size),__pu_err); \
-       __pu_err;                                               \
-})
-
-#define __put_user_size(x,ptr,size,retval)                             \
-do {                                                                   \
-       int __cb;                                                       \
-       retval = 0;                                                     \
-       switch (size) {                                                 \
-        case 1: __put_user_asm(x,ptr,retval,1,"s8i",__cb);  break;     \
-        case 2: __put_user_asm(x,ptr,retval,2,"s16i",__cb); break;     \
-        case 4: __put_user_asm(x,ptr,retval,4,"s32i",__cb); break;     \
-        case 8: {                                                      \
-                    __typeof__(*ptr) __v64 = x;                        \
-                    retval = __copy_to_user(ptr,&__v64,8);             \
-                    break;                                             \
-               }                                                       \
-       default: __put_user_bad();                                      \
-       }                                                               \
-} while (0)
-
-
-/*
- * Consider a case of a user single load/store would cause both an
- * unaligned exception and an MMU-related exception (unaligned
- * exceptions happen first):
- *
- * User code passes a bad variable ptr to a system call.
- * Kernel tries to access the variable.
- * Unaligned exception occurs.
- * Unaligned exception handler tries to make aligned accesses.
- * Double exception occurs for MMU-related cause (e.g., page not mapped).
- * do_page_fault() thinks the fault address belongs to the kernel, not the
- * user, and panics.
- *
- * The kernel currently prohibits user unaligned accesses.  We use the
- * __check_align_* macros to check for unaligned addresses before
- * accessing user space so we don't crash the kernel.  Both
- * __put_user_asm and __get_user_asm use these alignment macros, so
- * macro-specific labels such as 0f, 1f, %0, %2, and %3 must stay in
- * sync.
- */
-
-#define __check_align_1  ""
-
-#define __check_align_2                                \
-       "   _bbci.l %3,  0, 1f          \n"     \
-       "   movi    %0, %4              \n"     \
-       "   _j      2f                  \n"
-
-#define __check_align_4                                \
-       "   _bbsi.l %3,  0, 0f          \n"     \
-       "   _bbci.l %3,  1, 1f          \n"     \
-       "0: movi    %0, %4              \n"     \
-       "   _j      2f                  \n"
-
-
-/*
- * We don't tell gcc that we are accessing memory, but this is OK
- * because we do not write to any memory gcc knows about, so there
- * are no aliasing issues.
- *
- * WARNING: If you modify this macro at all, verify that the
- * __check_align_* macros still work.
- */
-#define __put_user_asm(x, addr, err, align, insn, cb)  \
-   __asm__ __volatile__(                               \
-       __check_align_##align                           \
-       "1: "insn"  %2, %3, 0           \n"             \
-       "2:                             \n"             \
-       "   .section  .fixup,\"ax\"     \n"             \
-       "   .align 4                    \n"             \
-       "4:                             \n"             \
-       "   .long  2b                   \n"             \
-       "5:                             \n"             \
-       "   l32r   %1, 4b               \n"             \
-        "   movi   %0, %4              \n"             \
-        "   jx     %1                  \n"             \
-       "   .previous                   \n"             \
-       "   .section  __ex_table,\"a\"  \n"             \
-       "   .long       1b, 5b          \n"             \
-       "   .previous"                                  \
-       :"=r" (err), "=r" (cb)                          \
-       :"r" ((int)(x)), "r" (addr), "i" (-EFAULT), "0" (err))
-
-#define __get_user_nocheck(x,ptr,size)                         \
-({                                                             \
-       long __gu_err, __gu_val;                                \
-       __get_user_size(__gu_val,(ptr),(size),__gu_err);        \
-       (x) = (__typeof__(*(ptr)))__gu_val;                     \
-       __gu_err;                                               \
-})
-
-#define __get_user_check(x,ptr,size)                                   \
-({                                                                     \
-       long __gu_err = -EFAULT, __gu_val = 0;                          \
-       const __typeof__(*(ptr)) *__gu_addr = (ptr);                    \
-       if (access_ok(VERIFY_READ,__gu_addr,size))                      \
-               __get_user_size(__gu_val,__gu_addr,(size),__gu_err);    \
-       (x) = (__typeof__(*(ptr)))__gu_val;                             \
-       __gu_err;                                                       \
-})
-
-extern long __get_user_bad(void);
-
-#define __get_user_size(x,ptr,size,retval)                             \
-do {                                                                   \
-       int __cb;                                                       \
-       retval = 0;                                                     \
-        switch (size) {                                                        \
-          case 1: __get_user_asm(x,ptr,retval,1,"l8ui",__cb);  break;  \
-          case 2: __get_user_asm(x,ptr,retval,2,"l16ui",__cb); break;  \
-          case 4: __get_user_asm(x,ptr,retval,4,"l32i",__cb);  break;  \
-          case 8: retval = __copy_from_user(&x,ptr,8);    break;       \
-          default: (x) = __get_user_bad();                             \
-        }                                                              \
-} while (0)
-
-
-/*
- * WARNING: If you modify this macro at all, verify that the
- * __check_align_* macros still work.
- */
-#define __get_user_asm(x, addr, err, align, insn, cb) \
-   __asm__ __volatile__(                       \
-       __check_align_##align                   \
-       "1: "insn"  %2, %3, 0           \n"     \
-       "2:                             \n"     \
-       "   .section  .fixup,\"ax\"     \n"     \
-       "   .align 4                    \n"     \
-       "4:                             \n"     \
-       "   .long  2b                   \n"     \
-       "5:                             \n"     \
-       "   l32r   %1, 4b               \n"     \
-       "   movi   %2, 0                \n"     \
-        "   movi   %0, %4              \n"     \
-        "   jx     %1                  \n"     \
-       "   .previous                   \n"     \
-       "   .section  __ex_table,\"a\"  \n"     \
-       "   .long       1b, 5b          \n"     \
-       "   .previous"                          \
-       :"=r" (err), "=r" (cb), "=r" (x)        \
-       :"r" (addr), "i" (-EFAULT), "0" (err))
-
-
-/*
- * Copy to/from user space
- */
-
-/*
- * We use a generic, arbitrary-sized copy subroutine.  The Xtensa
- * architecture would cause heavy code bloat if we tried to inline
- * these functions and provide __constant_copy_* equivalents like the
- * i386 versions.  __xtensa_copy_user is quite efficient.  See the
- * .fixup section of __xtensa_copy_user for a discussion on the
- * X_zeroing equivalents for Xtensa.
- */
-
-extern unsigned __xtensa_copy_user(void *to, const void *from, unsigned n);
-#define __copy_user(to,from,size) __xtensa_copy_user(to,from,size)
-
-
-static inline unsigned long
-__generic_copy_from_user_nocheck(void *to, const void *from, unsigned long n)
-{
-       return __copy_user(to,from,n);
-}
-
-static inline unsigned long
-__generic_copy_to_user_nocheck(void *to, const void *from, unsigned long n)
-{
-       return __copy_user(to,from,n);
-}
-
-static inline unsigned long
-__generic_copy_to_user(void *to, const void *from, unsigned long n)
-{
-       prefetch(from);
-       if (access_ok(VERIFY_WRITE, to, n))
-               return __copy_user(to,from,n);
-       return n;
-}
-
-static inline unsigned long
-__generic_copy_from_user(void *to, const void *from, unsigned long n)
-{
-       prefetchw(to);
-       if (access_ok(VERIFY_READ, from, n))
-               return __copy_user(to,from,n);
-       else
-               memset(to, 0, n);
-       return n;
-}
-
-#define copy_to_user(to,from,n) __generic_copy_to_user((to),(from),(n))
-#define copy_from_user(to,from,n) __generic_copy_from_user((to),(from),(n))
-#define __copy_to_user(to,from,n) __generic_copy_to_user_nocheck((to),(from),(n))
-#define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n))
-#define __copy_to_user_inatomic __copy_to_user
-#define __copy_from_user_inatomic __copy_from_user
-
-
-/*
- * We need to return the number of bytes not cleared.  Our memset()
- * returns zero if a problem occurs while accessing user-space memory.
- * In that event, return no memory cleared.  Otherwise, zero for
- * success.
- */
-
-static inline unsigned long
-__xtensa_clear_user(void *addr, unsigned long size)
-{
-       if ( ! memset(addr, 0, size) )
-               return size;
-       return 0;
-}
-
-static inline unsigned long
-clear_user(void *addr, unsigned long size)
-{
-       if (access_ok(VERIFY_WRITE, addr, size))
-               return __xtensa_clear_user(addr, size);
-       return size ? -EFAULT : 0;
-}
-
-#define __clear_user  __xtensa_clear_user
-
-
-extern long __strncpy_user(char *, const char *, long);
-#define __strncpy_from_user __strncpy_user
-
-static inline long
-strncpy_from_user(char *dst, const char *src, long count)
-{
-       if (access_ok(VERIFY_READ, src, 1))
-               return __strncpy_from_user(dst, src, count);
-       return -EFAULT;
-}
-
-
-#define strlen_user(str) strnlen_user((str), TASK_SIZE - 1)
-
-/*
- * Return the size of a string (including the ending 0!)
- */
-extern long __strnlen_user(const char *, long);
-
-static inline long strnlen_user(const char *str, long len)
-{
-       unsigned long top = __kernel_ok ? ~0UL : TASK_SIZE - 1;
-
-       if ((unsigned long)str > top)
-               return 0;
-       return __strnlen_user(str, len);
-}
-
-
-struct exception_table_entry
-{
-       unsigned long insn, fixup;
-};
-
-/* Returns 0 if exception not found and fixup.unit otherwise.  */
-
-extern unsigned long search_exception_table(unsigned long addr);
-extern void sort_exception_table(void);
-
-/* Returns the new pc */
-#define fixup_exception(map_reg, fixup_unit, pc)                \
-({                                                              \
-       fixup_unit;                                             \
-})
-
-#endif /* __ASSEMBLY__ */
-#endif /* _XTENSA_UACCESS_H */
diff --git a/include/asm-xtensa/ucontext.h b/include/asm-xtensa/ucontext.h
deleted file mode 100644 (file)
index 94c94ed..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * include/asm-xtensa/ucontext.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_UCONTEXT_H
-#define _XTENSA_UCONTEXT_H
-
-struct ucontext {
-       unsigned long     uc_flags;
-       struct ucontext  *uc_link;
-       stack_t           uc_stack;
-       struct sigcontext uc_mcontext;
-       sigset_t          uc_sigmask;   /* mask last for extensibility */
-};
-
-#endif /* _XTENSA_UCONTEXT_H */
diff --git a/include/asm-xtensa/unaligned.h b/include/asm-xtensa/unaligned.h
deleted file mode 100644 (file)
index 8f3424f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Xtensa doesn't handle unaligned accesses efficiently.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-#ifndef _ASM_XTENSA_UNALIGNED_H
-#define _ASM_XTENSA_UNALIGNED_H
-
-#ifdef __XTENSA_EL__
-# include <linux/unaligned/le_memmove.h>
-# include <linux/unaligned/be_byteshift.h>
-# include <linux/unaligned/generic.h>
-# define get_unaligned __get_unaligned_le
-# define put_unaligned __put_unaligned_le
-#elif defined(__XTENSA_EB__)
-# include <linux/unaligned/be_memmove.h>
-# include <linux/unaligned/le_byteshift.h>
-# include <linux/unaligned/generic.h>
-# define get_unaligned __get_unaligned_be
-# define put_unaligned __put_unaligned_be
-#else
-# error processor byte order undefined!
-#endif
-
-#endif /* _ASM_XTENSA_UNALIGNED_H */
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h
deleted file mode 100644 (file)
index c092c8f..0000000
+++ /dev/null
@@ -1,735 +0,0 @@
-/*
- * include/asm-xtensa/unistd.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_UNISTD_H
-#define _XTENSA_UNISTD_H
-
-#ifndef __SYSCALL
-# define __SYSCALL(nr,func,nargs)
-#endif
-
-#define __NR_spill                               0
-__SYSCALL(  0, sys_ni_syscall, 0)
-#define __NR_xtensa                              1
-__SYSCALL(  1, sys_ni_syscall, 0)
-#define __NR_available4                                  2
-__SYSCALL(  2, sys_ni_syscall, 0)
-#define __NR_available5                                  3
-__SYSCALL(  3, sys_ni_syscall, 0)
-#define __NR_available6                                  4
-__SYSCALL(  4, sys_ni_syscall, 0)
-#define __NR_available7                                  5
-__SYSCALL(  5, sys_ni_syscall, 0)
-#define __NR_available8                                  6
-__SYSCALL(  6, sys_ni_syscall, 0)
-#define __NR_available9                                  7
-__SYSCALL(  7, sys_ni_syscall, 0)
-
-/* File Operations */
-
-#define __NR_open                                8
-__SYSCALL(  8, sys_open, 3)
-#define __NR_close                               9
-__SYSCALL(  9, sys_close, 1)
-#define __NR_dup                                10
-__SYSCALL( 10, sys_dup, 1)
-#define __NR_dup2                               11
-__SYSCALL( 11, sys_dup2, 2)
-#define __NR_read                               12
-__SYSCALL( 12, sys_read, 3)
-#define __NR_write                              13
-__SYSCALL( 13, sys_write, 3)
-#define __NR_select                             14
-__SYSCALL( 14, sys_select, 5)
-#define __NR_lseek                              15
-__SYSCALL( 15, sys_lseek, 3)
-#define __NR_poll                               16
-__SYSCALL( 16, sys_poll, 3)
-#define __NR__llseek                            17
-__SYSCALL( 17, sys_llseek, 5)
-#define __NR_epoll_wait                         18
-__SYSCALL( 18, sys_epoll_wait, 4)
-#define __NR_epoll_ctl                                  19
-__SYSCALL( 19, sys_epoll_ctl, 4)
-#define __NR_epoll_create                       20
-__SYSCALL( 20, sys_epoll_create, 1)
-#define __NR_creat                              21
-__SYSCALL( 21, sys_creat, 2)
-#define __NR_truncate                           22
-__SYSCALL( 22, sys_truncate, 2)
-#define __NR_ftruncate                                  23
-__SYSCALL( 23, sys_ftruncate, 2)
-#define __NR_readv                              24
-__SYSCALL( 24, sys_readv, 3)
-#define __NR_writev                             25
-__SYSCALL( 25, sys_writev, 3)
-#define __NR_fsync                              26
-__SYSCALL( 26, sys_fsync, 1)
-#define __NR_fdatasync                                  27
-__SYSCALL( 27, sys_fdatasync, 1)
-#define __NR_truncate64                         28
-__SYSCALL( 28, sys_truncate64, 2)
-#define __NR_ftruncate64                        29
-__SYSCALL( 29, sys_ftruncate64, 2)
-#define __NR_pread64                            30
-__SYSCALL( 30, sys_pread64, 6)
-#define __NR_pwrite64                           31
-__SYSCALL( 31, sys_pwrite64, 6)
-
-#define __NR_link                               32
-__SYSCALL( 32, sys_link, 2)
-#define __NR_rename                             33
-__SYSCALL( 33, sys_rename, 2)
-#define __NR_symlink                            34
-__SYSCALL( 34, sys_symlink, 2)
-#define __NR_readlink                           35
-__SYSCALL( 35, sys_readlink, 3)
-#define __NR_mknod                              36
-__SYSCALL( 36, sys_mknod, 3)
-#define __NR_pipe                               37
-__SYSCALL( 37, xtensa_pipe, 1)
-#define __NR_unlink                             38
-__SYSCALL( 38, sys_unlink, 1)
-#define __NR_rmdir                              39
-__SYSCALL( 39, sys_rmdir, 1)
-
-#define __NR_mkdir                              40
-__SYSCALL( 40, sys_mkdir, 2)
-#define __NR_chdir                              41
-__SYSCALL( 41, sys_chdir, 1)
-#define __NR_fchdir                             42
-__SYSCALL( 42, sys_fchdir, 1)
-#define __NR_getcwd                             43
-__SYSCALL( 43, sys_getcwd, 2)
-
-#define __NR_chmod                              44
-__SYSCALL( 44, sys_chmod, 2)
-#define __NR_chown                              45
-__SYSCALL( 45, sys_chown, 3)
-#define __NR_stat                               46
-__SYSCALL( 46, sys_newstat, 2)
-#define __NR_stat64                             47
-__SYSCALL( 47, sys_stat64, 2)
-
-#define __NR_lchown                             48
-__SYSCALL( 48, sys_lchown, 3)
-#define __NR_lstat                              49
-__SYSCALL( 49, sys_newlstat, 2)
-#define __NR_lstat64                            50
-__SYSCALL( 50, sys_lstat64, 2)
-#define __NR_available51                        51
-__SYSCALL( 51, sys_ni_syscall, 0)
-
-#define __NR_fchmod                             52
-__SYSCALL( 52, sys_fchmod, 2)
-#define __NR_fchown                             53
-__SYSCALL( 53, sys_fchown, 3)
-#define __NR_fstat                              54
-__SYSCALL( 54, sys_newfstat, 2)
-#define __NR_fstat64                            55
-__SYSCALL( 55, sys_fstat64, 2)
-
-#define __NR_flock                              56
-__SYSCALL( 56, sys_flock, 2)
-#define __NR_access                             57
-__SYSCALL( 57, sys_access, 2)
-#define __NR_umask                              58
-__SYSCALL( 58, sys_umask, 1)
-#define __NR_getdents                           59
-__SYSCALL( 59, sys_getdents, 3)
-#define __NR_getdents64                         60
-__SYSCALL( 60, sys_getdents64, 3)
-#define __NR_fcntl64                            61
-__SYSCALL( 61, sys_fcntl64, 3)
-#define __NR_available62                        62
-__SYSCALL( 62, sys_ni_syscall, 0)
-#define __NR_fadvise64_64                       63
-__SYSCALL( 63, xtensa_fadvise64_64, 6)
-#define __NR_utime                              64     /* glibc 2.3.3 ?? */
-__SYSCALL( 64, sys_utime, 2)
-#define __NR_utimes                             65
-__SYSCALL( 65, sys_utimes, 2)
-#define __NR_ioctl                              66
-__SYSCALL( 66, sys_ioctl, 3)
-#define __NR_fcntl                              67
-__SYSCALL( 67, sys_fcntl, 3)
-
-#define __NR_setxattr                           68
-__SYSCALL( 68, sys_setxattr, 5)
-#define __NR_getxattr                           69
-__SYSCALL( 69, sys_getxattr, 4)
-#define __NR_listxattr                                  70
-__SYSCALL( 70, sys_listxattr, 3)
-#define __NR_removexattr                        71
-__SYSCALL( 71, sys_removexattr, 2)
-#define __NR_lsetxattr                                  72
-__SYSCALL( 72, sys_lsetxattr, 5)
-#define __NR_lgetxattr                                  73
-__SYSCALL( 73, sys_lgetxattr, 4)
-#define __NR_llistxattr                         74
-__SYSCALL( 74, sys_llistxattr, 3)
-#define __NR_lremovexattr                       75
-__SYSCALL( 75, sys_lremovexattr, 2)
-#define __NR_fsetxattr                                  76
-__SYSCALL( 76, sys_fsetxattr, 5)
-#define __NR_fgetxattr                                  77
-__SYSCALL( 77, sys_fgetxattr, 4)
-#define __NR_flistxattr                         78
-__SYSCALL( 78, sys_flistxattr, 3)
-#define __NR_fremovexattr                       79
-__SYSCALL( 79, sys_fremovexattr, 2)
-
-/* File Map / Shared Memory Operations */
-
-#define __NR_mmap2                              80
-__SYSCALL( 80, xtensa_mmap2, 6)
-#define __NR_munmap                             81
-__SYSCALL( 81, sys_munmap, 2)
-#define __NR_mprotect                           82
-__SYSCALL( 82, sys_mprotect, 3)
-#define __NR_brk                                83
-__SYSCALL( 83, sys_brk, 1)
-#define __NR_mlock                              84
-__SYSCALL( 84, sys_mlock, 2)
-#define __NR_munlock                            85
-__SYSCALL( 85, sys_munlock, 2)
-#define __NR_mlockall                           86
-__SYSCALL( 86, sys_mlockall, 1)
-#define __NR_munlockall                         87
-__SYSCALL( 87, sys_munlockall, 0)
-#define __NR_mremap                             88
-__SYSCALL( 88, sys_mremap, 4)
-#define __NR_msync                              89
-__SYSCALL( 89, sys_msync, 3)
-#define __NR_mincore                            90
-__SYSCALL( 90, sys_mincore, 3)
-#define __NR_madvise                            91
-__SYSCALL( 91, sys_madvise, 3)
-#define __NR_shmget                             92
-__SYSCALL( 92, sys_shmget, 4)
-#define __NR_shmat                              93
-__SYSCALL( 93, xtensa_shmat, 4)
-#define __NR_shmctl                             94
-__SYSCALL( 94, sys_shmctl, 4)
-#define __NR_shmdt                              95
-__SYSCALL( 95, sys_shmdt, 4)
-
-/* Socket Operations */
-
-#define __NR_socket                             96
-__SYSCALL( 96, sys_socket, 3)
-#define __NR_setsockopt                         97
-__SYSCALL( 97, sys_setsockopt, 5)
-#define __NR_getsockopt                         98
-__SYSCALL( 98, sys_getsockopt, 5)
-#define __NR_shutdown                           99
-__SYSCALL( 99, sys_shutdown, 2)
-
-#define __NR_bind                              100
-__SYSCALL(100, sys_bind, 3)
-#define __NR_connect                           101
-__SYSCALL(101, sys_connect, 3)
-#define __NR_listen                            102
-__SYSCALL(102, sys_listen, 2)
-#define __NR_accept                            103
-__SYSCALL(103, sys_accept, 3)
-
-#define __NR_getsockname                       104
-__SYSCALL(104, sys_getsockname, 3)
-#define __NR_getpeername                       105
-__SYSCALL(105, sys_getpeername, 3)
-#define __NR_sendmsg                           106
-__SYSCALL(106, sys_sendmsg, 3)
-#define __NR_recvmsg                           107
-__SYSCALL(107, sys_recvmsg, 3)
-#define __NR_send                              108
-__SYSCALL(108, sys_send, 4)
-#define __NR_recv                              109
-__SYSCALL(109, sys_recv, 4)
-#define __NR_sendto                            110
-__SYSCALL(110, sys_sendto, 6)
-#define __NR_recvfrom                          111
-__SYSCALL(111, sys_recvfrom, 6)
-
-#define __NR_socketpair                        112
-__SYSCALL(112, sys_socketpair, 4)
-#define __NR_sendfile                          113
-__SYSCALL(113, sys_sendfile, 4)
-#define __NR_sendfile64                        114
-__SYSCALL(114, sys_sendfile64, 4)
-#define __NR_available115                      115
-__SYSCALL(115, sys_ni_syscall, 0)
-
-/* Process Operations */
-
-#define __NR_clone                             116
-__SYSCALL(116, xtensa_clone, 5)
-#define __NR_execve                            117
-__SYSCALL(117, xtensa_execve, 3)
-#define __NR_exit                              118
-__SYSCALL(118, sys_exit, 1)
-#define __NR_exit_group                        119
-__SYSCALL(119, sys_exit_group, 1)
-#define __NR_getpid                            120
-__SYSCALL(120, sys_getpid, 0)
-#define __NR_wait4                             121
-__SYSCALL(121, sys_wait4, 4)
-#define __NR_waitid                            122
-__SYSCALL(122, sys_waitid, 5)
-#define __NR_kill                              123
-__SYSCALL(123, sys_kill, 2)
-#define __NR_tkill                             124
-__SYSCALL(124, sys_tkill, 2)
-#define __NR_tgkill                            125
-__SYSCALL(125, sys_tgkill, 3)
-#define __NR_set_tid_address                   126
-__SYSCALL(126, sys_set_tid_address, 1)
-#define __NR_gettid                            127
-__SYSCALL(127, sys_gettid, 0)
-#define __NR_setsid                            128
-__SYSCALL(128, sys_setsid, 0)
-#define __NR_getsid                            129
-__SYSCALL(129, sys_getsid, 1)
-#define __NR_prctl                             130
-__SYSCALL(130, sys_prctl, 5)
-#define __NR_personality                       131
-__SYSCALL(131, sys_personality, 1)
-#define __NR_getpriority                       132
-__SYSCALL(132, sys_getpriority, 2)
-#define __NR_setpriority                       133
-__SYSCALL(133, sys_setpriority, 3)
-#define __NR_setitimer                                 134
-__SYSCALL(134, sys_setitimer, 3)
-#define __NR_getitimer                                 135
-__SYSCALL(135, sys_getitimer, 2)
-#define __NR_setuid                            136
-__SYSCALL(136, sys_setuid, 1)
-#define __NR_getuid                            137
-__SYSCALL(137, sys_getuid, 0)
-#define __NR_setgid                            138
-__SYSCALL(138, sys_setgid, 1)
-#define __NR_getgid                            139
-__SYSCALL(139, sys_getgid, 0)
-#define __NR_geteuid                           140
-__SYSCALL(140, sys_geteuid, 0)
-#define __NR_getegid                           141
-__SYSCALL(141, sys_getegid, 0)
-#define __NR_setreuid                          142
-__SYSCALL(142, sys_setreuid, 2)
-#define __NR_setregid                          143
-__SYSCALL(143, sys_setregid, 2)
-#define __NR_setresuid                                 144
-__SYSCALL(144, sys_setresuid, 3)
-#define __NR_getresuid                                 145
-__SYSCALL(145, sys_getresuid, 3)
-#define __NR_setresgid                                 146
-__SYSCALL(146, sys_setresgid, 3)
-#define __NR_getresgid                                 147
-__SYSCALL(147, sys_getresgid, 3)
-#define __NR_setpgid                           148
-__SYSCALL(148, sys_setpgid, 2)
-#define __NR_getpgid                           149
-__SYSCALL(149, sys_getpgid, 1)
-#define __NR_getppid                           150
-__SYSCALL(150, sys_getppid, 0)
-#define __NR_getpgrp                           151
-__SYSCALL(151, sys_getpgrp, 0)
-
-#define __NR_reserved152                       152     /* set_thread_area */
-__SYSCALL(152, sys_ni_syscall, 0)
-#define __NR_reserved153                       153     /* get_thread_area */
-__SYSCALL(153, sys_ni_syscall, 0)
-#define __NR_times                             154
-__SYSCALL(154, sys_times, 1)
-#define __NR_acct                              155
-__SYSCALL(155, sys_acct, 1)
-#define __NR_sched_setaffinity                         156
-__SYSCALL(156, sys_sched_setaffinity, 3)
-#define __NR_sched_getaffinity                         157
-__SYSCALL(157, sys_sched_getaffinity, 3)
-#define __NR_capget                            158
-__SYSCALL(158, sys_capget, 2)
-#define __NR_capset                            159
-__SYSCALL(159, sys_capset, 2)
-#define __NR_ptrace                            160
-__SYSCALL(160, sys_ptrace, 4)
-#define __NR_semtimedop                                161
-__SYSCALL(161, sys_semtimedop, 5)
-#define __NR_semget                            162
-__SYSCALL(162, sys_semget, 4)
-#define __NR_semop                             163
-__SYSCALL(163, sys_semop, 4)
-#define __NR_semctl                            164
-__SYSCALL(164, sys_semctl, 4)
-#define __NR_available165                      165
-__SYSCALL(165, sys_ni_syscall, 0)
-#define __NR_msgget                            166
-__SYSCALL(166, sys_msgget, 4)
-#define __NR_msgsnd                            167
-__SYSCALL(167, sys_msgsnd, 4)
-#define __NR_msgrcv                            168
-__SYSCALL(168, sys_msgrcv, 4)
-#define __NR_msgctl                            169
-__SYSCALL(169, sys_msgctl, 4)
-#define __NR_available170                      170
-__SYSCALL(170, sys_ni_syscall, 0)
-#define __NR_available171                      171
-__SYSCALL(171, sys_ni_syscall, 0)
-
-/* File System */
-
-#define __NR_mount                             172
-__SYSCALL(172, sys_mount, 5)
-#define __NR_swapon                            173
-__SYSCALL(173, sys_swapon, 2)
-#define __NR_chroot                            174
-__SYSCALL(174, sys_chroot, 1)
-#define __NR_pivot_root                        175
-__SYSCALL(175, sys_pivot_root, 2)
-#define __NR_umount                            176
-__SYSCALL(176, sys_umount, 2)
-#define __NR_swapoff                           177
-__SYSCALL(177, sys_swapoff, 1)
-#define __NR_sync                              178
-__SYSCALL(178, sys_sync, 0)
-#define __NR_available179                      179
-__SYSCALL(179, sys_ni_syscall, 0)
-#define __NR_setfsuid                          180
-__SYSCALL(180, sys_setfsuid, 1)
-#define __NR_setfsgid                          181
-__SYSCALL(181, sys_setfsgid, 1)
-#define __NR_sysfs                             182
-__SYSCALL(182, sys_sysfs, 3)
-#define __NR_ustat                             183
-__SYSCALL(183, sys_ustat, 2)
-#define __NR_statfs                            184
-__SYSCALL(184, sys_statfs, 2)
-#define __NR_fstatfs                           185
-__SYSCALL(185, sys_fstatfs, 2)
-#define __NR_statfs64                          186
-__SYSCALL(186, sys_statfs64, 3)
-#define __NR_fstatfs64                                 187
-__SYSCALL(187, sys_fstatfs64, 3)
-
-/* System */
-
-#define __NR_setrlimit                                 188
-__SYSCALL(188, sys_setrlimit, 2)
-#define __NR_getrlimit                                 189
-__SYSCALL(189, sys_getrlimit, 2)
-#define __NR_getrusage                                 190
-__SYSCALL(190, sys_getrusage, 2)
-#define __NR_futex                             191
-__SYSCALL(191, sys_futex, 5)
-#define __NR_gettimeofday                      192
-__SYSCALL(192, sys_gettimeofday, 2)
-#define __NR_settimeofday                      193
-__SYSCALL(193, sys_settimeofday, 2)
-#define __NR_adjtimex                          194
-__SYSCALL(194, sys_adjtimex, 1)
-#define __NR_nanosleep                         195
-__SYSCALL(195, sys_nanosleep, 2)
-#define __NR_getgroups                                 196
-__SYSCALL(196, sys_getgroups, 2)
-#define __NR_setgroups                                 197
-__SYSCALL(197, sys_setgroups, 2)
-#define __NR_sethostname                       198
-__SYSCALL(198, sys_sethostname, 2)
-#define __NR_setdomainname                     199
-__SYSCALL(199, sys_setdomainname, 2)
-#define __NR_syslog                            200
-__SYSCALL(200, sys_syslog, 3)
-#define __NR_vhangup                           201
-__SYSCALL(201, sys_vhangup, 0)
-#define __NR_uselib                            202
-__SYSCALL(202, sys_uselib, 1)
-#define __NR_reboot                            203
-__SYSCALL(203, sys_reboot, 3)
-#define __NR_quotactl                          204
-__SYSCALL(204, sys_quotactl, 4)
-#define __NR_nfsservctl                        205
-__SYSCALL(205, sys_nfsservctl, 3)
-#define __NR__sysctl                           206
-__SYSCALL(206, sys_sysctl, 1)
-#define __NR_bdflush                           207
-__SYSCALL(207, sys_bdflush, 2)
-#define __NR_uname                             208
-__SYSCALL(208, sys_newuname, 1)
-#define __NR_sysinfo                           209
-__SYSCALL(209, sys_sysinfo, 1)
-#define __NR_init_module                       210
-__SYSCALL(210, sys_init_module, 2)
-#define __NR_delete_module                     211
-__SYSCALL(211, sys_delete_module, 1)
-
-#define __NR_sched_setparam                    212
-__SYSCALL(212, sys_sched_setparam, 2)
-#define __NR_sched_getparam                    213
-__SYSCALL(213, sys_sched_getparam, 2)
-#define __NR_sched_setscheduler                214
-__SYSCALL(214, sys_sched_setscheduler, 3)
-#define __NR_sched_getscheduler                215
-__SYSCALL(215, sys_sched_getscheduler, 1)
-#define __NR_sched_get_priority_max            216
-__SYSCALL(216, sys_sched_get_priority_max, 1)
-#define __NR_sched_get_priority_min            217
-__SYSCALL(217, sys_sched_get_priority_min, 1)
-#define __NR_sched_rr_get_interval             218
-__SYSCALL(218, sys_sched_rr_get_interval, 2)
-#define __NR_sched_yield                       219
-__SYSCALL(219, sys_sched_yield, 0)
-#define __NR_available222                      222
-__SYSCALL(222, sys_ni_syscall, 0)
-
-/* Signal Handling */
-
-#define __NR_restart_syscall                   223
-__SYSCALL(223, sys_restart_syscall, 0)
-#define __NR_sigaltstack                       224
-__SYSCALL(224, xtensa_sigaltstack, 2)
-#define __NR_rt_sigreturn                      225
-__SYSCALL(225, xtensa_rt_sigreturn, 1)
-#define __NR_rt_sigaction                      226
-__SYSCALL(226, sys_rt_sigaction, 4)
-#define __NR_rt_sigprocmask                    227
-__SYSCALL(227, sys_rt_sigprocmask, 4)
-#define __NR_rt_sigpending                     228
-__SYSCALL(228, sys_rt_sigpending, 2)
-#define __NR_rt_sigtimedwait                   229
-__SYSCALL(229, sys_rt_sigtimedwait, 4)
-#define __NR_rt_sigqueueinfo                   230
-__SYSCALL(230, sys_rt_sigqueueinfo, 3)
-#define __NR_rt_sigsuspend                     231
-__SYSCALL(231, xtensa_rt_sigsuspend, 2)
-
-/* Message */
-
-#define __NR_mq_open                           232
-__SYSCALL(232, sys_mq_open, 4)
-#define __NR_mq_unlink                                 233
-__SYSCALL(233, sys_mq_unlink, 1)
-#define __NR_mq_timedsend                      234
-__SYSCALL(234, sys_mq_timedsend, 5)
-#define __NR_mq_timedreceive                   235
-__SYSCALL(235, sys_mq_timedreceive, 5)
-#define __NR_mq_notify                                 236
-__SYSCALL(236, sys_mq_notify, 2)
-#define __NR_mq_getsetattr                     237
-__SYSCALL(237, sys_mq_getsetattr, 3)
-#define __NR_available238                      238
-__SYSCALL(238, sys_ni_syscall, 0)
-
-/* IO */
-
-#define __NR_io_setup                          239
-__SYSCALL(239, sys_io_setup, 2)
-#define __NR_io_destroy                        240
-__SYSCALL(240, sys_io_destroy, 1)
-#define __NR_io_submit                                 241
-__SYSCALL(241, sys_io_submit, 3)
-#define __NR_io_getevents                      242
-__SYSCALL(242, sys_io_getevents, 5)
-#define __NR_io_cancel                                 243
-__SYSCALL(243, sys_io_cancel, 3)
-#define __NR_clock_settime                     244
-__SYSCALL(244, sys_clock_settime, 2)
-#define __NR_clock_gettime                     245
-__SYSCALL(245, sys_clock_gettime, 2)
-#define __NR_clock_getres                      246
-__SYSCALL(246, sys_clock_getres, 2)
-#define __NR_clock_nanosleep                   247
-__SYSCALL(247, sys_clock_nanosleep, 4)
-
-/* Timer */
-
-#define __NR_timer_create                      248
-__SYSCALL(248, sys_timer_create, 3)
-#define __NR_timer_delete                      249
-__SYSCALL(249, sys_timer_delete, 1)
-#define __NR_timer_settime                     250
-__SYSCALL(250, sys_timer_settime, 4)
-#define __NR_timer_gettime                     251
-__SYSCALL(251, sys_timer_gettime, 2)
-#define __NR_timer_getoverrun                  252
-__SYSCALL(252, sys_timer_getoverrun, 1)
-
-/* System */
-
-#define __NR_reserved244                       253
-__SYSCALL(253, sys_ni_syscall, 0)
-#define __NR_lookup_dcookie                    254
-__SYSCALL(254, sys_lookup_dcookie, 4)
-#define __NR_available255                      255
-__SYSCALL(255, sys_ni_syscall, 0)
-#define __NR_add_key                           256
-__SYSCALL(256, sys_add_key, 5)
-#define __NR_request_key                       257
-__SYSCALL(257, sys_request_key, 5)
-#define __NR_keyctl                            258
-__SYSCALL(258, sys_keyctl, 5)
-#define __NR_available259                      259
-__SYSCALL(259, sys_ni_syscall, 0)
-
-
-#define __NR_readahead                         260
-__SYSCALL(260, sys_readahead, 5)
-#define __NR_remap_file_pages                  261
-__SYSCALL(261, sys_remap_file_pages, 5)
-#define __NR_migrate_pages                     262
-__SYSCALL(262, sys_migrate_pages, 0)
-#define __NR_mbind                             263
-__SYSCALL(263, sys_mbind, 6)
-#define __NR_get_mempolicy                     264
-__SYSCALL(264, sys_get_mempolicy, 5)
-#define __NR_set_mempolicy                     265
-__SYSCALL(265, sys_set_mempolicy, 3)
-#define __NR_unshare                           266
-__SYSCALL(266, sys_unshare, 1)
-#define __NR_move_pages                                267
-__SYSCALL(267, sys_move_pages, 0)
-#define __NR_splice                            268
-__SYSCALL(268, sys_splice, 0)
-#define __NR_tee                               269
-__SYSCALL(269, sys_tee, 0)
-#define __NR_vmsplice                          270
-__SYSCALL(270, sys_vmsplice, 0)
-#define __NR_available271                      271
-__SYSCALL(271, sys_ni_syscall, 0)
-
-#define __NR_pselect6                          272
-__SYSCALL(272, sys_pselect6, 0)
-#define __NR_ppoll                             273
-__SYSCALL(273, sys_ppoll, 0)
-#define __NR_epoll_pwait                       274
-__SYSCALL(274, sys_epoll_pwait, 0)
-#define __NR_available275                      275
-__SYSCALL(275, sys_ni_syscall, 0)
-
-#define __NR_inotify_init                      276
-__SYSCALL(276, sys_inotify_init, 0)
-#define __NR_inotify_add_watch                 277
-__SYSCALL(277, sys_inotify_add_watch, 3)
-#define __NR_inotify_rm_watch                  278
-__SYSCALL(278, sys_inotify_rm_watch, 2)
-#define __NR_available279                      279
-__SYSCALL(279, sys_ni_syscall, 0)
-
-#define __NR_getcpu                            280
-__SYSCALL(280, sys_getcpu, 0)
-#define __NR_kexec_load                                281
-__SYSCALL(281, sys_ni_syscall, 0)
-
-#define __NR_ioprio_set                                282
-__SYSCALL(282, sys_ioprio_set, 2)
-#define __NR_ioprio_get                                283
-__SYSCALL(283, sys_ioprio_get, 3)
-
-#define __NR_set_robust_list                   284
-__SYSCALL(284, sys_set_robust_list, 3)
-#define __NR_get_robust_list                   285
-__SYSCALL(285, sys_get_robust_list, 3)
-#define __NR_reserved286                       286     /* sync_file_rangeX */
-__SYSCALL(286, sys_ni_syscall, 3)
-#define __NR_available287                      287
-__SYSCALL(287, sys_faccessat, 0)
-
-/* Relative File Operations */
-
-#define __NR_openat                            288
-__SYSCALL(288, sys_openat, 4)
-#define __NR_mkdirat                           289
-__SYSCALL(289, sys_mkdirat, 3)
-#define __NR_mknodat                           290
-__SYSCALL(290, sys_mknodat, 4)
-#define __NR_unlinkat                          291
-__SYSCALL(291, sys_unlinkat, 3)
-#define __NR_renameat                          292
-__SYSCALL(292, sys_renameat, 4)
-#define __NR_linkat                            293
-__SYSCALL(293, sys_linkat, 5)
-#define __NR_symlinkat                         294
-__SYSCALL(294, sys_symlinkat, 3)
-#define __NR_readlinkat                                295
-__SYSCALL(295, sys_readlinkat, 4)
-#define __NR_utimensat                         296
-__SYSCALL(296, sys_utimensat, 0)
-#define __NR_fchownat                          297
-__SYSCALL(297, sys_fchownat, 5)
-#define __NR_futimesat                         298
-__SYSCALL(298, sys_futimesat, 4)
-#define __NR_fstatat64                         299
-__SYSCALL(299, sys_fstatat64, 0)
-#define __NR_fchmodat                          300
-__SYSCALL(300, sys_fchmodat, 4)
-#define __NR_faccessat                         301
-__SYSCALL(301, sys_faccessat, 4)
-#define __NR_available302                      302
-__SYSCALL(302, sys_ni_syscall, 0)
-#define __NR_available303                      303
-__SYSCALL(303, sys_ni_syscall, 0)
-
-#define __NR_signalfd                          304
-__SYSCALL(304, sys_signalfd, 3)
-/*  305 was __NR_timerfd  */
-__SYSCALL(305, sys_ni_syscall, 0)
-#define __NR_eventfd                           306
-__SYSCALL(306, sys_eventfd, 1)
-
-#define __NR_syscall_count                     307
-
-/*
- * sysxtensa syscall handler
- *
- * int sysxtensa (SYS_XTENSA_ATOMIC_SET,     ptr, val,    unused);
- * int sysxtensa (SYS_XTENSA_ATOMIC_ADD,     ptr, val,    unused);
- * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val,    unused);
- * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval);
- *        a2            a6                   a3    a4      a5
- */
-
-#define SYS_XTENSA_RESERVED               0     /* don't use this */
-#define SYS_XTENSA_ATOMIC_SET             1     /* set variable */
-#define SYS_XTENSA_ATOMIC_EXG_ADD         2     /* exchange memory and add */
-#define SYS_XTENSA_ATOMIC_ADD             3     /* add to memory */
-#define SYS_XTENSA_ATOMIC_CMP_SWP         4     /* compare and swap */
-
-#define SYS_XTENSA_COUNT                  5     /* count */
-
-#ifdef __KERNEL__
-
-/*
- * "Conditional" syscalls
- *
- * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
- * but it doesn't work on all toolchains, so we just do it by hand
- */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
-
-#define __ARCH_WANT_STAT64
-#define __ARCH_WANT_SYS_UTIME
-#define __ARCH_WANT_SYS_LLSEEK
-#define __ARCH_WANT_SYS_RT_SIGACTION
-#define __ARCH_WANT_SYS_RT_SIGSUSPEND
-#define __ARCH_WANT_SYS_GETPGRP
-
-/* 
- * Ignore legacy system calls in the checksyscalls.sh script
- */
-
-#define __IGNORE_fork                          /* use clone */
-#define __IGNORE_time
-#define __IGNORE_alarm                         /* use setitimer */
-#define __IGNORE_pause
-#define __IGNORE_mmap                          /* use mmap2 */
-#define __IGNORE_vfork                         /* use clone */
-#define __IGNORE_fadvise64                     /* use fadvise64_64 */
-
-#endif /* __KERNEL__ */
-#endif /* _XTENSA_UNISTD_H */
diff --git a/include/asm-xtensa/user.h b/include/asm-xtensa/user.h
deleted file mode 100644 (file)
index 2c3ed23..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * include/asm-xtensa/user.h
- *
- * Xtensa Processor version.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_USER_H
-#define _XTENSA_USER_H
-
-/* This file usually defines a 'struct user' structure. However, it it only
- * used for a.out file, which are not supported on Xtensa.
- */
-
-#endif /* _XTENSA_USER_H */
diff --git a/include/asm-xtensa/variant-dc232b/core.h b/include/asm-xtensa/variant-dc232b/core.h
deleted file mode 100644 (file)
index 525bd3d..0000000
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Xtensa processor core configuration information.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (c) 1999-2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CORE_CONFIGURATION_H
-#define _XTENSA_CORE_CONFIGURATION_H
-
-
-/****************************************************************************
-           Parameters Useful for Any Code, USER or PRIVILEGED
- ****************************************************************************/
-
-/*
- *  Note:  Macros of the form XCHAL_HAVE_*** have a value of 1 if the option is
- *  configured, and a value of 0 otherwise.  These macros are always defined.
- */
-
-
-/*----------------------------------------------------------------------
-                               ISA
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_HAVE_BE                  0       /* big-endian byte ordering */
-#define XCHAL_HAVE_WINDOWED            1       /* windowed registers option */
-#define XCHAL_NUM_AREGS                        32      /* num of physical addr regs */
-#define XCHAL_NUM_AREGS_LOG2           5       /* log2(XCHAL_NUM_AREGS) */
-#define XCHAL_MAX_INSTRUCTION_SIZE     3       /* max instr bytes (3..8) */
-#define XCHAL_HAVE_DEBUG               1       /* debug option */
-#define XCHAL_HAVE_DENSITY             1       /* 16-bit instructions */
-#define XCHAL_HAVE_LOOPS               1       /* zero-overhead loops */
-#define XCHAL_HAVE_NSA                 1       /* NSA/NSAU instructions */
-#define XCHAL_HAVE_MINMAX              1       /* MIN/MAX instructions */
-#define XCHAL_HAVE_SEXT                        1       /* SEXT instruction */
-#define XCHAL_HAVE_CLAMPS              1       /* CLAMPS instruction */
-#define XCHAL_HAVE_MUL16               1       /* MUL16S/MUL16U instructions */
-#define XCHAL_HAVE_MUL32               1       /* MULL instruction */
-#define XCHAL_HAVE_MUL32_HIGH          0       /* MULUH/MULSH instructions */
-#define XCHAL_HAVE_DIV32               1       /* QUOS/QUOU/REMS/REMU instructions */
-#define XCHAL_HAVE_L32R                        1       /* L32R instruction */
-#define XCHAL_HAVE_ABSOLUTE_LITERALS   1       /* non-PC-rel (extended) L32R */
-#define XCHAL_HAVE_CONST16             0       /* CONST16 instruction */
-#define XCHAL_HAVE_ADDX                        1       /* ADDX#/SUBX# instructions */
-#define XCHAL_HAVE_WIDE_BRANCHES       0       /* B*.W18 or B*.W15 instr's */
-#define XCHAL_HAVE_PREDICTED_BRANCHES  0       /* B[EQ/EQZ/NE/NEZ]T instr's */
-#define XCHAL_HAVE_CALL4AND12          1       /* (obsolete option) */
-#define XCHAL_HAVE_ABS                 1       /* ABS instruction */
-/*#define XCHAL_HAVE_POPC              0*/     /* POPC instruction */
-/*#define XCHAL_HAVE_CRC               0*/     /* CRC instruction */
-#define XCHAL_HAVE_RELEASE_SYNC                1       /* L32AI/S32RI instructions */
-#define XCHAL_HAVE_S32C1I              1       /* S32C1I instruction */
-#define XCHAL_HAVE_SPECULATION         0       /* speculation */
-#define XCHAL_HAVE_FULL_RESET          1       /* all regs/state reset */
-#define XCHAL_NUM_CONTEXTS             1       /* */
-#define XCHAL_NUM_MISC_REGS            2       /* num of scratch regs (0..4) */
-#define XCHAL_HAVE_TAP_MASTER          0       /* JTAG TAP control instr's */
-#define XCHAL_HAVE_PRID                        1       /* processor ID register */
-#define XCHAL_HAVE_THREADPTR           1       /* THREADPTR register */
-#define XCHAL_HAVE_BOOLEANS            0       /* boolean registers */
-#define XCHAL_HAVE_CP                  1       /* CPENABLE reg (coprocessor) */
-#define XCHAL_CP_MAXCFG                        8       /* max allowed cp id plus one */
-#define XCHAL_HAVE_MAC16               1       /* MAC16 package */
-#define XCHAL_HAVE_VECTORFPU2005       0       /* vector floating-point pkg */
-#define XCHAL_HAVE_FP                  0       /* floating point pkg */
-#define XCHAL_HAVE_VECTRA1             0       /* Vectra I  pkg */
-#define XCHAL_HAVE_VECTRALX            0       /* Vectra LX pkg */
-#define XCHAL_HAVE_HIFI2               0       /* HiFi2 Audio Engine pkg */
-
-
-/*----------------------------------------------------------------------
-                               MISC
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_NUM_WRITEBUFFER_ENTRIES  8       /* size of write buffer */
-#define XCHAL_INST_FETCH_WIDTH         4       /* instr-fetch width in bytes */
-#define XCHAL_DATA_WIDTH               4       /* data width in bytes */
-/*  In T1050, applies to selected core load and store instructions (see ISA): */
-#define XCHAL_UNALIGNED_LOAD_EXCEPTION 1       /* unaligned loads cause exc. */
-#define XCHAL_UNALIGNED_STORE_EXCEPTION        1       /* unaligned stores cause exc.*/
-
-#define XCHAL_SW_VERSION               701001  /* sw version of this header */
-
-#define XCHAL_CORE_ID                  "dc232b"        /* alphanum core name
-                                                  (CoreID) set in the Xtensa
-                                                  Processor Generator */
-
-#define XCHAL_CORE_DESCRIPTION         "Diamond 232L Standard Core Rev.B (LE)"
-#define XCHAL_BUILD_UNIQUE_ID          0x0000BEEF      /* 22-bit sw build ID */
-
-/*
- *  These definitions describe the hardware targeted by this software.
- */
-#define XCHAL_HW_CONFIGID0             0xC56307FE      /* ConfigID hi 32 bits*/
-#define XCHAL_HW_CONFIGID1             0x0D40BEEF      /* ConfigID lo 32 bits*/
-#define XCHAL_HW_VERSION_NAME          "LX2.1.1"       /* full version name */
-#define XCHAL_HW_VERSION_MAJOR         2210    /* major ver# of targeted hw */
-#define XCHAL_HW_VERSION_MINOR         1       /* minor ver# of targeted hw */
-#define XCHAL_HW_VERSION               221001  /* major*100+minor */
-#define XCHAL_HW_REL_LX2               1
-#define XCHAL_HW_REL_LX2_1             1
-#define XCHAL_HW_REL_LX2_1_1           1
-#define XCHAL_HW_CONFIGID_RELIABLE     1
-/*  If software targets a *range* of hardware versions, these are the bounds: */
-#define XCHAL_HW_MIN_VERSION_MAJOR     2210    /* major v of earliest tgt hw */
-#define XCHAL_HW_MIN_VERSION_MINOR     1       /* minor v of earliest tgt hw */
-#define XCHAL_HW_MIN_VERSION           221001  /* earliest targeted hw */
-#define XCHAL_HW_MAX_VERSION_MAJOR     2210    /* major v of latest tgt hw */
-#define XCHAL_HW_MAX_VERSION_MINOR     1       /* minor v of latest tgt hw */
-#define XCHAL_HW_MAX_VERSION           221001  /* latest targeted hw */
-
-
-/*----------------------------------------------------------------------
-                               CACHE
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_ICACHE_LINESIZE          32      /* I-cache line size in bytes */
-#define XCHAL_DCACHE_LINESIZE          32      /* D-cache line size in bytes */
-#define XCHAL_ICACHE_LINEWIDTH         5       /* log2(I line size in bytes) */
-#define XCHAL_DCACHE_LINEWIDTH         5       /* log2(D line size in bytes) */
-
-#define XCHAL_ICACHE_SIZE              16384   /* I-cache size in bytes or 0 */
-#define XCHAL_DCACHE_SIZE              16384   /* D-cache size in bytes or 0 */
-
-#define XCHAL_DCACHE_IS_WRITEBACK      1       /* writeback feature */
-
-
-
-
-/****************************************************************************
-    Parameters Useful for PRIVILEGED (Supervisory or Non-Virtualized) Code
- ****************************************************************************/
-
-
-#ifndef XTENSA_HAL_NON_PRIVILEGED_ONLY
-
-/*----------------------------------------------------------------------
-                               CACHE
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_HAVE_PIF                 1       /* any outbound PIF present */
-
-/*  If present, cache size in bytes == (ways * 2^(linewidth + setwidth)).  */
-
-/*  Number of cache sets in log2(lines per way):  */
-#define XCHAL_ICACHE_SETWIDTH          7
-#define XCHAL_DCACHE_SETWIDTH          7
-
-/*  Cache set associativity (number of ways):  */
-#define XCHAL_ICACHE_WAYS              4
-#define XCHAL_DCACHE_WAYS              4
-
-/*  Cache features:  */
-#define XCHAL_ICACHE_LINE_LOCKABLE     1
-#define XCHAL_DCACHE_LINE_LOCKABLE     1
-#define XCHAL_ICACHE_ECC_PARITY                0
-#define XCHAL_DCACHE_ECC_PARITY                0
-
-/*  Number of encoded cache attr bits (see <xtensa/hal.h> for decoded bits):  */
-#define XCHAL_CA_BITS                  4
-
-
-/*----------------------------------------------------------------------
-                       INTERNAL I/D RAM/ROMs and XLMI
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_NUM_INSTROM              0       /* number of core instr. ROMs */
-#define XCHAL_NUM_INSTRAM              0       /* number of core instr. RAMs */
-#define XCHAL_NUM_DATAROM              0       /* number of core data ROMs */
-#define XCHAL_NUM_DATARAM              0       /* number of core data RAMs */
-#define XCHAL_NUM_URAM                 0       /* number of core unified RAMs*/
-#define XCHAL_NUM_XLMI                 0       /* number of core XLMI ports */
-
-
-/*----------------------------------------------------------------------
-                       INTERRUPTS and TIMERS
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_HAVE_INTERRUPTS          1       /* interrupt option */
-#define XCHAL_HAVE_HIGHPRI_INTERRUPTS  1       /* med/high-pri. interrupts */
-#define XCHAL_HAVE_NMI                 1       /* non-maskable interrupt */
-#define XCHAL_HAVE_CCOUNT              1       /* CCOUNT reg. (timer option) */
-#define XCHAL_NUM_TIMERS               3       /* number of CCOMPAREn regs */
-#define XCHAL_NUM_INTERRUPTS           22      /* number of interrupts */
-#define XCHAL_NUM_INTERRUPTS_LOG2      5       /* ceil(log2(NUM_INTERRUPTS)) */
-#define XCHAL_NUM_EXTINTERRUPTS                17      /* num of external interrupts */
-#define XCHAL_NUM_INTLEVELS            6       /* number of interrupt levels
-                                                  (not including level zero) */
-#define XCHAL_EXCM_LEVEL               3       /* level masked by PS.EXCM */
-       /* (always 1 in XEA1; levels 2 .. EXCM_LEVEL are "medium priority") */
-
-/*  Masks of interrupts at each interrupt level:  */
-#define XCHAL_INTLEVEL1_MASK           0x001F80FF
-#define XCHAL_INTLEVEL2_MASK           0x00000100
-#define XCHAL_INTLEVEL3_MASK           0x00200E00
-#define XCHAL_INTLEVEL4_MASK           0x00001000
-#define XCHAL_INTLEVEL5_MASK           0x00002000
-#define XCHAL_INTLEVEL6_MASK           0x00000000
-#define XCHAL_INTLEVEL7_MASK           0x00004000
-
-/*  Masks of interrupts at each range 1..n of interrupt levels:  */
-#define XCHAL_INTLEVEL1_ANDBELOW_MASK  0x001F80FF
-#define XCHAL_INTLEVEL2_ANDBELOW_MASK  0x001F81FF
-#define XCHAL_INTLEVEL3_ANDBELOW_MASK  0x003F8FFF
-#define XCHAL_INTLEVEL4_ANDBELOW_MASK  0x003F9FFF
-#define XCHAL_INTLEVEL5_ANDBELOW_MASK  0x003FBFFF
-#define XCHAL_INTLEVEL6_ANDBELOW_MASK  0x003FBFFF
-#define XCHAL_INTLEVEL7_ANDBELOW_MASK  0x003FFFFF
-
-/*  Level of each interrupt:  */
-#define XCHAL_INT0_LEVEL               1
-#define XCHAL_INT1_LEVEL               1
-#define XCHAL_INT2_LEVEL               1
-#define XCHAL_INT3_LEVEL               1
-#define XCHAL_INT4_LEVEL               1
-#define XCHAL_INT5_LEVEL               1
-#define XCHAL_INT6_LEVEL               1
-#define XCHAL_INT7_LEVEL               1
-#define XCHAL_INT8_LEVEL               2
-#define XCHAL_INT9_LEVEL               3
-#define XCHAL_INT10_LEVEL              3
-#define XCHAL_INT11_LEVEL              3
-#define XCHAL_INT12_LEVEL              4
-#define XCHAL_INT13_LEVEL              5
-#define XCHAL_INT14_LEVEL              7
-#define XCHAL_INT15_LEVEL              1
-#define XCHAL_INT16_LEVEL              1
-#define XCHAL_INT17_LEVEL              1
-#define XCHAL_INT18_LEVEL              1
-#define XCHAL_INT19_LEVEL              1
-#define XCHAL_INT20_LEVEL              1
-#define XCHAL_INT21_LEVEL              3
-#define XCHAL_DEBUGLEVEL               6       /* debug interrupt level */
-#define XCHAL_HAVE_DEBUG_EXTERN_INT    1       /* OCD external db interrupt */
-#define XCHAL_NMILEVEL                 7       /* NMI "level" (for use with
-                                                  EXCSAVE/EPS/EPC_n, RFI n) */
-
-/*  Type of each interrupt:  */
-#define XCHAL_INT0_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT1_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT2_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT3_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT4_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT5_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT6_TYPE        XTHAL_INTTYPE_TIMER
-#define XCHAL_INT7_TYPE        XTHAL_INTTYPE_SOFTWARE
-#define XCHAL_INT8_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT9_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT10_TYPE       XTHAL_INTTYPE_TIMER
-#define XCHAL_INT11_TYPE       XTHAL_INTTYPE_SOFTWARE
-#define XCHAL_INT12_TYPE       XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT13_TYPE       XTHAL_INTTYPE_TIMER
-#define XCHAL_INT14_TYPE       XTHAL_INTTYPE_NMI
-#define XCHAL_INT15_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT16_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT17_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT18_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT19_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT20_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT21_TYPE       XTHAL_INTTYPE_EXTERN_EDGE
-
-/*  Masks of interrupts for each type of interrupt:  */
-#define XCHAL_INTTYPE_MASK_UNCONFIGURED        0xFFC00000
-#define XCHAL_INTTYPE_MASK_SOFTWARE    0x00000880
-#define XCHAL_INTTYPE_MASK_EXTERN_EDGE 0x003F8000
-#define XCHAL_INTTYPE_MASK_EXTERN_LEVEL        0x0000133F
-#define XCHAL_INTTYPE_MASK_TIMER       0x00002440
-#define XCHAL_INTTYPE_MASK_NMI         0x00004000
-#define XCHAL_INTTYPE_MASK_WRITE_ERROR 0x00000000
-
-/*  Interrupt numbers assigned to specific interrupt sources:  */
-#define XCHAL_TIMER0_INTERRUPT         6       /* CCOMPARE0 */
-#define XCHAL_TIMER1_INTERRUPT         10      /* CCOMPARE1 */
-#define XCHAL_TIMER2_INTERRUPT         13      /* CCOMPARE2 */
-#define XCHAL_TIMER3_INTERRUPT         XTHAL_TIMER_UNCONFIGURED
-#define XCHAL_NMI_INTERRUPT            14      /* non-maskable interrupt */
-
-/*  Interrupt numbers for levels at which only one interrupt is configured:  */
-#define XCHAL_INTLEVEL2_NUM            8
-#define XCHAL_INTLEVEL4_NUM            12
-#define XCHAL_INTLEVEL5_NUM            13
-#define XCHAL_INTLEVEL7_NUM            14
-/*  (There are many interrupts each at level(s) 1, 3.)  */
-
-
-/*
- *  External interrupt vectors/levels.
- *  These macros describe how Xtensa processor interrupt numbers
- *  (as numbered internally, eg. in INTERRUPT and INTENABLE registers)
- *  map to external BInterrupt<n> pins, for those interrupts
- *  configured as external (level-triggered, edge-triggered, or NMI).
- *  See the Xtensa processor databook for more details.
- */
-
-/*  Core interrupt numbers mapped to each EXTERNAL interrupt number:  */
-#define XCHAL_EXTINT0_NUM              0       /* (intlevel 1) */
-#define XCHAL_EXTINT1_NUM              1       /* (intlevel 1) */
-#define XCHAL_EXTINT2_NUM              2       /* (intlevel 1) */
-#define XCHAL_EXTINT3_NUM              3       /* (intlevel 1) */
-#define XCHAL_EXTINT4_NUM              4       /* (intlevel 1) */
-#define XCHAL_EXTINT5_NUM              5       /* (intlevel 1) */
-#define XCHAL_EXTINT6_NUM              8       /* (intlevel 2) */
-#define XCHAL_EXTINT7_NUM              9       /* (intlevel 3) */
-#define XCHAL_EXTINT8_NUM              12      /* (intlevel 4) */
-#define XCHAL_EXTINT9_NUM              14      /* (intlevel 7) */
-#define XCHAL_EXTINT10_NUM             15      /* (intlevel 1) */
-#define XCHAL_EXTINT11_NUM             16      /* (intlevel 1) */
-#define XCHAL_EXTINT12_NUM             17      /* (intlevel 1) */
-#define XCHAL_EXTINT13_NUM             18      /* (intlevel 1) */
-#define XCHAL_EXTINT14_NUM             19      /* (intlevel 1) */
-#define XCHAL_EXTINT15_NUM             20      /* (intlevel 1) */
-#define XCHAL_EXTINT16_NUM             21      /* (intlevel 3) */
-
-
-/*----------------------------------------------------------------------
-                       EXCEPTIONS and VECTORS
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_XEA_VERSION              2       /* Xtensa Exception Architecture
-                                                  number: 1 == XEA1 (old)
-                                                          2 == XEA2 (new)
-                                                          0 == XEAX (extern) */
-#define XCHAL_HAVE_XEA1                        0       /* Exception Architecture 1 */
-#define XCHAL_HAVE_XEA2                        1       /* Exception Architecture 2 */
-#define XCHAL_HAVE_XEAX                        0       /* External Exception Arch. */
-#define XCHAL_HAVE_EXCEPTIONS          1       /* exception option */
-#define XCHAL_HAVE_MEM_ECC_PARITY      0       /* local memory ECC/parity */
-#define XCHAL_HAVE_VECTOR_SELECT       1       /* relocatable vectors */
-#define XCHAL_HAVE_VECBASE             1       /* relocatable vectors */
-#define XCHAL_VECBASE_RESET_VADDR      0xD0000000  /* VECBASE reset value */
-#define XCHAL_VECBASE_RESET_PADDR      0x00000000
-#define XCHAL_RESET_VECBASE_OVERLAP    0
-
-#define XCHAL_RESET_VECTOR0_VADDR      0xFE000000
-#define XCHAL_RESET_VECTOR0_PADDR      0xFE000000
-#define XCHAL_RESET_VECTOR1_VADDR      0xD8000500
-#define XCHAL_RESET_VECTOR1_PADDR      0x00000500
-#define XCHAL_RESET_VECTOR_VADDR       0xFE000000
-#define XCHAL_RESET_VECTOR_PADDR       0xFE000000
-#define XCHAL_USER_VECOFS              0x00000340
-#define XCHAL_USER_VECTOR_VADDR                0xD0000340
-#define XCHAL_USER_VECTOR_PADDR                0x00000340
-#define XCHAL_KERNEL_VECOFS            0x00000300
-#define XCHAL_KERNEL_VECTOR_VADDR      0xD0000300
-#define XCHAL_KERNEL_VECTOR_PADDR      0x00000300
-#define XCHAL_DOUBLEEXC_VECOFS         0x000003C0
-#define XCHAL_DOUBLEEXC_VECTOR_VADDR   0xD00003C0
-#define XCHAL_DOUBLEEXC_VECTOR_PADDR   0x000003C0
-#define XCHAL_WINDOW_OF4_VECOFS                0x00000000
-#define XCHAL_WINDOW_UF4_VECOFS                0x00000040
-#define XCHAL_WINDOW_OF8_VECOFS                0x00000080
-#define XCHAL_WINDOW_UF8_VECOFS                0x000000C0
-#define XCHAL_WINDOW_OF12_VECOFS       0x00000100
-#define XCHAL_WINDOW_UF12_VECOFS       0x00000140
-#define XCHAL_WINDOW_VECTORS_VADDR     0xD0000000
-#define XCHAL_WINDOW_VECTORS_PADDR     0x00000000
-#define XCHAL_INTLEVEL2_VECOFS         0x00000180
-#define XCHAL_INTLEVEL2_VECTOR_VADDR   0xD0000180
-#define XCHAL_INTLEVEL2_VECTOR_PADDR   0x00000180
-#define XCHAL_INTLEVEL3_VECOFS         0x000001C0
-#define XCHAL_INTLEVEL3_VECTOR_VADDR   0xD00001C0
-#define XCHAL_INTLEVEL3_VECTOR_PADDR   0x000001C0
-#define XCHAL_INTLEVEL4_VECOFS         0x00000200
-#define XCHAL_INTLEVEL4_VECTOR_VADDR   0xD0000200
-#define XCHAL_INTLEVEL4_VECTOR_PADDR   0x00000200
-#define XCHAL_INTLEVEL5_VECOFS         0x00000240
-#define XCHAL_INTLEVEL5_VECTOR_VADDR   0xD0000240
-#define XCHAL_INTLEVEL5_VECTOR_PADDR   0x00000240
-#define XCHAL_INTLEVEL6_VECOFS         0x00000280
-#define XCHAL_INTLEVEL6_VECTOR_VADDR   0xD0000280
-#define XCHAL_INTLEVEL6_VECTOR_PADDR   0x00000280
-#define XCHAL_DEBUG_VECOFS             XCHAL_INTLEVEL6_VECOFS
-#define XCHAL_DEBUG_VECTOR_VADDR       XCHAL_INTLEVEL6_VECTOR_VADDR
-#define XCHAL_DEBUG_VECTOR_PADDR       XCHAL_INTLEVEL6_VECTOR_PADDR
-#define XCHAL_NMI_VECOFS               0x000002C0
-#define XCHAL_NMI_VECTOR_VADDR         0xD00002C0
-#define XCHAL_NMI_VECTOR_PADDR         0x000002C0
-#define XCHAL_INTLEVEL7_VECOFS         XCHAL_NMI_VECOFS
-#define XCHAL_INTLEVEL7_VECTOR_VADDR   XCHAL_NMI_VECTOR_VADDR
-#define XCHAL_INTLEVEL7_VECTOR_PADDR   XCHAL_NMI_VECTOR_PADDR
-
-
-/*----------------------------------------------------------------------
-                               DEBUG
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_HAVE_OCD                 1       /* OnChipDebug option */
-#define XCHAL_NUM_IBREAK               2       /* number of IBREAKn regs */
-#define XCHAL_NUM_DBREAK               2       /* number of DBREAKn regs */
-#define XCHAL_HAVE_OCD_DIR_ARRAY       1       /* faster OCD option */
-
-
-/*----------------------------------------------------------------------
-                               MMU
-  ----------------------------------------------------------------------*/
-
-/*  See core-matmap.h header file for more details.  */
-
-#define XCHAL_HAVE_TLBS                        1       /* inverse of HAVE_CACHEATTR */
-#define XCHAL_HAVE_SPANNING_WAY                0       /* one way maps I+D 4GB vaddr */
-#define XCHAL_HAVE_IDENTITY_MAP                0       /* vaddr == paddr always */
-#define XCHAL_HAVE_CACHEATTR           0       /* CACHEATTR register present */
-#define XCHAL_HAVE_MIMIC_CACHEATTR     0       /* region protection */
-#define XCHAL_HAVE_XLT_CACHEATTR       0       /* region prot. w/translation */
-#define XCHAL_HAVE_PTP_MMU             1       /* full MMU (with page table
-                                                  [autorefill] and protection)
-                                                  usable for an MMU-based OS */
-/*  If none of the above last 4 are set, it's a custom TLB configuration.  */
-#define XCHAL_ITLB_ARF_ENTRIES_LOG2    2       /* log2(autorefill way size) */
-#define XCHAL_DTLB_ARF_ENTRIES_LOG2    2       /* log2(autorefill way size) */
-
-#define XCHAL_MMU_ASID_BITS            8       /* number of bits in ASIDs */
-#define XCHAL_MMU_RINGS                        4       /* number of rings (1..4) */
-#define XCHAL_MMU_RING_BITS            2       /* num of bits in RING field */
-
-#endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
-
-
-#endif /* _XTENSA_CORE_CONFIGURATION_H */
-
diff --git a/include/asm-xtensa/variant-dc232b/tie-asm.h b/include/asm-xtensa/variant-dc232b/tie-asm.h
deleted file mode 100644 (file)
index ed4f53f..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * This header file contains assembly-language definitions (assembly
- * macros, etc.) for this specific Xtensa processor's TIE extensions
- * and options.  It is customized to this Xtensa processor configuration.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999-2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CORE_TIE_ASM_H
-#define _XTENSA_CORE_TIE_ASM_H
-
-/*  Selection parameter values for save-area save/restore macros:  */
-/*  Option vs. TIE:  */
-#define XTHAL_SAS_TIE  0x0001  /* custom extension or coprocessor */
-#define XTHAL_SAS_OPT  0x0002  /* optional (and not a coprocessor) */
-/*  Whether used automatically by compiler:  */
-#define XTHAL_SAS_NOCC 0x0004  /* not used by compiler w/o special opts/code */
-#define XTHAL_SAS_CC   0x0008  /* used by compiler without special opts/code */
-/*  ABI handling across function calls:  */
-#define XTHAL_SAS_CALR 0x0010  /* caller-saved */
-#define XTHAL_SAS_CALE 0x0020  /* callee-saved */
-#define XTHAL_SAS_GLOB 0x0040  /* global across function calls (in thread) */
-/*  Misc  */
-#define XTHAL_SAS_ALL  0xFFFF  /* include all default NCP contents */
-
-
-
-/* Macro to save all non-coprocessor (extra) custom TIE and optional state
- * (not including zero-overhead loop registers).
- * Save area ptr (clobbered):  ptr  (1 byte aligned)
- * Scratch regs  (clobbered):  at1..at4  (only first XCHAL_NCP_NUM_ATMPS needed)
- */
-       .macro xchal_ncp_store  ptr at1 at2 at3 at4  continue=0 ofs=-1 select=XTHAL_SAS_ALL
-       xchal_sa_start  \continue, \ofs
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-8, 4, 4
-       rsr     \at1, ACCLO             // MAC16 accumulator
-       rsr     \at2, ACCHI
-       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       s32i    \at2, \ptr, .Lxchal_ofs_ + 4
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 8
-       .endif
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-16, 4, 4
-       rsr     \at1, M0                // MAC16 registers
-       rsr     \at2, M1
-       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       s32i    \at2, \ptr, .Lxchal_ofs_ + 4
-       rsr     \at1, M2
-       rsr     \at2, M3
-       s32i    \at1, \ptr, .Lxchal_ofs_ + 8
-       s32i    \at2, \ptr, .Lxchal_ofs_ + 12
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 16
-       .endif
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
-       rsr     \at1, SCOMPARE1         // conditional store option
-       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
-       .endif
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
-       rur     \at1, THREADPTR         // threadptr option
-       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
-       .endif
-       .endm   // xchal_ncp_store
-
-/* Macro to save all non-coprocessor (extra) custom TIE and optional state
- * (not including zero-overhead loop registers).
- * Save area ptr (clobbered):  ptr  (1 byte aligned)
- * Scratch regs  (clobbered):  at1..at4  (only first XCHAL_NCP_NUM_ATMPS needed)
- */
-       .macro xchal_ncp_load  ptr at1 at2 at3 at4  continue=0 ofs=-1 select=XTHAL_SAS_ALL
-       xchal_sa_start  \continue, \ofs
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-8, 4, 4
-       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       l32i    \at2, \ptr, .Lxchal_ofs_ + 4
-       wsr     \at1, ACCLO             // MAC16 accumulator
-       wsr     \at2, ACCHI
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 8
-       .endif
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-16, 4, 4
-       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       l32i    \at2, \ptr, .Lxchal_ofs_ + 4
-       wsr     \at1, M0                // MAC16 registers
-       wsr     \at2, M1
-       l32i    \at1, \ptr, .Lxchal_ofs_ + 8
-       l32i    \at2, \ptr, .Lxchal_ofs_ + 12
-       wsr     \at1, M2
-       wsr     \at2, M3
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 16
-       .endif
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
-       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       wsr     \at1, SCOMPARE1         // conditional store option
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
-       .endif
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
-       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       wur     \at1, THREADPTR         // threadptr option
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
-       .endif
-       .endm   // xchal_ncp_load
-
-
-
-#define XCHAL_NCP_NUM_ATMPS    2
-
-
-#define XCHAL_SA_NUM_ATMPS     2
-
-#endif /*_XTENSA_CORE_TIE_ASM_H*/
-
diff --git a/include/asm-xtensa/variant-dc232b/tie.h b/include/asm-xtensa/variant-dc232b/tie.h
deleted file mode 100644 (file)
index 018e81a..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * This header file describes this specific Xtensa processor's TIE extensions
- * that extend basic Xtensa core functionality.  It is customized to this
- * Xtensa processor configuration.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999-2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CORE_TIE_H
-#define _XTENSA_CORE_TIE_H
-
-#define XCHAL_CP_NUM                   1       /* number of coprocessors */
-#define XCHAL_CP_MAX                   8       /* max CP ID + 1 (0 if none) */
-#define XCHAL_CP_MASK                  0x80    /* bitmask of all CPs by ID */
-#define XCHAL_CP_PORT_MASK             0x80    /* bitmask of only port CPs */
-
-/*  Basic parameters of each coprocessor:  */
-#define XCHAL_CP7_NAME                 "XTIOP"
-#define XCHAL_CP7_IDENT                        XTIOP
-#define XCHAL_CP7_SA_SIZE              0       /* size of state save area */
-#define XCHAL_CP7_SA_ALIGN             1       /* min alignment of save area */
-#define XCHAL_CP_ID_XTIOP              7       /* coprocessor ID (0..7) */
-
-/*  Filler info for unassigned coprocessors, to simplify arrays etc:  */
-#define XCHAL_CP0_SA_SIZE              0
-#define XCHAL_CP0_SA_ALIGN             1
-#define XCHAL_CP1_SA_SIZE              0
-#define XCHAL_CP1_SA_ALIGN             1
-#define XCHAL_CP2_SA_SIZE              0
-#define XCHAL_CP2_SA_ALIGN             1
-#define XCHAL_CP3_SA_SIZE              0
-#define XCHAL_CP3_SA_ALIGN             1
-#define XCHAL_CP4_SA_SIZE              0
-#define XCHAL_CP4_SA_ALIGN             1
-#define XCHAL_CP5_SA_SIZE              0
-#define XCHAL_CP5_SA_ALIGN             1
-#define XCHAL_CP6_SA_SIZE              0
-#define XCHAL_CP6_SA_ALIGN             1
-
-/*  Save area for non-coprocessor optional and custom (TIE) state:  */
-#define XCHAL_NCP_SA_SIZE              32
-#define XCHAL_NCP_SA_ALIGN             4
-
-/*  Total save area for optional and custom state (NCP + CPn):  */
-#define XCHAL_TOTAL_SA_SIZE            32      /* with 16-byte align padding */
-#define XCHAL_TOTAL_SA_ALIGN           4       /* actual minimum alignment */
-
-/*
- * Detailed contents of save areas.
- * NOTE:  caller must define the XCHAL_SA_REG macro (not defined here)
- * before expanding the XCHAL_xxx_SA_LIST() macros.
- *
- * XCHAL_SA_REG(s,ccused,abikind,kind,opt,name,galign,align,asize,
- *             dbnum,base,regnum,bitsz,gapsz,reset,x...)
- *
- *     s = passed from XCHAL_*_LIST(s), eg. to select how to expand
- *     ccused = set if used by compiler without special options or code
- *     abikind = 0 (caller-saved), 1 (callee-saved), or 2 (thread-global)
- *     kind = 0 (special reg), 1 (TIE user reg), or 2 (TIE regfile reg)
- *     opt = 0 (custom TIE extension or coprocessor), or 1 (optional reg)
- *     name = lowercase reg name (no quotes)
- *     galign = group byte alignment (power of 2) (galign >= align)
- *     align = register byte alignment (power of 2)
- *     asize = allocated size in bytes (asize*8 == bitsz + gapsz + padsz)
- *       (not including any pad bytes required to galign this or next reg)
- *     dbnum = unique target number f/debug (see <xtensa-libdb-macros.h>)
- *     base = reg shortname w/o index (or sr=special, ur=TIE user reg)
- *     regnum = reg index in regfile, or special/TIE-user reg number
- *     bitsz = number of significant bits (regfile width, or ur/sr mask bits)
- *     gapsz = intervening bits, if bitsz bits not stored contiguously
- *     (padsz = pad bits at end [TIE regfile] or at msbits [ur,sr] of asize)
- *     reset = register reset value (or 0 if undefined at reset)
- *     x = reserved for future use (0 until then)
- *
- *  To filter out certain registers, e.g. to expand only the non-global
- *  registers used by the compiler, you can do something like this:
- *
- *  #define XCHAL_SA_REG(s,ccused,p...)        SELCC##ccused(p)
- *  #define SELCC0(p...)
- *  #define SELCC1(abikind,p...)       SELAK##abikind(p)
- *  #define SELAK0(p...)               REG(p)
- *  #define SELAK1(p...)               REG(p)
- *  #define SELAK2(p...)
- *  #define REG(kind,tie,name,galn,aln,asz,csz,dbnum,base,rnum,bsz,rst,x...) \
- *             ...what you want to expand...
- */
-
-#define XCHAL_NCP_SA_NUM       8
-#define XCHAL_NCP_SA_LIST(s)   \
- XCHAL_SA_REG(s,1,0,0,1,          acclo, 4, 4, 4,0x0210,  sr,16 , 32,0,0,0) \
- XCHAL_SA_REG(s,1,0,0,1,          acchi, 4, 4, 4,0x0211,  sr,17 ,  8,0,0,0) \
- XCHAL_SA_REG(s,0,0,0,1,             m0, 4, 4, 4,0x0220,  sr,32 , 32,0,0,0) \
- XCHAL_SA_REG(s,0,0,0,1,             m1, 4, 4, 4,0x0221,  sr,33 , 32,0,0,0) \
- XCHAL_SA_REG(s,0,0,0,1,             m2, 4, 4, 4,0x0222,  sr,34 , 32,0,0,0) \
- XCHAL_SA_REG(s,0,0,0,1,             m3, 4, 4, 4,0x0223,  sr,35 , 32,0,0,0) \
- XCHAL_SA_REG(s,0,0,0,1,      scompare1, 4, 4, 4,0x020C,  sr,12 , 32,0,0,0) \
- XCHAL_SA_REG(s,1,2,1,1,      threadptr, 4, 4, 4,0x03E7,  ur,231, 32,0,0,0)
-
-#define XCHAL_CP0_SA_NUM       0
-#define XCHAL_CP0_SA_LIST(s)   /* empty */
-
-#define XCHAL_CP1_SA_NUM       0
-#define XCHAL_CP1_SA_LIST(s)   /* empty */
-
-#define XCHAL_CP2_SA_NUM       0
-#define XCHAL_CP2_SA_LIST(s)   /* empty */
-
-#define XCHAL_CP3_SA_NUM       0
-#define XCHAL_CP3_SA_LIST(s)   /* empty */
-
-#define XCHAL_CP4_SA_NUM       0
-#define XCHAL_CP4_SA_LIST(s)   /* empty */
-
-#define XCHAL_CP5_SA_NUM       0
-#define XCHAL_CP5_SA_LIST(s)   /* empty */
-
-#define XCHAL_CP6_SA_NUM       0
-#define XCHAL_CP6_SA_LIST(s)   /* empty */
-
-#define XCHAL_CP7_SA_NUM       0
-#define XCHAL_CP7_SA_LIST(s)   /* empty */
-
-/* Byte length of instruction from its first nibble (op0 field), per FLIX.  */
-#define XCHAL_OP0_FORMAT_LENGTHS       3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3
-
-#endif /*_XTENSA_CORE_TIE_H*/
-
diff --git a/include/asm-xtensa/variant-fsf/core.h b/include/asm-xtensa/variant-fsf/core.h
deleted file mode 100644 (file)
index 2f33760..0000000
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * Xtensa processor core configuration information.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999-2006 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CORE_H
-#define _XTENSA_CORE_H
-
-
-/****************************************************************************
-           Parameters Useful for Any Code, USER or PRIVILEGED
- ****************************************************************************/
-
-/*
- *  Note:  Macros of the form XCHAL_HAVE_*** have a value of 1 if the option is
- *  configured, and a value of 0 otherwise.  These macros are always defined.
- */
-
-
-/*----------------------------------------------------------------------
-                               ISA
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_HAVE_BE                  1       /* big-endian byte ordering */
-#define XCHAL_HAVE_WINDOWED            1       /* windowed registers option */
-#define XCHAL_NUM_AREGS                        64      /* num of physical addr regs */
-#define XCHAL_NUM_AREGS_LOG2           6       /* log2(XCHAL_NUM_AREGS) */
-#define XCHAL_MAX_INSTRUCTION_SIZE     3       /* max instr bytes (3..8) */
-#define XCHAL_HAVE_DEBUG               1       /* debug option */
-#define XCHAL_HAVE_DENSITY             1       /* 16-bit instructions */
-#define XCHAL_HAVE_LOOPS               1       /* zero-overhead loops */
-#define XCHAL_HAVE_NSA                 1       /* NSA/NSAU instructions */
-#define XCHAL_HAVE_MINMAX              0       /* MIN/MAX instructions */
-#define XCHAL_HAVE_SEXT                        0       /* SEXT instruction */
-#define XCHAL_HAVE_CLAMPS              0       /* CLAMPS instruction */
-#define XCHAL_HAVE_MUL16               0       /* MUL16S/MUL16U instructions */
-#define XCHAL_HAVE_MUL32               0       /* MULL instruction */
-#define XCHAL_HAVE_MUL32_HIGH          0       /* MULUH/MULSH instructions */
-#define XCHAL_HAVE_L32R                        1       /* L32R instruction */
-#define XCHAL_HAVE_ABSOLUTE_LITERALS   1       /* non-PC-rel (extended) L32R */
-#define XCHAL_HAVE_CONST16             0       /* CONST16 instruction */
-#define XCHAL_HAVE_ADDX                        1       /* ADDX#/SUBX# instructions */
-#define XCHAL_HAVE_WIDE_BRANCHES       0       /* B*.W18 or B*.W15 instr's */
-#define XCHAL_HAVE_PREDICTED_BRANCHES  0       /* B[EQ/EQZ/NE/NEZ]T instr's */
-#define XCHAL_HAVE_CALL4AND12          1       /* (obsolete option) */
-#define XCHAL_HAVE_ABS                 1       /* ABS instruction */
-/*#define XCHAL_HAVE_POPC              0*/     /* POPC instruction */
-/*#define XCHAL_HAVE_CRC               0*/     /* CRC instruction */
-#define XCHAL_HAVE_RELEASE_SYNC                0       /* L32AI/S32RI instructions */
-#define XCHAL_HAVE_S32C1I              0       /* S32C1I instruction */
-#define XCHAL_HAVE_SPECULATION         0       /* speculation */
-#define XCHAL_HAVE_FULL_RESET          1       /* all regs/state reset */
-#define XCHAL_NUM_CONTEXTS             1       /* */
-#define XCHAL_NUM_MISC_REGS            2       /* num of scratch regs (0..4) */
-#define XCHAL_HAVE_TAP_MASTER          0       /* JTAG TAP control instr's */
-#define XCHAL_HAVE_PRID                        1       /* processor ID register */
-#define XCHAL_HAVE_THREADPTR           1       /* THREADPTR register */
-#define XCHAL_HAVE_BOOLEANS            0       /* boolean registers */
-#define XCHAL_HAVE_CP                  0       /* CPENABLE reg (coprocessor) */
-#define XCHAL_CP_MAXCFG                        0       /* max allowed cp id plus one */
-#define XCHAL_HAVE_MAC16               0       /* MAC16 package */
-#define XCHAL_HAVE_VECTORFPU2005       0       /* vector floating-point pkg */
-#define XCHAL_HAVE_FP                  0       /* floating point pkg */
-#define XCHAL_HAVE_VECTRA1             0       /* Vectra I  pkg */
-#define XCHAL_HAVE_VECTRALX            0       /* Vectra LX pkg */
-#define XCHAL_HAVE_HIFI2               0       /* HiFi2 Audio Engine pkg */
-
-
-/*----------------------------------------------------------------------
-                               MISC
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_NUM_WRITEBUFFER_ENTRIES  4       /* size of write buffer */
-#define XCHAL_INST_FETCH_WIDTH         4       /* instr-fetch width in bytes */
-#define XCHAL_DATA_WIDTH               4       /* data width in bytes */
-/*  In T1050, applies to selected core load and store instructions (see ISA): */
-#define XCHAL_UNALIGNED_LOAD_EXCEPTION 1       /* unaligned loads cause exc. */
-#define XCHAL_UNALIGNED_STORE_EXCEPTION        1       /* unaligned stores cause exc.*/
-
-#define XCHAL_CORE_ID                  "fsf"   /* alphanum core name
-                                                  (CoreID) set in the Xtensa
-                                                  Processor Generator */
-
-#define XCHAL_BUILD_UNIQUE_ID          0x00006700      /* 22-bit sw build ID */
-
-/*
- *  These definitions describe the hardware targeted by this software.
- */
-#define XCHAL_HW_CONFIGID0             0xC103C3FF      /* ConfigID hi 32 bits*/
-#define XCHAL_HW_CONFIGID1             0x0C006700      /* ConfigID lo 32 bits*/
-#define XCHAL_HW_VERSION_NAME          "LX2.0.0"       /* full version name */
-#define XCHAL_HW_VERSION_MAJOR         2200    /* major ver# of targeted hw */
-#define XCHAL_HW_VERSION_MINOR         0       /* minor ver# of targeted hw */
-#define XTHAL_HW_REL_LX2               1
-#define XTHAL_HW_REL_LX2_0             1
-#define XTHAL_HW_REL_LX2_0_0           1
-#define XCHAL_HW_CONFIGID_RELIABLE     1
-/*  If software targets a *range* of hardware versions, these are the bounds: */
-#define XCHAL_HW_MIN_VERSION_MAJOR     2200    /* major v of earliest tgt hw */
-#define XCHAL_HW_MIN_VERSION_MINOR     0       /* minor v of earliest tgt hw */
-#define XCHAL_HW_MAX_VERSION_MAJOR     2200    /* major v of latest tgt hw */
-#define XCHAL_HW_MAX_VERSION_MINOR     0       /* minor v of latest tgt hw */
-
-
-/*----------------------------------------------------------------------
-                               CACHE
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_ICACHE_LINESIZE          16      /* I-cache line size in bytes */
-#define XCHAL_DCACHE_LINESIZE          16      /* D-cache line size in bytes */
-#define XCHAL_ICACHE_LINEWIDTH         4       /* log2(I line size in bytes) */
-#define XCHAL_DCACHE_LINEWIDTH         4       /* log2(D line size in bytes) */
-
-#define XCHAL_ICACHE_SIZE              8192    /* I-cache size in bytes or 0 */
-#define XCHAL_DCACHE_SIZE              8192    /* D-cache size in bytes or 0 */
-
-#define XCHAL_DCACHE_IS_WRITEBACK      0       /* writeback feature */
-
-
-
-
-/****************************************************************************
-    Parameters Useful for PRIVILEGED (Supervisory or Non-Virtualized) Code
- ****************************************************************************/
-
-
-#ifndef XTENSA_HAL_NON_PRIVILEGED_ONLY
-
-/*----------------------------------------------------------------------
-                               CACHE
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_HAVE_PIF                 1       /* any outbound PIF present */
-
-/*  If present, cache size in bytes == (ways * 2^(linewidth + setwidth)).  */
-
-/*  Number of cache sets in log2(lines per way):  */
-#define XCHAL_ICACHE_SETWIDTH          8
-#define XCHAL_DCACHE_SETWIDTH          8
-
-/*  Cache set associativity (number of ways):  */
-#define XCHAL_ICACHE_WAYS              2
-#define XCHAL_DCACHE_WAYS              2
-
-/*  Cache features:  */
-#define XCHAL_ICACHE_LINE_LOCKABLE     0
-#define XCHAL_DCACHE_LINE_LOCKABLE     0
-#define XCHAL_ICACHE_ECC_PARITY                0
-#define XCHAL_DCACHE_ECC_PARITY                0
-
-/*  Number of encoded cache attr bits (see <xtensa/hal.h> for decoded bits):  */
-#define XCHAL_CA_BITS                  4
-
-
-/*----------------------------------------------------------------------
-                       INTERNAL I/D RAM/ROMs and XLMI
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_NUM_INSTROM              0       /* number of core instr. ROMs */
-#define XCHAL_NUM_INSTRAM              0       /* number of core instr. RAMs */
-#define XCHAL_NUM_DATAROM              0       /* number of core data ROMs */
-#define XCHAL_NUM_DATARAM              0       /* number of core data RAMs */
-#define XCHAL_NUM_URAM                 0       /* number of core unified RAMs*/
-#define XCHAL_NUM_XLMI                 0       /* number of core XLMI ports */
-
-
-/*----------------------------------------------------------------------
-                       INTERRUPTS and TIMERS
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_HAVE_INTERRUPTS          1       /* interrupt option */
-#define XCHAL_HAVE_HIGHPRI_INTERRUPTS  1       /* med/high-pri. interrupts */
-#define XCHAL_HAVE_NMI                 0       /* non-maskable interrupt */
-#define XCHAL_HAVE_CCOUNT              1       /* CCOUNT reg. (timer option) */
-#define XCHAL_NUM_TIMERS               3       /* number of CCOMPAREn regs */
-#define XCHAL_NUM_INTERRUPTS           17      /* number of interrupts */
-#define XCHAL_NUM_INTERRUPTS_LOG2      5       /* ceil(log2(NUM_INTERRUPTS)) */
-#define XCHAL_NUM_EXTINTERRUPTS                10      /* num of external interrupts */
-#define XCHAL_NUM_INTLEVELS            4       /* number of interrupt levels
-                                                  (not including level zero) */
-#define XCHAL_EXCM_LEVEL               1       /* level masked by PS.EXCM */
-       /* (always 1 in XEA1; levels 2 .. EXCM_LEVEL are "medium priority") */
-
-/*  Masks of interrupts at each interrupt level:  */
-#define XCHAL_INTLEVEL1_MASK           0x000064F9
-#define XCHAL_INTLEVEL2_MASK           0x00008902
-#define XCHAL_INTLEVEL3_MASK           0x00011204
-#define XCHAL_INTLEVEL4_MASK           0x00000000
-#define XCHAL_INTLEVEL5_MASK           0x00000000
-#define XCHAL_INTLEVEL6_MASK           0x00000000
-#define XCHAL_INTLEVEL7_MASK           0x00000000
-
-/*  Masks of interrupts at each range 1..n of interrupt levels:  */
-#define XCHAL_INTLEVEL1_ANDBELOW_MASK  0x000064F9
-#define XCHAL_INTLEVEL2_ANDBELOW_MASK  0x0000EDFB
-#define XCHAL_INTLEVEL3_ANDBELOW_MASK  0x0001FFFF
-#define XCHAL_INTLEVEL4_ANDBELOW_MASK  0x0001FFFF
-#define XCHAL_INTLEVEL5_ANDBELOW_MASK  0x0001FFFF
-#define XCHAL_INTLEVEL6_ANDBELOW_MASK  0x0001FFFF
-#define XCHAL_INTLEVEL7_ANDBELOW_MASK  0x0001FFFF
-
-/*  Level of each interrupt:  */
-#define XCHAL_INT0_LEVEL               1
-#define XCHAL_INT1_LEVEL               2
-#define XCHAL_INT2_LEVEL               3
-#define XCHAL_INT3_LEVEL               1
-#define XCHAL_INT4_LEVEL               1
-#define XCHAL_INT5_LEVEL               1
-#define XCHAL_INT6_LEVEL               1
-#define XCHAL_INT7_LEVEL               1
-#define XCHAL_INT8_LEVEL               2
-#define XCHAL_INT9_LEVEL               3
-#define XCHAL_INT10_LEVEL              1
-#define XCHAL_INT11_LEVEL              2
-#define XCHAL_INT12_LEVEL              3
-#define XCHAL_INT13_LEVEL              1
-#define XCHAL_INT14_LEVEL              1
-#define XCHAL_INT15_LEVEL              2
-#define XCHAL_INT16_LEVEL              3
-#define XCHAL_DEBUGLEVEL               4       /* debug interrupt level */
-#define XCHAL_HAVE_DEBUG_EXTERN_INT    0       /* OCD external db interrupt */
-
-/*  Type of each interrupt:  */
-#define XCHAL_INT0_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT1_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT2_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT3_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT4_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT5_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT6_TYPE        XTHAL_INTTYPE_EXTERN_LEVEL
-#define XCHAL_INT7_TYPE        XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT8_TYPE        XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT9_TYPE        XTHAL_INTTYPE_EXTERN_EDGE
-#define XCHAL_INT10_TYPE       XTHAL_INTTYPE_TIMER
-#define XCHAL_INT11_TYPE       XTHAL_INTTYPE_TIMER
-#define XCHAL_INT12_TYPE       XTHAL_INTTYPE_TIMER
-#define XCHAL_INT13_TYPE       XTHAL_INTTYPE_SOFTWARE
-#define XCHAL_INT14_TYPE       XTHAL_INTTYPE_SOFTWARE
-#define XCHAL_INT15_TYPE       XTHAL_INTTYPE_SOFTWARE
-#define XCHAL_INT16_TYPE       XTHAL_INTTYPE_SOFTWARE
-
-/*  Masks of interrupts for each type of interrupt:  */
-#define XCHAL_INTTYPE_MASK_UNCONFIGURED        0xFFFE0000
-#define XCHAL_INTTYPE_MASK_SOFTWARE    0x0001E000
-#define XCHAL_INTTYPE_MASK_EXTERN_EDGE 0x00000380
-#define XCHAL_INTTYPE_MASK_EXTERN_LEVEL        0x0000007F
-#define XCHAL_INTTYPE_MASK_TIMER       0x00001C00
-#define XCHAL_INTTYPE_MASK_NMI         0x00000000
-#define XCHAL_INTTYPE_MASK_WRITE_ERROR 0x00000000
-
-/*  Interrupt numbers assigned to specific interrupt sources:  */
-#define XCHAL_TIMER0_INTERRUPT         10      /* CCOMPARE0 */
-#define XCHAL_TIMER1_INTERRUPT         11      /* CCOMPARE1 */
-#define XCHAL_TIMER2_INTERRUPT         12      /* CCOMPARE2 */
-#define XCHAL_TIMER3_INTERRUPT         XTHAL_TIMER_UNCONFIGURED
-
-/*  Interrupt numbers for levels at which only one interrupt is configured:  */
-/*  (There are many interrupts each at level(s) 1, 2, 3.)  */
-
-
-/*
- *  External interrupt vectors/levels.
- *  These macros describe how Xtensa processor interrupt numbers
- *  (as numbered internally, eg. in INTERRUPT and INTENABLE registers)
- *  map to external BInterrupt<n> pins, for those interrupts
- *  configured as external (level-triggered, edge-triggered, or NMI).
- *  See the Xtensa processor databook for more details.
- */
-
-/*  Core interrupt numbers mapped to each EXTERNAL interrupt number:  */
-#define XCHAL_EXTINT0_NUM              0       /* (intlevel 1) */
-#define XCHAL_EXTINT1_NUM              1       /* (intlevel 2) */
-#define XCHAL_EXTINT2_NUM              2       /* (intlevel 3) */
-#define XCHAL_EXTINT3_NUM              3       /* (intlevel 1) */
-#define XCHAL_EXTINT4_NUM              4       /* (intlevel 1) */
-#define XCHAL_EXTINT5_NUM              5       /* (intlevel 1) */
-#define XCHAL_EXTINT6_NUM              6       /* (intlevel 1) */
-#define XCHAL_EXTINT7_NUM              7       /* (intlevel 1) */
-#define XCHAL_EXTINT8_NUM              8       /* (intlevel 2) */
-#define XCHAL_EXTINT9_NUM              9       /* (intlevel 3) */
-
-
-/*----------------------------------------------------------------------
-                       EXCEPTIONS and VECTORS
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_XEA_VERSION              2       /* Xtensa Exception Architecture
-                                                  number: 1 == XEA1 (old)
-                                                          2 == XEA2 (new)
-                                                          0 == XEAX (extern) */
-#define XCHAL_HAVE_XEA1                        0       /* Exception Architecture 1 */
-#define XCHAL_HAVE_XEA2                        1       /* Exception Architecture 2 */
-#define XCHAL_HAVE_XEAX                        0       /* External Exception Arch. */
-#define XCHAL_HAVE_EXCEPTIONS          1       /* exception option */
-#define XCHAL_HAVE_MEM_ECC_PARITY      0       /* local memory ECC/parity */
-
-#define XCHAL_RESET_VECTOR_VADDR       0xFE000020
-#define XCHAL_RESET_VECTOR_PADDR       0xFE000020
-#define XCHAL_USER_VECTOR_VADDR                0xD0000220
-#define XCHAL_USER_VECTOR_PADDR                0x00000220
-#define XCHAL_KERNEL_VECTOR_VADDR      0xD0000200
-#define XCHAL_KERNEL_VECTOR_PADDR      0x00000200
-#define XCHAL_DOUBLEEXC_VECTOR_VADDR   0xD0000290
-#define XCHAL_DOUBLEEXC_VECTOR_PADDR   0x00000290
-#define XCHAL_WINDOW_VECTORS_VADDR     0xD0000000
-#define XCHAL_WINDOW_VECTORS_PADDR     0x00000000
-#define XCHAL_INTLEVEL2_VECTOR_VADDR   0xD0000240
-#define XCHAL_INTLEVEL2_VECTOR_PADDR   0x00000240
-#define XCHAL_INTLEVEL3_VECTOR_VADDR   0xD0000250
-#define XCHAL_INTLEVEL3_VECTOR_PADDR   0x00000250
-#define XCHAL_INTLEVEL4_VECTOR_VADDR   0xFE000520
-#define XCHAL_INTLEVEL4_VECTOR_PADDR   0xFE000520
-#define XCHAL_DEBUG_VECTOR_VADDR       XCHAL_INTLEVEL4_VECTOR_VADDR
-#define XCHAL_DEBUG_VECTOR_PADDR       XCHAL_INTLEVEL4_VECTOR_PADDR
-
-
-/*----------------------------------------------------------------------
-                               DEBUG
-  ----------------------------------------------------------------------*/
-
-#define XCHAL_HAVE_OCD                 1       /* OnChipDebug option */
-#define XCHAL_NUM_IBREAK               2       /* number of IBREAKn regs */
-#define XCHAL_NUM_DBREAK               2       /* number of DBREAKn regs */
-#define XCHAL_HAVE_OCD_DIR_ARRAY       1       /* faster OCD option */
-
-
-/*----------------------------------------------------------------------
-                               MMU
-  ----------------------------------------------------------------------*/
-
-/*  See <xtensa/config/core-matmap.h> header file for more details.  */
-
-#define XCHAL_HAVE_TLBS                        1       /* inverse of HAVE_CACHEATTR */
-#define XCHAL_HAVE_SPANNING_WAY                0       /* one way maps I+D 4GB vaddr */
-#define XCHAL_HAVE_IDENTITY_MAP                0       /* vaddr == paddr always */
-#define XCHAL_HAVE_CACHEATTR           0       /* CACHEATTR register present */
-#define XCHAL_HAVE_MIMIC_CACHEATTR     0       /* region protection */
-#define XCHAL_HAVE_XLT_CACHEATTR       0       /* region prot. w/translation */
-#define XCHAL_HAVE_PTP_MMU             1       /* full MMU (with page table
-                                                  [autorefill] and protection)
-                                                  usable for an MMU-based OS */
-/*  If none of the above last 4 are set, it's a custom TLB configuration.  */
-#define XCHAL_ITLB_ARF_ENTRIES_LOG2    2       /* log2(autorefill way size) */
-#define XCHAL_DTLB_ARF_ENTRIES_LOG2    2       /* log2(autorefill way size) */
-
-#define XCHAL_MMU_ASID_BITS            8       /* number of bits in ASIDs */
-#define XCHAL_MMU_RINGS                        4       /* number of rings (1..4) */
-#define XCHAL_MMU_RING_BITS            2       /* num of bits in RING field */
-
-#endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
-
-
-#endif /* _XTENSA_CORE_CONFIGURATION_H */
-
diff --git a/include/asm-xtensa/variant-fsf/tie-asm.h b/include/asm-xtensa/variant-fsf/tie-asm.h
deleted file mode 100644 (file)
index 68a73bf..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * This header file contains assembly-language definitions (assembly
- * macros, etc.) for this specific Xtensa processor's TIE extensions
- * and options.  It is customized to this Xtensa processor configuration.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999-2008 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CORE_TIE_ASM_H
-#define _XTENSA_CORE_TIE_ASM_H
-
-/*  Selection parameter values for save-area save/restore macros:  */
-/*  Option vs. TIE:  */
-#define XTHAL_SAS_TIE  0x0001  /* custom extension or coprocessor */
-#define XTHAL_SAS_OPT  0x0002  /* optional (and not a coprocessor) */
-/*  Whether used automatically by compiler:  */
-#define XTHAL_SAS_NOCC 0x0004  /* not used by compiler w/o special opts/code */
-#define XTHAL_SAS_CC   0x0008  /* used by compiler without special opts/code */
-/*  ABI handling across function calls:  */
-#define XTHAL_SAS_CALR 0x0010  /* caller-saved */
-#define XTHAL_SAS_CALE 0x0020  /* callee-saved */
-#define XTHAL_SAS_GLOB 0x0040  /* global across function calls (in thread) */
-/*  Misc  */
-#define XTHAL_SAS_ALL  0xFFFF  /* include all default NCP contents */
-
-
-
-/* Macro to save all non-coprocessor (extra) custom TIE and optional state
- * (not including zero-overhead loop registers).
- * Save area ptr (clobbered):  ptr  (1 byte aligned)
- * Scratch regs  (clobbered):  at1..at4  (only first XCHAL_NCP_NUM_ATMPS needed)
- */
-       .macro xchal_ncp_store  ptr at1 at2 at3 at4  continue=0 ofs=-1 select=XTHAL_SAS_ALL
-       xchal_sa_start  \continue, \ofs
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
-       rur     \at1, THREADPTR         // threadptr option
-       s32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
-       .endif
-       .endm   // xchal_ncp_store
-
-/* Macro to save all non-coprocessor (extra) custom TIE and optional state
- * (not including zero-overhead loop registers).
- * Save area ptr (clobbered):  ptr  (1 byte aligned)
- * Scratch regs  (clobbered):  at1..at4  (only first XCHAL_NCP_NUM_ATMPS needed)
- */
-       .macro xchal_ncp_load  ptr at1 at2 at3 at4  continue=0 ofs=-1 select=XTHAL_SAS_ALL
-       xchal_sa_start  \continue, \ofs
-       .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
-       xchal_sa_align  \ptr, 0, 1024-4, 4, 4
-       l32i    \at1, \ptr, .Lxchal_ofs_ + 0
-       wur     \at1, THREADPTR         // threadptr option
-       .set    .Lxchal_ofs_, .Lxchal_ofs_ + 4
-       .endif
-       .endm   // xchal_ncp_load
-
-
-
-#define XCHAL_NCP_NUM_ATMPS    1
-
-
-#define XCHAL_SA_NUM_ATMPS     1
-
-#endif /*_XTENSA_CORE_TIE_ASM_H*/
-
diff --git a/include/asm-xtensa/variant-fsf/tie.h b/include/asm-xtensa/variant-fsf/tie.h
deleted file mode 100644 (file)
index bf40201..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * This header file describes this specific Xtensa processor's TIE extensions
- * that extend basic Xtensa core functionality.  It is customized to this
- * Xtensa processor configuration.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999-2007 Tensilica Inc.
- */
-
-#ifndef _XTENSA_CORE_TIE_H
-#define _XTENSA_CORE_TIE_H
-
-#define XCHAL_CP_NUM                   0       /* number of coprocessors */
-#define XCHAL_CP_MAX                   0       /* max CP ID + 1 (0 if none) */
-#define XCHAL_CP_MASK                  0x00    /* bitmask of all CPs by ID */
-#define XCHAL_CP_PORT_MASK             0x00    /* bitmask of only port CPs */
-
-/*  Basic parameters of each coprocessor:  */
-#define XCHAL_CP7_NAME                 "XTIOP"
-#define XCHAL_CP7_IDENT                        XTIOP
-#define XCHAL_CP7_SA_SIZE              0       /* size of state save area */
-#define XCHAL_CP7_SA_ALIGN             1       /* min alignment of save area */
-#define XCHAL_CP_ID_XTIOP              7       /* coprocessor ID (0..7) */
-
-/*  Filler info for unassigned coprocessors, to simplify arrays etc:  */
-#define XCHAL_NCP_SA_SIZE              0
-#define XCHAL_NCP_SA_ALIGN             1
-#define XCHAL_CP0_SA_SIZE              0
-#define XCHAL_CP0_SA_ALIGN             1
-#define XCHAL_CP1_SA_SIZE              0
-#define XCHAL_CP1_SA_ALIGN             1
-#define XCHAL_CP2_SA_SIZE              0
-#define XCHAL_CP2_SA_ALIGN             1
-#define XCHAL_CP3_SA_SIZE              0
-#define XCHAL_CP3_SA_ALIGN             1
-#define XCHAL_CP4_SA_SIZE              0
-#define XCHAL_CP4_SA_ALIGN             1
-#define XCHAL_CP5_SA_SIZE              0
-#define XCHAL_CP5_SA_ALIGN             1
-#define XCHAL_CP6_SA_SIZE              0
-#define XCHAL_CP6_SA_ALIGN             1
-
-/*  Save area for non-coprocessor optional and custom (TIE) state:  */
-#define XCHAL_NCP_SA_SIZE              0
-#define XCHAL_NCP_SA_ALIGN             1
-
-/*  Total save area for optional and custom state (NCP + CPn):  */
-#define XCHAL_TOTAL_SA_SIZE            0       /* with 16-byte align padding */
-#define XCHAL_TOTAL_SA_ALIGN           1       /* actual minimum alignment */
-
-#define XCHAL_NCP_SA_NUM       0
-#define XCHAL_NCP_SA_LIST(s)
-#define XCHAL_CP0_SA_NUM       0
-#define XCHAL_CP0_SA_LIST(s)
-#define XCHAL_CP1_SA_NUM       0
-#define XCHAL_CP1_SA_LIST(s)
-#define XCHAL_CP2_SA_NUM       0
-#define XCHAL_CP2_SA_LIST(s)
-#define XCHAL_CP3_SA_NUM       0
-#define XCHAL_CP3_SA_LIST(s)
-#define XCHAL_CP4_SA_NUM       0
-#define XCHAL_CP4_SA_LIST(s)
-#define XCHAL_CP5_SA_NUM       0
-#define XCHAL_CP5_SA_LIST(s)
-#define XCHAL_CP6_SA_NUM       0
-#define XCHAL_CP6_SA_LIST(s)
-#define XCHAL_CP7_SA_NUM       0
-#define XCHAL_CP7_SA_LIST(s)
-
-/* Byte length of instruction from its first nibble (op0 field), per FLIX.  */
-#define XCHAL_OP0_FORMAT_LENGTHS       3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3
-
-#endif /*_XTENSA_CORE_TIE_H*/
-
diff --git a/include/asm-xtensa/vga.h b/include/asm-xtensa/vga.h
deleted file mode 100644 (file)
index 1fd8cab..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * include/asm-xtensa/vga.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_VGA_H
-#define _XTENSA_VGA_H
-
-#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x)
-
-#define vga_readb(x)   (*(x))
-#define vga_writeb(x,y)        (*(y) = (x))
-
-#endif
diff --git a/include/asm-xtensa/xor.h b/include/asm-xtensa/xor.h
deleted file mode 100644 (file)
index e7b1f08..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * include/asm-xtensa/xor.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_XOR_H
-#define _XTENSA_XOR_H
-
-#include <asm-generic/xor.h>
-
-#endif
diff --git a/include/linux/atmel-mci.h b/include/linux/atmel-mci.h
new file mode 100644 (file)
index 0000000..2a2213e
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef __LINUX_ATMEL_MCI_H
+#define __LINUX_ATMEL_MCI_H
+
+#define ATMEL_MCI_MAX_NR_SLOTS 2
+
+struct dma_slave;
+
+/**
+ * struct mci_slot_pdata - board-specific per-slot configuration
+ * @bus_width: Number of data lines wired up the slot
+ * @detect_pin: GPIO pin wired to the card detect switch
+ * @wp_pin: GPIO pin wired to the write protect sensor
+ *
+ * If a given slot is not present on the board, @bus_width should be
+ * set to 0. The other fields are ignored in this case.
+ *
+ * Any pins that aren't available should be set to a negative value.
+ *
+ * Note that support for multiple slots is experimental -- some cards
+ * might get upset if we don't get the clock management exactly right.
+ * But in most cases, it should work just fine.
+ */
+struct mci_slot_pdata {
+       unsigned int            bus_width;
+       int                     detect_pin;
+       int                     wp_pin;
+};
+
+/**
+ * struct mci_platform_data - board-specific MMC/SDcard configuration
+ * @dma_slave: DMA slave interface to use in data transfers, or NULL.
+ * @slot: Per-slot configuration data.
+ */
+struct mci_platform_data {
+       struct dma_slave        *dma_slave;
+       struct mci_slot_pdata   slot[ATMEL_MCI_MAX_NR_SLOTS];
+};
+
+#endif /* __LINUX_ATMEL_MCI_H */
index eae26bb6430ae0e8db2c70385d1b1c72c3e32d5b..64433eb411d797c1988efff38b44471ee0587987 100644 (file)
@@ -83,7 +83,7 @@ typedef enum {
  * @datbuf:    data buffer - if NULL only oob data are read/written
  * @oobbuf:    oob data buffer
  *
- * Note, it is allowed to read more then one OOB area at one go, but not write.
+ * Note, it is allowed to read more than one OOB area at one go, but not write.
  * The interface assumes that the OOB write requests program only one page's
  * OOB area.
  */
index 9f2d76347f192458f35c825b5292f1f73f9cfb02..f69e66d151cca2b2972f720b0d477daebc0ad429 100644 (file)
@@ -87,7 +87,7 @@ struct ncp_objectname_ioctl
 #define NCP_AUTH_NDS   0x32
        int             auth_type;
        size_t          object_name_len;
-       void __user *   object_name;    /* an userspace data, in most cases user name */
+       void __user *   object_name;    /* a userspace data, in most cases user name */
 };
 
 struct ncp_privatedata_ioctl
index 82229317753d53286df8843eeb86f88d50cb7457..68bb1c501d0deee6ebe3d963222e48f34c212ef8 100644 (file)
@@ -327,9 +327,9 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum);
  * @tx_dma: DMA address of tx_buf, if @spi_message.is_dma_mapped
  * @rx_dma: DMA address of rx_buf, if @spi_message.is_dma_mapped
  * @len: size of rx and tx buffers (in bytes)
- * @speed_hz: Select a speed other then the device default for this
+ * @speed_hz: Select a speed other than the device default for this
  *      transfer. If 0 the default (from @spi_device) is used.
- * @bits_per_word: select a bits_per_word other then the device default
+ * @bits_per_word: select a bits_per_word other than the device default
  *      for this transfer. If 0 the default (from @spi_device) is used.
  * @cs_change: affects chipselect after this transfer completes
  * @delay_usecs: microseconds to delay after this transfer before
index 3b864f2d95604886c533e87105db2327ce5b5f2e..712ca53bc348847d7dd7e176f6b0dbabac93fa29 100644 (file)
@@ -176,10 +176,9 @@ typedef __u16 __bitwise __le16;
 typedef __u16 __bitwise __be16;
 typedef __u32 __bitwise __le32;
 typedef __u32 __bitwise __be32;
-#if defined(__GNUC__)
 typedef __u64 __bitwise __le64;
 typedef __u64 __bitwise __be64;
-#endif
+
 typedef __u16 __bitwise __sum16;
 typedef __u32 __bitwise __wsum;
 
index ccdc562e444e316ec08ba15dc24da4685ed86766..2dc2eb2b8e2210ea17f29602473b4d9bc7c4ac66 100644 (file)
@@ -253,7 +253,7 @@ struct ubi_mkvol_req {
  *
  * Re-sizing is possible for both dynamic and static volumes. But while dynamic
  * volumes may be re-sized arbitrarily, static volumes cannot be made to be
- * smaller then the number of bytes they bear. To arbitrarily shrink a static
+ * smaller than the number of bytes they bear. To arbitrarily shrink a static
  * volume, it must be wiped out first (by means of volume update operation with
  * zero number of bytes).
  */
index b5a892c68375287188f62125267b5cf51dbf2770..05b313283311e56119ad75c63feb83ac6c793f45 100644 (file)
@@ -599,7 +599,8 @@ asmlinkage void __init start_kernel(void)
        sched_clock_init();
        profile_init();
        if (!irqs_disabled())
-               printk("start_kernel(): bug: interrupts were enabled early\n");
+               printk(KERN_CRIT "start_kernel(): bug: interrupts were "
+                                "enabled early\n");
        early_boot_irqs_on();
        local_irq_enable();
 
index 30e74dd6d01b3e9bbe3f096ad638eb3d1b89fb10..79e40f00dcb89b8b3b5dedb5cc1c7da507e6b322 100644 (file)
@@ -379,8 +379,11 @@ static cpumask_var_t frozen_cpus;
 
 int disable_nonboot_cpus(void)
 {
-       int cpu, first_cpu, error = 0;
+       int cpu, first_cpu, error;
 
+       error = stop_machine_create();
+       if (error)
+               return error;
        cpu_maps_update_begin();
        first_cpu = cpumask_first(cpu_online_mask);
        /* We take down all of the non-boot CPUs in one shot to avoid races
@@ -409,6 +412,7 @@ int disable_nonboot_cpus(void)
                printk(KERN_ERR "Non-boot CPUs are not disabled\n");
        }
        cpu_maps_update_done();
+       stop_machine_destroy();
        return error;
 }
 
index 064e76afa507a252f6f4de8aec046f03c6cc62a7..af9224cdd6c0f4bf00f206879df9a4dcf5254d2c 100644 (file)
@@ -475,7 +475,7 @@ pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
 EXPORT_SYMBOL(task_session_nr_ns);
 
 /*
- * Used by proc to find the first pid that is greater then or equal to nr.
+ * Used by proc to find the first pid that is greater than or equal to nr.
  *
  * If there is a pid at nr this function is exactly the same as find_pid_ns.
  */
index e651ab05655f9f92b0bc9e9230ff59990eabb17a..7015733793e8c2fc71097b49875cdf11f25203a1 100644 (file)
@@ -619,7 +619,7 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu)
 static const char recursion_bug_msg [] =
                KERN_CRIT "BUG: recent printk recursion!\n";
 static int recursion_bug;
-       static int new_text_line = 1;
+static int new_text_line = 1;
 static char printk_buf[1024];
 
 asmlinkage int vprintk(const char *fmt, va_list args)
index 1ca99557e929261da5825325dafba49edde8be12..06f197560f3b70b7fdf71d9135857c4135750fe5 100644 (file)
@@ -45,7 +45,7 @@
  *
  * The value 8 is somewhat carefully chosen, as anything
  * larger can result in overflows. NSEC_PER_JIFFY grows as
- * HZ shrinks, so values greater then 8 overflow 32bits when
+ * HZ shrinks, so values greater than 8 overflow 32bits when
  * HZ=100.
  */
 #define JIFFIES_SHIFT  8
index 8d3fb0bd128898b09ba6b01f9c0038b72fbc499a..4bb42a0344ec49f5224d74c932786f0842446bef 100644 (file)
@@ -640,13 +640,14 @@ EXPORT_SYMBOL(radix_tree_tag_get);
  *
  *     Returns: the index of the hole if found, otherwise returns an index
  *     outside of the set specified (in which case 'return - index >= max_scan'
- *     will be true).
+ *     will be true). In rare cases of index wrap-around, 0 will be returned.
  *
  *     radix_tree_next_hole may be called under rcu_read_lock. However, like
- *     radix_tree_gang_lookup, this will not atomically search a snapshot of the
- *     tree at a single point in time. For example, if a hole is created at index
- *     5, then subsequently a hole is created at index 10, radix_tree_next_hole
- *     covering both indexes may return 10 if called under rcu_read_lock.
+ *     radix_tree_gang_lookup, this will not atomically search a snapshot of
+ *     the tree at a single point in time. For example, if a hole is created
+ *     at index 5, then subsequently a hole is created at index 10,
+ *     radix_tree_next_hole covering both indexes may return 10 if called
+ *     under rcu_read_lock.
  */
 unsigned long radix_tree_next_hole(struct radix_tree_root *root,
                                unsigned long index, unsigned long max_scan)
index f0e2892fe403e57c8b29dfde41d7abf6f3a6b1f6..6392ae5cc6b1e8972d98b059bee576aeb66d366c 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2254,7 +2254,7 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
                 * Add some empty padding so that we can catch
                 * overwrites from earlier objects rather than let
                 * tracking information or the free pointer be
-                * corrupted if an user writes before the start
+                * corrupted if a user writes before the start
                 * of the object.
                 */
                size += sizeof(void *);
index 52db5f60daa03ef6f23f9c647129b7dda39e97a8..20c576f530fa93ab03cfd93d50d561eac8bd831b 100644 (file)
@@ -141,8 +141,8 @@ void sctp_auth_destroy_keys(struct list_head *keys)
 /* Compare two byte vectors as numbers.  Return values
  * are:
  *       0 - vectors are equal
- *     < 0 - vector 1 is smaller then vector2
- *     > 0 - vector 1 is greater then vector2
+ *     < 0 - vector 1 is smaller than vector2
+ *     > 0 - vector 1 is greater than vector2
  *
  * Algorithm is:
  *     This is performed by selecting the numerically smaller key vector...
index 1c4e5d6c29c07e9c1905235d4adcd1774bee3117..3a0cd075914f44b261b85a7a27aaa899955a22fa 100644 (file)
@@ -4268,9 +4268,9 @@ nomem:
 
 /*
  * Handle a protocol violation when the chunk length is invalid.
- * "Invalid" length is identified as smaller then the minimal length a
+ * "Invalid" length is identified as smaller than the minimal length a
  * given chunk can be.  For example, a SACK chunk has invalid length
- * if it's length is set to be smaller then the size of sctp_sack_chunk_t.
+ * if its length is set to be smaller than the size of sctp_sack_chunk_t.
  *
  * We inform the other end by sending an ABORT with a Protocol Violation
  * error code.
@@ -4300,7 +4300,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
 
 /*
  * Handle a protocol violation when the parameter length is invalid.
- * "Invalid" length is identified as smaller then the minimal length a
+ * "Invalid" length is identified as smaller than the minimal length a
  * given parameter can be.
  */
 static sctp_disposition_t sctp_sf_violation_paramlen(
index b14a8f33e42d6ad26a2e6fc3005943cc266d8434..ff0a8f88de04bd275f3b16b921ed88d846407ca4 100644 (file)
@@ -2717,7 +2717,7 @@ static int sctp_setsockopt_associnfo(struct sock *sk, char __user *optval, int o
                                paths++;
                        }
 
-                       /* Only validate asocmaxrxt if we have more then
+                       /* Only validate asocmaxrxt if we have more than
                         * one path/transport.  We do this because path
                         * retransmissions are only counted when we have more
                         * then one path.
index 35c73e82553aeae8f6ab6f282fe17844de9d143a..9bd64565021a91ed890e27313c7ce364f474c749 100644 (file)
@@ -227,7 +227,7 @@ void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn)
                 */
                bitmap_zero(map->tsn_map, map->len);
        } else {
-               /* If the gap is smaller then the map size,
+               /* If the gap is smaller than the map size,
                 * shift the map by 'gap' bits and update further.
                 */
                bitmap_shift_right(map->tsn_map, map->tsn_map, gap, map->len);
index a0274f3dac08874f6f3092cfb946bb04381973e7..3ee9900ffd7b30c6b3a530b75f53a6353f012320 100644 (file)
 
    Started Fri Mar 17 16:13:18 MET 1995
 
-   v0.1 (ALPHA, was an user-level program called AudioExcelDSP16.c)
+   v0.1 (ALPHA, was a user-level program called AudioExcelDSP16.c)
    - Initial code.
    v0.2 (ALPHA)
    - Cleanups.
index ca26c532e77e36e71b4966030592628c87874141..11639bd72a518fe340f54236ccecf6c2667f7f67 100644 (file)
@@ -238,7 +238,7 @@ static void i_usX2Y_In04Int(struct urb *urb)
                                        send = 0;
                                for (j = 0; j < URBS_AsyncSeq  &&  !err; ++j)
                                        if (0 == usX2Y->AS04.urb[j]->status) {
-                                               struct us428_p4out *p4out = us428ctls->p4out + send;    // FIXME if more then 1 p4out is new, 1 gets lost.
+                                               struct us428_p4out *p4out = us428ctls->p4out + send;    // FIXME if more than 1 p4out is new, 1 gets lost.
                                                usb_fill_bulk_urb(usX2Y->AS04.urb[j], usX2Y->chip.dev,
                                                                  usb_sndbulkpipe(usX2Y->chip.dev, 0x04), &p4out->val.vol, 
                                                                  p4out->type == eLT_Light ? sizeof(struct us428_lights) : 5,